Commit c4bc6dee authored by Sven Franck's avatar Sven Franck

updated JSON API to use HTML-elements, JQM-widgets and RenderJS gadgets

parent ea3e4660
[
{
"widget": "popup",
"widget_class": "popup single ui-content",
"global": true,
"id" :"global_popup",
"shadow": "true",
"theme": "slapos-white",
"overlay_theme": "slapos-black"
}, {
"widget": "header",
"widget_class": "",
"global": true,
"fixed": true,
"id": "global_header",
"theme": "slapos-white",
"controls": [{
"widget": "controlgroup",
"widget_class": "",
"direction": "horizontal",
"buttons": [{
"type":"a",
"direct": {"href": "#global_panel", "className":"responsive"},
"attributes": {"data-rel":"panel", "data-icon":"reorder", "data-i18n":""},
"logic": {"text":"Navigate"}
}, {
"type": "a",
"direct": {"href": "#global_popup", "className": "responsive action"},
"attributes": {"data-rel":"popup", "data-action": "tasks", "data-icon":"bell", "data-i18n":""},
"logic": {"text":"Tasks"}
}]
},{
"widget": "controlgroup",
"widget_class": "",
"direction": "horizontal",
"buttons": [{
"type":"a",
"direct": {"href": "#global_popup", "className":"responsive action"},
"attributes": {"data-rel":"popup", "data-action":"login", "data-icon":"user", "data-i18n":""},
"logic": {"text":"Login"}
}, {
"type":"a",
"direct": {"href": "/sven/export/", "className":"responsive"},
"attributes": {"data-icon":"home", "data-i18n":""},
"logic": {"text":"Home"}
}]
}]
}, {
"widget": "footer",
"widget_class": "",
"id": "global_footer",
"type": "navbar",
"type_class":"",
"fixed": true,
"global": true,
"theme": "slapos-white",
"buttons": [
{
"type":"a",
"direct": {"href": "#global_popup", "className":"action translate"},
"attributes": {"data-rel":"popup", "data-action":"browse", "data-transition":"pop", "data-position-to":"window", "data-icon":"compass", "data-iconpos":"top", "data-i18n":""},
"logic": {"text":"Jump"}
}, {
"type":"a",
"direct": {"href": "", "className":"action translate"},
"attributes": {"data-action":"new", "data-icon":"plus", "data-iconpos":"top", "data-i18n":""},
"logic": {"text":"Add"}
}, {
"type":"a",
"direct": {"href": "", "className":"action translate"},
"attributes": {"data-action": "remove", "data-icon":"minus", "data-iconpos":"top", "data-i18n":""},
"logic": {"text":"Remove"}
}, {
"type":"a",
"direct": {"href": "#global_popup", "className":"action translate"},
"attributes": {"data-rel":"popup", "data-action":"action", "data-transition":"pop", "data-position-to":"window", "data-icon":"cog", "data-iconpos":"top", "data-i18n":""},
"logic": {"text":"Action"}
}, {
"type":"a",
"direct": {"href": "#global_popup", "className":"action translate"},
"attributes": {"data-rel":"popup", "data-action":"export", "data-transition":"pop", "data-position-to":"window", "data-icon":"share", "data-iconpos":"top", "data-i18n":""},
"logic": {"text":"Export"}
}
]
}, {
"widget": "panel",
"widget_class": "",
"id": "global_panel",
"global": true,
"theme": "slapos-black",
"elements": [{
"type": "global_search",
"element": {
"type": "input",
"direct": {"id":"global_search"},
"attributes": {"data-enhanced":"true", "data-i18n": "","placeholder":"Search Invoices", "data-icon":"search", "data-action-btn":"true", "data-type":"search", "type":"search"},
"logic":{"clear":"true", "action":"search"}
},
"children":[]
}, {
"widget": "listview",
"widget_class":"",
"theme": "slapos-black",
"element": {
"type": "ul",
"direct": {"className":"listview"},
"attributes": {"data-role":"listview", "data-filter":"true", "data-input":"#global_search"}
},
"children": [
],
"items": [{
"type": "divider",
"text": "Account",
"text_i18n": null
}, {
"type": "item",
"left": {
"img": null,
"icon": "user"
},
"middle": {
"href": "#person",
"href_title": null,
"href_i18n": null,
"title": "Account Info",
"title_i18n": null,
"subtitle": "Registration/Invoicing Info",
"subtitle_i18n": null,
"info": null,
"info_i18n": null
},
"aside": null,
"right": null,
"split": null
}, {
"type": "item",
"left": {
"img": null,
"icon": "file-text-alt"
},
"middle": {
"href": "#invoices",
"href_title": null,
"href_i18n": null,
"title": "Invoices",
"title_i18n": null,
"subtitle": "Invoice Overview",
"subtitle_i18n": null,
"info": null,
"info_i18n": null
},
"aside": null,
"right": null,
"split": null
}, {
"type": "item",
"left": {
"img": null,
"icon": "hdd"
},
"middle": {
"href": "#servers",
"href_title": null,
"href_i18n": null,
"title": "Servers",
"title_i18n": null,
"subtitle": "Server Instances being used",
"subtitle_i18n": null,
"info": null,
"info_i18n": null
},
"aside": null,
"right": null,
"split": null
}, {
"type": "item",
"left": {
"img": null,
"icon": "cogs"
},
"middle": {
"href": "#services",
"href_title": null,
"href_i18n": null,
"title": "Services",
"title_i18n": null,
"subtitle": "Installed Software Administration",
"subtitle_i18n": null,
"info": null,
"info_i18n": null
},
"aside": null,
"right": null,
"split": null
}, {
"type": "item",
"left": {
"img": null,
"icon": "sitemap"
},
"middle": {
"href": "#networks",
"href_title": null,
"href_i18n": null,
"title": "Networks",
"title_i18n": null,
"subtitle": "Network Administration",
"subtitle_i18n": null,
"info": null,
"info_i18n": null
},
"aside": null,
"right": null,
"split": null
}, {
"type": "divider",
"text": "Performance",
"text_i18n": null
}, {
"type": "item",
"left": {
"img": null,
"icon": "bar-chart"
},
"middle": {
"href": "#monitoring",
"href_title": null,
"href_i18n": null,
"title": "Monitoring",
"title_i18n": null,
"subtitle": "Server Status Reports",
"subtitle_i18n": null,
"info": null,
"info_i18n": null
},
"aside": null,
"right": null,
"split": null
}, {
"type": "divider",
"text": "Support",
"text_i18n": ""
}, {
"type": "item",
"left": {
"img": null,
"icon": "question-sign"
},
"middle": {
"href": "help.html",
"href_title": null,
"href_i18n": null,
"title": "Help",
"title_i18n": null,
"subtitle": "Contact Customer Support",
"subtitle_i18n": null,
"info": null,
"info_i18n": null
},
"aside": null,
"right": null,
"split": null
}]
}, {
"type": "listmenu",
"theme": "slapos-black",
"class": null,
"role":"listview",
"items": [{
"type": "divider",
"text": "General",
"text_i18n": null
}, {
"type": "item",
"left": {
"img": null,
"icon": "folder-open-alt"
},
"middle": {
"href": "software.html",
"href_title": null,
"href_i18n": null,
"title": "Software",
"title_i18n": "",
"subtitle": null,
"subtitle_i18n": null,
"info": null,
"info_i18n": null
},
"aside": null,
"right": null,
"split": null
}, {
"type": "item",
"left": {
"img": null,
"icon": "book"
},
"middle": {
"href": "wiki.html",
"href_title": null,
"href_i18n": null,
"title": "Documentation",
"title_i18n": "",
"subtitle": null,
"subtitle_i18n": null,
"info": null,
"info_i18n": null
},
"aside": null,
"right": null,
"split": null
}, {
"type": "item",
"left": {
"img": null,
"icon": "download"
},
"middle": {
"href": "download.html",
"href_title": null,
"href_i18n": null,
"title": "Download",
"title_i18n": "",
"subtitle": null,
"subtitle_i18n": null,
"info": null,
"info_i18n": null
},
"aside": null,
"right": null,
"split": null
}, {
"type": "item",
"left": {
"img": null,
"icon": "comments"
},
"middle": {
"href": "forum.html",
"href_title": null,
"href_i18n": null,
"title": "Forum",
"title_i18n": "",
"subtitle": null,
"subtitle_i18n": null,
"info": null,
"info_i18n": null
},
"aside": null,
"right": null,
"split": null
}, {
"type": "item",
"left": {
"img": null,
"icon": "microphone"
},
"middle": {
"href": "blog.html",
"href_title": null,
"href_i18n": null,
"title": "Blog",
"title_i18n": "",
"subtitle": null,
"subtitle_i18n": null,
"info": null,
"info_i18n": null
},
"aside": null,
"right": null,
"split": null
}, {
"left": {
"img": null,
"icon": "euro"
},
"middle": {
"href": "pricing.html",
"href_title": null,
"href_i18n": null,
"title": "Pricing",
"title_i18n": "",
"subtitle": null,
"subtitle_i18n": null,
"info": null,
"info_i18n": null
},
"aside": null,
"right": null,
"split": null
}]
}, {
"type": "listmenu",
"role": null,
"class": "list mini ",
"theme":null,
"items": [{
"type": "item",
"middle": {
"href":"http://nexedi.com/",
"href_title": null,
"href_i18n": null,
"info": "Nexedi 2013",
"info_i18n": null
}
}]
}]
}
]
[ [
{ {
"type": null, "generate": "widget",
"type": "Page",
"meta": "Index Page", "meta": "Index Page",
"title": "Dashboard", "title": "Dashboard",
"title_i18n": null, "title_i18n": null,
"section_list": [] "children": []
} }
] ]
\ No newline at end of file
[{
"generate": "widget",
"type": "Panel",
"theme": "slapos-black",
"property_dict": {
"close": true
},
"children": [{
"type": "input",
"direct": {"id":"global_search"},
"attributes": {"data-enhanced":"true", "data-i18n": "","placeholder":"Search Invoices", "data-icon":"search", "data-action-btn":"true", "data-type":"search", "type":"search"},
"logic":{"clear":"true", "action":"search"}
}, {
"generate": "widget",
"type": "Listview",
"class_list": null,
"theme": "slapos-black",
"form": null,
"property_dict": {
"filter":"true",
"input": "#global_search"
},
"children": [
{"type": "divider", "center": {"text": [{"type": "h1", "text": "Account", "text_i18n": null}]}},
{"type": "item", "href": "#person", "left": {"icon":"user"}, "center": {"text": [{"type": "h1", "text": "Account Info", "text_i18n": null}, {"type": "p", "text": "Registration/Invoicing Info", "text_i18n": null}]}},
{"type": "item", "href": "#invoices", "left": {"icon":"file-text-alt"}, "center": {"text": [{"type":"h1", "text": "Invoices", "text_i18n": null}, {"type": "p", "text": "Overview of Invoices", "text_i18n":null}]}},
{"type": "item", "href": "#servers", "left": {"icon":"hdd"}, "center": {"text": [{"type":"h1", "text": "Servers", "text_i18n": null}, {"type":"p", "text": "Server instances being used", "text_i18n": null}]}},
{"type": "item", "href": "#services", "left": {"icon":"cogs"}, "center": {"text": [{"type": "h1","text": "Subscriptions", "text_i18n":null},{"type": "p", "text": "Administration of Installed Software", "text_i18n":null}]}},
{"type": "item", "href": "#networks", "left": {"icon":"sitemap"}, "center": {"text":[{"type": "h1", "text": "Networks", "text_i18n": null},{"type": "p", "text":"Network Administration", "text_i18n":null}]}},
{"type": "divider", "center": {"text": [{"type": "h1", "text": "Performance", "text_i18n":null}]}},
{"type": "item", "href": "#monitoring", "left": {"icon":"bar-chart"}, "center": {"text":[{"type":"h1", "text": "Monitoring", "text_i18n":null},{"type":"p", "text": "Server Status Reports", "text_i18n": null}]}},
{"type": "divider", "center": {"text": [{"type": "h1", "text": "Support", "text_i18n": null}]}},
{"type": "item", "href": "#help", "left": {"icon":"question-sign"}, "center": {"text": [{"type": "h1", "text": "Help", "text_i18n": null},{"type": "p", "text": "Contact Customer Support", "text_i18n": null}]}}
]
}, {
"generate": "widget",
"type": "Listview",
"theme": "slapos-black",
"property_dict": {
"filter":"true",
"input": "#global_search"
},
"children": [
{"type": "divider", "center": {"text": [{"type": "h1", "text":"General", "text_i18n":null}]}},
{"type": "item", "left": {"icon":"cogs"}, "center": {"text": [{"type": "h1", "text": "Software", "text_i18n":null}]}},
{"type": "item", "left": {"icon":"book"}, "center": {"text": [{"type": "h1", "text": "Documentation", "text_i18n":null}]}},
{"type": "item", "left": {"icon":"download"}, "center": {"text": [{"type": "h1", "text": "Download", "text_i18n":null}]}},
{"type": "item", "left": {"icon":"comments-alt"}, "center": {"text": [{"type": "h1", "text": "Forum", "text_i18n":null}]}},
{"type": "item", "left": {"icon":"rss-sign"}, "center": {"text": [{"type": "h1", "text": "Blog", "text_i18n":null}]}},
{"type": "item", "left": {"icon":"dollar"}, "center": {"text": [{"type": "h1", "text": "Pricing", "text_i18n":null}]}}
]
}, {
"type": "ul",
"direct": {"className": "list mini"},
"attributes": {},
"logic": {"items":[{"type": "item", "href": "http://nexedi.com", "external": true, "center": {"text": [{"type": "h1", "text": "Nexedi 2013", "text_i18n":null}]}}]}
}]
},{
"generate": "widget",
"type": "Popup",
"class_list": "popup single ui-content",
"theme": "slapos-white",
"property_dict":{
"shadow": true,
"overlay_theme": "slapos-black"
}
}, {
"generate": "widget",
"type": "Header",
"theme": "slapos-white",
"property_dict": {
"fixed": true,
"title": "",
"title_i18n": ""
},
"children": [{
"generate": "widget",
"type": "Controlgroup",
"property_dict": {
"direction": "horizontal"
},
"children": [
{"type":"a", "direct": {"href": "#global_panel", "className":"responsive"}, "attributes": {"data-rel":"panel", "data-icon":"reorder", "data-i18n":""},"logic": {"text":"Navigate"}},
{"type":"a", "direct": {"href": "#global_popup", "className": "responsive action"}, "attributes": {"data-rel":"popup", "data-action": "tasks", "data-icon":"bell", "data-i18n":""}, "logic": {"text":"Tasks"}}
]
}, {
"generate": "widget",
"type": "Controlgroup",
"property_dict": {
"direction": "horizontal"
},
"children": [
{"type":"a", "direct": {"href": "#global_popup", "className":"responsive action"}, "attributes": {"data-rel":"popup", "data-action":"login", "data-icon":"user", "data-i18n":""}, "logic": {"text":"Login"}},
{"type":"a", "direct": {"href": "#dashboard", "className":"responsive"}, "attributes": {"data-icon":"home", "data-i18n":""}, "logic": {"text":"Home"}}
]
}]
}, {
"generate":"widget",
"type": "Footer",
"class_list": "",
"id": "global_footer",
"theme": "slapos-white",
"property_dict": {
"fixed": true
},
"children": [{
"generate": "widget",
"type": "Navbar",
"children": [
{"type":"a", "direct": {"href": "#global_popup", "className":"action translate"}, "attributes": {"data-rel":"popup", "data-action":"browse", "data-transition":"pop", "data-position-to":"window", "data-icon":"compass", "data-iconpos":"top", "data-i18n":""},"logic": {"text":"Jump"}},
{"type":"a", "direct": {"href": "", "className":"action translate"}, "attributes": {"data-action":"new", "data-icon":"plus", "data-iconpos":"top", "data-i18n":""}, "logic": {"text":"Add"}},
{"type":"a", "direct": {"href": "", "className":"action translate"}, "attributes": {"data-action": "remove", "data-icon":"minus", "data-iconpos":"top", "data-i18n":""}, "logic": {"text":"Remove"}},
{"type":"a", "direct": {"href": "#global_popup", "className":"action translate"}, "attributes": {"data-rel":"popup", "data-action":"action", "data-transition":"pop", "data-position-to":"window", "data-icon":"cog", "data-iconpos":"top", "data-i18n":""},"logic": {"text":"Action"}},
{"type":"a", "direct": {"href": "#global_popup", "className":"action translate"}, "attributes": {"data-rel":"popup", "data-action":"export", "data-transition":"pop", "data-position-to":"window", "data-icon":"share", "data-iconpos":"top", "data-i18n":""},"logic": {"text":"Export"}}
]
}]
}]
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
{"type":"a", "direct":{"href":"", "className":"action"}, "attributes":{"data-i18n":"", "data-action":"last", "data-icon":"step-forward", "data-iconpos":"notext"}, "logic":{"text": "Last"}}]} {"type":"a", "direct":{"href":"", "className":"action"}, "attributes":{"data-i18n":"", "data-action":"last", "data-icon":"step-forward", "data-iconpos":"notext"}, "logic":{"text": "Last"}}]}
], ],
"controlbar": [ "controlbar": [
{"global_search": true, "element": {"type": "input", "direct":{"id":"global_search_invoices", "className": "action"},"attributes":{"data-action":"search", "data-enhanced":"true", "data-i18n": "","placeholder":"Search Invoices", "data-icon":"search", "data-type":"search", "type":"search"},"logic":{"clear":"true"}}, "children":[]}, {"global_search": true, "element": {"type": "input", "direct":{"id":"global_search_invoices", "className": "action"},"attributes":{"data-action":"search", "data-enhanced":"true", "data-i18n": "","placeholder":"Search Invoices", "data-icon":"search"},"logic":{"clear":"true"}}, "children":[]},
{"record_info": true, "element": {"type": "div", "direct": {"className":"info"}, "attributes": {"data-info":"records"}}, "children":[]}, {"record_info": true, "element": {"type": "div", "direct": {"className":"info"}, "attributes": {"data-info":"records"}}, "children":[]},
{"select_info": true, "element": {"type": "div", "direct": {"className":"info"}, "attributes": {"data-info":"selected"}}, "children":[]}, {"select_info": true, "element": {"type": "div", "direct": {"className":"info"}, "attributes": {"data-info":"selected"}}, "children":[]},
{"filter_info": true, "element": {"type": "div", "direct": {"className":"info"}, "attributes": {"data-info":"filter"}}, "children":[]} {"filter_info": true, "element": {"type": "div", "direct": {"className":"info"}, "attributes": {"data-info":"filter"}}, "children":[]}
......
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