diff --git a/ui/public/assets/schema/provider/dynamic-http.schema.json b/ui/public/assets/schema/provider/dynamic-http.schema.json index 1969c9ab4..24e77122d 100644 --- a/ui/public/assets/schema/provider/dynamic-http.schema.json +++ b/ui/public/assets/schema/provider/dynamic-http.schema.json @@ -1,11 +1,23 @@ { "type": "object", "required": [ + "name", + "@type", "xmlId", - "metadataURL", "metadataRequestURLConstructionScheme" ], "properties": { + "name": { + "title": "label.metadata-provider-name-dashboard-display-only", + "description": "tooltip.metadata-provider-name-dashboard-display-only", + "type": "string" + }, + "@type": { + "title": "label.metadata-provider-type", + "description": "tooltip.metadata-provider-type", + "type": "string", + "const": "DynamicHttpMetadataResolver" + }, "enabled": { "title": "label.enable-provider-upon-saving", "description": "tooltip.enable-provider-upon-saving", @@ -16,7 +28,6 @@ "title": "label.xml-id", "description": "tooltip.xml-id", "type": "string", - "default": "", "minLength": 1 }, "metadataRequestURLConstructionScheme": { @@ -25,6 +36,46 @@ "@type", "content" ], + "dependencies": { + "@type": { + "oneOf": [ + { + "properties": { + "@type": { + "enum": ["Regex"] + }, + "match": { + "title": "label.match", + "description": "tooltip.match", + "type": "string", + "widget": { + "id": "string", + "required": true + } + } + }, + "required": [ + "@type", + "content", + "match" + ] + }, + { + "properties": { + "@type": { + "enum": [ + "MetadataQueryProtocol" + ] + } + }, + "required": [ + "@type", + "content" + ] + } + ] + } + }, "properties": { "@type": { "title": "label.md-request-type", @@ -33,267 +84,101 @@ "widget": { "id": "select" }, - "oneOf": [ - { - "enum": [ - "MetadataQueryProtocol" - ], - "description": "value.md-query-protocol" - }, - { - "enum": [ - "Regex" - ], - "description": "value.regex" - } - ] + "enum": ["MetadataQueryProtocol", "Regex"] }, "content": { "title": "label.md-request-value", "description": "tooltip.md-request-value", "type": "string" - }, - "match": { - "title": "label.match", - "description": "tooltip.match", - "type": "string", - "visibleIf": { - "@type": [ - "Regex" - ] - } } } }, "requireValidMetadata": { "title": "label.require-valid-metadata", "description": "tooltip.require-valid-metadata", - "type": "boolean", - "widget": { - "id": "boolean-radio" - }, - "oneOf": [ - { - "enum": [ - true - ], - "description": "value.true" - }, - { - "enum": [ - false - ], - "description": "value.false" - } - ], - "default": true + "type": "boolean" }, "failFastInitialization": { "title": "label.fail-fast-init", "description": "tooltip.fail-fast-init", - "type": "boolean", - "widget": { - "id": "boolean-radio" - }, - "oneOf": [ - { - "enum": [ - true - ], - "description": "value.true" - }, - { - "enum": [ - false - ], - "description": "value.false" - } - ], - "default": true + "type": "boolean" }, "dynamicMetadataResolverAttributes": { "type": "object", + "dependencies": { + "initializeFromPersistentCacheInBackground": { + "oneOf": [ + { + "properties": { + "initializeFromPersistentCacheInBackground": { + "const": true + }, + "backgroundInitializationFromCacheDelay": { + "title": "label.background-init-from-cache-delay", + "description": "tooltip.background-init-from-cache-delay", + "type": "string", + "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" + } + } + }, + { + "properties": { + "initializeFromPersistentCacheInBackground": { + "const": false + } + } + } + ] + } + }, "properties": { "refreshDelayFactor": { "title": "label.refresh-delay-factor", "description": "tooltip.refresh-delay-factor", "type": "number", - "widget": { - "id": "number", - "step": 0.01 - }, - "placeholder": "label.real-number", - "minimum": 0.01, - "maximum": 0.99, - "default": null + "multipleOf": 0.01, + "minimum": 0.001, + "maximum": 0.999 }, "minCacheDuration": { "title": "label.min-cache-duration", "description": "tooltip.min-cache-duration", "type": "string", - "placeholder": "label.duration", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, - "default": null, "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" }, "maxCacheDuration": { "title": "label.max-cache-duration", "description": "tooltip.max-cache-duration", "type": "string", - "placeholder": "label.duration", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, - "default": null, "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" }, "maxIdleEntityData": { "title": "label.max-idle-entity-data", "description": "tooltip.max-idle-entity-data", "type": "string", - "placeholder": "label.duration", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, - "default": null, "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" }, "removeIdleEntityData": { "title": "label.remove-idle-entity-data", "description": "tooltip.remove-idle-entity-data", - "type": "boolean", - "widget": { - "id": "boolean-radio" - }, - "oneOf": [ - { - "enum": [ - true - ], - "description": "value.true" - }, - { - "enum": [ - false - ], - "description": "value.false" - } - ], - "default": true + "type": "boolean" }, "cleanupTaskInterval": { "title": "label.cleanup-task-interval", "description": "tooltip.cleanup-task-interval", "type": "string", - "placeholder": "label.duration", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, - "default": null, "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" }, "persistentCacheManagerDirectory": { "title": "label.persistent-cache-manager-directory", "description": "tooltip.persistent-cache-manager-directory", "type": "string", - "default": "", "minLength": 1 }, "initializeFromPersistentCacheInBackground": { "title": "label.initialize-from-persistent-cache-in-background", "description": "tooltip.initialize-from-persistent-cache-in-background", - "type": "boolean", - "widget": { - "id": "boolean-radio" - }, - "oneOf": [ - { - "enum": [ - true - ], - "description": "value.true" - }, - { - "enum": [ - false - ], - "description": "value.false" - } - ], - "default": true - }, - "backgroundInitializationFromCacheDelay": { - "title": "label.background-init-from-cache-delay", - "description": "tooltip.background-init-from-cache-delay", - "type": "string", - "placeholder": "label.duration", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, - "visibleIf": { - "initializeFromPersistentCacheInBackground": [ - true - ] - }, - "default": null, - "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" + "type": "boolean" } } }, @@ -355,39 +240,18 @@ "disregardTLSCertificate": { "type": "boolean", "title": "label.disregard-tls-cert", - "description": "tooltip.disregard-tls-cert", - "widget": { - "id": "boolean-radio" - }, - "oneOf": [ - { - "enum": [ - true - ], - "description": "True" - }, - { - "enum": [ - false - ], - "description": "False" - } - ], - "default": false + "description": "tooltip.disregard-tls-cert" }, "httpClientRef": { "type": "string", "title": "", "description": "", - "placeholder": "", - "widget": "hidden", - "default": "" + "widget": "hidden" }, "connectionRequestTimeout": { "type": "string", "title": "label.connection-request-timeout", "description": "tooltip.connection-request-timeout", - "placeholder": "label.duration", "widget": { "id": "datalist", "data": [ @@ -402,14 +266,12 @@ "PT24H" ] }, - "default": null, "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" }, "connectionTimeout": { "type": "string", "title": "label.connection-timeout", "description": "tooltip.connection-timeout", - "placeholder": "label.duration", "widget": { "id": "datalist", "data": [ @@ -424,14 +286,12 @@ "PT24H" ] }, - "default": null, "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" }, "socketTimeout": { "type": "string", "title": "label.socket-timeout", "description": "tooltip.socket-timeout", - "placeholder": "label.duration", "widget": { "id": "datalist", "data": [ @@ -446,58 +306,44 @@ "PT24H" ] }, - "default": null, "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" }, "tlsTrustEngineRef": { "type": "string", "title": "", "description": "", - "placeholder": "", - "widget": "hidden", - "default": "" + "widget": "hidden" }, "httpClientSecurityParametersRef": { "type": "string", "title": "", "description": "", - "placeholder": "", - "widget": "hidden", - "default": "" + "widget": "hidden" }, "proxyHost": { "type": "string", "title": "label.proxy-host", - "description": "tooltip.proxy-host", - "placeholder": "", - "default": "" + "description": "tooltip.proxy-host" }, "proxyPort": { "type": "string", "title": "label.proxy-port", - "description": "tooltip.proxy-port", - "placeholder": "", - "default": "" + "description": "tooltip.proxy-port" }, "proxyUser": { "type": "string", "title": "label.proxy-user", - "description": "tooltip.proxy-user", - "placeholder": "", - "default": "" + "description": "tooltip.proxy-user" }, "proxyPassword": { "type": "string", "title": "label.proxy-password", - "description": "tooltip.proxy-password", - "placeholder": "", - "default": "" + "description": "tooltip.proxy-password" }, "httpCaching": { "type": "string", "title": "label.http-caching", "description": "tooltip.http-caching", - "placeholder": "label.select-caching-type", "widget": { "id": "select" }, @@ -525,23 +371,18 @@ "httpCacheDirectory": { "type": "string", "title": "label.http-caching-directory", - "description": "tooltip.http-caching-directory", - "placeholder": "" + "description": "tooltip.http-caching-directory" }, "httpMaxCacheEntries": { "type": "integer", "title": "label.http-max-cache-entries", "description": "tooltip.http-max-cache-entries", - "placeholder": "", - "default": 0, "minimum": 0 }, "httpMaxCacheEntrySize": { "type": "integer", "title": "label.max-cache-entry-size", "description": "tooltip.max-cache-entry-size", - "placeholder": "", - "default": 0, "minimum": 0 } } @@ -549,9 +390,11 @@ "metadataFilters": { "title": "", "description": "", - "type": "object", - "properties": { - "RequiredValidUntil": { + "type": "array", + "additionalItems": true, + "items": [ + { + "$id": "RequiredValidUntil", "title": "label.required-valid-until", "type": "object", "widget": { @@ -562,27 +405,12 @@ "title": "label.max-validity-interval", "description": "tooltip.max-validity-interval", "type": "string", - "placeholder": "label.duration", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, - "default": null, "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" } } }, - "SignatureValidation": { + { + "$id": "SignatureValidation", "title": "label.signature-validation-filter", "type": "object", "widget": { @@ -592,41 +420,40 @@ "requireSignedRoot": { "title": "label.require-signed-root", "description": "tooltip.require-signed-root", - "type": "boolean", - "default": true + "type": "boolean" }, "certificateFile": { "title": "label.certificate-file", "description": "tooltip.certificate-file", - "type": "string", - "default": "" + "type": "string" } }, - "anyOf": [ - { - "properties": { - "requireSignedRoot": { - "enum": [ - true + "dependencies": { + "requireSignedRoot": { + "oneOf": [ + { + "properties": { + "requireSignedRoot": { + "enum": [true] + } + }, + "required": [ + "certificateFile" ] + }, + { + "properties": { + "requireSignedRoot": { + "enum": [false] + } + } } - }, - "required": [ - "certificateFile" ] - }, - { - "properties": { - "requireSignedRoot": { - "enum": [ - false - ] - } - } } - ] + } }, - "EntityRoleWhiteList": { + { + "$id": "EntityRoleWhiteList", "title": "label.entity-role-whitelist", "type": "object", "widget": { @@ -661,18 +488,16 @@ "removeRolelessEntityDescriptors": { "title": "label.remove-roleless-entity-descriptors", "description": "tooltip.remove-roleless-entity-descriptors", - "type": "boolean", - "default": true + "type": "boolean" }, "removeEmptyEntitiesDescriptors": { "title": "label.remove-empty-entities-descriptors", "description": "tooltip.remove-empty-entities-descriptors", - "type": "boolean", - "default": true + "type": "boolean" } } } - } + ] } } } \ No newline at end of file diff --git a/ui/public/assets/schema/provider/file-system.schema.json b/ui/public/assets/schema/provider/file-system.schema.json index 122f46cc8..38d0d90e3 100644 --- a/ui/public/assets/schema/provider/file-system.schema.json +++ b/ui/public/assets/schema/provider/file-system.schema.json @@ -8,8 +8,8 @@ ], "properties": { "name": { - "title": "label.service-provider-name-dashboard-display-only", - "description": "tooltip.metadata-provider-name", + "title": "label.metadata-provider-name-dashboard-display-only", + "description": "tooltip.metadata-provider-name-dashboard-display-only", "type": "string", "widget": { "id": "string", @@ -19,34 +19,19 @@ "@type": { "title": "label.metadata-provider-type", "description": "tooltip.metadata-provider-type", - "placeholder": "label.select-metadata-type", "type": "string", - "readOnly": true, - "widget": { - "id": "select", - "disabled": true - }, - "oneOf": [ - { - "enum": [ - "FileSystemMetadataResolver" - ], - "description": "value.file-system-metadata-provider" - } - ] + "const": "FilesystemMetadataResolver" }, "xmlId": { "title": "label.xml-id", "description": "tooltip.xml-id", "type": "string", - "default": "", "minLength": 1 }, "metadataFile": { "title": "label.metadata-file", "description": "tooltip.metadata-file", "type": "string", - "default": "", "minLength": 1 }, "enabled": { @@ -58,25 +43,7 @@ "doInitialization": { "title": "label.do-resolver-initialization", "description": "tooltip.do-resolver-initialization", - "type": "boolean", - "widget": { - "id": "boolean-radio" - }, - "oneOf": [ - { - "enum": [ - true - ], - "description": "value.true" - }, - { - "enum": [ - false - ], - "description": "value.false" - } - ], - "default": false + "type": "boolean" }, "reloadableMetadataResolverAttributes": { "type": "object", @@ -85,59 +52,23 @@ "title": "label.min-refresh-delay", "description": "tooltip.min-refresh-delay", "type": "string", - "placeholder": "label.duration", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, - "default": null, "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" }, "maxRefreshDelay": { "title": "label.max-refresh-delay", "description": "tooltip.max-refresh-delay", "type": "string", - "placeholder": "label.duration", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, - "default": null, "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" }, "refreshDelayFactor": { "title": "label.refresh-delay-factor", "description": "tooltip.refresh-delay-factor", - "type": "string", - "widget": { - "id": "string", - "help": "message.real-number" - }, - "placeholder": "label.real-number", - "default": "", - "pattern": "^(?:([0]*(\\.[0-9]+)?|[0]*\\.[0-9]*[1-9][0-9]*)|)$" + "type": "number", + "multipleOf": 0.01, + "minimum": 0.001, + "maximum": 0.999 } } } } -} +} \ No newline at end of file diff --git a/ui/public/assets/schema/provider/filebacked-http.schema.json b/ui/public/assets/schema/provider/filebacked-http.schema.json index 505fe6ebd..7c3984a68 100644 --- a/ui/public/assets/schema/provider/filebacked-http.schema.json +++ b/ui/public/assets/schema/provider/filebacked-http.schema.json @@ -38,21 +38,8 @@ "@type": { "title": "label.metadata-provider-type", "description": "tooltip.metadata-provider-type", - "placeholder": "label.select-metadata-type", "type": "string", - "readOnly": true, - "widget": { - "id": "select", - "disabled": true - }, - "oneOf": [ - { - "enum": [ - "FileBackedHttpMetadataResolver" - ], - "description": "value.file-backed-http-metadata-provider" - } - ] + "const": "FileBackedHttpMetadataResolver" }, "enabled": { "title": "label.enable-service", @@ -77,166 +64,59 @@ "initializeFromBackupFile": { "title": "label.init-from-backup", "description": "tooltip.init-from-backup", - "type": "boolean", - "widget": { - "id": "boolean-radio" - }, - "oneOf": [ - { - "enum": [ - true - ], - "description": "value.true" - }, - { - "enum": [ - false - ], - "description": "value.false" - } - ], - "default": true + "type": "boolean" }, "backingFile": { "title": "label.backing-file", "description": "tooltip.backing-file", - "type": "string", - "default": "" + "type": "string" }, "backupFileInitNextRefreshDelay": { "title": "label.backup-file-init-refresh-delay", "description": "tooltip.backup-file-init-refresh-delay", "type": "string", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, - "default": null, "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" }, "requireValidMetadata": { "title": "label.require-valid-metadata", "description": "tooltip.require-valid-metadata", - "type": "boolean", - "widget": { - "id": "boolean-radio" - }, - "oneOf": [ - { - "enum": [ - true - ], - "description": "value.true" - }, - { - "enum": [ - false - ], - "description": "value.false" - } - ], - "default": true + "type": "boolean" }, "failFastInitialization": { "title": "label.fail-fast-init", "description": "tooltip.fail-fast-init", - "type": "boolean", - "widget": { - "id": "boolean-radio" - }, - "oneOf": [ - { - "enum": [ - true - ], - "description": "value.true" - }, - { - "enum": [ - false - ], - "description": "value.false" - } - ], - "default": true + "type": "boolean" }, "useDefaultPredicateRegistry": { "title": "label.use-default-predicate-reg", "description": "tooltip.use-default-predicate-reg", - "type": "boolean", - "widget": { - "id": "boolean-radio" - }, - "oneOf": [ - { - "enum": [ - true - ], - "description": "value.true" - }, - { - "enum": [ - false - ], - "description": "value.false" - } - ], - "default": true + "type": "boolean" }, "satisfyAnyPredicates": { "$id": "satisfyAnyPredicates", "title": "label.satisfy-any-predicates", "description": "tooltip.satisfy-any-predicates", - "type": "boolean", - "widget": { - "id": "boolean-radio" - }, - "oneOf": [ - { - "enum": [ - true - ], - "description": "value.true" - }, - { - "enum": [ - false - ], - "description": "value.false" - } - ], - "default": false + "type": "boolean" }, "httpMetadataResolverAttributes": { - "$id": "httpMetadataResolverAttributes", "order": [], "type": "object", "fieldsets": [ { - "title": "label.http-connection-attributes", + "title": "label.http-security-attributes", "type": "section", + "class": "col-12", "fields": [ - "connectionRequestTimeout", - "connectionTimeout", - "socketTimeout" + "disregardTLSCertificate" ] }, { - "title": "label.http-security-attributes", + "title": "label.http-connection-attributes", "type": "section", - "class": "col-12", "fields": [ - "disregardTLSCertificate" + "connectionRequestTimeout", + "connectionTimeout", + "socketTimeout" ] }, { @@ -273,18 +153,21 @@ } ], "properties": { + "disregardTLSCertificate": { + "type": "boolean", + "title": "label.disregard-tls-cert", + "description": "tooltip.disregard-tls-cert" + }, "httpClientRef": { "type": "string", "title": "", "description": "", - "placeholder": "", "widget": "hidden" }, "connectionRequestTimeout": { "type": "string", "title": "label.connection-request-timeout", "description": "tooltip.connection-request-timeout", - "placeholder": "label.duration", "widget": { "id": "datalist", "data": [ @@ -305,7 +188,6 @@ "type": "string", "title": "label.connection-timeout", "description": "tooltip.connection-timeout", - "placeholder": "label.duration", "widget": { "id": "datalist", "data": [ @@ -326,7 +208,6 @@ "type": "string", "title": "label.socket-timeout", "description": "tooltip.socket-timeout", - "placeholder": "label.duration", "widget": { "id": "datalist", "data": [ @@ -343,71 +224,42 @@ }, "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" }, - "disregardTLSCertificate": { - "type": "boolean", - "title": "label.disregard-tls-cert", - "description": "tooltip.disregard-tls-cert", - "widget": { - "id": "boolean-radio" - }, - "oneOf": [ - { - "enum": [ - true - ], - "description": "True" - }, - { - "enum": [ - false - ], - "description": "False" - } - ] - }, "tlsTrustEngineRef": { "type": "string", "title": "", "description": "", - "placeholder": "", "widget": "hidden" }, "httpClientSecurityParametersRef": { "type": "string", "title": "", "description": "", - "placeholder": "", "widget": "hidden" }, "proxyHost": { "type": "string", "title": "label.proxy-host", - "description": "tooltip.proxy-host", - "placeholder": "" + "description": "tooltip.proxy-host" }, "proxyPort": { "type": "string", "title": "label.proxy-port", - "description": "tooltip.proxy-port", - "placeholder": "" + "description": "tooltip.proxy-port" }, "proxyUser": { "type": "string", "title": "label.proxy-user", - "description": "tooltip.proxy-user", - "placeholder": "" + "description": "tooltip.proxy-user" }, "proxyPassword": { "type": "string", "title": "label.proxy-password", - "description": "tooltip.proxy-password", - "placeholder": "" + "description": "tooltip.proxy-password" }, "httpCaching": { "type": "string", "title": "label.http-caching", "description": "tooltip.http-caching", - "placeholder": "label.select-caching-type", "widget": { "id": "select" }, @@ -435,21 +287,18 @@ "httpCacheDirectory": { "type": "string", "title": "label.http-caching-directory", - "description": "tooltip.http-caching-directory", - "placeholder": "" + "description": "tooltip.http-caching-directory" }, "httpMaxCacheEntries": { "type": "integer", "title": "label.http-max-cache-entries", "description": "tooltip.http-max-cache-entries", - "placeholder": "", "minimum": 0 }, "httpMaxCacheEntrySize": { "type": "integer", "title": "label.max-cache-entry-size", "description": "tooltip.max-cache-entry-size", - "placeholder": "", "minimum": 0 } } @@ -462,63 +311,25 @@ "title": "label.min-refresh-delay", "description": "tooltip.min-refresh-delay", "type": "string", - "placeholder": "label.duration", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, - "default": null, "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" }, "maxRefreshDelay": { "title": "label.max-refresh-delay", "description": "tooltip.max-refresh-delay", "type": "string", - "placeholder": "label.duration", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, - "default": null, "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" }, "refreshDelayFactor": { "title": "label.refresh-delay-factor", "description": "tooltip.refresh-delay-factor", "type": "number", - "widget": { - "id": "float", - "help": "message.real-number", - "step": 0.01 - }, - "placeholder": "label.real-number", + "multipleOf": 0.01, "minimum": 0.001, "maximum": 0.999 } } }, "metadataFilters": { - "$id": "metadataFilters", "title": "", "description": "", "type": "array", @@ -536,22 +347,6 @@ "title": "label.max-validity-interval", "description": "tooltip.max-validity-interval", "type": "string", - "placeholder": "label.duration", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, - "default": null, "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" } } @@ -567,8 +362,7 @@ "requireSignedRoot": { "title": "label.require-signed-root", "description": "tooltip.require-signed-root", - "type": "boolean", - "default": true + "type": "boolean" }, "certificateFile": { "title": "label.certificate-file", @@ -576,29 +370,33 @@ "type": "string" } }, - "anyOf": [ - { - "properties": { - "requireSignedRoot": { - "enum": [ - true + "dependencies": { + "requireSignedRoot": { + "oneOf": [ + { + "properties": { + "requireSignedRoot": { + "enum": [ + true + ] + } + }, + "required": [ + "certificateFile" ] + }, + { + "properties": { + "requireSignedRoot": { + "enum": [ + false + ] + } + } } - }, - "required": [ - "certificateFile" ] - }, - { - "properties": { - "requireSignedRoot": { - "enum": [ - false - ] - } - } } - ] + } }, { "$id": "EntityRoleWhiteList", @@ -613,37 +411,20 @@ "description": "tooltip.retained-roles", "type": "array", "items": { - "widget": { - "id": "select" - }, - "type": "string", - "oneOf": [ - { - "enum": [ - "SPSSODescriptor" - ], - "description": "value.spdescriptor" - }, - { - "enum": [ - "AttributeAuthorityDescriptor" - ], - "description": "value.attr-auth-descriptor" - } - ] + "enum": ["SPSSODescriptor", "AttributeAuthorityDescriptor"], + "enumNames": ["value.spdescriptor", "value.attr-auth-descriptor"], + "type": "string" } }, "removeRolelessEntityDescriptors": { "title": "label.remove-roleless-entity-descriptors", "description": "tooltip.remove-roleless-entity-descriptors", - "type": "boolean", - "default": true + "type": "boolean" }, "removeEmptyEntitiesDescriptors": { "title": "label.remove-empty-entities-descriptors", "description": "tooltip.remove-empty-entities-descriptors", - "type": "boolean", - "default": true + "type": "boolean" } } } diff --git a/ui/public/assets/schema/provider/local-dynamic.schema.json b/ui/public/assets/schema/provider/local-dynamic.schema.json index 7f465221c..a86dff74b 100644 --- a/ui/public/assets/schema/provider/local-dynamic.schema.json +++ b/ui/public/assets/schema/provider/local-dynamic.schema.json @@ -8,8 +8,8 @@ ], "properties": { "name": { - "title": "label.metadata-provider-name", - "description": "tooltip.metadata-provider-name", + "title": "label.metadata-provider-name-dashboard-display-only", + "description": "tooltip.metadata-provider-name-dashboard-display-only", "type": "string", "widget": { "id": "string", @@ -19,34 +19,19 @@ "@type": { "title": "label.metadata-provider-type", "description": "tooltip.metadata-provider-type", - "placeholder": "label.select-metadata-type", "type": "string", - "readOnly": true, - "widget": { - "id": "select", - "disabled": true - }, - "oneOf": [ - { - "enum": [ - "FileSystemMetadataResolver" - ], - "description": "value.file-system-metadata-provider" - } - ] + "const": "LocalDynamicMetadataResolver" }, "xmlId": { "title": "label.xml-id", "description": "tooltip.xml-id", "type": "string", - "default": "", "minLength": 1 }, "sourceDirectory": { "title": "label.source-directory", "description": "tooltip.source-directory", "type": "string", - "default": "", "minLength": 1 }, "enabled": { @@ -55,116 +40,44 @@ "type": "boolean", "default": false }, - "reloadableMetadataResolverAttributes": { + "dynamicMetadataResolverAttributes": { "type": "object", "properties": { "refreshDelayFactor": { "title": "label.refresh-delay-factor", "description": "tooltip.refresh-delay-factor", "type": "number", - "widget": { - "id": "number", - "step": 0.01 - }, - "placeholder": "label.real-number", - "minimum": 0, - "maximum": 1, - "default": null + "multipleOf": 0.01, + "minimum": 0.001, + "maximum": 0.999 }, "minCacheDuration": { "title": "label.min-cache-duration", "description": "tooltip.min-cache-duration", "type": "string", - "placeholder": "label.duration", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, - "default": null, "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" }, "maxCacheDuration": { "title": "label.max-cache-duration", "description": "tooltip.max-cache-duration", "type": "string", - "placeholder": "label.duration", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, - "default": null, "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" }, "maxIdleEntityData": { "title": "label.max-idle-entity-data", "description": "tooltip.max-idle-entity-data", "type": "string", - "placeholder": "label.duration", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, - "default": null, "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" }, "removeIdleEntityData": { "title": "label.remove-idle-entity-data", "description": "tooltip.remove-idle-entity-data", - "type": "boolean", - "widget": { - "id": "boolean-radio" - }, - "oneOf": [ - { - "enum": [ - true - ], - "description": "value.true" - }, - { - "enum": [ - false - ], - "description": "value.false" - } - ], - "default": true + "type": "boolean" }, "cleanupTaskInterval": { "title": "label.cleanup-task-interval", "description": "tooltip.cleanup-task-interval", "type": "string", - "placeholder": "label.duration", "widget": { "id": "datalist", "data": [ @@ -175,11 +88,11 @@ "PT30M", "PT1H", "PT4H", + "PT8H", "PT12H", "PT24H" ] }, - "default": null, "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" } } diff --git a/ui/public/assets/schema/provider/metadata-provider.schema.json b/ui/public/assets/schema/provider/metadata-provider.schema.json index 5849ec8d8..24d43a8ab 100644 --- a/ui/public/assets/schema/provider/metadata-provider.schema.json +++ b/ui/public/assets/schema/provider/metadata-provider.schema.json @@ -17,7 +17,6 @@ "@type": { "title": "label.metadata-provider-type", "description": "tooltip.metadata-provider-type", - "placeholder": "label.select-metadata-type", "type": "string", "widget": { "id": "select", diff --git a/ui/public/assets/schema/source/metadata-source.json b/ui/public/assets/schema/source/metadata-source.json index cc5860671..0df4739e8 100644 --- a/ui/public/assets/schema/source/metadata-source.json +++ b/ui/public/assets/schema/source/metadata-source.json @@ -44,32 +44,33 @@ "widget": { "id": "fieldset" }, - "fieldsets": [ - { - "type": "group", - "fields": [ - "x509CertificateAvailable", - "authenticationRequestsSigned", - "wantAssertionsSigned" - ] - }, - { - "type": "group", - "fields": [ - "x509Certificates" + "dependencies": { + "authenticationRequestsSigned": { + "oneOf": [ + { + "properties": { + "authenticationRequestsSigned": { + "const": true + }, + "x509Certificates": { + "minItems": 1 + } + } + }, + { + "properties": { + "authenticationRequestsSigned": { + "const": false + }, + "x509Certificates": { + "minItems": 0 + } + } + } ] } - ], + }, "properties": { - "x509CertificateAvailable": { - "title": "label.is-there-a-x509-certificate", - "description": "tooltip.is-there-a-x509-certificate", - "type": "boolean", - "enumNames": [ - "value.true", - "value.false" - ] - }, "authenticationRequestsSigned": { "title": "label.authentication-requests-signed", "description": "tooltip.authentication-requests-signed", @@ -107,24 +108,11 @@ }, "serviceProviderSsoDescriptor": { "type": "object", - "fieldsets": [ - { - "type": "group", - "fields": [ - "protocolSupportEnum", - "nameIdFormats" - ] - } - ], - "required": [ - "nameIdFormats" - ], "properties": { "protocolSupportEnum": { "title": "label.protocol-support-enumeration", "description": "tooltip.protocol-support-enumeration", "type": "string", - "placeholder": "label.select-protocol", "widget": { "id": "select" }, @@ -146,6 +134,9 @@ "nameIdFormats": { "$ref": "#/definitions/nameIdFormats" } + }, + "dependencies": { + "nameIdFormats": ["protocolSupportEnum"] } }, "logoutEndpoints": { diff --git a/ui/src/app/form/component/templates/ArrayFieldTemplate.js b/ui/src/app/form/component/templates/ArrayFieldTemplate.js index 67e291f59..3163c841a 100644 --- a/ui/src/app/form/component/templates/ArrayFieldTemplate.js +++ b/ui/src/app/form/component/templates/ArrayFieldTemplate.js @@ -136,10 +136,13 @@ const DefaultArrayItem = (props) => { paddingRight: 6, fontWeight: "bold", }; + + const uiSchemaOptions = props.uiSchema ? props.uiSchema['ui:options'] || {} : {}; + return ( -
{JSON.stringify(data, null, 4)}+
{JSON.stringify(data, null, 4)}+
{JSON.stringify(schema, null, 4)}+