Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/shibui-2273' into featur…
Browse files Browse the repository at this point in the history
…e/shibui-2273
  • Loading branch information
chasegawa committed Jun 23, 2022
2 parents 2e13660 + 42e6c18 commit 9ddf255
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
{
"type": "object",
"required": [
"name",
"@type",
"xmlId",
"metadataFile"
],
"required": ["name", "@type", "xmlId", "metadataFile"],
"properties": {
"name": {
"title": "label.metadata-provider-name-dashboard-display-only",
Expand Down Expand Up @@ -47,18 +42,21 @@
},
"reloadableMetadataResolverAttributes": {
"type": "object",
"required": ["minRefreshDelay", "maxRefreshDelay"],
"properties": {
"minRefreshDelay": {
"title": "label.min-refresh-delay",
"description": "tooltip.min-refresh-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)?)?$"
"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)?)?$",
"default": "PT5M"
},
"maxRefreshDelay": {
"title": "label.max-refresh-delay",
"description": "tooltip.max-refresh-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)?)?$"
"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)?)?$",
"default": "PT4H"
},
"refreshDelayFactor": {
"title": "label.refresh-delay-factor",
Expand All @@ -71,4 +69,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion backend/src/main/resources/i18n/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ tooltip.retained-roles=Note that property replacement cannot be used on this ele
tooltip.remove-roleless-entity-descriptors=Controls whether to keep entity descriptors that contain no roles. Note: If this attribute is set to false, the resulting output may not be schema-valid since an <md:EntityDescriptor> element must include at least one role descriptor.
tooltip.remove-empty-entities-descriptors=Controls whether to keep entities descriptors that contain no entity descriptors. Note: If this attribute is set to false, the resulting output may not be schema-valid since an <md:EntitiesDescriptor> element must include at least one child element, either an <md:EntityDescriptor> element or an <md:EntitiesDescriptor> element.

tooltip.min-refresh-delay=Lower bound on the next refresh from the time calculated based on the metadata\u0027s expiration.
tooltip.min-refresh-delay=Lower bound on the next refresh from the time calculated based on the metadata\u0027s expiration. Setting this to 0 will result in the default value being used.
tooltip.max-refresh-delay=Upper bound on the next refresh from the time calculated based on the metadata\u0027s expiration.
tooltip.refresh-delay-factor=A factor applied to the initially determined refresh time in order to determine the next refresh time (typically to ensure refresh takes place prior to the metadata\u0027s expiration). Attempts to refresh metadata will generally begin around the product of this number and the maximum refresh delay.
tooltip.resolve-via-predicates-only=Flag indicating whether resolution may be performed solely by applying predicates to the entire metadata collection, when an entityID input criterion is not supplied.
Expand Down
2 changes: 1 addition & 1 deletion backend/src/main/resources/i18n/messages_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ tooltip.retained-roles=Note that property replacement cannot be used on this ele
tooltip.remove-roleless-entity-descriptors=Controls whether to keep entity descriptors that contain no roles. Note: If this attribute is set to false, the resulting output may not be schema-valid since an <md:EntityDescriptor> element must include at least one role descriptor.
tooltip.remove-empty-entities-descriptors=Controls whether to keep entities descriptors that contain no entity descriptors. Note: If this attribute is set to false, the resulting output may not be schema-valid since an <md:EntitiesDescriptor> element must include at least one child element, either an <md:EntityDescriptor> element or an <md:EntitiesDescriptor> element.

tooltip.min-refresh-delay=Lower bound on the next refresh from the time calculated based on the metadata\u0027s expiration.
tooltip.min-refresh-delay=Lower bound on the next refresh from the time calculated based on the metadata\u0027s expiration. Setting this to 0 will result in the default value being used.
tooltip.max-refresh-delay=Upper bound on the next refresh from the time calculated based on the metadata\u0027s expiration.
tooltip.refresh-delay-factor=A factor applied to the initially determined refresh time in order to determine the next refresh time (typically to ensure refresh takes place prior to the metadata\u0027s expiration). Attempts to refresh metadata will generally begin around the product of this number and the maximum refresh delay.
tooltip.resolve-via-predicates-only=Flag indicating whether resolution may be performed solely by applying predicates to the entire metadata collection, when an entityID input criterion is not supplied.
Expand Down
20 changes: 9 additions & 11 deletions ui/public/assets/schema/provider/file-system.schema.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
{
"type": "object",
"required": [
"name",
"@type",
"xmlId",
"metadataFile"
],
"required": ["name", "@type", "xmlId", "metadataFile"],
"properties": {
"name": {
"title": "label.metadata-provider-name-dashboard-display-only",
"description": "tooltip.metadata-provider-name-dashboard-display-only",
"description": "tooltip.metadata-provider-name",
"type": "string",
"widget": {
"id": "string",
Expand All @@ -20,7 +15,7 @@
"title": "label.metadata-provider-type",
"description": "tooltip.metadata-provider-type",
"type": "string",
"const": "FilesystemMetadataResolver"
"default": "FilesystemMetadataResolver"
},
"xmlId": {
"title": "label.xml-id",
Expand All @@ -47,18 +42,21 @@
},
"reloadableMetadataResolverAttributes": {
"type": "object",
"required": ["minRefreshDelay", "maxRefreshDelay"],
"properties": {
"minRefreshDelay": {
"title": "label.min-refresh-delay",
"description": "tooltip.min-refresh-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)?)?$"
"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)?)?$",
"default": "PT5M"
},
"maxRefreshDelay": {
"title": "label.max-refresh-delay",
"description": "tooltip.max-refresh-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)?)?$"
"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)?)?$",
"default": "PT4H"
},
"refreshDelayFactor": {
"title": "label.refresh-delay-factor",
Expand All @@ -71,4 +69,4 @@
}
}
}
}
}
10 changes: 8 additions & 2 deletions ui/public/assets/schema/provider/filebacked-http.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,18 +252,24 @@
"reloadableMetadataResolverAttributes": {
"$id": "reloadableMetadataResolverAttributes",
"type": "object",
"required": [
"minRefreshDelay",
"maxRefreshDelay"
],
"properties": {
"minRefreshDelay": {
"title": "label.min-refresh-delay",
"description": "tooltip.min-refresh-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)?)?$"
"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)?)?$",
"default": "PT5M"
},
"maxRefreshDelay": {
"title": "label.max-refresh-delay",
"description": "tooltip.max-refresh-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)?)?$"
"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)?)?$",
"default": "PT4H"
},
"refreshDelayFactor": {
"title": "label.refresh-delay-factor",
Expand Down
14 changes: 14 additions & 0 deletions ui/src/app/metadata/domain/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,18 @@ export const DurationOptions = [
"PT8H",
"PT12H",
"PT24H"
];

export const RefreshOptions = [
"PT1S",
"PT30S",
"PT1M",
"PT5M",
"PT10M",
"PT30M",
"PT1H",
"PT4H",
"PT8H",
"PT12H",
"PT24H",
];
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import defaultsDeep from 'lodash/defaultsDeep';
import { BaseProviderDefinition, HttpMetadataResolverAttributesSchema, MetadataFilterPluginsSchema } from './BaseProviderDefinition';

import { DurationOptions } from '../../data';
import { DurationOptions, RefreshOptions } from '../../data';
import { BASE_PATH } from '../../../../App.constant';

export const FileBackedHttpMetadataProviderWizard = {
Expand Down Expand Up @@ -155,12 +155,12 @@ export const FileBackedHttpMetadataProviderWizard = {
reloadableMetadataResolverAttributes: {
minRefreshDelay: {
'ui:widget': 'OptionWidget',
options: DurationOptions,
options: RefreshOptions,
'ui:placeholder': 'label.duration'
},
maxRefreshDelay: {
'ui:widget': 'OptionWidget',
options: DurationOptions,
options: RefreshOptions,
'ui:placeholder': 'label.duration'
},
refreshDelayFactor: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import defaultsDeep from 'lodash/defaultsDeep';
import API_BASE_PATH from "../../../../App.constant";
import { BaseProviderDefinition } from "./BaseProviderDefinition";
import { DurationOptions } from '../../data';
import { RefreshOptions } from '../../data';

export const FileSystemMetadataProviderWizard = {
...BaseProviderDefinition,
Expand Down Expand Up @@ -74,12 +74,12 @@ export const FileSystemMetadataProviderWizard = {
reloadableMetadataResolverAttributes: {
minRefreshDelay: {
'ui:widget': 'OptionWidget',
options: DurationOptions,
options: RefreshOptions,
'ui:placeholder': 'label.duration'
},
maxRefreshDelay: {
'ui:widget': 'OptionWidget',
options: DurationOptions,
options: RefreshOptions,
'ui:placeholder': 'label.duration'
},
refreshDelayFactor: {
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/metadata/wizard/MetadataProviderWizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export function MetadataProviderWizard({onSave, loading, block}) {

return (
<>

<div className="row mb-4">
<div className="col-12">
<WizardNav onSave={save}
Expand Down Expand Up @@ -78,6 +77,7 @@ export function MetadataProviderWizard({onSave, loading, block}) {
</div>
</div>
}
<pre>{JSON.stringify(errors, null, 4)}</pre>
</>
);
}

0 comments on commit 9ddf255

Please sign in to comment.