Commit a468149b authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Use sample data from ERP5 itself

   This makes eventual reuses for testing and demostration easy.
parent dae31ee2
......@@ -76,8 +76,9 @@
return new RSVP.Queue()
.push(function () {
return RSVP.all([
gadget.getDeclaredGadget('form_view')
]);
gadget.getDeclaredGadget('form_view'),
gadget.getSetting("hateoas_url")
]);
})
.push(function (result) {
var parameter_hash,
......@@ -85,9 +86,9 @@
default_url;
if (options.url_string === "") {
default_url = "https://lab.nexedi.com/rafael/testing-slapos-schemas/raw/master/software/simpledemo/software.cfg"
default_url = result[1] + "sample-software-schema/simpledemo/software.cfg";
} else {
default_url = options.url_string
default_url = options.url_string;
}
if (options.parameter_output === undefined) {
parameter_hash = btoa('<?xml version="1.0" encoding="utf-8" ?><instance></instance>');
......
......@@ -277,7 +277,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1000.3591.30719.64324</string> </value>
<value> <string>1000.3592.26006.62702</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -295,7 +295,7 @@
</tuple>
<state>
<tuple>
<float>1651847543.75</float>
<float>1652201764.17</float>
<string>UTC</string>
</tuple>
</state>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>sample-software-schema</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>simpledemo</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Sample paremeters for a Simple Demo",
"additionalProperties": false,
"properties": {
"simple-string": {
"title": "Example of Simple String",
"description": "Example of Simple String",
"type": "string",
"default": "Simple string "
},
"simple-string-with-enum": {
"title": "Example of Simple String with enum",
"description": "Example of Simple String with enum",
"type": "string",
"enum" : [
"simple string A",
"simple string B",
"simple string C"
],
"default": "simple string A"
},
"simple-integer": {
"title": "Example of Simple Integer",
"description": "Example of Simple Integer",
"type": "integer",
"default": 1
},
"simple-integer-with-enum": {
"title": "Example of Simple Integer with enum",
"description": "Example of Simple Integer with enum",
"type": "integer",
"default": 1,
"enum": [
1,
2,
3,
5,
7,
11,
13,
17
]
},
"simple-numeric-integer": {
"title": "Example of Simple Numeric as integer",
"description": "Example of Simple Numeric as Interger",
"type": "number",
"default": 1.0
},
"simple-numeric-integer-enum": {
"title": "Example of Simple Numeric as integer",
"description": "Example of Simple Numeric as Interger",
"type": "number",
"default": 1.0,
"enum": [
1.0,
2.0,
3.0,
5.0,
7.0,
11.0,
13.0,
17.0
]
},
"simple-numeric-float": {
"title": "Example of Simple Numeric as float",
"description": "Example of Simple Numeric as float",
"type": "number",
"default": 1.5
},
"simple-numeric-float-enum": {
"title": "Example of Simple Numeric as float",
"description": "Example of Simple Numeric as float",
"type": "number",
"default": 1.5,
"enum": [
0.25,
0.75,
1.25,
1.5
]
}
}
}
<?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>instance-input-schema.json</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/x-json</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>
{
"name": "Simple Demo",
"description": "Demo Simple",
"serialisation": "xml",
"software-type": {
"default": {
"title": "Default",
"description": "Default",
"request": "instance-input-schema.json",
"response": "instance-output-schema.json",
"index": 0
},
"jsondefault": {
"title": "JSON in XML",
"serialisation": "json-in-xml",
"description": "Default",
"request": "instance-input-schema.json",
"response": "instance-output-schema.json",
"index": 1
}
}
}
<?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>software.cfg.json</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/x-json</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>
<?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>software.cfg</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/plain</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>
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