improve JSON logic with tabs
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/1c893e6c Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/1c893e6c Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/1c893e6c Branch: refs/heads/master Commit: 1c893e6caea6636b400ea05c805bb56a1788dc2c Parents: daabf06 Author: Dakshika Jayathilaka <[email protected]> Authored: Fri Apr 10 17:13:44 2015 +0530 Committer: Imesh Gunaratne <[email protected]> Committed: Fri Apr 17 13:59:58 2015 +0530 ---------------------------------------------------------------------- .../schema/configure/applicationpolicies.json | 2 + .../schema/configure/autoscalingpolicies.json | 4 +- .../forms/schema/configure/cartridges.json | 5 + .../schema/configure/deploymentpolicies.json | 5 +- .../forms/schema/configure/docker.json | 145 +++++++++++++++---- .../forms/schema/configure/partitions.json | 6 + 6 files changed, 138 insertions(+), 29 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/1c893e6c/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/applicationpolicies.json ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/applicationpolicies.json b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/applicationpolicies.json index 8113dd5..b5297e0 100644 --- a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/applicationpolicies.json +++ b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/applicationpolicies.json @@ -27,6 +27,7 @@ "type": "array", "title": "Network Partitions ", "name": "Network Partitions", + "format":"tabs", "items": { "id": "root/networkPartitions/0", "type": "string", @@ -39,6 +40,7 @@ "type": "array", "title": "Properties ", "name": "Properties", + "format":"tabs", "items": [ { "id": "root/properties/0", http://git-wip-us.apache.org/repos/asf/stratos/blob/1c893e6c/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/autoscalingpolicies.json ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/autoscalingpolicies.json b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/autoscalingpolicies.json index dde614d..387a770 100644 --- a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/autoscalingpolicies.json +++ b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/autoscalingpolicies.json @@ -23,7 +23,8 @@ "id": "root/description", "title": "Description", "name": "Description", - "maxItems":1 + "maxItems":1, + "format": "textarea" }, "isPublic": { "type":"boolean", @@ -49,6 +50,7 @@ "options": { "disable_properties": true }, + "format":"grid", "properties":{ "requestsInFlight": { "type":"object", http://git-wip-us.apache.org/repos/asf/stratos/blob/1c893e6c/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/cartridges.json ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/cartridges.json b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/cartridges.json index 9ceb33f..c20de4c 100644 --- a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/cartridges.json +++ b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/cartridges.json @@ -117,6 +117,7 @@ "options": { "collapsed": true }, + "format": "tabs", "items": [ { "type": "object", @@ -194,6 +195,7 @@ "options": { "collapsed": true }, + "format":"tabs", "items": { "type": "object", "id": "root/iaasProvider/0", @@ -223,6 +225,7 @@ "title": "Property", "name": "Property", "required": false, + "format":"tabs", "items": [ { "type": "object", @@ -274,6 +277,7 @@ "title": "Network Interfaces", "name": "Network Interfaces", "required":true, + "format":"tabs", "items":[ { "type":"object", @@ -338,6 +342,7 @@ "id": "root/persistence/volume", "title": "Volume", "name": "Volume", + "format":"tabs", "items": { "type": "object", "id": "root/persistence/volume/0", http://git-wip-us.apache.org/repos/asf/stratos/blob/1c893e6c/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/deploymentpolicies.json ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/deploymentpolicies.json b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/deploymentpolicies.json index b6222bb..396a26b 100644 --- a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/deploymentpolicies.json +++ b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/deploymentpolicies.json @@ -12,12 +12,13 @@ "id": { "id": "root/id", "type": "string", - "title":"Deployment policy ID" + "title":"Deployment Policy ID" }, "networkPartitions": { "id": "root/networkPartitions", "title":"Network Partitions", "type": "array", + "format":"tabs", "items": { "id": "root/networkPartitions/0", "type": "object", @@ -39,6 +40,7 @@ "id": "root/networkPartitions/0/partitions", "type": "array", "title":"Partitions", + "format":"tabs", "items": { "id": "root/networkPartitions/0/partitions/0", "type": "object", @@ -52,6 +54,7 @@ "partitionMax": { "id": "root/networkPartitions/0/partitions/0/partitionMax", "type": "integer", + "title":"Partition Max", "format": "number" } } http://git-wip-us.apache.org/repos/asf/stratos/blob/1c893e6c/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/docker.json ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/docker.json b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/docker.json index 24f356d..865a0e6 100644 --- a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/docker.json +++ b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/docker.json @@ -5,73 +5,101 @@ "title": "Kubernetes Definition", "name": "Kubernetes", "properties":{ - "description": { - "type":"string", - "id": "root/description", - "default": "Kubernetes CoreOS cluster on EC2 ", - "required":false - }, "clusterId": { "type":"string", "id": "root/clusterId", "default": "KubGrp1", - "required":false + "required":false, + "title": "Kubernetes Cluster Id", + "name": "Kubernetes Cluster Id", + }, + "description": { + "type":"string", + "id": "root/description", + "default": "Kubernetes CoreOS cluster on EC2 ", + "required":false, + "title": "Description", + "name": "Description", + "format":"textarea" }, "kubernetesHosts": { "type":"array", "id": "root/kubernetesHosts", "required":false, + "title": "Kubernetes Hosts", + "name": "Kubernetes Hosts", + "format":"tabs", "items":[ { "type":"object", "id": "root/kubernetesHosts/0", "required":false, + "title": "Kubernetes Host", + "name": "Kubernetes Host", "properties":{ "hostId": { "type":"string", "id": "root/kubernetesHosts/0/hostId", "default": "KubHostSlave1", - "required":false + "required":false, + "title": "Host Id", + "name": "Host Id" }, "privateIPAddress": { "type":"string", "id": "root/kubernetesHosts/0/privateIPAddress", "default": "172.17.8.101", - "required":true + "required":true, + "title": "Private IP Address", + "name": "Private IP Address" }, "publicIPAddress": { "type":"string", "id": "root/kubernetesHosts/0/publicIPAddress", "default": "172.17.8.101", - "required":false + "required":false, + "title": "Public IP Address", + "name": "Public IP Address" }, "hostname": { "type":"string", "id": "root/kubernetesHosts/0/hostname", "default": "slave1.dev.kubernetes.example.org", - "required":false + "required":false, + "title": "Hostname", + "name": "Hostname" }, "property": { "type":"array", "id": "root/kubernetesHosts/0/property", "required":false, + "title": "Property", + "name": "Property", + "format":"tabs", "items":[ { "type":"object", "id": "root/kubernetesHosts/0/property/0", "required":false, + "title": "Property", + "name": "Property", "properties":{ "name": { "type":"string", "id": "root/kubernetesHosts/0/property/0/name", "default": "prop1", - "required":false + "required":false, + "uniqueItems": true, + "title": "Name", + "name": "Name", }, "value": { "type":"string", "id": "root/kubernetesHosts/0/property/0/value", "default": "val1", - "required":false + "required":false, + "title": "Value", + "name": "Value", } } }, @@ -79,18 +107,25 @@ "type":"object", "id": "root/kubernetesHosts/0/property/1", "required":false, + "title": "Property", + "name": "Property", "properties":{ "name": { "type":"string", "id": "root/kubernetesHosts/0/property/1/name", "default": "prop2", - "required":false + "uniqueItems": true, + "required":false, + "title": "Name", + "name": "Name", }, "value": { "type":"string", "id": "root/kubernetesHosts/0/property/1/value", "default": "val2", - "required":false + "required":false, + "title": "Value", + "name": "Value", } } } @@ -102,52 +137,71 @@ "type":"object", "id": "root/kubernetesHosts/1", "required":false, + "title": "Kubernetes Host", + "name": "Kubernetes Host", "properties":{ "hostId": { "type":"string", "id": "root/kubernetesHosts/1/hostId", "default": "KubHostSlave2", - "required":false + "required":false, + "title": "Host Id", + "name": "Host Id" }, "privateIPAddress": { "type":"string", "id": "root/kubernetesHosts/1/privateIPAddress", "default": "172.17.8.102", - "required":true + "required":true, + "title": "Private IP Address", + "name": "Private IP Address" }, "publicIPAddress": { "type":"string", "id": "root/kubernetesHosts/0/publicIPAddress", "default": "172.17.8.102", - "required":false + "required":false, + "title": "Public IP Address", + "name": "Public IP Address" }, "hostname": { "type":"string", "id": "root/kubernetesHosts/1/hostname", "default": "slave2.dev.kubernetes.example.org", - "required":false + "required":false, + "title": "Hostname", + "name": "Hostname" }, "property": { "type":"array", "id": "root/kubernetesHosts/1/property", "required":false, + "title": "Property", + "name": "Property", + "format":"tabs", "items":[ { "type":"object", "id": "root/kubernetesHosts/1/property/0", "required":false, + "title": "Property", + "name": "Property", "properties":{ "name": { "type":"string", "id": "root/kubernetesHosts/1/property/0/name", "default": "prop1", - "required":false + "required":false, + "title": "Name", + "name": "Name" }, "value": { "type":"string", "id": "root/kubernetesHosts/1/property/0/value", "default": "val1", - "required":false + "required":false, + "title": "Value", + "name": "Value" } } }, @@ -155,18 +209,24 @@ "type":"object", "id": "root/kubernetesHosts/1/property/1", "required":false, + "title": "Property", + "name": "Property", "properties":{ "name": { "type":"string", "id": "root/kubernetesHosts/1/property/1/name", "default": "prop2", - "required":false + "required":false, + "title": "Name", + "name": "Name" }, "value": { "type":"string", "id": "root/kubernetesHosts/1/property/1/value", "default": "val2", - "required":false + "required":false, + "title": "Value", + "name": "Value" } } } @@ -180,40 +240,55 @@ "type":"object", "id": "root/kubernetesMaster", "required":false, + "title": "Kubernetes Master", + "name": "Kubernetes Master", "properties":{ "hostId": { "type":"string", "id": "root/kubernetesMaster/hostId", "default": "KubHostMaster1", - "required":false + "required":false, + "title": "Host Id", + "name": "Host Id" }, "privateIPAddress": { "type":"string", "id": "root/kubernetesMaster/privateIPAddress", "default": "172.17.8.100", - "required":true + "required":true, + "title": "Private IP Address", + "name": "Private IP Address" }, "publicIPAddress": { "type":"string", "id": "root/kubernetesMaster/publicIPAddress", "default": "172.17.8.100", - "required":false + "required":false, + "title": "Public IP Address", + "name": "Public IP Address" }, "hostname": { "type":"string", "id": "root/kubernetesMaster/hostname", "default": "master.dev.kubernetes.example.org", - "required":false + "required":false, + "title": "Hostname", + "name": "Hostname" }, "property": { "type":"array", "id": "root/kubernetesMaster/property", "required":false, + "title": "Property", + "name": "Property", + "format":"tabs", "items":[ { "type":"object", "id": "root/kubernetesMaster/property/0", "required":false, + "title": "Property", + "name": "Property", "properties":{ "name": { "type":"string", @@ -233,6 +308,8 @@ "type":"object", "id": "root/kubernetesMaster/property/1", "required":false, + "title": "Property", + "name": "Property", "properties":{ "name": { "type":"string", @@ -256,17 +333,24 @@ "type":"object", "id": "root/portRange", "required":false, + "title": "Port Range", + "name": "Port Range", + "format":"grid", "properties":{ "lower": { "type":"string", "id": "root/portRange/lower", "default": "4500", + "title": "Lower", + "name": "Lower", "required":false }, "upper": { "type":"string", "id": "root/portRange/upper", "default": "5000", + "title": "Upper", + "name": "Upper", "required":false } } @@ -275,11 +359,16 @@ "type":"array", "id": "root/property", "required":false, + "title": "Property", + "name": "Property", + "format":"tabs", "items":[ { "type":"object", "id": "root/property/0", "required":false, + "title": "Property", + "name": "Property", "properties":{ "name": { "type":"string", @@ -299,6 +388,8 @@ "type":"object", "id": "root/property/1", "required":false, + "title": "Property", + "name": "Property", "properties":{ "name": { "type":"string", http://git-wip-us.apache.org/repos/asf/stratos/blob/1c893e6c/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/partitions.json ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/partitions.json b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/partitions.json index 674c5cb..2f6e3dc 100644 --- a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/partitions.json +++ b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/partitions.json @@ -23,6 +23,7 @@ "partitions": { "id": "root/partitions", "type": "array", + "format":"tabs", "title":"Partitions", "items": { "id": "root/partitions/0", @@ -37,16 +38,21 @@ "property": { "id": "root/partitions/0/property", "type": "array", + "title":"Property", + "format":"tabs", "items": { "id": "root/partitions/0/property/0", "type": "object", + "title":"Property", "properties": { "name": { "id": "root/partitions/0/property/0/name", + "title":"Name", "type": "string" }, "value": { "id": "root/partitions/0/property/0/value", + "title":"Value", "type": "string" } }
