From 92c9f0754b132adff32266c2ed65f9d16b83a651 Mon Sep 17 00:00:00 2001 From: Pere Miquel Brull Date: Tue, 11 Feb 2025 15:22:09 +0100 Subject: [PATCH] MINOR - Automator - Remove tags by label type (#19681) * MINOR - Automator - Remove tags by label type * MINOR - Automator - Remove tags by label type * MINOR - Automator - Remove tags by label type * MINOR - Automator - Remove tags by label type * MINOR - Automator - Remove tags by label type --------- Co-authored-by: Aniket Katkar --- .../automator/removeDescriptionAction.json | 8 ++++- .../external/automator/removeTagsAction.json | 27 ++++++++++++++-- .../automator/removeDescriptionAction.ts | 12 ++++--- .../external/automator/removeTagsAction.ts | 31 ++++++++++++++----- 4 files changed, 62 insertions(+), 16 deletions(-) diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/applications/configuration/external/automator/removeDescriptionAction.json b/openmetadata-spec/src/main/resources/json/schema/entity/applications/configuration/external/automator/removeDescriptionAction.json index 06abeffb780..9dcd2a4ecf9 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/applications/configuration/external/automator/removeDescriptionAction.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/applications/configuration/external/automator/removeDescriptionAction.json @@ -21,12 +21,18 @@ }, "applyToChildren": { "title": "Apply to Children", - "description": "Remove descriptions from all children of the selected assets. E.g., columns, tasks, topic fields,...", + "description": "Remove descriptions from the children of the selected assets. E.g., columns, tasks, topic fields,...", "type": "array", "items": { "$ref": "../../../../../type/basic.json#/definitions/entityName" }, "default": null + }, + "applyToAll": { + "title": "Apply to All", + "description": "Remove descriptions from all the children and parent of the selected assets.", + "type": "boolean", + "default": null } }, "required": ["type"], diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/applications/configuration/external/automator/removeTagsAction.json b/openmetadata-spec/src/main/resources/json/schema/entity/applications/configuration/external/automator/removeTagsAction.json index a255e0f9551..12ebeec4a4a 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/applications/configuration/external/automator/removeTagsAction.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/applications/configuration/external/automator/removeTagsAction.json @@ -10,6 +10,15 @@ "type": "string", "enum": ["RemoveTagsAction"], "default": "RemoveTagsAction" + }, + "labelType": { + "description" : "Remove tags by its label type", + "type": "string", + "enum": [ + "Manual", + "Propagated", + "Automated" + ] } }, "properties": { @@ -26,16 +35,30 @@ "$ref": "../../../../../type/tagLabel.json" } }, + "labels": { + "description": "Remove tags by its label type", + "type": "array", + "items": { + "$ref": "#/definitions/labelType" + }, + "default": null + }, "applyToChildren": { "title": "Apply to Children", - "description": "Remove tags from all the children of the selected assets. E.g., columns, tasks, topic fields,...", + "description": "Remove tags from the children of the selected assets. E.g., columns, tasks, topic fields,...", "type": "array", "items": { "$ref": "../../../../../type/basic.json#/definitions/entityName" }, "default": null + }, + "applyToAll": { + "title": "Apply to All", + "description": "Remove tags from all the children and parent of the selected assets.", + "type": "boolean", + "default": null } }, - "required": ["type", "tags"], + "required": ["type"], "additionalProperties": false } diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/applications/configuration/external/automator/removeDescriptionAction.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/applications/configuration/external/automator/removeDescriptionAction.ts index cfb7260c39d..2fa9f961a0d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/applications/configuration/external/automator/removeDescriptionAction.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/applications/configuration/external/automator/removeDescriptionAction.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,14 +10,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * Remove Owner Action Type */ export interface RemoveDescriptionAction { /** - * Remove descriptions from all children of the selected assets. E.g., columns, tasks, topic + * Remove descriptions from all the children and parent of the selected assets. + */ + applyToAll?: boolean; + /** + * Remove descriptions from the children of the selected assets. E.g., columns, tasks, topic * fields,... */ applyToChildren?: string[]; diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/applications/configuration/external/automator/removeTagsAction.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/applications/configuration/external/automator/removeTagsAction.ts index 336565b491f..97507baeb6f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/applications/configuration/external/automator/removeTagsAction.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/applications/configuration/external/automator/removeTagsAction.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,27 +10,42 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * Remove Tags Action Type */ export interface RemoveTagsAction { /** - * Remove tags from all the children of the selected assets. E.g., columns, tasks, topic + * Remove tags from all the children and parent of the selected assets. + */ + applyToAll?: boolean; + /** + * Remove tags from the children of the selected assets. E.g., columns, tasks, topic * fields,... */ applyToChildren?: string[]; + /** + * Remove tags by its label type + */ + labels?: LabelElement[]; /** * Tags to remove */ - tags: TagLabel[]; + tags?: TagLabel[]; /** * Application Type */ type: RemoveTagsActionType; } +/** + * Remove tags by its label type + */ +export enum LabelElement { + Automated = "Automated", + Manual = "Manual", + Propagated = "Propagated", +} + /** * This schema defines the type for labeling an entity with a Tag. */ @@ -54,7 +69,7 @@ export interface TagLabel { * label was propagated from upstream based on lineage. 'Automated' is used when a tool was * used to determine the tag label. */ - labelType: LabelType; + labelType: LabelTypeEnum; /** * Name of the tag or glossary term. */ @@ -79,7 +94,7 @@ export interface TagLabel { * label was propagated from upstream based on lineage. 'Automated' is used when a tool was * used to determine the tag label. */ -export enum LabelType { +export enum LabelTypeEnum { Automated = "Automated", Derived = "Derived", Manual = "Manual",