Commit 79683bda authored by Sven Franck's avatar Sven Franck

updated JSON API to allow different views per page. Added new pages

parent 181b5b16
......@@ -9,7 +9,9 @@
"title": "Blog",
"title_i18n": "page_dict.blog.title",
"theme": "slapos-white",
"children": []
"layout": {
"default": []
}
}
]
}
{
"portal_type_source": "Computer",
"portal_type_title": "computer",
"portal_type_fields": "computer_fieldlist",
"form": true,
"id": "computer_new",
"property_dict": {
"dynamic_children": [0],
"requires_authentication": true,
"depends_on": "login_state",
"wrap_gadget": 2,
"submit_to": "#servers::__id__"
},
"children": [{
"generate": "widget",
"type": "form",
"class_list": "responsive",
"property_dict": {
"editable": true,
"secure": "default",
"secret_hash": "foo",
"public_key": "6Ldpb-oSAAAAAGwriKpk4ol1n4yjN_as6M4xv0zA"
},
"children": [{
"generate": "widget",
"type": "controlgroup",
"class_list": "center",
"property_dict": {
"direction": "horizontal"
},
"children": [
{"type": "input", "direct": {"value": "Reset", "className": "translate"}, "attributes": {"type": "reset", "data-i18n":"[value]global_dict.common_dict.cancel"}},
{"type": "input", "direct": {"value": "Submit", "className": "action translate"}, "attributes": {"type": "submit", "data-action":"add", "data-icon":"save", "data-i18n":"[value]global_dict.common_dict.submit", "data-theme": "slapos-black"}}
]
}],
"layout": [
{
"position": "left",
"fieldlist": [
{"title": "computer_title"}
]
}, {
"position": "center",
"fieldlist": [
{"title": "computer_description"}
]
}
]
}
],
"placeholder_dict": {
"no_auth": {
"text":"Requires authorization.",
"text_i18n":"validation_dict.requires_auth",
"children": [
{
"generate": "widget",
"type": "controlgroup",
"property_dict": {"direction": "horizontal"},
"children": [{
"type": "a",
"direct":{"className":"translate action", "href":"#global-popup"},
"attributes":{
"data-i18n":"global_dict.common_dict.login",
"data-action":"login",
"data-icon":"lock",
"data-rel": "popup"
},
"logic": {"text":"Login"}
}, {
"type": "a",
"direct": {"className":"translate ui-btn-slapos-black", "href": "#person::new"},
"attributes": {
"data-i18n": "global_dict.common_dict.register",
"data-icon": "edit"
},
"logic": {"text":"Register"}
}
]
}
]
}
}
}
......@@ -7,7 +7,7 @@
"id": "computer_overview",
"property_dict": {
"initial_query_url_identifier": "computer_reference",
"dynamic_children": [1],
"dynamic_children": [2],
"requires_authentication": true,
"depends_on": "login_state",
"wrap_gadget": 2,
......@@ -38,6 +38,14 @@
"type": "controlbar",
"property_dict": {"slot": 1},
"children": [{"type": "input", "direct": {"id":"search_computer_list", "className": "translate"}, "attributes": {"data-action":"search", "data-enhanced":"true", "data-i18n": "[placeholder]page_dict.servers.search","placeholder":"Search created servers", "data-icon":"search", "data-action-btn":"true", "data-type":"search", "type":"search"}, "logic":{"clear":"true", "action":"search"}}]
},{
"type": "a",
"direct": {"className":"translate ui-btn ui-icon-edit ui-btn-icon-left ui-corner-all ui-btn-inline ui-btn-slapos-black ui-link", "href": "#servers::new"},
"attributes": {
"data-i18n": "page_dict.servers.add",
"data-icon": "edit"
},
"logic": {"text":"Add server"}
},{
"generate": "widget",
"type": "table",
......
{
"portal_type_source": "Computer",
"portal_type_title": "computer",
"portal_type_fields": "computer_fieldlist",
"form": true,
"id": "computer_new",
"property_dict": {
"dynamic_children": [0],
"requires_authentication": true,
"depends_on": "login_state",
"wrap_gadget": 2,
"submit_to": "#servers::__id__"
},
"children": [{
"generate": "widget",
"type": "form",
"class_list": "responsive",
"property_dict": {
"editable": true,
"secure": "default",
"secret_hash": "foo",
"public_key": "6Ldpb-oSAAAAAGwriKpk4ol1n4yjN_as6M4xv0zA"
},
"children": [{
"generate": "widget",
"type": "controlgroup",
"class_list": "center inline",
"property_dict": {},
"children": [
{"type": "a", "direct": {"href": "#servers::__id__::scope", "className": "ui-btn-slapos-black"}, "attributes": {"data-i18n":"page_dict.servers.scope", "data-icon":"globe"}, "logic": {"text":"Set Server Scope"}},
{"type": "a", "direct": {"href": "#servers::__id__::config", "className": "ui-btn-slapos-black"}, "attributes": {"data-i18n":"page_dict.servers.config", "data-icon":"cogs"}, "logic": {"text":"Set Configuration"}},
{"type": "a", "direct": {"href": "#servers::__id__::ssl_on", "className": "ui-btn-slapos-black"}, "attributes": {"data-i18n":"page_dict.servers.ssl_on", "data-icon":"lock"}, "logic": {"text":"Request SSL"}},
{"type": "a", "direct": {"href": "#servers::__id__::ssl_off", "className": "ui-btn-slapos-black"}, "attributes": {"data-i18n":"page_dict.servers.ssl_off", "data-icon":"unlock"}, "logic": {"text":"Revoke SSL"}}
]
}],
"layout": [
{
"position": "left",
"fieldlist": [
{"title": "computer_title", "overrides": {"properties":{"editable":false, "required": false}}},
{"title": "computer_reference", "overrides": {"properties":{"editable":false, "required": false}}}
]
}
]
}
],
"placeholder_dict": {
"no_auth": {
"text":"Requires authorization.",
"text_i18n":"validation_dict.requires_auth",
"children": [
{
"generate": "widget",
"type": "controlgroup",
"property_dict": {"direction": "horizontal"},
"children": [{
"type": "a",
"direct":{"className":"translate action", "href":"#global-popup"},
"attributes":{
"data-i18n":"global_dict.common_dict.login",
"data-action":"login",
"data-icon":"lock",
"data-rel": "popup"
},
"logic": {"text":"Login"}
}, {
"type": "a",
"direct": {"className":"translate ui-btn-slapos-black", "href": "#person::new"},
"attributes": {
"data-i18n": "global_dict.common_dict.register",
"data-icon": "edit"
},
"logic": {"text":"Register"}
}
]
}
]
}
}
}
......@@ -9,7 +9,9 @@
"title": "Office JS App Store",
"title_i18n": "page_dict.home.title",
"theme": "slapos-white",
"children": []
"layout": {
"default": []
}
}
]
}
......@@ -9,7 +9,9 @@
"title": "Download",
"title_i18n": "page_dict.download.title",
"theme": "slapos-white",
"children": []
"layout": {
"default": []
}
}
]
}
......@@ -9,7 +9,9 @@
"title": "Forum",
"title_i18n": "page_dict.forum.title",
"theme": "slapos-white",
"children": []
"layout": {
"default": []
}
}
]
}
......@@ -9,7 +9,9 @@
"title": "Help",
"title_i18n": "page_dict.help.title",
"theme": "slapos-white",
"children": []
"layout": {
"default": []
}
}
]
}
......@@ -9,14 +9,16 @@
"title": "Invoices",
"title_i18n": "page_dict.invoices.title",
"theme": "slapos-white",
"children": [
{
"generate": "gadget",
"type": "listgrid",
"id": "invoice_overview",
"href": "invoice_overview"
}
]
"layout": {
"default": [
{
"generate": "gadget",
"type": "listgrid",
"id": "invoice_overview",
"href": "invoice_overview"
}
]
}
}
]
}
......@@ -9,7 +9,9 @@
"title": "Monitoring",
"title_i18n": "page_dict.monitoring.title",
"theme": "slapos-white",
"children": []
"layout": {
"default": []
}
}
]
}
......@@ -9,7 +9,9 @@
"title": "Networks",
"title_i18n": "page_dict.networks.title",
"theme": "slapos-white",
"children": []
"layout": {
"default": []
}
}
]
}
......@@ -9,14 +9,16 @@
"title": "Account",
"title_i18n": "page_dict.person.title",
"theme": "slapos-white",
"children": [
{
"generate": "gadget",
"type": "fieldlist",
"id": "person_view",
"href": "person_view"
}
]
"layout": {
"default": [
{
"generate": "gadget",
"type": "fieldlist",
"id": "person_view",
"href": "person_view"
}
]
}
},
{
"generate": "widget",
......@@ -24,14 +26,24 @@
"title": "Register",
"title_i18n": "page_dict.person.register",
"theme":"slapos-white",
"children":[
{
"generate": "gadget",
"type": "fieldlist",
"id": "person_view",
"href": "person_view"
}
]
"layout": {
"default": [
{
"generate": "gadget",
"type": "fieldlist",
"id": "person_view",
"href": "person_view"
}
],
"new": [
{
"generate": "gadget",
"type": "fieldlist",
"id": "person_view",
"href": "person_view"
}
]
}
}
]
}
......@@ -9,7 +9,9 @@
"title": "Pricing",
"title_i18n": "page_dict.pricing.title",
"theme": "slapos-white",
"children": []
"layout": {
"default": []
}
}
]
}
......@@ -9,28 +9,51 @@
"title": "Servers",
"title_i18n": "page_dict.servers.title",
"theme": "slapos-white",
"children": [
{
"generate": "gadget",
"type": "listbox",
"id": "computer_overview",
"href": "computer_overview"
}
]
"layout": {
"default": [
{
"generate": "gadget",
"type": "listbox",
"id": "computer_overview",
"href": "computer_overview"
}
]
}
}, {
"generate": "widget",
"type": "page",
"title": "Server Instance",
"title_i18n": "page_dict.servers.instance",
"theme": "slapos-white",
"children": [
{
"generate": "gadget",
"type": "fieldlist",
"id": "computer_view",
"href": "computer_view"
}
]
"layout": {
"default": [
{
"generate": "gadget",
"type": "fieldlist",
"id": "computer_status",
"href": "computer_status"
}
],
"new": [
{
"generate": "gadget",
"type": "fieldlist",
"id": "computer_new",
"href": "computer_new"
}
]
}
}, {
"generate": "widget",
"type": "page",
"title": "Instance Configuration",
"title_i18n": "page_dict.servers.configuration",
"layout": {
"default": [],
"scope": [],
"ssl_on": [],
"ssl_off": []
}
}
]
}
......@@ -9,7 +9,9 @@
"title": "Services",
"title_i18n": "page_dict.services.title",
"theme": "slapos-white",
"children": []
"layout": {
"default": []
}
}
]
}
......@@ -9,35 +9,41 @@
"title": "Software",
"title_i18n": "page_dict.software.title",
"theme": "slapos-white",
"children": [
{
"generate": "gadget",
"type": "listgrid",
"id": "subscription_overview",
"href": "subscription_overview"
}
]
"layout": {
"default": [
{
"generate": "gadget",
"type": "listgrid",
"id": "subscription_overview",
"href": "subscription_overview"
}
]
}
}, {
"generate": "widget",
"type": "page",
"title": "Software",
"title_i18n": "page_dict.software.title",
"theme": "slapos-white",
"children": [
{
"generate": "gadget",
"type": "listbox",
"id": "release_overview",
"href": "release_overview"
}
]
"layout": {
"default": [
{
"generate": "gadget",
"type": "listbox",
"id": "release_overview",
"href": "release_overview"
}
]
}
}, {
"generate": "widget",
"type": "page",
"title": "Release",
"title_i18n": "page_dict.release.title",
"theme": "slapos-white",
"children": []
"layout": {
"default": []
}
}
]
}
{
"portal_type_source": "Software Installation",
"portal_type_title": "installation",
"portal_type_fields": "subscription_fieldlist",
"form": true,
"id": "computer_new",
"property_dict": {
"dynamic_children": [0],
"requires_authentication": true,
"depends_on": "login_state",
"wrap_gadget": 2,
"submit_to": "#servers::__id__"
},
"children": [],
"placeholder_dict": {
"no_auth": {
"text":"Requires authorization.",
"text_i18n":"validation_dict.requires_auth",
"children": [
{
"generate": "widget",
"type": "controlgroup",
"property_dict": {"direction": "horizontal"},
"children": [{
"type": "a",
"direct":{"className":"translate action", "href":"#global-popup"},
"attributes":{
"data-i18n":"global_dict.common_dict.login",
"data-action":"login",
"data-icon":"lock",
"data-rel": "popup"
},
"logic": {"text":"Login"}
}, {
"type": "a",
"direct": {"className":"translate ui-btn-slapos-black", "href": "#person::new"},
"attributes": {
"data-i18n": "global_dict.common_dict.register",
"data-icon": "edit"
},
"logic": {"text":"Register"}
}
]
}
]
}
}
}
......@@ -9,14 +9,16 @@
"title": "Thanks",
"title_i18n": "page_dict.thanks.title",
"theme": "slapos-white",
"children": [
{
"type": "p",
"direct": {"className": "ui-content-element translate responsive"},
"attributes":{"data-i18n":"pages.thanks.description"},
"logic":{"text":"Thanks for registering. You may now use the application."}
}
]
"layout": {
"default": [
{
"type": "p",
"direct": {"className": "ui-content-element translate responsive"},
"attributes":{"data-i18n":"pages.thanks.description"},
"logic":{"text":"Thanks for registering. You may now use the application."}
}
]
}
}
]
}
\ 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