Commit 0d569d03 authored by Alain Takoudjou's avatar Alain Takoudjou

slapos_web: migrate business template to new format

parent 572e96d2
<!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="jquery.js" type="text/javascript"></script>
<script src="tv4.min.js" type="text/javascript"></script>
<script src="uritemplate.js" type="text/javascript"></script>
<script src="URI.js" type="text/javascript"></script>
<script src="jio_sha1.amd.js" type="text/javascript"></script>
<script src="jio_sha2.amd.js" type="text/javascript"></script>
<script src="jio_sha256.amd.js" type="text/javascript"></script>
<script src="jio.js" type="text/javascript"></script>
<script src="slapos_load_schema.js" type="text/javascript"></script>
</head>
<body>
<div />
</body>
</html>
\ No newline at end of file
......@@ -99,37 +99,6 @@
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!DOCTYPE html>\n
<html manifest="gadget_erp5.appcache">\n
<head>\n
<meta charset="utf-8">\n
<meta name="viewport" content="width=device-width, initial-scale=1">\n
<title>ERP5</title>\n
<link rel="shortcut icon" href="favicon.ico">\n
<script src="RSVP.js" type="text/javascript"></script>\n
<script src="../renderjs.js" type="text/javascript"></script>\n
<script src="URI.js" type="text/javascript"></script>\n
<script src="jquery.js" type="text/javascript"></script>\n
<script src="tv4.min.js" type="text/javascript"></script>\n
<script src="uritemplate.js" type="text/javascript"></script>\n
<script src="URI.js" type="text/javascript"></script>\n
<script src="jio_sha1.amd.js" type="text/javascript"></script>\n
<script src="jio_sha2.amd.js" type="text/javascript"></script>\n
<script src="jio_sha256.amd.js" type="text/javascript"></script>\n
<script src="jio.js" type="text/javascript"></script>\n
<script src="slapos_load_schema.js" type="text/javascript"></script>\n
</head> \n
<body>\n
<div />\n
</body>\n
</html>
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget for Load JSON Schema</string> </value>
......
<!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="jquery.js" type="text/javascript"></script>
<script src="vkbeautify.js" type="text/javascript"></script>
<script src="slapos_parameter_form.js" type="text/javascript"></script>
</head>
<body>
<div>
<fieldset id="software-type">
<div class="field" title="software_type">
<label> 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"></input>
</div>
</div>
</fieldset>
<fieldset id="parameter-main"> </fieldset>
<fieldset id="parameter-optional"> </fieldset>
<fieldset id="parameter-xml">
<input type=hidden name="parameter_hash" class="parameter_hash_output"></input>
</fieldset>
</div>
<div class="loadschema"
data-gadget-url="gadget_slapos_load_schema.html"
data-gadget-scope="loadschema" >
</div>
</body>
</html>
\ No newline at end of file
......@@ -99,58 +99,6 @@
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!DOCTYPE html>\n
<html manifest="gadget_erp5.appcache">\n
<head>\n
<meta charset="utf-8">\n
<meta name="viewport" content="width=device-width, initial-scale=1">\n
<title>ERP5</title>\n
<link rel="shortcut icon" href="favicon.ico">\n
<script src="RSVP.js" type="text/javascript"></script>\n
<script src="../renderjs.js" type="text/javascript"></script>\n
<script src="URI.js" type="text/javascript"></script>\n
<script src="jquery.js" type="text/javascript"></script>\n
<script src="vkbeautify.js" type="text/javascript"></script>\n
<script src="slapos_parameter_form.js" type="text/javascript"></script>\n
\n
</head> \n
<body>\n
<div>\n
<fieldset id="software-type">\n
<div class="field" title="software_type">\n
<label> Software Type </label>\n
<div class="input">\n
<select size="1" name="software_type" class="slapos-software-type">\n
</select>\n
\n
</div>\n
</div>\n
<div class="field" title="serialisation_type">\n
<div class="input">\n
<input type=hidden name="serialisation_type" class="slapos-serialisation-type"></input>\n
</div>\n
</div>\n
</fieldset>\n
<fieldset id="parameter-main"> </fieldset>\n
<fieldset id="parameter-optional"> </fieldset>\n
<fieldset id="parameter-xml"> \n
<input type=hidden name="parameter_hash" class="parameter_hash_output"></input>\n
</fieldset>\n
\n
</div>\n
<div class="loadschema"\n
data-gadget-url="gadget_slapos_load_schema.html"\n
data-gadget-scope="loadschema" >\n
</div>\n
</body>\n
</html>
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget for show parameter form</string> </value>
......
<!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="jquery.js" type="text/javascript"></script>
<script src="slapos_request_form.js" type="text/javascript"></script>
</head>
<body>
<div>
<div class="parameter">
<div class="loading-parameter-form">
<p><img src="ERP5VCS_imgs/wait.gif"></p>
</div>
</div>
<div class="debug"></div>
</div>
</body>
</html>
\ No newline at end of file
......@@ -99,39 +99,6 @@
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!DOCTYPE html>\n
<html manifest="gadget_erp5.appcache">\n
<head>\n
<meta charset="utf-8">\n
<meta name="viewport" content="width=device-width, initial-scale=1">\n
<title>ERP5</title>\n
<link rel="shortcut icon" href="favicon.ico">\n
<script src="RSVP.js" type="text/javascript"></script>\n
<script src="../renderjs.js" type="text/javascript"></script>\n
<script src="jquery.js" type="text/javascript"></script>\n
<script src="slapos_request_form.js" type="text/javascript"></script>\n
\n
</head>\n
<body>\n
<div>\n
<div class="parameter">\n
<div class="loading-parameter-form">\n
<p><img src="ERP5VCS_imgs/wait.gif"></p>\n
</div>\n
</div>\n
\n
<div class="debug"></div>\n
\n
</div>\n
</body>\n
</html>
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget for show Request form</string> </value>
......
{
"id": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Core schema meta-schema",
"definitions": {
"schemaArray": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#" }
},
"positiveInteger": {
"type": "integer",
"minimum": 0
},
"positiveIntegerDefault0": {
"allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ]
},
"simpleTypes": {
"enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
},
"stringArray": {
"type": "array",
"items": { "type": "string" },
"minItems": 1,
"uniqueItems": true
}
},
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uri"
},
"$schema": {
"type": "string",
"format": "uri"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"default": {},
"multipleOf": {
"type": "number",
"minimum": 0,
"exclusiveMinimum": true
},
"maximum": {
"type": "number"
},
"exclusiveMaximum": {
"type": "boolean",
"default": false
},
"minimum": {
"type": "number"
},
"exclusiveMinimum": {
"type": "boolean",
"default": false
},
"maxLength": { "$ref": "#/definitions/positiveInteger" },
"minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },
"pattern": {
"type": "string",
"format": "regex"
},
"additionalItems": {
"anyOf": [
{ "type": "boolean" },
{ "$ref": "#" }
],
"default": {}
},
"items": {
"anyOf": [
{ "$ref": "#" },
{ "$ref": "#/definitions/schemaArray" }
],
"default": {}
},
"maxItems": { "$ref": "#/definitions/positiveInteger" },
"minItems": { "$ref": "#/definitions/positiveIntegerDefault0" },
"uniqueItems": {
"type": "boolean",
"default": false
},
"maxProperties": { "$ref": "#/definitions/positiveInteger" },
"minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },
"required": { "$ref": "#/definitions/stringArray" },
"additionalProperties": {
"anyOf": [
{ "type": "boolean" },
{ "$ref": "#" }
],
"default": {}
},
"definitions": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"default": {}
},
"properties": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"default": {}
},
"patternProperties": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"default": {}
},
"dependencies": {
"type": "object",
"additionalProperties": {
"anyOf": [
{ "$ref": "#" },
{ "$ref": "#/definitions/stringArray" }
]
}
},
"enum": {
"type": "array",
"minItems": 1,
"uniqueItems": true
},
"type": {
"anyOf": [
{ "$ref": "#/definitions/simpleTypes" },
{
"type": "array",
"items": { "$ref": "#/definitions/simpleTypes" },
"minItems": 1,
"uniqueItems": true
}
]
},
"allOf": { "$ref": "#/definitions/schemaArray" },
"anyOf": { "$ref": "#/definitions/schemaArray" },
"oneOf": { "$ref": "#/definitions/schemaArray" },
"not": { "$ref": "#" }
},
"dependencies": {
"exclusiveMaximum": [ "maximum" ],
"exclusiveMinimum": [ "minimum" ]
},
"default": {}
}
\ No newline at end of file
......@@ -101,159 +101,6 @@
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string>{\n
"id": "http://json-schema.org/draft-04/schema#",\n
"$schema": "http://json-schema.org/draft-04/schema#",\n
"description": "Core schema meta-schema",\n
"definitions": {\n
"schemaArray": {\n
"type": "array",\n
"minItems": 1,\n
"items": { "$ref": "#" }\n
},\n
"positiveInteger": {\n
"type": "integer",\n
"minimum": 0\n
},\n
"positiveIntegerDefault0": {\n
"allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ]\n
},\n
"simpleTypes": {\n
"enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]\n
},\n
"stringArray": {\n
"type": "array",\n
"items": { "type": "string" },\n
"minItems": 1,\n
"uniqueItems": true\n
}\n
},\n
"type": "object",\n
"properties": {\n
"id": {\n
"type": "string",\n
"format": "uri"\n
},\n
"$schema": {\n
"type": "string",\n
"format": "uri"\n
},\n
"title": {\n
"type": "string"\n
},\n
"description": {\n
"type": "string"\n
},\n
"default": {},\n
"multipleOf": {\n
"type": "number",\n
"minimum": 0,\n
"exclusiveMinimum": true\n
},\n
"maximum": {\n
"type": "number"\n
},\n
"exclusiveMaximum": {\n
"type": "boolean",\n
"default": false\n
},\n
"minimum": {\n
"type": "number"\n
},\n
"exclusiveMinimum": {\n
"type": "boolean",\n
"default": false\n
},\n
"maxLength": { "$ref": "#/definitions/positiveInteger" },\n
"minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },\n
"pattern": {\n
"type": "string",\n
"format": "regex"\n
},\n
"additionalItems": {\n
"anyOf": [\n
{ "type": "boolean" },\n
{ "$ref": "#" }\n
],\n
"default": {}\n
},\n
"items": {\n
"anyOf": [\n
{ "$ref": "#" },\n
{ "$ref": "#/definitions/schemaArray" }\n
],\n
"default": {}\n
},\n
"maxItems": { "$ref": "#/definitions/positiveInteger" },\n
"minItems": { "$ref": "#/definitions/positiveIntegerDefault0" },\n
"uniqueItems": {\n
"type": "boolean",\n
"default": false\n
},\n
"maxProperties": { "$ref": "#/definitions/positiveInteger" },\n
"minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },\n
"required": { "$ref": "#/definitions/stringArray" },\n
"additionalProperties": {\n
"anyOf": [\n
{ "type": "boolean" },\n
{ "$ref": "#" }\n
],\n
"default": {}\n
},\n
"definitions": {\n
"type": "object",\n
"additionalProperties": { "$ref": "#" },\n
"default": {}\n
},\n
"properties": {\n
"type": "object",\n
"additionalProperties": { "$ref": "#" },\n
"default": {}\n
},\n
"patternProperties": {\n
"type": "object",\n
"additionalProperties": { "$ref": "#" },\n
"default": {}\n
},\n
"dependencies": {\n
"type": "object",\n
"additionalProperties": {\n
"anyOf": [\n
{ "$ref": "#" },\n
{ "$ref": "#/definitions/stringArray" }\n
]\n
}\n
},\n
"enum": {\n
"type": "array",\n
"minItems": 1,\n
"uniqueItems": true\n
},\n
"type": {\n
"anyOf": [\n
{ "$ref": "#/definitions/simpleTypes" },\n
{\n
"type": "array",\n
"items": { "$ref": "#/definitions/simpleTypes" },\n
"minItems": 1,\n
"uniqueItems": true\n
}\n
]\n
},\n
"allOf": { "$ref": "#/definitions/schemaArray" },\n
"anyOf": { "$ref": "#/definitions/schemaArray" },\n
"oneOf": { "$ref": "#/definitions/schemaArray" },\n
"not": { "$ref": "#" }\n
},\n
"dependencies": {\n
"exclusiveMaximum": [ "maximum" ],\n
"exclusiveMinimum": [ "minimum" ]\n
},\n
"default": {}\n
}</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
......
/*jslint nomen: true, maxlen: 200, indent: 2*/
/*global window, rJS, console, RSVP, jQuery, jIO, tv4, URI, JSON, $ */
(function (window, rJS, $, RSVP) {
"use strict";
var gk = rJS(window);
function getJSON(url) {
var protocol = URI(url).protocol();
if ( protocol === "http" || protocol === "https" ) {
if (URI(window.location).protocol() !== protocol) {
throw new Error("You cannot mixed http and https calls");
}
}
return RSVP.Queue()
.push(function () {
return jIO.util.ajax({
url: url
})
.then(function (evt) {
return evt.target.responseText;
});
});
}
function resolveLocalReference(ref, schema) {
// 2 here is for #/
var i, ref_path = ref.substr(2, ref.length),
parts = ref_path.split("/");
if (parts.length === 1 && parts[0] === "") {
// It was uses #/ to reference the entire json so just return it.
return schema;
}
for (i = 0; i < parts.length; i += 1) {
schema = schema[parts[i]];
}
return schema;
}
function resolveReference(partial_schema, schema, base_url) {
var parts,
external_schema,
ref = partial_schema.$ref;
if (ref === undefined) {
return RSVP.Queue().push(function () {
return partial_schema;
});
}
if (ref.substr(0, 1) === "#") {
return RSVP.Queue().push(function () {
return resolveLocalReference(ref, schema);
});
}
return RSVP.Queue().push(function () {
if (URI(ref).protocol() === "") {
if (base_url !== undefined) {
ref = base_url + "/" + ref;
}
}
return getJSON(ref);
})
.push(function (json) {
external_schema = JSON.parse(json);
parts = ref.split("#");
ref = "#" + parts[1];
return resolveLocalReference(ref, external_schema);
});
}
function clone(obj) {
return JSON.parse(JSON.stringify(obj));
}
// Inspired from https://github.com/nexedi/dream/blob/master/dream/platform/src/jsplumb/jsplumb.js#L398
function expandSchema(json_schema, full_schema, base_url) {
var i,
expanded_json_schema = clone(json_schema) || {};
if (!expanded_json_schema.properties) {
expanded_json_schema.properties = {};
}
return RSVP.Queue().push(function () {
if (json_schema.$ref) {
return resolveReference(
json_schema,
full_schema,
base_url
)
.push(function (remote_schema) {
return expandSchema(
remote_schema,
full_schema,
base_url
);
}).push(function (referencedx) {
$.extend(expanded_json_schema, referencedx);
delete expanded_json_schema.$ref;
return true;
});
}
return true;
}).push(function () {
var property, queue = RSVP.Queue();
function wrapperResolveReference(p) {
return resolveReference(
json_schema.properties[p],
full_schema,
base_url
).push(function (external_schema) {
// console.log(p);
return expandSchema(
external_schema,
full_schema,
base_url
)
.push(function (referencedx) {
$.extend(expanded_json_schema.properties[p], referencedx);
if (json_schema.properties[p].$ref) {
delete expanded_json_schema.properties[p].$ref;
}
return referencedx;
});
});
}
// expand ref in properties
for (property in json_schema.properties) {
if (json_schema.properties.hasOwnProperty(property)) {
queue.push(
wrapperResolveReference.bind(this, property)
);
}
}
return queue;
})
.push(function () {
var zqueue = RSVP.Queue();
function wrapperExpandSchema(p) {
return expandSchema(
json_schema.allOf[p],
full_schema,
base_url
).push(function (referencedx) {
if (referencedx.properties) {
$.extend(
expanded_json_schema.properties,
referencedx.properties
);
delete referencedx.properties;
}
$.extend(expanded_json_schema, referencedx);
});
}
if (json_schema.allOf) {
for (i = 0; i < json_schema.allOf.length; i += 1) {
zqueue.push(wrapperExpandSchema.bind(this, i));
}
}
return zqueue;
})
.push(function () {
if (expanded_json_schema.allOf) {
delete expanded_json_schema.allOf;
}
if (expanded_json_schema.$ref) {
delete expanded_json_schema.$ref;
}
// console.log(expanded_json_schema);
return clone(expanded_json_schema);
});
}
function getMetaJSONSchema() {
return getJSON("../../renderjs/slapos_load_meta_schema.json");
}
function validateJSONSchema(json, base_url) {
return getMetaJSONSchema()
.push(function (meta_schema) {
if (!tv4.validate(json, meta_schema)) {
throw new Error("Non valid JSON schema " + json);
}
return JSON.parse(json);
})
.push(function (schema) {
return expandSchema(schema, schema, base_url);
});
}
gk
.declareMethod("loadJSONSchema", function (url) {
return getJSON(url)
.push(function (json) {
var base_url, url_uri;
url_uri = URI(url);
base_url = url_uri.path().split("/");
base_url.pop();
base_url = url.split(url_uri.path())[0] + base_url.join("/");
return validateJSONSchema(json, base_url);
});
})
.declareMethod("loadSoftwareJSON", function (url) {
return getJSON(url)
.push(function (json) {
return JSON.parse(json);
});
})
.declareMethod("validateJSONForSoftwareType", function (schema_url, software_type, generated_json) {
return getJSON(schema_url)
.push(function (json) {
return JSON.parse(json);
})
.push(function (json_object) {
var parameter_schema_url,
st,
base_url,
url_uri = URI(schema_url);
for (st in json_object["software-type"]) {
if (json_object["software-type"].hasOwnProperty(st)) {
if (st === software_type) {
parameter_schema_url = json_object["software-type"][st].request;
}
}
}
if (URI(parameter_schema_url).protocol() === "") {
base_url = url_uri.path().split("/");
base_url.pop();
base_url = schema_url.split(url_uri.path())[0] + base_url.join("/");
if (base_url !== undefined) {
parameter_schema_url = base_url + "/" + parameter_schema_url;
}
}
return getJSON(parameter_schema_url)
.push(function (json) {
var schema = JSON.parse(json);
return expandSchema(schema, schema, base_url)
.push(function (loaded_json) {
return tv4.validateMultiple(generated_json, loaded_json);
});
});
});
})
.declareMethod("validateJSON", function (schema_url, generated_json) {
return getJSON(schema_url)
.push(function (json) {
var base_url,
url_uri = URI(schema_url),
schema = JSON.parse(json);
base_url = url_uri.path().split("/");
base_url.pop();
base_url = schema_url.split(url_uri.path())[0] + base_url.join("/");
return expandSchema(schema, schema, base_url)
.push(function (loaded_schema) {
return tv4.validateMultiple(generated_json, loaded_schema);
});
});
});
}(window, rJS, $, RSVP));
\ No newline at end of file
......@@ -97,291 +97,6 @@
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*jslint nomen: true, maxlen: 200, indent: 2*/\n
/*global window, rJS, console, RSVP, jQuery, jIO, tv4, URI, JSON, $ */\n
(function (window, rJS, $, RSVP) {\n
"use strict";\n
\n
var gk = rJS(window);\n
\n
function getJSON(url) {\n
var protocol = URI(url).protocol(); \n
if ( protocol === "http" || protocol === "https" ) { \n
if (URI(window.location).protocol() !== protocol) {\n
throw new Error("You cannot mixed http and https calls");\n
}\n
}\n
return RSVP.Queue()\n
.push(function () { \n
return jIO.util.ajax({\n
url: url\n
})\n
.then(function (evt) {\n
return evt.target.responseText;\n
});\n
});\n
}\n
\n
function resolveLocalReference(ref, schema) {\n
// 2 here is for #/\n
var i, ref_path = ref.substr(2, ref.length),\n
parts = ref_path.split("/");\n
if (parts.length === 1 && parts[0] === "") {\n
// It was uses #/ to reference the entire json so just return it.\n
return schema;\n
}\n
for (i = 0; i < parts.length; i += 1) {\n
schema = schema[parts[i]];\n
}\n
return schema;\n
}\n
\n
function resolveReference(partial_schema, schema, base_url) {\n
var parts,\n
external_schema,\n
ref = partial_schema.$ref;\n
\n
if (ref === undefined) {\n
return RSVP.Queue().push(function () {\n
return partial_schema;\n
});\n
}\n
\n
if (ref.substr(0, 1) === "#") {\n
return RSVP.Queue().push(function () {\n
return resolveLocalReference(ref, schema);\n
});\n
}\n
\n
return RSVP.Queue().push(function () {\n
if (URI(ref).protocol() === "") {\n
if (base_url !== undefined) {\n
ref = base_url + "/" + ref;\n
}\n
}\n
return getJSON(ref);\n
})\n
.push(function (json) {\n
external_schema = JSON.parse(json);\n
parts = ref.split("#");\n
ref = "#" + parts[1];\n
return resolveLocalReference(ref, external_schema);\n
});\n
}\n
\n
function clone(obj) {\n
return JSON.parse(JSON.stringify(obj));\n
}\n
\n
// Inspired from https://github.com/nexedi/dream/blob/master/dream/platform/src/jsplumb/jsplumb.js#L398\n
function expandSchema(json_schema, full_schema, base_url) {\n
var i,\n
expanded_json_schema = clone(json_schema) || {};\n
\n
if (!expanded_json_schema.properties) {\n
expanded_json_schema.properties = {};\n
}\n
\n
return RSVP.Queue().push(function () {\n
if (json_schema.$ref) {\n
return resolveReference(\n
json_schema,\n
full_schema,\n
base_url\n
)\n
.push(function (remote_schema) {\n
return expandSchema(\n
remote_schema,\n
full_schema,\n
base_url\n
);\n
}).push(function (referencedx) {\n
$.extend(expanded_json_schema, referencedx);\n
delete expanded_json_schema.$ref;\n
return true;\n
});\n
}\n
return true;\n
}).push(function () {\n
\n
var property, queue = RSVP.Queue();\n
\n
function wrapperResolveReference(p) {\n
return resolveReference(\n
json_schema.properties[p],\n
full_schema,\n
base_url\n
).push(function (external_schema) {\n
// console.log(p);\n
return expandSchema(\n
external_schema,\n
full_schema,\n
base_url\n
)\n
.push(function (referencedx) {\n
$.extend(expanded_json_schema.properties[p], referencedx);\n
if (json_schema.properties[p].$ref) {\n
delete expanded_json_schema.properties[p].$ref;\n
}\n
return referencedx;\n
});\n
});\n
}\n
\n
// expand ref in properties\n
for (property in json_schema.properties) {\n
if (json_schema.properties.hasOwnProperty(property)) {\n
queue.push(\n
wrapperResolveReference.bind(this, property)\n
);\n
}\n
}\n
return queue;\n
})\n
.push(function () {\n
\n
var zqueue = RSVP.Queue();\n
\n
function wrapperExpandSchema(p) {\n
return expandSchema(\n
json_schema.allOf[p],\n
full_schema,\n
base_url\n
).push(function (referencedx) {\n
if (referencedx.properties) {\n
$.extend(\n
expanded_json_schema.properties,\n
referencedx.properties\n
);\n
delete referencedx.properties;\n
}\n
$.extend(expanded_json_schema, referencedx);\n
});\n
}\n
\n
if (json_schema.allOf) {\n
for (i = 0; i < json_schema.allOf.length; i += 1) {\n
zqueue.push(wrapperExpandSchema.bind(this, i));\n
}\n
}\n
return zqueue;\n
})\n
.push(function () {\n
if (expanded_json_schema.allOf) {\n
delete expanded_json_schema.allOf;\n
}\n
if (expanded_json_schema.$ref) {\n
delete expanded_json_schema.$ref;\n
}\n
// console.log(expanded_json_schema);\n
return clone(expanded_json_schema);\n
});\n
}\n
function getMetaJSONSchema() {\n
return getJSON("../../renderjs/slapos_load_meta_schema.json");\n
}\n
\n
function validateJSONSchema(json, base_url) {\n
return getMetaJSONSchema()\n
.push(function (meta_schema) {\n
if (!tv4.validate(json, meta_schema)) {\n
throw new Error("Non valid JSON schema " + json);\n
}\n
return JSON.parse(json);\n
})\n
.push(function (schema) {\n
return expandSchema(schema, schema, base_url);\n
});\n
}\n
\n
gk\n
.declareMethod("loadJSONSchema", function (url) {\n
return getJSON(url)\n
.push(function (json) {\n
var base_url, url_uri;\n
\n
url_uri = URI(url);\n
base_url = url_uri.path().split("/");\n
base_url.pop();\n
base_url = url.split(url_uri.path())[0] + base_url.join("/");\n
\n
return validateJSONSchema(json, base_url);\n
});\n
})\n
\n
.declareMethod("loadSoftwareJSON", function (url) {\n
return getJSON(url)\n
.push(function (json) {\n
return JSON.parse(json);\n
});\n
})\n
\n
.declareMethod("validateJSONForSoftwareType", function (schema_url, software_type, generated_json) {\n
return getJSON(schema_url)\n
.push(function (json) {\n
return JSON.parse(json);\n
})\n
.push(function (json_object) {\n
var parameter_schema_url,\n
st,\n
base_url,\n
url_uri = URI(schema_url);\n
\n
for (st in json_object["software-type"]) {\n
if (json_object["software-type"].hasOwnProperty(st)) {\n
if (st === software_type) {\n
parameter_schema_url = json_object["software-type"][st].request;\n
}\n
}\n
}\n
\n
if (URI(parameter_schema_url).protocol() === "") {\n
base_url = url_uri.path().split("/");\n
base_url.pop();\n
base_url = schema_url.split(url_uri.path())[0] + base_url.join("/");\n
if (base_url !== undefined) {\n
parameter_schema_url = base_url + "/" + parameter_schema_url;\n
}\n
}\n
\n
return getJSON(parameter_schema_url)\n
.push(function (json) {\n
var schema = JSON.parse(json);\n
\n
return expandSchema(schema, schema, base_url)\n
.push(function (loaded_json) {\n
return tv4.validateMultiple(generated_json, loaded_json);\n
});\n
});\n
});\n
})\n
\n
.declareMethod("validateJSON", function (schema_url, generated_json) {\n
return getJSON(schema_url)\n
.push(function (json) {\n
var base_url,\n
url_uri = URI(schema_url),\n
schema = JSON.parse(json);\n
\n
base_url = url_uri.path().split("/");\n
base_url.pop();\n
base_url = schema_url.split(url_uri.path())[0] + base_url.join("/");\n
\n
return expandSchema(schema, schema, base_url)\n
.push(function (loaded_schema) {\n
return tv4.validateMultiple(generated_json, loaded_schema);\n
});\n
});\n
});\n
\n
}(window, rJS, $, RSVP));
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>slapos_load_schema.js</string> </value>
......
/*jslint nomen: true, maxlen: 200, indent: 2*/
/*global window, rJS, console, jQuery, jIO, tv4, JSON */
(function (window, rJS) {
"use strict";
var gk = rJS(window);
function getJSON(url) {
return jIO.util.ajax({
url: url
})
.then(function (evt) {
return evt.target.responseText;
});
}
function getMetaJSONSchema() {
return getJSON("slapos_load_meta_schema.json");
}
function validateJSONSchema(json) {
return getMetaJSONSchema()
.then(function (meta_schema) {
if (!tv4.validate(json, meta_schema)) {
throw new Error("Non valid JSON schema " + json);
}
return JSON.parse(json);
});
}
gk
.declareMethod("loadJSONSchema", function (url) {
return getJSON(url)
.then(function (json) {
return validateJSONSchema(json);
});
})
.declareMethod("loadSoftwareJSON", function (url) {
return getJSON(url)
.then(function (json) {
return JSON.parse(json);
});
})
.declareMethod("validateJSON", function (schema_url, generated_json) {
return getJSON(schema_url)
.then(function (json) {
return tv4.validateMultiple(generated_json, json);
});
});
}(window, rJS, jQuery));
\ No newline at end of file
......@@ -90,62 +90,6 @@
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string>/*jslint nomen: true, maxlen: 200, indent: 2*/\n
/*global window, rJS, console, jQuery, jIO, tv4, JSON */\n
(function (window, rJS) {\n
"use strict";\n
\n
var gk = rJS(window);\n
\n
function getJSON(url) {\n
return jIO.util.ajax({\n
url: url\n
})\n
.then(function (evt) {\n
return evt.target.responseText;\n
});\n
}\n
\n
function getMetaJSONSchema() {\n
return getJSON("slapos_load_meta_schema.json");\n
}\n
\n
function validateJSONSchema(json) {\n
return getMetaJSONSchema()\n
.then(function (meta_schema) {\n
if (!tv4.validate(json, meta_schema)) {\n
throw new Error("Non valid JSON schema " + json);\n
}\n
return JSON.parse(json);\n
});\n
}\n
\n
gk\n
.declareMethod("loadJSONSchema", function (url) {\n
return getJSON(url)\n
.then(function (json) {\n
return validateJSONSchema(json);\n
});\n
})\n
\n
.declareMethod("loadSoftwareJSON", function (url) {\n
return getJSON(url)\n
.then(function (json) {\n
return JSON.parse(json);\n
});\n
})\n
\n
.declareMethod("validateJSON", function (schema_url, generated_json) {\n
return getJSON(schema_url)\n
.then(function (json) {\n
return tv4.validateMultiple(generated_json, json);\n
});\n
});\n
\n
}(window, rJS, jQuery));</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>slapos_load_schema.js</string> </value>
......
/*jslint nomen: true, maxlen: 200, indent: 2*/
/*global window, rJS , $ , console, loopEventListener*/
(function (window, rJS, $, loopEventListener) {
"use strict";
var gk = rJS(window),
json_url = "sample_schema.json",
parameter_gadget_url = "gadget_slapos_parameter_form.html";
gk.declareMethod('getContent', function () {
var g = this;
console.log("hey cousous");
return g.getDeclaredGadget("parameter")
.push(function(gadget) {
return gadget.processValidation(g.options.json_url);
})
.push(function (xml_result) {
return {"field_your_instance_xml": xml_result};
})
.fail(function (e) {
return {};
});
});
gk.declareMethod('render', function (options) {
var g = this;
options.json_url = "../../renderjs/slapos_load_schema_software_type.json";
options.parameter = {};
g.options = options;
if (options.value !== undefined) {
// A JSON where provided via gadgetfield
$.extend(options, JSON.parse(options.value));
delete options.value;
}
if (options.parameter.parameter_hash !== undefined) {
// A JSON where provided via gadgetfield
options.parameter.parameter_xml = atob(options.parameter.parameter_hash);
}
if (options.parameter.json_url !== undefined) {
// A JSON where provided via gadgetfield
options.json_url = options.parameter.json_url;
}
return g.declareGadget(parameter_gadget_url, {'scope': 'parameter'})
.push(function (gadget) {
return gadget.render(options);
}).push(function (gadget) {
var div = g.__element.querySelector(".parameter");
$(div).replaceWith(gadget.__element);
return gadget;
});
});
}(window, rJS, $, loopEventListener));
\ No newline at end of file
......@@ -97,70 +97,6 @@
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string>/*jslint nomen: true, maxlen: 200, indent: 2*/\n
/*global window, rJS , $ , console, loopEventListener*/\n
(function (window, rJS, $, loopEventListener) {\n
"use strict";\n
\n
var gk = rJS(window),\n
json_url = "sample_schema.json", \n
parameter_gadget_url = "gadget_slapos_parameter_form.html";\n
\n
\n
gk.declareMethod(\'getContent\', function () {\n
var g = this; \n
console.log("hey cousous");\n
return g.getDeclaredGadget("parameter")\n
.push(function(gadget) {\n
return gadget.processValidation(g.options.json_url);\n
})\n
.push(function (xml_result) {\n
return {"field_your_instance_xml": xml_result};\n
})\n
.fail(function (e) {\n
return {};\n
});\n
});\n
\n
gk.declareMethod(\'render\', function (options) {\n
\n
var g = this;\n
\n
options.json_url = "../../renderjs/slapos_load_schema_software_type.json";\n
options.parameter = {};\n
\n
g.options = options;\n
\n
if (options.value !== undefined) {\n
// A JSON where provided via gadgetfield\n
$.extend(options, JSON.parse(options.value));\n
delete options.value;\n
}\n
\n
if (options.parameter.parameter_hash !== undefined) {\n
// A JSON where provided via gadgetfield\n
options.parameter.parameter_xml = atob(options.parameter.parameter_hash);\n
}\n
\n
if (options.parameter.json_url !== undefined) {\n
// A JSON where provided via gadgetfield\n
options.json_url = options.parameter.json_url;\n
}\n
\n
return g.declareGadget(parameter_gadget_url, {\'scope\': \'parameter\'})\n
.push(function (gadget) {\n
return gadget.render(options);\n
}).push(function (gadget) {\n
var div = g.__element.querySelector(".parameter");\n
$(div).replaceWith(gadget.__element);\n
return gadget;\n
});\n
});\n
\n
}(window, rJS, $, loopEventListener));</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>slapos_request_form.js</string> </value>
......
{
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"user-authorized-key": {
"title": "User Authorized Key",
"description": "SSH public key in order to connect to the SSH server of this runner instance.",
"type": "string",
"require": true
},
"instance-amount": {
"title": "Partition Amount",
"description": "Number of slappart to deploy inside the runner (default is 10). Needs instance to be restarted.",
"type": "integer",
"minimum": 1,
"maximum": 40,
"optional": true
},
"slapos-software": {
"title": "Pre-selected Software Release",
"description": "a relative path from the slapos git repo to a folder containing a software release, which will be automaticaly deployed while the runner instanciation, and only if the parameter auto-deploy is set to 'true'. For example: 'software/helloworld",
"type": "string",
"optional": true
},
"auto-deploy": {
"title": "Automatically Deploy Software",
"description": "Authorizes the software declared with 'slapos-software' to be automatically deployed, or not. Needs instance to be restarted. (default is false)",
"type": "boolean",
"optional": true
},
"slapos-repository": {
"title": "SlapOS Git Repository URL",
"description": "url of the default git repository that will be download by the runner while its instanciation. Will be cloned in a directory named 'slapos' (default is http://git.erp5.org/repos/slapos.git)",
"type": "string",
"format": "uri",
"pattern": "^(http|https|ftp)://",
"optional": true
},
"slapos-reference": {
"title": "SlapOS Git Branch Name",
"description": "Branch or hash on which the default repository will checkout (default is master)",
"type": "string",
"optional": true
},
"auto-deploy-instance": {
"title": "Automatically Deploy Instances",
"description": "Prevent the runner from deploying and starting instances. Needs instance to be restarted. It is set to false for instances of type 'import' in resiliency in any case (default is false)",
"type": "boolean",
"optional": true
},
"autorun": {
"title": "Automatically Run Sofware/Instance",
"description": "Let automaticaly build and run a declared software with 'slapos-software'. Only works if 'slapos-software' is set, and 'auto-deploy' is true. Needs instance to be restarted. (default is false)",
"type": "boolean",
"optional": true
},
"slapos-software-type": {
"title": "Deployed Instance Software Type" ,
"description": "Software type of your instance inside the runner",
"type": "string",
"optional": true
},
"parameter-*": {
"title": "Parameter-* This I dont know",
"description": "'*' is a parameter which will be used to configure the instance inside the runner.",
"type": "string",
"optional": true
},
"custom-frontend-backend-url": {
"title": "Custom Frontend Backend URL",
"description": "return an ipv4 frontend of the given ipv6(+optional port)",
"type": "string",
"format": "uri",
"optional": true
},
"custom-frontend-backend-type": {
"title": "Custom Frontend Backend Type",
"description": "The type of the frontend slave instance to ask",
"type": "string",
"enum": ["zope"],
"optional": true
},
"custom-frontend-basic-auth": {
"title": "Custom Frontend Basic Auth",
"description": "if the ip given with 'custom-frontend-backend-url' is secure, set it to true for the promise do not fail",
"type": "boolean",
"optional": true
},
"custom-frontend-instance-guid": {
"title": "Custom Frontend Instance GUID",
"description": "Instance guid of the frontend you whish to use",
"type": "string",
"optional": true
},
"custom-frontend-software-type": {
"title": "Custom Frontend Software Type",
"description": "SoftwareType of the frontend you request (default is RootSoftwareInstance)",
"type": "string",
"enum": ["RootSoftwareInstance", "default"],
"optional": true
},
"custom-frontend-software-url": {
"title": "Custom Frontend Software URL",
"description": "Software Url of the frontend you request (ie.: http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg)",
"type": "string",
"format": "uri",
"optional": true
},
"monitor-port": {
"title": "Monitor Port",
"description": "Allow to manually change the port on wich the apache server running monitoring interface is listening. The default value for the webrunner is different from the default value of the standalone stack-monitor server (default 9684)",
"type": "integer",
"minimum": 9683,
"exclusiveMinimum": true,
"optional": true
},
"resilient-clone-number": {
"title": "Number of Resilient Clones",
"description": "Number of clones to be deployed when a resilient runner, if missing a single clone is provided. Its value can be 1 or 2",
"type": "integer",
"enum": [1, 2],
"optional": true
}
}
}
\ No newline at end of file
......@@ -101,133 +101,6 @@
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string>{\n
"$schema": "http://json-schema.org/draft-04/schema#",\n
"properties": {\n
"user-authorized-key": {\n
"title": "User Authorized Key",\n
"description": "SSH public key in order to connect to the SSH server of this runner instance.",\n
"type": "string",\n
"require": true\n
},\n
"instance-amount": {\n
"title": "Partition Amount",\n
"description": "Number of slappart to deploy inside the runner (default is 10). Needs instance to be restarted.",\n
"type": "integer",\n
"minimum": 1,\n
"maximum": 40,\n
"optional": true\n
},\n
"slapos-software": {\n
"title": "Pre-selected Software Release",\n
"description": "a relative path from the slapos git repo to a folder containing a software release, which will be automaticaly deployed while the runner instanciation, and only if the parameter auto-deploy is set to \'true\'. For example: \'software/helloworld",\n
"type": "string",\n
"optional": true\n
},\n
"auto-deploy": {\n
"title": "Automatically Deploy Software",\n
"description": "Authorizes the software declared with \'slapos-software\' to be automatically deployed, or not. Needs instance to be restarted. (default is false)",\n
"type": "boolean",\n
"optional": true\n
},\n
"slapos-repository": {\n
"title": "SlapOS Git Repository URL",\n
"description": "url of the default git repository that will be download by the runner while its instanciation. Will be cloned in a directory named \'slapos\' (default is http://git.erp5.org/repos/slapos.git)",\n
"type": "string",\n
"format": "uri",\n
"pattern": "^(http|https|ftp)://",\n
"optional": true\n
},\n
"slapos-reference": {\n
"title": "SlapOS Git Branch Name",\n
"description": "Branch or hash on which the default repository will checkout (default is master)",\n
"type": "string",\n
"optional": true\n
},\n
"auto-deploy-instance": {\n
"title": "Automatically Deploy Instances",\n
"description": "Prevent the runner from deploying and starting instances. Needs instance to be restarted. It is set to false for instances of type \'import\' in resiliency in any case (default is false)",\n
"type": "boolean",\n
"optional": true\n
},\n
"autorun": {\n
"title": "Automatically Run Sofware/Instance",\n
"description": "Let automaticaly build and run a declared software with \'slapos-software\'. Only works if \'slapos-software\' is set, and \'auto-deploy\' is true. Needs instance to be restarted. (default is false)",\n
"type": "boolean",\n
"optional": true\n
},\n
"slapos-software-type": {\n
"title": "Deployed Instance Software Type" ,\n
"description": "Software type of your instance inside the runner",\n
"type": "string",\n
"optional": true\n
},\n
"parameter-*": {\n
"title": "Parameter-* This I dont know",\n
"description": "\'*\' is a parameter which will be used to configure the instance inside the runner.",\n
"type": "string",\n
"optional": true\n
},\n
"custom-frontend-backend-url": {\n
"title": "Custom Frontend Backend URL",\n
"description": "return an ipv4 frontend of the given ipv6(+optional port)",\n
"type": "string",\n
"format": "uri",\n
"optional": true\n
},\n
"custom-frontend-backend-type": {\n
"title": "Custom Frontend Backend Type",\n
"description": "The type of the frontend slave instance to ask",\n
"type": "string",\n
"enum": ["zope"],\n
"optional": true\n
},\n
"custom-frontend-basic-auth": {\n
"title": "Custom Frontend Basic Auth",\n
"description": "if the ip given with \'custom-frontend-backend-url\' is secure, set it to true for the promise do not fail",\n
"type": "boolean",\n
"optional": true\n
},\n
"custom-frontend-instance-guid": {\n
"title": "Custom Frontend Instance GUID",\n
"description": "Instance guid of the frontend you whish to use",\n
"type": "string",\n
"optional": true\n
},\n
"custom-frontend-software-type": {\n
"title": "Custom Frontend Software Type",\n
"description": "SoftwareType of the frontend you request (default is RootSoftwareInstance)",\n
"type": "string",\n
"enum": ["RootSoftwareInstance", "default"],\n
"optional": true\n
},\n
"custom-frontend-software-url": {\n
"title": "Custom Frontend Software URL",\n
"description": "Software Url of the frontend you request (ie.: http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg)",\n
"type": "string",\n
"format": "uri",\n
"optional": true\n
},\n
"monitor-port": {\n
"title": "Monitor Port",\n
"description": "Allow to manually change the port on wich the apache server running monitoring interface is listening. The default value for the webrunner is different from the default value of the standalone stack-monitor server (default 9684)",\n
"type": "integer",\n
"minimum": 9683,\n
"exclusiveMinimum": true,\n
"optional": true\n
},\n
"resilient-clone-number": {\n
"title": "Number of Resilient Clones",\n
"description": "Number of clones to be deployed when a resilient runner, if missing a single clone is provided. Its value can be 1 or 2",\n
"type": "integer",\n
"enum": [1, 2],\n
"optional": true\n
}\n
}\n
}</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>slapos_schema.json</string> </value>
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"allOf": [
{
"$ref": "../../renderjs/sample_schema.json#/"
},
{
"properties": {
"-sla-0-computer_guid": {
"title": "Target computer for main instance",
"description": "Target computer GUID for main instance.",
"type": "string",
"optional": true
},
"-sla-1-computer_guid": {
"title": "Target computer for first clone",
"description": "Target computer for first clone and PBS.",
"type": "string",
"optional": true
},
"-sla-2-computer_guid": {
"title": "Target computer for second clone",
"description": "Target computer for second clone and PBS.",
"type": "string",
"optional": true
},
"resiliency-backup-periodicity": {
"title": "Periodicity of backup",
"description": "Periodicity of backup, in cron format.",
"type": "string",
"optional": true
},
"remove-backup-older-than": {
"title": "Remove backups older than...",
"description": "Remove all the backups in PBS that are older than specified value. It should be rdiff-backup-compatible.",
"type": "string",
"default": "3B",
"optional": true
},
"resilient-clone-number": {
"title": "Amount of backup(s) to create",
"description": "Amount of backup(s) to create. Each backup consists of a Pull Backup Server and a clone.",
"type": "integer",
"default": 2,
"optional": true
},
"ignore-known-hosts-file": {
"title": "Ignore known_hosts file",
"description": "Set either to fill known_hosts file for ssh or not. Useful if main instance and PBS are using the same IP (slapos proxy, webrunner).",
"type": "boolean",
"default": false,
"optional": true
}
}
}
]
}
\ No newline at end of file
......@@ -101,67 +101,6 @@
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string>{\n
"type": "object",\n
"$schema": "http://json-schema.org/draft-04/schema",\n
"allOf": [\n
{\n
"$ref": "../../renderjs/sample_schema.json#/"\n
},\n
{\n
"properties": {\n
"-sla-0-computer_guid": {\n
"title": "Target computer for main instance",\n
"description": "Target computer GUID for main instance.",\n
"type": "string",\n
"optional": true\n
},\n
"-sla-1-computer_guid": {\n
"title": "Target computer for first clone",\n
"description": "Target computer for first clone and PBS.",\n
"type": "string",\n
"optional": true\n
},\n
"-sla-2-computer_guid": {\n
"title": "Target computer for second clone",\n
"description": "Target computer for second clone and PBS.",\n
"type": "string",\n
"optional": true\n
},\n
"resiliency-backup-periodicity": {\n
"title": "Periodicity of backup",\n
"description": "Periodicity of backup, in cron format.",\n
"type": "string",\n
"optional": true\n
},\n
"remove-backup-older-than": {\n
"title": "Remove backups older than...",\n
"description": "Remove all the backups in PBS that are older than specified value. It should be rdiff-backup-compatible.",\n
"type": "string",\n
"default": "3B",\n
"optional": true\n
},\n
"resilient-clone-number": {\n
"title": "Amount of backup(s) to create",\n
"description": "Amount of backup(s) to create. Each backup consists of a Pull Backup Server and a clone.",\n
"type": "integer",\n
"default": 2,\n
"optional": true\n
},\n
"ignore-known-hosts-file": {\n
"title": "Ignore known_hosts file",\n
"description": "Set either to fill known_hosts file for ssh or not. Useful if main instance and PBS are using the same IP (slapos proxy, webrunner).",\n
"type": "boolean",\n
"default": false,\n
"optional": true\n
}\n
}\n
}\n
]\n
}</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>slapos_schema2.json</string> </value>
......
Copyright ViFiB &copy; 2010, icons by <a href="http://www.iconza.com">iconza</a>
\ No newline at end of file
......@@ -105,14 +105,6 @@
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
Copyright ViFiB &copy; 2010, icons by <a href="http://www.iconza.com">iconza</a>
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>vifib.hosting-footer</string> </value>
......
Copyright ViFiB &copy; 2010, icons by <a href="http://www.iconza.com">iconza</a>
\ No newline at end of file
......@@ -105,14 +105,6 @@
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
Copyright ViFiB &copy; 2010, icons by <a href="http://www.iconza.com">iconza</a>
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>vifib.hosting-footer</string> </value>
......
<h1>Propri&eacute;t&eacute; intellectuelle</h1>
<p>L'ensemble des donn&eacute;es de ce site sont prot&eacute;g&eacute;es par le droit d'auteur et le droit sui generis des bases de donn&eacute;es.</p>
<p>ViFiB est une marque d&eacute;pos&eacute;e de ViFiB SARL.</p>
<h1>Donn&eacute;es priv&eacute;es</h1>
<p>D&eacute;claration CNIL&nbsp;en cours.</p>
\ No newline at end of file
......@@ -163,18 +163,6 @@
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
<h1>Propri&eacute;t&eacute; intellectuelle</h1>\r\n
<p>L\'ensemble des donn&eacute;es de ce site sont prot&eacute;g&eacute;es par le droit d\'auteur et le droit sui generis des bases de donn&eacute;es.</p>\r\n
<p>ViFiB est une marque d&eacute;pos&eacute;e de ViFiB SARL.</p>\r\n
<h1>Donn&eacute;es priv&eacute;es</h1>\r\n
<p>D&eacute;claration CNIL&nbsp;en cours.</p>
]]></string> </value>
</item>
<item>
<key> <string>text_format</string> </key>
<value> <string>text/html</string> </value>
......
<p>You have cancelled the payment process.</p>
<p>Please consider continuing it as soon as possible, otherwise you will be not able to use full functionality.</p>
\ No newline at end of file
......@@ -133,15 +133,6 @@
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
<p>You have cancelled the payment process.</p>\n
<p>Please consider continuing it as soon as possible, otherwise you will be not able to use full functionality.</p>
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Payment cancelled</string> </value>
......
<p>There was an error while processing the payment.</p>
<p>Please try again later or contact the support.</p>
\ No newline at end of file
......@@ -133,15 +133,6 @@
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
<p>There was an error while processing the payment.</p>\n
<p>Please try again later or contact the support.</p>
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Payment error</string> </value>
......
<p>Your credit card was refused by payment system.</p>
<p>Please consider using another credit card or contact your bank.</p>
\ No newline at end of file
......@@ -133,15 +133,6 @@
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
<p>Your credit card was refused by payment system.</p>\n
<p>Please consider using another credit card or contact your bank.</p>
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Payment referral</string> </value>
......
<p>The payment has been refused.</p>
<p>Please contact your bank.</p>
\ No newline at end of file
......@@ -133,15 +133,6 @@
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
<p>The payment has been refused.</p>\n
<p>Please contact your bank.</p>
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Payment refused</string> </value>
......
<p>You have not finished your payment.</p>
<p>Please consider continuing it as soon as possible, otherwise you will be not able to use full functionality.</p>
\ No newline at end of file
......@@ -133,15 +133,6 @@
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
<p>You have not finished your payment.</p>\n
<p>Please consider continuing it as soon as possible, otherwise you will be not able to use full functionality.</p>
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Payment return</string> </value>
......
<p>Thank you for finalising the payment.</p>
<p>It will be processed by PayZen interface.</p>
\ No newline at end of file
......@@ -133,15 +133,6 @@
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
<p>Thank you for finalising the payment.</p>\n
<p>It will be processed by PayZen interface.</p>
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Thank you for payment</string> </value>
......
"""
Keep a custom script for permit render other times of documents, ie.: Software Installation.
"""
portal = context.getPortalObject()
kw['portal_type'] = ["Support Request", "Regularisation Request", "Upgrader Decision"]
kw['source_project_uid'] = context.getUid()
person = portal.ERP5Site_getAuthenticatedMemberPersonValue()
if person:
kw['default_destination_decision_uid'] = person.getUid()
# Use event modification date instead.
kw['sort_on'] = [('modification_date', 'DESC'),]
return context.getPortalObject().portal_catalog(**kw)
else:
return []
......@@ -48,28 +48,6 @@
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>"""\n
Keep a custom script for permit render other times of documents, ie.: Software Installation.\n
"""\n
\n
portal = context.getPortalObject()\n
kw[\'portal_type\'] = ["Support Request", "Regularisation Request", "Upgrader Decision"]\n
kw[\'source_project_uid\'] = context.getUid()\n
\n
person = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n
if person:\n
kw[\'default_destination_decision_uid\'] = person.getUid()\n
\n
# Use event modification date instead. \n
kw[\'sort_on\'] = [(\'modification_date\', \'DESC\'),]\n
return context.getPortalObject().portal_catalog(**kw)\n
\n
else:\n
return []\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
......
"""
Keep a custom script for permit render other times of documents, ie.: Software Installation.
"""
portal = context.getPortalObject()
kw['portal_type'] = ["Support Request", "Regularisation Request", "Upgrader Decision"]
kw['source_project_uid'] = context.getUid()
person = portal.ERP5Site_getAuthenticatedMemberPersonValue()
if person:
kw['default_destination_decision_uid'] = person.getUid()
# Use event modification date instead.
kw['sort_on'] = [('modification_date', 'DESC'),]
return context.getPortalObject().portal_catalog(**kw)
else:
return []
......@@ -48,28 +48,6 @@
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>"""\n
Keep a custom script for permit render other times of documents, ie.: Software Installation.\n
"""\n
\n
portal = context.getPortalObject()\n
kw[\'portal_type\'] = ["Support Request", "Regularisation Request", "Upgrader Decision"]\n
kw[\'source_project_uid\'] = context.getUid()\n
\n
person = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n
if person:\n
kw[\'default_destination_decision_uid\'] = person.getUid()\n
\n
# Use event modification date instead. \n
kw[\'sort_on\'] = [(\'modification_date\', \'DESC\'),]\n
return context.getPortalObject().portal_catalog(**kw)\n
\n
else:\n
return []\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
......
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