Commit 559ac68f authored by Alain Takoudjou's avatar Alain Takoudjou

Improve monitoring interface, use RSS and OPML file to load promise state information

parent 4fa95b55
...@@ -128,216 +128,7 @@ ...@@ -128,216 +128,7 @@
<key> <string>version</string> </key> <key> <string>version</string> </key>
<value> <string>001</string> </value> <value> <string>001</string> </value>
</item> </item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1453903721.86</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>948.49040.9969.34065</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1453903710.14</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1453903603.56</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -10,8 +10,11 @@ ...@@ -10,8 +10,11 @@
<key> <string>_Access_contents_information_Permission</string> </key> <key> <string>_Access_contents_information_Permission</string> </key>
<value> <value>
<tuple> <tuple>
<string>Anonymous</string>
<string>Assignee</string> <string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string> <string>Owner</string>
</tuple> </tuple>
...@@ -21,10 +24,8 @@ ...@@ -21,10 +24,8 @@
<key> <string>_Add_portal_content_Permission</string> </key> <key> <string>_Add_portal_content_Permission</string> </key>
<value> <value>
<tuple> <tuple>
<string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -41,10 +42,7 @@ ...@@ -41,10 +42,7 @@
<key> <string>_Modify_portal_content_Permission</string> </key> <key> <string>_Modify_portal_content_Permission</string> </key>
<value> <value>
<tuple> <tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -52,8 +50,11 @@ ...@@ -52,8 +50,11 @@
<key> <string>_View_Permission</string> </key> <key> <string>_View_Permission</string> </key>
<value> <value>
<tuple> <tuple>
<string>Anonymous</string>
<string>Assignee</string> <string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string> <string>Owner</string>
</tuple> </tuple>
...@@ -106,7 +107,7 @@ ...@@ -106,7 +107,7 @@
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
CACHE MANIFEST\n CACHE MANIFEST\n
# generated on Fri, 26 Nov 2015 11:45:33 +0000\n # generated on Fri, 25 Mars 2016 11:45:33 +0000\n
# XXX + fonts\n # XXX + fonts\n
# images/ajax-loader.gif\n # images/ajax-loader.gif\n
CACHE:\n CACHE:\n
...@@ -117,6 +118,7 @@ https://netdna.bootstrapcdn.com/font-awesome/4.2.0/fonts/fontawesome-webfont.wof ...@@ -117,6 +118,7 @@ https://netdna.bootstrapcdn.com/font-awesome/4.2.0/fonts/fontawesome-webfont.wof
https://netdna.bootstrapcdn.com/font-awesome/4.2.0/fonts/fontawesome-webfont.ttf?v=4.2.0\n https://netdna.bootstrapcdn.com/font-awesome/4.2.0/fonts/fontawesome-webfont.ttf?v=4.2.0\n
https://netdna.bootstrapcdn.com/font-awesome/4.2.0/fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular\n https://netdna.bootstrapcdn.com/font-awesome/4.2.0/fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular\n
URI.js\n URI.js\n
Chart.min.js\n
dygraph.js\n dygraph.js\n
gadget_erp5.css\n gadget_erp5.css\n
gadget_global.js\n gadget_global.js\n
...@@ -128,48 +130,61 @@ handlebars.js\n ...@@ -128,48 +130,61 @@ handlebars.js\n
i18next.js\n i18next.js\n
jiodev.js\n jiodev.js\n
jquery.js\n jquery.js\n
jquery.magnific-popup.min.js\n
jquerymobile.css\n jquerymobile.css\n
jquerymobile.js\n jquerymobile.js\n
jio_dev_rssfeed_storage.js\n
magnific-popup.css\n
renderjs.js\n renderjs.js\n
rsvp.js\n rsvp.js\n
gadget_officejs_header.html\n # gadget_officejs_page_sync.html\n
gadget_officejs_jio.html\n
gadget_officejs_jio_web_page_view.html\n
gadget_officejs_page_add_text_document.html\n
gadget_officejs_page_jio_configurator.html\n
gadget_officejs_page_jio_dav_configurator.html\n
gadget_officejs_page_login.html\n
gadget_officejs_page_logout.html\n
gadget_officejs_page_share_webrtc_jio.html\n
gadget_officejs_page_sync.html\n
gadget_officejs_page_text_editor_list.html\n
gadget_monitoring_router.html\n
gadget_monitoring_application_panel.html\n gadget_monitoring_application_panel.html\n
gadget_translation.html\n gadget_monitoring_chart.html\n
gadget_officejs_webrtc_jio.html\n gadget_monitoring_document_edit.html\n
gadget_officejs_widget_listbox.html\n gadget_monitoring_header.html\n
gadget_officejs_header.js\n gadget_monitoring_hosting_overview.html\n
gadget_officejs_jio.js\n gadget_monitoring_jio.html\n
gadget_officejs_jio_web_page_view.js\n gadget_monitoring_login.html\n
gadget_officejs_page_add_text_document.js\n gadget_monitoring_login_widget.html\n
gadget_officejs_page_jio_configurator.js\n gadget_monitoring_main.html\n
gadget_officejs_page_jio_dav_configurator.js\n gadget_monitoring_overview.html\n
gadget_officejs_page_login.js\n gadget_monitoring_process_view.html\n
gadget_officejs_page_logout.js\n gadget_monitoring_promise_interface.html\n
gadget_officejs_page_share_webrtc_jio.js\n gadget_monitoring_resource_view.html\n
gadget_officejs_page_sync.js\n gadget_monitoring_router.html\n
gadget_officejs_page_text_editor_list.js\n gadget_monitoring_settings_configurator.html\n
gadget_officejs_router.js\n gadget_monitoring_status_grid.html\n
gadget_officejs_text_editor_application.js\n gadget_monitoring_status_list.html\n
gadget_officejs_text_editor_application_panel.js\n gadget_monitoring_widget_listbox.html\n
gadget_monitoring_widget_listview.html\n
gadget_monitoring_widget_overview.html\n
gadget_monitoring_custom.css\n
gadget_monitoring_tooltipster.css\n
gadget_monitoring_application_panel.js\n
gadget_monitoring_chart.js\n
gadget_monitoring_document_edit.js\n
gadget_monitoring_header.js\n
gadget_monitoring_hosting_overview.js\n
gadget_monitoring_jio.js\n
gadget_monitoring_login.js\n
gadget_monitoring_login_widget.js\n
gadget_monitoring_main.js\n
gadget_monitoring_overview.js\n
gadget_monitoring_process_view.js\n
gadget_monitoring_promise_interface.js\n
gadget_monitoring_resource_view.js\n
gadget_monitoring_router.js\n
gadget_monitoring_static.js\n
gadget_monitoring_status_grid.js\n
gadget_monitoring_status_list.js\n
gadget_monitoring_tooltipster.min.js\n
gadget_monitoring_widget_listbox.js\n
gadget_monitoring_widget_listview.js\n
gadget_monitoring_widget_overview.js\n
gadget_translation.js\n gadget_translation.js\n
gadget_translation_data.js\n gadget_translation_data.js\n
gadget_officejs_webrtc_jio.js\n
gadget_officejs_widget_listbox.js\n
erp5_launcher.js\n erp5_launcher.js\n
erp5_launcher.html\n erp5_launcher.html\n
rjsunsafe/gadget_ckeditor.js\n
rjsunsafe/gadget_ckeditor.html\n
NETWORK:\n NETWORK:\n
* *
...@@ -237,9 +252,7 @@ NETWORK:\n ...@@ -237,9 +252,7 @@ NETWORK:\n
<dictionary> <dictionary>
<item> <item>
<key> <string>action</string> </key> <key> <string>action</string> </key>
<value> <value> <string>publish</string> </value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
...@@ -265,7 +278,7 @@ NETWORK:\n ...@@ -265,7 +278,7 @@ NETWORK:\n
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1455289075.54</float> <float>1458647957.13</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
...@@ -274,7 +287,7 @@ NETWORK:\n ...@@ -274,7 +287,7 @@ NETWORK:\n
</item> </item>
<item> <item>
<key> <string>validation_state</string> </key> <key> <string>validation_state</string> </key>
<value> <string>draft</string> </value> <value> <string>published</string> </value>
</item> </item>
</dictionary> </dictionary>
</list> </list>
...@@ -310,7 +323,7 @@ NETWORK:\n ...@@ -310,7 +323,7 @@ NETWORK:\n
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.6596.54736.51558</string> </value> <value> <string>950.4056.16865.34099</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -328,7 +341,7 @@ NETWORK:\n ...@@ -328,7 +341,7 @@ NETWORK:\n
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1455289277.29</float> <float>1458896288.17</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -117,6 +117,7 @@ ...@@ -117,6 +117,7 @@
\n \n
<link rel="stylesheet" href="magnific-popup.css">\n <link rel="stylesheet" href="magnific-popup.css">\n
<link rel="stylesheet" href="gadget_monitoring_tooltipster.css">\n <link rel="stylesheet" href="gadget_monitoring_tooltipster.css">\n
<link href="gadget_monitoring_custom.css" rel="stylesheet" type="text/css"/>\n
<!-- renderjs -->\n <!-- renderjs -->\n
<script src="rsvp.js" type="text/javascript"></script>\n <script src="rsvp.js" type="text/javascript"></script>\n
<script src="renderjs.js" type="text/javascript"></script>\n <script src="renderjs.js" type="text/javascript"></script>\n
...@@ -150,15 +151,16 @@ ...@@ -150,15 +151,16 @@
<script id="panel-template-body" type="text/x-handlebars-template">\n <script id="panel-template-body" type="text/x-handlebars-template">\n
<div class="ui-content">\n <div class="ui-content">\n
<ul data-role="listview" class="ui-listview">\n <ul data-role="listview" class="ui-listview">\n
<li><a href="#page=status_list" data-i18n="Promises Overview">Promises Overview</a></li>\n <li><a href="#page=status_list"><i class="fa fa-th-list"></i><span data-i18n="Promises Overview">Promises Overview</span></a></li>\n
<li><a href="#page=overview" data-i18n="Instances Overview">Instances Overview</a></li>\n <li><a href="#page=overview"><i class="fa fa-cube"></i><span data-i18n="Instances Overview">Instances Overview</span></a></li>\n
<li><a href="#page=settings_configurator" data-i18n="Monitoring Configuration">Monitoring Configuration</a></li>\n <li><a href="#page=hosting_overview"><i class="fa fa-globe"></i><span data-i18n="Applications Overview">Applications Overview</span></a></li>\n
<li><a href="#page=settings_configurator"><i class="fa fa-cog"></i><span data-i18n="Monitoring Configuration">Monitoring Configuration</span></a></li>\n
</ul>\n </ul>\n
</div>\n </div>\n
</script>\n </script>\n
\n \n
<!-- custom script -->\n <!-- custom script -->\n
<script src="gadget_officejs_text_editor_application_panel.js" type="text/javascript"></script>\n <script src="gadget_monitoring_application_panel.js" type="text/javascript"></script>\n
\n \n
</head>\n </head>\n
<body>\n <body>\n
...@@ -301,7 +303,7 @@ ...@@ -301,7 +303,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.3550.20058.13789</string> </value> <value> <string>949.63903.8246.8413</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -319,7 +321,7 @@ ...@@ -319,7 +321,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1455194311.05</float> <float>1458554861.74</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -111,6 +111,33 @@ ...@@ -111,6 +111,33 @@
html head + body.ui-overlay-a, html head + body.ui-overlay-a .ui-page, html head + body.ui-overlay-a .ui-page .ui-panel-wrapper {\n html head + body.ui-overlay-a, html head + body.ui-overlay-a .ui-page, html head + body.ui-overlay-a .ui-page .ui-panel-wrapper {\n
background: #FBFBFB; \n background: #FBFBFB; \n
}\n }\n
\n
html .ui-panel .ui-listview li a, html .ui-panel .ui-listview li div.ui-btn {\n
/* padding: .4em 2.75em .4em 1em; */\n
padding: .4em 0.75em !important;\n
}\n
html .ui-panel .ui-listview li a span, html .ui-panel .ui-listview li div.ui-btn span {\n
padding-left: 15px;\n
}\n
.ui-mobile .ui-page-active {\n
overflow-x: visible;\n
}\n
html div[role=\'main\'] > div.ui-content {\n
padding: 5px;\n
}\n
\n
\n
\n
\n
/*\n
html .ui-bar-a, html .ui-bar-a .ui-bar-inherit, html body .ui-body-a .ui-bar-inherit, html body .ui-group-theme-a .ui-bar-inherit {\n
background-color: #49227D;\n
}\n
html head + body .ui-bar-a .ui-btn:hover, html head + body .ui-body-a .ui-btn:hover, html head + body .ui-btn.ui-btn-a:hover, html head + body .ui-group-theme-a .ui-btn:hover, html head + body .ui-group-theme-a .ui-btn.ui-btn-a:hover, html head + body .ui-group-theme-a .ui-btn.ui-btn-a:active, html head + body .ui-bar-a .ui-btn:active, html head + body .ui-body-a .ui-btn:active, html head + body .ui-btn.ui-btn-a:active, html head + body .ui-group-theme-a .ui-btn:active, html head + body .ui-group-theme-a .ui-btn-a:active, html head + body .ui-bar-a .ui-btn.ui-btn-active, html head + body .ui-body-a .ui-btn.ui-btn-active, html head + body .ui-btn.ui-btn-a.ui-btn-active, html head + body .ui-group-theme-a .ui-btn-active, html head + body .ui-group-theme-a .ui-btn-a.ui-btn-active {\n
background-color: #19023E;\n
background: #19023E;\n
}\n
*/\n
.ui-grid-container > ul, .ui-grid-container > ul li {\n .ui-grid-container > ul, .ui-grid-container > ul li {\n
list-style: none outside none;\n list-style: none outside none;\n
margin-left: 0;\n margin-left: 0;\n
...@@ -134,27 +161,31 @@ html .ui-grid-container > ul.ui-grid-column-5 > .ui-grid-span-1 {\n ...@@ -134,27 +161,31 @@ html .ui-grid-container > ul.ui-grid-column-5 > .ui-grid-span-1 {\n
-ms-box-sizing: border-box;\n -ms-box-sizing: border-box;\n
box-sizing: border-box;\n box-sizing: border-box;\n
}\n }\n
.ui-grid-container .ui-grid-a .ui-block-a, .ui-grid-container .ui-grid-a .ui-block-a {\n /*.ui-grid-container .ui-grid-a .ui-block-a, .ui-grid-container .ui-grid-a .ui-block-a {\n
padding: 10px 15px;\n padding: 10px 15px;\n
}\n }\n
.ui-grid-container .ui-grid-b .ui-block-a, .ui-grid-container .ui-grid-b .ui-block-b {\n .ui-grid-container .ui-grid-b .ui-block-a, .ui-grid-container .ui-grid-b .ui-block-b {\n
padding: 10px 15px;\n padding: 10px 15px;\n
}\n }*/\n
/*\n /*\n
@media (max-width: 32em)\n @media (max-width: 32em)\n
html.ui-mobile .ui-grid-container.ui-responsive > ul > li, html.ui-mobile .ui-grid-container.ui-responsive > ul[class*="ui-grid-column"] > li {\n html.ui-mobile .ui-grid-container.ui-responsive > ul > li, html.ui-mobile .ui-grid-container.ui-responsive > ul[class*="ui-grid-column"] > li {\n
width: 100%;\n width: 100%;\n
}*/\n }*/\n
\n \n
.margin-0 {margin: 0}\n
.padding-5 {padding: 5px;}\n .padding-5 {padding: 5px;}\n
.padding-10 {padding: 10px;}\n .padding-10 {padding: 10px;}\n
.padding-15 {padding: 15px;}\n .padding-15 {padding: 15px;}\n
.padding-20 {padding: 20px;}\n .padding-20 {padding: 20px;}\n
.padding-tb-5 {padding: 10px 0;}\n
.padding-tb-10 {padding: 10px 0;}\n .padding-tb-10 {padding: 10px 0;}\n
.padding-tb-20 {padding: 20px 0;}\n .padding-tb-20 {padding: 20px 0;}\n
.padding-lr-5 {padding: 0 5px;}\n
.padding-lr-10 {padding: 0 10px;}\n .padding-lr-10 {padding: 0 10px;}\n
.padding-lr-20 {padding: 0 20px;}\n .padding-lr-20 {padding: 0 20px;}\n
.padding-lrb-20 {padding: 0 20px 20px;}\n .padding-lrb-20 {padding: 0 20px 20px;}\n
.border-gray { border: 1px solid #C3C3C3; border-radius: 3px;}\n
.ui-text{\n .ui-text{\n
padding: 0 10px;\n padding: 0 10px;\n
}\n }\n
...@@ -166,10 +197,17 @@ html.ui-mobile .ui-grid-container.ui-responsive > ul > li, html.ui-mobile .ui-gr ...@@ -166,10 +197,17 @@ html.ui-mobile .ui-grid-container.ui-responsive > ul > li, html.ui-mobile .ui-gr
.ui-text-ERROR, .ui-text-error {\n .ui-text-ERROR, .ui-text-error {\n
color: #DC4343;\n color: #DC4343;\n
}\n }\n
.ui-text-INFO, .ui-text-info {\n
color: #DC4343;\n
}\n
.ui-text-OK, .ui-text-ok {\n .ui-text-OK, .ui-text-ok {\n
color: green;\n color: green;\n
}\n }\n
\n \n
.ui-text-desabled {\n
color: rgba(128, 128, 128, 0.66);\n
}\n
\n
.text-overview {\n .text-overview {\n
max-width: 200px;\n max-width: 200px;\n
white-space: nowrap;\n white-space: nowrap;\n
...@@ -239,7 +277,6 @@ html.ui-mobile .ui-grid-container.ui-responsive > ul > li, html.ui-mobile .ui-gr ...@@ -239,7 +277,6 @@ html.ui-mobile .ui-grid-container.ui-responsive > ul > li, html.ui-mobile .ui-gr
font-weight: normal;\n font-weight: normal;\n
padding: 5px;\n padding: 5px;\n
white-space: nowrap;\n white-space: nowrap;\n
text-align: center;\n
}\n }\n
\n \n
html .ui-panel-overview table {\n html .ui-panel-overview table {\n
...@@ -250,11 +287,22 @@ html .ui-panel-overview table {\n ...@@ -250,11 +287,22 @@ html .ui-panel-overview table {\n
html .content-details table tr th, html .content-details table tr td {\n html .content-details table tr th, html .content-details table tr td {\n
padding: 5px;\n padding: 5px;\n
}\n }\n
html .content-details .instances-parameters table tr td {\n
padding: 0 0 0 10px;\n
}\n
html .content-details .instances-parameters table tr td:last-child {\n
padding: 0;\n
width: 50px;\n
}\n
html .promise-list table tr {\n html .promise-list table tr {\n
cursor: pointer;\n cursor: pointer;\n
}\n }\n
.promise-list {\n .promise-list {\n
padding: 10px 20px;\n padding: 10px;\n
}\n
\n
table tr.line-edit {\n
cursor: pointer;\n
}\n }\n
\n \n
.header-form-overview {\n .header-form-overview {\n
...@@ -274,6 +322,14 @@ html .promise-list table tr {\n ...@@ -274,6 +322,14 @@ html .promise-list table tr {\n
margin-top: 0.1em;\n margin-top: 0.1em;\n
}\n }\n
\n \n
.ui-content-sections {\n
margin-top: 1em;\n
padding: 1em;\n
-webkit-border-radius: .3125em;\n
border-radius: .3125em;\n
border: 1px solid #A2A2A2;\n
}\n
\n
html head + body .ui-panel-overview > h2 {\n html head + body .ui-panel-overview > h2 {\n
font-weight: bold;\n font-weight: bold;\n
font-size: 105%;\n font-size: 105%;\n
...@@ -346,6 +402,13 @@ html head + body .ui-panel-overview > h2 {\n ...@@ -346,6 +402,13 @@ html head + body .ui-panel-overview > h2 {\n
vertical-align: baseline;\n vertical-align: baseline;\n
border-radius: .25em;\n border-radius: .25em;\n
}\n }\n
.label-text {\n
display: block;\n
margin: .6em 0 .4em;\n
font-weight: 400;\n
font-size: 16px;\n
text-transform: capitalize;\n
}\n
\n \n
.ui-content-hidden {\n .ui-content-hidden {\n
display: none;\n display: none;\n
...@@ -360,6 +423,12 @@ html head + body .ui-panel-overview > h2 {\n ...@@ -360,6 +423,12 @@ html head + body .ui-panel-overview > h2 {\n
.ui-panel-overview .ui-listview-container {\n .ui-panel-overview .ui-listview-container {\n
padding: 0;\n padding: 0;\n
}\n }\n
.ui-listview-container ul {\n
padding: 0;\n
}\n
.ui-listview-container ul li a.ui-btn {\n
text-align: left;\n
}\n
ul li .ui-collapse-content {\n ul li .ui-collapse-content {\n
background-color: #fff;\n background-color: #fff;\n
border-color: #ddd;\n border-color: #ddd;\n
...@@ -426,6 +495,11 @@ ul li .ui-collapse-content fieldset > div, ul li .ui-collapse-content fieldset > ...@@ -426,6 +495,11 @@ ul li .ui-collapse-content fieldset > div, ul li .ui-collapse-content fieldset >
content: "\\f009";\n content: "\\f009";\n
}\n }\n
\n \n
.column-check {\n
width: 54px;\n
padding-top: 5px;\n
}\n
\n
.listbox-filter-panel, .overview-filter-panel {\n .listbox-filter-panel, .overview-filter-panel {\n
padding: 1em;\n padding: 1em;\n
padding-top: .1em;\n padding-top: .1em;\n
...@@ -454,6 +528,9 @@ html .custom-grid-wrap table thead tr th {\n ...@@ -454,6 +528,9 @@ html .custom-grid-wrap table thead tr th {\n
list-style: none;\n list-style: none;\n
font-size: 12px;\n font-size: 12px;\n
}\n }\n
.legend ul li {\n
list-style: none;\n
}\n
.legend:before {\n .legend:before {\n
display: block;\n display: block;\n
content: "";\n content: "";\n
...@@ -479,10 +556,20 @@ html .custom-grid-wrap table thead tr th {\n ...@@ -479,10 +556,20 @@ html .custom-grid-wrap table thead tr th {\n
.graph-label {\n .graph-label {\n
font-size: 75%;\n font-size: 75%;\n
}\n }\n
.dygraph-xlabel {\n
font-size: 110%;\n
color: #344558;\n
padding: 8px 0;\n
}\n
.graph-medium {\n .graph-medium {\n
height: 200px;\n height: 200px;\n
width: 100%;\n width: 100%;\n
}\n }\n
.graph-h-medium {\n
height: 230px;\n
width: 100%;\n
margin: 30px 0;\n
}\n
.ui-grid-column .graph-state-labels {\n .ui-grid-column .graph-state-labels {\n
margin: 10px;\n margin: 10px;\n
}\n }\n
...@@ -611,6 +698,7 @@ html .tooltipster-base table td, html .tooltipster-base table th {\n ...@@ -611,6 +698,7 @@ html .tooltipster-base table td, html .tooltipster-base table th {\n
\n \n
html table.instance-overview tr td > a.selected {\n html table.instance-overview tr td > a.selected {\n
border-left: 4px solid #93D2B8;\n border-left: 4px solid #93D2B8;\n
border-color: #93D2B8;\n
}\n }\n
\n \n
html table.instance-overview td:first-child > a, html table.instance-overview td:first-child > a:hover {\n html table.instance-overview td:first-child > a, html table.instance-overview td:first-child > a:hover {\n
...@@ -625,6 +713,105 @@ html table.instance-overview td:first-child > a, html table.instance-overview td ...@@ -625,6 +713,105 @@ html table.instance-overview td:first-child > a, html table.instance-overview td
margin-left: -150px;\n margin-left: -150px;\n
width: 320px;\n width: 320px;\n
}\n }\n
\n
/* Hpanel box for hosting subscription */\n
.hpanel {\n
background-color: none;\n
border: none;\n
box-shadow: none;\n
margin-bottom: 25px;\n
}\n
\n
.hpanel .panel-body {\n
min-height: 150px;\n
background: #fff;\n
border: 1px solid #e4e5e7;\n
color: #6a6c6f;\n
border-radius: 2px;\n
padding: 20px;\n
position: relative;\n
}\n
\n
.hpanel > .panel-footer {\n
color: inherit;\n
border: 1px solid #e4e5e7;\n
border-top: none;\n
font-size: 90%;\n
background: #f7f9fa;\n
padding: 10px 15px;\n
}\n
\n
.panel-header {\n
padding: 10px 5px;\n
color: #6a6c6f;\n
text-transform: uppercase;\n
font-weight: 600;\n
}\n
\n
.panel-footer {\n
padding: 10px 15px;\n
background-color: #f5f5f5;\n
border-top: 1px solid #ddd;\n
border-bottom-right-radius: 3px;\n
border-bottom-left-radius: 3px;\n
}\n
\n
.hpanel .panel-body > h2:first-child {\n
margin-top: 0;\n
color: #6a6c6f;\n
text-transform: uppercase;\n
font-weight: 600;\n
float: left;\n
}\n
\n
.panel-body:before, .panel-body:after {\n
display: table;\n
content: " ";\n
}\n
\n
.panel-body:after {\n
clear: both;\n
}\n
\n
\n
/* Magnific Popup */\n
.white-popup {\n
position: relative;\n
background: #FFF;\n
padding: 20px;\n
width: auto;\n
max-width: 300px;\n
margin: 20px auto;\n
}\n
\n
/************** Media @ **********************/\n
@media all and (max-width: 62em) {\n
form.search .ui-block-a {\n
width: 60%;\n
float: left;\n
}\n
form.search .ui-block-b {\n
width: 40%;\n
float:left;\n
}\n
.ui-panel-overview {\n
margin: 15px 0 20px 0;\n
}\n
html table:not(.ui-responsive) tbody tr td:first-child a, html table:not(ui-responsive) tbody tr th:first-child a {\n
position: relative;\n
}\n
html .content-details .instances-parameters table tr td {\n
padding: 10px 0 10px 10px;\n
}\n
.content-details {\n
padding: 10px;\n
}\n
table td .prop-edit {\n
padding: 5px;\n
max-height: 2.05em;\n
}\n
}\n
\n
]]></string> </value> ]]></string> </value>
...@@ -764,7 +951,7 @@ html table.instance-overview td:first-child > a, html table.instance-overview td ...@@ -764,7 +951,7 @@ html table.instance-overview td:first-child > a, html table.instance-overview td
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.6362.31366.44049</string> </value> <value> <string>949.64125.34749.34235</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -782,7 +969,7 @@ html table.instance-overview td:first-child > a, html table.instance-overview td ...@@ -782,7 +969,7 @@ html table.instance-overview td:first-child > a, html table.instance-overview td
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1455275197.77</float> <float>1458581200.97</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -295,7 +295,7 @@ ...@@ -295,7 +295,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>948.59081.21048.55005</string> </value> <value> <string>949.47051.37391.64290</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -313,7 +313,7 @@ ...@@ -313,7 +313,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1454506221.84</float> <float>1457543803.27</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -120,6 +120,7 @@ ...@@ -120,6 +120,7 @@
<script src="renderjs.js" type="text/javascript"></script>\n <script src="renderjs.js" type="text/javascript"></script>\n
\n \n
<script src="jiodev.js" type="text/javascript"></script>\n <script src="jiodev.js" type="text/javascript"></script>\n
<script src="jio_dev_rssfeed_storage.js" type="text/javascript"></script>\n
\n \n
<!-- custom script -->\n <!-- custom script -->\n
<script src="gadget_monitoring_jio.js" type="text/javascript"></script>\n <script src="gadget_monitoring_jio.js" type="text/javascript"></script>\n
...@@ -264,7 +265,7 @@ ...@@ -264,7 +265,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>948.31896.5130.28535</string> </value> <value> <string>949.6675.61849.23210</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -282,7 +283,7 @@ ...@@ -282,7 +283,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1452875060.05</float> <float>1456231972.65</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -110,6 +110,71 @@ ...@@ -110,6 +110,71 @@
/*jslint indent: 2, maxerr: 3 */\n /*jslint indent: 2, maxerr: 3 */\n
(function (window, rJS, jIO) {\n (function (window, rJS, jIO) {\n
"use strict";\n "use strict";\n
\n
function getOPMLUrlList(url, query) {\n
var jio_options = {\n
type: "query",\n
sub_storage: {\n
type: "feed",\n
feed_type: \'opml\',\n
url: url\n
}\n
},\n
jio_storage = jIO.createJIO(jio_options);\n
if (query === undefined) {\n
query = {};\n
}\n
return jio_storage.allDocs(query)\n
.push(function (url_list) {\n
var i,\n
feed_url = [];\n
for (i = 0; i < url_list.data.total_rows; i += 1) {\n
if (url_list.data.rows[i].value.htmlurl) { // || url_list.data.rows[i].value.xmlUrl\n
feed_url.push(url_list.data.rows[i].value.htmlurl); // || url_list.data.rows[i].value.xmlUrl\n
}\n
}\n
return feed_url;\n
}, function(error) {\n
console.log(error);\n
});\n
}\n
\n
function getMonitorUrlList(url, query) {\n
var jio_options = {\n
type: "query",\n
sub_storage: {\n
type: "feed",\n
feed_type: \'opml\',\n
url: url\n
}\n
},\n
jio_storage = jIO.createJIO(jio_options);\n
if (query === undefined) {\n
query = {};\n
}\n
return jio_storage.allDocs(query)\n
.push(function (url_list) {\n
var i,\n
monitor_url = [];\n
for (i = 0; i < url_list.data.total_rows; i += 1) {\n
if (url_list.data.rows[i].value.url) {\n
monitor_url.push(url_list.data.rows[i].value.url);\n
}\n
}\n
return monitor_url;\n
}, function(error) {\n
console.log(error);\n
});\n
}\n
\n
function concatArrayOfArray(arrayList) {\n
var all_list = [],\n
i;\n
for (i = 0; i < arrayList.length; i += 1) {\n
all_list = all_list.concat(arrayList[i]);\n
}\n
return all_list;\n
}\n
\n \n
rJS(window)\n rJS(window)\n
\n \n
...@@ -120,6 +185,7 @@ ...@@ -120,6 +185,7 @@
\n \n
.declareAcquiredMethod("redirect", "redirect")\n .declareAcquiredMethod("redirect", "redirect")\n
.declareAcquiredMethod("getSetting", "getSetting")\n .declareAcquiredMethod("getSetting", "getSetting")\n
.declareAcquiredMethod("setSetting", "setSetting")\n
\n \n
.declareMethod(\'createJio\', function (jio_options) {\n .declareMethod(\'createJio\', function (jio_options) {\n
var gadget = this;\n var gadget = this;\n
...@@ -141,9 +207,101 @@ ...@@ -141,9 +207,101 @@
gadget.state_parameter_dict.jio_storage_name = jio_storage_name;\n gadget.state_parameter_dict.jio_storage_name = jio_storage_name;\n
});\n });\n
})\n })\n
.declareMethod(\'createJioFromRssFeed\', function (feed_url, basic_login) {\n
var gadget = this,\n
jio_options = {\n
type: "query",\n
sub_storage: {\n
type: "feed",\n
feed_type: \'rss\',\n
url: opml_url\n
}\n
};\n
if (basic_login !== undefined) {\n
jio_options.sub_storage.basic_login = basic_login;\n
}\n
this.state_parameter_dict.jio_storage = jIO.createJIO(jio_options);\n
return jio_options;\n
})\n
.declareMethod(\'getUrlListFromOPML\', function (opml_url, query) {\n
return getOPMLUrlList(opml_url, query);\n
})\n
.declareMethod(\'getUrlDescriptionFromOPML\', function (opml_url, query) {\n
var jio_options = {\n
type: "query",\n
sub_storage: {\n
type: "feed",\n
feed_type: \'opml\',\n
url: opml_url\n
}\n
},\n
jio_storage = jIO.createJIO(jio_options);\n
if (query === undefined) {\n
query = {};\n
}\n
return jio_storage.allDocs(query)\n
.push(function (url_list) {\n
var i,\n
feed_url;\n
for (i = 0; i < url_list.data.total_rows; i += 1) {\n
if (url_list.data.rows[i].value.htmlurl || url_list.data.rows[i].value.xmlUrl) {\n
feed_url.push({\n
htmlurl: url_list.data.rows[i].value.htmlurl,\n
xmlUrl: url_list.data.rows[i].value.xmlUrl,\n
title: url_list.data.rows[i].value.title,\n
opml_title: url_list.data.rows[i].value.opml_title,\n
type: url_list.data.rows[i].value.type,\n
create_date: url_list.data.rows[i].value.create_date,\n
modified_date: url_list.data.rows[i].value.modified_date,\n
version: url_list.data.rows[i].value.version,\n
text: url_list.data.rows[i].value.text,\n
});\n
}\n
}\n
return feed_url;\n
});\n
})\n
.declareMethod(\'getUrlListFromFullOPML\', function (query) {\n
return this.getSetting(\'monitor_url_description\')\n
.push(function (url_description_dict) {\n
var promise_list = [],\n
key;\n
for (key in url_description_dict) {\n
promise_list.push(getOPMLUrlList(url_description_dict[key].href, query));\n
}\n
return RSVP.all(promise_list);\n
})\n
.push(function(url_list) {\n
return concatArrayOfArray(url_list);\n
});\n
})\n
.declareMethod(\'getMonitorUrlList\', function (query) {\n
return this.getSetting(\'monitor_url_description\')\n
.push(function (url_description_dict) {\n
var promise_list = [],\n
key;\n
for (key in url_description_dict) {\n
promise_list.push(getMonitorUrlList(url_description_dict[key].href, query));\n
}\n
return RSVP.all(promise_list);\n
})\n
.push(function(url_list) {\n
return concatArrayOfArray(url_list);\n
});\n
})\n
.declareMethod(\'getMonitorUrlListFromOpml\', function (url, query) {\n
return getMonitorUrlList(url, query);\n
})\n
.declareMethod(\'allDocs\', function () {\n .declareMethod(\'allDocs\', function () {\n
var storage = this.state_parameter_dict.jio_storage;\n var storage = this.state_parameter_dict.jio_storage;\n
return storage.allDocs.apply(storage, arguments);\n return storage.allDocs.apply(storage, arguments)\n
.push(function (doc) {\n
return doc;\n
}, function (error) {\n
console.log(error);\n
// XXX - We must do something here (try to get document from local ? or raise)\n
return undefined;\n
});\n
})\n })\n
.declareMethod(\'allAttachments\', function () {\n .declareMethod(\'allAttachments\', function () {\n
var storage = this.state_parameter_dict.jio_storage;\n var storage = this.state_parameter_dict.jio_storage;\n
...@@ -332,7 +490,7 @@ ...@@ -332,7 +490,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>948.31893.52815.47769</string> </value> <value> <string>949.59884.43592.12680</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -350,7 +508,7 @@ ...@@ -350,7 +508,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1452874919.27</float> <float>1458313807.96</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -308,7 +308,7 @@ ...@@ -308,7 +308,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.5203.64911.29252</string> </value> <value> <string>949.21109.24288.21538</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -326,7 +326,7 @@ ...@@ -326,7 +326,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1455205817.52</float> <float>1456234720.55</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -216,19 +216,23 @@ ...@@ -216,19 +216,23 @@
if (result.status === \'OK\') {\n if (result.status === \'OK\') {\n
return gadget.setSetting(\'redirect_after_login\', \'\')\n return gadget.setSetting(\'redirect_after_login\', \'\')\n
.push(function () {\n .push(function () {\n
var credential = {\n /*var credential = {\n
hash: hash,\n hash: hash,\n
url: gadget.props.url\n url: gadget.props.url\n
},\n },\n
hash_url = hashCode(gadget.props.url) + \'\';\n hash_url = hashCode(gadget.props.url) + \'\';\n
return gadget.setSetting(hash_url, credential);\n return login_gadget.setUrlInfo(hash_url, credential);*/\n
return login_gadget.updateUrlValue(\n
gadget.props.url,\n
username,\n
password);\n
})\n })\n
.push(function () {\n .push(function () {\n
return gadget.redirect(gadget.props.from);\n return gadget.redirect(gadget.props.from);\n
});\n });\n
} else {\n } else {\n
gadget.props.element.querySelector(".msg")\n gadget.props.element.querySelector(".msg")\n
.innerHtml = \'<span class="ui-text-\' + error.status +\n .innerHtml = \'<span class="ui-text-\' + result.status +\n
\'">Invalid username or password.</span>\';\n \'">Invalid username or password.</span>\';\n
}\n }\n
}, function(error) {\n }, function(error) {\n
...@@ -379,7 +383,7 @@ ...@@ -379,7 +383,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.5199.35910.16827</string> </value> <value> <string>949.54056.59252.46080</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -397,7 +401,7 @@ ...@@ -397,7 +401,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1455205594.43</float> <float>1457966675.88</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -124,6 +124,7 @@ ...@@ -124,6 +124,7 @@
\n \n
</head>\n </head>\n
<body>\n <body>\n
<div data-gadget-url="gadget_jio.html" data-gadget-scope="jio_gadget" data-gadget-sandbox="public"></div>\n
</body>\n </body>\n
</html> </html>
...@@ -262,7 +263,7 @@ ...@@ -262,7 +263,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.2228.14510.50124</string> </value> <value> <string>949.39647.52503.63692</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -280,7 +281,7 @@ ...@@ -280,7 +281,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1455027252.82</float> <float>1457099647.3</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -121,6 +121,117 @@ ...@@ -121,6 +121,117 @@
hashCode = function (s) {\n hashCode = function (s) {\n
return s.split("").reduce(function(a,b){a=((a<<5)-a)+b.charCodeAt(0);return a&a},0); \n return s.split("").reduce(function(a,b){a=((a<<5)-a)+b.charCodeAt(0);return a&a},0); \n
};\n };\n
\n
\n
function getUrlInfo(gadget, key, default_value) {\n
return gadget.getDeclaredGadget("jio_gadget")\n
.push(function (jio_gadget) {\n
return jio_gadget.get("urls");\n
})\n
.push(function (doc) {\n
return doc[key] || default_value;\n
}, function (error) {\n
if (error.status_code === 404) {\n
return default_value;\n
}\n
throw error;\n
});\n
}\n
\n
function setUrlInfo(gadget, key, value) {\n
var jio_gadget;\n
return gadget.getDeclaredGadget("jio_gadget")\n
.push(function (result) {\n
jio_gadget = result;\n
return jio_gadget.get("urls");\n
})\n
.push(undefined, function (error) {\n
if (error.status_code === 404) {\n
return {};\n
}\n
throw error;\n
})\n
.push(function (doc) {\n
doc[key] = value;\n
return jio_gadget.put(\'urls\', doc);\n
});\n
}\n
\n
function updateUrlValue(gadget, url, login, password) {\n
var jio_gadget;\n
return gadget.getDeclaredGadget("jio_gadget")\n
.push(function (result) {\n
jio_gadget = result;\n
return jio_gadget.get("urls");\n
})\n
.push(undefined, function (error) {\n
if (error.status_code === 404) {\n
return {};\n
}\n
throw error;\n
})\n
.push(function (doc) {\n
var key = hashCode(url) + \'\';\n
\n
if (doc.hasOwnProperty(key)) {\n
doc[key].hash = btoa(login + \':\' + password);\n
doc[key].url = url;\n
} else {\n
doc[key] = {\n
hash: btoa(login + \':\' + password),\n
url: url,\n
parent_url: \'\'};\n
}\n
return jio_gadget.put(\'urls\', doc);\n
});\n
}\n
\n
function setUrlDict(gadget, url_dict) {\n
var jio_gadget;\n
return gadget.getDeclaredGadget("jio_gadget")\n
.push(function (result) {\n
jio_gadget = result;\n
return jio_gadget.get("urls");\n
})\n
.push(undefined, function (error) {\n
if (error.status_code === 404) {\n
return {};\n
}\n
throw error;\n
})\n
.push(function (doc) {\n
var key;\n
for (key in url_dict) {\n
doc[key] = url_dict[key];\n
}\n
return jio_gadget.put(\'urls\', doc);\n
});\n
}\n
\n
function clearSettingFromParentUrl (gadget, parent_url) {\n
var jio_gadget;\n
return gadget.getDeclaredGadget("jio_gadget")\n
.push(function (result) {\n
jio_gadget = result;\n
return jio_gadget.get("urls");\n
})\n
.push(undefined, function (error) {\n
if (error.status_code === 404) {\n
return {};\n
}\n
throw error;\n
})\n
.push(function (doc) {\n
var hash;\n
for (hash in doc) {\n
if (doc[hash].parent_url === parent_url ) {\n
delete doc[hash];\n
}\n
}\n
return jio_gadget.put(\'urls\', doc);\n
});\n
}\n
\n
\n \n
gadget_klass\n gadget_klass\n
.ready(function (g) {\n .ready(function (g) {\n
...@@ -128,6 +239,15 @@ ...@@ -128,6 +239,15 @@
g.props.from = {page: \'main\'};\n g.props.from = {page: \'main\'};\n
g.props.login = \'login\';\n g.props.login = \'login\';\n
})\n })\n
.ready(function (g) {\n
return g.getDeclaredGadget("jio_gadget")\n
.push(function (jio_gadget) {\n
return jio_gadget.createJio({\n
type: "indexeddb",\n
database: "setting"\n
});\n
});\n
})\n
.declareAcquiredMethod("redirect", "redirect")\n .declareAcquiredMethod("redirect", "redirect")\n
.declareAcquiredMethod(\'getUrlFor\', \'getUrlFor\')\n .declareAcquiredMethod(\'getUrlFor\', \'getUrlFor\')\n
.declareAcquiredMethod("getSetting", "getSetting")\n .declareAcquiredMethod("getSetting", "getSetting")\n
...@@ -143,7 +263,7 @@ ...@@ -143,7 +263,7 @@
if (response.status === 200) {\n if (response.status === 200) {\n
resolve({status: \'OK\'});\n resolve({status: \'OK\'});\n
} else {\n } else {\n
reject(new Error("XHR: " + response.status + ": " + response.statusText));\n reject({status: \'ERROR\', msg: new Error("XHR: " + response.status + ": " + response.statusText)});\n
}\n }\n
};\n };\n
xhr.onerror = function (e) {\n xhr.onerror = function (e) {\n
...@@ -176,7 +296,7 @@ ...@@ -176,7 +296,7 @@
});\n });\n
};\n };\n
\n \n
return gadget.getSetting(hash_url)\n return getUrlInfo(gadget, hash_url)\n
.push(function (credential_dict) {\n .push(function (credential_dict) {\n
if (!credential_dict) {\n if (!credential_dict) {\n
credential_dict = {hash: btoa(\'no:password\'), url: url};\n credential_dict = {hash: btoa(\'no:password\'), url: url};\n
...@@ -195,6 +315,26 @@ ...@@ -195,6 +315,26 @@
return redirectWith(options_dict);\n return redirectWith(options_dict);\n
});\n });\n
});\n });\n
})\n
.declareMethod(\'setUrlDict\', function (url_dict) {\n
var gadget = this;\n
return setUrlDict(gadget, url_dict);\n
})\n
.declareMethod(\'clearSettingFromParentUrl\', function (parent_url) {\n
var gadget = this;\n
return clearSettingFromParentUrl(gadget, parent_url);\n
})\n
.declareMethod(\'setUrlInfo\', function (key, value) {\n
var gadget = this;\n
return setUrlInfo(gadget, key, value);\n
})\n
.declareMethod(\'getUrlInfo\', function (key, default_value) {\n
var gadget = this;\n
return getUrlInfo(gadget, key, default_value);\n
})\n
.declareMethod(\'updateUrlValue\', function (url, login, password) {\n
var gadget = this;\n
return updateUrlValue(gadget, url, login, password);\n
});\n });\n
\n \n
}(window, document, rJS)); }(window, document, rJS));
...@@ -334,7 +474,7 @@ ...@@ -334,7 +474,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.5170.57497.38894</string> </value> <value> <string>949.54052.60822.44663</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -352,7 +492,7 @@ ...@@ -352,7 +492,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1455204244.68</float> <float>1457967142.65</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -125,9 +125,9 @@ ...@@ -125,9 +125,9 @@
.declareMethod("render", function (options) {\n .declareMethod("render", function (options) {\n
var gadget = this,\n var gadget = this,\n
current_display;\n current_display;\n
return gadget.getSetting(\'jio_storage_description\')\n return gadget.getSetting(\'monitor_url_description\')\n
.push(function (jio_storage_description) {\n .push(function (monitor_url_description) {\n
if (!jio_storage_description) {\n if (!monitor_url_description) {\n
return gadget.redirect({\n return gadget.redirect({\n
page: \'settings_configurator\'\n page: \'settings_configurator\'\n
});\n });\n
...@@ -140,6 +140,7 @@ ...@@ -140,6 +140,7 @@
if (current_display === undefined || current_display === \'\') {\n if (current_display === undefined || current_display === \'\') {\n
current_display = \'list\';\n current_display = \'list\';\n
}\n }\n
current_display = \'list\';\n
return gadget.setSetting(\'monitoring_display_style\', current_display);\n return gadget.setSetting(\'monitoring_display_style\', current_display);\n
})\n })\n
.push(function () {\n .push(function () {\n
...@@ -284,7 +285,7 @@ ...@@ -284,7 +285,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>948.31863.44261.14694</string> </value> <value> <string>949.56645.25063.6451</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -302,7 +303,7 @@ ...@@ -302,7 +303,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1454930576.46</float> <float>1458320618.57</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
},\n },\n
listview_options = {\n listview_options = {\n
search_page: \'overview\',\n search_page: \'overview\',\n
//search: options.search,\n search: options.search,\n
selection: \'\',\n selection: \'\',\n
column: {\n column: {\n
select: \'title\',\n select: \'title\',\n
...@@ -158,32 +158,36 @@ ...@@ -158,32 +158,36 @@
},\n },\n
data_id: \'monitor.global\',\n data_id: \'monitor.global\',\n
data_url: gadget.property_dict.listview_data_url,\n data_url: gadget.property_dict.listview_data_url,\n
search_column_list: [\'title\', \'status\', \'date\'],\n search_column_list: [\n
\'sort_column_list\': [\n {select: \'status\', title: \'Status\'},\n
{select: \'Status\', title: \'Status\'},\n {select: \'hosting-title\', title: \'Date\'}\n
],\n
sort_column_list: [\n
{select: \'status\', title: \'Status\'},\n
{select: \'title\', title: \'Title\'},\n {select: \'title\', title: \'Title\'},\n
{select: \'data\', title: \'Date\'}\n {select: \'hosting-title\', title: \'Date\'}\n
],\n ],\n
query: {\n query: {\n
select_list: [\'title\', \'status\', \'date\', \'_embedded\', \'_links\', \'state\', \'data\'],\n select_list: [\'title\', \'status\', \'date\', \'_links\', \'state\', \'hosting-title\'],\n
query: \'_id:"monitor%.global"\',\n query: \'_id:"monitor.global"\',\n
sort_on: [["status", "ascending"]]\n sort_on: [["status", "ascending"]]\n
}\n }\n
};\n };\n
\n \n
return gadget.updateHeader(header)\n return gadget.updateHeader(header)\n
.push(function () {\n .push(function () {\n
var filter_part_list = [];\n var filter_part_list = [],\n
j;\n
\n \n
/*if (options.sort_on && options.sort_on !== \'status\') {\n /*if (options.sort_on && options.sort_on !== \'status\') {\n
listview_options.query.sort_on = [[options.sort_on, \'ascending\']];\n listview_options.query.sort_on = [[options.sort_on, \'ascending\']];\n
}\n }*/\n
if (options.status && options.status !== \'\') {\n if (options.status && options.status !== \'\') {\n
for (j = 0; j < options.status.split(\'+\').length; j += 1) {\n for (j = 0; j < options.status.split(\'+\').length; j += 1) {\n
filter_part_list.push(\'(status:"\' + options.status.split(\'+\')[j].toUpperCase() + \'")\');\n filter_part_list.push(\'(status:"\' + options.status.split(\'+\')[j].toUpperCase() + \'")\');\n
}\n }\n
listview_options.query.query += \' AND (\' + filter_part_list.join(\' OR \') + \')\';\n listview_options.query.query += \' AND (\' + filter_part_list.join(\' OR \') + \')\';\n
}*/\n }\n
return gadget.property_dict.listview.render(listview_options);\n return gadget.property_dict.listview.render(listview_options);\n
});\n });\n
})\n })\n
...@@ -329,7 +333,7 @@ ...@@ -329,7 +333,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.6325.29916.43946</string> </value> <value> <string>949.23937.2972.5563</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -347,7 +351,7 @@ ...@@ -347,7 +351,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1455274107.83</float> <float>1458226729.62</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -162,13 +162,12 @@ ...@@ -162,13 +162,12 @@
}\n }\n
};\n };\n
\n \n
//gadget.property_dict.url = options.jio_for;\n
return gadget.property_dict.login_gadget.loginRedirect(options.jio_for, options, options.title, options.root)\n return gadget.property_dict.login_gadget.loginRedirect(options.jio_for, options, options.title, options.root)\n
.push(function (cred) {\n .push(function (cred) {\n
jio_options.sub_storage.sub_storage.basic_login = cred.hash;\n jio_options.sub_storage.sub_storage.basic_login = cred.hash;\n
gadget.property_dict.jio_gadget.createJio(jio_options);\n gadget.property_dict.jio_gadget.createJio(jio_options);\n
return gadget.updateHeader({\n return gadget.updateHeader({\n
title: (options.title || \'Monitoring Instance\') + \' Processes\'\n title: options.title + \' [\' + options.root + \'] Processes status\'\n
});\n });\n
})\n })\n
.push(function () {\n .push(function () {\n
...@@ -573,7 +572,7 @@ ...@@ -573,7 +572,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.5282.9066.9386</string> </value> <value> <string>949.59799.36045.13670</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -591,7 +590,7 @@ ...@@ -591,7 +590,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1455210644.51</float> <float>1458308638.96</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -284,12 +284,12 @@ ...@@ -284,12 +284,12 @@
<div class="ui-block-b">\n <div class="ui-block-b">\n
</div>\n </div>\n
<div class="ui-block-c">\n <div class="ui-block-c">\n
<h2><i class="fa fa-bar-chart"></i> <strong>Instance Status Ratio</strong></h2>\n <h2><i class="fa fa-bar-chart"></i> <strong>Instance Promises Status</strong></h2>\n
<div style="max-width: 250px; heigth: 150px;">\n <div style="max-width: 300px; heigth: 150px;">\n
<div data-gadget-url="gadget_monitoring_chart.html" data-gadget-scope="chart0"></div>\n <div data-gadget-url="gadget_monitoring_chart.html" data-gadget-scope="chart0"></div>\n
</div>\n </div>\n
<br/><br/>\n <br/><br/>\n
<h2><i class="fa fa-line-chart"></i> <strong>Success and Failures Statistics</strong></h2>\n <h2><i class="fa fa-line-chart"></i> <strong>Instance Promises Status History</strong></h2>\n
<div data-gadget-url="gadget_monitoring_chart.html" data-gadget-scope="chart1"></div>\n <div data-gadget-url="gadget_monitoring_chart.html" data-gadget-scope="chart1"></div>\n
</div>\n </div>\n
</div>\n </div>\n
...@@ -438,7 +438,7 @@ ...@@ -438,7 +438,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.5259.56104.14233</string> </value> <value> <string>949.26772.37443.60825</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -456,7 +456,7 @@ ...@@ -456,7 +456,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1455209074.82</float> <float>1456500574.55</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
var back_url = \'#page=main&t=\' + (Date.now() / 1000 | 0);\n var back_url = \'#page=main&t=\' + (Date.now() / 1000 | 0);\n
return RSVP.all([\n return RSVP.all([\n
gadget.updateHeader({\n gadget.updateHeader({\n
title: options.jio_key,\n title: \'Promise \' + options.jio_key,\n
//back_url: back_url,\n //back_url: back_url,\n
//panel_action: false,\n //panel_action: false,\n
refresh_url: refresh_url\n refresh_url: refresh_url\n
...@@ -191,6 +191,9 @@ ...@@ -191,6 +191,9 @@
]);\n ]);\n
})\n })\n
.push(function () {\n .push(function () {\n
if (!options.jio_key.endsWith(\'.status\')) {\n
options.jio_key += \'.status\';\n
}\n
if (options.jio_for !== undefined && options.jio_for !== \'\') {\n if (options.jio_for !== undefined && options.jio_for !== \'\') {\n
// Load from defined url\n // Load from defined url\n
var jio_options = {\n var jio_options = {\n
...@@ -235,7 +238,7 @@ ...@@ -235,7 +238,7 @@
element: element\n element: element\n
});\n });\n
gadget.property_dict.element.querySelector(".ui-promise-content .ui-promise-title h2")\n gadget.property_dict.element.querySelector(".ui-promise-content .ui-promise-title h2")\n
.innerHTML += element.title;\n .innerHTML += \'Promise \' + element.title;\n
gadget.property_dict.element.querySelector("#promise-overview .ui-block-a")\n gadget.property_dict.element.querySelector("#promise-overview .ui-block-a")\n
.innerHTML += content;\n .innerHTML += content;\n
if (element.hasOwnProperty(\'_links\') && element._links.hasOwnProperty(\'monitor\') && element._links.monitor.href) {\n if (element.hasOwnProperty(\'_links\') && element._links.hasOwnProperty(\'monitor\') && element._links.monitor.href) {\n
...@@ -466,7 +469,8 @@ ...@@ -466,7 +469,8 @@
type: \'bar\',\n type: \'bar\',\n
config: {\n config: {\n
bezierCurve: false,\n bezierCurve: false,\n
responsive: true\n responsive: true,\n
barDatasetSpacing: 20\n
},\n },\n
data: data\n data: data\n
});\n });\n
...@@ -618,7 +622,7 @@ ...@@ -618,7 +622,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.5265.63409.53947</string> </value> <value> <string>949.56728.21843.28501</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -636,7 +640,7 @@ ...@@ -636,7 +640,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1455209893.65</float> <float>1458124466.18</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
</div>\n </div>\n
<ul class="ui-grid-column ui-grid-column-5 graph_cpu">\n <ul class="ui-grid-column ui-grid-column-5 graph_cpu">\n
<li class="ui-grid-span-4 custom-grid-wrap graph-cell">\n <li class="ui-grid-span-4 custom-grid-wrap graph-cell">\n
<div data-gadget-url="gadget_erp5_graph.html" data-gadget-scope="graph_cpu" class="graph graph-medium"></div>\n <div data-gadget-url="gadget_erp5_graph.html" data-gadget-scope="graph_cpu" class="graph graph-h-medium"></div>\n
</li>\n </li>\n
<li class="ui-grid-span-1 custom-grid-wrap graph-cell">\n <li class="ui-grid-span-1 custom-grid-wrap graph-cell">\n
\n \n
...@@ -163,21 +163,21 @@ ...@@ -163,21 +163,21 @@
</ul>\n </ul>\n
<div class="ui-grid-a ui-responsive">\n <div class="ui-grid-a ui-responsive">\n
<div class="ui-block-a">\n <div class="ui-block-a">\n
<div data-gadget-url="gadget_erp5_graph.html" data-gadget-scope="graph_memory_used" class="graph graph-medium"></div>\n <div data-gadget-url="gadget_erp5_graph.html" data-gadget-scope="graph_memory_used" class="graph graph-h-medium"></div>\n
</div>\n </div>\n
<div class="ui-block-b">\n <div class="ui-block-b">\n
<div data-gadget-url="gadget_erp5_graph.html" data-gadget-scope="graph_memory_percent" class="graph graph-medium"></div>\n <div data-gadget-url="gadget_erp5_graph.html" data-gadget-scope="graph_memory_percent" class="graph graph-h-medium"></div>\n
</div>\n </div>\n
</div>\n </div>\n
<div class="ui-grid-b ui-responsive">\n <div class="ui-grid-b ui-responsive">\n
<div class="ui-block-a">\n <div class="ui-block-a">\n
<div data-gadget-url="gadget_erp5_graph.html" data-gadget-scope="graph_disk_used" class="graph graph-medium"></div>\n <div data-gadget-url="gadget_erp5_graph.html" data-gadget-scope="graph_disk_used" class="graph graph-h-medium"></div>\n
</div>\n </div>\n
<div class="ui-block-b">\n <div class="ui-block-b">\n
<div data-gadget-url="gadget_erp5_graph.html" data-gadget-scope="graph_io_rw" class="graph graph-medium"></div>\n <div data-gadget-url="gadget_erp5_graph.html" data-gadget-scope="graph_io_rw" class="graph graph-h-medium"></div>\n
</div>\n </div>\n
<div class="ui-block-c">\n <div class="ui-block-c">\n
<div data-gadget-url="gadget_erp5_graph.html" data-gadget-scope="graph_io_counter" class="graph graph-medium"></div>\n <div data-gadget-url="gadget_erp5_graph.html" data-gadget-scope="graph_io_counter" class="graph graph-h-medium"></div>\n
</div>\n </div>\n
</div>\n </div>\n
<div class=\'graph-footer\'>\n <div class=\'graph-footer\'>\n
...@@ -325,7 +325,7 @@ ...@@ -325,7 +325,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>948.58979.7424.11673</string> </value> <value> <string>949.6675.61849.23210</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -343,7 +343,7 @@ ...@@ -343,7 +343,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1455181931.75</float> <float>1458306392.07</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -120,48 +120,168 @@ ...@@ -120,48 +120,168 @@
<!-- renderjs -->\n <!-- renderjs -->\n
<script src="rsvp.js" type="text/javascript"></script>\n <script src="rsvp.js" type="text/javascript"></script>\n
<script src="renderjs.js" type="text/javascript"></script>\n <script src="renderjs.js" type="text/javascript"></script>\n
\n
<script id="template-opmlurl-list" type="text/x-handlebars-template">\n
{{#each opml_list}}\n
<tr>\n
<td class="column-check ui-text-center padding-10">\n
<input type="checkbox" name="opmlurl" value="{{key}}">\n
</td>\n
<td>\n
<a class="ui-link" href="{{href}}">{{link}}</a>\n
</td>\n
<td>\n
<a class="ui-link" href="{{href}}">{{title}}</a>\n
</td>\n
</tr>\n
{{/each}}\n
</script>\n
\n \n
<script src="gadget_monitoring_static.js" type="text/javascript"></script>\n <script src="gadget_monitoring_static.js" type="text/javascript"></script>\n
</head>\n </head>\n
<body>\n <body>\n
<article class="ui-content ui-body-c">\n <div data-gadget-url="gadget_monitoring_jio.html" data-gadget-scope="jio_gadget" data-gadget-sandbox="public"></div>\n
<section class="ui-content-header-plain">\n <div data-gadget-url="gadget_monitoring_login_widget.html" data-gadget-scope="login_gadget" data-gadget-sandbox="public"></div>\n
<h3 class="ui-content-title ui-body-c">\n <div data-role="tabs" class="config-tabs">\n
<span class="ui-icon ui-icon-custom ui-icon-database">&nbsp;</span>\n <div data-role="navbar">\n
Monitor connection parameters\n <ul>\n
</h3>\n <li><a href="#config-add" data-ajax="false">Add Monitor Instance</a></li>\n
</section>\n <li><a href="#config-manage" data-ajax="false">Manage Instances</a></li>\n
<section class="ui-body-c ui-content-section">\n </ul>\n
<form class="dav-configuration-form">\n </div>\n
\n <div id="config-add" class="ui-body-c ui-content">\n
<div class="ui-form">\n <article class="ui-content ui-body-c">\n
<div class="ui-field-contain">\n <section class="ui-content-header-plain">\n
<label data-i18n="Connection URL:">Connection URL:</label>\n <h3 class="ui-content-title ui-body-c">\n
<input type="url" name="dav_url" required value=""/>\n <span class="ui-icon ui-icon-custom ui-icon-database">&nbsp;</span>\n
</div>\n Monitor connection parameters\n
<!--\n </h3>\n
<div class="ui-field-contain">\n </section>\n
<label data-i18n="Username:">Username:</label>\n <section class="ui-body-c ui-content-sections">\n
<input type="hidde" name="dav_username" value=""/>\n <form class="opml">\n
<div class="ui-form">\n
<div class="ui-field-contain">\n
<label data-i18n="OPML URL:">OPML URL:</label>\n
<input type="url" name="url" required value=""/>\n
</div>\n
</div>\n
<div class="ui-text-center">\n
<span class="ui-text-error"></span>\n
</div>\n
<div class="select-storage ui-controlgroup ui-controlgroup-horizontal">\n
<div class="ui-grid-b ui-responsive">\n
<div class="ui-block-a"></div>\n
<div class="ui-block-b">\n
<button data-i18n="Load URL" class="ui-btn-btn-right show">Load URL</button>\n
</div>\n
<div class="ui-block-c">\n
</div>\n
</div>\n
</div>\n
</form>\n
</section>\n
</article>\n
<article class="ui-content ui-body-c configure-b ui-content-hidden">\n
<div data-gadget-url="gadget_monitoring_widget_listbox.html" data-gadget-scope="listbox"></div>\n
<form class="configure">\n
<label class="configure-auth">\n
<input type="checkbox" name="configure-auth">Set Authentication for these URLs\n
</label>\n
<div class="auth-block padding-lr-20 border-gray" style="display: none">\n
<div class="ui-form">\n
<div class="ui-field-contain">\n
<label data-i18n="Username:">Username:</label>\n
<input type="text" name="username" required value="-"/>\n
</div>\n
</div>\n
<div class="ui-form">\n
<div class="ui-field-contain">\n
<label data-i18n="Password:">Password:</label>\n
<input type="password" name="password" required value="-"/>\n
</div>\n
</div>\n
<label class="configure-auth">\n
<input type="checkbox" name="configure-newpwd">Configure new password now\n
</label>\n
<div class="new-password" style="display: none">\n
<div class="ui-form">\n
<div class="ui-field-contain">\n
<label data-i18n="New Password:">New Password:</label>\n
<input type="password" name="new_password" required value="-"/>\n
</div>\n
</div>\n
<div class="ui-form">\n
<div class="ui-field-contain">\n
<label data-i18n="Confirm New Password:">Confirm New Password:</label>\n
<input type="password" name="new_password_confirm" required value="-"/>\n
</div>\n
</div>\n
</div>\n
</div>\n </div>\n
<div class="ui-field-contain">\n <div class="padding-5">\n
<label data-i18n="Password:">Password:</label>\n <span class="ui-text-error"></span>\n
<input type="password" name="dav_password" value=""/>\n
</div>\n </div>\n
</div>\n
-->\n
<div class="select-storage ui-controlgroup ui-controlgroup-horizontal">\n
<div class="ui-grid-b ui-responsive">\n <div class="ui-grid-b ui-responsive">\n
<div class="ui-block-a"></div>\n <div class="ui-block-a"></div>\n
<div class="ui-block-b"></div>\n <div class="ui-block-b">\n
<div class="ui-content-hidden ui-text-right padding-10 spinner">\n
<i class="fa fa-spinner fa-2x fa-spin"></i>\n
</div>\n
</div>\n
<div class="ui-block-c">\n <div class="ui-block-c">\n
<button type="submit" data-i18n="Connect" class="ui-btn-btn-right">Connect</button>\n <button type="submit" data-i18n="Configure" class="ui-btn-btn-right">Configure</button>\n
</div>\n </div>\n
</div>\n </div>\n
</form>\n
</article>\n
</div>\n
<div id="config-manage">\n
<div class="ui-grid-a ui-responsive custom-listbox">\n
<div class="ui-block-a">\n
<div class="ui-panel-overview" style="min-height: 450px;">\n
<div class="overview-header">\n
<div class=\'content-title ui-instance-title\'>\n
<div class="overview-title">\n
<i class="fa fa-link"></i><span>Monitoring OPML URL</span>\n
</div>\n
<div class="commands">\n
</div>\n
</div>\n
</div>\n
<div class="overview-content">\n
\n
<div class="ui-listview-container">\n
<table class="ui-responsive ui-body-c ui-table-inset opml-tablelinks">\n
<thead class="ui-bar-inherit">\n
<tr>\n
<th class="padding-10"><input type="checkbox" name="opml-all" value="all"></th>\n
<th>OPML URL</th>\n
<th>Title</th>\n
</tr>\n
</thead>\n
<tbody>\n
\n
</tbody>\n
<tfoot class="ui-bar-inherit"></tfoot>\n
</table>\n
</div>\n
<div class="padding-10 msgtext-box"></div>\n
<div class="">\n
<a href="#" class="ui-btn ui-corner-all ui-btn-inline opml-delete"><i class="fa fa-trash"></i> Delete Selection</a>\n
<a href="#" class="ui-btn ui-corner-all ui-btn-inline opml-test"><i class="fa fa-check-square-o"></i> Availability Test</a>\n
<span class="ui-content-hidden padding-10 loadspinner">\n
<i class="fa fa-spinner fa-2x fa-spin"></i>\n
</span>\n
</div>\n
</div>\n
</div>\n
</div>\n
<div class="ui-block-b">\n
\n
</div>\n </div>\n
</form>\n </div>\n
</section>\n </div>\n
</article>\n </div>\n
</body>\n </body>\n
</html> </html>
...@@ -300,7 +420,7 @@ ...@@ -300,7 +420,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.6589.26814.39133</string> </value> <value> <string>949.65333.22535.21930</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -318,7 +438,7 @@ ...@@ -318,7 +438,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1455288976.81</float> <float>1458641047.48</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -140,9 +140,6 @@ ...@@ -140,9 +140,6 @@
})\n })\n
.declareMethod(\'render\', function (options) {\n .declareMethod(\'render\', function (options) {\n
var gadget = this,\n var gadget = this,\n
jio_gadget,\n
listbox,\n
monitor_id = \'monitor.hal\',\n
header = {\n header = {\n
"title": \'Monitoring Promise Status\'\n "title": \'Monitoring Promise Status\'\n
},\n },\n
...@@ -150,46 +147,39 @@ ...@@ -150,46 +147,39 @@
search_page: \'status_list\',\n search_page: \'status_list\',\n
search: options.search,\n search: options.search,\n
filter: options.filter || \'\',\n filter: options.filter || \'\',\n
column_link: {select: \'source\'},\n
column_id: {select: \'title\'},\n
column_list: [{\n column_list: [{\n
title: \'Title\',\n title: \'Title\',\n
select: \'title\'\n select: \'title\'\n
}, {\n }, {\n
title: \'Instance\',\n title: \'Instance\',\n
select: \'instance\'\n select: \'siteTitle\'\n
}, {\n }, {\n
title: \'Hosting Subscription\',\n title: \'Hosting Subscription\',\n
select: \'hosting_subscription\'\n select: \'reference\'\n
}, {\n }, {\n
select: \'start-date\',\n select: \'date\',\n
title: \'Date\'\n title: \'Date\'\n
}, {\n }, {\n
select: \'message\',\n select: \'message\',\n
title: \'Output\',\n title: \'Output\',\n
css_class: \'text-overview\'\n css_class: \'text-overview\'\n
}, {\n }, {\n
select: \'status\',\n select: \'category\',\n
title: \'Status\',\n title: \'Status\',\n
template: \' <span> <i class="ui-status-icon ui-status-{{value}}"></i></span>\',\n template: \' <span> <i class="ui-status-icon ui-status-{{value}}"></i></span>\',\n
css_class: \'ui-text-center\'\n css_class: \'ui-text-center\'\n
}],\n }],\n
\'sort_column_list\': [\n sort_column_list: [\n
{select: \'status\', title: \'Status\'},\n {select: \'category\', title: \'Status\'},\n
{select: \'title\', title: \'Title\'}\n {select: \'title\', title: \'Title\'}\n
],\n ],\n
query: {\n query: {\n
select_list: [\'title\', \'instance\', \'hosting_subscription\', \'status\',\n select_list: [\'title\', \'siteTitle\', \'reference\', \'category\',\n
\'start-date\', \'message\'],\n \'date\', \'message\', \'link\', \'source\'],\n
query: \'_id:(NOT "monitor.hal") AND _id:(NOT "monitor.global")\',\n //query: \'_id:(NOT "monitor.hal") AND _id:(NOT "monitor.global")\',\n
sort_on: [["status", "ascending"]]\n sort_on: [["category", "ascending"]]\n
}\n
},\n
jio_options = {\n
type: "query",\n
sub_storage: {\n
type: "drivetojiomapping",\n
sub_storage: {\n
type: "dav"\n
}\n
}\n }\n
};\n };\n
\n \n
...@@ -200,60 +190,30 @@ ...@@ -200,60 +190,30 @@
}\n }\n
return gadget.updateHeader(header)\n return gadget.updateHeader(header)\n
.push(function () {\n .push(function () {\n
return gadget.jio_get(monitor_id);\n if (options.opml_url) {\n
return gadget.property_dict.jio_gadget.getUrlListFromOPML(options.opml_url);\n
}\n
else {\n
return gadget.property_dict.jio_gadget.getUrlListFromFullOPML();\n
}\n
})\n })\n
.push(function (collection_dict) {\n .push(function (url_list) {\n
var url_promise_list = [],\n var listbox_storage_list = [],\n
listbox_storage_list = [],\n
related_monitor_url,\n
i;\n i;\n
\n for (i = 0; i < url_list.length; i++) {\n
related_monitor_url = function (storage_url) {\n if (url_list[i]) {\n
var jio_config = $.extend(true, {}, jio_options);\n listbox_storage_list.push({\n
jio_config.sub_storage.sub_storage.url = storage_url;\n type: "query",\n
gadget.property_dict.jio_gadget.createJio(jio_config);\n sub_storage: {\n
return gadget.property_dict.jio_gadget.get(monitor_id)\n type: "feed",\n
.push(function (collection_dict) {\n feed_type: \'rss\',\n
// XX Using public URL here!!\n url: url_list[i]\n
var public_storage_url = collection_dict._links.jio_public.href;\n
\n
if (public_storage_url !== undefined && public_storage_url !== \'\') {\n
listbox_storage_list.push({type: \'dav\', url: public_storage_url});\n
}\n }\n
return public_storage_url;\n
});\n });\n
};\n
\n
listbox_storage_list.push({\n
url: collection_dict._links.jio_public.href,\n
type: \'dav\'\n
});\n
/*listbox_options.header = {\n
title: collection_dict.title,\n
public_url: collection_dict._links.public.href || \'\',\n
private_url: collection_dict._links.private.href || \'\',\n
rss_url: collection_dict._links.rss.href || \'\'\n
};*/\n
\n
if (collection_dict._links.related_monitor !== undefined &&\n
collection_dict._links.related_monitor !== []) {\n
for (i = 0; i< collection_dict._links.related_monitor.length; i += 1) {\n
if (collection_dict._links.related_monitor[i].href !== undefined) {\n
url_promise_list.push(\n
related_monitor_url(collection_dict._links.related_monitor[i].href)\n
);\n
}\n
}\n }\n
}\n }\n
return new RSVP.Queue()\n listbox_configuration.storage_list = listbox_storage_list;\n
.push(function () {\n return gadget.property_dict.listbox.render(listbox_configuration);\n
return RSVP.all(url_promise_list);\n
})\n
.push(function () {\n
listbox_configuration.storage_list = listbox_storage_list;\n
return gadget.property_dict.listbox.render(listbox_configuration);\n
});\n
\n
});\n });\n
})\n })\n
.declareAcquiredMethod("getSetting", "getSetting")\n .declareAcquiredMethod("getSetting", "getSetting")\n
...@@ -399,7 +359,7 @@ ...@@ -399,7 +359,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.953.1113.62702</string> </value> <value> <string>949.58584.63587.19677</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -417,7 +377,7 @@ ...@@ -417,7 +377,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1454950900.5</float> <float>1458314108.86</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -180,7 +180,12 @@ ...@@ -180,7 +180,12 @@
<div class="overview-header">\n <div class="overview-header">\n
<div class=\'content-title ui-instance-title\'>\n <div class=\'content-title ui-instance-title\'>\n
<div class="overview-title">\n <div class="overview-title">\n
<i class="fa fa-cubes"></i><span>{{title}}</span>\n <i class="fa fa-cubes"></i><span>\n
{{title}}\n
{{#if root_title}}\n
&nbsp; [{{root_title}}]\n
{{/if}}\n
</span>\n
</div>\n </div>\n
<div class="commands">\n <div class="commands">\n
\n \n
...@@ -190,25 +195,31 @@ ...@@ -190,25 +195,31 @@
<div class="content-details">\n <div class="content-details">\n
<div class="ui-text-left" style="padding-bottom: 15px;">\n <div class="ui-text-left" style="padding-bottom: 15px;">\n
<h2><i class="fa fa-info-circle"></i> <strong>Instance Current State</strong></h2>\n <h2><i class="fa fa-info-circle"></i> <strong>Instance Current State</strong></h2>\n
<div class="padding-lr-10">\n <div class="padding-10">\n
<div class="ui-field-contain">\n <div class="ui-grid-a ui-responsive">\n
<fieldset data-role="controlgroup" data-type="horizontal">\n <div class="ui-block-a">\n
{{#if resource_url }}\n <fieldset data-role="controlgroup" data-type="horizontal">\n
<a href="{{resource_url}}" class="ui-btn ui-corner-all ui-btn-inline ui-mini"><i class="fa fa-pie-chart"></i> Resources</a>\n {{#if resource_url }}\n
{{/if}}\n <a href="{{resource_url}}" class="ui-btn ui-corner-all ui-btn-inline ui-mini"><i class="fa fa-pie-chart"></i> Resources</a>\n
{{#if process_url }}\n {{/if}}\n
<a href="{{process_url}}" class="ui-btn ui-corner-all ui-btn-inline ui-mini"><i class="fa fa-list-alt"></i> Processes</a>\n {{#if process_url }}\n
{{/if}}\n <a href="{{process_url}}" class="ui-btn ui-corner-all ui-btn-inline ui-mini"><i class="fa fa-list-alt"></i> Processes</a>\n
{{#if public_url}}\n {{/if}}\n
<!--<a class="ui-btn ui-corner-all ui-btn-inline ui-mini" target=\'_blank\' href="{{public_url}}" title="Public"><i class="fa fa-folder-open-o"></i> Public</a>-->\n </fieldset>\n
{{/if}}\n </div>\n
{{#if private_url}}\n <div class="ui-block-b">\n
<a class="ui-btn ui-corner-all ui-btn-inline ui-mini" target=\'_blank\' href="{{private_url}}" title="Private"><i class="fa fa-lock"></i> Private</a>\n <fieldset data-role="controlgroup" data-type="horizontal">\n
{{/if}}\n {{#if public_url}}\n
{{#if rss_url}}\n <!--<a class="ui-btn ui-corner-all ui-btn-inline ui-mini" target=\'_blank\' href="{{public_url}}" title="Public"><i class="fa fa-folder-open-o"></i> Public</a>-->\n
<a class="ui-btn ui-corner-all ui-btn-inline ui-mini" target=\'_blank\' href="{{rss_url}}" title="RSS"><i class="fa fa-rss-square"></i> RSS</a>\n {{/if}}\n
{{/if}}\n {{#if private_url}}\n
</fieldset>\n <a class="ui-btn ui-corner-all ui-btn-inline ui-mini" target=\'_blank\' href="{{private_url}}" title="Private"><i class="fa fa-lock"></i> Private</a>\n
{{/if}}\n
{{#if rss_url}}\n
<a class="ui-btn ui-corner-all ui-btn-inline ui-mini" target=\'_blank\' href="{{rss_url}}" title="RSS"><i class="fa fa-rss-square"></i> RSS</a>\n
{{/if}}\n
</fieldset>\n
</div>\n
</div>\n </div>\n
<table data-role="table" data-mode="columntoggle" class="ui-responsive table-stroke">\n <table data-role="table" data-mode="columntoggle" class="ui-responsive table-stroke">\n
<tr>\n <tr>\n
...@@ -241,7 +252,7 @@ ...@@ -241,7 +252,7 @@
<div style="overflow: auto;" class="padding-lr-10">\n <div style="overflow: auto;" class="padding-lr-10">\n
<table data-role="table" data-mode="columntoggle" class="table-stroke">\n <table data-role="table" data-mode="columntoggle" class="table-stroke">\n
{{#each promise_list}}\n {{#each promise_list}}\n
<tr title="{{message}}">\n <tr>\n
<td><a href="{{href}}">{{title}}</a></td>\n <td><a href="{{href}}">{{title}}</a></td>\n
<td style="text-align: center;">{{time}}</td>\n <td style="text-align: center;">{{time}}</td>\n
<td style="text-align: center;"><span class="label label-{{status}}">{{status}}</span></td>\n <td style="text-align: center;"><span class="label label-{{status}}">{{status}}</span></td>\n
...@@ -446,7 +457,7 @@ ...@@ -446,7 +457,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.6292.13164.54971</string> </value> <value> <string>949.64074.33189.21691</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -464,7 +475,7 @@ ...@@ -464,7 +475,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1455272629.34</float> <float>1458566491.46</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
web_page_module/gadget_monitoring_* web_page_module/gadget_monitoring_*
web_site_module/monitoring_render_js web_site_module/monitoring_render_js
web_page_module/jio_dev_rssfeed_storage_js
web_site_module/monitoring_render_js/** web_site_module/monitoring_render_js/**
web_page_module/gadget_erp5_graph_* web_page_module/gadget_erp5_graph_*
web_page_module/chart_min_js web_page_module/Chart.min.js
web_page_module/jquery.magnific-popup.min.js web_page_module/jquery.magnific-popup.min.js
web_page_module/magnific-popup.css web_page_module/magnific-popup.css
\ No newline at end of file
web_page_module/gadget_monitoring_* web_page_module/gadget_monitoring_*
web_site_module/monitoring_render_js web_site_module/monitoring_render_js
web_page_module/jio_dev_rssfeed_storage_js
web_site_module/monitoring_render_js/** web_site_module/monitoring_render_js/**
web_page_module/gadget_erp5_graph_* web_page_module/gadget_erp5_graph_*
web_page_module/chart_min_js web_page_module/Chart.min.js
web_page_module/jquery.magnific-popup.min.js web_page_module/jquery.magnific-popup.min.js
web_page_module/magnific-popup.css web_page_module/magnific-popup.css
\ No newline at end of file
web_page_module/chart_min_js web_page_module/chart_min_js
web_page_module/gadget_erp5_graph_* web_page_module/gadget_erp5_graph_*
web_page_module/gadget_monitoring_* web_page_module/gadget_monitoring_*
web_page_module/jio_dev_rssfeed_storage_js
web_page_module/jquery.magnific-popup.min.js web_page_module/jquery.magnific-popup.min.js
web_page_module/magnific-popup.css web_page_module/magnific-popup.css
web_site_module/monitoring_render_js web_site_module/monitoring_render_js
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment