Changes have been pushed for the repository "fawkes.git". (Fawkes Robotics Software Framework)
Clone: g...@git.fawkesrobotics.org:fawkes.git Gitweb: http://git.fawkesrobotics.org/fawkes.git Trac: http://trac.fawkesrobotics.org The branch, timn/webview-2.0 has been updated to 7f2d276c9a18a1d29adbed5906befb22a34ef14d (commit) via 40912a7b0cb495b178b3755a83b647eb45ac08d6 (commit) via e6ca1203e130b0b32f853019b938c4e33c37a826 (commit) via 0ecbf7c5f20fc6a3be74f51fb2eb0e12f485be00 (commit) via 56c48b8a866fd899a3d23db9cd4f82ad556070f9 (commit) via 23ad5a216063f6d39a2525176998c30fcbd0fb43 (commit) via 49a6aefec5fc0fdf47c0a4ce4474e4834c61d797 (commit) via aee8c0a7b3c3c4eb3c1318866320554961e8b46d (commit) via 11d832bebeb928867681aec8fe5f72e80f39d977 (commit) via cd2ade005a1a9d002c15a9a7e59157b19de3524e (commit) via 71c107744fb385997c7f4cc4276663743e272c54 (commit) via e2fe7bf33977374ff59ded69cbe81a5b335224b9 (commit) via ac6ca63474af331f668f319bedb71af43653b89f (commit) via a5f032bd56792304e5b048ab5279096d65abbdcc (commit) via e655710f8019159a089a0a6cf83a45877e123e66 (commit) via c11bd7025eb5e83cc9850c9b1cc6fc936cb35669 (commit) from 8b0c90235ec9f98ccbffc999fce7710fd99e6eeb (commit) http://git.fawkesrobotics.org/fawkes.git/timn/webview-2.0 Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - *Log* --------------------------------------------------------------- commit c11bd7025eb5e83cc9850c9b1cc6fc936cb35669 Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> AuthorDate: Wed Apr 11 10:58:46 2018 +0200 Commit: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> CommitDate: Wed Apr 11 10:58:46 2018 +0200 webview: add transforms REST API http://git.fawkesrobotics.org/fawkes.git/commit/c11bd70 http://trac.fawkesrobotics.org/changeset/c11bd70 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit e655710f8019159a089a0a6cf83a45877e123e66 Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> AuthorDate: Wed Apr 11 11:09:09 2018 +0200 Commit: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> CommitDate: Wed Apr 11 11:09:09 2018 +0200 webview-frontend: add transforms view http://git.fawkesrobotics.org/fawkes.git/commit/e655710 http://trac.fawkesrobotics.org/changeset/e655710 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit a5f032bd56792304e5b048ab5279096d65abbdcc Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> AuthorDate: Wed Apr 11 11:09:55 2018 +0200 Commit: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> CommitDate: Wed Apr 11 11:09:55 2018 +0200 webview-frontend: improve clips-executive domain view error reporting If the server gave an error message why something failed state this message, rather than saying the robot was unreachable. http://git.fawkesrobotics.org/fawkes.git/commit/a5f032b http://trac.fawkesrobotics.org/changeset/a5f032b - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit ac6ca63474af331f668f319bedb71af43653b89f Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> AuthorDate: Wed Apr 11 11:10:39 2018 +0200 Commit: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> CommitDate: Wed Apr 11 11:10:39 2018 +0200 webview-frontend: report if no images available Add zero message view if no images available. http://git.fawkesrobotics.org/fawkes.git/commit/ac6ca63 http://trac.fawkesrobotics.org/changeset/ac6ca63 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit e2fe7bf33977374ff59ded69cbe81a5b335224b9 Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> AuthorDate: Wed Apr 11 15:01:19 2018 +0200 Commit: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> CommitDate: Wed Apr 11 15:05:23 2018 +0200 webview: blackboard REST API can now provide dot graph http://git.fawkesrobotics.org/fawkes.git/commit/e2fe7bf http://trac.fawkesrobotics.org/changeset/e2fe7bf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit 71c107744fb385997c7f4cc4276663743e272c54 Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> AuthorDate: Wed Apr 11 15:02:16 2018 +0200 Commit: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> CommitDate: Wed Apr 11 15:05:23 2018 +0200 webview-frontend: add blackboard graph http://git.fawkesrobotics.org/fawkes.git/commit/71c1077 http://trac.fawkesrobotics.org/changeset/71c1077 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit cd2ade005a1a9d002c15a9a7e59157b19de3524e Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> AuthorDate: Wed Apr 11 15:04:33 2018 +0200 Commit: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> CommitDate: Wed Apr 11 15:05:23 2018 +0200 webview-frontend: improve scrolling behavior http://git.fawkesrobotics.org/fawkes.git/commit/cd2ade0 http://trac.fawkesrobotics.org/changeset/cd2ade0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit 11d832bebeb928867681aec8fe5f72e80f39d977 Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> AuthorDate: Wed Apr 11 16:06:00 2018 +0200 Commit: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> CommitDate: Wed Apr 11 16:06:00 2018 +0200 webview: remove old web interface code Remove code related to generating web pages and handling requests to the old page format. Webview 2.0 has not feature parity, and actually quite a few more features already than the old code. Time to say goodbye to the good ol' Trac look. http://git.fawkesrobotics.org/fawkes.git/commit/11d832b http://trac.fawkesrobotics.org/changeset/11d832b - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit aee8c0a7b3c3c4eb3c1318866320554961e8b46d Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> AuthorDate: Wed Apr 11 16:17:40 2018 +0200 Commit: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> CommitDate: Wed Apr 11 16:17:40 2018 +0200 libwebview: remove old Trac wiki style formatter http://git.fawkesrobotics.org/fawkes.git/commit/aee8c0a http://trac.fawkesrobotics.org/changeset/aee8c0a - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit 49a6aefec5fc0fdf47c0a4ce4474e4834c61d797 Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> AuthorDate: Wed Apr 11 16:18:30 2018 +0200 Commit: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> CommitDate: Wed Apr 11 16:18:30 2018 +0200 clips-webview: delete no longer used plugin Replaced by CLIPS REST API and Webview 2.0 frontend. http://git.fawkesrobotics.org/fawkes.git/commit/49a6aef http://trac.fawkesrobotics.org/changeset/49a6aef - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit 23ad5a216063f6d39a2525176998c30fcbd0fb43 Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> AuthorDate: Wed Apr 11 16:19:54 2018 +0200 Commit: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> CommitDate: Wed Apr 11 16:22:06 2018 +0200 rrdweb: move to attic It is no longer functional and must be updated to the Webview 2.0. But given our Prometheus metrics integration we need to see if we still have a need for RRD. For now, move the disfunctional web interface to the attic. http://git.fawkesrobotics.org/fawkes.git/commit/23ad5a2 http://trac.fawkesrobotics.org/changeset/23ad5a2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit 56c48b8a866fd899a3d23db9cd4f82ad556070f9 Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> AuthorDate: Wed Apr 11 16:23:01 2018 +0200 Commit: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> CommitDate: Wed Apr 11 16:23:01 2018 +0200 webview-ptzcam: move to attic http://git.fawkesrobotics.org/fawkes.git/commit/56c48b8 http://trac.fawkesrobotics.org/changeset/56c48b8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit 0ecbf7c5f20fc6a3be74f51fb2eb0e12f485be00 Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> AuthorDate: Wed Apr 11 16:26:25 2018 +0200 Commit: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> CommitDate: Wed Apr 11 16:26:25 2018 +0200 webview: remove old assets, scripts, css No longer required with Webview 2.0. http://git.fawkesrobotics.org/fawkes.git/commit/0ecbf7c http://trac.fawkesrobotics.org/changeset/0ecbf7c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit e6ca1203e130b0b32f853019b938c4e33c37a826 Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> AuthorDate: Wed Apr 11 16:27:06 2018 +0200 Commit: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> CommitDate: Wed Apr 11 16:27:06 2018 +0200 webview: add .gitkeep dir to webview res dir So that it always exists after checkout. http://git.fawkesrobotics.org/fawkes.git/commit/e6ca120 http://trac.fawkesrobotics.org/changeset/e6ca120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit 40912a7b0cb495b178b3755a83b647eb45ac08d6 Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> AuthorDate: Wed Apr 11 20:38:52 2018 +0200 Commit: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> CommitDate: Wed Apr 11 20:38:52 2018 +0200 webview-frontend: smaller style changes This vertical sizing is driving me crazy. Anyone into CSS styling who knows how to scale an SVG to the size of the enclosing container, keeping the scale to 1, overflow with scroll bars, and doing this without some fixed pixel size in the hierarchy? I most of the time end up with containers size 0, oversized, or max width correct but then vertically too large... http://git.fawkesrobotics.org/fawkes.git/commit/40912a7 http://trac.fawkesrobotics.org/changeset/40912a7 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - commit 7f2d276c9a18a1d29adbed5906befb22a34ef14d Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> AuthorDate: Wed Apr 11 20:41:23 2018 +0200 Commit: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> CommitDate: Wed Apr 11 20:41:23 2018 +0200 webview-frontend: format floats to 4 decimals Should be enough and otherwise we get an overflow rather quickly, for example for transforms. http://git.fawkesrobotics.org/fawkes.git/commit/7f2d276 http://trac.fawkesrobotics.org/changeset/7f2d276 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *Summary* ----------------------------------------------------------- .../frontend/src/assets => res/webview}/.gitkeep | 0 res/webview/chrome/dots.gif | Bin 50 -> 0 bytes res/webview/chrome/navlogo.png | Bin 1555 -> 0 bytes res/webview/chrome/navlogo.xcf | Bin 3415 -> 0 bytes res/webview/chrome/topbar_gradient.png | Bin 350 -> 0 bytes res/webview/chrome/topbar_gradient2.png | Bin 309 -> 0 bytes res/webview/css/blackboard.css | 8 - .../css/jqtheme/images/animated-overlay.gif | Bin 1738 -> 0 bytes .../jqtheme/images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 212 -> 0 bytes .../jqtheme/images/ui-bg_flat_75_ffffff_40x100.png | Bin 208 -> 0 bytes .../jqtheme/images/ui-bg_glass_55_fbf9ee_1x400.png | Bin 335 -> 0 bytes .../ui-bg_highlight-soft_50_880000_1x100.png | Bin 358 -> 0 bytes .../ui-bg_highlight-soft_50_e6e6e6_1x100.png | Bin 278 -> 0 bytes .../ui-bg_highlight-soft_75_cccccc_1x100.png | Bin 280 -> 0 bytes .../images/ui-bg_inset-soft_95_fef1ec_1x100.png | Bin 370 -> 0 bytes .../css/jqtheme/images/ui-icons_222222_256x240.png | Bin 6922 -> 0 bytes .../css/jqtheme/images/ui-icons_880000_256x240.png | Bin 4549 -> 0 bytes .../css/jqtheme/images/ui-icons_888888_256x240.png | Bin 6999 -> 0 bytes .../css/jqtheme/images/ui-icons_cd0a0a_256x240.png | Bin 4549 -> 0 bytes .../css/jqtheme/images/ui-icons_dddddd_256x240.png | Bin 6923 -> 0 bytes res/webview/css/jqtheme/jquery-ui.custom.css | 1162 -------------------- res/webview/css/rrdweb.css | 4 - res/webview/css/webview-ptzcam.css | 13 - res/webview/css/webview.css | 131 --- res/webview/fawkes.png | Bin 2006 -> 0 bytes res/webview/images/favicon.ico | Bin 2966 -> 0 bytes res/webview/images/favicon.png | Bin 280 -> 0 bytes res/webview/images/icon-triangle-e.png | Bin 407 -> 0 bytes res/webview/images/icon-triangle-s.png | Bin 403 -> 0 bytes res/webview/js/jquery-ui.custom.min.js | 7 - res/webview/js/jquery.min.js | 4 - res/webview/webview.png | Bin 4580 -> 0 bytes src/libs/webview/formatters/tracwiki.cpp | 120 -- src/libs/webview/formatters/tracwiki.h | 48 - src/plugins/Makefile | 5 +- src/plugins/{ => attic}/rrdweb/Makefile | 0 src/plugins/{ => attic}/rrdweb/rrdweb_plugin.cpp | 0 src/plugins/{ => attic}/rrdweb/rrdweb_plugin.h | 0 .../{ => attic}/rrdweb/rrdweb_processor.cpp | 0 src/plugins/{ => attic}/rrdweb/rrdweb_processor.h | 0 src/plugins/{ => attic}/rrdweb/rrdweb_thread.cpp | 0 src/plugins/{ => attic}/rrdweb/rrdweb_thread.h | 0 src/plugins/{ => attic}/webview-ptzcam/Makefile | 0 .../webview-ptzcam/webview-ptzcam-plugin.cpp | 0 .../webview-ptzcam/webview-ptzcam-processor.cpp | 0 .../webview-ptzcam/webview-ptzcam-processor.h | 0 .../webview-ptzcam/webview-ptzcam-thread.cpp | 0 .../webview-ptzcam/webview-ptzcam-thread.h | 0 src/plugins/clips-webview/Makefile | 57 - src/plugins/clips-webview/clips-webview-plugin.cpp | 45 - .../clips-webview/clips-webview-processor.cpp | 315 ------ .../clips-webview/clips-webview-processor.h | 68 -- src/plugins/clips-webview/clips-webview-thread.cpp | 83 -- src/plugins/clips-webview/clips-webview-thread.h | 61 - src/plugins/webview/Makefile | 123 +-- src/plugins/webview/blackboard-rest-api/api.yaml | 39 + .../blackboard-rest-api/blackboard-rest-api.cpp | 119 ++ .../blackboard-rest-api/blackboard-rest-api.h | 5 + .../blackboard-rest-api/model/BlackboardGraph.cpp | 131 +++ .../blackboard-rest-api/model/BlackboardGraph.h | 142 +++ src/plugins/webview/blackboard_processor.cpp | 398 ------- src/plugins/webview/blackboard_processor.h | 62 - src/plugins/webview/footer_generator.cpp | 77 -- src/plugins/webview/footer_generator.h | 41 - src/plugins/webview/frontend/src/_theming.scss | 2 +- src/plugins/webview/frontend/src/app/app.module.ts | 2 + .../webview/frontend/src/chrome/nav/template.html | 4 + .../blackboard/components/overview.component.html | 37 +- .../blackboard/components/overview.component.scss | 20 + .../blackboard/components/overview.component.ts | 72 ++ .../src/parts/blackboard/models/BlackboardGraph.ts | 27 + .../src/parts/blackboard/services/api.service.ts | 15 + .../components/domain.component.html | 2 +- .../clips-executive/components/domain.component.ts | 6 +- .../clips/components/clips-env.component.html | 2 +- .../clips/components/clips-env.component.scss | 10 + .../images/components/overview.component.html | 4 +- .../parts/images/components/overview.component.ts | 3 + .../plugins/components/overview.component.html | 2 +- .../plugins/components/overview.component.scss | 10 + .../src/parts/transforms/component.module.ts | 30 + .../transforms/components/overview.component.html | 44 + .../transforms/components/overview.component.scss | 20 + .../components/overview.component.spec.ts | 29 + .../transforms/components/overview.component.ts | 98 ++ .../src/parts/transforms/models/TransformsGraph.ts | 27 + .../frontend/src/parts/transforms/module.ts | 23 + .../src/parts/transforms/routing.module.ts | 19 + .../src/parts/transforms/service.module.ts | 11 + .../src/parts/transforms/services/api.service.ts | 43 + src/plugins/webview/header_generator.cpp | 91 -- src/plugins/webview/header_generator.h | 50 - src/plugins/webview/plugins_processor.cpp | 149 --- src/plugins/webview/plugins_processor.h | 49 - src/plugins/webview/startpage_processor.cpp | 88 -- src/plugins/webview/startpage_processor.h | 47 - .../{backendinfo-rest-api => tf-rest-api}/Makefile | 0 src/plugins/webview/tf-rest-api/api.yaml | 59 + .../webview/tf-rest-api/model/TransformsGraph.cpp | 131 +++ .../webview/tf-rest-api/model/TransformsGraph.h | 142 +++ src/plugins/webview/tf-rest-api/tf-rest-api.cpp | 82 ++ src/plugins/webview/tf-rest-api/tf-rest-api.h | 53 + src/plugins/webview/tf_processor.cpp | 106 -- src/plugins/webview/tf_processor.h | 56 - src/plugins/webview/webview_plugin.cpp | 9 +- src/plugins/webview/webview_thread.cpp | 69 +-- src/plugins/webview/webview_thread.h | 33 +- 107 files changed, 1523 insertions(+), 3521 deletions(-) copy {src/plugins/webview/frontend/src/assets => res/webview}/.gitkeep (100%) delete mode 100644 res/webview/chrome/dots.gif delete mode 100644 res/webview/chrome/navlogo.png delete mode 100644 res/webview/chrome/navlogo.xcf delete mode 100644 res/webview/chrome/topbar_gradient.png delete mode 100644 res/webview/chrome/topbar_gradient2.png delete mode 100644 res/webview/css/blackboard.css delete mode 100644 res/webview/css/jqtheme/images/animated-overlay.gif delete mode 100644 res/webview/css/jqtheme/images/ui-bg_flat_0_aaaaaa_40x100.png delete mode 100644 res/webview/css/jqtheme/images/ui-bg_flat_75_ffffff_40x100.png delete mode 100644 res/webview/css/jqtheme/images/ui-bg_glass_55_fbf9ee_1x400.png delete mode 100644 res/webview/css/jqtheme/images/ui-bg_highlight-soft_50_880000_1x100.png delete mode 100644 res/webview/css/jqtheme/images/ui-bg_highlight-soft_50_e6e6e6_1x100.png delete mode 100644 res/webview/css/jqtheme/images/ui-bg_highlight-soft_75_cccccc_1x100.png delete mode 100644 res/webview/css/jqtheme/images/ui-bg_inset-soft_95_fef1ec_1x100.png delete mode 100644 res/webview/css/jqtheme/images/ui-icons_222222_256x240.png delete mode 100644 res/webview/css/jqtheme/images/ui-icons_880000_256x240.png delete mode 100644 res/webview/css/jqtheme/images/ui-icons_888888_256x240.png delete mode 100644 res/webview/css/jqtheme/images/ui-icons_cd0a0a_256x240.png delete mode 100644 res/webview/css/jqtheme/images/ui-icons_dddddd_256x240.png delete mode 100644 res/webview/css/jqtheme/jquery-ui.custom.css delete mode 100644 res/webview/css/rrdweb.css delete mode 100644 res/webview/css/webview-ptzcam.css delete mode 100644 res/webview/css/webview.css delete mode 100644 res/webview/fawkes.png delete mode 100644 res/webview/images/favicon.ico delete mode 100644 res/webview/images/favicon.png delete mode 100644 res/webview/images/icon-triangle-e.png delete mode 100644 res/webview/images/icon-triangle-s.png delete mode 100644 res/webview/js/jquery-ui.custom.min.js delete mode 100644 res/webview/js/jquery.min.js delete mode 100644 res/webview/webview.png delete mode 100644 src/libs/webview/formatters/tracwiki.cpp delete mode 100644 src/libs/webview/formatters/tracwiki.h rename src/plugins/{ => attic}/rrdweb/Makefile (100%) rename src/plugins/{ => attic}/rrdweb/rrdweb_plugin.cpp (100%) rename src/plugins/{ => attic}/rrdweb/rrdweb_plugin.h (100%) rename src/plugins/{ => attic}/rrdweb/rrdweb_processor.cpp (100%) rename src/plugins/{ => attic}/rrdweb/rrdweb_processor.h (100%) rename src/plugins/{ => attic}/rrdweb/rrdweb_thread.cpp (100%) rename src/plugins/{ => attic}/rrdweb/rrdweb_thread.h (100%) rename src/plugins/{ => attic}/webview-ptzcam/Makefile (100%) rename src/plugins/{ => attic}/webview-ptzcam/webview-ptzcam-plugin.cpp (100%) rename src/plugins/{ => attic}/webview-ptzcam/webview-ptzcam-processor.cpp (100%) rename src/plugins/{ => attic}/webview-ptzcam/webview-ptzcam-processor.h (100%) rename src/plugins/{ => attic}/webview-ptzcam/webview-ptzcam-thread.cpp (100%) rename src/plugins/{ => attic}/webview-ptzcam/webview-ptzcam-thread.h (100%) delete mode 100644 src/plugins/clips-webview/Makefile delete mode 100644 src/plugins/clips-webview/clips-webview-plugin.cpp delete mode 100644 src/plugins/clips-webview/clips-webview-processor.cpp delete mode 100644 src/plugins/clips-webview/clips-webview-processor.h delete mode 100644 src/plugins/clips-webview/clips-webview-thread.cpp delete mode 100644 src/plugins/clips-webview/clips-webview-thread.h create mode 100644 src/plugins/webview/blackboard-rest-api/model/BlackboardGraph.cpp create mode 100644 src/plugins/webview/blackboard-rest-api/model/BlackboardGraph.h delete mode 100644 src/plugins/webview/blackboard_processor.cpp delete mode 100644 src/plugins/webview/blackboard_processor.h delete mode 100644 src/plugins/webview/footer_generator.cpp delete mode 100644 src/plugins/webview/footer_generator.h create mode 100644 src/plugins/webview/frontend/src/parts/blackboard/models/BlackboardGraph.ts create mode 100644 src/plugins/webview/frontend/src/parts/transforms/component.module.ts create mode 100644 src/plugins/webview/frontend/src/parts/transforms/components/overview.component.html create mode 100644 src/plugins/webview/frontend/src/parts/transforms/components/overview.component.scss create mode 100644 src/plugins/webview/frontend/src/parts/transforms/components/overview.component.spec.ts create mode 100644 src/plugins/webview/frontend/src/parts/transforms/components/overview.component.ts create mode 100644 src/plugins/webview/frontend/src/parts/transforms/models/TransformsGraph.ts create mode 100644 src/plugins/webview/frontend/src/parts/transforms/module.ts create mode 100644 src/plugins/webview/frontend/src/parts/transforms/routing.module.ts create mode 100644 src/plugins/webview/frontend/src/parts/transforms/service.module.ts create mode 100644 src/plugins/webview/frontend/src/parts/transforms/services/api.service.ts delete mode 100644 src/plugins/webview/header_generator.cpp delete mode 100644 src/plugins/webview/header_generator.h delete mode 100644 src/plugins/webview/plugins_processor.cpp delete mode 100644 src/plugins/webview/plugins_processor.h delete mode 100644 src/plugins/webview/startpage_processor.cpp delete mode 100644 src/plugins/webview/startpage_processor.h copy src/plugins/webview/{backendinfo-rest-api => tf-rest-api}/Makefile (100%) create mode 100644 src/plugins/webview/tf-rest-api/api.yaml create mode 100644 src/plugins/webview/tf-rest-api/model/TransformsGraph.cpp create mode 100644 src/plugins/webview/tf-rest-api/model/TransformsGraph.h create mode 100644 src/plugins/webview/tf-rest-api/tf-rest-api.cpp create mode 100644 src/plugins/webview/tf-rest-api/tf-rest-api.h delete mode 100644 src/plugins/webview/tf_processor.cpp delete mode 100644 src/plugins/webview/tf_processor.h - *Diffs* ------------------------------------------------------------- - *commit* c11bd7025eb5e83cc9850c9b1cc6fc936cb35669 - - - - - - - - - - Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> Date: Wed Apr 11 10:58:46 2018 +0200 Subject: webview: add transforms REST API src/plugins/webview/Makefile | 1 + .../{backendinfo-rest-api => tf-rest-api}/Makefile | 0 src/plugins/webview/tf-rest-api/api.yaml | 59 ++++++++++++++ .../tf-rest-api/model/TransformsGraph.cpp} | 41 +++++----- .../tf-rest-api/model/TransformsGraph.h} | 36 ++++---- src/plugins/webview/tf-rest-api/tf-rest-api.cpp | 82 ++++++++++++++++++++ .../tf-rest-api.h} | 19 +++-- src/plugins/webview/webview_plugin.cpp | 9 ++- 8 files changed, 197 insertions(+), 50 deletions(-) _Diff for modified files_: diff --git a/src/plugins/webview/Makefile b/src/plugins/webview/Makefile index d864562..96758bc 100644 --- a/src/plugins/webview/Makefile +++ b/src/plugins/webview/Makefile @@ -98,6 +98,7 @@ ifeq ($(HAVE_BOOST_LIBS)$(HAVE_LIBMICROHTTPD),11) OBJS_webview += blackboard-rest-api/blackboard-rest-api.o \ backendinfo-rest-api/backendinfo-rest-api.o \ plugin-rest-api/plugin-rest-api.o \ + tf-rest-api/tf-rest-api.o \ $(patsubst %.cpp,%.o,$(subst $(SRCDIR)/,,$(realpath $(wildcard $(SRCDIR)/*-rest-api/model/*.cpp)))) ifeq ($(HAVE_JPEG),1) diff --git a/src/plugins/webview/webview_plugin.cpp b/src/plugins/webview/webview_plugin.cpp index ebfb326..81d072a 100644 --- a/src/plugins/webview/webview_plugin.cpp +++ b/src/plugins/webview/webview_plugin.cpp @@ -3,8 +3,7 @@ * webview_plugin.h - Fawkes Webview Plugin * * Created: Mon Oct 13 17:46:57 2008 (I5 Developer's Day) - * Copyright 2006-2008 Tim Niemueller [www.niemueller.de] - * + * Copyright 2006-2018 Tim Niemueller [www.niemueller.de] ****************************************************************************/ /* This program is free software; you can redistribute it and/or modify @@ -32,6 +31,9 @@ # ifdef HAVE_JPEG # include "image-rest-api/image-rest-api.h" # endif +# ifdef HAVE_TF +# include "tf-rest-api/tf-rest-api.h" +# endif #endif using namespace fawkes; @@ -59,6 +61,9 @@ WebviewPlugin::WebviewPlugin(Configuration *config) # ifdef HAVE_JPEG thread_list.push_back(new ImageRestApi()); # endif +# ifdef HAVE_TF + thread_list.push_back(new TransformsRestApi()); +# endif #endif } - *commit* e655710f8019159a089a0a6cf83a45877e123e66 - - - - - - - - - - Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> Date: Wed Apr 11 11:09:09 2018 +0200 Subject: webview-frontend: add transforms view src/plugins/webview/frontend/src/app/app.module.ts | 2 + .../webview/frontend/src/chrome/nav/template.html | 4 + .../{blackboard => transforms}/component.module.ts | 16 ++-- .../transforms/components/overview.component.html | 44 +++++++++ .../components/overview.component.scss | 2 +- .../components/overview.component.spec.ts | 12 +- .../transforms/components/overview.component.ts | 98 ++++++++++++++++++++ .../models/TransformsGraph.ts} | 14 ++-- .../frontend/src/parts/transforms/module.ts | 23 +++++ .../{blackboard => transforms}/routing.module.ts | 7 +- .../parts/{images => transforms}/service.module.ts | 7 +- .../{images => transforms}/services/api.service.ts | 30 ++----- 12 files changed, 207 insertions(+), 52 deletions(-) _Diff for modified files_: diff --git a/src/plugins/webview/frontend/src/app/app.module.ts b/src/plugins/webview/frontend/src/app/app.module.ts index 8b62826..ce5fc6f 100644 --- a/src/plugins/webview/frontend/src/app/app.module.ts +++ b/src/plugins/webview/frontend/src/app/app.module.ts @@ -23,6 +23,7 @@ import { BlackboardModule } from '../parts/blackboard/module'; import { ClipsModule } from '../parts/clips/module'; import { ImageModule } from '../parts/images/module'; import { PluginModule } from '../parts/plugins/module'; +import { TransformsModule } from '../parts/transforms/module'; import { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api'; @@ -44,6 +45,7 @@ import { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api'; ClipsModule, ImageModule, PluginModule, + TransformsModule, // Keep the AppRoutingModule last AppRoutingModule, diff --git a/src/plugins/webview/frontend/src/chrome/nav/template.html b/src/plugins/webview/frontend/src/chrome/nav/template.html index 5a0839a..3debb65 100644 --- a/src/plugins/webview/frontend/src/chrome/nav/template.html +++ b/src/plugins/webview/frontend/src/chrome/nav/template.html @@ -34,6 +34,10 @@ routerLink="images" i18n>Images </ff-nav-item> + <ff-nav-item class="ff-nav-item" + routerLink="transforms" + i18n>Transforms + </ff-nav-item> <mat-divider></mat-divider> - *commit* a5f032bd56792304e5b048ab5279096d65abbdcc - - - - - - - - - - Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> Date: Wed Apr 11 11:09:55 2018 +0200 Subject: webview-frontend: improve clips-executive domain view error reporting .../clips-executive/components/domain.component.ts | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) _Diff for modified files_: diff --git a/src/plugins/webview/frontend/src/parts/clips-executive/components/domain.component.ts b/src/plugins/webview/frontend/src/parts/clips-executive/components/domain.component.ts index 7dcf157..c2567e7 100644 --- a/src/plugins/webview/frontend/src/parts/clips-executive/components/domain.component.ts +++ b/src/plugins/webview/frontend/src/parts/clips-executive/components/domain.component.ts @@ -118,10 +118,12 @@ export class DomainComponent implements OnInit { }, (err) => { this.loading = false; - console.log("Failed to receive domain data"); + this.zero_message_facts = this.zero_message_predicates = this.zero_message_operators = this.zero_message_objects = - "API server unavailable. Robot down?"; + (err.status == 0) + ? "API server unavailable. Robot down?" + : `Failed to retrieve domain info: ${err.error}`; } ); } - *commit* ac6ca63474af331f668f319bedb71af43653b89f - - - - - - - - - - Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> Date: Wed Apr 11 11:10:39 2018 +0200 Subject: webview-frontend: report if no images available .../images/components/overview.component.html | 4 ++-- .../parts/images/components/overview.component.ts | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) _Diff for modified files_: diff --git a/src/plugins/webview/frontend/src/parts/images/components/overview.component.html b/src/plugins/webview/frontend/src/parts/images/components/overview.component.html index c1fd87f..3e2f3fc 100644 --- a/src/plugins/webview/frontend/src/parts/images/components/overview.component.html +++ b/src/plugins/webview/frontend/src/parts/images/components/overview.component.html @@ -26,7 +26,7 @@ <mat-divider></mat-divider> <mat-card-content class="ff-card-content"> - <mat-accordion [multi]="true" *ngIf="images"> + <mat-accordion [multi]="true" *ngIf="images && images.length > 0"> <ng-container *ngFor="let i of images"> <mat-expansion-panel [expanded]="true"> <mat-expansion-panel-header> @@ -58,7 +58,7 @@ </ng-container> </mat-accordion> - <div *ngIf="!images"> + <div *ngIf="!images || images.length == 0"> <ff-list-zero-state [message]="zero_message"></ff-list-zero-state> </div> </mat-card-content> diff --git a/src/plugins/webview/frontend/src/parts/images/components/overview.component.ts b/src/plugins/webview/frontend/src/parts/images/components/overview.component.ts index 1f67245..8b2f789 100644 --- a/src/plugins/webview/frontend/src/parts/images/components/overview.component.ts +++ b/src/plugins/webview/frontend/src/parts/images/components/overview.component.ts @@ -123,6 +123,9 @@ export class ImageOverviewComponent implements OnInit, OnDestroy { this.api_service.list_images().subscribe( (images) => { this.images = images; + if (this.images.length == 0) { + this.zero_message = 'No images available'; + } this.loading = false; }, (err) => { - *commit* e2fe7bf33977374ff59ded69cbe81a5b335224b9 - - - - - - - - - - Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> Date: Wed Apr 11 15:01:19 2018 +0200 Subject: webview: blackboard REST API can now provide dot graph src/plugins/webview/blackboard-rest-api/api.yaml | 39 +++++++ .../blackboard-rest-api/blackboard-rest-api.cpp | 119 ++++++++++++++++++++ .../blackboard-rest-api/blackboard-rest-api.h | 5 + .../model/BlackboardGraph.cpp} | 26 ++-- .../model/BlackboardGraph.h} | 18 ++-- 5 files changed, 185 insertions(+), 22 deletions(-) _Diff for modified files_: diff --git a/src/plugins/webview/blackboard-rest-api/api.yaml b/src/plugins/webview/blackboard-rest-api/api.yaml index e94cbc6..4f7c5bd 100644 --- a/src/plugins/webview/blackboard-rest-api/api.yaml +++ b/src/plugins/webview/blackboard-rest-api/api.yaml @@ -120,6 +120,31 @@ paths: '400': description: bad input parameter + /blackboard/graph: + get: + tags: + - public + summary: Get blackboard graph + operationId: get_graph + description: | + Get a blackboard graph. + parameters: + - name: pretty + in: query + description: Request pretty printed reply. + allowEmptyValue: true + schema: + type: boolean + responses: + '200': + description: get graph + content: + application/json: + schema: + $ref: '#/components/schemas/BlackboardGraph' + '503': + description: failure to retrieve graph + components: schemas: InterfaceInfo: @@ -218,3 +243,17 @@ components: timestamp: type: string format: date-time + + BlackboardGraph: + type: object + required: + - kind + - apiVersion + - dotgraph + properties: + kind: + type: string + apiVersion: + type: string + dotgraph: + type: string diff --git a/src/plugins/webview/blackboard-rest-api/blackboard-rest-api.cpp b/src/plugins/webview/blackboard-rest-api/blackboard-rest-api.cpp index 1f08fe9..3694bc0 100644 --- a/src/plugins/webview/blackboard-rest-api/blackboard-rest-api.cpp +++ b/src/plugins/webview/blackboard-rest-api/blackboard-rest-api.cpp @@ -30,6 +30,8 @@ #include <rapidjson/document.h> +#include <set> + using namespace fawkes; /** @class BlackboardRestApi "skiller-rest-api.h" @@ -61,6 +63,9 @@ BlackboardRestApi::init() rest_api_->add_handler<::InterfaceInfo> (WebRequest::METHOD_GET, "/interfaces/{type}/{id+}", std::bind(&BlackboardRestApi::cb_get_interface_info, this, std::placeholders::_1)); + rest_api_->add_handler<BlackboardGraph> + (WebRequest::METHOD_GET, "/graph", + std::bind(&BlackboardRestApi::cb_get_graph, this)); webview_rest_api_manager->register_api(rest_api_); } @@ -321,3 +326,117 @@ BlackboardRestApi::cb_get_interface_data(WebviewRestParams& params) e.what_no_backtrace()); } } + + +std::string +BlackboardRestApi::generate_graph(std::string for_owner) +{ + InterfaceInfoList *iil = blackboard->list_all(); + iil->sort(); + + std::stringstream mstream; + mstream << "digraph bbmap {" << std::endl + << " graph [fontsize=12,rankdir=LR];" << std::endl; + + std::set<std::string> owners; + + InterfaceInfoList::iterator ii; + for (ii = iil->begin(); ii != iil->end(); ++ii) { + const std::list<std::string> readers = ii->readers(); + + if (for_owner == "" || + ii->writer() == for_owner || + std::find_if(readers.begin(), readers.end(), + [&for_owner](const std::string &o)->bool { return for_owner == o; }) + != readers.end()) + { + if (ii->has_writer()) { + const std::string writer = ii->writer(); + if (! writer.empty()) owners.insert(writer); + } + std::list<std::string>::const_iterator r; + for (r = readers.begin(); r != readers.end(); ++r) { + owners.insert(*r); + } + } + } + + mstream << " node [fontsize=12 shape=box width=4 margin=0.05];" << std::endl + << " { rank=same; " << std::endl; + std::set<std::string>::iterator i; + for (ii = iil->begin(); ii != iil->end(); ++ii) { + const std::list<std::string> readers = ii->readers(); + if (for_owner == "" || + ii->writer() == for_owner || + std::find_if(readers.begin(), readers.end(), + [&for_owner](const std::string &o)->bool { return for_owner == o; }) + != readers.end()) + { + mstream << " \"" << ii->type() << "::" << ii->id() << "\"" + << " [href=\"/blackboard/view/" << ii->type() << "::" << ii->id() << "\""; + + if (! ii->has_writer()) { + mstream << " color=red"; + } else if (ii->writer().empty()) { + mstream << " color=purple"; + } + mstream << "];" << std::endl; + } + } + mstream << " }" << std::endl; + + mstream << " node [fontsize=12 shape=octagon width=3];" << std::endl; + for (i = owners.begin(); i != owners.end(); ++i) { + mstream << " \"" << *i << "\"" + << " [href=\"/blackboard/graph/" << *i << "\"];" + << std::endl; + } + + for (ii = iil->begin(); ii != iil->end(); ++ii) { + const std::list<std::string> readers = ii->readers(); + if (for_owner == "" || + ii->writer() == for_owner || + std::find_if(readers.begin(), readers.end(), + [&for_owner](const std::string &o)->bool { return for_owner == o; }) + != readers.end()) + { + std::list<std::string> quoted_readers; + std::for_each(readers.begin(), readers.end(), + ["ed_readers](const std::string &r) { + quoted_readers.push_back(std::string("\"")+r+"\""); + }); + std::string quoted_readers_s = str_join(quoted_readers, ' '); + mstream << " \"" << ii->type() << "::" << ii->id() << "\" -> { " + << quoted_readers_s << " } [style=dashed arrowhead=dot arrowsize=0.5 dir=both];" << std::endl; + + if (ii->has_writer()) { + mstream << " \"" << (ii->writer().empty() ? "???" : ii->writer()) << "\" -> \"" + << ii->type() << "::" << ii->id() << "\"" + << (ii->writer().empty() ? " [color=purple]" : " [color=\"#008800\"]") + << ";" << std::endl; + } + } + } + + delete iil; + + mstream << "}"; + return mstream.str(); +} + + +BlackboardGraph +BlackboardRestApi::cb_get_graph() +{ + try { + BlackboardGraph graph; + graph.set_kind("TransformsGraph"); + graph.set_apiVersion(BlackboardGraph::api_version()); + graph.set_dotgraph(generate_graph()); + return graph; + } catch (Exception &e) { + throw WebviewRestException(WebReply::HTTP_INTERNAL_SERVER_ERROR, + "Failed to retrieve blackboard graph: %s", + e.what_no_backtrace()); + } +} diff --git a/src/plugins/webview/blackboard-rest-api/blackboard-rest-api.h b/src/plugins/webview/blackboard-rest-api/blackboard-rest-api.h index 432510a..fb67ff9 100644 --- a/src/plugins/webview/blackboard-rest-api/blackboard-rest-api.h +++ b/src/plugins/webview/blackboard-rest-api/blackboard-rest-api.h @@ -32,6 +32,7 @@ #include "model/InterfaceInfo.h" #include "model/InterfaceData.h" +#include "model/BlackboardGraph.h" #include <map> #include <string> @@ -61,6 +62,8 @@ class BlackboardRestApi InterfaceData cb_get_interface_data(fawkes::WebviewRestParams& params); + BlackboardGraph cb_get_graph(); + std::vector<std::shared_ptr<InterfaceFieldType>> gen_fields(fawkes::InterfaceFieldIterator begin, fawkes::InterfaceFieldIterator end); @@ -68,6 +71,8 @@ class BlackboardRestApi InterfaceInfo gen_interface_info(const fawkes::InterfaceInfo &ii); InterfaceData gen_interface_data(fawkes::Interface *iface, bool pretty); + std::string generate_graph(std::string for_owner = ""); + private: fawkes::WebviewRestApi *rest_api_; - *commit* 71c107744fb385997c7f4cc4276663743e272c54 - - - - - - - - - - Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> Date: Wed Apr 11 15:02:16 2018 +0200 Subject: webview-frontend: add blackboard graph .../blackboard/components/overview.component.html | 35 +++++++++++++++- .../blackboard/components/overview.component.scss | 20 +++++++++ .../blackboard/components/overview.component.ts | 43 ++++++++++++++++++++ .../{InterfaceData.ts => BlackboardGraph.ts} | 15 ++----- .../src/parts/blackboard/services/api.service.ts | 15 +++++++ 5 files changed, 116 insertions(+), 12 deletions(-) _Diff for modified files_: diff --git a/src/plugins/webview/frontend/src/parts/blackboard/components/overview.component.html b/src/plugins/webview/frontend/src/parts/blackboard/components/overview.component.html index 98d2f3e..4bcf2ed 100644 --- a/src/plugins/webview/frontend/src/parts/blackboard/components/overview.component.html +++ b/src/plugins/webview/frontend/src/parts/blackboard/components/overview.component.html @@ -2,13 +2,19 @@ Copyright 2018 Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> License: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) --> -<div fxLayout="row" class="ff-vfill-content"> +<div fxLayout="row" class="ff-vfill"> <mat-card class="ff-content-card" fxFlex="25%"> <mat-card-title> <div fxLayout="row"> <div>Blackboard</div> <div class="ff-right"> <button mat-icon-button + [disabled]="!interfaces" + class="ff-card-title-button" + (click)="toggle_graph()"> + <mat-icon>device_hub</mat-icon> + </button> + <button mat-icon-button class="ff-card-title-button" [disabled]="auto_refresh_subscription != null || loading" (click)="refresh()"> @@ -52,7 +58,7 @@ </mat-card-content> </mat-card> - <div fxFlex="75%"> + <div fxFlex="75%" *ngIf="dotgraph == null"> <div fxLayout="row wrap"> <mat-card class="interface-card" fxFlex="32" *ngFor="let i of selected_interfaces"> <mat-card-title> @@ -143,4 +149,29 @@ </mat-card> </div> </div> + + <mat-card fxFlex="75%" *ngIf="dotgraph != null" class="ff-content-card"> + <mat-card-title> + <div fxLayout="row"> + <div>Blackboard Graph</div> + <div class="ff-right"> + <button mat-icon-button + class="ff-card-title-button" + (click)="refresh_graph()"> + <mat-icon *ngIf="!dotgraph_loading">refresh</mat-icon> + <mat-spinner *ngIf="dotgraph_loading" [diameter]="20"></mat-spinner> + </button> + </div> + </div> + </mat-card-title> + <mat-divider></mat-divider> + <mat-card-content class="ff-card-content graph-card"> + <div *ngIf="dotgraph != ''" fxLayoutAlign="center" class="card-div"> + <dotgraph [dot]="dotgraph" class="blackboard-graph"></dotgraph> + </div> + <div *ngIf="dotgraph == ''"> + <ff-list-zero-state [message]="dotgraph_zero_message"></ff-list-zero-state> + </div> + </mat-card-content> + </mat-card> </div> diff --git a/src/plugins/webview/frontend/src/parts/blackboard/components/overview.component.scss b/src/plugins/webview/frontend/src/parts/blackboard/components/overview.component.scss index b40de8e..875a130 100644 --- a/src/plugins/webview/frontend/src/parts/blackboard/components/overview.component.scss +++ b/src/plugins/webview/frontend/src/parts/blackboard/components/overview.component.scss @@ -42,3 +42,23 @@ .reader-writer-info { padding-top: 1 * $baseline-grid; } + +.graph-card { + //height: calc(100% - 64px); + margin: 0 -16px 0 -12px; +} + +.mat-card-content { + height: calc(100% - 40px); +} + +.card-div { + max-height: 100%; +} + +.blackboard-graph { + max-height: 100%; + overflow: auto; + width: calc(100% - 8px); + margin: 0 -16px 16px -10px; +} diff --git a/src/plugins/webview/frontend/src/parts/blackboard/components/overview.component.ts b/src/plugins/webview/frontend/src/parts/blackboard/components/overview.component.ts index 0833c51..bee66de 100644 --- a/src/plugins/webview/frontend/src/parts/blackboard/components/overview.component.ts +++ b/src/plugins/webview/frontend/src/parts/blackboard/components/overview.component.ts @@ -25,6 +25,10 @@ export class BlackboardOverviewComponent implements OnInit, OnDestroy { interfaces = null; zero_message = "No graph has been retrieved"; + dotgraph: string = null; + dotgraph_zero_message: string = 'No blackboard graph available'; + dotgraph_loading: boolean = false; + known_types = {}; constructor(private api_service: BlackboardApiService, @@ -77,6 +81,7 @@ export class BlackboardOverviewComponent implements OnInit, OnDestroy { select_interface(hash: string, id: string) { + this.dotgraph = null; let index = this.indexof_selected_interface(hash, id); if (index == -1) { this.selected_interfaces.push([hash, id]) @@ -178,6 +183,44 @@ export class BlackboardOverviewComponent implements OnInit, OnDestroy { ); } + refresh_graph() + { + if (this.dotgraph_loading) return; + + this.dotgraph_loading = true; + this.dotgraph_zero_message='Retrieving graph'; + + this.api_service.get_graph().subscribe( + (graphmsg) => { + if (graphmsg.dotgraph != "") { + this.dotgraph = graphmsg.dotgraph; + } else { + this.dotgraph = null; + this.dotgraph_zero_message = "Received empty blackboard graph"; + } + this.dotgraph_loading = false; + }, + (err) => { + this.dotgraph = null; + if (err.status == 0) { + this.dotgraph_zero_message="API server unavailable. Robot down?"; + } else { + this.dotgraph_zero_message=`Failed to retrieve graph: ${err.error}`; + } + this.dotgraph_loading = false; + }); + } + + toggle_graph() + { + if (this.dotgraph) { + this.dotgraph = null; + } else { + this.dotgraph = ''; + this.refresh_graph(); + } + } + private enable_autorefresh() { if (this.auto_refresh_subscription) return; diff --git a/src/plugins/webview/frontend/src/parts/blackboard/services/api.service.ts b/src/plugins/webview/frontend/src/parts/blackboard/services/api.service.ts index ad71026..21e4073 100644 --- a/src/plugins/webview/frontend/src/parts/blackboard/services/api.service.ts +++ b/src/plugins/webview/frontend/src/parts/blackboard/services/api.service.ts @@ -17,6 +17,7 @@ import { Observable } from 'rxjs/Observable'; import { BackendConfigurationService } from '../../../services/backend-config/backend-config.service'; +import { BlackboardGraph } from '../models/BlackboardGraph'; import { InterfaceData } from '../models/InterfaceData'; import { InterfaceInfo } from '../models/InterfaceInfo'; @@ -81,4 +82,18 @@ export class BlackboardApiService observe: 'body', responseType: 'json' }) ; } + public get_graph(pretty?: boolean): Observable<BlackboardGraph> + { + let params = new HttpParams(); + if (pretty) { + params = params.set("pretty", pretty.toString()); + } + let headers = new HttpHeaders(); + + headers = headers.set('Accept', 'application/json'); + return this.http.get<BlackboardGraph>(`${this.backend.url_for('api')}/blackboard/graph`, + { headers: headers, params: params, + observe: 'body', responseType: 'json' }) ; + } + } \ No newline at end of file - *commit* cd2ade005a1a9d002c15a9a7e59157b19de3524e - - - - - - - - - - Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> Date: Wed Apr 11 15:04:33 2018 +0200 Subject: webview-frontend: improve scrolling behavior .../clips/components/clips-env.component.html | 2 +- .../clips/components/clips-env.component.scss | 10 ++++++++++ .../plugins/components/overview.component.html | 2 +- .../plugins/components/overview.component.scss | 10 ++++++++++ .../transforms/components/overview.component.scss | 4 ---- 5 files changed, 22 insertions(+), 6 deletions(-) _Diff for modified files_: diff --git a/src/plugins/webview/frontend/src/parts/clips/components/clips-env.component.html b/src/plugins/webview/frontend/src/parts/clips/components/clips-env.component.html index b7f50ff..f711bf5 100644 --- a/src/plugins/webview/frontend/src/parts/clips/components/clips-env.component.html +++ b/src/plugins/webview/frontend/src/parts/clips/components/clips-env.component.html @@ -2,7 +2,7 @@ Copyright 2018 Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> License: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) --> -<mat-card class="ff-content-card"> +<mat-card class="ff-content-card ff-vfill"> <mat-card-title> <div fxLayout="row"> <div> diff --git a/src/plugins/webview/frontend/src/parts/clips/components/clips-env.component.scss b/src/plugins/webview/frontend/src/parts/clips/components/clips-env.component.scss index 104d2c4..74bd355 100644 --- a/src/plugins/webview/frontend/src/parts/clips/components/clips-env.component.scss +++ b/src/plugins/webview/frontend/src/parts/clips/components/clips-env.component.scss @@ -4,6 +4,16 @@ @import '../../../_variables'; +.mat-card-content { + height: calc(100% - 56px); + overflow: auto; + margin: 0 -16px 0 -12px; +} + +.mat-table { + margin: 0 4px 16px 4px; +} + .mat-column-index { flex: 0 0 50px; text-align: center; diff --git a/src/plugins/webview/frontend/src/parts/plugins/components/overview.component.html b/src/plugins/webview/frontend/src/parts/plugins/components/overview.component.html index 454d629..1d597c2 100644 --- a/src/plugins/webview/frontend/src/parts/plugins/components/overview.component.html +++ b/src/plugins/webview/frontend/src/parts/plugins/components/overview.component.html @@ -2,7 +2,7 @@ Copyright 2018 Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> License: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) --> -<mat-card class="ff-content-card"> +<mat-card class="ff-content-card ff-vfill"> <mat-card-title> <div fxLayout="row"> <div> diff --git a/src/plugins/webview/frontend/src/parts/plugins/components/overview.component.scss b/src/plugins/webview/frontend/src/parts/plugins/components/overview.component.scss index 4e64ca1..33821ec 100644 --- a/src/plugins/webview/frontend/src/parts/plugins/components/overview.component.scss +++ b/src/plugins/webview/frontend/src/parts/plugins/components/overview.component.scss @@ -4,6 +4,16 @@ @import '../../../_variables'; +.mat-card-content { + height: calc(100% - 40px); + overflow: auto; + margin: 0 -16px 0 -12px; +} + +.mat-table { + margin: 0 4px 16px 4px; +} + .mat-row { line-height: 1.6 * $caption-font-size-base !important; min-height: 1.6 * $caption-font-size-base !important; diff --git a/src/plugins/webview/frontend/src/parts/transforms/components/overview.component.scss b/src/plugins/webview/frontend/src/parts/transforms/components/overview.component.scss index fa32807..8267b61 100644 --- a/src/plugins/webview/frontend/src/parts/transforms/components/overview.component.scss +++ b/src/plugins/webview/frontend/src/parts/transforms/components/overview.component.scss @@ -18,7 +18,3 @@ width: calc(100% + 30px); margin: 0 -15px 16px -10px; } - -.exec-button { - margin-left: $baseline-grid; -} - *commit* 11d832bebeb928867681aec8fe5f72e80f39d977 - - - - - - - - - - Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> Date: Wed Apr 11 16:06:00 2018 +0200 Subject: webview: remove old web interface code src/plugins/webview/Makefile | 124 ++++----- src/plugins/webview/blackboard_processor.cpp | 398 -------------------------- src/plugins/webview/blackboard_processor.h | 62 ---- src/plugins/webview/footer_generator.cpp | 77 ----- src/plugins/webview/footer_generator.h | 41 --- src/plugins/webview/header_generator.cpp | 91 ------ src/plugins/webview/header_generator.h | 50 ---- src/plugins/webview/plugins_processor.cpp | 149 ---------- src/plugins/webview/plugins_processor.h | 49 ---- src/plugins/webview/startpage_processor.cpp | 88 ------ src/plugins/webview/startpage_processor.h | 47 --- src/plugins/webview/tf_processor.cpp | 106 ------- src/plugins/webview/tf_processor.h | 56 ---- src/plugins/webview/webview_thread.cpp | 69 +---- src/plugins/webview/webview_thread.h | 33 +-- 15 files changed, 60 insertions(+), 1380 deletions(-) _Diff for modified files_: diff --git a/src/plugins/webview/Makefile b/src/plugins/webview/Makefile index 96758bc..3d0d25c 100644 --- a/src/plugins/webview/Makefile +++ b/src/plugins/webview/Makefile @@ -23,26 +23,6 @@ include $(BUILDSYSDIR)/fvconf.mk include $(BUILDSYSDIR)/boost.mk ifneq ($(PKGCONFIG),) - HAVE_GRAPHVIZ = $(if $(shell $(PKGCONFIG) --exists 'libgvc'; echo $${?/1/}),1,0) - ifeq ($(HAVE_GRAPHVIZ),1) - GRAPHVIZ_HAVE_GRAPH = $(if $(shell $(PKGCONFIG) --exists 'libgraph'; echo $${?/1/}),1,0) - - CFLAGS_GRAPHVIZ = -DHAVE_GRAPHVIZ $(shell $(PKGCONFIG) --cflags 'libgvc') -DWITH_CODEGENS - ifeq ($(GRAPHVIZ_HAVE_GRAPH),1) - LDFLAGS_GRAPHVIZ = $(shell $(PKGCONFIG) --libs 'libgvc') - else - # "--libs 'libgvc'" requires -lgraph, even if only cgraph is installed. - # Not fixed in stable releases yet - LDFLAGS_GRAPHVIZ = $(shell $(PKGCONFIG) --libs 'libcgraph') -lgvc - # add WITH_CGRAPH, in case something is wrong with libgvc. - # Should be provided by "/usr/include/graphviz/types.h" - CFLAGS_GRAPHVIZ += -DWITH_CGRAPH - endif - - VERSION_GRAPHVIZ = $(shell $(PKGCONFIG) --modversion 'libgvc') - CFLAGS_GRAPHVIZ += -DGRAPHVIZ_VERSION=$(call version_number,$(VERSION_GRAPHVIZ)) - endif - HAVE_APR_UTIL = $(if $(shell $(PKGCONFIG) --exists 'apr-util-1'; echo $${?/1/}),1,0) ifeq ($(HAVE_APR_UTIL),1) CFLAGS_APR_UTIL = -DHAVE_APR_UTIL $(shell $(PKGCONFIG) --cflags 'apr-util-1') @@ -56,31 +36,16 @@ HAVE_BOOST_LIBS = $(call boost-have-libs,$(REQ_BOOST_LIBS)) ifeq ($(HAVE_BOOST_LIBS)$(HAVE_LIBMICROHTTPD),11) LIBS_webview = m fawkescore fawkesutils fawkesaspects fawkesblackboard \ - fawkesinterface fawkeswebview fawkesplugin fawkesnetcomm \ - fawkeslogging - OBJS_webview = blackboard_processor.o footer_generator.o header_generator.o \ - service_browse_handler.o startpage_processor.o static_processor.o \ - plugins_processor.o user_verifier.o webview_thread.o webview_plugin.o \ - rest_processor.o + fawkesinterface fawkeswebview fawkesplugin fawkesnetcomm \ + fawkeslogging + OBJS_webview = webview_plugin.o webview_thread.o \ + service_browse_handler.o user_verifier.o \ + static_processor.o rest_processor.o PLUGINS_all = $(PLUGINDIR)/webview.so INST_RESDIRS = webview - CFLAGS += $(call boost-libs-cflags,$(REQ_BOOST_LIBS)) - LDFLAGS += $(call boost-libs-ldflags,$(REQ_BOOST_LIBS)) - - ifeq ($(HAVE_TF)$(HAVE_GRAPHVIZ),11) - OBJS_webview += tf_processor.o - LIBS_webview += fawkestf - CFLAGS += $(CFLAGS_TF) $(CFLAGS_GRAPHVIZ) - LDFLAGS += $(LDFLAGS_TF) $(LDFLAGS_GRAPHVIZ) - else - ifneq ($(HAVE_TF),1) - WARN_TARGETS += warning_tf - endif - ifneq ($(HAVE_GRAPHVIZ),1) - WARN_TARGETS += warning_graphviz - endif - endif + CFLAGS += $(call boost-libs-cflags,$(REQ_BOOST_LIBS)) + LDFLAGS += $(call boost-libs-ldflags,$(REQ_BOOST_LIBS)) ifeq ($(HAVE_APR_UTIL),1) CFLAGS += $(CFLAGS_APR_UTIL) @@ -91,46 +56,57 @@ ifeq ($(HAVE_BOOST_LIBS)$(HAVE_LIBMICROHTTPD),11) WARN_TARGETS += warning_apr_util endif - ifeq ($(HAVE_CPP17)$(HAVE_RAPIDJSON),11) - CFLAGS += -DHAVE_REST_APIS $(CFLAGS_CPP17) $(CFLAGS_RAPIDJSON) - LDFLAGS += $(LDFLAGS_CPP17) $(LDFLAGS_RAPIDJSON) - - OBJS_webview += blackboard-rest-api/blackboard-rest-api.o \ - backendinfo-rest-api/backendinfo-rest-api.o \ - plugin-rest-api/plugin-rest-api.o \ - tf-rest-api/tf-rest-api.o \ - $(patsubst %.cpp,%.o,$(subst $(SRCDIR)/,,$(realpath $(wildcard $(SRCDIR)/*-rest-api/model/*.cpp)))) - - ifeq ($(HAVE_JPEG),1) - CFLAGS += -DHAVE_JPEG - LIBS_webview += m fvutils fvcams - OBJS_webview += image-rest-api/image-rest-api.o \ - image-rest-api/mjpeg_reply.o \ - image-rest-api/jpeg_stream_producer.o \ - $(patsubst %.cpp,%.o,$(subst $(SRCDIR)/,,$(wildcard $(SRCDIR)/image-rest-api/model/*.cpp))) - else - WARN_TARGETS = warning_jpeg - endif + CFLAGS += -DHAVE_REST_APIS $(CFLAGS_CPP17) $(CFLAGS_RAPIDJSON) + LDFLAGS += $(LDFLAGS_CPP17) $(LDFLAGS_RAPIDJSON) + + OBJS_webview += blackboard-rest-api/blackboard-rest-api.o \ + backendinfo-rest-api/backendinfo-rest-api.o \ + plugin-rest-api/plugin-rest-api.o \ + tf-rest-api/tf-rest-api.o \ + $(patsubst %.cpp,%.o,$(subst $(SRCDIR)/,,$(realpath $(wildcard $(SRCDIR)/*-rest-api/model/*.cpp)))) + + ifeq ($(HAVE_TF),1) + OBJS_webview += tf-rest-api/tf-rest-api.o + LIBS_webview += fawkestf + CFLAGS += $(CFLAGS_TF) + LDFLAGS += $(LDFLAGS_TF) + else + WARN_TARGETS += warning_tf + endif + ifeq ($(HAVE_JPEG),1) + CFLAGS += -DHAVE_JPEG + LIBS_webview += m fvutils fvcams + OBJS_webview += image-rest-api/image-rest-api.o \ + image-rest-api/mjpeg_reply.o \ + image-rest-api/jpeg_stream_producer.o else - ifneq ($(HAVE_CPP17),1) - WARN_TARGETS += warning_cpp17 - endif - ifneq ($(HAVE_RAPIDJSON),1) - WARN_TARGETS += warning_rapidjson - endif + WARN_TARGETS = warning_jpeg endif + + OBJS_all = $(OBJS_webview) + else - WARN_TARGETS += warning_libmicrohttpd + ifneq ($(HAVE_LIBMICROHTTPD),1) + WARN_TARGETS += warning_libmicrohttpd + endif + ifneq ($(HAVE_CPP17),1) + WARN_TARGETS += warning_cpp17 + endif + ifneq ($(HAVE_RAPIDJSON),1) + WARN_TARGETS += warning_rapidjson + endif + ifneq ($(HAVE_BOOST_LIBS),1) + WARN_TARGETS_BOOST = $(foreach l,$(REQ_BOOST_LIBS),$(if $(call boost-have-lib,$l),, warning_boost_$l)) + endif endif -OBJS_all = $(OBJS_webview) - ifeq ($(OBJSSUBMAKE),1) ifneq ($(WARN_TARGETS),) all: $(WARN_TARGETS) endif -.PHONY: warning_libmicrohttpd warning_tf warning_graphviz warning_jpeg warning_apr_util warning_cpp11 warning_cpp17 warning_rapidjson +.PHONY: warning_libmicrohttpd warning_tf warning_jpeg warning_apr_util warning_cpp11 warning_cpp17 warning_rapidjson $(WARN_TARGETS_BOOST) + warning_libmicrohttpd: $(SILENT)echo -e "$(INDENT_PRINT)--> $(TRED)Omitting webview plugin$(TNORMAL) (libmicrohttpd not installed)" warning_tf: @@ -147,6 +123,10 @@ warning_cpp17: $(SILENT)echo -e "$(INDENT_PRINT)--> $(TRED)Omitting REST APIs$(TNORMAL) (C++17 not supported)" warning_rapidjson: $(SILENT)echo -e "$(INDENT_PRINT)--> $(TRED)Omitting REST APIs$(TNORMAL) (RapidJSON not available)" + +$(WARN_TARGETS_BOOST): warning_boost_%: + $(SILENT)echo -e "$(INDENT_PRINT)--> $(TRED)Cannot build webview plugin$(TNORMAL) (Boost library $* not found)" + endif include $(BUILDSYSDIR)/base.mk diff --git a/src/plugins/webview/webview_thread.cpp b/src/plugins/webview/webview_thread.cpp index c539c8e..877162a 100644 --- a/src/plugins/webview/webview_thread.cpp +++ b/src/plugins/webview/webview_thread.cpp @@ -3,7 +3,7 @@ * webview_thread.cpp - Thread that handles web interface requests * * Created: Mon Oct 13 17:51:31 2008 (I5 Developer's Day) - * Copyright 2006-2014 Tim Niemueller [www.niemueller.de] + * Copyright 2006-2018 Tim Niemueller [www.niemueller.de] ****************************************************************************/ /* This program is free software; you can redistribute it and/or modify @@ -21,16 +21,8 @@ #include "webview_thread.h" #include "static_processor.h" -#include "blackboard_processor.h" -#include "startpage_processor.h" -#include "plugins_processor.h" #include "rest_processor.h" -#ifdef HAVE_TF -# include "tf_processor.h" -#endif #include "service_browse_handler.h" -#include "header_generator.h" -#include "footer_generator.h" #include "user_verifier.h" #include <core/version.h> @@ -41,7 +33,6 @@ #include <webview/page_reply.h> #include <webview/server.h> #include <webview/url_manager.h> -#include <webview/nav_manager.h> #include <utils/misc/string_conversions.h> #include <sys/wait.h> @@ -63,8 +54,7 @@ using namespace fawkes; * thread. */ WebviewThread::WebviewThread(bool enable_tp) - : Thread("WebviewThread", enable_tp ? Thread::OPMODE_WAITFORWAKEUP : Thread::OPMODE_CONTINUOUS), - LoggerAspect(&cache_logger_) + : Thread("WebviewThread", enable_tp ? Thread::OPMODE_WAITFORWAKEUP : Thread::OPMODE_CONTINUOUS) { cfg_use_thread_pool_ = enable_tp; @@ -85,8 +75,6 @@ WebviewThread::init() webview_service_ = NULL; service_browse_handler_ = NULL; - header_gen_ = NULL; - footer_gen_ = NULL; dispatcher_ = NULL; cfg_use_tls_ = false; @@ -166,21 +154,14 @@ WebviewThread::init() cfg_cors_max_age = config->get_uint("/webview/cors/max-age"); } catch (Exception &e) {} - cache_logger_.clear(); - webview_service_ = new NetworkService(nnresolver, "Fawkes Webview on %h", - "_http._tcp", cfg_port_); + "_http._tcp", cfg_port_); webview_service_->add_txt("fawkesver=%u.%u.%u", - FAWKES_VERSION_MAJOR, FAWKES_VERSION_MINOR, - FAWKES_VERSION_MICRO); + FAWKES_VERSION_MAJOR, FAWKES_VERSION_MINOR, + FAWKES_VERSION_MICRO); service_browse_handler_ = new WebviewServiceBrowseHandler(logger, webview_service_); - header_gen_ = new WebviewHeaderGenerator(webview_nav_manager); - footer_gen_ = new WebviewFooterGenerator(service_browse_handler_); - - dispatcher_ = new WebRequestDispatcher(webview_url_manager, - header_gen_, footer_gen_); - + dispatcher_ = new WebRequestDispatcher(webview_url_manager); try { webserver_ = new WebServer(cfg_port_, dispatcher_, logger); @@ -212,8 +193,6 @@ WebviewThread::init() } catch (Exception &e) { delete webview_service_; delete service_browse_handler_; - delete header_gen_; - delete footer_gen_; delete dispatcher_; throw; } @@ -230,28 +209,6 @@ WebviewThread::init() static_dirs, catchall_file, mime_file, logger); rest_processor_ = new WebviewRESTRequestProcessor(webview_url_manager, webview_rest_api_manager, logger); - startpage_processor_ = NULL; - blackboard_processor_ = NULL; - plugins_processor_ = NULL; -#ifdef HAVE_TF - tf_processor_ = NULL; -#endif - - if (catchall_file.empty()) { - blackboard_processor_ = new WebviewBlackBoardRequestProcessor(webview_url_manager, blackboard); - plugins_processor_ = new WebviewPluginsRequestProcessor(webview_url_manager, plugin_manager); -#ifdef HAVE_TF - tf_processor_ = new WebviewTfRequestProcessor(webview_url_manager, tf_listener); -#endif - startpage_processor_ = new WebviewStartPageRequestProcessor(webview_url_manager, &cache_logger_); - - webview_nav_manager->add_nav_entry("/blackboard/", "BlackBoard"); -#ifdef HAVE_TF - webview_nav_manager->add_nav_entry("/tf/", "TF"); -#endif - webview_nav_manager->add_nav_entry("/plugins/", "Plugins"); - } - try { cfg_explicit_404_ = config->get_strings("/webview/explicit-404"); for (const auto &u : cfg_explicit_404_) { @@ -289,12 +246,6 @@ WebviewThread::finalize() service_browser->unwatch_service("_http._tcp", service_browse_handler_); } catch (Exception &e) {} // ignored, can happen if avahi-daemon not running - webview_nav_manager->remove_nav_entry("/blackboard/"); - webview_nav_manager->remove_nav_entry("/plugins/"); -#ifdef HAVE_TF - webview_nav_manager->remove_nav_entry("/tf/"); -#endif - for (const auto &u : cfg_explicit_404_) { webview_url_manager->remove_handler(WebRequest::METHOD_GET, u); } @@ -306,15 +257,7 @@ WebviewThread::finalize() delete dispatcher_; delete static_processor_; - delete blackboard_processor_; - delete startpage_processor_; - delete plugins_processor_; delete rest_processor_; -#ifdef HAVE_TF - delete tf_processor_; -#endif - delete footer_gen_; - delete header_gen_; dispatcher_ = NULL; } diff --git a/src/plugins/webview/webview_thread.h b/src/plugins/webview/webview_thread.h index 80b1a0b..6ae1ca0 100644 --- a/src/plugins/webview/webview_thread.h +++ b/src/plugins/webview/webview_thread.h @@ -3,7 +3,7 @@ * webview_thread.h - Thread that handles web interface requests * * Created: Mon Oct 13 17:49:52 2008 (I5 Developer's Day) - * Copyright 2006-2014 Tim Niemueller [www.niemueller.de] + * Copyright 2006-2018 Tim Niemueller [www.niemueller.de] ****************************************************************************/ /* This program is free software; you can redistribute it and/or modify @@ -25,14 +25,8 @@ #include <core/threading/thread.h> #include <aspect/logging.h> #include <aspect/configurable.h> -#include <aspect/blackboard.h> #include <aspect/network.h> -#include <aspect/logger.h> -#include <aspect/plugin_director.h> #include <aspect/webview.h> -#ifdef HAVE_TF -# include <aspect/tf.h> -#endif #include <logging/cache.h> @@ -44,29 +38,15 @@ namespace fawkes { } class WebviewStaticRequestProcessor; -class WebviewBlackBoardRequestProcessor; -class WebviewStartPageRequestProcessor; -class WebviewPluginsRequestProcessor; class WebviewRESTRequestProcessor; class WebviewServiceBrowseHandler; -class WebviewFooterGenerator; -class WebviewHeaderGenerator; class WebviewUserVerifier; -#ifdef HAVE_TF -class WebviewTfRequestProcessor; -#endif class WebviewThread : public fawkes::Thread, public fawkes::LoggingAspect, public fawkes::ConfigurableAspect, - public fawkes::BlackBoardAspect, - public fawkes::NetworkAspect, - public fawkes::LoggerAspect, - public fawkes::PluginDirectorAspect, -#ifdef HAVE_TF - public fawkes::TransformAspect, -#endif + public fawkes::NetworkAspect, public fawkes::WebviewAspect { public: @@ -90,16 +70,8 @@ class WebviewThread fawkes::WebRequestDispatcher *dispatcher_; WebviewStaticRequestProcessor *static_processor_; - WebviewStartPageRequestProcessor *startpage_processor_; - WebviewBlackBoardRequestProcessor *blackboard_processor_; - WebviewPluginsRequestProcessor *plugins_processor_; WebviewRESTRequestProcessor *rest_processor_; -#ifdef HAVE_TF - WebviewTfRequestProcessor *tf_processor_; -#endif WebviewServiceBrowseHandler *service_browse_handler_; - WebviewHeaderGenerator *header_gen_; - WebviewFooterGenerator *footer_gen_; WebviewUserVerifier *user_verifier_; unsigned int cfg_port_; @@ -117,7 +89,6 @@ class WebviewThread unsigned int cfg_num_threads_; std::vector<std::string> cfg_explicit_404_; - fawkes::CacheLogger cache_logger_; fawkes::NetworkService *webview_service_; }; - *commit* aee8c0a7b3c3c4eb3c1318866320554961e8b46d - - - - - - - - - - Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> Date: Wed Apr 11 16:17:40 2018 +0200 Subject: libwebview: remove old Trac wiki style formatter src/libs/webview/formatters/tracwiki.cpp | 120 ------------------------------ src/libs/webview/formatters/tracwiki.h | 48 ------------ 2 files changed, 0 insertions(+), 168 deletions(-) - *commit* 49a6aefec5fc0fdf47c0a4ce4474e4834c61d797 - - - - - - - - - - Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> Date: Wed Apr 11 16:18:30 2018 +0200 Subject: clips-webview: delete no longer used plugin src/plugins/Makefile | 3 +- src/plugins/clips-webview/Makefile | 57 ---- src/plugins/clips-webview/clips-webview-plugin.cpp | 45 --- .../clips-webview/clips-webview-processor.cpp | 315 -------------------- .../clips-webview/clips-webview-processor.h | 68 ----- src/plugins/clips-webview/clips-webview-thread.cpp | 83 ----- src/plugins/clips-webview/clips-webview-thread.h | 61 ---- 7 files changed, 1 insertions(+), 631 deletions(-) _Diff for modified files_: diff --git a/src/plugins/Makefile b/src/plugins/Makefile index ec3b722..b3a45f7 100644 --- a/src/plugins/Makefile +++ b/src/plugins/Makefile @@ -24,7 +24,7 @@ SUBDIRS = bbsync bblogger webview ttmainloop rrd rrdweb \ skiller luaagent \ laser-filter laser-lines laser-cluster laser-pointclouds \ static_transforms navgraph navgraph-clusters navgraph-generator colli \ - clips clips-agent clips-protobuf clips-webview clips-navgraph \ + clips clips-agent clips-protobuf clips-navgraph \ clips-pddl-parser clips-ros clips-tf \ openprs openprs-agent eclipse-clp \ mongodb mongodb_log robot-memory clips-robot-memory pddl-robot-memory \ @@ -42,7 +42,6 @@ mongodb_log: mongodb mongodb: rrd clips-navgraph clips-agent clips-pddl-parser clips-protobuf clips-tf clips-robot-memory: clips clips-navgraph navgraph-clusters: navgraph -clips-webview: clips webview clips-ros: clips ros robot-memory: mongodb clips-robot-memory: robot-memory - *commit* 23ad5a216063f6d39a2525176998c30fcbd0fb43 - - - - - - - - - - Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> Date: Wed Apr 11 16:19:54 2018 +0200 Subject: rrdweb: move to attic src/plugins/Makefile | 2 +- src/plugins/{ => attic}/rrdweb/Makefile | 0 src/plugins/{ => attic}/rrdweb/rrdweb_plugin.cpp | 0 src/plugins/{ => attic}/rrdweb/rrdweb_plugin.h | 0 .../{ => attic}/rrdweb/rrdweb_processor.cpp | 0 src/plugins/{ => attic}/rrdweb/rrdweb_processor.h | 0 src/plugins/{ => attic}/rrdweb/rrdweb_thread.cpp | 0 src/plugins/{ => attic}/rrdweb/rrdweb_thread.h | 0 8 files changed, 1 insertions(+), 1 deletions(-) _Diff for modified files_: diff --git a/src/plugins/Makefile b/src/plugins/Makefile index b3a45f7..dcd7dc2 100644 --- a/src/plugins/Makefile +++ b/src/plugins/Makefile @@ -17,7 +17,7 @@ BASEDIR = ../.. include $(BASEDIR)/etc/buildsys/config.mk # base + hardware drivers + perception + functional + integration -SUBDIRS = bbsync bblogger webview ttmainloop rrd rrdweb \ +SUBDIRS = bbsync bblogger webview ttmainloop rrd \ laser imu flite festival joystick openrave \ katana jaco pantilt roomba nao robotino \ bumblebee2 realsense perception amcl \ - *commit* 56c48b8a866fd899a3d23db9cd4f82ad556070f9 - - - - - - - - - - Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> Date: Wed Apr 11 16:23:01 2018 +0200 Subject: webview-ptzcam: move to attic src/plugins/{ => attic}/webview-ptzcam/Makefile | 0 .../webview-ptzcam/webview-ptzcam-plugin.cpp | 0 .../webview-ptzcam/webview-ptzcam-processor.cpp | 0 .../webview-ptzcam/webview-ptzcam-processor.h | 0 .../webview-ptzcam/webview-ptzcam-thread.cpp | 0 .../webview-ptzcam/webview-ptzcam-thread.h | 0 6 files changed, 0 insertions(+), 0 deletions(-) - *commit* 0ecbf7c5f20fc6a3be74f51fb2eb0e12f485be00 - - - - - - - - - - Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> Date: Wed Apr 11 16:26:25 2018 +0200 Subject: webview: remove old assets, scripts, css res/webview/chrome/dots.gif | Bin 50 -> 0 bytes res/webview/chrome/navlogo.png | Bin 1555 -> 0 bytes res/webview/chrome/navlogo.xcf | Bin 3415 -> 0 bytes res/webview/chrome/topbar_gradient.png | Bin 350 -> 0 bytes res/webview/chrome/topbar_gradient2.png | Bin 309 -> 0 bytes res/webview/css/blackboard.css | 8 - .../css/jqtheme/images/animated-overlay.gif | Bin 1738 -> 0 bytes .../jqtheme/images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 212 -> 0 bytes .../jqtheme/images/ui-bg_flat_75_ffffff_40x100.png | Bin 208 -> 0 bytes .../jqtheme/images/ui-bg_glass_55_fbf9ee_1x400.png | Bin 335 -> 0 bytes .../ui-bg_highlight-soft_50_880000_1x100.png | Bin 358 -> 0 bytes .../ui-bg_highlight-soft_50_e6e6e6_1x100.png | Bin 278 -> 0 bytes .../ui-bg_highlight-soft_75_cccccc_1x100.png | Bin 280 -> 0 bytes .../images/ui-bg_inset-soft_95_fef1ec_1x100.png | Bin 370 -> 0 bytes .../css/jqtheme/images/ui-icons_222222_256x240.png | Bin 6922 -> 0 bytes .../css/jqtheme/images/ui-icons_880000_256x240.png | Bin 4549 -> 0 bytes .../css/jqtheme/images/ui-icons_888888_256x240.png | Bin 6999 -> 0 bytes .../css/jqtheme/images/ui-icons_cd0a0a_256x240.png | Bin 4549 -> 0 bytes .../css/jqtheme/images/ui-icons_dddddd_256x240.png | Bin 6923 -> 0 bytes res/webview/css/jqtheme/jquery-ui.custom.css | 1162 -------------------- res/webview/css/rrdweb.css | 4 - res/webview/css/webview-ptzcam.css | 13 - res/webview/css/webview.css | 131 --- res/webview/fawkes.png | Bin 2006 -> 0 bytes res/webview/images/favicon.ico | Bin 2966 -> 0 bytes res/webview/images/favicon.png | Bin 280 -> 0 bytes res/webview/images/icon-triangle-e.png | Bin 407 -> 0 bytes res/webview/images/icon-triangle-s.png | Bin 403 -> 0 bytes res/webview/js/jquery-ui.custom.min.js | 7 - res/webview/js/jquery.min.js | 4 - res/webview/webview.png | Bin 4580 -> 0 bytes 31 files changed, 0 insertions(+), 1329 deletions(-) - *commit* e6ca1203e130b0b32f853019b938c4e33c37a826 - - - - - - - - - - Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> Date: Wed Apr 11 16:27:06 2018 +0200 Subject: webview: add .gitkeep dir to webview res dir .../frontend/src/assets => res/webview}/.gitkeep | 0 1 files changed, 0 insertions(+), 0 deletions(-) - *commit* 40912a7b0cb495b178b3755a83b647eb45ac08d6 - - - - - - - - - - Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> Date: Wed Apr 11 20:38:52 2018 +0200 Subject: webview-frontend: smaller style changes src/plugins/webview/frontend/src/_theming.scss | 2 +- .../components/domain.component.html | 2 +- .../clips/components/clips-env.component.html | 2 +- .../plugins/components/overview.component.html | 2 +- .../transforms/components/overview.component.html | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) _Diff for modified files_: diff --git a/src/plugins/webview/frontend/src/_theming.scss b/src/plugins/webview/frontend/src/_theming.scss index 0a90990..774fe00 100644 --- a/src/plugins/webview/frontend/src/_theming.scss +++ b/src/plugins/webview/frontend/src/_theming.scss @@ -217,7 +217,7 @@ .ff-vfill-content { // 7*baseline-grid: height of toolbar - height: calc(100% - #{2 * $baseline-grid}); + height: calc(100% - #{12 * $baseline-grid}); } .ff-vfill { height: 100%; diff --git a/src/plugins/webview/frontend/src/parts/clips-executive/components/domain.component.html b/src/plugins/webview/frontend/src/parts/clips-executive/components/domain.component.html index a7e448c..0c8c739 100644 --- a/src/plugins/webview/frontend/src/parts/clips-executive/components/domain.component.html +++ b/src/plugins/webview/frontend/src/parts/clips-executive/components/domain.component.html @@ -2,7 +2,7 @@ Copyright 2018 Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> License: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) --> -<div fxLayout="row" class="ff-vfill-content"> +<div fxLayout="row" class="ff-vfill"> <div *ngIf="domain_data as domain" class="ff-vfill ff-hfill"> <mat-grid-list cols="2" rowHeight="fit" fxFlex="grow"> <mat-grid-tile> diff --git a/src/plugins/webview/frontend/src/parts/clips/components/clips-env.component.html b/src/plugins/webview/frontend/src/parts/clips/components/clips-env.component.html index f711bf5..2221596 100644 --- a/src/plugins/webview/frontend/src/parts/clips/components/clips-env.component.html +++ b/src/plugins/webview/frontend/src/parts/clips/components/clips-env.component.html @@ -2,7 +2,7 @@ Copyright 2018 Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> License: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) --> -<mat-card class="ff-content-card ff-vfill"> +<mat-card class="ff-vfill-content"> <mat-card-title> <div fxLayout="row"> <div> diff --git a/src/plugins/webview/frontend/src/parts/plugins/components/overview.component.html b/src/plugins/webview/frontend/src/parts/plugins/components/overview.component.html index 1d597c2..f5e7bee 100644 --- a/src/plugins/webview/frontend/src/parts/plugins/components/overview.component.html +++ b/src/plugins/webview/frontend/src/parts/plugins/components/overview.component.html @@ -2,7 +2,7 @@ Copyright 2018 Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> License: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) --> -<mat-card class="ff-content-card ff-vfill"> +<mat-card class="ff-vfill-content"> <mat-card-title> <div fxLayout="row"> <div> diff --git a/src/plugins/webview/frontend/src/parts/transforms/components/overview.component.html b/src/plugins/webview/frontend/src/parts/transforms/components/overview.component.html index ea4fc3f..f0aa95d 100644 --- a/src/plugins/webview/frontend/src/parts/transforms/components/overview.component.html +++ b/src/plugins/webview/frontend/src/parts/transforms/components/overview.component.html @@ -2,7 +2,7 @@ Copyright 2018 Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> License: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) --> -<div fxLayout="row" class="ff-vfill-content"> +<div fxLayout="row" class="ff-vfill"> <mat-card class="ff-content-card" fxFlex="100"> <mat-card-title> <div fxLayout="row"> - *commit* 7f2d276c9a18a1d29adbed5906befb22a34ef14d - - - - - - - - - - Author: Tim Niemueller <niemuel...@kbsg.rwth-aachen.de> Date: Wed Apr 11 20:41:23 2018 +0200 Subject: webview-frontend: format floats to 4 decimals .../blackboard/components/overview.component.html | 2 +- .../blackboard/components/overview.component.ts | 29 ++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletions(-) _Diff for modified files_: diff --git a/src/plugins/webview/frontend/src/parts/blackboard/components/overview.component.html b/src/plugins/webview/frontend/src/parts/blackboard/components/overview.component.html index 4bcf2ed..4bd4c28 100644 --- a/src/plugins/webview/frontend/src/parts/blackboard/components/overview.component.html +++ b/src/plugins/webview/frontend/src/parts/blackboard/components/overview.component.html @@ -139,7 +139,7 @@ <ff-property direction="vertical" *ngFor="let f of keys(ifc(i).data.data)"> <div key>{{ f }}</div> - <div value>{{ ifc(i).data.data[f] }}</div> + <div value>{{ ifcd(i, f) }}</div> </ff-property> </div> <div *ngIf="!iok(i) || !ifc(i).data"> diff --git a/src/plugins/webview/frontend/src/parts/blackboard/components/overview.component.ts b/src/plugins/webview/frontend/src/parts/blackboard/components/overview.component.ts index bee66de..b91141b 100644 --- a/src/plugins/webview/frontend/src/parts/blackboard/components/overview.component.ts +++ b/src/plugins/webview/frontend/src/parts/blackboard/components/overview.component.ts @@ -72,6 +72,35 @@ export class BlackboardOverviewComponent implements OnInit, OnDestroy { return this.interfaces[hash_id[0]].instances[hash_id[1]]; } + ifcd(hash_id: string[], field: string) { + let iface = this.ifc(hash_id); + let idx = iface.info.fields.findIndex(f => f.name == field); + if (idx < 0) { // Ooops + console.warn(`Cannot find info for field '${hash_id[0]}-${hash_id[1]}--${field}'`); + return iface.data.data[field]; + } else { + if (iface.info.fields[idx].is_array) { + let rv = []; + for (let v of iface.data.data[field]) { + let t = iface.info.fields[idx].type; + if (t == 'double' || t == 'float') { + rv.push(v.toFixed(4)); + } else { + rv.push(v); + } + } + return rv; + } else { + let t = iface.info.fields[idx].type; + if (t == 'double' || t == 'float') { + return iface.data.data[field].toFixed(4); + } else { + return iface.data.data[field]; + } + } + } + } + indexof_selected_interface(hash: string, id: string) { return this.selected_interfaces.findIndex( -- Fawkes Robotics Framework http://www.fawkesrobotics.org _______________________________________________ fawkes-commits mailing list fawkes-commits@lists.kbsg.rwth-aachen.de https://lists.kbsg.rwth-aachen.de/listinfo/fawkes-commits