Commit 02788475 authored by Romain Courteaud's avatar Romain Courteaud

slapos_jio:

* drop Compute Node Token previous implementation
* erp5_web_renderjs_ui | RJS is managed by erp5_web_renderjs_ui bt5
* move most stuff to slapos_jio_before_deletion
  Keep slapos_jio minimal to simplify the rebase on the files to keep
* keep status gadget
* forgot to drop actions
parent 0844d13f
<!DOCTYPE html>
<html>
<!--
data-i18n=Slapos
data-i18n=Token is Requested.
data-i18n=Parent Relative Url
data-i18n=Command Line to Run
data-i18n=SlapOS Master API
data-i18n=SlapOS Master Web UI
data-i18n=Your Token
data-i18n=Request New Token
-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>OfficeJS Add Text Document</title>
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script src="gadget_erp5_page_slap_compute_node_get_token.js"></script>
</head>
<body>
<form class="save_form ui-body-c" novalidate>
<button type="submit" class="ui-btn ui-btn-b ui-btn-inline
ui-icon-edit ui-btn-icon-right ui-screen-hidden"></button>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="form_view"
data-gadget-sandbox="public">
</div>
</form>
</body>
</html>
/*global window, rJS, RSVP */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP) {
"use strict";
rJS(window)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("updatePanel", "updatePanel")
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("jio_post", "jio_post")
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
.declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", 'notifySubmitted')
.declareAcquiredMethod("getTranslationList", "getTranslationList")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.allowPublicAcquisition('notifySubmit', function () {
return this.triggerSubmit();
})
.onEvent('submit', function () {
var gadget = this;
return gadget.notifySubmitting()
.push(function () {
return gadget.getDeclaredGadget('form_view');
})
.push(function (form_gadget) {
return form_gadget.getContent();
})
.push(function (doc) {
return gadget.getSetting("hateoas_url")
.push(function (url) {
return gadget.jio_getAttachment(doc.relative_url,
url + doc.relative_url + "/Base_getComputeNodeToken");
})
.push(function (result) {
var msg;
if (result) {
msg = gadget.msg_translation;
}
return gadget.notifySubmitted({message: msg, status: 'success'})
.push(function () {
// Workaround, find a way to open document without break gadget.
result.jio_key = doc.relative_url;
return gadget.render(result);
});
});
});
})
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
.declareMethod("render", function (options) {
var gadget = this,
page_title_translation,
translation_list = [
"Parent Relative Url",
"Command Line to Run",
"SlapOS Master API",
"SlapOS Master Web UI",
"Your Token",
"Request New Token",
"Token is Requested."
];
return new RSVP.Queue()
.push(function () {
return RSVP.all([
gadget.getDeclaredGadget('form_view'),
gadget.getTranslationList(translation_list)
]);
})
.push(function (result) {
page_title_translation = result[1][5];
gadget.msg_translation = result[1][6];
return result[0].render({
erp5_document: {
"_embedded": {"_view": {
"my_relative_url": {
"description": "",
"title": result[1][0],
"default": "compute_node_module",
"css_class": "",
"required": 1,
"editable": 1,
"key": "relative_url",
"hidden": 1,
"type": "StringField"
},
"my_command_line": {
"description": "",
"title": result[1][1],
"default": options.command_line,
"css_class": "",
"required": 1,
"editable": 0,
"key": "command_line",
"hidden": (options.access_token === undefined) ? 1 : 0,
"type": "StringField"
},
"my_slapos_master_api": {
"description": "",
"title": result[1][2],
"default": options.slapos_master_api,
"css_class": "",
"required": 1,
"editable": 0,
"key": "slapos_master_api",
"hidden": (options.access_token === undefined) ? 1 : 0,
"type": "StringField"
},
"my_slapos_master_web": {
"description": "",
"title": result[1][3],
"default": options.slapos_master_web,
"css_class": "",
"required": 1,
"editable": 0,
"key": "slapos_master_web",
"hidden": (options.access_token === undefined) ? 1 : 0,
"type": "StringField"
},
"my_access_token": {
"description": "",
"title": result[1][4],
"default": options.access_token,
"css_class": "",
"required": 1,
"editable": 0,
"key": "certificate",
"hidden": (options.access_token === undefined) ? 1 : 0,
"type": "StringField"
}
}},
"_links": {
"type": {
// form_list display portal_type in header
name: ""
}
}
},
form_definition: {
group_list: [[
"center",
[["my_command_line"], ["my_slapos_master_api"], ["my_slapos_master_web"], ["my_access_token"], ["my_relative_url"]]
]]
}
});
})
.push(function () {
return gadget.updatePanel({
jio_key: "compute_node_module"
});
})
.push(function () {
return RSVP.all([
gadget.getUrlFor({command: 'change', options: {page: "slap_compute_node_list"}})
]);
})
.push(function (url_list) {
var header_dict = {
page_title: page_title_translation,
submit_action: true,
selection_url: url_list[0]
};
return gadget.updateHeader(header_dict);
});
});
}(window, rJS, RSVP));
\ No newline at end of file
.ui-block-a,
.ui-block-b,
.ui-block-c,
.ui-block-d,
.ui-block-e {
margin: 0;
padding: 0;
border: 0;
float: left;
min-height: 1px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box; } /* force new row */
.ui-block-a {
clear: left;
}
.ui-block {
width: 100%
}
.ui-bar {
position: relative;
padding: .4em 1em;
overflow: hidden;
display: block;
clear: both;
}
.ui-corner-all {
-webkit-border-radius: .3125em /*{global-radii-blocks}*/;
border-radius: .3125em /*{global-radii-blocks}*/;
}
.ui-btn-ok,
.ui-btn-ok:active,
.ui-btn-ok:hover ,
.ui-btn-ok a,
.ui-btn-ok:active a,
.ui-btn-ok:hover a {
color: white !important;
background: green !important;
text-align: center;
}
.ui-btn-warning,
.ui-btn-warning:active,
.ui-btn-warning:hover,
.ui-btn-warning a,
.ui-btn-warning:active a,
.ui-btn-warning:hover a {
color: white !important;
background: #f0ad4e !important;
text-align: center;
}
.ui-btn-error,
.ui-btn-error:active,
.ui-btn-error:hover,
.ui-btn-error a,
.ui-btn-error:active a,
.ui-btn-error:hover a {
color: white !important;
background: red !important;
text-align: center;
}
.ui-btn-no-data,
.ui-btn-no-data:active,
.ui-btn-no-data:hover,
.ui-btn-no-data a,
.ui-btn-no-data:active a,
.ui-btn-no-data:hover a {
color: grey !important;
background: grey !important;
text-align: center;
}
.ui-btn-color-white,
.ui-btn-color-white:active,
.ui-btn-color-white:hover,
.ui-btn-color-white a,
.ui-btn-color-white:active a,
.ui-btn-color-white:hover a {
color: white !important;
background: grey !important;
text-align: center;
}
.ui-btn-white,
.ui-btn-white:active,
.ui-btn-white:hover,
.ui-btn-white a,
.ui-btn-white:active a,
.ui-btn-white:hover a {
background: white !important;
text-align: center;
}
a.ui-icon-desktop::before {
margin-left: 5px;
}
/* for Software Logo*/
div.editable_div.logo img {
object-fit: cover;
max-height: 3.5em;
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Style" 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>Assignee</string>
<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>Assignee</string>
<string>Assignor</string>
<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>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_slapos_status.css</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>rjs_gadget_slapos_status_css</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 Style</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget SlapOS Status</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.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</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="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="DateTime" module="DateTime.DateTime"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<tuple>
<float>1504866593.45</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<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>1001.40386.24679.24320</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="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="DateTime" module="DateTime.DateTime"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<tuple>
<float>1658172898.38</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<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>external_processing_state</string> </key>
<value> <string>empty</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="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="DateTime" module="DateTime.DateTime"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<tuple>
<float>1504866427.12</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Background</title>
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script src="domsugar.js"></script>
<script src="gadget_slapos_status.js"></script>
<link href="gadget_slapos_status.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div class="ui-block-a ui-block main-status">
<div class="ui-bar ui-corner-all first-child ui-btn-no-data">
<a class="ui-btn ui-btn-icon-left ui-icon-spinner ui-btn-color-white"> Node </a>
</div>
</div>
</body>
</html>
\ No newline at end of file
<?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>Assignee</string>
<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>_Copy_or_Move_Permission</string> </key>
<value>
<list>
<string>Manager</string>
<string>Authenticated</string>
<string>Developer</string>
<string>Owner</string>
</list>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<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>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>creators</string> </key>
<value>
<tuple>
<string>zope</string>
</tuple>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_slapos_status.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>rjs_gadget_slapos_status_html</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>modification_date</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="DateTime" module="DateTime.DateTime"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<tuple>
<float>1523884657.62</float>
<string>UTC</string>
</tuple>
</state>
</object>
</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>title</string> </key>
<value> <string>Gadget SlapOS Status</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.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</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="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="DateTime" module="DateTime.DateTime"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<tuple>
<float>1513176680.43</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<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>1001.26171.19762.42854</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="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="DateTime" module="DateTime.DateTime"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<tuple>
<float>1657906237.75</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<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="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="DateTime" module="DateTime.DateTime"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<tuple>
<float>1513176624.03</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*globals console, window, rJS, domsugar */
/*jslint indent: 2, nomen: true, maxlen: 80 */
(function (window, rJS, domsugar) {
"use strict";
var gadget_klass = rJS(window);
function getInstanceStatus(options) {
if ((!options) || (options && !options.text)) {
return 'ui-btn-no-data';
}
if (options.text.startsWith("#access")) {
return 'ui-btn-ok';
}
if (options.no_data) {
return 'ui-btn-no-data';
}
if (options.is_slave) {
return 'ui-btn-is-slave';
}
if (options.is_stopped) {
return 'ui-btn-is-stopped';
}
if (options.is_destroyed) {
return 'ui-btn-is-destroyed';
}
return 'ui-btn-error';
}
function getInstanceTreeStatus(options) {
var instance;
if (!options) {
return 'ui-btn-no-data';
}
if (options.is_slave) {
return 'ui-btn-is-slave';
}
if (options.is_stopped) {
return 'ui-btn-is-stopped';
}
if (options.is_destroyed) {
return 'ui-btn-is-destroyed';
}
if (!options.instance) {
return 'ui-btn-no-data';
}
for (instance in options.instance) {
if (options.instance.hasOwnProperty(instance)) {
if (options.instance[instance].text.startsWith("#error")) {
return 'ui-btn-error';
}
}
}
return 'ui-btn-ok';
}
function getComputeNodeStatus(options) {
if (!options || !options.text) {
return 'ui-btn-no-data';
}
if (options.text.startsWith("#access")) {
if (options.no_data_since_15_minutes) {
return 'ui-btn-error';
}
if (options.no_data_since_5_minutes) {
return 'ui-btn-warning';
}
return 'ui-btn-ok';
}
if (options.no_data) {
return 'ui-btn-no-data';
}
return 'ui-btn-error';
}
function getSoftwareInstallationStatus(options) {
if ((!options) || (options && !options.text)) {
return 'ui-btn-no-data';
}
if (options.text.startsWith("#access")) {
return 'ui-btn-ok';
}
if (options.text.startsWith("#building")) {
return 'ui-btn-is-building';
}
if (options.no_data) {
return 'ui-btn-no-data';
}
return 'ui-btn-error';
}
function getComputeNodeStatusList(options) {
var previous_status = "START",
status = 'ui-btn-no-data',
i;
if (!options || !options.compute_node) {
return status;
}
for (i in options.compute_node) {
if (options.compute_node.hasOwnProperty(i)) {
status = getComputeNodeStatus(options.compute_node[i]);
if (previous_status === "START") {
previous_status = status;
}
if (previous_status !== status) {
if ((previous_status === 'ui-btn-error') &&
(status === 'ui-btn-ok')) {
// XXX drop warning
return 'ui-btn-warning';
}
if ((status === 'ui-btn-error') &&
(previous_status === 'ui-btn-ok')) {
// XXX drop warning
return 'ui-btn-warning';
}
if (status === 'ui-btn-no-data') {
status = previous_status;
}
}
}
}
return status;
}
function getStatus(gadget, result) {
var status_class = 'ui-btn-no-data',
main_status_div = gadget.element.querySelector(".main-status"),
monitor_url = '',
main_link_configuration_dict = {
"class": "ui-btn ui-btn-icon-left ui-icon-desktop"
};
if (result && result.monitor_url) {
monitor_url = result.monitor_url;
}
if (result && result.portal_type && result.portal_type === "Compute Node") {
main_link_configuration_dict.text = 'Node';
main_link_configuration_dict["class"] = "ui-btn ui-btn-icon-left";
status_class = getComputeNodeStatus(result);
} else if (result && result.portal_type &&
result.portal_type === "Software Installation") {
status_class = getSoftwareInstallationStatus(result);
main_link_configuration_dict.text = "Installation";
if (status_class === "ui-btn-is-building") {
main_link_configuration_dict.text = "Building";
status_class = "ui-btn-no-data";
} else if (status_class === "ui-btn-ok") {
main_link_configuration_dict.text = "Available";
} else if (status_class === "ui-btn-error") {
main_link_configuration_dict.text = "Error";
}
main_link_configuration_dict["class"] = "ui-btn ui-btn-icon-left";
} else if (result && result.portal_type && (
result.portal_type === "Software Instance" ||
result.portal_type === "Slave Instance"
)) {
status_class = getInstanceStatus(result);
if (status_class === 'ui-btn-is-slave') {
status_class = 'ui-btn-color-white';
main_link_configuration_dict.text = 'Slave';
main_link_configuration_dict["class"] = "ui-btn ui-btn-icon-left";
} else if (status_class === 'ui-btn-is-stopped') {
status_class = 'ui-btn-color-white';
main_link_configuration_dict.text = 'Stopped';
main_link_configuration_dict["class"] = "ui-btn ui-btn-icon-left";
} else if (status_class === 'ui-btn-is-destroyed') {
status_class = 'ui-btn-color-white';
main_link_configuration_dict.text = 'Destroyed';
main_link_configuration_dict["class"] = "ui-btn ui-btn-icon-left";
} else {
main_link_configuration_dict.href = monitor_url;
main_link_configuration_dict.target = "_target";
main_link_configuration_dict.text = 'Instance';
}
} else if (result && result.portal_type &&
result.portal_type === "Instance Tree") {
status_class = getInstanceTreeStatus(result);
// it should verify if the monitor-base-url is ready.
if (status_class === 'ui-btn-is-slave') {
status_class = 'ui-btn-color-white';
main_link_configuration_dict.text = 'Slave Only';
main_link_configuration_dict["class"] = "ui-btn ui-btn-icon-left";
} else if (status_class === 'ui-btn-is-stopped') {
status_class = 'ui-btn-color-white';
main_link_configuration_dict.text = 'Stopped';
main_link_configuration_dict["class"] = "ui-btn ui-btn-icon-left";
} else if (status_class === 'ui-btn-is-destroyed') {
status_class = 'ui-btn-color-white';
main_link_configuration_dict.text = 'Destroyed';
main_link_configuration_dict["class"] = "ui-btn ui-btn-icon-left";
} else {
main_link_configuration_dict.href = monitor_url;
main_link_configuration_dict.target = "_target";
main_link_configuration_dict.text = 'Instance';
}
} else {
main_link_configuration_dict.text = 'Node';
main_link_configuration_dict["class"] = "ui-btn ui-btn-icon-left";
status_class = getComputeNodeStatusList(result);
}
main_link_configuration_dict.text = ' ' + main_link_configuration_dict.text;
domsugar(main_status_div.querySelector('div'),
{
"class": "ui-bar ui-corner-all first-child " + status_class
}, [
domsugar(main_link_configuration_dict.href ? "a" : "span",
main_link_configuration_dict)
]);
return gadget;
}
gadget_klass
.declareAcquiredMethod("jio_get", "jio_get")
.declareMethod("getContent", function () {
return {};
})
.onStateChange(function () {
return getStatus(this, this.state);
})
.declareMethod("render", function (options) {
// crash as soon as possible to detect wrong configuration
if (!(options.hasOwnProperty('jio_key') &&
options.hasOwnProperty('result'))) {
throw new Error(
'status gadget did not receive jio_key and result values'
);
}
// Save will force the gadget to be updated so
// result is empty.
var state_dict = options.result || {};
state_dict.jio_key = options.jio_key;
return this.changeState(state_dict);
});
}(window, rJS, domsugar));
\ No newline at end of file
<?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>Assignee</string>
<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>_Copy_or_Move_Permission</string> </key>
<value>
<list>
<string>Manager</string>
<string>Authenticated</string>
<string>Developer</string>
<string>Owner</string>
</list>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<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>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>creators</string> </key>
<value>
<tuple>
<string>zope</string>
</tuple>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_slapos_status.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>rjs_gadget_slapos_status_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>modification_date</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="DateTime" module="DateTime.DateTime"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<tuple>
<float>1523884657.64</float>
<string>UTC</string>
</tuple>
</state>
</object>
</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>Gadget SlapOS Status 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.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</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="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="DateTime" module="DateTime.DateTime"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<tuple>
<float>1513176912.23</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<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>1002.12197.26478.31573</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="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="DateTime" module="DateTime.DateTime"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<tuple>
<float>1660733231.38</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<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="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="DateTime" module="DateTime.DateTime"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<tuple>
<float>1513176624.0</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
import json
portal = context.getPortalObject()
person = portal.portal_membership.getAuthenticatedMember().getUserValue()
web_site = context.getWebSiteValue()
slapos_master_web_url = web_site.getLayoutProperty(
"configuration_slapos_master_web_url",
default=web_site.absolute_url()
)
request_url = "%s/%s" % (slapos_master_web_url, "Person_requestComputer")
person.requestToken(request_url=request_url)
access_token_id = context.REQUEST.get("token")
slapos_master_api = web_site.getLayoutProperty(
"configuration_slapos_master_api", "https://slap.vifib.com")
compute_node_install_command_line = web_site.getLayoutProperty(
"configuration_compute_node_install_command_line",
"wget https://deploy.erp5.net/slapos ; bash slapos")
request = context.REQUEST
response = request.RESPONSE
response.setHeader('Content-Type', "application/json")
return json.dumps({'access_token': access_token_id,
'command_line': compute_node_install_command_line,
'slapos_master_web': slapos_master_web_url,
'slapos_master_api': slapos_master_api})
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>title</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Person_requestComputer</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Kept to simplify rebase.
Will be moved at the end to slapos_panel probably
\ No newline at end of file
erp5_project
erp5_hal_json_style
erp5_corporate_identity
erp5_credential
erp5_dms
erp5_jquery
erp5_km
erp5_web
erp5_credential_oauth2
erp5_bearer_token
erp5_access_token
erp5_oauth_google_login
erp5_oauth_facebook_login
erp5_web_renderjs_ui
erp5_l10n_fr
erp5_l10n_zh
erp5_l10n_ja
slapos_cloud
slapos_slap_tool
slapos_pdm
slapos_crm
slapos_l10n_zh
slapos_rss_style
\ No newline at end of file
erp5_web_renderjs_ui
\ No newline at end of file
image_module/gadget_slapos_invoice_logo_png
image_module/gadget_slapos_panel_png
web_page_module/gadget_erp5_page_slap_cloud_contract_view_html
web_page_module/gadget_erp5_page_slap_cloud_contract_view_js
web_page_module/gadget_erp5_page_slap_reject_upgrade_decision_html
web_page_module/gadget_erp5_page_slap_reject_upgrade_decision_js
web_page_module/gadget_erp5_page_slap_request_contract_activation_html
web_page_module/gadget_erp5_page_slap_request_contract_activation_js
web_page_module/rjs_gadget_erp5_attention_point_css
web_page_module/rjs_gadget_erp5_attention_point_html
web_page_module/rjs_gadget_erp5_attention_point_js
web_page_module/rjs_gadget_erp5_page_map_css
web_page_module/rjs_gadget_erp5_page_map_html
web_page_module/rjs_gadget_erp5_page_map_js
web_page_module/rjs_gadget_erp5_page_slap_accept_upgrade_decision_html
web_page_module/rjs_gadget_erp5_page_slap_accept_upgrade_decision_js
web_page_module/rjs_gadget_erp5_page_slap_access_denied_view_html
web_page_module/rjs_gadget_erp5_page_slap_access_denied_view_js
web_page_module/rjs_gadget_erp5_page_slap_add_project_html
web_page_module/rjs_gadget_erp5_page_slap_add_project_js
web_page_module/rjs_gadget_erp5_page_slap_all_invoice_list_html
web_page_module/rjs_gadget_erp5_page_slap_all_invoice_list_js
web_page_module/rjs_gadget_erp5_page_slap_certificate_login_view_html
web_page_module/rjs_gadget_erp5_page_slap_certificate_login_view_js
web_page_module/rjs_gadget_erp5_page_slap_compute_node_get_token_html
web_page_module/rjs_gadget_erp5_page_slap_compute_node_get_token_js
web_page_module/rjs_gadget_erp5_page_slap_compute_node_request_certificate_html
web_page_module/rjs_gadget_erp5_page_slap_compute_node_request_certificate_js
web_page_module/rjs_gadget_erp5_page_slap_controller_html
web_page_module/rjs_gadget_erp5_page_slap_controller_js
web_page_module/rjs_gadget_erp5_page_slap_delete_organisation_html
web_page_module/rjs_gadget_erp5_page_slap_delete_organisation_js
web_page_module/rjs_gadget_erp5_page_slap_delete_project_html
web_page_module/rjs_gadget_erp5_page_slap_delete_project_js
web_page_module/rjs_gadget_erp5_page_slap_erp5_login_view_html
web_page_module/rjs_gadget_erp5_page_slap_erp5_login_view_js
web_page_module/rjs_gadget_erp5_page_slap_facebook_login_view_html
web_page_module/rjs_gadget_erp5_page_slap_facebook_login_view_js
web_page_module/rjs_gadget_erp5_page_slap_google_login_view_html
web_page_module/rjs_gadget_erp5_page_slap_google_login_view_js
web_page_module/rjs_gadget_erp5_page_slap_access_denied_view_html
web_page_module/rjs_gadget_erp5_page_slap_access_denied_view_js
web_page_module/rjs_gadget_erp5_page_slap_intent_html
web_page_module/rjs_gadget_erp5_page_slap_intent_js
web_page_module/rjs_gadget_erp5_page_slap_invalidate_login_html
web_page_module/rjs_gadget_erp5_page_slap_invalidate_login_js
web_page_module/rjs_gadget_erp5_page_slap_invoice_list_html
web_page_module/rjs_gadget_erp5_page_slap_invoice_list_js
web_page_module/rjs_gadget_erp5_page_slap_language_view_html
web_page_module/rjs_gadget_erp5_page_slap_language_view_js
web_page_module/rjs_gadget_erp5_page_slap_load_schema_html
web_page_module/rjs_gadget_erp5_page_slap_load_schema_js
web_page_module/rjs_gadget_erp5_page_slap_notify_and_redirect_html
web_page_module/rjs_gadget_erp5_page_slap_notify_and_redirect_js
web_page_module/rjs_gadget_erp5_page_slap_organisation_get_invitation_link_html
web_page_module/rjs_gadget_erp5_page_slap_organisation_get_invitation_link_js
web_page_module/rjs_gadget_erp5_page_slap_organisation_view_html
web_page_module/rjs_gadget_erp5_page_slap_organisation_view_js
web_page_module/rjs_gadget_erp5_page_slap_payment_result_html
web_page_module/rjs_gadget_erp5_page_slap_person_add_erp5_login_html
web_page_module/rjs_gadget_erp5_page_slap_person_add_erp5_login_js
web_page_module/rjs_gadget_erp5_page_slap_person_get_token_html
web_page_module/rjs_gadget_erp5_page_slap_person_get_token_js
web_page_module/rjs_gadget_erp5_page_slap_person_request_certificate_html
web_page_module/rjs_gadget_erp5_page_slap_person_request_certificate_js
web_page_module/rjs_gadget_erp5_page_slap_person_revoke_certificate_html
web_page_module/rjs_gadget_erp5_page_slap_person_revoke_certificate_js
web_page_module/rjs_gadget_erp5_page_slap_person_view_html
web_page_module/rjs_gadget_erp5_page_slap_person_view_js
web_page_module/rjs_gadget_erp5_page_slap_project_get_invitation_link_html
web_page_module/rjs_gadget_erp5_page_slap_project_get_invitation_link_js
web_page_module/rjs_gadget_erp5_page_slap_regularisation_request_view_html
web_page_module/rjs_gadget_erp5_page_slap_regularisation_request_view_js
web_page_module/rjs_gadget_erp5_page_slap_rss_ticket_html
web_page_module/rjs_gadget_erp5_page_slap_rss_ticket_js
web_page_module/rjs_gadget_erp5_page_slap_sale_invoice_transaction_view_html
web_page_module/rjs_gadget_erp5_page_slap_sale_invoice_transaction_view_js
web_page_module/rjs_gadget_erp5_page_slap_site_list_html
web_page_module/rjs_gadget_erp5_page_slap_site_list_js
web_page_module/rjs_gadget_erp5_page_slap_site_view_html
web_page_module/rjs_gadget_erp5_page_slap_site_view_js
<<<<<<< HEAD
web_page_module/rjs_gadget_erp5_page_slap_test_parameter_form_html
web_page_module/rjs_gadget_erp5_page_slap_test_parameter_form_js
web_page_module/rjs_gadget_erp5_page_slap_test_readonly_parameter_form_html
web_page_module/rjs_gadget_erp5_page_slap_test_readonly_parameter_form_js
web_page_module/rjs_gadget_erp5_page_slap_transfer_computer_network_html
web_page_module/rjs_gadget_erp5_page_slap_transfer_computer_network_js
=======
>>>>>>> slapos_jio: drop Computer Network scripts
web_page_module/rjs_gadget_erp5_page_slap_transfer_instance_tree_html
web_page_module/rjs_gadget_erp5_page_slap_transfer_instance_tree_js
web_page_module/rjs_gadget_erp5_page_slap_upgrade_decision_view_html
web_page_module/rjs_gadget_erp5_page_slap_upgrade_decision_view_js
web_page_module/rjs_gadget_erp5_page_slapos_access_html
web_page_module/rjs_gadget_erp5_page_slapos_access_js
web_page_module/rjs_gadget_erp5_page_slapos_css
web_page_module/rjs_gadget_erp5_page_slapos_html
web_page_module/rjs_gadget_erp5_page_slapos_html
web_page_module/rjs_gadget_erp5_page_slapos_js
web_page_module/rjs_gadget_erp5_panel_shortcut_html
web_page_module/rjs_gadget_erp5_panel_shortcut_js
web_page_module/rjs_gadget_erp5_pt_form_slapos_index_html
web_page_module/rjs_gadget_erp5_pt_form_slapos_index_js
web_page_module/rjs_gadget_slapos_alert_listbox_field_css
web_page_module/rjs_gadget_slapos_alert_listbox_field_html
web_page_module/rjs_gadget_slapos_alert_listbox_field_js
web_page_module/rjs_gadget_slapos_annotated_helper_css
web_page_module/rjs_gadget_slapos_annotated_helper_html
web_page_module/rjs_gadget_slapos_annotated_helper_js
web_page_module/rjs_gadget_slapos_appcache
web_page_module/rjs_gadget_slapos_compute_node_map_html
web_page_module/rjs_gadget_slapos_compute_node_map_js
web_page_module/rjs_gadget_slapos_event_discussion_entry_css
web_page_module/rjs_gadget_slapos_event_discussion_entry_html
web_page_module/rjs_gadget_slapos_event_discussion_entry_js
web_page_module/rjs_gadget_slapos_header_html
web_page_module/rjs_gadget_slapos_header_js
web_page_module/rjs_gadget_slapos_invoice_printout_html
web_page_module/rjs_gadget_slapos_invoice_printout_js
web_page_module/rjs_gadget_slapos_invoice_state_html
web_page_module/rjs_gadget_slapos_invoice_state_js
web_page_module/rjs_gadget_slapos_label_listbox_field_html
web_page_module/rjs_gadget_slapos_label_listbox_field_js
web_page_module/rjs_gadget_slapos_login_page_css
web_page_module/rjs_gadget_slapos_panel_html
web_page_module/rjs_gadget_slapos_panel_js
web_page_module/rjs_gadget_slapos_payment_result_js**
web_page_module/rjs_gadget_slapos_translation_data_js
web_page_module/rjs_gadget_slapos_translation_html
web_page_module/rjs_gadget_slapos_utils_js
web_page_module/rjs_leaflet_css
web_page_module/rjs_leaflet_js
web_page_module/slapos_admin_front_page
web_site_module/hostingjs
web_site_module/hostingjs/**
web_site_module/renderjs_oss
web_site_module/renderjs_oss/**
image_module/gadget_slapos_invoice_logo_png
image_module/gadget_slapos_panel_png
web_page_module/gadget_erp5_page_slap_cloud_contract_view_html
web_page_module/gadget_erp5_page_slap_cloud_contract_view_js
web_page_module/gadget_erp5_page_slap_reject_upgrade_decision_html
web_page_module/gadget_erp5_page_slap_reject_upgrade_decision_js
web_page_module/gadget_erp5_page_slap_request_contract_activation_html
web_page_module/gadget_erp5_page_slap_request_contract_activation_js
web_page_module/rjs_gadget_erp5_attention_point_css
web_page_module/rjs_gadget_erp5_attention_point_html
web_page_module/rjs_gadget_erp5_attention_point_js
web_page_module/rjs_gadget_erp5_page_map_css
web_page_module/rjs_gadget_erp5_page_map_html
web_page_module/rjs_gadget_erp5_page_map_js
web_page_module/rjs_gadget_erp5_page_slap_accept_upgrade_decision_html
web_page_module/rjs_gadget_erp5_page_slap_accept_upgrade_decision_js
web_page_module/rjs_gadget_erp5_page_slap_access_denied_view_html
web_page_module/rjs_gadget_erp5_page_slap_access_denied_view_js
web_page_module/rjs_gadget_erp5_page_slap_add_project_html
web_page_module/rjs_gadget_erp5_page_slap_add_project_js
web_page_module/rjs_gadget_erp5_page_slap_all_invoice_list_html
web_page_module/rjs_gadget_erp5_page_slap_all_invoice_list_js
web_page_module/rjs_gadget_erp5_page_slap_certificate_login_view_html
web_page_module/rjs_gadget_erp5_page_slap_certificate_login_view_js
web_page_module/rjs_gadget_erp5_page_slap_compute_node_get_token_html
web_page_module/rjs_gadget_erp5_page_slap_compute_node_get_token_js
web_page_module/rjs_gadget_erp5_page_slap_controller_html
web_page_module/rjs_gadget_erp5_page_slap_controller_js
web_page_module/rjs_gadget_erp5_page_slap_delete_organisation_html
web_page_module/rjs_gadget_erp5_page_slap_delete_organisation_js
web_page_module/rjs_gadget_erp5_page_slap_delete_project_html
web_page_module/rjs_gadget_erp5_page_slap_delete_project_js
web_page_module/rjs_gadget_erp5_page_slap_erp5_login_view_html
web_page_module/rjs_gadget_erp5_page_slap_erp5_login_view_js
web_page_module/rjs_gadget_erp5_page_slap_facebook_login_view_html
web_page_module/rjs_gadget_erp5_page_slap_facebook_login_view_js
web_page_module/rjs_gadget_erp5_page_slap_google_login_view_html
web_page_module/rjs_gadget_erp5_page_slap_google_login_view_js
web_page_module/rjs_gadget_erp5_page_slap_intent_html
web_page_module/rjs_gadget_erp5_page_slap_intent_js
web_page_module/rjs_gadget_erp5_page_slap_intent_zh_html
web_page_module/rjs_gadget_erp5_page_slap_invalidate_login_html
web_page_module/rjs_gadget_erp5_page_slap_invalidate_login_js
web_page_module/rjs_gadget_erp5_page_slap_invoice_list_html
web_page_module/rjs_gadget_erp5_page_slap_invoice_list_js
web_page_module/rjs_gadget_erp5_page_slap_language_view_html
web_page_module/rjs_gadget_erp5_page_slap_language_view_js
web_page_module/rjs_gadget_erp5_page_slap_load_schema_html
web_page_module/rjs_gadget_erp5_page_slap_load_schema_js
web_page_module/rjs_gadget_erp5_page_slap_notify_and_redirect_html
web_page_module/rjs_gadget_erp5_page_slap_notify_and_redirect_js
web_page_module/rjs_gadget_erp5_page_slap_organisation_get_invitation_link_html
web_page_module/rjs_gadget_erp5_page_slap_organisation_get_invitation_link_js
web_page_module/rjs_gadget_erp5_page_slap_organisation_view_html
web_page_module/rjs_gadget_erp5_page_slap_organisation_view_js
web_page_module/rjs_gadget_erp5_page_slap_payment_result_html
web_page_module/rjs_gadget_erp5_page_slap_person_add_erp5_login_html
web_page_module/rjs_gadget_erp5_page_slap_person_add_erp5_login_js
web_page_module/rjs_gadget_erp5_page_slap_person_get_token_html
web_page_module/rjs_gadget_erp5_page_slap_person_get_token_js
web_page_module/rjs_gadget_erp5_page_slap_person_request_certificate_html
web_page_module/rjs_gadget_erp5_page_slap_person_request_certificate_js
web_page_module/rjs_gadget_erp5_page_slap_person_view_html
web_page_module/rjs_gadget_erp5_page_slap_person_view_js
web_page_module/rjs_gadget_erp5_page_slap_project_get_invitation_link_html
web_page_module/rjs_gadget_erp5_page_slap_project_get_invitation_link_js
web_page_module/rjs_gadget_erp5_page_slap_regularisation_request_view_html
web_page_module/rjs_gadget_erp5_page_slap_regularisation_request_view_js
web_page_module/rjs_gadget_erp5_page_slap_rss_ticket_html
web_page_module/rjs_gadget_erp5_page_slap_rss_ticket_js
web_page_module/rjs_gadget_erp5_page_slap_sale_invoice_transaction_view_html
web_page_module/rjs_gadget_erp5_page_slap_sale_invoice_transaction_view_js
web_page_module/rjs_gadget_erp5_page_slap_site_list_html
web_page_module/rjs_gadget_erp5_page_slap_site_list_js
web_page_module/rjs_gadget_erp5_page_slap_site_view_html
web_page_module/rjs_gadget_erp5_page_slap_site_view_js
<<<<<<< HEAD
web_page_module/rjs_gadget_erp5_page_slap_test_parameter_form_html
web_page_module/rjs_gadget_erp5_page_slap_test_parameter_form_js
web_page_module/rjs_gadget_erp5_page_slap_test_readonly_parameter_form_html
web_page_module/rjs_gadget_erp5_page_slap_test_readonly_parameter_form_js
web_page_module/rjs_gadget_erp5_page_slap_transfer_instance_tree_html
web_page_module/rjs_gadget_erp5_page_slap_transfer_instance_tree_js
web_page_module/rjs_gadget_erp5_page_slap_upgrade_decision_view_html
web_page_module/rjs_gadget_erp5_page_slap_upgrade_decision_view_js
web_page_module/rjs_gadget_erp5_page_slapos_access_html
web_page_module/rjs_gadget_erp5_page_slapos_access_js
web_page_module/rjs_gadget_erp5_page_slapos_css
web_page_module/rjs_gadget_erp5_page_slapos_html
web_page_module/rjs_gadget_erp5_page_slapos_html
web_page_module/rjs_gadget_erp5_page_slapos_js
web_page_module/rjs_gadget_erp5_panel_shortcut_html
web_page_module/rjs_gadget_erp5_panel_shortcut_js
web_page_module/rjs_gadget_erp5_pt_form_slapos_index_html
web_page_module/rjs_gadget_erp5_pt_form_slapos_index_js
web_page_module/rjs_gadget_slapos_alert_listbox_field_css
web_page_module/rjs_gadget_slapos_alert_listbox_field_html
web_page_module/rjs_gadget_slapos_alert_listbox_field_js
web_page_module/rjs_gadget_slapos_annotated_helper_css
web_page_module/rjs_gadget_slapos_annotated_helper_html
web_page_module/rjs_gadget_slapos_annotated_helper_js
web_page_module/rjs_gadget_slapos_appcache
web_page_module/rjs_gadget_slapos_compute_node_map_html
web_page_module/rjs_gadget_slapos_compute_node_map_js
web_page_module/rjs_gadget_slapos_event_discussion_entry_css
web_page_module/rjs_gadget_slapos_event_discussion_entry_html
web_page_module/rjs_gadget_slapos_event_discussion_entry_js
web_page_module/rjs_gadget_slapos_header_html
web_page_module/rjs_gadget_slapos_header_js
web_page_module/rjs_gadget_slapos_invoice_printout_html
web_page_module/rjs_gadget_slapos_invoice_printout_js
web_page_module/rjs_gadget_slapos_invoice_state_html
web_page_module/rjs_gadget_slapos_invoice_state_js
web_page_module/rjs_gadget_slapos_label_listbox_field_html
web_page_module/rjs_gadget_slapos_label_listbox_field_js
web_page_module/rjs_gadget_slapos_login_page_css
web_page_module/rjs_gadget_slapos_panel_html
web_page_module/rjs_gadget_slapos_panel_js
web_page_module/rjs_gadget_slapos_payment_result_js**
web_page_module/rjs_gadget_slapos_translation_data_js
web_page_module/rjs_gadget_slapos_translation_html
web_page_module/rjs_gadget_slapos_utils_js
web_page_module/rjs_leaflet_css
web_page_module/rjs_leaflet_js
web_page_module/slapos_admin_front_page
web_site_module/hostingjs
web_site_module/hostingjs/**
web_site_module/renderjs_oss
web_site_module/renderjs_oss/**
\ No newline at end of file
<!DOCTYPE html>
<html manifest="gadget_erp5.appcache">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ERP5</title>
<link rel="shortcut icon" href="favicon.ico">
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="URI.js" type="text/javascript"></script>
<script src="vkbeautify.js" type="text/javascript"></script>
<script src="domsugar.js" type="text/javascript"></script>
<script src="gadget_erp5_page_slap_parameter_form.js" type="text/javascript"></script>
<link href="gadget_erp5_page_slap_parameter_form.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div class="parameter-editor">
<fieldset id="software-type">
<div class="field" title="software_type">
<label i18n:translate="" i18n:domain="ui"> Software Type </label>
<div class="input">
<select size="1" name="software_type" class="slapos-software-type">
</select>
</div>
</div>
<div class="field" title="serialisation_type">
<div class="input">
<input type=hidden name="serialisation_type" class="slapos-serialisation-type">
</div>
</div>
<div class="field slapos-parameter-editor-button" title="hide_show_button">
<div class="input">
<button type="button" class="slapos-show-form ui-btn-icon-left ui-icon-spinner" i18n:translate="" i18n:domain="ui"> Parameter Form </button>
<button type="button" class="slapos-show-raw-parameter ui-btn-icon-left ui-icon-code" disabled i18n:translate="" i18n:domain="ui"> Raw XML</button>
</div>
</div>
</fieldset>
<fieldset id="parameter-main">
<div class="parameter_json_form"
data-gadget-url="gadget_erp5_page_slap_json_form.html"
data-gadget-scope="json_form"> </div>
<div class="failover-textarea"> </div>
</fieldset>
<fieldset id="parameter-optional"> </fieldset>
<fieldset id="parameter-xml">
<input type=hidden name="parameter_hash" class="parameter_hash_output">
<input type=hidden name="shared" class="parameter_shared">
<input type=hidden name="schema_url" class="parameter_schema_url">
</fieldset>
</div>
<div class="loadschema"
data-gadget-url="gadget_erp5_page_slap_load_schema.html"
data-gadget-scope="loadschema" >
</div>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_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>categories</string> </key>
<value>
<tuple>
<string>upgrade_scope/confirmation</string>
<string>upgrade_scope/disabled</string>
<string>upgrade_scope/disabled</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>never</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Never</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<!doctype html>
<html>
<!--
data-i18n=Certificate is Revoked.
data-i18n=This person has no certificate to revoke.
data-i18n=Parent Relative Url
data-i18n=Revoke Person Certificate
-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>OfficeJS Add Text Document</title>
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script src="gadget_erp5_page_slap_person_revoke_certificate.js"></script>
</head>
<body>
<form class="save_form ui-body-c" novalidate>
<button type="submit" class="ui-btn ui-btn-b ui-btn-inline
ui-icon-edit ui-btn-icon-right ui-screen-hidden"></button>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="form_view"
data-gadget-sandbox="public">
</div>
</form>
</body>
</html>
......@@ -91,7 +91,7 @@
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_page_slap_compute_node_get_token.html</string> </value>
<value> <string>gadget_erp5_page_slap_person_revoke_certificate.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -101,7 +101,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>rjs_gadget_erp5_page_slap_compute_node_get_token_html</string> </value>
<value> <string>rjs_gadget_erp5_page_slap_person_revoke_certificate_html</string> </value>
</item>
<item>
<key> <string>language</string> </key>
......@@ -142,7 +142,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Slap Compute Node Get Token</string> </value>
<value> <string>Slap Person Revoke Certificate</string> </value>
</item>
<item>
<key> <string>url_string</string> </key>
......@@ -238,7 +238,7 @@
</tuple>
<state>
<tuple>
<float>1509612897.17</float>
<float>1509386436.45</float>
<string>UTC</string>
</tuple>
</state>
......@@ -287,7 +287,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>982.16979.21780.13056</string> </value>
<value> <string>982.21236.17255.51438</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -307,7 +307,7 @@
</tuple>
<state>
<tuple>
<float>1583168466.4</float>
<float>1583423335.96</float>
<string>UTC</string>
</tuple>
</state>
......@@ -370,7 +370,7 @@
</tuple>
<state>
<tuple>
<float>1509612873.23</float>
<float>1509386361.74</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, rJS, RSVP, jIO, Blob */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP) {
"use strict";
rJS(window)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("updatePanel", "updatePanel")
.declareAcquiredMethod("getUrlParameter", "getUrlParameter")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("updateDocument", "updateDocument")
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
.declareAcquiredMethod("jio_putAttachment", "jio_putAttachment")
.declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", 'notifySubmitted')
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("getTranslationList", "getTranslationList")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod("render", function (options) {
return this.changeState({
jio_key: options.jio_key,
doc: options.doc,
editable: 1
});
})
.onEvent('submit', function () {
var gadget = this;
return gadget.notifySubmitting()
.push(function () {
return gadget.getDeclaredGadget('form_view');
})
.push(function (form_gadget) {
return form_gadget.getContent();
})
.push(function (content) {
return gadget.updateDocument(content);
})
.push(function () {
return gadget.notifySubmitted({message: gadget.message_translation, status: 'success'});
});
})
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
.onStateChange(function () {
var gadget = this,
page_title_translation,
translation_list = [
"Data updated.",
"Reference",
"Certificate Login:"
];
return new RSVP.Queue()
.push(function () {
return RSVP.all([
gadget.getDeclaredGadget('form_view'),
gadget.getSetting("hateoas_url"),
gadget.getTranslationList(translation_list)
]);
})
.push(function (result) {
gadget.message_translation = result[2][0];
page_title_translation = result[2][2];
return result[0].render({
erp5_document: {
"_embedded": {"_view": {
"my_reference": {
"description": "",
"title": result[2][1],
"default": gadget.state.doc.reference,
"css_class": "",
"required": 1,
"editable": 0,
"key": "reference",
"hidden": 0,
"type": "StringField"
}
}},
"_links": {
"type": {
// form_list display portal_type in header
name: ""
}
}
},
form_definition: {
group_list: [[
"left",
[["my_reference"]]
]]
}
});
})
.push(function () {
return gadget.updatePanel({
jio_key: "person_module"
});
})
.push(function () {
return RSVP.all([
gadget.getUrlFor({command: 'history_previous'}),
gadget.getUrlFor({command: "change", options: {page: "slap_invalidate_login"}})
]);
})
.push(function (url_list) {
var header_dict = {
selection_url: url_list[0],
page_title: page_title_translation + " " + gadget.state.doc.reference,
delete_url: url_list[1]
};
return gadget.updateHeader(header_dict);
});
});
}(window, rJS, RSVP));
\ No newline at end of file
......@@ -87,7 +87,7 @@
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_page_slap_compute_node_get_token.js</string> </value>
<value> <string>gadget_erp5_page_slap_person_revoke_certificate.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -97,7 +97,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>rjs_gadget_erp5_page_slap_compute_node_get_token_js</string> </value>
<value> <string>rjs_gadget_erp5_page_slap_person_revoke_certificate_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
......@@ -138,7 +138,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>SlapOS Compute Node Get Token JS</string> </value>
<value> <string>SlapOS Revoke Certificate JS</string> </value>
</item>
<item>
<key> <string>url_string</string> </key>
......@@ -234,7 +234,7 @@
</tuple>
<state>
<tuple>
<float>1509613892.82</float>
<float>1509386632.79</float>
<string>UTC</string>
</tuple>
</state>
......@@ -283,7 +283,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>987.11834.11282.15496</string> </value>
<value> <string>986.45437.22132.61764</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -303,7 +303,7 @@
</tuple>
<state>
<tuple>
<float>1602260779.33</float>
<float>1602258980.64</float>
<string>UTC</string>
</tuple>
</state>
......@@ -366,7 +366,7 @@
</tuple>
<state>
<tuple>
<float>1509613815.52</float>
<float>1509386579.96</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -11,9 +11,6 @@
// @ts-ignore
window.translation_data = {
"en": {
"1/3 Select one Software": "1/3 Select one Software",
"2/3 Select one Release": "2/3 Select one Release",
"3/3 Request Service:": "3/3 Request Service:",
"Accept": "Accept",
"Accept Upgrade Decision:": "Accept Upgrade Decision:",
"Access Monitor": "Access Monitor",
......@@ -27,16 +24,10 @@
"Add Organisation": "Add Organisation",
"Add Ticket": "Add Ticket",
"Address": "Address",
"Aggregate": "Aggregate",
"All criterions (AND)": "All criterions (AND)",
"All work caught up!": "All work caught up!",
"Allocation Scope": "Allocation Scope",
"Already Requested": "Already Requested",
"Ask Confirmation before Upgrade": "Ask Confirmation before Upgrade",
"Associated Servers": "Associated Servers",
"Associated Tickets": "Associated Tickets",
"At least one (OR)": "At least one (OR)",
"Auto Upgrade": "Auto Upgrade",
"Back": "Back",
"Breadcrumb": "Breadcrumb",
"Cancel": "Cancel",
......@@ -45,27 +36,12 @@
"City": "City",
"Clone": "Clone",
"Close": "Close",
"Close Ticket": "Close Ticket",
"Close:": "Close:",
"Closed for maintenance": "Closed for maintenance",
"Closed for termination": "Closed for termination",
"Closed forever": "Closed forever",
"Closed outdated": "Closed outdated",
"Command Line to Run": "Command Line to Run",
"Comments": "Comments",
"Compute Node": "Compute Node",
"Computer Network": "Computer Network",
"Computer Network is transferred.": "Computer Network is transferred.",
"Computer Network:": "Computer Network:",
"Compute Node Reference": "Compute Node Reference",
"Compute Node is transferred.": "Compute Node is transferred.",
"Compute Node:": "Compute Node:",
"Configuration Parameter": "Configuration Parameter",
"Configure": "Configure",
"Configure Editor": "Configure Editor",
"Confirm": "Confirm",
"Confirm your Password": "Confirm your Password",
"Connection Parameters": "Connection Parameters",
"Contains": "Contains",
"Continue": "Continue",
"Copied": "Copied",
......@@ -74,11 +50,8 @@
"Credential Request Created.": "Credential Request Created.",
"Critical RSS": "Critical RSS",
"Currency": "Currency",
"Current Location": "Current Location",
"Current Organisation": "Current Organisation",
"Current Project": "Current Project",
"Current Site": "Current Site",
"Current User": "Current User",
"Cut": "Cut",
"Dashboard": "Dashboard",
"Data Updated": "Data Updated",
......@@ -88,22 +61,18 @@
"Data updated. ": "Data updated. ",
"Date": "Date",
"Delete": "Delete",
"Delete Network:": "Delete Network:",
"Delete Project:": "Delete Project:",
"Delete Site:": "Delete Site:",
"Description": "Description",
"Destination Decision": "Destination Decision",
"Destroy": "Destroy",
"Destroy Instance Tree:": "Destroy Instance Tree:",
"Destroy Software Installation": "Destroy Software Installation",
"Disable Login": "Disable Login",
"Disabled": "Disabled",
"Documentation": "Documentation",
"Download": "Download",
"Download Invoice": "Download Invoice",
"Edit": "Edit",
"Edit this field": "Edit this field",
"Editable": "Editable",
"Email": "Email",
"Enabled": "Enabled",
"Encountered an unknown error. Try to resubmit.": "Encountered an unknown error. Try to resubmit.",
"Ensure you have another login configured, else you will not be able to login anymore.": "Ensure you have another login configured, else you will not be able to login anymore.",
"Equal to": "Equal to",
......@@ -118,30 +87,21 @@
"Filter": "Filter",
"Filter Editor": "Filter Editor",
"First Name": "First Name",
"Follow up": "Follow up",
"Front": "Front",
"Future Location": "Future Location",
"Future Organisation": "Future Organisation",
"Future Project": "Future Project",
"Generate New Invitation Link": "Generate New Invitation Link",
"Global": "Global",
"Google Login:": "Google Login:",
"Greater than": "Greater than",
"Greater than or Equal to": "Greater than or Equal to",
"Help": "Help",
"History": "History",
"Home": "Home",
"Instance Tree": "Instance Tree",
"Instance Tree:": "Instance Tree:",
"Include": "Include",
"Include your close message": "Include your close message",
"Include your message": "Include your message",
"Info": "Info",
"Input data has errors.": "Input data has errors.",
"Input is required but no input given.": "Input is required but no input given.",
"Instance Parameter": "Instance Parameter",
"Instance Parameters": "Instance Parameters",
"Instance to be removed:": "Instance to be removed:",
"Instances": "Instances",
"Intent not supported": "Intent not supported",
"Invalid DateTime": "Invalid DateTime",
"Invalid Search Criteria": "Invalid Search Criteria",
......@@ -155,8 +115,6 @@
"Latitude": "Latitude",
"Less than": "Less than",
"Less than or Equal to": "Less than or Equal to",
"Limit Exceed": "Limit Exceed",
"Link to the Compute Node": "Link to the Compute Node",
"List": "List",
"Loading": "Loading",
"Login Account": "Login Account",
......@@ -169,49 +127,28 @@
"Longitude": "Longitude",
"Map": "Map",
"Menu": "Menu",
"Message": "Message",
"Modification Date": "Modification Date",
"Modules": "Modules",
"Monitoring": "Monitoring",
"Monitoring Status": "Monitoring Status",
"Network": "Network",
"Network is Deleted.": "Network is Deleted.",
"Network to be removed:": "Network to be removed:",
"My Account": "My Account",
"Networks": "Networks",
"Never Upgrade": "Never Upgrade",
"New": "New",
"New Compute Node": "New Compute Node",
"New Compute Node created.": "New Compute Node created.",
"New Invitation link generated.": "New Invitation link generated.",
"New Message": "New Message",
"New Network": "New Network",
"New Network created.": "New Network created.",
"New Organisation": "New Organisation",
"New Organisation created.": "New Organisation created.",
"New Project": "New Project",
"New Project created.": "New Project created.",
"New Site": "New Site",
"New Site created.": "New Site created.",
"New Software Installation created.": "New Software Installation created.",
"New Ticket": "New Ticket",
"New Ticket created.": "New Ticket created.",
"New Ticket related to": "New Ticket related to",
"New User Login created.": "New User Login created.",
"New service created.": "New service created.",
"Next": "Next",
"No Alert!": "No Alert!",
"No records": "No records",
"No such document was found": "No such document was found",
"Not equal to": "Not equal to",
"Nothing selected": "Nothing selected",
"Open Public": "Open Public",
"Open for Friends only": "Open for Friends only",
"Open for Personal use only": "Open for Personal use only",
"Open for Subscribers only": "Open for Subscribers only",
"Organisation": "Organisation",
"Organisation to be removed:": "Organisation to be removed:",
"Organisations": "Organisations",
"Others": "Others",
"Parameter": "Parameter",
"Paid": "Paid",
"Parent Relative Url": "Parent Relative Url",
"Password": "Password",
"Password is different from confirmation": "Password is different from confirmation",
......@@ -221,7 +158,7 @@
"Payment": "Payment",
"Payment State": "Payment State",
"Pending Tickets to Process": "Pending Tickets to Process",
"Please review the form.": "Please review the form.",
"Please fill all required fields to submit": "Please fill all required fields to submit",
"Portal Type": "Portal Type",
"Postal Code": "Postal Code",
"Preferences": "Preferences",
......@@ -229,15 +166,12 @@
"Price": "Price",
"Print": "Print",
"Proceed": "Proceed",
"Proceed to Supply Software": "Proceed to Supply Software",
"Profile": "Profile",
"Project": "Project",
"Project is Deleted.": "Project is Deleted.",
"Project to be removed:": "Project to be removed:",
"Project:": "Project:",
"Projects": "Projects",
"RSS": "RSS",
"RSS (all)": "RSS (all)",
"RSS Critical": "RSS Critical",
"Records": "Records",
"Reference": "Reference",
"Region": "Region",
......@@ -249,26 +183,18 @@
"Request Certificate": "Request Certificate",
"Request New Certificate": "Request New Certificate",
"Request New Token": "Request New Token",
"Request a Trial for": "Request a Trial for",
"Requesting a service...": "Requesting a service...",
"Reset": "Reset",
"Return to Invoice List": "Return to Invoice List",
"Revoke Certificate": "Revoke Certificate",
"Revoke Compute Node Certificate": "Revoke Compute Node Certificate",
"Revoke Person Certificate": "Revoke Person Certificate",
"Role": "Role",
"Role Definition": "Role Definition",
"SLA": "SLA",
"Save": "Save",
"Search": "Search",
"Search Expression": "Search Expression",
"Searchable Text": "Searchable Text",
"Select": "Select",
"Servers": "Servers",
"Service is Destroyed.": "Service is Destroyed.",
"Services": "Services",
"Short Title": "Short Title",
"Show All Tickets": "Show All Tickets",
"Site": "Site",
"Site is Deleted.": "Site is Deleted.",
"Site:": "Site:",
......@@ -276,42 +202,19 @@
"SlapOS Master API": "SlapOS Master API",
"SlapOS Master Web UI": "SlapOS Master Web UI",
"Slapos": "Slapos",
"Software Installation: ": "Software Installation: ",
"Software Products": "Software Products",
"Software Release": "Software Release",
"Software Release URL": "Software Release URL",
"Software Release Version": "Software Release Version",
"Software Release to be Installed": "Software Release to be Installed",
"Software Releases": "Software Releases",
"Software Type": "Software Type",
"Sort": "Sort",
"Sort Editor": "Sort Editor",
"Source": "Source",
"Start": "Start",
"Start Instance Tree": "Start Instance Tree",
"State": "State",
"Status": "Status",
"Stop": "Stop",
"Stop Instance Tree:": "Stop Instance Tree:",
"Subject": "Subject",
"Submit": "Submit",
"Subscription": "Subscription",
"Subscriptions": "Subscriptions",
"Success...": "Success...",
"Supplied Softwares": "Supplied Softwares",
"Supply": "Supply",
"Support Request": "Support Request",
"Target Compute Node Reference": "Target Compute Node Reference",
"Target Compute Node Title": "Target Compute Node Title",
"Telephone": "Telephone",
"Terms of Service": "Terms of Service",
"Thank You": "Thank You",
"The Date": "The Date",
"The Status": "The Status",
"The name of a document in ER5": "The name of a document in ER5",
"The name of a document in ERP5": "The name of a document in ERP5",
"This compute_node already has one certificate, please revoke it before request a new one..": "This compute_node already has one certificate, please revoke it before request a new one..",
"This compute_node has no certificate to revoke.": "This compute_node has no certificate to revoke.",
"This page contains unsaved changes, do you really want to leave the page ?": "This page contains unsaved changes, do you really want to leave the page ?",
"This person already has one certificate, please revoke it before request a new one..": "This person already has one certificate, please revoke it before request a new one..",
"This person already has one token, please revoke it before request a new one.": "This person already has one token, please revoke it before request a new one.",
......@@ -321,29 +224,23 @@
"Title": "Title",
"Token": "Token",
"Token is Requested.": "Token is Requested.",
"Tools": "Tools",
"Total": "Total",
"Trade Condition": "Trade Condition",
"Transfer": "Transfer",
"Transfer Compute Node": "Transfer Compute Node",
"Transfer Computer Network": "Transfer Computer Network",
"Transfer Service": "Transfer Service",
"Translate this field description": "Translate this field description",
"Translate this field title": "Translate this field title",
"Type": "Type",
"Unexpected server error": "Unexpected server error",
"Unknown action to take:": "Unknown action to take:",
"Update": "Update",
"Upgrade": "Upgrade",
"Upgrade Decision :": "Upgrade Decision :",
"Upload": "Upload",
"Url": "Url",
"Usage": "Usage",
"User": "User",
"Value": "Value",
"Version": "Version",
"Viewable": "Viewable",
"Views": "Views",
"Warning": "Warning",
"Warnings": "Warnings",
"Web Message": "Web Message",
"What are you looking for?": "What are you looking for?",
"Workflows": "Workflows",
"Worklist": "Worklist",
......@@ -353,16 +250,10 @@
"You are offline.": "You are offline.",
"You cannot delete this object because you have associated Compute Nodes and/or services.": "You cannot delete this object because you have associated Compute Nodes and/or services.",
"You do not have the permissions to edit the object.": "You do not have the permissions to edit the object.",
"You sucessfully request destruction.": "You sucessfully request destruction.",
"Your Account": "Your Account",
"Your Certificate": "Your Certificate",
"Your Close Message": "Your Close Message",
"Your Critical RSS Feed Link": "Your Critical RSS Feed Link",
"Your Email": "Your Email",
"Your Friends email": "Your Friends email",
"Your Invitation Link": "Your Invitation Link",
"Your Key": "Your Key",
"Your Message": "Your Message",
"Your RSS Feed Link": "Your RSS Feed Link",
"Your RSS URL": "Your RSS URL",
"Your Token": "Your Token",
......@@ -372,9 +263,6 @@
"sample of": "sample of"
},
"zh": {
"1/3 Select one Software": "1/3 选择一个软件",
"2/3 Select one Release": "2/3 选择一个发布",
"3/3 Request Service:": "3/3 请求服务:",
"Accept": "接受",
"Accept Upgrade Decision:": "接受升级决定:",
"Access Monitor": "访问监控台",
......@@ -388,16 +276,10 @@
"Add Organisation": "添加组织",
"Add Ticket": "添加工单",
"Address": "地址",
"Aggregate": "合计",
"All criterions (AND)": "符合所有(和)",
"All work caught up!": "所有的工作都完成了!",
"Allocation Scope": "发布状态/范围",
"Already Requested": "已请求",
"Ask Confirmation before Upgrade": "升级前需请求确认",
"Associated Servers": "相关联的服务器",
"Associated Tickets": "相关联的工单",
"At least one (OR)": "至少一个(或)",
"Auto Upgrade": "自动升级",
"Back": "返回",
"Breadcrumb": "浏览路径",
"Cancel": "取消",
......@@ -406,27 +288,12 @@
"City": "城市",
"Clone": "复制",
"Close": "终止",
"Close Ticket": "终止工单",
"Close:": "终止:",
"Closed for maintenance": "终止以维护",
"Closed for termination": "终止以不再使用",
"Closed forever": "永久终止并删除",
"Closed outdated": "因过期而终止",
"Command Line to Run": "执行命令行",
"Comments": "评论",
"Compute Node": "计算机",
"Computer Network": "计算机网络",
"Computer Network is transferred.": "计算机网络已转移。",
"Computer Network:": "计算机网络:",
"Compute Node Reference": "计算机编号",
"Compute Node is transferred.": "计算机已转移。",
"Compute Node:": "计算机:",
"Configuration Parameter": "配置参数",
"Configure": "配置",
"Configure Editor": "Configure Editor",
"Confirm": "确认",
"Confirm your Password": "确认您的密码",
"Connection Parameters": "连接参数",
"Contains": "包含",
"Continue": "继续",
"Copied": "已复制",
......@@ -435,11 +302,8 @@
"Credential Request Created.": "Credential Request Created.",
"Critical RSS": "重要订阅消息",
"Currency": "货币",
"Current Location": "当前地点",
"Current Organisation": "当前组织",
"Current Project": "当前项目",
"Current Site": "当前站点",
"Current User": "当前用户",
"Cut": "剪切",
"Dashboard": "仪表板",
"Data Updated": "数据已更新",
......@@ -449,22 +313,18 @@
"Data updated. ": "数据已更新。",
"Date": "日期",
"Delete": "删除",
"Delete Network:": "删除网络:",
"Delete Project:": "删除项目:",
"Delete Site:": "删除站点:",
"Description": "描述",
"Destination Decision": "终点决策",
"Destroy": "销毁",
"Destroy Instance Tree:": "销毁托管订阅:",
"Destroy Software Installation": "销毁软件安装",
"Disable Login": "关闭登录账号",
"Disabled": "已禁用",
"Documentation": "文档",
"Download": "下载",
"Download Invoice": "下载账单",
"Edit": "编辑",
"Edit this field": "Edit this field",
"Editable": "可编辑",
"Email": "电子邮件",
"Enabled": "已启用",
"Encountered an unknown error. Try to resubmit.": "发生未知错误。 请尝试重新提交。",
"Ensure you have another login configured, else you will not be able to login anymore.": "确保您还有另一个配置过的登录用户,不然您将不再能登录。",
"Equal to": "等于",
......@@ -479,30 +339,21 @@
"Filter": "筛选",
"Filter Editor": "筛选编辑器",
"First Name": "",
"Follow up": "跟进",
"Front": "前端",
"Future Location": "将来的地点",
"Future Organisation": "将来的组织",
"Future Project": "将来的项目",
"Generate New Invitation Link": "生成新的邀请链接",
"Global": "Global",
"Google Login:": "谷歌登录:",
"Greater than": "大于",
"Greater than or Equal to": "大于等于",
"Help": "Help",
"History": "历史记录",
"Home": "主页",
"Instance Tree": "托管订阅",
"Instance Tree:": "托管订阅:",
"Include": "包含",
"Include your close message": "包含您的终止信息",
"Include your message": "包含您的信息",
"Info": "信息",
"Input data has errors.": "输入数据有错误。",
"Input is required but no input given.": "有必输入项未填写",
"Instance Parameter": "实例参数",
"Instance Parameters": "实例参数",
"Instance to be removed:": "将要被移除的实例:",
"Instances": "实例",
"Intent not supported": "不支持该意图。",
"Invalid DateTime": "无效的日期或时间",
"Invalid Search Criteria": "无效搜索条件",
......@@ -516,8 +367,6 @@
"Latitude": "纬度",
"Less than": "小于",
"Less than or Equal to": "小于等于",
"Limit Exceed": "超出限制",
"Link to the Compute Node": "连接到该计算机",
"List": "列表",
"Loading": "加载中",
"Login Account": "登录账号",
......@@ -530,49 +379,28 @@
"Longitude": "经度",
"Map": "地图",
"Menu": "菜单",
"Message": "您希望咨询的信息",
"Modification Date": "修改日期",
"Modules": "模块",
"Monitoring": "监控",
"Monitoring Status": "监控状态",
"Network": "网络",
"Network is Deleted.": "网络已删除。",
"Network to be removed:": "将要被删除的网络: ",
"My Account": "我的帐号",
"Networks": "网络",
"Never Upgrade": "从不升级",
"New": "新建",
"New Compute Node": "新的计算机",
"New Compute Node created.": "新的计算机已创建。",
"New Invitation link generated.": "新的邀请链接已生成。",
"New Message": "新的信息",
"New Network": "新的网络",
"New Network created.": "已创建新的网络。",
"New Organisation": "新组织",
"New Organisation created.": "新的组织已创建。",
"New Project": "新的项目",
"New Project created.": "新的项目已创建。",
"New Site": "新的站点",
"New Site created.": "新的站点已创建。",
"New Software Installation created.": "新的软件安装已创建。",
"New Ticket": "新的工单",
"New Ticket created.": "新的工单已创建。",
"New Ticket related to": "新的工单关联至",
"New User Login created.": "新用户登录已创建。",
"New service created.": "已创建新的服务。",
"Next": "下一页",
"No Alert!": "没有警报!",
"No records": "没有记录",
"No such document was found": "未找到该文件",
"Not equal to": "Not equal to",
"Nothing selected": "还未选择任何选项",
"Open Public": "开启(公开)",
"Open for Friends only": "开启(仅朋友)",
"Open for Personal use only": "开启(仅个人)",
"Open for Subscribers only": "开启(仅订阅者)",
"Organisation": "组织",
"Organisation to be removed:": "将要被删除的组织:",
"Organisations": "组织",
"Others": "其他",
"Parameter": "参数",
"Paid": "Paid",
"Parent Relative Url": "根相对地址",
"Password": "密码",
"Password is different from confirmation": "密码不一致",
......@@ -582,7 +410,7 @@
"Payment": "付款",
"Payment State": "付款状态",
"Pending Tickets to Process": "待处理工单",
"Please review the form.": "请检查表单。",
"Please fill all required fields to submit": "Please fill all required fields to submit",
"Portal Type": "门户类型",
"Postal Code": "邮编",
"Preferences": "偏好设置",
......@@ -590,46 +418,35 @@
"Price": "单价",
"Print": "Print",
"Proceed": "进行",
"Proceed to Supply Software": "进行软件提供。",
"Profile": "简述",
"Project": "项目",
"Project is Deleted.": "项目已删除。",
"Project to be removed:": "将要被删除的项目:",
"Project:": "项目:",
"Projects": "项目",
"RSS": "订阅消息",
"RSS (all)": "订阅消息(全部)",
"RSS Critical": "重要订阅消息",
"Records": "记录",
"Reference": "编号",
"Region": "区域",
"Regularisation Request:": "合规化请求:",
"Reject": "否决",
"Reject Upgrade Decision:": "拒绝升级决定:",
"Related Compute Node or Service": "相关联的计算机或服务",
"Related Compute Node or Service": "Related Compute Node or Service",
"Reports": "报表",
"Request Certificate": "申请证书",
"Request New Certificate": "请求新的证书",
"Request New Token": "请求新令牌",
"Request a Trial for": "请求试用",
"Requesting a service...": "正在请求一个服务...",
"Reset": "重设",
"Return to Invoice List": "返回账单列表",
"Revoke Certificate": "吊销证书",
"Revoke Compute Node Certificate": "吊销计算机证书",
"Revoke Person Certificate": "吊销用户证书",
"Role": "角色",
"Role Definition": "角色定义",
"SLA": "SLA",
"Save": "保存",
"Search": "查询",
"Search Expression": "搜索表达式",
"Searchable Text": "检索文本",
"Select": "选择",
"Servers": "服务器",
"Service is Destroyed.": "服务已销毁。",
"Services": "服务",
"Short Title": "短标题",
"Show All Tickets": "显示所有工单",
"Site": "站点",
"Site is Deleted.": "站点已删除。",
"Site:": "站点:",
......@@ -637,42 +454,19 @@
"SlapOS Master API": "SlapOS主应用程序接口API",
"SlapOS Master Web UI": "SlapOS主网络用户界面",
"Slapos": "Slapos",
"Software Installation: ": "软件安装:",
"Software Products": "软件产品",
"Software Release": "软件发布",
"Software Release URL": "软件发行URL",
"Software Release Version": "软件发布版本",
"Software Release to be Installed": "将要安装发布软件",
"Software Releases": "软件发布",
"Software Type": "软件类型",
"Sort": "排序",
"Sort Editor": "排序编辑器",
"Source": "来源",
"Start": "开始",
"Start Instance Tree": "开始托管订阅:",
"State": "状态",
"Status": "状态",
"Stop": "停止",
"Stop Instance Tree:": "停止托管订阅:",
"Subject": "主题",
"Submit": "提交",
"Subscription": "订阅",
"Subscriptions": "订阅",
"Success...": "成功...",
"Supplied Softwares": "提供的软件",
"Supply": "供应",
"Support Request": "客户支持请求",
"Target Compute Node Reference": "目标计算机编号",
"Target Compute Node Title": "目标计算机标题",
"Telephone": "电话号码",
"Terms of Service": "服务条款",
"Thank You": "谢谢您",
"The Date": "日期",
"The Status": "状态",
"The name of a document in ER5": "The name of a document in ER5",
"The name of a document in ERP5": "ERP5文件的标题",
"This compute_node already has one certificate, please revoke it before request a new one..": "该计算机已拥有一个证书,请在请求新的证书之前吊销已有证书。",
"This compute_node has no certificate to revoke.": "该计算机没有可吊销的证书。",
"This page contains unsaved changes, do you really want to leave the page ?": "此页面包含未保存的更改,您是否真的想离开页面?",
"This person already has one certificate, please revoke it before request a new one..": "该用户已拥有一个证书,请在请求新的证书之前吊销已有证书。",
"This person already has one token, please revoke it before request a new one.": "该用户已拥有一个令牌,请在请求新的令牌之前吊销已有证书。",
......@@ -682,29 +476,23 @@
"Title": "标题",
"Token": "令牌",
"Token is Requested.": "令牌已请求。",
"Tools": "工具",
"Total": "总和",
"Trade Condition": "贸易条款",
"Transfer": "转移",
"Transfer Compute Node": "转移计算机",
"Transfer Computer Network": "转移计算机网络",
"Transfer Service": "转移服务",
"Translate this field description": "Translate this field description",
"Translate this field title": "Translate this field title",
"Type": "类别",
"Unexpected server error": "Unexpected server error",
"Unknown action to take:": "采取未知操作:",
"Update": "更新",
"Upgrade": "升级",
"Upgrade Decision :": "升级决定:",
"Upload": "上传",
"Url": "Url",
"Usage": "用途",
"User": "用户",
"Value": "",
"Version": "版本",
"Viewable": "预览",
"Views": "概览",
"Warning": "警告",
"Warnings": "警告",
"Web Message": "网站信息",
"What are you looking for?": "您在寻找什么?",
"Workflows": "工作流程",
"Worklist": "工作列表",
......@@ -712,18 +500,12 @@
"You are not allowed to access this content, please login with an user which has the right permission": "您没有权限查看此内容,请以有权限的用户登录。",
"You are offline": "You are offline",
"You are offline.": "您已离线。",
"You cannot delete this object because you have associated Compute Nodes and/or services.": "您不能删除该网络,因为您已将它关联至计算机和/或服务。",
"You cannot delete this object because you have associated Compute Nodes and/or services.": "You cannot delete this object because you have associated Compute Nodes and/or services.",
"You do not have the permissions to edit the object.": "您没有编辑该对象的权限。",
"You sucessfully request destruction.": "您成功请求销毁。",
"Your Account": "您的登录账号",
"Your Certificate": "您的证书",
"Your Close Message": "您的终止信息",
"Your Critical RSS Feed Link": "您的重要订阅RSS源链接",
"Your Email": "您的电子邮件",
"Your Friends email": "您朋友的邮箱",
"Your Invitation Link": "您的邀请链接",
"Your Key": "Your Key",
"Your Message": "您的消息",
"Your RSS Feed Link": "您的订阅消息RSS源链接",
"Your RSS URL": "您的订阅消息RSS地址",
"Your Token": "您的令牌",
......
......@@ -226,7 +226,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <unicode>zope</unicode> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -240,7 +240,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>998.18207.59213.64375</string> </value>
<value> <string>1010.14961.23101.61474</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1645206076.56</float>
<float>1691160390.05</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -353,16 +353,6 @@
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_payment_url_template</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
......@@ -456,18 +446,9 @@
<key> <string>configuration_payment_result</string> </key>
<value> <string>slap_payment_result</string> </value>
</item>
<item>
<key> <string>configuration_payment_url_template</string> </key>
<value> <string encoding="cdata"><![CDATA[
%(url)s/#/%(payment_transaction_url)s?page=slap_payment_result&result=%(result)s
]]></string> </value>
</item>
<item>
<key> <string>configuration_precache_manifest_script_list</string> </key>
<value> <string>WebSection_getHostingJSPrecacheManifestList\n
WebSection_getJsonEditorPrecacheManifestList</string> </value>
<value> <string>WebSection_getHostingJSPrecacheManifestList</string> </value>
</item>
<item>
<key> <string>configuration_service_worker_url</string> </key>
......@@ -712,12 +693,12 @@ WebSection_getJsonEditorPrecacheManifestList</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <unicode>zope</unicode> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
<persistent> <string encoding="base64">AAAAAAAAAAs=</string> </persistent>
</value>
</item>
<item>
......@@ -726,7 +707,7 @@ WebSection_getJsonEditorPrecacheManifestList</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1012.36758.49018.20019</string> </value>
<value> <string>1010.14961.23101.61474</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -746,7 +727,7 @@ WebSection_getJsonEditorPrecacheManifestList</string> </value>
</tuple>
<state>
<tuple>
<float>1701890500.23</float>
<float>1691160390.06</float>
<string>UTC</string>
</tuple>
</state>
......@@ -760,4 +741,31 @@ WebSection_getJsonEditorPrecacheManifestList</string> </value>
</dictionary>
</pickle>
</record>
<record id="11" aka="AAAAAAAAAAs=">
<pickle>
<global name="Message" module="Products.ERP5Type.Message"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string>Translation data updated.</string> </value>
</item>
<item>
<key> <string>domain</string> </key>
<value> <string>erp5_ui</string> </value>
</item>
<item>
<key> <string>mapping</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>message</string> </key>
<value> <string>Translation data updated.</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<registered_skin_selection>
<skin_folder_selection>
<skin_folder>erp5_web_renderjs_ui</skin_folder>
<skin_selection>RJS</skin_selection>
</skin_folder_selection>
<skin_folder_selection>
<skin_folder>slapos_hal_json_style</skin_folder>
<skin_selection>Hal,HalRestricted,RJS</skin_selection>
......
from zExceptions import Unauthorized
if REQUEST is not None:
raise Unauthorized
def get_compute_partition_dict():
compute_node_dict = context.getAccessStatus()
compute_partition_dict = context.getComputePartitionNewsDict()
return {"compute_node": compute_node_dict,
"partition": compute_partition_dict,
"portal_type": compute_node_dict['portal_type'],
"reference": compute_node_dict['reference'],
"monitor_url": context.Base_getStatusMonitorUrl()}
return get_compute_partition_dict()
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>batch = 0, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>DataArray_declareAsDefaultData</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
""" This script is required due the ValueError, should be more HTTP friendly.
"""
portal = context.getPortalObject()
person = portal.portal_membership.getAuthenticatedMember().getUserValue()
request = context.REQUEST
response = request.RESPONSE
import json
if person is None:
response.setStatus(403)
else:
try:
person.revokeCertificate()
return json.dumps(True)
except ValueError:
return json.dumps(False)
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_getComputerToken</string> </value>
<value> <string>ERP5Site_getSoftwareReleaseTagVersion</string> </value>
</item>
</dictionary>
</pickle>
......
from zExceptions import Unauthorized
if REQUEST is not None:
raise Unauthorized
return context.getAccessStatus()
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_getComputeNodeToken</string> </value>
<value> <string>SoftwareInstallation_getInstallationState</string> </value>
</item>
</dictionary>
</pickle>
......
// pointer.js
function encodePointer(p) {
return encodeURI(escapePointer(p));
}
function escapePointer(p) {
return p.replace(/~/g, '~0').replace(/\//g, '~1');
}
// dereference.js
const schemaKeyword = {
additionalItems: true,
unevaluatedItems: true,
items: true,
contains: true,
additionalProperties: true,
unevaluatedProperties: true,
propertyNames: true,
not: true,
if: true,
then: true,
else: true
};
const schemaArrayKeyword = {
prefixItems: true,
items: true,
allOf: true,
anyOf: true,
oneOf: true
};
const schemaMapKeyword = {
$defs: true,
definitions: true,
properties: true,
patternProperties: true,
dependentSchemas: true
};
const ignoredKeyword = {
id: true,
$id: true,
$ref: true,
$schema: true,
$anchor: true,
$vocabulary: true,
$comment: true,
default: true,
enum: true,
const: true,
required: true,
type: true,
maximum: true,
minimum: true,
exclusiveMaximum: true,
exclusiveMinimum: true,
multipleOf: true,
maxLength: true,
minLength: true,
pattern: true,
format: true,
maxItems: true,
minItems: true,
uniqueItems: true,
maxProperties: true,
minProperties: true
};
let initialBaseURI = typeof self !== 'undefined' && self.location
?
new URL(self.location.origin + self.location.pathname + location.search)
: new URL('https://github.com/cfworker');
function dereference(schema, lookup = Object.create(null), baseURI = initialBaseURI, basePointer = '') {
if (schema && typeof schema === 'object' && !Array.isArray(schema)) {
const id = schema.$id || schema.id;
if (id) {
const url = new URL(id, baseURI.href);
if (url.hash.length > 1) {
lookup[url.href] = schema;
}
else {
url.hash = '';
if (basePointer === '') {
baseURI = url;
}
else {
dereference(schema, lookup, baseURI);
}
}
}
}
else if (schema !== true && schema !== false) {
return lookup;
}
const schemaURI = baseURI.href + (basePointer ? '#' + basePointer : '');
if (lookup[schemaURI] !== undefined) {
throw new Error(`Duplicate schema URI "${schemaURI}".`);
}
lookup[schemaURI] = schema;
if (schema === true || schema === false) {
return lookup;
}
if (schema.__absolute_uri__ === undefined) {
Object.defineProperty(schema, '__absolute_uri__', {
enumerable: false,
value: schemaURI
});
}
if (schema.$ref && schema.__absolute_ref__ === undefined) {
const url = new URL(schema.$ref, baseURI.href);
url.hash = url.hash;
Object.defineProperty(schema, '__absolute_ref__', {
enumerable: false,
value: url.href
});
}
if (schema.$recursiveRef && schema.__absolute_recursive_ref__ === undefined) {
const url = new URL(schema.$recursiveRef, baseURI.href);
url.hash = url.hash;
Object.defineProperty(schema, '__absolute_recursive_ref__', {
enumerable: false,
value: url.href
});
}
if (schema.$anchor) {
const url = new URL('#' + schema.$anchor, baseURI.href);
lookup[url.href] = schema;
}
for (let key in schema) {
if (ignoredKeyword[key]) {
continue;
}
const keyBase = `${basePointer}/${encodePointer(key)}`;
const subSchema = schema[key];
if (Array.isArray(subSchema)) {
if (schemaArrayKeyword[key]) {
const length = subSchema.length;
for (let i = 0; i < length; i++) {
dereference(subSchema[i], lookup, baseURI, `${keyBase}/${i}`);
}
}
}
else if (schemaMapKeyword[key]) {
for (let subKey in subSchema) {
dereference(subSchema[subKey], lookup, baseURI, `${keyBase}/${encodePointer(subKey)}`);
}
}
else {
dereference(subSchema, lookup, baseURI, keyBase);
}
}
return lookup;
}
// validator.js
// import { deepCompareStrict } from './deep-compare-strict.js';
function deepCompareStrict(a, b) {
const typeofa = typeof a;
if (typeofa !== typeof b) {
return false;
}
if (Array.isArray(a)) {
if (!Array.isArray(b)) {
return false;
}
const length = a.length;
if (length !== b.length) {
return false;
}
for (let i = 0; i < length; i++) {
if (!deepCompareStrict(a[i], b[i])) {
return false;
}
}
return true;
}
if (typeofa === 'object') {
if (!a || !b) {
return a === b;
}
const aKeys = Object.keys(a);
const bKeys = Object.keys(b);
const length = aKeys.length;
if (length !== bKeys.length) {
return false;
}
for (const k of aKeys) {
if (!deepCompareStrict(a[k], b[k])) {
return false;
}
}
return true;
}
return a === b;
}
// import { fastFormat } from './format.js';
const DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
const DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
const TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;
const HOSTNAME = /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;
const URIREF = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
const URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;
const URL_ = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu;
const UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
const JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/;
const JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;
const RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;
const FASTDATE = /^\d\d\d\d-[0-1]\d-[0-3]\d$/;
const FASTTIME = /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i;
const FASTDATETIME = /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i;
const FASTURIREFERENCE = /^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i;
const EMAIL = (input) => {
if (input[0] === '"')
return false;
const [name, host, ...rest] = input.split('@');
if (!name ||
!host ||
rest.length !== 0 ||
name.length > 64 ||
host.length > 253)
return false;
if (name[0] === '.' || name.endsWith('.') || name.includes('..'))
return false;
if (!/^[a-z0-9.-]+$/i.test(host) ||
!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(name))
return false;
return host
.split('.')
.every(part => /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(part));
};
const IPV4 = /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/;
const IPV6 = /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i;
const DURATION = (input) => input.length > 1 &&
input.length < 80 &&
(/^P\d+([.,]\d+)?W$/.test(input) ||
(/^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(input) &&
/^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(input)));
function bind(r) {
return r.test.bind(r);
}
const fullFormat = {
date,
time: time.bind(undefined, false),
'date-time': date_time,
duration: DURATION,
uri,
'uri-reference': bind(URIREF),
'uri-template': bind(URITEMPLATE),
url: bind(URL_),
email: EMAIL,
hostname: bind(HOSTNAME),
ipv4: bind(IPV4),
ipv6: bind(IPV6),
regex: regex,
uuid: bind(UUID),
'json-pointer': bind(JSON_POINTER),
'json-pointer-uri-fragment': bind(JSON_POINTER_URI_FRAGMENT),
'relative-json-pointer': bind(RELATIVE_JSON_POINTER)
};
const fastFormat = {
...fullFormat,
date: bind(FASTDATE),
time: bind(FASTTIME),
'date-time': bind(FASTDATETIME),
'uri-reference': bind(FASTURIREFERENCE)
};
function isLeapYear(year) {
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
}
function date(str) {
const matches = str.match(DATE);
if (!matches)
return false;
const year = +matches[1];
const month = +matches[2];
const day = +matches[3];
return (month >= 1 &&
month <= 12 &&
day >= 1 &&
day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]));
}
function time(full, str) {
const matches = str.match(TIME);
if (!matches)
return false;
const hour = +matches[1];
const minute = +matches[2];
const second = +matches[3];
const timeZone = !!matches[5];
return (((hour <= 23 && minute <= 59 && second <= 59) ||
(hour == 23 && minute == 59 && second == 60)) &&
(!full || timeZone));
}
const DATE_TIME_SEPARATOR = /t|\s/i;
function date_time(str) {
const dateTime = str.split(DATE_TIME_SEPARATOR);
return dateTime.length == 2 && date(dateTime[0]) && time(true, dateTime[1]);
}
const NOT_URI_FRAGMENT = /\/|:/;
const URI_PATTERN = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
function uri(str) {
return NOT_URI_FRAGMENT.test(str) && URI_PATTERN.test(str);
}
const Z_ANCHOR = /[^\\]\\Z/;
function regex(str) {
if (Z_ANCHOR.test(str))
return false;
try {
new RegExp(str);
return true;
}
catch (e) {
return false;
}
}
//import { ucs2length } from './ucs2-length.js';
function ucs2length(s) {
let result = 0;
let length = s.length;
let index = 0;
let charCode;
while (index < length) {
result++;
charCode = s.charCodeAt(index++);
if (charCode >= 0xd800 && charCode <= 0xdbff && index < length) {
charCode = s.charCodeAt(index);
if ((charCode & 0xfc00) == 0xdc00) {
index++;
}
}
}
return result;
}
// validate.js
function validate(instance, schema, draft = '2019-09', lookup = dereference(schema), shortCircuit = true, recursiveAnchor = null, instanceLocation = '#', schemaLocation = '#', evaluated = Object.create(null)) {
if (schema === true) {
return { valid: true, errors: [] };
}
if (schema === false) {
return {
valid: false,
errors: [
{
instanceLocation,
keyword: 'false',
keywordLocation: instanceLocation,
error: 'False boolean schema.'
}
]
};
}
const rawInstanceType = typeof instance;
let instanceType;
switch (rawInstanceType) {
case 'boolean':
case 'number':
case 'string':
instanceType = rawInstanceType;
break;
case 'object':
if (instance === null) {
instanceType = 'null';
}
else if (Array.isArray(instance)) {
instanceType = 'array';
}
else {
instanceType = 'object';
}
break;
default:
throw new Error(`Instances of "${rawInstanceType}" type are not supported.`);
}
const { $ref, $recursiveRef, $recursiveAnchor, type: $type, const: $const, enum: $enum, required: $required, not: $not, anyOf: $anyOf, allOf: $allOf, oneOf: $oneOf, if: $if, then: $then, else: $else, format: $format, properties: $properties, patternProperties: $patternProperties, additionalProperties: $additionalProperties, unevaluatedProperties: $unevaluatedProperties, minProperties: $minProperties, maxProperties: $maxProperties, propertyNames: $propertyNames, dependentRequired: $dependentRequired, dependentSchemas: $dependentSchemas, dependencies: $dependencies, prefixItems: $prefixItems, items: $items, additionalItems: $additionalItems, unevaluatedItems: $unevaluatedItems, contains: $contains, minContains: $minContains, maxContains: $maxContains, minItems: $minItems, maxItems: $maxItems, uniqueItems: $uniqueItems, minimum: $minimum, maximum: $maximum, exclusiveMinimum: $exclusiveMinimum, exclusiveMaximum: $exclusiveMaximum, multipleOf: $multipleOf, minLength: $minLength, maxLength: $maxLength, pattern: $pattern, __absolute_ref__, __absolute_recursive_ref__ } = schema;
const errors = [];
if ($recursiveAnchor === true && recursiveAnchor === null) {
recursiveAnchor = schema;
}
if ($recursiveRef === '#') {
const refSchema = recursiveAnchor === null
? lookup[__absolute_recursive_ref__]
: recursiveAnchor;
const keywordLocation = `${schemaLocation}/$recursiveRef`;
const result = validate(instance, recursiveAnchor === null ? schema : recursiveAnchor, draft, lookup, shortCircuit, refSchema, instanceLocation, keywordLocation, evaluated);
if (!result.valid) {
errors.push({
instanceLocation,
keyword: '$recursiveRef',
keywordLocation,
error: 'A subschema had errors.'
}, ...result.errors);
}
}
if ($ref !== undefined) {
const uri = __absolute_ref__ || $ref;
const refSchema = lookup[uri];
if (refSchema === undefined) {
let message = `Unresolved $ref "${$ref}".`;
if (__absolute_ref__ && __absolute_ref__ !== $ref) {
message += ` Absolute URI "${__absolute_ref__}".`;
}
message += `\nKnown schemas:\n- ${Object.keys(lookup).join('\n- ')}`;
throw new Error(message);
}
const keywordLocation = `${schemaLocation}/$ref`;
const result = validate(instance, refSchema, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation, evaluated);
if (!result.valid) {
errors.push({
instanceLocation,
keyword: '$ref',
keywordLocation,
error: 'A subschema had errors.'
}, ...result.errors);
}
if (draft === '4' || draft === '7') {
return { valid: errors.length === 0, errors };
}
}
if (Array.isArray($type)) {
let length = $type.length;
let valid = false;
for (let i = 0; i < length; i++) {
if (instanceType === $type[i] ||
($type[i] === 'integer' &&
instanceType === 'number' &&
instance % 1 === 0 &&
instance === instance)) {
valid = true;
break;
}
}
if (!valid) {
errors.push({
instanceLocation,
keyword: 'type',
keywordLocation: `${schemaLocation}/type`,
error: `Instance type "${instanceType}" is invalid. Expected "${$type.join('", "')}".`
});
}
}
else if ($type === 'integer') {
if (instanceType !== 'number' || instance % 1 || instance !== instance) {
errors.push({
instanceLocation,
keyword: 'type',
keywordLocation: `${schemaLocation}/type`,
error: `Instance type "${instanceType}" is invalid. Expected "${$type}".`
});
}
}
else if ($type !== undefined && instanceType !== $type) {
errors.push({
instanceLocation,
keyword: 'type',
keywordLocation: `${schemaLocation}/type`,
error: `Instance type "${instanceType}" is invalid. Expected "${$type}".`
});
}
if ($const !== undefined) {
if (instanceType === 'object' || instanceType === 'array') {
if (!deepCompareStrict(instance, $const)) {
errors.push({
instanceLocation,
keyword: 'const',
keywordLocation: `${schemaLocation}/const`,
error: `Instance does not match ${JSON.stringify($const)}.`
});
}
}
else if (instance !== $const) {
errors.push({
instanceLocation,
keyword: 'const',
keywordLocation: `${schemaLocation}/const`,
error: `Instance does not match ${JSON.stringify($const)}.`
});
}
}
if ($enum !== undefined) {
if (instanceType === 'object' || instanceType === 'array') {
if (!$enum.some(value => deepCompareStrict(instance, value))) {
errors.push({
instanceLocation,
keyword: 'enum',
keywordLocation: `${schemaLocation}/enum`,
error: `Instance does not match any of ${JSON.stringify($enum)}.`
});
}
}
else if (!$enum.some(value => instance === value)) {
errors.push({
instanceLocation,
keyword: 'enum',
keywordLocation: `${schemaLocation}/enum`,
error: `Instance does not match any of ${JSON.stringify($enum)}.`
});
}
}
if ($not !== undefined) {
const keywordLocation = `${schemaLocation}/not`;
const result = validate(instance, $not, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation);
if (result.valid) {
errors.push({
instanceLocation,
keyword: 'not',
keywordLocation,
error: 'Instance matched "not" schema.'
});
}
}
let subEvaluateds = [];
if ($anyOf !== undefined) {
const keywordLocation = `${schemaLocation}/anyOf`;
const errorsLength = errors.length;
let anyValid = false;
for (let i = 0; i < $anyOf.length; i++) {
const subSchema = $anyOf[i];
const subEvaluated = Object.create(evaluated);
const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated);
errors.push(...result.errors);
anyValid = anyValid || result.valid;
if (result.valid) {
subEvaluateds.push(subEvaluated);
}
}
if (anyValid) {
errors.length = errorsLength;
}
else {
errors.splice(errorsLength, 0, {
instanceLocation,
keyword: 'anyOf',
keywordLocation,
error: 'Instance does not match any subschemas.'
});
}
}
if ($allOf !== undefined) {
const keywordLocation = `${schemaLocation}/allOf`;
const errorsLength = errors.length;
let allValid = true;
for (let i = 0; i < $allOf.length; i++) {
const subSchema = $allOf[i];
const subEvaluated = Object.create(evaluated);
const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated);
errors.push(...result.errors);
allValid = allValid && result.valid;
if (result.valid) {
subEvaluateds.push(subEvaluated);
}
}
if (allValid) {
errors.length = errorsLength;
}
else {
errors.splice(errorsLength, 0, {
instanceLocation,
keyword: 'allOf',
keywordLocation,
error: `Instance does not match every subschema.`
});
}
}
if ($oneOf !== undefined) {
const keywordLocation = `${schemaLocation}/oneOf`;
const errorsLength = errors.length;
const matches = $oneOf.filter((subSchema, i) => {
const subEvaluated = Object.create(evaluated);
const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated);
errors.push(...result.errors);
if (result.valid) {
subEvaluateds.push(subEvaluated);
}
return result.valid;
}).length;
if (matches === 1) {
errors.length = errorsLength;
}
else {
errors.splice(errorsLength, 0, {
instanceLocation,
keyword: 'oneOf',
keywordLocation,
error: `Instance does not match exactly one subschema (${matches} matches).`
});
}
}
if (instanceType === 'object' || instanceType === 'array') {
Object.assign(evaluated, ...subEvaluateds);
}
if ($if !== undefined) {
const keywordLocation = `${schemaLocation}/if`;
const conditionResult = validate(instance, $if, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation, evaluated).valid;
if (conditionResult) {
if ($then !== undefined) {
const thenResult = validate(instance, $then, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${schemaLocation}/then`, evaluated);
if (!thenResult.valid) {
errors.push({
instanceLocation,
keyword: 'if',
keywordLocation,
error: `Instance does not match "then" schema.`
}, ...thenResult.errors);
}
}
}
else if ($else !== undefined) {
const elseResult = validate(instance, $else, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${schemaLocation}/else`, evaluated);
if (!elseResult.valid) {
errors.push({
instanceLocation,
keyword: 'if',
keywordLocation,
error: `Instance does not match "else" schema.`
}, ...elseResult.errors);
}
}
}
if (instanceType === 'object') {
if ($required !== undefined) {
for (const key of $required) {
if (!(key in instance)) {
errors.push({
instanceLocation,
keyword: 'required',
keywordLocation: `${schemaLocation}/required`,
// XXX expose key for make search of the field easier
key: key,
error: `Instance does not have required property "${key}".`
});
}
}
}
const keys = Object.keys(instance);
if ($minProperties !== undefined && keys.length < $minProperties) {
errors.push({
instanceLocation,
keyword: 'minProperties',
keywordLocation: `${schemaLocation}/minProperties`,
error: `Instance does not have at least ${$minProperties} properties.`
});
}
if ($maxProperties !== undefined && keys.length > $maxProperties) {
errors.push({
instanceLocation,
keyword: 'maxProperties',
keywordLocation: `${schemaLocation}/maxProperties`,
error: `Instance does not have at least ${$maxProperties} properties.`
});
}
if ($propertyNames !== undefined) {
const keywordLocation = `${schemaLocation}/propertyNames`;
for (const key in instance) {
const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`;
const result = validate(key, $propertyNames, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation);
if (!result.valid) {
errors.push({
instanceLocation,
keyword: 'propertyNames',
keywordLocation,
error: `Property name "${key}" does not match schema.`
}, ...result.errors);
}
}
}
if ($dependentRequired !== undefined) {
const keywordLocation = `${schemaLocation}/dependantRequired`;
for (const key in $dependentRequired) {
if (key in instance) {
const required = $dependentRequired[key];
for (const dependantKey of required) {
if (!(dependantKey in instance)) {
errors.push({
instanceLocation,
keyword: 'dependentRequired',
keywordLocation,
error: `Instance has "${key}" but does not have "${dependantKey}".`
});
}
}
}
}
}
if ($dependentSchemas !== undefined) {
for (const key in $dependentSchemas) {
const keywordLocation = `${schemaLocation}/dependentSchemas`;
if (key in instance) {
const result = validate(instance, $dependentSchemas[key], draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${keywordLocation}/${encodePointer(key)}`, evaluated);
if (!result.valid) {
errors.push({
instanceLocation,
keyword: 'dependentSchemas',
keywordLocation,
error: `Instance has "${key}" but does not match dependant schema.`
}, ...result.errors);
}
}
}
}
if ($dependencies !== undefined) {
const keywordLocation = `${schemaLocation}/dependencies`;
for (const key in $dependencies) {
if (key in instance) {
const propsOrSchema = $dependencies[key];
if (Array.isArray(propsOrSchema)) {
for (const dependantKey of propsOrSchema) {
if (!(dependantKey in instance)) {
errors.push({
instanceLocation,
keyword: 'dependencies',
keywordLocation,
error: `Instance has "${key}" but does not have "${dependantKey}".`
});
}
}
}
else {
const result = validate(instance, propsOrSchema, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${keywordLocation}/${encodePointer(key)}`);
if (!result.valid) {
errors.push({
instanceLocation,
keyword: 'dependencies',
keywordLocation,
error: `Instance has "${key}" but does not match dependant schema.`
}, ...result.errors);
}
}
}
}
}
const thisEvaluated = Object.create(null);
let stop = false;
if ($properties !== undefined) {
const keywordLocation = `${schemaLocation}/properties`;
for (const key in $properties) {
if (!(key in instance)) {
continue;
}
const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`;
const result = validate(instance[key], $properties[key], draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, `${keywordLocation}/${encodePointer(key)}`);
if (result.valid) {
evaluated[key] = thisEvaluated[key] = true;
}
else {
stop = shortCircuit;
errors.push({
instanceLocation,
keyword: 'properties',
keywordLocation,
error: `Property "${key}" does not match schema.`
}, ...result.errors);
if (stop)
break;
}
}
}
if (!stop && $patternProperties !== undefined) {
const keywordLocation = `${schemaLocation}/patternProperties`;
for (const pattern in $patternProperties) {
const regex = new RegExp(pattern);
const subSchema = $patternProperties[pattern];
for (const key in instance) {
if (!regex.test(key)) {
continue;
}
const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`;
const result = validate(instance[key], subSchema, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, `${keywordLocation}/${encodePointer(pattern)}`);
if (result.valid) {
evaluated[key] = thisEvaluated[key] = true;
}
else {
stop = shortCircuit;
errors.push({
instanceLocation,
keyword: 'patternProperties',
keywordLocation,
error: `Property "${key}" matches pattern "${pattern}" but does not match associated schema.`
}, ...result.errors);
}
}
}
}
if (!stop && $additionalProperties !== undefined) {
const keywordLocation = `${schemaLocation}/additionalProperties`;
for (const key in instance) {
if (thisEvaluated[key]) {
continue;
}
const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`;
const result = validate(instance[key], $additionalProperties, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation);
if (result.valid) {
evaluated[key] = true;
}
else {
stop = shortCircuit;
errors.push({
instanceLocation,
keyword: 'additionalProperties',
keywordLocation,
error: `Property "${key}" does not match additional properties schema.`
}, ...result.errors);
}
}
}
else if (!stop && $unevaluatedProperties !== undefined) {
const keywordLocation = `${schemaLocation}/unevaluatedProperties`;
for (const key in instance) {
if (!evaluated[key]) {
const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`;
const result = validate(instance[key], $unevaluatedProperties, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation);
if (result.valid) {
evaluated[key] = true;
}
else {
errors.push({
instanceLocation,
keyword: 'unevaluatedProperties',
keywordLocation,
error: `Property "${key}" does not match unevaluated properties schema.`
}, ...result.errors);
}
}
}
}
}
else if (instanceType === 'array') {
if ($maxItems !== undefined && instance.length > $maxItems) {
errors.push({
instanceLocation,
keyword: 'maxItems',
keywordLocation: `${schemaLocation}/maxItems`,
error: `Array has too many items (${instance.length} > ${$maxItems}).`
});
}
if ($minItems !== undefined && instance.length < $minItems) {
errors.push({
instanceLocation,
keyword: 'minItems',
keywordLocation: `${schemaLocation}/minItems`,
error: `Array has too few items (${instance.length} < ${$minItems}).`
});
}
const length = instance.length;
let i = 0;
let stop = false;
if ($prefixItems !== undefined) {
const keywordLocation = `${schemaLocation}/prefixItems`;
const length2 = Math.min($prefixItems.length, length);
for (; i < length2; i++) {
const result = validate(instance[i], $prefixItems[i], draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, `${keywordLocation}/${i}`);
evaluated[i] = true;
if (!result.valid) {
stop = shortCircuit;
errors.push({
instanceLocation,
keyword: 'prefixItems',
keywordLocation,
error: `Items did not match schema.`
}, ...result.errors);
if (stop)
break;
}
}
}
if ($items !== undefined) {
const keywordLocation = `${schemaLocation}/items`;
if (Array.isArray($items)) {
const length2 = Math.min($items.length, length);
for (; i < length2; i++) {
const result = validate(instance[i], $items[i], draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, `${keywordLocation}/${i}`);
evaluated[i] = true;
if (!result.valid) {
stop = shortCircuit;
errors.push({
instanceLocation,
keyword: 'items',
keywordLocation,
error: `Items did not match schema.`
}, ...result.errors);
if (stop)
break;
}
}
}
else {
for (; i < length; i++) {
const result = validate(instance[i], $items, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation);
evaluated[i] = true;
if (!result.valid) {
stop = shortCircuit;
errors.push({
instanceLocation,
keyword: 'items',
keywordLocation,
error: `Items did not match schema.`
}, ...result.errors);
if (stop)
break;
}
}
}
if (!stop && $additionalItems !== undefined) {
const keywordLocation = `${schemaLocation}/additionalItems`;
for (; i < length; i++) {
const result = validate(instance[i], $additionalItems, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation);
evaluated[i] = true;
if (!result.valid) {
stop = shortCircuit;
errors.push({
instanceLocation,
keyword: 'additionalItems',
keywordLocation,
error: `Items did not match additional items schema.`
}, ...result.errors);
}
}
}
}
if ($contains !== undefined) {
if (length === 0 && $minContains === undefined) {
errors.push({
instanceLocation,
keyword: 'contains',
keywordLocation: `${schemaLocation}/contains`,
error: `Array is empty. It must contain at least one item matching the schema.`
});
}
else if ($minContains !== undefined && length < $minContains) {
errors.push({
instanceLocation,
keyword: 'minContains',
keywordLocation: `${schemaLocation}/minContains`,
error: `Array has less items (${length}) than minContains (${$minContains}).`
});
}
else {
const keywordLocation = `${schemaLocation}/contains`;
const errorsLength = errors.length;
let contained = 0;
for (let j = 0; j < length; j++) {
const result = validate(instance[j], $contains, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${j}`, keywordLocation);
if (result.valid) {
evaluated[j] = true;
contained++;
}
else {
errors.push(...result.errors);
}
}
if (contained >= ($minContains || 0)) {
errors.length = errorsLength;
}
if ($minContains === undefined &&
$maxContains === undefined &&
contained === 0) {
errors.splice(errorsLength, 0, {
instanceLocation,
keyword: 'contains',
keywordLocation,
error: `Array does not contain item matching schema.`
});
}
else if ($minContains !== undefined && contained < $minContains) {
errors.push({
instanceLocation,
keyword: 'minContains',
keywordLocation: `${schemaLocation}/minContains`,
error: `Array must contain at least ${$minContains} items matching schema. Only ${contained} items were found.`
});
}
else if ($maxContains !== undefined && contained > $maxContains) {
errors.push({
instanceLocation,
keyword: 'maxContains',
keywordLocation: `${schemaLocation}/maxContains`,
error: `Array may contain at most ${$maxContains} items matching schema. ${contained} items were found.`
});
}
}
}
if (!stop && $unevaluatedItems !== undefined) {
const keywordLocation = `${schemaLocation}/unevaluatedItems`;
for (i; i < length; i++) {
if (evaluated[i]) {
continue;
}
const result = validate(instance[i], $unevaluatedItems, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation);
evaluated[i] = true;
if (!result.valid) {
errors.push({
instanceLocation,
keyword: 'unevaluatedItems',
keywordLocation,
error: `Items did not match unevaluated items schema.`
}, ...result.errors);
}
}
}
if ($uniqueItems) {
for (let j = 0; j < length; j++) {
const a = instance[j];
const ao = typeof a === 'object' && a !== null;
for (let k = 0; k < length; k++) {
if (j === k) {
continue;
}
const b = instance[k];
const bo = typeof b === 'object' && b !== null;
if (a === b || (ao && bo && deepCompareStrict(a, b))) {
errors.push({
instanceLocation,
keyword: 'uniqueItems',
keywordLocation: `${schemaLocation}/uniqueItems`,
error: `Duplicate items at indexes ${j} and ${k}.`
});
j = Number.MAX_SAFE_INTEGER;
k = Number.MAX_SAFE_INTEGER;
}
}
}
}
}
else if (instanceType === 'number') {
if (draft === '4') {
if ($minimum !== undefined &&
(($exclusiveMinimum === true && instance <= $minimum) ||
instance < $minimum)) {
errors.push({
instanceLocation,
keyword: 'minimum',
keywordLocation: `${schemaLocation}/minimum`,
error: `${instance} is less than ${$exclusiveMinimum ? 'or equal to ' : ''} ${$minimum}.`
});
}
if ($maximum !== undefined &&
(($exclusiveMaximum === true && instance >= $maximum) ||
instance > $maximum)) {
errors.push({
instanceLocation,
keyword: 'maximum',
keywordLocation: `${schemaLocation}/maximum`,
error: `${instance} is greater than ${$exclusiveMaximum ? 'or equal to ' : ''} ${$maximum}.`
});
}
}
else {
if ($minimum !== undefined && instance < $minimum) {
errors.push({
instanceLocation,
keyword: 'minimum',
keywordLocation: `${schemaLocation}/minimum`,
error: `${instance} is less than ${$minimum}.`
});
}
if ($maximum !== undefined && instance > $maximum) {
errors.push({
instanceLocation,
keyword: 'maximum',
keywordLocation: `${schemaLocation}/maximum`,
error: `${instance} is greater than ${$maximum}.`
});
}
if ($exclusiveMinimum !== undefined && instance <= $exclusiveMinimum) {
errors.push({
instanceLocation,
keyword: 'exclusiveMinimum',
keywordLocation: `${schemaLocation}/exclusiveMinimum`,
error: `${instance} is less than ${$exclusiveMinimum}.`
});
}
if ($exclusiveMaximum !== undefined && instance >= $exclusiveMaximum) {
errors.push({
instanceLocation,
keyword: 'exclusiveMaximum',
keywordLocation: `${schemaLocation}/exclusiveMaximum`,
error: `${instance} is greater than or equal to ${$exclusiveMaximum}.`
});
}
}
if ($multipleOf !== undefined) {
const remainder = instance % $multipleOf;
if (Math.abs(0 - remainder) >= 1.1920929e-7 &&
Math.abs($multipleOf - remainder) >= 1.1920929e-7) {
errors.push({
instanceLocation,
keyword: 'multipleOf',
keywordLocation: `${schemaLocation}/multipleOf`,
error: `${instance} is not a multiple of ${$multipleOf}.`
});
}
}
}
else if (instanceType === 'string') {
const length = $minLength === undefined && $maxLength === undefined
? 0
: ucs2length(instance);
if ($minLength !== undefined && length < $minLength) {
errors.push({
instanceLocation,
keyword: 'minLength',
keywordLocation: `${schemaLocation}/minLength`,
error: `String is too short (${length} < ${$minLength}).`
});
}
if ($maxLength !== undefined && length > $maxLength) {
errors.push({
instanceLocation,
keyword: 'maxLength',
keywordLocation: `${schemaLocation}/maxLength`,
error: `String is too long (${length} > ${$maxLength}).`
});
}
if ($pattern !== undefined && !new RegExp($pattern).test(instance)) {
errors.push({
instanceLocation,
keyword: 'pattern',
keywordLocation: `${schemaLocation}/pattern`,
error: `String does not match pattern.`
});
}
if ($format !== undefined &&
fastFormat[$format] &&
!fastFormat[$format](instance)) {
errors.push({
instanceLocation,
keyword: 'format',
keywordLocation: `${schemaLocation}/format`,
error: `String does not match format "${$format}".`
});
}
}
return { valid: errors.length === 0, errors };
}
// validator.js
class Validator {
constructor(schema, draft = '2019-09', shortCircuit = true) {
this.schema = schema;
this.draft = draft;
this.shortCircuit = shortCircuit;
this.lookup = dereference(schema);
}
validate(instance) {
return validate(instance, this.schema, this.draft, this.lookup, this.shortCircuit);
}
addSchema(schema, id) {
if (id) {
schema = { ...schema, $id: id };
}
dereference(schema, this.lookup);
}
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>cfworker-jsonschema-validator.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/javascript</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>validator.js</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>ref-parser.min.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/javascript</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
erp5_project
erp5_hal_json_style
erp5_corporate_identity
erp5_credential
erp5_dms
erp5_jquery
erp5_km
erp5_web
erp5_web_renderjs_ui
erp5_l10n_fr
erp5_l10n_zh
erp5_l10n_ja
slapos_cloud
slapos_slap_tool
slapos_pdm
slapos_crm
slapos_l10n_zh
slapos_rss_style
\ No newline at end of file
Accounting Transaction Module | slaposjs_view
Category | slaposjs_view
Certificate Login | slaposjs_view
Cloud Contract | slaposjs_view
ERP5 Login | slaposjs_view
Facebook Login | slaposjs_view
......
image_module/gadget_slapos_invoice_logo_png
image_module/gadget_slapos_panel_png
web_page_module/gadget_erp5_page_slap_cloud_contract_view_html
web_page_module/gadget_erp5_page_slap_cloud_contract_view_js
web_page_module/gadget_erp5_page_slap_reject_upgrade_decision_html
web_page_module/gadget_erp5_page_slap_reject_upgrade_decision_js
web_page_module/gadget_erp5_page_slap_request_contract_activation_html
web_page_module/gadget_erp5_page_slap_request_contract_activation_js
web_page_module/rjs_gadget_erp5_attention_point_css
web_page_module/rjs_gadget_erp5_attention_point_html
web_page_module/rjs_gadget_erp5_attention_point_js
web_page_module/rjs_gadget_erp5_page_map_css
web_page_module/rjs_gadget_erp5_page_map_html
web_page_module/rjs_gadget_erp5_page_map_js
web_page_module/rjs_gadget_erp5_page_slap_accept_upgrade_decision_html
web_page_module/rjs_gadget_erp5_page_slap_accept_upgrade_decision_js
web_page_module/rjs_gadget_erp5_page_slap_access_denied_view_html
web_page_module/rjs_gadget_erp5_page_slap_access_denied_view_html
web_page_module/rjs_gadget_erp5_page_slap_access_denied_view_js
web_page_module/rjs_gadget_erp5_page_slap_access_denied_view_js
web_page_module/rjs_gadget_erp5_page_slap_add_project_html
web_page_module/rjs_gadget_erp5_page_slap_add_project_js
web_page_module/rjs_gadget_erp5_page_slap_all_invoice_list_html
web_page_module/rjs_gadget_erp5_page_slap_all_invoice_list_js
web_page_module/rjs_gadget_erp5_page_slap_compute_node_request_certificate_html
web_page_module/rjs_gadget_erp5_page_slap_compute_node_request_certificate_js
web_page_module/rjs_gadget_erp5_page_slap_controller_html
web_page_module/rjs_gadget_erp5_page_slap_controller_js
web_page_module/rjs_gadget_erp5_page_slap_delete_organisation_html
web_page_module/rjs_gadget_erp5_page_slap_delete_organisation_js
web_page_module/rjs_gadget_erp5_page_slap_delete_project_html
web_page_module/rjs_gadget_erp5_page_slap_delete_project_js
web_page_module/rjs_gadget_erp5_page_slap_erp5_login_view_html
web_page_module/rjs_gadget_erp5_page_slap_erp5_login_view_js
web_page_module/rjs_gadget_erp5_page_slap_facebook_login_view_html
web_page_module/rjs_gadget_erp5_page_slap_facebook_login_view_js
web_page_module/rjs_gadget_erp5_page_slap_google_login_view_html
web_page_module/rjs_gadget_erp5_page_slap_google_login_view_js
web_page_module/rjs_gadget_erp5_page_slap_intent_html
web_page_module/rjs_gadget_erp5_page_slap_intent_js
web_page_module/rjs_gadget_erp5_page_slap_invalidate_login_html
web_page_module/rjs_gadget_erp5_page_slap_invalidate_login_js
web_page_module/rjs_gadget_erp5_page_slap_invoice_list_html
web_page_module/rjs_gadget_erp5_page_slap_invoice_list_js
web_page_module/rjs_gadget_erp5_page_slap_language_view_html
web_page_module/rjs_gadget_erp5_page_slap_language_view_js
web_page_module/rjs_gadget_erp5_page_slap_notify_and_redirect_html
web_page_module/rjs_gadget_erp5_page_slap_notify_and_redirect_js
web_page_module/rjs_gadget_erp5_page_slap_organisation_get_invitation_link_html
web_page_module/rjs_gadget_erp5_page_slap_organisation_get_invitation_link_js
web_page_module/rjs_gadget_erp5_page_slap_organisation_view_html
web_page_module/rjs_gadget_erp5_page_slap_organisation_view_js
web_page_module/rjs_gadget_erp5_page_slap_payment_result_html
web_page_module/rjs_gadget_erp5_page_slap_person_add_erp5_login_html
web_page_module/rjs_gadget_erp5_page_slap_person_add_erp5_login_js
web_page_module/rjs_gadget_erp5_page_slap_person_get_token_html
web_page_module/rjs_gadget_erp5_page_slap_person_get_token_js
web_page_module/rjs_gadget_erp5_page_slap_person_request_certificate_html
web_page_module/rjs_gadget_erp5_page_slap_person_request_certificate_js
web_page_module/rjs_gadget_erp5_page_slap_person_revoke_certificate_html
web_page_module/rjs_gadget_erp5_page_slap_person_revoke_certificate_js
web_page_module/rjs_gadget_erp5_page_slap_person_view_html
web_page_module/rjs_gadget_erp5_page_slap_person_view_js
web_page_module/rjs_gadget_erp5_page_slap_project_get_invitation_link_html
web_page_module/rjs_gadget_erp5_page_slap_project_get_invitation_link_js
web_page_module/rjs_gadget_erp5_page_slap_regularisation_request_view_html
web_page_module/rjs_gadget_erp5_page_slap_regularisation_request_view_js
web_page_module/rjs_gadget_erp5_page_slap_rss_ticket_html
web_page_module/rjs_gadget_erp5_page_slap_rss_ticket_js
web_page_module/rjs_gadget_erp5_page_slap_sale_invoice_transaction_view_html
web_page_module/rjs_gadget_erp5_page_slap_sale_invoice_transaction_view_js
web_page_module/rjs_gadget_erp5_page_slap_site_list_html
web_page_module/rjs_gadget_erp5_page_slap_site_list_js
web_page_module/rjs_gadget_erp5_page_slap_site_view_html
web_page_module/rjs_gadget_erp5_page_slap_site_view_js
web_page_module/rjs_gadget_erp5_page_slap_test_parameter_form_html
web_page_module/rjs_gadget_erp5_page_slap_test_parameter_form_js
web_page_module/rjs_gadget_erp5_page_slap_test_readonly_parameter_form_html
web_page_module/rjs_gadget_erp5_page_slap_test_readonly_parameter_form_js
web_page_module/rjs_gadget_erp5_page_slap_transfer_computer_network_html
web_page_module/rjs_gadget_erp5_page_slap_transfer_computer_network_js
web_page_module/rjs_gadget_erp5_page_slap_transfer_instance_tree_html
web_page_module/rjs_gadget_erp5_page_slap_transfer_instance_tree_js
web_page_module/rjs_gadget_erp5_page_slap_upgrade_decision_view_html
web_page_module/rjs_gadget_erp5_page_slap_upgrade_decision_view_js
web_page_module/rjs_gadget_erp5_page_slapos_access_html
web_page_module/rjs_gadget_erp5_page_slapos_access_js
web_page_module/rjs_gadget_erp5_page_slapos_css
web_page_module/rjs_gadget_erp5_page_slapos_html
web_page_module/rjs_gadget_erp5_page_slapos_html
web_page_module/rjs_gadget_erp5_page_slapos_js
web_page_module/rjs_gadget_erp5_panel_shortcut_html
web_page_module/rjs_gadget_erp5_panel_shortcut_js
web_page_module/rjs_gadget_erp5_pt_form_slapos_index_html
web_page_module/rjs_gadget_erp5_pt_form_slapos_index_js
web_page_module/rjs_gadget_slapos_alert_listbox_field_css
web_page_module/rjs_gadget_slapos_alert_listbox_field_html
web_page_module/rjs_gadget_slapos_alert_listbox_field_js
web_page_module/rjs_gadget_slapos_annotated_helper_css
web_page_module/rjs_gadget_slapos_annotated_helper_html
web_page_module/rjs_gadget_slapos_annotated_helper_js
web_page_module/rjs_gadget_slapos_appcache
web_page_module/rjs_gadget_slapos_compute_node_map_html
web_page_module/rjs_gadget_slapos_compute_node_map_js
web_page_module/rjs_gadget_slapos_event_discussion_entry_css
web_page_module/rjs_gadget_slapos_event_discussion_entry_html
web_page_module/rjs_gadget_slapos_event_discussion_entry_js
web_page_module/rjs_gadget_slapos_header_html
web_page_module/rjs_gadget_slapos_header_js
web_page_module/rjs_gadget_slapos_invoice_printout_html
web_page_module/rjs_gadget_slapos_invoice_printout_js
web_page_module/rjs_gadget_slapos_invoice_state_html
web_page_module/rjs_gadget_slapos_invoice_state_js
web_page_module/rjs_gadget_slapos_label_listbox_field_html
web_page_module/rjs_gadget_slapos_label_listbox_field_js
web_page_module/rjs_gadget_slapos_login_page_css
web_page_module/rjs_gadget_slapos_panel_html
web_page_module/rjs_gadget_slapos_panel_js
web_page_module/rjs_gadget_slapos_payment_result_js**
web_page_module/rjs_gadget_slapos_translation_data_js
web_page_module/rjs_gadget_slapos_translation_html
web_page_module/rjs_gadget_slapos_utils_js
web_page_module/slapos_admin_front_page
web_site_module/hostingjs
web_site_module/hostingjs/**
web_site_module/renderjs_oss
web_site_module/renderjs_oss/**
\ No newline at end of file
portal_propery_sheets/SlapOSHateoasSystemPreference
portal_types/ERP5 Form
web_page_module/rjs_gadget_erp5_panel_shortcut_html
web_page_module/rjs_gadget_erp5_panel_shortcut_js
web_page_module/slapos_admin_front_page
web_site_module/hateoas
web_site_module/hateoas/**
web_site_module/renderjs_runner
\ No newline at end of file
web_site_module/hateoas
\ No newline at end of file
image_module/gadget_slapos_invoice_logo_png
image_module/gadget_slapos_panel_png
web_page_module/gadget_erp5_page_slap_cloud_contract_view_html
web_page_module/gadget_erp5_page_slap_cloud_contract_view_js
web_page_module/gadget_erp5_page_slap_reject_upgrade_decision_html
web_page_module/gadget_erp5_page_slap_reject_upgrade_decision_js
web_page_module/gadget_erp5_page_slap_request_contract_activation_html
web_page_module/gadget_erp5_page_slap_request_contract_activation_js
web_page_module/rjs_gadget_erp5_attention_point_css
web_page_module/rjs_gadget_erp5_attention_point_html
web_page_module/rjs_gadget_erp5_attention_point_js
web_page_module/rjs_gadget_erp5_page_map_css
web_page_module/rjs_gadget_erp5_page_map_html
web_page_module/rjs_gadget_erp5_page_map_js
web_page_module/rjs_gadget_erp5_page_slap_accept_upgrade_decision_html
web_page_module/rjs_gadget_erp5_page_slap_accept_upgrade_decision_js
web_page_module/rjs_gadget_erp5_page_slap_access_denied_view_html
web_page_module/rjs_gadget_erp5_page_slap_access_denied_view_js
web_page_module/rjs_gadget_erp5_page_slap_add_project_html
web_page_module/rjs_gadget_erp5_page_slap_add_project_js
web_page_module/rjs_gadget_erp5_page_slap_all_invoice_list_html
web_page_module/rjs_gadget_erp5_page_slap_all_invoice_list_js
web_page_module/rjs_gadget_erp5_page_slap_controller_html
web_page_module/rjs_gadget_erp5_page_slap_controller_js
web_page_module/rjs_gadget_erp5_page_slap_delete_organisation_html
web_page_module/rjs_gadget_erp5_page_slap_delete_organisation_js
web_page_module/rjs_gadget_erp5_page_slap_delete_project_html
web_page_module/rjs_gadget_erp5_page_slap_delete_project_js
web_page_module/rjs_gadget_erp5_page_slap_erp5_login_view_html
web_page_module/rjs_gadget_erp5_page_slap_erp5_login_view_js
web_page_module/rjs_gadget_erp5_page_slap_facebook_login_view_html
web_page_module/rjs_gadget_erp5_page_slap_facebook_login_view_js
web_page_module/rjs_gadget_erp5_page_slap_google_login_view_html
web_page_module/rjs_gadget_erp5_page_slap_google_login_view_js
web_page_module/rjs_gadget_erp5_page_slap_intent_html
web_page_module/rjs_gadget_erp5_page_slap_intent_js
web_page_module/rjs_gadget_erp5_page_slap_intent_zh_html
web_page_module/rjs_gadget_erp5_page_slap_invalidate_login_html
web_page_module/rjs_gadget_erp5_page_slap_invalidate_login_js
web_page_module/rjs_gadget_erp5_page_slap_invoice_list_html
web_page_module/rjs_gadget_erp5_page_slap_invoice_list_js
web_page_module/rjs_gadget_erp5_page_slap_language_view_html
web_page_module/rjs_gadget_erp5_page_slap_language_view_js
web_page_module/rjs_gadget_erp5_page_slap_notify_and_redirect_html
web_page_module/rjs_gadget_erp5_page_slap_notify_and_redirect_js
web_page_module/rjs_gadget_erp5_page_slap_organisation_get_invitation_link_html
web_page_module/rjs_gadget_erp5_page_slap_organisation_get_invitation_link_js
web_page_module/rjs_gadget_erp5_page_slap_organisation_view_html
web_page_module/rjs_gadget_erp5_page_slap_organisation_view_js
web_page_module/rjs_gadget_erp5_page_slap_parameter_form_zh_html
web_page_module/rjs_gadget_erp5_page_slap_payment_result_html
web_page_module/rjs_gadget_erp5_page_slap_person_add_erp5_login_html
web_page_module/rjs_gadget_erp5_page_slap_person_add_erp5_login_js
web_page_module/rjs_gadget_erp5_page_slap_person_get_token_html
web_page_module/rjs_gadget_erp5_page_slap_person_get_token_js
web_page_module/rjs_gadget_erp5_page_slap_person_request_certificate_html
web_page_module/rjs_gadget_erp5_page_slap_person_request_certificate_js
web_page_module/rjs_gadget_erp5_page_slap_person_revoke_certificate_html
web_page_module/rjs_gadget_erp5_page_slap_person_revoke_certificate_js
web_page_module/rjs_gadget_erp5_page_slap_person_view_html
web_page_module/rjs_gadget_erp5_page_slap_person_view_js
web_page_module/rjs_gadget_erp5_page_slap_project_get_invitation_link_html
web_page_module/rjs_gadget_erp5_page_slap_project_get_invitation_link_js
web_page_module/rjs_gadget_erp5_page_slap_regularisation_request_view_html
web_page_module/rjs_gadget_erp5_page_slap_regularisation_request_view_js
web_page_module/rjs_gadget_erp5_page_slap_rss_ticket_html
web_page_module/rjs_gadget_erp5_page_slap_rss_ticket_js
web_page_module/rjs_gadget_erp5_page_slap_sale_invoice_transaction_view_html
web_page_module/rjs_gadget_erp5_page_slap_sale_invoice_transaction_view_js
web_page_module/rjs_gadget_erp5_page_slap_site_list_html
web_page_module/rjs_gadget_erp5_page_slap_site_list_js
web_page_module/rjs_gadget_erp5_page_slap_site_view_html
web_page_module/rjs_gadget_erp5_page_slap_site_view_js
web_page_module/rjs_gadget_erp5_page_slap_transfer_instance_tree_html
web_page_module/rjs_gadget_erp5_page_slap_transfer_instance_tree_js
web_page_module/rjs_gadget_erp5_page_slap_upgrade_decision_view_html
web_page_module/rjs_gadget_erp5_page_slap_upgrade_decision_view_js
web_page_module/rjs_gadget_erp5_page_slapos_access_html
web_page_module/rjs_gadget_erp5_page_slapos_access_js
web_page_module/rjs_gadget_erp5_page_slapos_css
web_page_module/rjs_gadget_erp5_page_slapos_html
web_page_module/rjs_gadget_erp5_page_slapos_html
web_page_module/rjs_gadget_erp5_page_slapos_js
web_page_module/rjs_gadget_erp5_panel_shortcut_html
web_page_module/rjs_gadget_erp5_panel_shortcut_js
web_page_module/rjs_gadget_erp5_pt_form_slapos_index_html
web_page_module/rjs_gadget_erp5_pt_form_slapos_index_js
web_page_module/rjs_gadget_slapos_alert_listbox_field_css
web_page_module/rjs_gadget_slapos_alert_listbox_field_html
web_page_module/rjs_gadget_slapos_alert_listbox_field_js
web_page_module/rjs_gadget_slapos_annotated_helper_css
web_page_module/rjs_gadget_slapos_annotated_helper_html
web_page_module/rjs_gadget_slapos_annotated_helper_js
web_page_module/rjs_gadget_slapos_appcache
web_page_module/rjs_gadget_slapos_compute_node_map_html
web_page_module/rjs_gadget_slapos_compute_node_map_js
web_page_module/rjs_gadget_slapos_event_discussion_entry_css
web_page_module/rjs_gadget_slapos_event_discussion_entry_html
web_page_module/rjs_gadget_slapos_event_discussion_entry_js
web_page_module/rjs_gadget_slapos_header_html
web_page_module/rjs_gadget_slapos_header_js
web_page_module/rjs_gadget_slapos_invoice_printout_html
web_page_module/rjs_gadget_slapos_invoice_printout_js
web_page_module/rjs_gadget_slapos_invoice_state_html
web_page_module/rjs_gadget_slapos_invoice_state_js
web_page_module/rjs_gadget_slapos_label_listbox_field_html
web_page_module/rjs_gadget_slapos_label_listbox_field_js
web_page_module/rjs_gadget_slapos_login_page_css
web_page_module/rjs_gadget_slapos_panel_html
web_page_module/rjs_gadget_slapos_panel_js
web_page_module/rjs_gadget_slapos_payment_result_js**
web_page_module/rjs_gadget_slapos_translation_data_js
web_page_module/rjs_gadget_slapos_translation_html
web_page_module/rjs_gadget_slapos_utils_js
web_page_module/slapos_admin_front_page
web_site_module/hostingjs
web_site_module/hostingjs/**
web_site_module/renderjs_oss
web_site_module/renderjs_oss/**
\ No newline at end of file
erp5_web_renderjs_ui | RJS
slapos_hal_json_style | Hal
slapos_hal_json_style | HalRestricted
slapos_hal_json_style | RJS
\ No newline at end of file
slapos_jio_before_deletion
\ No newline at end of file
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