{"id":15971166,"url":"https://github.com/glurp/gtk-dashboard","last_synced_at":"2025-04-04T15:43:19.620Z","repository":{"id":141874943,"uuid":"110720956","full_name":"glurp/gtk-dashboard","owner":"glurp","description":"Dashboard with ruby and gtk","archived":false,"fork":false,"pushed_at":"2018-01-08T12:26:06.000Z","size":469,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-10T01:37:58.398Z","etag":null,"topics":["dashboard","gui"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/glurp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-14T17:13:55.000Z","updated_at":"2022-05-04T17:36:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"8cb12179-5740-4289-a5a7-cd4c605de8d3","html_url":"https://github.com/glurp/gtk-dashboard","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glurp%2Fgtk-dashboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glurp%2Fgtk-dashboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glurp%2Fgtk-dashboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glurp%2Fgtk-dashboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glurp","download_url":"https://codeload.github.com/glurp/gtk-dashboard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247208018,"owners_count":20901568,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dashboard","gui"],"created_at":"2024-10-07T20:08:23.318Z","updated_at":"2025-04-04T15:43:19.599Z","avatar_url":"https://github.com/glurp.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nPresentation\n============\n\nA Dashboard with on-line configuration :\n* edit descriptor\n* on save of it, dahboard reloads the configuration\n\nShould work anywhere Ruby-Gtk work.\n\n![demo](https://raw.githubusercontent.com/glurp/gtk-dashboard/master/demo.png)\n\nUsage (linux/windows) :\n------------------------\n\n```\n\u003e gem install gtk3\n\u003e gem install Ruiby\n\u003e git clone https://github.com/glurp/gtk-dashboard.git\n\u003e cd gtk-dashboard\n\u003e cd lib\n\u003e ruby show.rb  descr.rb\n```\n\n\nArchitecture\n===========\n```\n       ----------      -------------------     --------\n       |Producer|      | memory-database |     |widget|\n       |        |      |     rtdb        |     |      |\n       |        |      |                 |Read |------|\n       |--------|Write |                 |====\u003e| Plot |====\u003e Main-Window\n       |  MQTT  |=====\u003e|                 |(sub)|------|\n       |connect.| (pub)|                 |     |      |\n       |--------|      |                 |     |      |\n       |        |      |                 |     |      |\n       |        |      |                 |     |      |\n       ----------      -------------------     --------\n\n```\n\nRTDB use read/write and Publish/Subscribe pattern.\n\nAll these elements are in one, simple process, which manage  Gtk main window.\n\nProducer, database, widgets are descibe with a  ruby file descriptor.\nDescriptor contain also the CSS of the application.\n\n\nDesciptor\n==========\n\nStructure\n--------\n```ruby\n{\n    bddtr: {\n        \u003cvarname\u003e : {....}, \n        bb: {type: Float, value: 0},\n    },\n    production: [\n        {type: ProdSystem,... },\n        {type: ProdPipeNum, ... },\n        {type: ProdRuby, ... },\n    ],\n    window: {\n     page1: {\n        1 =\u003e {\n          1 =\u003e  proc {|e| e.nb(10,\"nb Frame\",\"pgrep -laf appli_sim\") },\n          2 =\u003e  proc {|e| e.fsize(10,\"size-logs\",\"../logs/log*.txt\")  },\n        }\n     }\n   }\n   css; \u003c\u003cEEND\n* { ... }\nEEND\n}\n```\nRTDB contain the list of variable in database. (Variables are String/Float/Int, no structurd data).\n\nProduceur declare all connector.\nThey are 3 type/family of connector:\n* ProdSystem : data came from  a system commande.\n* ProdPipeNum: data are numerics values out of pipe ( exemple : vmtat 1)\n* ProdRuby : A ruby  generate value for Rtdb. the Dashboard call this traitment periodcly (as ProSystem)\n\n\n\nWindows entry specify the widgets.\n\n* They are organise in row/column table : r1 { cel1 proc {} , cell1 proc {} ..} r2 { ... } r3 { ... }\n\n\n\nAll widget are specified by proc.\nA helper is provided, 'e' context variable, which is the manager of all widgets (see E class in widgets/engine.rb)\n\nOld fashion widgets\n--------------------\nOn first version, widget get data, they were no memory-database, \n* e.nb  : execute a system command and count the line output, show \"label : value\"\n* e.fsize: count the number of line of all files globed by parameter\n* e.bd : show rtdb variable content in a label\n\n\n\nNew fashion Widgets\n-------------------\n\nIn new version, database act as middleware\n\nWidget which use rtdb are :\n\n* Bd\n* List\n* Plot\n* Gauge\n* List\n* Map\n\nTODO\n=====\n* [x] Map widget\n* [x] rtdb\n* [ ] verify the desriptor, for minimise error() popup\n* [ ] subsciption on all widget using rtdb\n* [ ] multiple pad\n* [ ] test unit\n* [ ] bin tool for run from anywhere\n* [ ] gem ! (?)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglurp%2Fgtk-dashboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglurp%2Fgtk-dashboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglurp%2Fgtk-dashboard/lists"}