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 @@
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</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>
</pickle>
</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>
......@@ -10,8 +10,11 @@
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
......@@ -21,10 +24,8 @@
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -41,10 +42,7 @@
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -52,8 +50,11 @@
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
......@@ -106,7 +107,7 @@
<value> <string encoding="cdata"><![CDATA[
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
# images/ajax-loader.gif\n
CACHE:\n
......@@ -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.svg?v=4.2.0#fontawesomeregular\n
URI.js\n
Chart.min.js\n
dygraph.js\n
gadget_erp5.css\n
gadget_global.js\n
......@@ -128,48 +130,61 @@ handlebars.js\n
i18next.js\n
jiodev.js\n
jquery.js\n
jquery.magnific-popup.min.js\n
jquerymobile.css\n
jquerymobile.js\n
jio_dev_rssfeed_storage.js\n
magnific-popup.css\n
renderjs.js\n
rsvp.js\n
gadget_officejs_header.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_officejs_page_sync.html\n
gadget_monitoring_application_panel.html\n
gadget_translation.html\n
gadget_officejs_webrtc_jio.html\n
gadget_officejs_widget_listbox.html\n
gadget_officejs_header.js\n
gadget_officejs_jio.js\n
gadget_officejs_jio_web_page_view.js\n
gadget_officejs_page_add_text_document.js\n
gadget_officejs_page_jio_configurator.js\n
gadget_officejs_page_jio_dav_configurator.js\n
gadget_officejs_page_login.js\n
gadget_officejs_page_logout.js\n
gadget_officejs_page_share_webrtc_jio.js\n
gadget_officejs_page_sync.js\n
gadget_officejs_page_text_editor_list.js\n
gadget_officejs_router.js\n
gadget_officejs_text_editor_application.js\n
gadget_officejs_text_editor_application_panel.js\n
gadget_monitoring_chart.html\n
gadget_monitoring_document_edit.html\n
gadget_monitoring_header.html\n
gadget_monitoring_hosting_overview.html\n
gadget_monitoring_jio.html\n
gadget_monitoring_login.html\n
gadget_monitoring_login_widget.html\n
gadget_monitoring_main.html\n
gadget_monitoring_overview.html\n
gadget_monitoring_process_view.html\n
gadget_monitoring_promise_interface.html\n
gadget_monitoring_resource_view.html\n
gadget_monitoring_router.html\n
gadget_monitoring_settings_configurator.html\n
gadget_monitoring_status_grid.html\n
gadget_monitoring_status_list.html\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_data.js\n
gadget_officejs_webrtc_jio.js\n
gadget_officejs_widget_listbox.js\n
erp5_launcher.js\n
erp5_launcher.html\n
rjsunsafe/gadget_ckeditor.js\n
rjsunsafe/gadget_ckeditor.html\n
NETWORK:\n
*
......@@ -237,9 +252,7 @@ NETWORK:\n
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
<value> <string>publish</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
......@@ -265,7 +278,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1455289075.54</float>
<float>1458647957.13</float>
<string>UTC</string>
</tuple>
</state>
......@@ -274,7 +287,7 @@ NETWORK:\n
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>draft</string> </value>
<value> <string>published</string> </value>
</item>
</dictionary>
</list>
......@@ -310,7 +323,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.6596.54736.51558</string> </value>
<value> <string>950.4056.16865.34099</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -328,7 +341,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1455289277.29</float>
<float>1458896288.17</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -117,6 +117,7 @@
\n
<link rel="stylesheet" href="magnific-popup.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
<script src="rsvp.js" type="text/javascript"></script>\n
<script src="renderjs.js" type="text/javascript"></script>\n
......@@ -150,15 +151,16 @@
<script id="panel-template-body" type="text/x-handlebars-template">\n
<div class="ui-content">\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=overview" data-i18n="Instances Overview">Instances Overview</a></li>\n
<li><a href="#page=settings_configurator" data-i18n="Monitoring Configuration">Monitoring Configuration</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"><i class="fa fa-cube"></i><span data-i18n="Instances Overview">Instances Overview</span></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
</div>\n
</script>\n
\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
</head>\n
<body>\n
......@@ -301,7 +303,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.3550.20058.13789</string> </value>
<value> <string>949.63903.8246.8413</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -319,7 +321,7 @@
</tuple>
<state>
<tuple>
<float>1455194311.05</float>
<float>1458554861.74</float>
<string>UTC</string>
</tuple>
</state>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>classification/collaborative/team</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_monitoring_application_panel.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>gadget_monitoring_application_panel_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*jslint nomen: true, indent: 2, maxerr: 3 */\n
/*global window, rJS, Handlebars, jQuery, RSVP, loopEventListener */\n
(function (window, rJS, Handlebars, $, RSVP, loopEventListener) {\n
"use strict";\n
\n
var gadget_klass = rJS(window),\n
source_header = gadget_klass.__template_element\n
.getElementById("panel-template-header")\n
.innerHTML,\n
panel_template_header = Handlebars.compile(source_header),\n
source_body = gadget_klass.__template_element\n
.getElementById("panel-template-body")\n
.innerHTML,\n
panel_template_body = Handlebars.compile(source_body);\n
\n
gadget_klass\n
\n
.declareAcquiredMethod("translateHtml", "translateHtml")\n
\n
// Assign the element to a variable\n
// Init local properties\n
.ready(function (g) {\n
g.props = {};\n
})\n
\n
\n
.ready(function (g) {\n
return g.getElement()\n
.push(function (element) {\n
g.props.element = element;\n
g.props.jelement = $(element.querySelector("div"));\n
});\n
})\n
\n
.ready(function (g) {\n
g.props.jelement.panel({\n
display: "overlay",\n
position: "left",\n
theme: "b"\n
// animate: false\n
});\n
})\n
\n
\n
.ready(function (g) {\n
return g.translateHtml(panel_template_header() + panel_template_body())\n
.push(function (my_translated_or_plain_html) {\n
g.props.jelement.html(my_translated_or_plain_html);\n
g.props.jelement.trigger("create");\n
});\n
})\n
\n
.declareMethod(\'toggle\', function () {\n
this.props.jelement.panel("toggle");\n
})\n
\n
.declareMethod(\'close\', function () {\n
this.props.jelement.panel("close");\n
})\n
\n
.declareMethod(\'render\', function () {\n
return;\n
})\n
\n
/////////////////////////////////////////////////////////////////\n
// declared services\n
/////////////////////////////////////////////////////////////////\n
.declareService(function () {\n
var panel_gadget,\n
form_list,\n
event_list,\n
i,\n
len;\n
\n
\n
function formSubmit() {\n
panel_gadget.toggle();\n
}\n
\n
panel_gadget = this;\n
form_list = panel_gadget.props.element.querySelectorAll(\'form\');\n
event_list = [];\n
\n
// XXX: not robust - Will break when search field is active\n
for (i = 0, len = form_list.length; i < len; i += 1) {\n
event_list[i] = loopEventListener(\n
form_list[i],\n
\'submit\',\n
false,\n
formSubmit\n
);\n
}\n
\n
return new RSVP.Queue()\n
.push(function () {\n
return RSVP.all(event_list);\n
});\n
});\n
\n
\n
}(window, rJS, Handlebars, jQuery, RSVP, loopEventListener));
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Monitoring Application Panel Gadget JS</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</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>
</pickle>
</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>1457543185.33</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>949.47045.16188.28006</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>1457543391.78</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>1457543137.74</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
......@@ -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
background: #FBFBFB; \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
list-style: none outside none;\n
margin-left: 0;\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
box-sizing: border-box;\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
}\n
.ui-grid-container .ui-grid-b .ui-block-a, .ui-grid-container .ui-grid-b .ui-block-b {\n
padding: 10px 15px;\n
}\n
}*/\n
/*\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
width: 100%;\n
}*/\n
\n
.margin-0 {margin: 0}\n
.padding-5 {padding: 5px;}\n
.padding-10 {padding: 10px;}\n
.padding-15 {padding: 15px;}\n
.padding-20 {padding: 20px;}\n
.padding-tb-5 {padding: 10px 0;}\n
.padding-tb-10 {padding: 10px 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-20 {padding: 0 20px;}\n
.padding-lrb-20 {padding: 0 20px 20px;}\n
.border-gray { border: 1px solid #C3C3C3; border-radius: 3px;}\n
.ui-text{\n
padding: 0 10px;\n
}\n
......@@ -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
color: #DC4343;\n
}\n
.ui-text-INFO, .ui-text-info {\n
color: #DC4343;\n
}\n
.ui-text-OK, .ui-text-ok {\n
color: green;\n
}\n
\n
.ui-text-desabled {\n
color: rgba(128, 128, 128, 0.66);\n
}\n
\n
.text-overview {\n
max-width: 200px;\n
white-space: nowrap;\n
......@@ -239,7 +277,6 @@ html.ui-mobile .ui-grid-container.ui-responsive > ul > li, html.ui-mobile .ui-gr
font-weight: normal;\n
padding: 5px;\n
white-space: nowrap;\n
text-align: center;\n
}\n
\n
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
padding: 5px;\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
cursor: pointer;\n
}\n
.promise-list {\n
padding: 10px 20px;\n
padding: 10px;\n
}\n
\n
table tr.line-edit {\n
cursor: pointer;\n
}\n
\n
.header-form-overview {\n
......@@ -274,6 +322,14 @@ html .promise-list table tr {\n
margin-top: 0.1em;\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
font-weight: bold;\n
font-size: 105%;\n
......@@ -346,6 +402,13 @@ html head + body .ui-panel-overview > h2 {\n
vertical-align: baseline;\n
border-radius: .25em;\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
.ui-content-hidden {\n
display: none;\n
......@@ -360,6 +423,12 @@ html head + body .ui-panel-overview > h2 {\n
.ui-panel-overview .ui-listview-container {\n
padding: 0;\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
background-color: #fff;\n
border-color: #ddd;\n
......@@ -426,6 +495,11 @@ ul li .ui-collapse-content fieldset > div, ul li .ui-collapse-content fieldset >
content: "\\f009";\n
}\n
\n
.column-check {\n
width: 54px;\n
padding-top: 5px;\n
}\n
\n
.listbox-filter-panel, .overview-filter-panel {\n
padding: 1em;\n
padding-top: .1em;\n
......@@ -454,6 +528,9 @@ html .custom-grid-wrap table thead tr th {\n
list-style: none;\n
font-size: 12px;\n
}\n
.legend ul li {\n
list-style: none;\n
}\n
.legend:before {\n
display: block;\n
content: "";\n
......@@ -479,10 +556,20 @@ html .custom-grid-wrap table thead tr th {\n
.graph-label {\n
font-size: 75%;\n
}\n
.dygraph-xlabel {\n
font-size: 110%;\n
color: #344558;\n
padding: 8px 0;\n
}\n
.graph-medium {\n
height: 200px;\n
width: 100%;\n
}\n
.graph-h-medium {\n
height: 230px;\n
width: 100%;\n
margin: 30px 0;\n
}\n
.ui-grid-column .graph-state-labels {\n
margin: 10px;\n
}\n
......@@ -611,6 +698,7 @@ html .tooltipster-base table td, html .tooltipster-base table th {\n
\n
html table.instance-overview tr td > a.selected {\n
border-left: 4px solid #93D2B8;\n
border-color: #93D2B8;\n
}\n
\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
margin-left: -150px;\n
width: 320px;\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>
......@@ -764,7 +951,7 @@ html table.instance-overview td:first-child > a, html table.instance-overview td
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.6362.31366.44049</string> </value>
<value> <string>949.64125.34749.34235</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -782,7 +969,7 @@ html table.instance-overview td:first-child > a, html table.instance-overview td
</tuple>
<state>
<tuple>
<float>1455275197.77</float>
<float>1458581200.97</float>
<string>UTC</string>
</tuple>
</state>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Page" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>classification/collaborative/team</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_monitoring_document_edit.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Document Edit widget</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>gadget_monitoring_document_edit_html</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Page</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!DOCTYPE html>\n
<html>\n
<head>\n
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />\n
<meta name="viewport" content="width=device-width, user-scalable=no" />\n
<title>Monitoring Document Edit Page</title>\n
\n
<link rel="stylesheet" href="magnific-popup.css">\n
<link href="gadget_monitoring_custom.css" rel="stylesheet" type="text/css"/>\n
<!-- renderjs -->\n
<script src="rsvp.js" type="text/javascript"></script>\n
<script src="renderjs.js" type="text/javascript"></script>\n
\n
<script id="login-toltip-template" type="text/x-handlebars-template">\n
</script>\n
\n
<!-- magnific-popup -->\n
<script src="jquery.magnific-popup.min.js" type="text/javascript"></script>\n
<!-- custom script -->\n
<script src="gadget_monitoring_document_edit.js" type="text/javascript"></script>\n
\n
</head>\n
<body>\n
<div data-gadget-url="gadget_monitoring_jio.html" data-gadget-scope="jio_gadget" data-gadget-sandbox="public"></div>\n
<div data-gadget-url="gadget_monitoring_login_widget.html" data-gadget-scope="login_gadget" data-gadget-sandbox="public"></div>\n
<div class="white-popup mfp-hide">\n
<div class="ui-promise-title"><h2 style="font-size: 1.1em;"></h2></div>\n
<form>\n
<div data-role="content">\n
<div class="form-controlgroup">\n
\n
</div>\n
</div>\n
<div class="padding-5">\n
<span class="ui-text-error"></span>\n
</div>\n
<div>\n
<button type="button" class="ui-btn ui-corner-all ui-btn-inline cancel"><i class="fa fa-times"></i> Cancel</button>\n
<button type="submit" class="ui-btn ui-corner-all ui-btn-inline save"><i class="fa fa-floppy-o"></i> Save</button>\n
<div class="ui-content-hidden spinner">\n
<i class="fa fa-spinner fa-spin"></i>\n
</div>\n
</div>\n
</form>\n
</div>\n
</body>\n
</html>
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Monitoring Document Edit widget</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</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>
</pickle>
</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>1457541237.88</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>949.48450.25809.9642</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>1457629718.71</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>1457539323.65</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>classification/collaborative/public</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_monitoring_document_edit.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>gadget_monitoring_document_edit_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*global document, window, rJS, $ */\n
/*jslint nomen: true, indent: 2, maxerr: 3*/\n
(function (window, document, rJS, $) {\n
"use strict";\n
\n
var gadget_klass = rJS(window),\n
templater = gadget_klass.__template_element;\n
\n
function getHtmlFromJson(parameter_list) {\n
var i,\n
html_content = \'\';\n
\n
for (i = 0; i < parameter_list.length; i += 1) {\n
html_content += \'<span class="label-text">\' + parameter_list[i].title + \':</span>\\n\';\n
if (parameter_list[i].key) {\n
html_content += \'<input type="text" name="\' + parameter_list[i].key +\n
\'" placeholder="\' + parameter_list[i].title + \'" value="\' +\n
parameter_list[i].value +\'" data-mini="true">\\n\';\n
} else {\n
html_content += \'<input type="text" name="\' + parameter_list[i].key +\n
\'" placeholder="\' + parameter_list[i].title + \'" value="\'+\n
parameter_list[i].value +\'" data-mini="true" disabled="disabled">\\n\';\n
}\n
}\n
return html_content;\n
}\n
\n
function getFormDataList(formElement, parameter_list) {\n
var i,\n
formData_list = [];\n
for (i = 0; i < parameter_list.length; i += 1) {\n
formData_list.push(parameter_list[i]);\n
if (parameter_list[i].key) {\n
// Editable fields\n
if (formElement.querySelector(\'input[name="\' + parameter_list[i].key + \'"]\').value !== undefined) {\n
formData_list[i].value = formElement.querySelector(\'input[name="\' + parameter_list[i].key + \'"]\').value;\n
}\n
}\n
}\n
return formData_list;\n
}\n
\n
function saveDocument(gadget, jio_document) {\n
// Authenticate before save\n
// Normally password should already exists otherwise will redirect to login box and edited data will be lost!!!\n
return gadget.props.login_gadget.loginRedirect(\n
gadget.props.options.url,\n
gadget.props.options.page_options,\n
gadget.props.options.title,\n
gadget.props.options.root_title\n
)\n
.push(function (cred) {\n
var url = gadget.props.options.url;\n
if (gadget.props.options.path) {\n
url += (url.endsWith(\'/\') ? \'\':\'/\') + gadget.props.options.path;\n
}\n
gadget.props.jio_gadget.createJio({\n
type: "query",\n
sub_storage: {\n
type: "drivetojiomapping",\n
sub_storage: {\n
type: "dav",\n
url: url,\n
basic_login: cred.hash\n
}\n
}\n
});\n
return gadget.props.jio_gadget.put(gadget.props.options.key, jio_document);\n
})\n
.push(function (result) {\n
return {status: \'OK\'};\n
}, function (error) {\n
console.log(error);\n
return {status: \'ERROR\', code: error.target.status};\n
});\n
\n
}\n
\n
gadget_klass\n
.ready(function (g) {\n
g.props = {};\n
\n
return g.getElement()\n
.push(function (element) {\n
g.props.element = element;\n
g.props.deferred = RSVP.defer();\n
});\n
})\n
.ready(function (gadget) {\n
return gadget.getDeclaredGadget("jio_gadget")\n
.push(function (jio_gadget) {\n
gadget.props.jio_gadget = jio_gadget;\n
});\n
})\n
.ready(function (gadget) {\n
return gadget.getDeclaredGadget("login_gadget")\n
.push(function (login_gadget) {\n
gadget.props.login_gadget = login_gadget;\n
});\n
})\n
.declareMethod("render", function (options) {\n
var gadget = this;\n
return new RSVP.Queue()\n
.push(function () {\n
return gadget.props.deferred.resolve();\n
});\n
})\n
.declareMethod("popupEdit", function (options, updateMethod) {\n
var gadget = this,\n
title = \'Edit \' + (options.title || \'Monitoring Parameters\'),\n
html_form = \'\';\n
\n
gadget.props.options = options;\n
html_form = getHtmlFromJson(options.parameters || []);\n
\n
gadget.props.element.querySelector(\'.form-controlgroup\')\n
.innerHTML = html_form;\n
gadget.props.element.querySelector(\'.ui-promise-title h2\')\n
.innerHTML = title;\n
\n
return new RSVP.Queue()\n
.push(function () {\n
return $.magnificPopup.open({\n
items: {\n
src: \'.white-popup\',\n
type: \'inline\'\n
},\n
closeBtnInside: true,\n
callbacks: {\n
open: function() {\n
return new RSVP.Queue()\n
.push(function () {\n
return $(\'.white-popup form\').trigger("create");\n
})\n
.push(function () {\n
var promise_list = [];\n
\n
promise_list.push(loopEventListener(\n
document.querySelector(\'.mfp-content form .cancel\'),\n
\'click\',\n
false,\n
function (evt) {\n
return $.magnificPopup.close();\n
}\n
));\n
promise_list.push(loopEventListener(\n
document.querySelector(\'.mfp-content form .save\'),\n
\'click\',\n
false,\n
function (evt) {\n
var data = getFormDataList(document.querySelector(\'.mfp-content form\'), options.parameters);\n
return new RSVP.Queue()\n
.push(function () {\n
$(document.querySelector(\'.mfp-content spinner\')).toggleClass(\'ui-content-hidden\');\n
return RSVP.all([saveDocument(gadget, data)]);\n
})\n
.push(function (result) {\n
if (result[0].status === \'ERROR\') {\n
document.querySelector(\'.mfp-content .ui-text-error\')\n
.innerHTML = \'ERROR \' + result[0].code + \': Failed to save your document!\';\n
} else {\n
$.magnificPopup.close();\n
return updateMethod(data);}\n
})\n
.push(function () {\n
$(document.querySelector(\'.mfp-content spinner\')).toggleClass(\'ui-content-hidden\');\n
});\n
}\n
));\n
return RSVP.all(promise_list);\n
});\n
},\n
close: function() {\n
// Will fire when popup is closed\n
$(\'.white-popup\').remove();\n
}\n
}\n
});\n
})\n
.push(function () {\n
return gadget.props.deferred.resolve();\n
});\n
})\n
\n
\n
.declareService(function () {\n
var gadget = this;\n
\n
return new RSVP.Queue()\n
.push(function () {\n
return gadget.props.deferred.promise;\n
})\n
.push(function () {\n
\n
});\n
});\n
\n
}(window, document, rJS, $));\n
\n
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Monitoring Document Edit Widget JS</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</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>
</pickle>
</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>1457541225.98</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>949.49438.50290.39714</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>1458061223.97</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>1457541085.23</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
......@@ -295,7 +295,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>948.59081.21048.55005</string> </value>
<value> <string>949.47051.37391.64290</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -313,7 +313,7 @@
</tuple>
<state>
<tuple>
<float>1454506221.84</float>
<float>1457543803.27</float>
<string>UTC</string>
</tuple>
</state>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Page" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>classification/collaborative/public</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_monitoring_hosting_overview.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>gadget_monitoring_hosting_overview_html</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Page</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!doctype html>\n
<html>\n
<head>\n
<meta charset="utf-8">\n
<meta name="viewport" content="width=device-width, initial-scale=1">\n
\n
<title>Monitoring Hosting Subscription</title>\n
\n
<link href="gadget_monitoring_custom.css" rel="stylesheet" type="text/css"/>\n
\n
<script src="rsvp.js"></script>\n
<script src="renderjs.js"></script>\n
\n
<script id="template-hostings-list" type="text/x-handlebars-template">\n
{{#each hosting_list}}\n
<tr rel={{index}}>\n
<td>\n
<a class="ui-link" href="#{{status}}"><span class="label label-{{status}}">{{status}}</span></a>\n
</td>\n
<td>\n
<a class="ui-link" href="">{{title}}</a>\n
</td>\n
<td>\n
<a class="ui-link" href="">{{date}}</a>\n
</td>\n
</tr>\n
{{/each}}\n
</script>\n
\n
<script id="instance-details-widget-overview" type="text/x-handlebars-template">\n
{{#if status_list_url}}\n
<div data-role="controlgroup">\n
<a class="ui-btn ui-corner-all" href="{{status_list_url}}" title="Public"><i class="fa fa-check-square"></i> View Promises Status</a>\n
</div>\n
{{/if}}\n
<div class="ui-listview-container">\n
<ul data-role="listview" class="ui-listview-outer" data-inset="true">\n
{{#each instance_list}}\n
<li>\n
<a href="#" class="ui-btn ui-btn-icon-right ui-icon-plus">\n
<span class="ui-status-icon ui-status-{{status}}"></span>\n
<span class="ui-status-text">{{title}}</span>\n
</a>\n
<div class="ui-collapse-content ui-content-hidden">\n
<fieldset>\n
<div class="ui-field-contain">\n
<fieldset data-role="controlgroup" data-type="horizontal">\n
{{#if resource_url }}\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}}\n
{{#if process_url }}\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}}\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
<!--\n
{{#if public_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
{{/if}}\n
{{#if private_url}}\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
-->\n
</fieldset>\n
</div>\n
<table data-role="table" data-mode="columntoggle" class="ui-responsive table-stroke">\n
<tr>\n
<th><i class="fa fa-tachometer"></i> <strong>Status</strong></th>\n
<td><span class="label label-{{status}}">{{status}}</span></td>\n
<td>{{date}}</td>\n
</tr>\n
\n
{{#with instance}}\n
<tr>\n
<th><i class="fa fa-desktop"></i> <strong>Computer</strong></th>\n
<td>{{computer}}</td>\n
<td>{{partition}}</td>\n
</tr>\n
<tr>\n
<th><i class="fa fa-globe"></i> <strong>IP Address</strong></th>\n
<td>{{ipv4}}</td>\n
<td>{{ipv6}}</td>\n
</tr>\n
{{/with}}\n
</table>\n
</fieldset>\n
</div>\n
</li>\n
{{/each}}\n
</ul>\n
</div>\n
</script>\n
\n
<script id="parameters-widget-template" type="text/x-handlebars-template">\n
{{#if parameter_list}}\n
{{#each parameter_list}}\n
{{#if parameters}}\n
<h3 class="margin-0 padding-tb-10">{{title}} <i class="fa fa-angle-up"></i></h3>\n
<table data-role="table" data-mode="columntoggle" class="table-stroke" title="{{title}}">\n
{{#each parameters}}\n
<tr {{#if key}} class="line-edit" rel="{{../../index}}"{{/if}}>\n
<td><strong>{{title}}</strong></td>\n
{{#if key}}\n
<td class="v-{{key}}">{{value}}</td>\n
{{else}}\n
<td>{{value}}</td>\n
{{/if}}\n
<td class="ui-text-center">\n
{{#if key}}\n
<a rel="{{../../index}}" class="prop-edit" title=\'Edit this value\'><i class="fa fa-pencil"></i></a>\n
{{else}}\n
<a><span class="ui-text-desabled" title=\'Edit this value\'><i class="fa fa-pencil"></i></sapn></a>\n
{{/if}}\n
</td>\n
</tr>\n
{{/each}}\n
</table>\n
{{/if}}\n
{{/each}}\n
{{else}}\n
<h2>No parameters.</h2>\n
{{/if}}\n
</script>\n
\n
<script src="gadget_monitoring_hosting_overview.js"></script>\n
\n
</head>\n
\n
<body>\n
<div data-gadget-url="gadget_monitoring_jio.html" data-gadget-scope="jio_gadget" data-gadget-sandbox="public"></div>\n
<div data-gadget-url="gadget_monitoring_login_widget.html" data-gadget-scope="login_gadget" data-gadget-sandbox="public"></div>\n
<!--<div data-gadget-url="gadget_monitoring_document_edit.html" data-gadget-scope="config_gadget" data-gadget-sandbox="public"></div>-->\n
<div class="ui-grid-a ui-responsive">\n
<div class="ui-block-a">\n
\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-globe"></i> <span>Monitoring Applications</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 instance-overview">\n
<thead class="ui-bar-inherit">\n
<tr>\n
<th class="padding-10"></th>\n
<th>Name</th>\n
<th>Status Date</th>\n
</tr>\n
</thead>\n
<tbody>\n
\n
</tbody>\n
<tfoot class="ui-bar-inherit"></tfoot>\n
</table>\n
</div>\n
\n
</div>\n
</div>\n
\n
</div>\n
<div class="ui-block-b">\n
<div class="ui-panel-overview ui-content-hidden">\n
<div class="overview-header">\n
<div class=\'content-title ui-instance-title\'>\n
<div class="overview-title">\n
<i class="fa fa-share-alt"></i> <span></span>\n
</div>\n
<div class="commands">\n
</div>\n
</div>\n
</div>\n
<div class="content-details">\n
<h2><i class="fa fa-wrench"></i> <strong>Instances Parameters</strong></h2>\n
<div style="overflow: auto;" class="padding-lr-10 instances-parameters">\n
</div>\n
<div class="padding-5"></div>\n
<h2><i class="fa fa-cubes"></i> <strong>Instances State List</strong></h2>\n
<div class="instances-status">\n
</div>\n
</div>\n
</div>\n
</div>\n
</div>\n
\n
\n
</body>\n
</html>\n
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Monitoring Hosting Subscription Overview</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value>
<none/>
</value>
</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>
</pickle>
</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>1457347252.5</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>949.64120.38038.28552</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>1458568209.8</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>1457346986.01</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>classification/collaborative/public</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_monitoring_hosting_overview.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>gadget_monitoring_hosting_overview_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*global window, rJS, btoa */\n
/*jslint nomen: true, indent: 2, maxerr: 3*/\n
(function (window, rJS) {\n
"use strict";\n
\n
var gadget_klass = rJS(window),\n
templater = gadget_klass.__template_element,\n
\n
hosting_widget_template = Handlebars.compile(\n
templater.getElementById("template-hostings-list").innerHTML\n
),\n
parameters_widget_template = Handlebars.compile(\n
templater.getElementById("parameters-widget-template").innerHTML\n
),\n
instance_widget_template = Handlebars.compile(\n
templater.getElementById("instance-details-widget-overview").innerHTML\n
);\n
\n
function keysrt(key,desc) {\n
return function(a,b){\n
return desc ? ~~(a[key] < b[key]) : ~~(a[key] > b[key]);\n
};\n
}\n
\n
function safeGet(gadget, url) {\n
var document_id = \'monitor.global\';\n
gadget.props.jio_gadget.createJio({\n
type: "query",\n
sub_storage: {\n
type: "drivetojiomapping",\n
sub_storage: {\n
type: "dav",\n
url: url\n
}\n
}\n
});\n
return gadget.props.jio_gadget.get(document_id)\n
.push(function (doc) {\n
return doc;\n
}, function (error) {\n
console.log(error);\n
return undefined;\n
});\n
}\n
\n
function getHostingData(gadget, url_list) {\n
var promise_list = [],\n
i;\n
for (i = 0; i < url_list.length; i += 1) {\n
gadget.props.jio_gadget.createJio({\n
type: "query",\n
sub_storage: {\n
type: "drivetojiomapping",\n
sub_storage: {\n
type: "dav",\n
url: url_list[i]\n
}\n
}\n
});\n
promise_list.push(safeGet(gadget, url_list[i]));\n
}\n
return RSVP.all(promise_list);\n
}\n
\n
gadget_klass\n
.ready(function (gadget) {\n
gadget.props = {};\n
gadget.props.hosting_list = [];\n
gadget.props.opml_key_list = [];\n
return gadget.getDeclaredGadget("login_gadget")\n
.push(function (login_gadget) {\n
gadget.props.login_gadget = login_gadget;\n
});\n
})\n
.ready(function (gadget) {\n
return gadget.getElement()\n
.push(function (element) {\n
gadget.props.element = element;\n
gadget.props.render_deferred = RSVP.defer();\n
});\n
})\n
.ready(function (gadget) {\n
return gadget.getDeclaredGadget("jio_gadget")\n
.push(function (jio_gadget) {\n
gadget.props.jio_gadget = jio_gadget;\n
});\n
})\n
/*.ready(function (gadget) {\n
return gadget.getDeclaredGadget("config_gadget")\n
.push(function (config_gadget) {\n
gadget.props.config_gadget = config_gadget;\n
});\n
})*/\n
.declareAcquiredMethod("redirect", "redirect")\n
.declareAcquiredMethod("getSetting", "getSetting")\n
.declareAcquiredMethod("setSetting", "setSetting")\n
.declareAcquiredMethod("updateHeader", "updateHeader")\n
.declareMethod("render", function (options) {\n
var gadget = this,\n
opml_tmp_key_list,\n
hosting_url_list;\n
//return gadget.props.jio_gadget.getMonitorUrlList()\n
gadget.props.options = options;\n
return gadget.updateHeader({\n
title: \'Monitoring Registered Applications\'\n
})\n
.push(function () {\n
return gadget.getSetting(\'monitor_url_description\');\n
})\n
.push(function (url_description_dict) {\n
var key,\n
promise_list = [];\n
gadget.props.opml_dict = url_description_dict;\n
opml_tmp_key_list = [];\n
console.log(url_description_dict);\n
for (key in url_description_dict) {\n
opml_tmp_key_list.push(key);\n
promise_list.push(gadget.props.jio_gadget.getMonitorUrlListFromOpml(\n
url_description_dict[key].href\n
));\n
}\n
return RSVP.all(promise_list);\n
})\n
.push(function (url_list) {\n
var i,\n
j,\n
promise_list = [];\n
for (i = 0; i < url_list.length; i += 1) {\n
if (url_list[i]) {\n
promise_list.push(getHostingData(gadget, url_list[i]));\n
} else {\n
//This Feed is not available, remove from key_list\n
opml_tmp_key_list[i] = undefined;\n
}\n
}\n
return RSVP.all(promise_list);\n
})\n
.push(function (document_list) {\n
var i,\n
status,\n
hosting_dict,\n
hosting_title,\n
date,\n
content,\n
j;\n
\n
for (i = 0; i < document_list.length; i += 1) {\n
hosting_dict = {};\n
status = \'OK\';\n
hosting_dict.instance_list = [];\n
date = \'\';\n
for (j = 0; j < document_list[i].length; j += 1) {\n
if (document_list[i][j] === undefined) {\n
continue;\n
}\n
hosting_dict.instance_list.push({\n
title: document_list[i][j].title,\n
status: document_list[i][j].status,\n
url: document_list[i][j]._links.monitor.href\n
});\n
if (document_list[i][j].status === \'ERROR\') {\n
if (status !== \'ERROR\') {\n
status = \'ERROR\';\n
date = document_list[i][j].date || \'\';\n
hosting_title = document_list[i][j][\'hosting-title\'] || \'\';\n
}\n
} else if (document_list[i][j].status === \'WARNING\') {\n
if (status !== \'ERROR\' && status !== \'WARNING\') {\n
status = \'WARNING\';\n
date = document_list[i][j].date || \'\';\n
hosting_title = document_list[i][j][\'hosting-title\'] || \'\';\n
}\n
} else if (date === \'\') {\n
date = document_list[i][j].date || \'\';\n
hosting_title = document_list[i][j][\'hosting-title\'] || \'\';\n
}\n
}\n
hosting_dict.status = status;\n
hosting_dict.title = hosting_title;\n
hosting_dict.date = date;\n
hosting_dict.index = i;\n
gadget.props.hosting_list.push(hosting_dict);\n
}\n
for (i = 0; i < opml_tmp_key_list.length; i += 1) {\n
if (opml_tmp_key_list[i] !== undefined) {\n
gadget.props.opml_key_list.push(opml_tmp_key_list[i]);\n
}\n
}\n
content = hosting_widget_template({\n
hosting_list: gadget.props.hosting_list\n
});\n
gadget.props.element.querySelector(\'.ui-block-a table tbody\')\n
.innerHTML = content;\n
\n
return gadget.props.render_deferred.resolve();\n
});\n
})\n
\n
\n
.declareService(function () {\n
var gadget = this;\n
\n
function bindOnClick(element) {\n
var fieldset = $(element.parentNode.querySelector(\'.ui-collapse-content\')),\n
line = $(element);\n
if (line.hasClass(\'ui-icon-plus\')) {\n
line.removeClass(\'ui-icon-plus\');\n
line.addClass(\'ui-icon-minus\');\n
} else {\n
line.removeClass(\'ui-icon-minus\');\n
line.addClass(\'ui-icon-plus\');\n
}\n
if (fieldset !== undefined) {\n
fieldset.toggleClass(\'ui-content-hidden\');\n
}\n
return false;\n
}\n
\n
function updateParameterBox(parameter_list, title) {\n
var element = gadget.props.element.querySelector(\'table[title="\' + title + \'"]\'),\n
tmp,\n
i;\n
\n
if (!element) {\n
return;\n
}\n
for (i = 0; i < parameter_list.length; i += 1) {\n
if (!parameter_list[i].key) {\n
continue;\n
}\n
element.querySelector(\'.v-\' + parameter_list[i].key).innerHTML = parameter_list[i].value;\n
}\n
}\n
\n
function editMonitorProps (element) {\n
var index = parseInt($(element).attr(\'rel\'), 10),\n
promise_list = [];\n
\n
if (isNaN(index) || gadget.props.document_list.length < index) {\n
return;\n
}\n
\n
return new RSVP.Queue()\n
.push(function () {\n
if (gadget.props.config_gadget) {\n
return gadget.dropGadget(\'config_gadget\');\n
}\n
return false;\n
})\n
.push(function () {\n
gadget.props.config_gadget = null;\n
return gadget.declareGadget("gadget_monitoring_document_edit.html",\n
{\n
element: gadget.props.element,\n
scope: \'config_gadget\',\n
sandbox: "public"\n
}\n
);\n
})\n
.push(function (config_gadget) {\n
gadget.props.config_gadget = config_gadget;\n
return gadget.props.config_gadget.popupEdit({\n
url: gadget.props.document_list[index]._links.private_url.href,\n
parameters: gadget.props.document_list[index].parameters,\n
title: gadget.props.document_list[index].title,\n
root_title: gadget.props.document_list[index][\'hosting-title\'],\n
page_options: gadget.props.options,\n
path: \'config\',\n
key: \'config.tmp\'\n
}, function (data) {\n
var update_promise = [],\n
i,\n
monitor_user = \'\',\n
monitor_password = \'\';\n
\n
// Try to save monitor credential if they are pres\n
for (i = 0; i < data.length; i += 1) {\n
if (data[i].key === \'monitor-password\') {\n
monitor_password = data[i].value;\n
}\n
if ((data[i].key || data[i].title) === \'monitor-user\') {\n
monitor_user = data[i].value;\n
}\n
}\n
if (monitor_password && monitor_user) {\n
update_promise.push(gadget.props.login_gadget.updateUrlValue(\n
gadget.props.document_list[index]._links.private_url.href,\n
monitor_user,\n
monitor_password\n
));\n
}\n
gadget.props.document_list[index].parameters = data;\n
updateParameterBox(data, gadget.props.document_list[index].title);\n
return RSVP.push(update_promise);\n
});\n
});\n
}\n
\n
function getMonitorCredentials(monitor, hosting_title, index) {\n
return gadget.props.login_gadget.loginRedirect(\n
monitor.url,\n
{\n
page: \'hosting_overview\',\n
select: index\n
},\n
monitor.title,\n
hosting_title\n
);\n
}\n
\n
function getSecureDocument(url, auth_login) {\n
var jio_options = {\n
type: "query",\n
sub_storage: {\n
type: "drivetojiomapping",\n
sub_storage: {\n
type: "dav",\n
url: url\n
}\n
}\n
},\n
document_id = \'monitor.global\';\n
\n
jio_options.sub_storage.sub_storage.basic_login = auth_login;\n
gadget.props.jio_gadget.createJio(jio_options);\n
return gadget.props.jio_gadget.get(document_id);\n
}\n
\n
function getInstanceDict(monitor_dict) {\n
var instance_dict,\n
tmp_url,\n
tmp_process_url;\n
\n
// Resource view URLs\n
tmp_url = "#page=resource_view&title=" + monitor_dict.title +\n
"&root=" + monitor_dict[\'hosting-title\'] +\n
"&jio_for=" + monitor_dict._links.private_url.href;\n
\n
tmp_process_url = "#page=process_view&title=" + monitor_dict.title +\n
"&root=" + monitor_dict[\'hosting-title\'] +\n
"&jio_for=" + monitor_dict._links.private_url.href;\n
\n
instance_dict = {\n
title: monitor_dict.title,\n
root_title: monitor_dict[\'hosting-title\'],\n
date: monitor_dict.date,\n
status: monitor_dict.status,\n
instance: monitor_dict._embedded.instance || \'\',\n
public_url: monitor_dict._links.hasOwnProperty(\'public_url\') ? monitor_dict._links.public_url.href : \'\',\n
private_url: monitor_dict._links.hasOwnProperty(\'private_url\') ? monitor_dict._links.private_url.href : \'\',\n
rss_url: monitor_dict._links.hasOwnProperty(\'rss_url\') ? monitor_dict._links.rss_url.href : \'\',\n
resource_url: tmp_url,\n
process_url: tmp_process_url\n
};\n
return instance_dict;\n
}\n
\n
function showHostingConfiguration(element) {\n
var index = parseInt($(element).attr(\'rel\'), 10);\n
\n
if (isNaN(index) || gadget.props.hosting_list.length < index) {\n
return;\n
}\n
return new RSVP.Queue()\n
.push(function () {\n
return $(gadget.props.element.querySelectorAll(\'.ui-block-b .ui-listview-container li > a\')).unbind( "click" );\n
})\n
.push(function () {\n
return $(gadget.props.element.querySelectorAll(\'.ui-block-b .line-edit\')).unbind( "click" );\n
})\n
.push(function () {\n
var old_element = $(gadget.props.element.querySelector(\'.ui-listview-container table td > a.selected\'));\n
\n
if (old_element) {\n
old_element.removeClass(\'selected\');\n
}\n
return $(element.querySelector(\'td:first-child > a\')).addClass(\'selected\');\n
})\n
.push(function () {\n
var i,\n
cred_promise_list = [];\n
for (i = 0; i < gadget.props.hosting_list[index].instance_list.length; i += 1) {\n
cred_promise_list.push(\n
getMonitorCredentials(gadget.props.hosting_list[index].instance_list[i],\n
gadget.props.hosting_list[index].title,\n
index\n
));\n
}\n
return RSVP.all(cred_promise_list);\n
})\n
.push(function (cred_list) {\n
var i,\n
promise_list = [];\n
for (i = 0; i < gadget.props.hosting_list[index].instance_list.length; i += 1) {\n
promise_list.push(getSecureDocument(\n
gadget.props.hosting_list[index].instance_list[i].url,\n
cred_list[i].hash\n
));\n
}\n
return RSVP.all(promise_list);\n
})\n
.push(function (document_list) {\n
var parameter_content,\n
instance_list = [],\n
parameter_list = [],\n
status_url = \'\',\n
i,\n
instance_content,\n
content_panel = $(gadget.props.element.querySelector(\'.ui-block-b .ui-panel-overview\'));\n
\n
if (content_panel.hasClass(\'ui-content-hidden\')) {\n
content_panel.removeClass(\'ui-content-hidden\');\n
}\n
gadget.props.document_list = document_list;\n
gadget.props.element.querySelector(\'.ui-block-b .overview-title span\')\n
.innerHTML = gadget.props.hosting_list[index].title; // + \'<span class="label label-{{status}}">{{status}}</span>\';\n
\n
for (i = 0; i < document_list.length; i += 1) {\n
instance_list.push(\n
getInstanceDict(document_list[i])\n
);\n
if (document_list[i].hasOwnProperty(\'parameters\')) {\n
parameter_list.push({\n
title: document_list[i].title,\n
parameters: document_list[i].parameters,\n
base_url: document_list[i]._links.hasOwnProperty(\'private_url\') ? document_list[i]._links.private_url.href : \'\',\n
index: i\n
});\n
}\n
}\n
if (gadget.props.opml_dict[gadget.props.opml_key_list[index]] !== undefined) {\n
status_url = "#page=status_list&opml_url=" + gadget.props.opml_dict[gadget.props.opml_key_list[index]].href;\n
}\n
parameter_content = parameters_widget_template({parameter_list: parameter_list});\n
instance_content = instance_widget_template({\n
instance_list: instance_list,\n
status_list_url: status_url\n
});\n
\n
gadget.props.element.querySelector(\'.ui-block-b .instances-parameters\')\n
.innerHTML = parameter_content;\n
gadget.props.element.querySelector(\'.ui-block-b .instances-status\')\n
.innerHTML = instance_content;\n
return \'\';\n
})\n
.push(function () {\n
return $(gadget.props.element.querySelectorAll(\'.ui-block-b .ui-listview-outer\')).listview().listview("refresh");\n
})\n
.push(function () {\n
\n
var promise_list = [],\n
element_list = gadget.props.element.querySelectorAll(\'.ui-block-b .ui-listview-container li > a\'),\n
edit_list = gadget.props.element.querySelectorAll(\'.ui-block-b .line-edit\'),\n
i;\n
for (i = 0; i < element_list.length; i += 1) {\n
promise_list.push(loopEventListener(\n
element_list[i],\n
\'click\',\n
false,\n
bindOnClick.bind(gadget, element_list[i])\n
));\n
}\n
for (i = 0; i < edit_list.length; i += 1) {\n
promise_list.push(loopEventListener(\n
edit_list[i],\n
\'click\',\n
false,\n
editMonitorProps.bind(gadget, edit_list[i])\n
));\n
}\n
return RSVP.all(promise_list);\n
});\n
}\n
\n
return new RSVP.Queue()\n
.push(function () {\n
return gadget.props.render_deferred.promise;\n
})\n
.push(function () {\n
var promise_list = [],\n
element_list = gadget.props.element.querySelectorAll(\'.ui-listview-container table tr\'),\n
i;\n
for (i = 0; i < element_list.length; i += 1) {\n
promise_list.push(loopEventListener(\n
element_list[i],\n
\'click\',\n
false,\n
showHostingConfiguration.bind(gadget, element_list[i])\n
));\n
}\n
return RSVP.all(promise_list);\n
});\n
});\n
\n
}(window, rJS));
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Monitoring Hosting Subscription Overview Js</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</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>
</pickle>
</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>1457347208.26</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>950.3039.1259.9813</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>1458835199.54</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>1457347073.74</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
......@@ -120,6 +120,7 @@
<script src="renderjs.js" type="text/javascript"></script>\n
\n
<script src="jiodev.js" type="text/javascript"></script>\n
<script src="jio_dev_rssfeed_storage.js" type="text/javascript"></script>\n
\n
<!-- custom script -->\n
<script src="gadget_monitoring_jio.js" type="text/javascript"></script>\n
......@@ -264,7 +265,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>948.31896.5130.28535</string> </value>
<value> <string>949.6675.61849.23210</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -282,7 +283,7 @@
</tuple>
<state>
<tuple>
<float>1452875060.05</float>
<float>1456231972.65</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -110,6 +110,71 @@
/*jslint indent: 2, maxerr: 3 */\n
(function (window, rJS, jIO) {\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
rJS(window)\n
\n
......@@ -120,6 +185,7 @@
\n
.declareAcquiredMethod("redirect", "redirect")\n
.declareAcquiredMethod("getSetting", "getSetting")\n
.declareAcquiredMethod("setSetting", "setSetting")\n
\n
.declareMethod(\'createJio\', function (jio_options) {\n
var gadget = this;\n
......@@ -141,9 +207,101 @@
gadget.state_parameter_dict.jio_storage_name = jio_storage_name;\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
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
.declareMethod(\'allAttachments\', function () {\n
var storage = this.state_parameter_dict.jio_storage;\n
......@@ -332,7 +490,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>948.31893.52815.47769</string> </value>
<value> <string>949.59884.43592.12680</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -350,7 +508,7 @@
</tuple>
<state>
<tuple>
<float>1452874919.27</float>
<float>1458313807.96</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -308,7 +308,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.5203.64911.29252</string> </value>
<value> <string>949.21109.24288.21538</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -326,7 +326,7 @@
</tuple>
<state>
<tuple>
<float>1455205817.52</float>
<float>1456234720.55</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -216,19 +216,23 @@
if (result.status === \'OK\') {\n
return gadget.setSetting(\'redirect_after_login\', \'\')\n
.push(function () {\n
var credential = {\n
/*var credential = {\n
hash: hash,\n
url: gadget.props.url\n
},\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
.push(function () {\n
return gadget.redirect(gadget.props.from);\n
});\n
} else {\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
}\n
}, function(error) {\n
......@@ -379,7 +383,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.5199.35910.16827</string> </value>
<value> <string>949.54056.59252.46080</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -397,7 +401,7 @@
</tuple>
<state>
<tuple>
<float>1455205594.43</float>
<float>1457966675.88</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -124,6 +124,7 @@
\n
</head>\n
<body>\n
<div data-gadget-url="gadget_jio.html" data-gadget-scope="jio_gadget" data-gadget-sandbox="public"></div>\n
</body>\n
</html>
......@@ -262,7 +263,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.2228.14510.50124</string> </value>
<value> <string>949.39647.52503.63692</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -280,7 +281,7 @@
</tuple>
<state>
<tuple>
<float>1455027252.82</float>
<float>1457099647.3</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -121,6 +121,117 @@
hashCode = function (s) {\n
return s.split("").reduce(function(a,b){a=((a<<5)-a)+b.charCodeAt(0);return a&a},0); \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
gadget_klass\n
.ready(function (g) {\n
......@@ -128,6 +239,15 @@
g.props.from = {page: \'main\'};\n
g.props.login = \'login\';\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(\'getUrlFor\', \'getUrlFor\')\n
.declareAcquiredMethod("getSetting", "getSetting")\n
......@@ -143,7 +263,7 @@
if (response.status === 200) {\n
resolve({status: \'OK\'});\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
xhr.onerror = function (e) {\n
......@@ -176,7 +296,7 @@
});\n
};\n
\n
return gadget.getSetting(hash_url)\n
return getUrlInfo(gadget, hash_url)\n
.push(function (credential_dict) {\n
if (!credential_dict) {\n
credential_dict = {hash: btoa(\'no:password\'), url: url};\n
......@@ -195,6 +315,26 @@
return redirectWith(options_dict);\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
}(window, document, rJS));
......@@ -334,7 +474,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.5170.57497.38894</string> </value>
<value> <string>949.54052.60822.44663</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -352,7 +492,7 @@
</tuple>
<state>
<tuple>
<float>1455204244.68</float>
<float>1457967142.65</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -125,9 +125,9 @@
.declareMethod("render", function (options) {\n
var gadget = this,\n
current_display;\n
return gadget.getSetting(\'jio_storage_description\')\n
.push(function (jio_storage_description) {\n
if (!jio_storage_description) {\n
return gadget.getSetting(\'monitor_url_description\')\n
.push(function (monitor_url_description) {\n
if (!monitor_url_description) {\n
return gadget.redirect({\n
page: \'settings_configurator\'\n
});\n
......@@ -140,6 +140,7 @@
if (current_display === undefined || current_display === \'\') {\n
current_display = \'list\';\n
}\n
current_display = \'list\';\n
return gadget.setSetting(\'monitoring_display_style\', current_display);\n
})\n
.push(function () {\n
......@@ -284,7 +285,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>948.31863.44261.14694</string> </value>
<value> <string>949.56645.25063.6451</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -302,7 +303,7 @@
</tuple>
<state>
<tuple>
<float>1454930576.46</float>
<float>1458320618.57</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -150,7 +150,7 @@
},\n
listview_options = {\n
search_page: \'overview\',\n
//search: options.search,\n
search: options.search,\n
selection: \'\',\n
column: {\n
select: \'title\',\n
......@@ -158,32 +158,36 @@
},\n
data_id: \'monitor.global\',\n
data_url: gadget.property_dict.listview_data_url,\n
search_column_list: [\'title\', \'status\', \'date\'],\n
\'sort_column_list\': [\n
{select: \'Status\', title: \'Status\'},\n
search_column_list: [\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: \'data\', title: \'Date\'}\n
{select: \'hosting-title\', title: \'Date\'}\n
],\n
query: {\n
select_list: [\'title\', \'status\', \'date\', \'_embedded\', \'_links\', \'state\', \'data\'],\n
query: \'_id:"monitor%.global"\',\n
select_list: [\'title\', \'status\', \'date\', \'_links\', \'state\', \'hosting-title\'],\n
query: \'_id:"monitor.global"\',\n
sort_on: [["status", "ascending"]]\n
}\n
};\n
\n
return gadget.updateHeader(header)\n
.push(function () {\n
var filter_part_list = [];\n
var filter_part_list = [],\n
j;\n
\n
/*if (options.sort_on && options.sort_on !== \'status\') {\n
listview_options.query.sort_on = [[options.sort_on, \'ascending\']];\n
}\n
}*/\n
if (options.status && options.status !== \'\') {\n
for (j = 0; j < options.status.split(\'+\').length; j += 1) {\n
filter_part_list.push(\'(status:"\' + options.status.split(\'+\')[j].toUpperCase() + \'")\');\n
}\n
listview_options.query.query += \' AND (\' + filter_part_list.join(\' OR \') + \')\';\n
}*/\n
}\n
return gadget.property_dict.listview.render(listview_options);\n
});\n
})\n
......@@ -329,7 +333,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.6325.29916.43946</string> </value>
<value> <string>949.23937.2972.5563</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -347,7 +351,7 @@
</tuple>
<state>
<tuple>
<float>1455274107.83</float>
<float>1458226729.62</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -162,13 +162,12 @@
}\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
.push(function (cred) {\n
jio_options.sub_storage.sub_storage.basic_login = cred.hash;\n
gadget.property_dict.jio_gadget.createJio(jio_options);\n
return gadget.updateHeader({\n
title: (options.title || \'Monitoring Instance\') + \' Processes\'\n
title: options.title + \' [\' + options.root + \'] Processes status\'\n
});\n
})\n
.push(function () {\n
......@@ -573,7 +572,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.5282.9066.9386</string> </value>
<value> <string>949.59799.36045.13670</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -591,7 +590,7 @@
</tuple>
<state>
<tuple>
<float>1455210644.51</float>
<float>1458308638.96</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -284,12 +284,12 @@
<div class="ui-block-b">\n
</div>\n
<div class="ui-block-c">\n
<h2><i class="fa fa-bar-chart"></i> <strong>Instance Status Ratio</strong></h2>\n
<div style="max-width: 250px; heigth: 150px;">\n
<h2><i class="fa fa-bar-chart"></i> <strong>Instance Promises Status</strong></h2>\n
<div style="max-width: 300px; heigth: 150px;">\n
<div data-gadget-url="gadget_monitoring_chart.html" data-gadget-scope="chart0"></div>\n
</div>\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>\n
</div>\n
......@@ -438,7 +438,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.5259.56104.14233</string> </value>
<value> <string>949.26772.37443.60825</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -456,7 +456,7 @@
</tuple>
<state>
<tuple>
<float>1455209074.82</float>
<float>1456500574.55</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -183,7 +183,7 @@
var back_url = \'#page=main&t=\' + (Date.now() / 1000 | 0);\n
return RSVP.all([\n
gadget.updateHeader({\n
title: options.jio_key,\n
title: \'Promise \' + options.jio_key,\n
//back_url: back_url,\n
//panel_action: false,\n
refresh_url: refresh_url\n
......@@ -191,6 +191,9 @@
]);\n
})\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
// Load from defined url\n
var jio_options = {\n
......@@ -235,7 +238,7 @@
element: element\n
});\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
.innerHTML += content;\n
if (element.hasOwnProperty(\'_links\') && element._links.hasOwnProperty(\'monitor\') && element._links.monitor.href) {\n
......@@ -466,7 +469,8 @@
type: \'bar\',\n
config: {\n
bezierCurve: false,\n
responsive: true\n
responsive: true,\n
barDatasetSpacing: 20\n
},\n
data: data\n
});\n
......@@ -618,7 +622,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.5265.63409.53947</string> </value>
<value> <string>949.56728.21843.28501</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -636,7 +640,7 @@
</tuple>
<state>
<tuple>
<float>1455209893.65</float>
<float>1458124466.18</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -155,7 +155,7 @@
</div>\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
<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 class="ui-grid-span-1 custom-grid-wrap graph-cell">\n
\n
......@@ -163,21 +163,21 @@
</ul>\n
<div class="ui-grid-a ui-responsive">\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 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 class="ui-grid-b ui-responsive">\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 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 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 class=\'graph-footer\'>\n
......@@ -325,7 +325,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>948.58979.7424.11673</string> </value>
<value> <string>949.6675.61849.23210</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -343,7 +343,7 @@
</tuple>
<state>
<tuple>
<float>1455181931.75</float>
<float>1458306392.07</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -271,7 +271,7 @@
.push(function (cred) {\n
var key;\n
gadget.property_dict.element.querySelector(".ui-panel-overview .overview-title > span")\n
.innerHTML += options.title || \'Monitoring Instance Resource Status\';\n
.innerHTML += options.title + \' [\' + options.root + \']\';\n
\n
for (key in gadget.property_dict.ressource_dict) {\n
promise_list.push(loadGraphData (options.jio_for + \'data/\', key, cred));\n
......@@ -291,7 +291,8 @@
// declared service\n
/////////////////////////////////////////////////////////////////\n
.declareService(function () {\n
var gadget = this;\n
var gadget = this,\n
date_window = [];\n
\n
function toggleSerieVisibility(evt) {\n
var checkbox = evt.target.nextSibling,\n
......@@ -307,6 +308,27 @@
return evt;\n
});\n
}\n
\n
function formatDateToString(d) {\n
return d.toISOString().slice(0,10) + \' \' + d.getHours() + \':\' + d.getMinutes() + \':\' + d.getSeconds();\n
}\n
\n
function getDateWindonw(data) {\n
var max_date,\n
begin_date,\n
end_date,\n
date_window = [];\n
gadget.property_dict.timer = null;\n
gadget.property_dict.loading = false;\n
if (data.length > 0) {\n
max_date = data[data.length - 1].split(\',\')[0];\n
begin_date = new Date(max_date);\n
end_date = new Date(max_date);\n
begin_date.setHours(begin_date.getHours() -2);\n
date_window = [Date.parse(begin_date), Date.parse(end_date)];\n
}\n
return date_window;\n
}\n
\n
function updateGraphData (jio_url, key) {\n
return gadget.property_dict.jio_gadget.get(gadget.property_dict.ressource_dict[key])\n
......@@ -347,33 +369,40 @@
return RSVP.all(promise_list);\n
})\n
.push(function () {\n
date_window = getDateWindonw(gadget.property_dict.mem_data.data);\n
return gadget.property_dict.graph_mem_used.updateOptions({\n
file: gadget.property_dict.mem_data.data.join(\'\\n\')\n
file: gadget.property_dict.mem_data.data.join(\'\\n\'),\n
dateWindow: date_window\n
});\n
})\n
.push(function () {\n
return gadget.property_dict.graph_mem_percent.updateOptions({\n
file: gadget.property_dict.mem_data.data.join(\'\\n\')\n
file: gadget.property_dict.mem_data.data.join(\'\\n\'),\n
dateWindow: date_window\n
});\n
})\n
.push(function () {\n
return gadget.property_dict.graph_io_rw.updateOptions({\n
file: gadget.property_dict.io_data.data.join(\'\\n\')\n
file: gadget.property_dict.io_data.data.join(\'\\n\'),\n
dateWindow: date_window\n
});\n
})\n
.push(function () {\n
return gadget.property_dict.graph_io_counter.updateOptions({\n
file: gadget.property_dict.io_data.data.join(\'\\n\')\n
file: gadget.property_dict.io_data.data.join(\'\\n\'),\n
dateWindow: date_window\n
});\n
})\n
.push(function () {\n
return gadget.property_dict.graph_disk_used.updateOptions({\n
file: gadget.property_dict.io_data.data.join(\'\\n\')\n
file: gadget.property_dict.io_data.data.join(\'\\n\'),\n
dateWindow: date_window\n
});\n
})\n
.push(function () {\n
return gadget.property_dict.graph_cpu.updateOptions({\n
file: gadget.property_dict.process_data.data.join(\'\\n\')\n
file: gadget.property_dict.process_data.data.join(\'\\n\'),\n
dateWindow: date_window\n
});\n
});\n
}\n
......@@ -390,18 +419,18 @@
\n
return new RSVP.Queue()\n
.push(function () {\n
gadget.property_dict.timer = null;\n
gadget.property_dict.loading = false;\n
date_window = getDateWindonw(gadget.property_dict.mem_data.data);\n
return gadget.property_dict.render_deferred.promise;\n
})\n
.push(function () {\n
return gadget.property_dict.graph_mem_used.render(\n
gadget.property_dict.mem_data.data.join(\'\\n\'),\n
{\n
ylabel: \'<span class="graph-label"><i class="fa fa-bar-chart"></i> Memory used (Mo)</span>\',\n
xlabel: \'<span class="graph-label"><i class="fa fa-area-chart"></i> Memory used (Mo)</span>\',\n
labelsDivStyles: { \'textAlign\': \'right\' },\n
legend: \'always\',\n
visibility: [false, true],\n
dateWindow: date_window,\n
fillGraph: true\n
},\n
"customInteractionModel"\n
......@@ -411,10 +440,11 @@
return gadget.property_dict.graph_mem_percent.render(\n
gadget.property_dict.mem_data.data.join(\'\\n\'),\n
{\n
ylabel: \'<span class="graph-label"><i class="fa fa-bar-chart"></i> Memory used %</span>\',\n
xlabel: \'<span class="graph-label"><i class="fa fa-area-chart"></i> Memory used %</span>\',\n
labelsDivStyles: { \'textAlign\': \'right\' },\n
legend: \'always\',\n
visibility: [true, false],\n
dateWindow: date_window,\n
fillGraph: true\n
},\n
"customInteractionModel"\n
......@@ -424,10 +454,11 @@
return gadget.property_dict.graph_io_rw.render(\n
gadget.property_dict.io_data.data.join(\'\\n\'),\n
{\n
ylabel: \'<span class="graph-label"><i class="fa fa-bar-chart"></i> IO RW Bytes</span>\',\n
xlabel: \'<span class="graph-label"><i class="fa fa-bar-chart"></i> IO RW Bytes</span>\',\n
labelsDivStyles: { \'textAlign\': \'right\' },\n
legend: \'always\',\n
visibility: [true, false, false],\n
dateWindow: date_window,\n
fillGraph: true\n
},\n
"customInteractionModel"\n
......@@ -437,10 +468,11 @@
return gadget.property_dict.graph_io_counter.render(\n
gadget.property_dict.io_data.data.join(\'\\n\'),\n
{\n
ylabel: \'<span class="graph-label"><i class="fa fa-bar-chart"></i> IO RW counter</span>\',\n
xlabel: \'<span class="graph-label"><i class="fa fa-bar-chart"></i> IO RW counter</span>\',\n
labelsDivStyles: { \'textAlign\': \'right\' },\n
legend: \'always\',\n
visibility: [false, true, false],\n
dateWindow: date_window,\n
fillGraph: true\n
},\n
"customInteractionModel"\n
......@@ -450,10 +482,11 @@
return gadget.property_dict.graph_disk_used.render(\n
gadget.property_dict.io_data.data.join(\'\\n\'),\n
{\n
ylabel: \'<span class="graph-label"><i class="fa fa-bar-chart"></i> Disk used (Mo)</span>\',\n
xlabel: \'<span class="graph-label"><i class="fa fa-pie-chart"></i> Disk Used (Mo)</span>\',\n
labelsDivStyles: { \'textAlign\': \'right\' },\n
legend: \'always\',\n
visibility: [false, false, true],\n
dateWindow: date_window,\n
fillGraph: true\n
},\n
"customInteractionModel"\n
......@@ -463,8 +496,9 @@
return gadget.property_dict.graph_cpu.render(\n
gadget.property_dict.process_data.data.join(\'\\n\'),\n
{\n
ylabel: \'<span class="graph-label"><i class="fa fa-bar-chart"></i> Process resources</span>\',\n
labelsDivStyles: { \'textAlign\': \'right\' }\n
xlabel: \'<span class="graph-label"><i class="fa fa-line-chart"></i> Process resources usage</span>\',\n
labelsDivStyles: { \'textAlign\': \'right\' },\n
dateWindow: date_window,\n
},\n
"customInteractionModel"\n
);\n
......@@ -494,11 +528,11 @@
});\n
gadget.property_dict.element.querySelector(".ui-panel-overview ." + element + " .ui-grid-span-1")\n
.innerHTML = label_content;\n
return RSVP.all([\n
/*return RSVP.all([\n
$(gadget.property_dict.element.querySelectorAll("[type=checkbox]"))\n
.checkboxradio()]);\n
/*$(gadget.property_dict.element.querySelectorAll("[data-role=controlgroup]"))\n
.controlgroup("refresh")]);*/\n
.checkboxradio()]);*/\n
return $(gadget.property_dict.element.querySelectorAll("[data-role=controlgroup]"))\n
.controlgroup().controlgroup("refresh");\n
});\n
}\n
})\n
......@@ -515,7 +549,7 @@
toggleSerieVisibility\n
)\n
);\n
if ($(element_list[i]).attr(\'for\').toLowerCase() !== \'label_cpu_percent\') {\n
if ($(element_list[i]).attr(\'for\').toLowerCase() !== \'label_cpu_percent\' && $(element_list[i]).attr(\'for\').toLowerCase() !== \'label_total_process\') {\n
promise_list.push(gadget.property_dict.graph_cpu.setVisibility(\n
parseInt($(element_list[i]).attr(\'rel\'), 10), false)\n
);\n
......@@ -664,7 +698,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.5267.64321.15581</string> </value>
<value> <string>949.64188.296.22835</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -682,7 +716,7 @@
</tuple>
<state>
<tuple>
<float>1455209635.58</float>
<float>1458571980.17</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -120,10 +120,36 @@
<!-- renderjs -->\n
<script src="rsvp.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
<script src="gadget_monitoring_static.js" type="text/javascript"></script>\n
</head>\n
<body>\n
<div data-gadget-url="gadget_monitoring_jio.html" data-gadget-scope="jio_gadget" data-gadget-sandbox="public"></div>\n
<div data-gadget-url="gadget_monitoring_login_widget.html" data-gadget-scope="login_gadget" data-gadget-sandbox="public"></div>\n
<div data-role="tabs" class="config-tabs">\n
<div data-role="navbar">\n
<ul>\n
<li><a href="#config-add" data-ajax="false">Add Monitor Instance</a></li>\n
<li><a href="#config-manage" data-ajax="false">Manage Instances</a></li>\n
</ul>\n
</div>\n
<div id="config-add" class="ui-body-c ui-content">\n
<article class="ui-content ui-body-c">\n
<section class="ui-content-header-plain">\n
<h3 class="ui-content-title ui-body-c">\n
......@@ -131,37 +157,131 @@
Monitor connection parameters\n
</h3>\n
</section>\n
<section class="ui-body-c ui-content-section">\n
<form class="dav-configuration-form">\n
\n
<section class="ui-body-c ui-content-sections">\n
<form class="opml">\n
<div class="ui-form">\n
<div class="ui-field-contain">\n
<label data-i18n="Connection URL:">Connection URL:</label>\n
<input type="url" name="dav_url" required value=""/>\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
<!--\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="hidde" name="dav_username" value=""/>\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="dav_password" value=""/>\n
<input type="password" name="password" required value="-"/>\n
</div>\n
</div>\n
-->\n
<div class="select-storage ui-controlgroup ui-controlgroup-horizontal">\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 class="padding-5">\n
<span class="ui-text-error"></span>\n
</div>\n
<div class="ui-grid-b ui-responsive">\n
<div class="ui-block-a"></div>\n
<div class="ui-block-b"></div>\n
<div class="ui-block-c">\n
<button type="submit" data-i18n="Connect" class="ui-btn-btn-right">Connect</button>\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
<button type="submit" data-i18n="Configure" class="ui-btn-btn-right">Configure</button>\n
</div>\n
</div>\n
</form>\n
</section>\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
</div>\n
</div>\n
</body>\n
</html>
......@@ -300,7 +420,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.6589.26814.39133</string> </value>
<value> <string>949.65333.22535.21930</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -318,7 +438,7 @@
</tuple>
<state>
<tuple>
<float>1455288976.81</float>
<float>1458641047.48</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -110,10 +110,17 @@
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*global window, rJS, btoa */\n
/*global window, rJS, btoa, RSVP, $ */\n
/*jslint nomen: true, indent: 2, maxerr: 3*/\n
(function (window, rJS) {\n
(function (window, rJS, RSVP, $, btoa) {\n
"use strict";\n
\n
function validateHttpUrl(value) {\n
if (/\\(?(?:(http|https):\\/\\/)(?:((?:[^\\W\\s]|\\.|-|[:]{1})+)@{1})?((?:www.)?(?:[^\\W\\s]|\\.|-)+[\\.][^\\W\\s]{2,4}|localhost(?=\\/)|\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}|\\[[\\dabcedf:]+\\])(?::(\\d*))?([\\/]?[^\\s\\?]*[\\/]{1})*(?:\\/?([^\\s\\n\\?\\[\\]\\{\\}\\#]*(?:(?=\\.)){1}|[^\\s\\n\\?\\[\\]\\{\\}\\.\\#]*)?([\\.]{1}[^\\s\\?\\#]*)?)?(?:\\?{1}([^\\s\\n\\#\\[\\]]*))?([\\#][^\\s\\n]*)?\\)?/i.test(value)) {\n
return true;\n
}\n
return false;\n
}\n
\n
function setjIODAVConfiguration(gadget, options) {\n
var url = "",\n
......@@ -137,7 +144,7 @@
configuration.sub_storage.sub_storage.basic_login = btoa(options.login + \':\' + options.password);\n
}\n
} else {\n
url = gadget.props.element.querySelector("input[name=\'dav_url\']").value;\n
url = gadget.props.element.querySelector("input[name=\'url\']").value;\n
configuration.sub_storage.sub_storage.url = url;\n
if (login_input !== \'\' && password_input !== \'\') {\n
configuration.sub_storage.sub_storage.basic_login = btoa(login_input + \':\' + password_input);\n
......@@ -162,7 +169,196 @@
});\n
}\n
\n
var gadget_klass = rJS(window);\n
function hashCode (s) {\n
return s.split("").reduce(function(a,b){a=((a<<5)-a)+b.charCodeAt(0);return a&a},0); \n
}\n
\n
function setUrlConfiguration(gadget, url, title) {\n
return gadget.getSetting(\'monitor_url_description\')\n
.push(function (url_description_dict) {\n
var i,\n
tmp,\n
tmp_dict;\n
\n
if (url_description_dict === undefined) {\n
url_description_dict = {};\n
}\n
\n
// url will be saved by group (hosting subscription) identified by their id\n
tmp = hashCode(url) + \'\';\n
/*if (url_description_dict.hasOwnProperty(tmp)) {\n
// this entry will be overridden\n
}*/\n
url_description_dict[tmp] = {href: url, title: title};\n
/*\n
tmp_dict = {};\n
tmp_dict.root_title = group_name;\n
if (tmp_dict.urls === undefined) {\n
tmp_dict.urls = [];\n
}\n
for (i = 0; i < description_list.length; i += 1) {\n
\n
if (description_list[i].htmlurl) {\n
tmp_dict.urls.push({\n
url: description_list[i].htmlurl,\n
title: description_list[i].title,\n
root_title: description_list[i].opml_title\n
});\n
}\n
}\n
url_description_dict[tmp] = tmp_dict;*/\n
return gadget.setSetting(\'monitor_url_description\', url_description_dict);\n
});\n
}\n
\n
function loadUrlFromOPML(gadget, url) {\n
return new RSVP.Queue()\n
.push(function () {\n
return $("article.configure-b").addClass("ui-content-hidden");\n
})\n
.push(function () {\n
var listbox_configuration = {\n
enable_search: false,\n
disable_href: true,\n
column_list: [{\n
title: \'Title\',\n
select: \'title\'\n
}, {\n
title: \'Hosting Subscription\',\n
select: \'opml_title\'\n
}, {\n
select: \'htmlurl\',\n
title: \'URL\'\n
}, {\n
select: \'type\',\n
title: \'Type\'\n
}],\n
query: {\n
select_list: [\'title\', \'opml_title\', \'htmlurl\', \'type\', \'url\'],\n
sort_on: [["opml_title", "ascending"]]\n
}\n
},\n
jio_options = {\n
type: "query",\n
sub_storage: {\n
type: "feed",\n
feed_type: \'opml\',\n
url: url\n
}\n
};\n
listbox_configuration.storage_list = [jio_options];\n
return gadget.props.listbox.render(listbox_configuration);\n
})\n
.push(function () {\n
if (gadget.props.listbox.property_dict.data_result.length > 0) {\n
return $("article.configure-b").removeClass("ui-content-hidden");\n
} else {\n
$(gadget.props.element.querySelector(\'.opml .ui-text-error\')).fadeIn(400);\n
gadget.props.element.querySelector(\'.opml .ui-text-error\')\n
.innerHTML = "ERROR: Failed to load URL!";\n
}\n
//return $(gadget.props.element.querySelector(".configure-b")).show();\n
}, function(error) {\n
$(gadget.props.element.querySelector(\'.opml .ui-text-error\')).fadeIn(400);\n
gadget.props.element.querySelector(\'.opml .ui-text-error\')\n
.innerHTML = "ERROR " + (error.target.status || \'\') + "Failed to load URL!";\n
console.log(error);\n
});\n
}\n
\n
function checkCredential(gadget, url, hash) {\n
// Verify if login and password are correct for this URL\n
return gadget.props.login_gadget.login(url, hash)\n
.then(function(result) {\n
if (result.status === \'OK\') {\n
return {status: \'OK\'};\n
} else {\n
return {status: \'KO\', msg: error.msg + \' (\' + url + \')\'};\n
}\n
}, function(error) {\n
return {status: \'KO\', msg: error.msg + \'(\' + url + \')\'};\n
});\n
}\n
\n
\n
function changeMonitorPassword(gadget, url, password, hash) {\n
var jio_gadget,\n
jio_options;\n
\n
url += (url.endsWith(\'/\') ? \'\':\'/\') + \'config/\';\n
jio_options = {\n
type: "query",\n
sub_storage: {\n
type: "drivetojiomapping",\n
sub_storage: {\n
type: "dav",\n
url: url,\n
basic_login: hash\n
}\n
}\n
};\n
gadget.props.gindex += 1;\n
return gadget.declareGadget("gadget_monitoring_jio.html",\n
{\n
element: gadget.props.element,\n
scope: \'jio_gadget\' + gadget.props.gindex,\n
sandbox: "public"\n
}\n
).push(function(new_gadget) {\n
jio_gadget = new_gadget;\n
jio_gadget.createJio(jio_options);\n
return jio_gadget.get(\'config\');\n
})\n
.push(function (doc) {\n
var i;\n
if (doc) {\n
for (i = 0; i < doc.length; i += 1) {\n
if (doc[i].key === \'monitor-password\') {\n
doc[i].value = password;\n
return jio_gadget.put(\'config.tmp\', doc);\n
}\n
}\n
}\n
return new Error("Cannot get document at : " % url);\n
})\n
.push(function (result) {\n
return {status: \'OK\'};\n
}, function (error) {\n
console.log(error);\n
return {status: \'ERROR\', code: error.target.status};\n
});\n
\n
}\n
\n
function testOPmlUrl(gadget, url, title) {\n
var jio_options = {\n
type: "query",\n
sub_storage: {\n
type: "feed",\n
feed_type: \'opml\',\n
url: url\n
}\n
};\n
gadget.props.jio_gadget.createJio(jio_options);\n
return gadget.props.jio_gadget.allDocs({})\n
.push(function (doc) {\n
if (!doc) {\n
console.log(doc);\n
gadget.props.element.querySelector(\'.msgtext-box\')\n
.innerHTML += "<span class=\'ui-text-error\'>" + url + " [ " + title + " ] is not reachable!</span><br/>";\n
return false;\n
} else {\n
return true;\n
}\n
});\n
}\n
\n
var gadget_klass = rJS(window),\n
templater = gadget_klass.__template_element,\n
\n
opml_url_template = Handlebars.compile(\n
templater.getElementById("template-opmlurl-list").innerHTML\n
);\n
\n
gadget_klass\n
.ready(function (g) {\n
......@@ -172,9 +368,29 @@
.push(function (element) {\n
g.props.element = element;\n
g.props.deferred = RSVP.defer();\n
g.props.urls = [];\n
g.props.gindex = 0;\n
return g.getSetting(\'jio_storage_name\');\n
});\n
})\n
.ready(function (gadget) {\n
return gadget.getDeclaredGadget("login_gadget")\n
.push(function (login_gadget) {\n
gadget.props.login_gadget = login_gadget;\n
});\n
})\n
.ready(function (gadget) {\n
return gadget.getDeclaredGadget("listbox")\n
.push(function (listbox_gadget) {\n
gadget.props.listbox = listbox_gadget;\n
});\n
})\n
.ready(function (gadget) {\n
return gadget.getDeclaredGadget("jio_gadget")\n
.push(function (jio_gadget) {\n
gadget.props.jio_gadget = jio_gadget;\n
});\n
})\n
.declareAcquiredMethod("updateHeader", "updateHeader")\n
.declareAcquiredMethod("redirect", "redirect")\n
.declareAcquiredMethod("reload", "reload")\n
......@@ -183,29 +399,42 @@
.declareMethod("render", function (options) {\n
var gadget = this;\n
return gadget.updateHeader({\n
title: "Connect to Monitor WebDAV",\n
title: "Configure monitoring instances URLs"/*,\n
back_url: "#page=main",\n
panel_action: false\n
panel_action: false*/\n
})\n
.push(function () {\n
if (options.url !== undefined && options.url !== \'\') {\n
return setjIODAVConfiguration(gadget, options);\n
} else {\n
return gadget.getSetting(\'jio_storage_name\')\n
.push(function (jio_storage_name) {\n
if (jio_storage_name === "DAV") {\n
return gadget.getSetting(\'jio_storage_description\')\n
.push(function (jio_storage_description) {\n
if (jio_storage_description !== undefined) {\n
gadget.props.element.querySelector("input[name=\'dav_url\']").value =\n
jio_storage_description.sub_storage.sub_storage.url;\n
gadget.props.element.querySelector("input[name=\'url\']").value = options.url;\n
}\n
return;\n
})\n
.push(function () {\n
return gadget.getSetting(\'monitor_url_description\');\n
})\n
.push(function (url_description_dict) {\n
var opml_list = [],\n
content,\n
key;\n
if (url_description_dict !== undefined) {\n
for (key in url_description_dict) {\n
opml_list.push({\n
key: key,\n
href: "#page=settings_configurator&url=" + url_description_dict[key].href,\n
link: url_description_dict[key].href,\n
title: url_description_dict[key].title || \'\'\n
});\n
}\n
});\n
}\n
content = opml_url_template({opml_list: opml_list});\n
gadget.props.element.querySelector("#config-manage .opml-tablelinks > tbody")\n
.innerHTML = content;\n
})\n
.push(function () {\n
if (!options.tab || options.tab !== \'manage\') {\n
options.tab = \'add\';\n
}\n
gadget.props.selected = options.tab;\n
return gadget.props.deferred.resolve();\n
});\n
})\n
......@@ -221,18 +450,336 @@
return gadget.props.deferred.promise;\n
})\n
.push(function () {\n
return loopEventListener(\n
gadget.props.element.querySelector(\'form\'),\n
return $(gadget.props.element.querySelector("a[href=\'#config-" + gadget.props.selected + "\']")).trigger(\'click\');\n
})\n
.push(function () {\n
var promise_list = [];\n
promise_list.push(loopEventListener(\n
gadget.props.element.querySelector(\'form.opml button.show\'),\n
\'click\',\n
true,\n
function () {\n
var url = gadget.props.element.querySelector("input[name=\'url\']").value;\n
gadget.props.element.querySelector(\'.opml .ui-text-error\')\n
.innerHTML = "";\n
$(gadget.props.element.querySelector(\'.opml .ui-text-error\')).fadeOut(400);\n
if (url && validateHttpUrl(url)) {\n
gadget.props.opml_url = url;\n
return loadUrlFromOPML(gadget, url);\n
} else {\n
$(gadget.props.element.querySelector(\'.opml .ui-text-error\')).fadeIn(400);\n
gadget.props.element.querySelector(\'.opml .ui-text-error\')\n
.innerHTML = "\'" + url + "\' is not a valid URL";\n
}\n
return false;\n
}\n
));\n
\n
promise_list.push(loopEventListener(\n
gadget.props.element.querySelector("table th input[name=\'opml-all\']"),\n
\'change\',\n
false,\n
function (element) {\n
if ($(element.target).prop(\'checked\')) {\n
return $(".opml-tablelinks tr td input[type=\'checkbox\']").prop(\'checked\', true);\n
} else {\n
return $(".opml-tablelinks tr td input[type=\'checkbox\']").prop(\'checked\', false);\n
}\n
}\n
));\n
\n
/*promise_list.push(loopEventListener(\n
gadget.props.element.querySelector("input[name=\'configure-auth\']"),\n
\'change\',\n
false,\n
function (element) {\n
if ($(element.target).prop(\'checked\')) {\n
gadget.props.element.querySelector(".configure input[name=\'username\']").value = "";\n
gadget.props.element.querySelector(".configure input[name=\'password\']").value = "";\n
return $(gadget.props.element.querySelector(".configure .auth-block")).slideDown();\n
} else {\n
return $(gadget.props.element.querySelector(".configure .auth-block")).slideUp();\n
}\n
}\n
));*/\n
promise_list.push(\n
$(gadget.props.element.querySelector("input[name=\'configure-auth\']")).bind( "change", function(event, ui) {\n
var input_login = gadget.props.element.querySelector(".configure input[name=\'username\']"),\n
input_pwd = gadget.props.element.querySelector(".configure input[name=\'password\']");\n
if ($(this).prop(\'checked\')) {\n
input_login.value = "";\n
input_pwd.value = "";\n
return $(gadget.props.element.querySelector(".configure .auth-block")).slideDown();\n
} else {\n
input_login.value = "-";\n
input_pwd.value = "-";\n
return $(gadget.props.element.querySelector(".configure .auth-block")).slideUp();\n
}\n
})\n
);\n
\n
promise_list.push(\n
$(gadget.props.element.querySelector("input[name=\'configure-newpwd\']")).bind( "change", function(event, ui) {\n
var confirm_pwd = gadget.props.element.querySelector(".configure input[name=\'new_password_confirm\']"),\n
new_pwd = gadget.props.element.querySelector(".configure input[name=\'new_password\']");\n
if ($(this).prop(\'checked\')) {\n
confirm_pwd.value = "";\n
new_pwd.value = "";\n
return $(gadget.props.element.querySelector(".configure .new-password")).slideDown();\n
} else {\n
confirm_pwd.value = "-";\n
new_pwd.value = "-";\n
return $(gadget.props.element.querySelector(".configure .new-password")).slideUp();\n
}\n
})\n
);\n
\n
promise_list.push(loopEventListener(\n
gadget.props.element.querySelector("a.opml-delete"),\n
\'click\',\n
true,\n
function (element) {\n
var key_list = [],\n
check_list = gadget.props.element.querySelectorAll(".opml-tablelinks tr td input[type=\'checkbox\']"),\n
i;\n
gadget.props.element.querySelector(\'.msgtext-box\')\n
.innerHTML = "";\n
if (!check_list) {\n
return false;\n
}\n
for (i = 0; i < check_list.length; i += 1) {\n
if ($(check_list[i]).prop(\'checked\')) {\n
key_list.push($(check_list[i]).prop(\'value\'));\n
}\n
}\n
if (key_list.length > 0) {\n
return gadget.getSetting(\'monitor_url_description\')\n
.push(function (url_description_dict) {\n
var i,\n
promise_list = [];\n
if(url_description_dict === undefined) {\n
url_description_dict = {};\n
}\n
for (i = 0; i < key_list.length; i += 1) {\n
if (url_description_dict.hasOwnProperty(key_list[i])) {\n
promise_list.push(\n
gadget.props.login_gadget.clearSettingFromParentUrl(url_description_dict[key_list[i]].href)\n
);\n
delete url_description_dict[key_list[i]];\n
}\n
}\n
return gadget.setSetting(\'monitor_url_description\', url_description_dict)\n
.push(function () {\n
return RSVP.all(promise_list);\n
})\n
.push(function () {\n
return gadget.reload();\n
});\n
});\n
}\n
}\n
));\n
\n
promise_list.push(loopEventListener(\n
gadget.props.element.querySelector("a.opml-test"),\n
\'click\',\n
true,\n
function (element) {\n
var key_list = [],\n
check_list = gadget.props.element.querySelectorAll(".opml-tablelinks tr td input[type=\'checkbox\']"),\n
i;\n
if (!check_list) {\n
gadget.props.element.querySelector(\'.msgtext-box\')\n
.innerHTML = "<span class=\'ui-text-info\'>No URL selected!</span>";\n
}\n
for (i = 0; i < check_list.length; i += 1) {\n
if ($(check_list[i]).prop(\'checked\')) {\n
key_list.push($(check_list[i]).prop(\'value\'));\n
}\n
}\n
if (key_list.length <= 0) {\n
gadget.props.element.querySelector(\'.msgtext-box\')\n
.innerHTML = "<span class=\'ui-text-info\'>No URL selected!</span>";\n
return;\n
}\n
gadget.props.element.querySelector(\'.msgtext-box\')\n
.innerHTML = "";\n
return gadget.getSetting(\'monitor_url_description\')\n
.push(function (url_description_dict) {\n
var i,\n
promise_list = [];\n
if(url_description_dict === undefined) {\n
url_description_dict = {};\n
}\n
$(gadget.props.element.querySelector(\'.loadspinner\')).removeClass(\'ui-content-hidden\');\n
for (i = 0; i < key_list.length; i += 1) {\n
if (url_description_dict.hasOwnProperty(key_list[i])) {\n
promise_list.push(testOPmlUrl(gadget, url_description_dict[key_list[i]].href, url_description_dict[key_list[i]].title));\n
}\n
}\n
return RSVP.all(promise_list);\n
})\n
.push(function (result) {\n
var i,\n
state = true;\n
for (i = 0; i < result.length; i += 1) {\n
if (! result[i]) {\n
state = false;\n
break;\n
}\n
}\n
if (state) {\n
gadget.props.element.querySelector(\'.msgtext-box\')\n
.innerHTML = "<span class=\'ui-text-o\'>All OPML URLs was successfully tested.</span>";\n
}\n
$(gadget.props.element.querySelector(\'.loadspinner\')).addClass(\'ui-content-hidden\');\n
});\n
}\n
));\n
\n
promise_list.push(loopEventListener(\n
gadget.props.element.querySelector(\'form.configure\'),\n
\'submit\',\n
true,\n
function () {\n
return setjIODAVConfiguration(gadget);\n
var root_name = \'\',\n
credential_dict = {},\n
username = \'\',\n
password = \'\',\n
old_password,\n
new_password = \'\',\n
cnew_password = \'\',\n
reload = true,\n
rows_list = gadget.props.listbox.property_dict.data_result,\n
config_promise_list = [];\n
\n
if (rows_list.length > 0) {\n
root_name = rows_list[0].opml_title;\n
}\n
gadget.props.element.querySelector(\'.configure .ui-text-error\')\n
.innerHTML = \'\';\n
if ($(gadget.props.element.querySelector("input[name=\'configure-newpwd\']")).prop(\'checked\')) {\n
new_password = gadget.props.element.querySelector("input[name=\'new_password\']").value;\n
cnew_password = gadget.props.element.querySelector("input[name=\'new_password_confirm\']").value;\n
if (new_password !== cnew_password) {\n
gadget.props.element.querySelector(\'.configure .ui-text-error\')\n
.innerHTML = \'The new password and it confirmation are differents!\';\n
return false;\n
}\n
}\n
return new RSVP.Queue()\n
.push(function () {\n
var promise_list = [],\n
i;\n
if ($(gadget.props.element.querySelector("input[name=\'configure-auth\']")).prop(\'checked\')) {\n
username = gadget.props.element.querySelector("input[name=\'username\']").value;\n
password = gadget.props.element.querySelector("input[name=\'password\']").value;\n
for (i = 0; i < rows_list.length; i += 1) {\n
if (rows_list[i].htmlurl) {\n
promise_list.push(checkCredential(\n
gadget,\n
rows_list[i].url.replace(\'public\', \'private\'),\n
btoa(username + \':\' + password)\n
));\n
}\n
}\n
}\n
return RSVP.all(promise_list);\n
})\n
.push(function (status_list) {\n
var i,\n
error_msg = \'\';\n
for (i = 0; i < status_list.length; i += 1) {\n
if (status_list[i].status !== \'OK\') {\n
error_msg += \'Login/password invalid for: \' + rows_list[i].title + \'. \' + status_list[i].msg + \'<br/>\';\n
}\n
}\n
return error_msg;\n
})\n
.push(function (error_msg) {\n
var tmp,\n
i;\n
if (error_msg !== \'\') {\n
gadget.props.element.querySelector(\'.configure .ui-text-error\')\n
.innerHTML = error_msg;\n
new_password = \'\';\n
reload = false;\n
return error_msg;\n
}\n
if (username !== \'\' && password !== \'\') {\n
\n
if (new_password !== \'\') {\n
old_password = password;\n
password = new_password;\n
}\n
for (i = 0; i < rows_list.length; i += 1) {\n
if (validateHttpUrl(rows_list[i].url)) {\n
tmp = {\n
hash: btoa(username + \':\' + password),\n
url: rows_list[i].url.replace(\'public\', \'private\'), // XXX - Need to fix this (replace())\n
parent_url: gadget.props.opml_url\n
//parent_title: root_name\n
};\n
credential_dict[ hashCode( tmp.url ) + \'\' ] = tmp;\n
}\n
}\n
if (credential_dict) {\n
config_promise_list.push(\n
gadget.props.login_gadget.setUrlDict(credential_dict)\n
);\n
}\n
}\n
config_promise_list.push(\n
setUrlConfiguration(gadget, gadget.props.opml_url, root_name)\n
);\n
return RSVP.all(config_promise_list);\n
})\n
.push(function (result) {\n
// change password if needed\n
var key,\n
promise_list = [];\n
if (new_password !== \'\') {\n
for (key in credential_dict) {\n
promise_list.push(\n
changeMonitorPassword(\n
gadget,\n
credential_dict[key].url,\n
new_password,\n
btoa(username + \':\' + old_password))\n
);\n
}\n
}\n
return RSVP.all(promise_list);\n
})\n
.push(function (result_list) {\n
var i,\n
has_error = false;\n
for (i = 0; i < result_list.length; i += 1) {\n
if (result_list[i].status === \'ERROR\') {\n
gadget.props.element.querySelector(\'.configure .ui-text-error\')\n
.innerHTML += \'ERROR \' + result_list[i].code + \': Failed to save new password!\';\n
has_error = true;\n
}\n
}\n
if (! has_error && reload) {\n
if (gadget.props.selected !== "manage") {\n
return gadget.redirect({\n
page: \'settings_configurator\',\n
tab: \'manage\'\n
});\n
} else {\n
return gadget.reload();\n
}\n
}\n
});\n
}\n
));\n
\n
return RSVP.all(promise_list);\n
});\n
});\n
\n
}(window, rJS));
}(window, rJS, RSVP, $, btoa));
]]></string> </value>
</item>
......@@ -369,7 +916,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.6590.62764.8652</string> </value>
<value> <string>949.65344.30338.29747</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -387,7 +934,7 @@
</tuple>
<state>
<tuple>
<float>1455288950.05</float>
<float>1458641325.56</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -140,9 +140,6 @@
})\n
.declareMethod(\'render\', function (options) {\n
var gadget = this,\n
jio_gadget,\n
listbox,\n
monitor_id = \'monitor.hal\',\n
header = {\n
"title": \'Monitoring Promise Status\'\n
},\n
......@@ -150,46 +147,39 @@
search_page: \'status_list\',\n
search: options.search,\n
filter: options.filter || \'\',\n
column_link: {select: \'source\'},\n
column_id: {select: \'title\'},\n
column_list: [{\n
title: \'Title\',\n
select: \'title\'\n
}, {\n
title: \'Instance\',\n
select: \'instance\'\n
select: \'siteTitle\'\n
}, {\n
title: \'Hosting Subscription\',\n
select: \'hosting_subscription\'\n
select: \'reference\'\n
}, {\n
select: \'start-date\',\n
select: \'date\',\n
title: \'Date\'\n
}, {\n
select: \'message\',\n
title: \'Output\',\n
css_class: \'text-overview\'\n
}, {\n
select: \'status\',\n
select: \'category\',\n
title: \'Status\',\n
template: \' <span> <i class="ui-status-icon ui-status-{{value}}"></i></span>\',\n
css_class: \'ui-text-center\'\n
}],\n
\'sort_column_list\': [\n
{select: \'status\', title: \'Status\'},\n
sort_column_list: [\n
{select: \'category\', title: \'Status\'},\n
{select: \'title\', title: \'Title\'}\n
],\n
query: {\n
select_list: [\'title\', \'instance\', \'hosting_subscription\', \'status\',\n
\'start-date\', \'message\'],\n
query: \'_id:(NOT "monitor.hal") AND _id:(NOT "monitor.global")\',\n
sort_on: [["status", "ascending"]]\n
}\n
},\n
jio_options = {\n
type: "query",\n
sub_storage: {\n
type: "drivetojiomapping",\n
sub_storage: {\n
type: "dav"\n
}\n
select_list: [\'title\', \'siteTitle\', \'reference\', \'category\',\n
\'date\', \'message\', \'link\', \'source\'],\n
//query: \'_id:(NOT "monitor.hal") AND _id:(NOT "monitor.global")\',\n
sort_on: [["category", "ascending"]]\n
}\n
};\n
\n
......@@ -200,61 +190,31 @@
}\n
return gadget.updateHeader(header)\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
.push(function (collection_dict) {\n
var url_promise_list = [],\n
listbox_storage_list = [],\n
related_monitor_url,\n
.push(function (url_list) {\n
var listbox_storage_list = [],\n
i;\n
\n
related_monitor_url = function (storage_url) {\n
var jio_config = $.extend(true, {}, jio_options);\n
jio_config.sub_storage.sub_storage.url = storage_url;\n
gadget.property_dict.jio_gadget.createJio(jio_config);\n
return gadget.property_dict.jio_gadget.get(monitor_id)\n
.push(function (collection_dict) {\n
// XX Using public URL here!!\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
return public_storage_url;\n
});\n
};\n
\n
for (i = 0; i < url_list.length; i++) {\n
if (url_list[i]) {\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
type: "query",\n
sub_storage: {\n
type: "feed",\n
feed_type: \'rss\',\n
url: url_list[i]\n
}\n
});\n
}\n
}\n
return new RSVP.Queue()\n
.push(function () {\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
.declareAcquiredMethod("getSetting", "getSetting")\n
.declareAcquiredMethod("updateHeader", "updateHeader")\n
......@@ -399,7 +359,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.953.1113.62702</string> </value>
<value> <string>949.58584.63587.19677</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -417,7 +377,7 @@
</tuple>
<state>
<tuple>
<float>1454950900.5</float>
<float>1458314108.86</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -130,6 +130,18 @@
/////////////////////////////////////////////////////////////////\n
// some methods\n
/////////////////////////////////////////////////////////////////\n
function getJioAllDocument(gadget, scope, jio_options, query) {\n
return gadget.declareGadget("gadget_monitoring_jio.html",\n
{\n
scope: scope,\n
sandbox: "public"\n
}\n
)\n
.push(function(new_gadget) {\n
new_gadget.createJio(jio_options);\n
return new_gadget.allDocs(query);\n
});\n
}\n
\n
gadget_klass\n
\n
......@@ -138,7 +150,8 @@
/////////////////////////////////////////////////////////////////\n
.ready(function (gadget) {\n
gadget.property_dict = {\n
render_deferred: RSVP.defer()\n
render_deferred: RSVP.defer(),\n
data_result: []\n
};\n
})\n
\n
......@@ -192,30 +205,28 @@
search_list = [],\n
translated_column_list = [],\n
all_docs_result_list = [],\n
use_storage_list = false,\n
jio_options = {},\n
all_docs = function (query, storage_list) {\n
var promise_list = [],\n
i;\n
if (storage_list === undefined) {\n
return [gadget.jio_allDocs(query)];\n
} else if (storage_list === []) {\n
return [];\n
}\n
use_storage_list = true;\n
for (i = 0; i < storage_list.length; i += 1) {\n
jio_options = {\n
type: "query",\n
sub_storage: {\n
type: "drivetojiomapping",\n
sub_storage: {\n
type: "dav",\n
url: storage_list[i].url\n
gadget.property_dict.jio_gadget.createJio(storage_list[i]);\n
/*promise_list.push(\n
getJioAllDocument(gadget, \'jio_gadget\' + i, storage_list[i], query)\n
);*/\n
promise_list.push(gadget.property_dict.jio_gadget.allDocs(query));\n
}\n
if (! option_dict.column_link) {\n
option_dict.column_link = {};\n
}\n
};\n
gadget.property_dict.jio_gadget.createJio(jio_options);\n
promise_list.push(gadget.property_dict.jio_gadget.allDocs(query));\n
if (!option_dict.column_id) {\n
option_dict.column_id = {};\n
}\n
\n
\n
return new RSVP.Queue()\n
.push(function () {\n
return RSVP.all(promise_list);\n
......@@ -228,16 +239,24 @@
// filter query\n
if (option_dict.filter && option_dict.filter !== \'\') {\n
for (j = 0; j < option_dict.filter.split(\'+\').length; j += 1) {\n
filter_part_list.push(\'(status:"\' + option_dict.filter.split(\'+\')[j].toUpperCase() + \'")\');\n
filter_part_list.push(\'(category:"\' + option_dict.filter.split(\'+\')[j].toUpperCase() + \'")\');\n
}\n
if (option_dict.query.query) {\n
option_dict.query.query += \' AND (\' + filter_part_list.join(\' OR \') + \')\';\n
} else {\n
option_dict.query.query = \'(\' + filter_part_list.join(\' OR \') + \')\';\n
}\n
}\n
// Create the search query\n
if (option_dict.search) {\n
for (k = 0, k_len = option_dict.column_list.length; k < k_len; k += 1) {\n
search_list.push(option_dict.column_list[k].select + \':"%\' + option_dict.search + \'%"\');\n
}\n
if (option_dict.query.query) {\n
option_dict.query.query = \'(\' + search_list.join(\' OR \') + \') AND \' + option_dict.query.query;\n
} else {\n
option_dict.query.query = \'(\' + search_list.join(\' OR \') + \')\';\n
}\n
}\n
//return gadget.jio_allDocs(option_dict.query)\n
return all_docs(option_dict.query, option_dict.storage_list)\n
......@@ -247,17 +266,32 @@
i_len,\n
i,\n
j,\n
j_len;\n
j_len,\n
getUrlDict = function (row) {\n
var link = option_dict.column_link.select || \'\',\n
id = option_dict.column_id.select || \'\',\n
result;\n
\n
result = {\n
jio_key: (id !== \'\' && row.value.hasOwnProperty(id)) ? row.value[id] : row.id,\n
page: \'view\'\n
};\n
if (link && row.value.hasOwnProperty(link)) {\n
result.jio_for = row.value[link];\n
}\n
return result;\n
};\n
\n
for (j = 0, j_len = result_list.length; j < j_len; j += 1) {\n
if (! result_list[j]) {\n
continue;\n
}\n
all_docs_result_list.push(result_list[j]);\n
promise_url_list = [];\n
for (i = 0, i_len = result_list[j].data.total_rows; i < i_len; i += 1) {\n
promise_url_list.push(gadget.getUrlFor({\n
jio_key: result_list[j].data.rows[i].id,\n
jio_for: (!use_storage_list) ? \'\' : option_dict.storage_list[j].url, // XXX To check!!\n
page: \'view\'\n
}));\n
promise_url_list.push(gadget.getUrlFor(\n
getUrlDict(result_list[j].data.rows[i])\n
));\n
}\n
promise_list.push(RSVP.all(promise_url_list));\n
}\n
......@@ -274,9 +308,11 @@
j,\n
k;\n
\n
gadget.property_dict.data_result = [];\n
// build handlebars object\n
for (k = 0; k < all_docs_result_list.length; k += 1) {\n
for (j = 0, j_len = all_docs_result_list[k].data.total_rows; j < j_len; j += 1) {\n
gadget.property_dict.data_result.push(all_docs_result_list[k].data.rows[j].value);\n
cell_list = [];\n
for (i = 0, i_len = option_dict.column_list.length; i < i_len; i += 1) {\n
current_value = all_docs_result_list[k].data.rows[j].value[option_dict.column_list[i].select];\n
......@@ -305,6 +341,10 @@
if (option_dict.enable_search !== undefined) {\n
enable_search = option_dict.enable_search;\n
}\n
if (!enable_search) {\n
$(gadget.property_dict.element.querySelector(".custom-grid"))\n
.removeClass(\'ui-shadow\').css(\'padding\', \'0\');\n
}\n
content += listbox_widget_table({\n
widget_theme : option_dict.widget_theme,\n
search: option_dict.search,\n
......@@ -546,7 +586,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>948.59182.37059.53913</string> </value>
<value> <string>949.59889.7208.51251</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -564,7 +604,7 @@
</tuple>
<state>
<tuple>
<float>1454512378.26</float>
<float>1458314048.86</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -180,7 +180,12 @@
<div class="overview-header">\n
<div class=\'content-title ui-instance-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 class="commands">\n
\n
......@@ -190,8 +195,9 @@
<div class="content-details">\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
<div class="padding-lr-10">\n
<div class="ui-field-contain">\n
<div class="padding-10">\n
<div class="ui-grid-a ui-responsive">\n
<div class="ui-block-a">\n
<fieldset data-role="controlgroup" data-type="horizontal">\n
{{#if resource_url }}\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
......@@ -199,6 +205,10 @@
{{#if process_url }}\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}}\n
</fieldset>\n
</div>\n
<div class="ui-block-b">\n
<fieldset data-role="controlgroup" data-type="horizontal">\n
{{#if public_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
{{/if}}\n
......@@ -210,6 +220,7 @@
{{/if}}\n
</fieldset>\n
</div>\n
</div>\n
<table data-role="table" data-mode="columntoggle" class="ui-responsive table-stroke">\n
<tr>\n
<th><i class="fa fa-tachometer"></i> <strong>Status</strong></th>\n
......@@ -241,7 +252,7 @@
<div style="overflow: auto;" class="padding-lr-10">\n
<table data-role="table" data-mode="columntoggle" class="table-stroke">\n
{{#each promise_list}}\n
<tr title="{{message}}">\n
<tr>\n
<td><a href="{{href}}">{{title}}</a></td>\n
<td style="text-align: center;">{{time}}</td>\n
<td style="text-align: center;"><span class="label label-{{status}}">{{status}}</span></td>\n
......@@ -446,7 +457,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.6292.13164.54971</string> </value>
<value> <string>949.64074.33189.21691</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -464,7 +475,7 @@
</tuple>
<state>
<tuple>
<float>1455272629.34</float>
<float>1458566491.46</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -221,7 +221,7 @@
search_string += \' OR (\' + option_dict.search_column_list[k].select +\n
\':"%\' + option_dict.search + \'%"\' + \')\';\n
}\n
option_dict.query.query = search_string + \' AND \' + option_dict.query.query;\n
option_dict.query.query = \'(\' + search_string + \') AND \' + option_dict.query.query;\n
}\n
\n
getPartialData = function(dav_url, key) {\n
......@@ -236,65 +236,38 @@
}\n
};\n
gadget.property_dict.jio_gadget.createJio(jio_options);\n
return gadget.property_dict.jio_gadget.get(key)\n
return gadget.property_dict.jio_gadget.allDocs(option_dict.query)\n
.push(function (monitor_dict) {\n
if (monitor_dict.title && monitor_dict._links.monitor && monitor_dict._links.monitor.href) {\n
all_document_list.push(monitor_dict);\n
monitor_url_list.push(monitor_dict._links.monitor.href);\n
var i;\n
if (monitor_dict && monitor_dict.data.total_rows > 0) {\n
for (i = 0; i < monitor_dict.data.total_rows; i += 1) {\n
all_document_list.push(monitor_dict.data.rows[i].value);\n
}\n
} else {\n
// XXX\n
console.log("Failed to get monitor.global at " + dav_url);\n
}\n
return;\n
});\n
};\n
\n
\n
// store initial configuration\n
gadget.property_dict.option_dict = option_dict;\n
\n
return new RSVP.Queue()\n
.push(function () {\n
var jio_options;\n
if (option_dict.data_url !== undefined && option_dict.data_url !== \'\') {\n
jio_options = {\n
type: "query",\n
sub_storage: {\n
type: "drivetojiomapping",\n
sub_storage: {\n
type: "dav",\n
url: option_dict.data_url\n
}\n
}\n
};\n
gadget.property_dict.jio_gadget.createJio(jio_options);\n
//jio_getdocs = gadget.property_dict.jio_gadget.allDocs;\n
} else {\n
jio_getdocs = gadget.jio_allDocs;\n
}\n
return gadget.property_dict.jio_gadget.get(option_dict.data_id)\n
.push(function (monitor_dict) {\n
var promise_list = [],\n
j;\n
\n
/* Filter this result here !! */\n
\n
if (monitor_dict.title && monitor_dict._links.monitor && monitor_dict._links.monitor.href) {\n
all_document_list.push(monitor_dict);\n
monitor_url_list.push(monitor_dict._links.monitor.href);\n
}\n
if (monitor_dict._links.related_monitor !== undefined &&\n
monitor_dict._links.related_monitor !== []) {\n
for (j = 0; j < monitor_dict._links.related_monitor.length; j += 1) {\n
promise_list.push(\n
getPartialData(\n
monitor_dict._links.related_monitor[j].href,\n
option_dict.data_id\n
)\n
);\n
return gadget.property_dict.jio_gadget.getMonitorUrlList();\n
})\n
.push(function (url_list) {\n
var i,\n
promise_list = [];\n
for (i = 0; i < url_list.length; i += 1) {\n
if (url_list[i]) {\n
promise_list.push(getPartialData(url_list[i], option_dict.data_id));\n
}\n
}\n
return new RSVP.Queue()\n
.push(function () {\n
return RSVP.all(promise_list);\n
});\n
});\n
})\n
.push(function () {\n
var promise_list = [],\n
......@@ -387,7 +360,7 @@
index = parseInt($(element).attr(\'rel\'), 10),\n
private_link;\n
\n
if (index !== isNaN && (gadget.property_dict.document_list.length > index)) {\n
if (!isNaN(index) && (gadget.property_dict.document_list.length > index)) {\n
private_link = gadget.property_dict.document_list[index]._links.monitor.href;\n
} else {\n
return;\n
......@@ -502,6 +475,8 @@
.innerHTML = content;\n
gadget.property_dict.element.querySelector(".promise-list")\n
.innerHTML = promise_content;\n
return $(element.querySelectorAll(\'fieldset[data-role="controlgroup"]\'))\n
.controlgroup().controlgroup(\'refresh\');\n
});\n
}\n
return false;\n
......@@ -737,7 +712,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>949.6359.56330.33331</string> </value>
<value> <string>949.64078.48455.55876</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -755,7 +730,7 @@
</tuple>
<state>
<tuple>
<float>1455275625.09</float>
<float>1458566498.07</float>
<string>UTC</string>
</tuple>
</state>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>classification/collaborative/public</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>jio_dev_rssfeed_storage.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jio_dev_rssfeed_storage_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*\n
* Copyright 2013, Nexedi SA\n
* Released under the LGPL license.\n
* http://www.gnu.org/licenses/lgpl.html\n
*/\n
\n
/*jslint nomen: true*/\n
/*global jIO, RSVP, DOMParser, Blob */\n
\n
// JIO Rss feed Description :\n
// {\n
// type: "rss",\n
// url: {string},\n
// basic_login: {string} // Basic authentication\n
// }\n
\n
// NOTE: to get the authentication type ->\n
// curl --verbose -X OPTION http://domain/\n
// In the headers: "WWW-Authenticate: Basic realm="DAV-upload"\n
\n
(function (jIO, RSVP, DOMParser, Blob) {\n
"use strict";\n
\n
function ajax(storage, options) {\n
if (options === undefined) {\n
options = {};\n
}\n
if (storage._authorization !== undefined) {\n
if (options.headers === undefined) {\n
options.headers = {};\n
}\n
options.headers.Authorization = storage._authorization;\n
}\n
\n
if (storage._with_credentials !== undefined) {\n
if (options.xhrFields === undefined) {\n
options.xhrFields = {};\n
}\n
options.xhrFields.withCredentials = storage._with_credentials;\n
}\n
// if (start !== undefined) {\n
// if (end !== undefined) {\n
// headers.Range = "bytes=" + start + "-" + end;\n
// } else {\n
// headers.Range = "bytes=" + start + "-";\n
// }\n
// }\n
return new RSVP.Queue()\n
.push(function () {\n
return jIO.util.ajax(options);\n
});\n
}\n
\n
function restrictDocumentId(id) {\n
if (id.indexOf("/") !== 0) {\n
throw new jIO.util.jIOError("id " + id + " is forbidden (no begin /)",\n
400);\n
}\n
if (id.lastIndexOf("/") !== (id.length - 1)) {\n
throw new jIO.util.jIOError("id " + id + " is forbidden (no end /)",\n
400);\n
}\n
return id;\n
}\n
\n
function restrictAttachmentId(id) {\n
if (id.indexOf("/") !== -1) {\n
throw new jIO.util.jIOError("attachment " + id + " is forbidden",\n
400);\n
}\n
}\n
\n
function getFeedEntry (element, entry) {\n
var dummy = {getAttribute: function () { return; }},\n
item = {};\n
\n
item.link = (entry.querySelector("item > link") || dummy).textContent;\n
item.date = (entry.querySelector("item > pubDate") || dummy).textContent;\n
item.subject = (entry.querySelector("item > title") || dummy).textContent;\n
item.author = (entry.querySelector("item > author") || dummy).textContent;\n
item.category = (entry.querySelector("item > category") || dummy).textContent;\n
item.message = (entry.querySelector("item > comments") || dummy).textContent;\n
item.source = (entry.querySelector("item > source") || dummy).getAttribute(\'url\');\n
item.title = (entry.querySelector("item > source") || dummy).textContent;\n
item.description = (entry.querySelector("item > description") || dummy).textContent;\n
item.guid = (entry.querySelector("item > guid") || dummy).textContent || (entry.querySelector("item > link") || dummy).textContent;\n
return item;\n
}\n
\n
function parseRssFeedEntry (element, id) {\n
var dummy = {getAttribute: function () { return; }},\n
item = {},\n
rss_items,\n
tmp;\n
\n
rss_items = element.querySelectorAll("rss>channel>item");\n
\n
if (id !== undefined || id !== null) {\n
[].forEach.call(rss_items, function(entry) {\n
tmp = (entry.querySelector("item > guid") || dummy).textContent || (entry.querySelector("item > link") || dummy).textContent;\n
if (tmp === id) {\n
item = getFeedEntry(element, entry);\n
item.siteTitle = (element.querySelector("rss > channel > title") || dummy).textContent;\n
item.reference = (element.querySelector("rss > channel > description") || dummy).textContent;\n
item.siteLink = (element.querySelector("rss > channel > link") || dummy).textContent;\n
item.lastBuildDate = (element.querySelector("rss > channel > lastBuildDate") || dummy).textContent;\n
}\n
});\n
} else {\n
return {};\n
}\n
return item;\n
}\n
\n
function parseRssFeedEntryList (element) {\n
var dummy = {getAttribute: function () { return; }},\n
items = [];\n
\n
[].forEach.call(element.querySelectorAll("rss > channel > item"), function (entry) {\n
var item = {};\n
\n
item = getFeedEntry(element, entry);\n
item.siteTitle = (element.querySelector("rss > channel > title") || dummy).textContent;\n
item.siteLink = (element.querySelector("rss > channel > link") || dummy).textContent;\n
item.reference = (element.querySelector("rss > channel > description") || dummy).textContent;\n
item.lastBuildDate = (element.querySelector("rss > channel > lastBuildDate") || dummy).textContent;\n
if (item.guid !== undefined && item.guid !== "") {\n
items.push({\n
id: item.guid,\n
value: item\n
});\n
}\n
});\n
//items.reverse();\n
return items;\n
}\n
\n
function getOpmlFeedEntryAsDict(outline) {\n
var entry_dict = {};\n
entry_dict.title = outline.getAttribute(\'title\') || \'\';\n
entry_dict.htmlurl = outline.getAttribute(\'htmlUrl\') || \'\';\n
entry_dict.xmlurl = outline.getAttribute(\'xmlUrl\') || \'\';\n
entry_dict.url = outline.getAttribute(\'url\') || \'\';\n
entry_dict.text = outline.getAttribute(\'text\') || \'\';\n
entry_dict.type = outline.getAttribute(\'type\') || \'\';\n
entry_dict.version = outline.getAttribute(\'version\') || \'\';\n
return entry_dict;\n
}\n
\n
function parseOpmlFeedEntryList (doc, id) {\n
var outlines = doc.getElementsByTagName(\'outline\'),\n
dummy = {getAttribute: function () { return; }},\n
i,\n
max,\n
tmp = {},\n
opml_title,\n
create_date,\n
modified_date,\n
feeds = [];\n
\n
opml_title = (doc.getElementsByTagName(\'title\')[0] || dummy).textContent;\n
create_date = (doc.getElementsByTagName(\'dateCreated\')[0] || dummy).textContent;\n
modified_date = (doc.getElementsByTagName(\'dateModified\')[0] || dummy).textContent;\n
if (id !== undefined) {\n
for (i = 0, max = outlines.length; i < max; i += 1) {\n
if (outlines[i].getAttribute(\'htmlUrl\') === id || outlines[i].getAttribute(\'xmlUrl\') === id) {\n
tmp = getOpmlFeedEntryAsDict(outlines[i]);\n
tmp.opml_title = opml_title;\n
tmp.create_date = create_date;\n
tmp.modified_date = modified_date;\n
}\n
}\n
return tmp;\n
}\n
for (i = 0, max = outlines.length; i < max; i += 1) {\n
\n
if (!outlines[i].hasChildNodes()) {\n
tmp = getOpmlFeedEntryAsDict(outlines[i]);\n
\n
tmp.opml_title = opml_title;\n
tmp.create_date = create_date;\n
tmp.modified_date = modified_date;\n
if (tmp.htmlurl !== \'\' || tmp.xmlurl !== \'\') {\n
feeds.push({\n
id: tmp.htmlurl || tmp.xmlurl,\n
value: tmp\n
});\n
}\n
}\n
}\n
return feeds;\n
}\n
\n
/**\n
* The JIO RssFeed Storage extension\n
*\n
* @class RssFeed\n
* @constructor\n
*/\n
function RssFeed(spec) {\n
if (typeof spec.url !== \'string\') {\n
throw new TypeError("RssFeed \'url\' is not of type string");\n
}\n
this._url = spec.url;\n
if (typeof spec.feed_type !== \'string\') {\n
throw new TypeError("RssFeed \'feed_type\' is not of type string. Should be \'rss\', \'atom\' or \'opml\'");\n
}\n
this._type = spec.feed_type;\n
// XXX digest login\n
if (typeof spec.basic_login === \'string\') {\n
this._authorization = "Basic " + spec.basic_login;\n
}\n
this._with_credentials = spec.with_credentials;\n
}\n
\n
RssFeed.prototype.get = function (id) {\n
var context = this;\n
//id = restrictDocumentId(id);\n
\n
return new RSVP.Queue()\n
.push(function () {\n
return ajax(context, {\n
type: "GET",\n
url: context._url,\n
dataType: "text"\n
});\n
})\n
.push(function (response) {\n
var element;\n
element = new DOMParser().parseFromString(\n
response.target.responseText,\n
"text/xml"\n
);\n
if (context._type == \'rss\') {\n
return parseRssFeedEntry(element, id);\n
} else if (context._type === \'opml\') {\n
return parseOpmlFeedEntryList(element, id);\n
} else {\n
throw new jIO.util.jIOError("Cannot parse document", 501);\n
}\n
}, function (error) {\n
if ((error.target !== undefined) &&\n
(error.target.status === 404)) {\n
throw new jIO.util.jIOError("Cannot find document", 404);\n
}\n
throw error;\n
});\n
};\n
\n
RssFeed.prototype.hasCapacity = function (capacity) {\n
return (capacity === "list");\n
};\n
\n
RssFeed.prototype.buildQuery = function () {\n
var context = this;\n
return new RSVP.Queue()\n
.push(function () {\n
return ajax(context, {\n
type: "GET",\n
url: context._url,\n
dataType: "text"\n
});\n
})\n
.push(function (response) {\n
var element,\n
result_dict;\n
element = new DOMParser().parseFromString(\n
response.target.responseText,\n
"text/xml"\n
);\n
if (context._type == \'rss\') {\n
result_dict = parseRssFeedEntryList(element);\n
} else if (context._type === \'opml\') {\n
result_dict = parseOpmlFeedEntryList(element);\n
} else {\n
throw new jIO.util.jIOError("Cannot parse document", 501);\n
}\n
return result_dict;\n
}, function (error) {\n
if ((error.target !== undefined) &&\n
(error.target.status === 404)) {\n
throw new jIO.util.jIOError("Cannot find document", 404);\n
}\n
throw error;\n
});\n
\n
};\n
\n
RssFeed.prototype.allAttachments = function (id) {\n
\n
var context = this;\n
id = restrictDocumentId(id);\n
\n
return new RSVP.Queue()\n
.push(function () {\n
return ajax(context, {\n
type: "GET",\n
url: context._url + id,\n
dataType: "text"\n
});\n
})\n
\n
\n
.push(function (response) {\n
// Extract all meta informations and return them to JSON\n
\n
var i,\n
attachment = {},\n
id,\n
attachment_list = new DOMParser().parseFromString(\n
response.target.responseText,\n
"text/xml"\n
).querySelectorAll(\n
"D\\\\:response, response"\n
);\n
\n
// exclude parent folder and browse\n
for (i = 1; i < attachment_list.length; i += 1) {\n
// XXX Only get files for now\n
id = attachment_list[i].querySelector("D\\\\:href, href").\n
textContent.split(\'/\').slice(-1)[0];\n
// XXX Ugly\n
if ((id !== undefined) && (id !== "")) {\n
attachment[id] = {};\n
}\n
}\n
return attachment;\n
\n
}, function (error) {\n
if ((error.target !== undefined) &&\n
(error.target.status === 404)) {\n
throw new jIO.util.jIOError("Cannot find document", 404);\n
}\n
throw error;\n
});\n
\n
};\n
\n
RssFeed.prototype.getAttachment = function (id, name) {\n
var context = this;\n
id = restrictDocumentId(id);\n
restrictAttachmentId(name);\n
\n
return new RSVP.Queue()\n
.push(function () {\n
return ajax(context, {\n
type: "GET",\n
url: context._url + id + name,\n
dataType: "blob"\n
});\n
})\n
.push(function (response) {\n
return new Blob(\n
[response.target.response || response.target.responseText],\n
{"type": response.target.getResponseHeader(\'Content-Type\') ||\n
"application/octet-stream"}\n
);\n
}, function (error) {\n
if ((error.target !== undefined) &&\n
(error.target.status === 404)) {\n
throw new jIO.util.jIOError("Cannot find attachment: "\n
+ id + " , " + name,\n
404);\n
}\n
throw error;\n
});\n
\n
};\n
\n
jIO.addStorage(\'feed\', RssFeed);\n
\n
}(jIO, RSVP, DOMParser, Blob));
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Jio Rss Feed Storage</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</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>
</pickle>
</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>1456160046.44</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>949.23984.20073.16930</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>1457363302.84</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>1456157682.63</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
web_page_module/gadget_monitoring_*
web_site_module/monitoring_render_js
web_page_module/jio_dev_rssfeed_storage_js
web_site_module/monitoring_render_js/**
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/magnific-popup.css
\ No newline at end of file
web_page_module/gadget_monitoring_*
web_site_module/monitoring_render_js
web_page_module/jio_dev_rssfeed_storage_js
web_site_module/monitoring_render_js/**
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/magnific-popup.css
\ No newline at end of file
web_page_module/chart_min_js
web_page_module/gadget_erp5_graph_*
web_page_module/gadget_monitoring_*
web_page_module/jio_dev_rssfeed_storage_js
web_page_module/jquery.magnific-popup.min.js
web_page_module/magnific-popup.css
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