diff --git a/src/schema/jsonSchema.json b/src/schema/jsonSchema.json index a6ef305..8609f49 100644 --- a/src/schema/jsonSchema.json +++ b/src/schema/jsonSchema.json @@ -65,8 +65,8 @@ "description": "List of ports exposed by service", "properties": { "name" : { - "type": "string" - + "type": "string", + "enum": ["metrics","serviceport"] }, "port": { "type": "number" @@ -91,13 +91,16 @@ ] }, "accessPolicies": { - "type": "string", - - "enum": [ - "internetFacing", - "internal", - "officeIp" - ], + "type": "array", + "items": { + "type": "string", + "enum": [ + "internetFacing", + "internal", + "officeIp" + ] + }, + "uniqueItems": true, "minItems": 1, "maxItems": 2 }, @@ -339,7 +342,7 @@ }, "dbNames": { "type": "array", - "enum": [["foo_service","goo"],"goo"] + "enum": [["foo_service"]] } } }, diff --git a/src/schema/uiSchema.json b/src/schema/uiSchema.json index 61be8d2..143af2f 100644 --- a/src/schema/uiSchema.json +++ b/src/schema/uiSchema.json @@ -74,91 +74,85 @@ "label": "Health Check", "elements": [ { - "type": "HorizontalLayout", + "type": "VerticalLayout", "elements": [ { - "type": "Group", - "label": "Liveness Check", - "elements": [ - { - "type":"Control", - "label": "Type", - "scope": "#/properties/deployment/properties/healthCheck/properties/livenessCheck/properties/type" - }, - { - "type":"Control", - "label": "Port", - "scope": "#/properties/deployment/properties/healthCheck/properties/livenessCheck/properties/port" - }, - { - "type":"Control", - "label": "Success Threshold", - "scope": "#/properties/deployment/properties/healthCheck/properties/livenessCheck/properties/successThreshold" - }, - { - "type":"Control", - "label": "Failure Threshold", - "scope": "#/properties/deployment/properties/healthCheck/properties/livenessCheck/properties/failureThreshold" - }, - { - "type":"Control", - "label": "Initial Delay in Seconds", - "scope": "#/properties/deployment/properties/healthCheck/properties/livenessCheck/properties/initialDelaySeconds" - }, - { - "type":"Control", - "label": "Period in Seconds", - "scope": "#/properties/deployment/properties/healthCheck/properties/livenessCheck/properties/periodSeconds" - }, - { - "type":"Control", - "label": "Path", - "scope": "#/properties/deployment/properties/healthCheck/properties/livenessCheck/properties/path" - } - ] - }, + "type": "Group", + "label": "Liveness Check", + "elements": [ + { + "type": "Control", + "label": "Type", + "scope": "#/properties/deployment/properties/healthCheck/properties/livenessCheck/properties/type" + }, + { + "type": "Control", + "label": "Port", + "scope": "#/properties/deployment/properties/healthCheck/properties/livenessCheck/properties/port" + }, + { + "type": "Control", + "label": "Success Threshold", + "scope": "#/properties/deployment/properties/healthCheck/properties/livenessCheck/properties/successThreshold" + }, + { + "type": "Control", + "label": "Failure Threshold", + "scope": "#/properties/deployment/properties/healthCheck/properties/livenessCheck/properties/failureThreshold" + }, + { + "type": "Control", + "label": "Initial Delay in Seconds", + "scope": "#/properties/deployment/properties/healthCheck/properties/livenessCheck/properties/initialDelaySeconds" + }, + { + "type": "Control", + "label": "Period in Seconds", + "scope": "#/properties/deployment/properties/healthCheck/properties/livenessCheck/properties/periodSeconds" + } + ] + }, { "type": "Group", "label": "Readiness Check", "elements": [ { - "type":"Control", + "type": "Control", "label": "Type", "scope": "#/properties/deployment/properties/healthCheck/properties/readinessCheck/properties/type" }, { - "type":"Control", + "type": "Control", "label": "Port", "scope": "#/properties/deployment/properties/healthCheck/properties/readinessCheck/properties/port" }, { - "type":"Control", + "type": "Control", "label": "Success Threshold", "scope": "#/properties/deployment/properties/healthCheck/properties/readinessCheck/properties/successThreshold" }, { - "type":"Control", + "type": "Control", "label": "Failure Threshold", "scope": "#/properties/deployment/properties/healthCheck/properties/readinessCheck/properties/failureThreshold" }, { - "type":"Control", + "type": "Control", "label": "Initial Delay in Seconds", "scope": "#/properties/deployment/properties/healthCheck/properties/readinessCheck/properties/initialDelaySeconds" }, { - "type":"Control", + "type": "Control", "label": "Period in Seconds", "scope": "#/properties/deployment/properties/healthCheck/properties/readinessCheck/properties/periodSeconds" }, { - "type":"Control", + "type": "Control", "label": "Path", "scope": "#/properties/deployment/properties/healthCheck/properties/readinessCheck/properties/path" } ] } - ] } ] @@ -168,28 +162,26 @@ "label": "Alerts", "elements": [ { - "type": "Group", - "label": "Http 4", - "elements": [ - { - "type": "Control", - "label": "Threshold Percent", - "scope": "#/properties/alerts/properties/http4xx/properties/thresholdPercent" - - }, - { - "type": "Control", - "label": "Duration", - "scope": "#/properties/alerts/properties/http4xx/properties/duration" - }, - { - "type": "Control", - "label": "Severity", - "scope": "#/properties/alerts/properties/http4xx/properties/severity" - - } - ] - }, + "type": "Group", + "label": "Http 4", + "elements": [ + { + "type": "Control", + "label": "Threshold Percent", + "scope": "#/properties/alerts/properties/http4xx/properties/thresholdPercent" + }, + { + "type": "Control", + "label": "Duration", + "scope": "#/properties/alerts/properties/http4xx/properties/duration" + }, + { + "type": "Control", + "label": "Severity", + "scope": "#/properties/alerts/properties/http4xx/properties/severity" + } + ] + }, { "type": "Group", "label": "Http 5", @@ -219,7 +211,6 @@ "type": "Control", "label": "Threshold Percent", "scope": "#/properties/alerts/properties/elb4xx/properties/thresholdPercent" - }, { "type": "Control", @@ -230,7 +221,6 @@ "type": "Control", "label": "Severity", "scope": "#/properties/alerts/properties/elb4xx/properties/severity" - } ] }, @@ -242,7 +232,6 @@ "type": "Control", "label": "Threshold Percent", "scope": "#/properties/alerts/properties/elb5xx/properties/thresholdPercent" - }, { "type": "Control", @@ -253,7 +242,6 @@ "type": "Control", "label": "Severity", "scope": "#/properties/alerts/properties/elb5xx/properties/severity" - } ] }, @@ -309,28 +297,20 @@ } ] } - ] }, { "type": "Group", "label": "Extra Resources", - "elements": [ - { - "type": "Categorization", "elements": [ { - "type": "Category", - + "type": "Control", "label": "Environment", - "elements": [ - {"type": "Control", - "scope": "#/properties/extraResources/properties/environment"} - ] + "scope": "#/properties/extraResources/properties/environment" }, { - "type": "Category", + "type": "Group", "label": "Database", "elements": [ { @@ -361,8 +341,7 @@ ] }, { - "type": "Category", - "label": "S3 Bucket", + "type": "Group", "elements": [ { "type": "Control", @@ -371,8 +350,7 @@ ] }, { - "type": "Category", - "label": "AWS Access Policy", + "type": "Group", "elements": [ { "type": "Control", @@ -381,15 +359,14 @@ ] } ] - } - ] + }, { - "type": "Categorization", + "type": "Group", + "label": "hpa", "elements": [ { - "type": "Category", - "label": "Custom Metrics", + "type": "Group", "elements": [ { "type": "Control", @@ -398,8 +375,7 @@ ] }, { - "type": "Category", - "label": "Metrics", + "type": "Group", "elements": [ { "type": "Control", @@ -408,7 +384,7 @@ ] }, { - "type": "Category", + "type": "Group", "label": "Replicas Number", "elements": [ { @@ -421,12 +397,9 @@ "label": "Maximum Replicas", "scope": "#/properties/hpa/properties/maxReplicas" } - ] } ] } - - ] } \ No newline at end of file