Commit 86d59f3f authored by Sven Franck's avatar Sven Franck

updated JSON API to handle offline

parent 9644dd5c
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
"portal_type_source": "Computer", "portal_type_source": "Computer",
"portal_type_title": "computer", "portal_type_title": "computer",
"portal_type_fields": "computer_fieldlist", "portal_type_fields": "computer_fieldlist",
"portal_type_mapper": "servers",
"initial_query": {"include_docs": true, "limit":[0,1]}, "initial_query": {"include_docs": true, "limit":[0,1]},
"form": true, "form": true,
"view": "web_view", "view": "web_view",
......
...@@ -2,35 +2,32 @@ ...@@ -2,35 +2,32 @@
"portal_type_source": "Computer", "portal_type_source": "Computer",
"portal_type_title": "computer", "portal_type_title": "computer",
"portal_type_fields": "computer_fieldlist", "portal_type_fields": "computer_fieldlist",
"portal_type_mapper": "servers",
"initial_query": {"include_docs": true, "limit":[0,8]}, "initial_query": {"include_docs": true, "limit":[0,8]},
"form": true, "form": true,
"view": "web_view", "view": "web_view",
"property_dict": { "property_dict": {
"initial_query_url_identifier": "_id", "initial_query_url_identifier": "_id",
"dynamic_children": [1], "dynamic_children": [2],
"requires_authentication": true, "requires_authentication": true,
"depends_on": "login_state", "depends_on": "login_state",
"wrap_gadget": 2, "wrap_gadget": 2,
"link": true, "link": true,
"link_identifier": "_id", "link_identifier": "_id",
"editable": null, "editable": null,
"sortable": true,
"caption": { "caption": {
"slot": 1, "slot": 2,
"text": "Created Servers", "text": "Created Servers",
"text_i18n": "portal_type_dict.computer_dict.text_dict.created_servers" "text_i18n": "portal_type_dict.computer_dict.text_dict.created_servers"
}, },
"pagination": { "pagination": {
"slot": 2, "slot": 4,
"option_list": [ "option_list": [
{"value": "8", "text": "8", "text_i18n":"portal_type_dict.computer_dict.text_dict.8"}, {"value": "8", "text": "8", "text_i18n":"portal_type_dict.computer_dict.text_dict.8"},
{"value": "16", "text": "16", "text_i18n":"portal_type_dict.computer_dict.text_dict.16"}, {"value": "16", "text": "16", "text_i18n":"portal_type_dict.computer_dict.text_dict.16"},
{"value": "32", "text": "32", "text_i18n":"portal_type_dict.computer_dict.text_dict.32"}, {"value": "32", "text": "32", "text_i18n":"portal_type_dict.computer_dict.text_dict.32"},
{"value": "64", "text": "64", "text_i18n":"portal_type_dict.computer_dict.text_dict.64"} {"value": "64", "text": "64", "text_i18n":"portal_type_dict.computer_dict.text_dict.64"}
] ]
},
"url_pointer": {
"jump": "current_computer"
} }
}, },
"scheme": [ "scheme": [
...@@ -38,7 +35,7 @@ ...@@ -38,7 +35,7 @@
"position": "header", "position": "header",
"fieldlist": [ "fieldlist": [
{"custom": true, "text": "Status", "text_i18n": "portal_type_dict.computer_dict.text_dict.status", "show": true, "priority": 1}, {"custom": true, "text": "Status", "text_i18n": "portal_type_dict.computer_dict.text_dict.status", "show": true, "priority": 1},
{"field": "title", "show": true, "priority": 1, "sort": true}, {"field": "title", "show": true, "priority": 1},
{"field": "reference", "show": true, "priority": 4}, {"field": "reference", "show": true, "priority": 4},
{"field": "translated_validation_state_title", "show": "true", "priority": 4} {"field": "translated_validation_state_title", "show": "true", "priority": 4}
] ]
...@@ -47,7 +44,7 @@ ...@@ -47,7 +44,7 @@
"position": "body", "position": "body",
"fieldlist": [ "fieldlist": [
{"custom": true, "show": true, "priority": 1, "status": true}, {"custom": true, "show": true, "priority": 1, "status": true},
{"field": "title", "show": true, "priority": 1, "sort": true}, {"field": "title", "show": true, "priority": 1},
{"field": "reference", "show": true, "priority": 4}, {"field": "reference", "show": true, "priority": 4},
{"field": "translated_validation_state_title", "show": "true", "priority": 4} {"field": "translated_validation_state_title", "show": "true", "priority": 4}
] ]
...@@ -61,6 +58,11 @@ ...@@ -61,6 +58,11 @@
"data-icon": "edit" "data-icon": "edit"
}, },
"logic": {"text":"New Server"} "logic": {"text":"New Server"}
}, {
"generate": "widget",
"type": "controlbar",
"property_dict": {"slot": 1},
"children": [{"type": "a", "direct": {"className": "action ui-btn ui-btn-icon-left ui-icon-sitemap ui-shadow ui-corner-all","href":"#global-popup"},"attributes": {"data-rel":"popup"},"logic": {"text":"Group"}}]
}, { }, {
"generate": "widget", "generate": "widget",
"type": "table", "type": "table",
...@@ -69,7 +71,7 @@ ...@@ -69,7 +71,7 @@
"mode": "columntoggle", "mode": "columntoggle",
"toggle_popup": false, "toggle_popup": false,
"wrap": "both", "wrap": "both",
"top_grid": 1, "top_grid": 3,
"bottom_grid": 1 "bottom_grid": 1
}, },
"children": [] "children": []
......
...@@ -11,7 +11,10 @@ ...@@ -11,7 +11,10 @@
"requires_authentication": true, "requires_authentication": true,
"depends_on": "login_state", "depends_on": "login_state",
"wrap_gadget": 2, "wrap_gadget": 2,
"submit_to": "#servers/__id__/ssl" "submit_to": "#servers/__id__/ssl",
"url_pointer": {
"request_ssl": "generate_certificate"
}
}, },
"scheme": [], "scheme": [],
"children": [{ "children": [{
......
...@@ -11,7 +11,10 @@ ...@@ -11,7 +11,10 @@
"requires_authentication": true, "requires_authentication": true,
"depends_on": "login_state", "depends_on": "login_state",
"wrap_gadget": 2, "wrap_gadget": 2,
"submit_to": "#servers" "submit_to": "#servers",
"url_pointer": {
"revoke_ssl": "revoke_certificate"
}
}, },
"scheme": [ "scheme": [
{ {
......
...@@ -11,7 +11,10 @@ ...@@ -11,7 +11,10 @@
"requires_authentication": true, "requires_authentication": true,
"depends_on": "login_state", "depends_on": "login_state",
"wrap_gadget": 2, "wrap_gadget": 2,
"submit_to": "#servers/__id__" "submit_to": "#servers/__id__",
"url_pointer": {
"update_scope": "update_allocation_scope"
}
}, },
"scheme": [ "scheme": [
{ {
......
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
"dynamic_children": [0], "dynamic_children": [0],
"requires_authentication": true, "requires_authentication": true,
"depends_on": "login_state", "depends_on": "login_state",
"url_pointer": {} "url_pointer": {},
"submit_to": "#servers/__id__"
}, },
"scheme": [ "scheme": [
{ {
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
{"field": "total_price", "show": true, "persist": true, "sort":false}, {"field": "total_price", "show": true, "persist": true, "sort":false},
{"field": "price_currency", "show": "true", "priority": 4, "merge": "total_price"}, {"field": "price_currency", "show": "true", "priority": 4, "merge": "total_price"},
{"field": "translated_simulation_state_title", "show":"true", "priority": 5}, {"field": "translated_simulation_state_title", "show":"true", "priority": 5},
{"custom": true, "show": true, "persist": true, "sort": false, "action_list": [{"class_list": "action translate", "action": "get", "icon":"file-alt", "text": "Download", "text_i18n":"portable_type_dict.invoice_dict.download"}]} {"custom": true, "show": true, "persist": true, "sort": false, "action_list": [{"class_list": "action translate", "action": "download", "icon":"file-alt", "text": "Download", "text_i18n":"portable_type_dict.invoice_dict.download"}]}
] ]
} }
], ],
......
...@@ -25,29 +25,19 @@ ...@@ -25,29 +25,19 @@
"type": "controlgroup", "type": "controlgroup",
"property_dict": {}, "property_dict": {},
"children": [ "children": [
{"type": "a", "direct":{"className":"signin_google action", "href":""}, "attributes":{"data-action":"login_user", "data-icon":"google-plus-sign", "data-iconpos":"left", "data-reference": "google"}, "logic": {"text":"Google"}} {"type": "a", "direct":{"className":"signin_google", "href":"//slapos.vifib.com/intent/login/google"}, "attributes":{"rel": "external", "data-icon":"google-plus-sign", "data-iconpos":"left", "data-reference": "google"}, "logic": {"text":"Google", "setParam": ["callback_url", "location"]}},
] {"type": "a", "direct":{"className":"signin_fb", "href":"//slapos.vifib.com/intent/login/facebook"}, "attributes":{"rel":"external", "data-icon":"facebook-sign", "data-iconpos":"left", "data-reference": "facebook"}, "logic": {"text":"Facebook", "setParam": ["callback_url", "location"]}}
}, {
"type": "p",
"direct": {"className": "mini"},
"children": [
{
"type": "span",
"direct": {"className": "translate"},
"attributes": {"data-i18n": "global_dict.pricing_login"},
"logic": {"text": "To maintain sufficient resources, a minimal fee of 1 EUR will be charged if you use SlapOS services for more than 24 hours. By clicking on one of the signup buttons, you agree that you are subscribing to a payable service. All services you request will be invoiced to you at the end of the month."}
}
] ]
}, { }, {
"type": "p", "type": "p",
"direct": {"className": "translate"}, "direct": {"className": "translate"},
"attributes": {"data-i18n": "global_dict.find_out_more"}, "attributes": {"data-i18n": "global_dict.classic_login"},
"logic": {"text": "To find out more, please refer to"} "logic": {"text": "Or use the default login form"}
}, { }, {
"type": "a", "type": "a",
"direct": {"className": "translate ui-btn ui-icon-dollar ui-btn-icon-left ui-shadow ui-corner-all", "href": "#pricing"}, "direct": {"className": "translate ui-btn ui-icon-lock ui-btn-icon-left ui-shadow ui-corner-all", "href": "//slapos.vifib.com/traditional_login_form"},
"attributes": {"data-i18n": "global_dict.slapos_pricing"}, "attributes": {"data-i18n": "global_dict.classic_slapos"},
"logic": {"text": "SlapOS Pricing"} "logic": {"text": "Login/Password"}
} }
] ]
} }
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
"direction": "horizontal" "direction": "horizontal"
}, },
"children": [ "children": [
{"type": "input", "direct": {"value": "Update My Credentials", "className": "action translate"}, "attributes": {"type": "submit", "data-action":"add", "data-i18n":"[value]portal_type_dict.person_dict.text_dict.submit", "data-theme": "slapos-black"}} {"type": "input", "direct": {"value": "Update My Credentials", "className": "action translate"}, "attributes": {"type": "submit", "data-action":"update", "data-i18n":"[value]portal_type_dict.person_dict.text_dict.submit", "data-theme": "slapos-black"}}
] ]
}] }]
} }
......
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