Commit 3603d4cd authored by Vincent Bechu's avatar Vincent Bechu

[erp5_officejs] Add safereapair storage in erp5 configurator

Update caches and jio gadget
parent 81326fc1
......@@ -11,6 +11,7 @@
<script src="jiodev.js" type="text/javascript"></script>
<script src="jio_mappingstorage.js" type="text/javascript"></script>
<script src="jio_saferepairstorage.js" type="text/javascript"></script>
<script src="jio_fixstorage.js" type="text/javascript"></script>
......
......@@ -238,7 +238,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>960.3901.52182.22272</string> </value>
<value> <string>961.46357.14957.50005</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>1497517315.49</float>
<float>1504533512.84</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -71,6 +71,8 @@
}
},
remote_sub_storage: {
type: "saferepair",
sub_storage: {
type: "mapping",
attachment_list: ["data"],
attachment: {
......@@ -94,6 +96,7 @@
default_view_reference: result[2]
}
}
}
};
return gadget.setSetting('jio_storage_description', configuration);
})
......
......@@ -273,7 +273,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.48147.7132.45448</string> </value>
<value> <string>961.49200.15936.15257</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -291,7 +291,7 @@
</tuple>
<state>
<tuple>
<float>1504018485.52</float>
<float>1504084622.06</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -118,6 +118,7 @@ font-awesome/font-awesome-webfont.svg\n
gadget_erp5_nojqm.css\n
jio_mappingstorage.js\n
jio_fixstorage.js\n
jio_saferepairstorage.js\n
gadget_erp5_global.js\n
URI.js\n
dygraph.js\n
......@@ -346,7 +347,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.10686.10882.5973</string> </value>
<value> <string>961.46357.14957.50005</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -364,7 +365,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1502956869.41</float>
<float>1504533611.59</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -115,6 +115,7 @@ CACHE:\n
jiodev.js\n
jio_mappingstorage.js\n
jio_fixstorage.js\n
jio_saferepairstorage.js\n
renderjs.js\n
rsvp.js\n
gadget_officejs_setting.js\n
......@@ -265,7 +266,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>960.57151.51816.16622</string> </value>
<value> <string>961.10686.10882.5973</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -283,7 +284,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1501160529.99</float>
<float>1504533620.03</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -122,6 +122,7 @@ font-awesome/font-awesome-webfont.svg\n
gadget_officejs_nojqm.css\n
jio_mappingstorage.js\n
jio_fixstorage.js\n
jio_saferepairstorage.js\n
gadget_erp5_global.js\n
URI.js\n
dygraph.js\n
......@@ -350,7 +351,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.46357.14957.50005</string> </value>
<value> <string>961.56686.22927.2474</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -368,7 +369,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1504530140.93</float>
<float>1504533633.59</float>
<string>UTC</string>
</tuple>
</state>
......
/*jslint indent:2,maxlen:80,nomen:true*/
/*global jIO, RSVP*/
(function (jIO, RSVP) {
"use strict";
/**
* The jIO SafeRepairStorage extension
*
* @class SafeRepairStorage
* @constructor
*/
function SafeRepairStorage(spec) {
this._sub_storage = jIO.createJIO(spec.sub_storage);
this._id_dict = {};
}
SafeRepairStorage.prototype.get = function () {
return this._sub_storage.get.apply(this._sub_storage, arguments);
};
SafeRepairStorage.prototype.allAttachments = function () {
return this._sub_storage.allAttachments.apply(this._sub_storage, arguments);
};
SafeRepairStorage.prototype.post = function () {
return this._sub_storage.post.apply(this._sub_storage, arguments);
};
SafeRepairStorage.prototype.put = function (id, doc) {
var storage = this;
return this._sub_storage.put.apply(this._sub_storage, arguments)
.push(undefined, function (error) {
if (error instanceof jIO.util.jIOError &&
error.status_code === 403) {
if (storage._id_dict[id]) {
return storage._sub_storage.put(storage._id_dict[id], doc);
}
return storage._sub_storage.post(doc)
.push(function (sub_id) {
storage._id_dict[id] = sub_id;
return sub_id;
});
}
});
};
SafeRepairStorage.prototype.remove = function () {
return;
};
SafeRepairStorage.prototype.getAttachment = function () {
return this._sub_storage.getAttachment.apply(this._sub_storage, arguments);
};
SafeRepairStorage.prototype.putAttachment = function (id, attachment_id,
attachment) {
var storage = this;
return this._sub_storage.putAttachment.apply(this._sub_storage, arguments)
.push(undefined, function (error) {
if (error instanceof jIO.util.jIOError &&
error.status_code === 403) {
return new RSVP.Queue()
.push(function () {
if (storage._id_dict[id]) {
return storage._id_dict[id];
}
return storage._sub_storage.get(id)
.push(function (doc) {
return storage._sub_storage.post(doc);
});
})
.push(function (sub_id) {
storage._id_dict[id] = sub_id;
return storage._sub_storage.putAttachment(sub_id, attachment_id,
attachment);
});
}
});
};
SafeRepairStorage.prototype.removeAttachment = function () {
return;
};
SafeRepairStorage.prototype.repair = function () {
return this._sub_storage.repair.apply(this._sub_storage, arguments);
};
SafeRepairStorage.prototype.hasCapacity = function (name) {
return this._sub_storage.hasCapacity(name);
};
SafeRepairStorage.prototype.buildQuery = function () {
return this._sub_storage.buildQuery.apply(this._sub_storage,
arguments);
};
jIO.addStorage('saferepair', SafeRepairStorage);
}(jIO, RSVP));
<?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>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<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>
<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>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>jio_saferepairstorage.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jio_saferepairstorage_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>title</string> </key>
<value> <string>jio_saferepairstorage.js</string> </value>
</item>
<item>
<key> <string>url_string</string> </key>
<value>
<none/>
</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>
<none/>
</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>1504533404.15</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>draft</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>961.56741.11506.23722</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>1504533447.23</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>1504533404.14</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
......@@ -118,6 +118,7 @@ font-awesome/font-awesome-webfont.svg\n
gadget_erp5_nojqm.css\n
jio_mappingstorage.js\n
jio_fixstorage.js\n
jio_saferepairstorage.js\n
gadget_erp5_global.js\n
URI.js\n
dygraph.js\n
......@@ -348,7 +349,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.30792.56927.40004</string> </value>
<value> <string>961.50636.39446.44697</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -366,7 +367,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1503306177.8</float>
<float>1504533603.02</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -118,6 +118,7 @@ font-awesome/font-awesome-webfont.svg\n
gadget_erp5_nojqm.css\n
jio_mappingstorage.js\n
jio_fixstorage.js\n
jio_saferepairstorage.js\n
gadget_erp5_global.js\n
URI.js\n
dygraph.js\n
......@@ -340,7 +341,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.10686.10882.5973</string> </value>
<value> <string>961.50636.39446.44697</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -358,7 +359,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1502956909.56</float>
<float>1504533641.35</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -118,6 +118,7 @@ font-awesome/font-awesome-webfont.svg\n
gadget_erp5_nojqm.css\n
jio_mappingstorage.js\n
jio_fixstorage.js\n
jio_saferepairstorage.js\n
gadget_erp5_global.js\n
URI.js\n
dygraph.js\n
......@@ -346,7 +347,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.10686.10882.5973</string> </value>
<value> <string>961.50636.39446.44697</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -364,7 +365,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1502956899.93</float>
<float>1504533648.94</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -118,6 +118,7 @@ font-awesome/font-awesome-webfont.svg\n
gadget_erp5_nojqm.css\n
jio_mappingstorage.js\n
jio_fixstorage.js\n
jio_saferepairstorage.js\n
gadget_erp5_global.js\n
URI.js\n
dygraph.js\n
......@@ -346,7 +347,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.10686.10882.5973</string> </value>
<value> <string>961.50636.39446.44697</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -364,7 +365,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1502956891.05</float>
<float>1504533655.19</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -118,6 +118,7 @@ font-awesome/font-awesome-webfont.svg\n
gadget_erp5_nojqm.css\n
jio_mappingstorage.js\n
jio_fixstorage.js\n
jio_saferepairstorage.js\n
gadget_erp5_global.js\n
URI.js\n
dygraph.js\n
......@@ -346,7 +347,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.10686.10882.5973</string> </value>
<value> <string>961.50636.39446.44697</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -364,7 +365,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1502956880.85</float>
<float>1504533661.97</float>
<string>UTC</string>
</tuple>
</state>
......
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