https://github.com/glurp/gtk-dashboard
Dashboard with ruby and gtk
https://github.com/glurp/gtk-dashboard
dashboard gui
Last synced: about 1 year ago
JSON representation
Dashboard with ruby and gtk
- Host: GitHub
- URL: https://github.com/glurp/gtk-dashboard
- Owner: glurp
- License: bsd-2-clause
- Created: 2017-11-14T17:13:55.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-08T12:26:06.000Z (over 8 years ago)
- Last Synced: 2025-02-10T01:37:58.398Z (over 1 year ago)
- Topics: dashboard, gui
- Language: Ruby
- Homepage:
- Size: 458 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Presentation
============
A Dashboard with on-line configuration :
* edit descriptor
* on save of it, dahboard reloads the configuration
Should work anywhere Ruby-Gtk work.

Usage (linux/windows) :
------------------------
```
> gem install gtk3
> gem install Ruiby
> git clone https://github.com/glurp/gtk-dashboard.git
> cd gtk-dashboard
> cd lib
> ruby show.rb descr.rb
```
Architecture
===========
```
---------- ------------------- --------
|Producer| | memory-database | |widget|
| | | rtdb | | |
| | | |Read |------|
|--------|Write | |====>| Plot |====> Main-Window
| MQTT |=====>| |(sub)|------|
|connect.| (pub)| | | |
|--------| | | | |
| | | | | |
| | | | | |
---------- ------------------- --------
```
RTDB use read/write and Publish/Subscribe pattern.
All these elements are in one, simple process, which manage Gtk main window.
Producer, database, widgets are descibe with a ruby file descriptor.
Descriptor contain also the CSS of the application.
Desciptor
==========
Structure
--------
```ruby
{
bddtr: {
: {....},
bb: {type: Float, value: 0},
},
production: [
{type: ProdSystem,... },
{type: ProdPipeNum, ... },
{type: ProdRuby, ... },
],
window: {
page1: {
1 => {
1 => proc {|e| e.nb(10,"nb Frame","pgrep -laf appli_sim") },
2 => proc {|e| e.fsize(10,"size-logs","../logs/log*.txt") },
}
}
}
css; <