-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/SHIBUI-2268-ui' into feature/shibui-2268
Former-commit-id: f7f12c07164ec735b0761a4fc2c43dd6b9a079a3
- Loading branch information
Showing
5 changed files
with
156 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| { | ||
| "type": "object", | ||
| "required": ["name"], | ||
| "properties": { | ||
| "name": { | ||
| "title": "label.filter-name", | ||
| "description": "tooltip.filter-name", | ||
| "type": "string" | ||
| }, | ||
| "filterEnabled": { | ||
| "title": "label.enable-filter", | ||
| "description": "tooltip.enable-filter", | ||
| "type": "boolean", | ||
| "default": false | ||
| }, | ||
| "algorithmFilterTarget": { | ||
| "title": "label.search-criteria", | ||
| "description": "tooltip.search-criteria", | ||
| "type": "object", | ||
| "properties": { | ||
| "algorithmFilterTargetType": { | ||
| "title": "label.filter-target-type", | ||
| "type": "string", | ||
| "default": "ENTITY", | ||
| "enum": ["ENTITY", "REGEX", "CONDITION_SCRIPT"], | ||
| "enumNames": [ | ||
| "value.entity-id", | ||
| "value.regex", | ||
| "value.script" | ||
| ] | ||
| }, | ||
| "value": { | ||
| "title": "label.filter-target-value", | ||
| "type": "array", | ||
| "minItems": 1, | ||
| "uniqueItems": true, | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| } | ||
| }, | ||
| "required": ["value", "algorithmFilterTargetType"] | ||
| }, | ||
| "@type": { | ||
| "type": "string", | ||
| "default": "NameIDFormat" | ||
| }, | ||
| "version": { | ||
| "type": "integer" | ||
| }, | ||
| "algorithm": { | ||
| "title": "label.algorithm", | ||
| "description": "tooltip.algorithm", | ||
| "type": "string", | ||
| "enum": [ | ||
| "http://www.w3.org/2009/xmlenc11#aes256-gcm", | ||
| "http://www.w3.org/2009/xmlenc11#aes192-gcm", | ||
| "http://www.w3.org/2009/xmlenc11#aes128-gcm", | ||
| "http://www.w3.org/2001/04/xmlenc#aes256-cbc", | ||
| "http://www.w3.org/2001/04/xmlenc#aes192-cbc", | ||
| "http://www.w3.org/2001/04/xmlenc#aes128-cbc", | ||
| "http://www.w3.org/2001/04/xmlenc#tripledes-cbc" | ||
| ], | ||
| "enumNames": [ | ||
| "value.algorithm-gcm-256", | ||
| "value.algorithm-gcm-192", | ||
| "value.algorithm-gcm-128", | ||
| "value.algorithm-cbc-256", | ||
| "value.algorithm-cbc-192", | ||
| "value.algorithm-cbc-128", | ||
| "value.algorithm-cbc-tripledes" | ||
| ] | ||
| } | ||
| }, | ||
| "definitions": {} | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
ui/src/app/metadata/domain/filter/definition/AlgorithmFilterDefinition.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| import defaultsDeep from "lodash/defaultsDeep"; | ||
| // import API_BASE_PATH from "../../../../App.constant"; | ||
| import { BASE_PATH } from '../../../../App.constant'; | ||
| import { BaseFilterDefinition } from "./BaseFilterDefinition"; | ||
|
|
||
| export const AlgorithmFilterWizard = { | ||
| ...BaseFilterDefinition, | ||
| uiSchema: defaultsDeep({ | ||
| algorithmFilterTarget: { | ||
| 'ui:field': 'FilterTargetField', | ||
| api: '' | ||
| }, | ||
| formats: { | ||
| "ui:options": { | ||
| orderable: false | ||
| }, | ||
| items: { | ||
| 'ui:widget': 'OptionWidget' | ||
| } | ||
| } | ||
| }, BaseFilterDefinition.uiSchema), | ||
| label: 'Algorithm', | ||
| type: 'Algorithm', | ||
| // schema: `${API_BASE_PATH}/ui/AlgorithmFilter`, | ||
| schema: `${BASE_PATH}assets/schema/filter/algorithm.schema.json`, | ||
| steps: [], | ||
| validator: (data = [], current = { resourceId: null }, group) => { | ||
| return BaseFilterDefinition.validator(data, current, group, 'algorithmFilterTarget', 'algorithmFilterTargetType') | ||
| }, | ||
| formatter: (changes) => ({ | ||
| ...changes, | ||
| '@type': AlgorithmFilterWizard.type | ||
| }) | ||
| }; | ||
|
|
||
| export const AlgorithmFilterEditor = { | ||
| ...AlgorithmFilterWizard, | ||
| steps: [ | ||
| { | ||
| id: 'common', | ||
| label: 'label.target', | ||
| index: 1, | ||
| fields: [ | ||
| 'name', | ||
| '@type', | ||
| 'resourceId', | ||
| 'algorithmFilterTarget', | ||
| 'filterEnabled' | ||
| ] | ||
| }, | ||
| { | ||
| id: 'options', | ||
| label: 'label.options', | ||
| index: 2, | ||
| initialValues: [], | ||
| fields: [ | ||
| 'algorithm' | ||
| ] | ||
| } | ||
| ] | ||
| }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters