diff --git a/package-lock.json b/package-lock.json index 714692205..767429662 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "1.15.1-pre-3", + "version": "1.15.1-pre-4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "1.15.1-pre-3", + "version": "1.15.1-pre-4", "hasInstallScript": true, "license": "ISC", "dependencies": { diff --git a/package.json b/package.json index b11595321..df494fe90 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "1.15.1-pre-3", + "version": "1.15.1-pre-4", "description": "Supporting common component library", "type": "module", "main": "dist/index.js", diff --git a/src/Assets/IconV2/ic-cluster-isolated.svg b/src/Assets/IconV2/ic-cluster-isolated.svg new file mode 100644 index 000000000..24a017f32 --- /dev/null +++ b/src/Assets/IconV2/ic-cluster-isolated.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/Assets/IconV2/ic-cluster.svg b/src/Assets/IconV2/ic-cluster.svg index f6aea37fd..8bc0567ac 100644 --- a/src/Assets/IconV2/ic-cluster.svg +++ b/src/Assets/IconV2/ic-cluster.svg @@ -1,3 +1,3 @@ - + diff --git a/src/Assets/IconV2/ic-environment-isolated.svg b/src/Assets/IconV2/ic-environment-isolated.svg new file mode 100644 index 000000000..17e3d98c6 --- /dev/null +++ b/src/Assets/IconV2/ic-environment-isolated.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/Assets/IconV2/ic-environment.svg b/src/Assets/IconV2/ic-environment.svg new file mode 100644 index 000000000..3a34316c3 --- /dev/null +++ b/src/Assets/IconV2/ic-environment.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/Assets/IconV2/ic-shapes.svg b/src/Assets/IconV2/ic-shapes.svg new file mode 100644 index 000000000..520e2c4e3 --- /dev/null +++ b/src/Assets/IconV2/ic-shapes.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/Common/Constants.ts b/src/Common/Constants.ts index e0de61a42..f96a771b5 100644 --- a/src/Common/Constants.ts +++ b/src/Common/Constants.ts @@ -79,6 +79,7 @@ export const URLS = { COMPARE_CLUSTERS: '/compare-clusters', APP_CONFIG: 'edit', GLOBAL_CONFIG: '/global-config', + GLOBAL_CONFIG_MANAGE_CATEGORIES: '/global-config/cluster-env/manage-categories', GLOBAL_CONFIG_TEMPLATES_DEVTRON_APP, GLOBAL_CONFIG_TEMPLATES_DEVTRON_APP_CREATE: `${GLOBAL_CONFIG_TEMPLATES_DEVTRON_APP}/create`, // NOTE: using appId since we are re-using AppConfig component @@ -90,6 +91,7 @@ export const ROUTES = { APP: 'app', APP_ARTIFACT_PROMOTE_MATERIAL: 'app/artifact/promotion-request/material', APP_TEMPLATE_DATA: 'app/template/data', + ENVIRONMENT_CATEGORIES: 'env/categories', PROJECT_LIST_MIN: 'team/autocomplete', USER_CHECK_ROLE: 'user/check/roles', IMAGE_TAGGING: 'app/image-tagging', diff --git a/src/Common/Types.ts b/src/Common/Types.ts index 0383a3686..e9b0165b7 100644 --- a/src/Common/Types.ts +++ b/src/Common/Types.ts @@ -1081,3 +1081,11 @@ export interface EnvAppsMetaDTO { appCount: number apps: AppMeta[] } + +export interface ClusterEnvironmentCategoryDTO { + id: number + name: string + description?: string +} + +export interface ClusterEnvironmentCategoryType extends ClusterEnvironmentCategoryDTO {} diff --git a/src/Shared/Components/Icon/Icon.tsx b/src/Shared/Components/Icon/Icon.tsx index 97968af7e..3ce2f6ae2 100644 --- a/src/Shared/Components/Icon/Icon.tsx +++ b/src/Shared/Components/Icon/Icon.tsx @@ -42,6 +42,7 @@ import { ReactComponent as ICCloseLarge } from '@IconsV2/ic-close-large.svg' import { ReactComponent as ICCloseSmall } from '@IconsV2/ic-close-small.svg' import { ReactComponent as ICCloudVms } from '@IconsV2/ic-cloud-vms.svg' import { ReactComponent as ICCluster } from '@IconsV2/ic-cluster.svg' +import { ReactComponent as ICClusterIsolated } from '@IconsV2/ic-cluster-isolated.svg' import { ReactComponent as ICCode } from '@IconsV2/ic-code.svg' import { ReactComponent as ICContainer } from '@IconsV2/ic-container.svg' import { ReactComponent as ICCookr } from '@IconsV2/ic-cookr.svg' @@ -67,6 +68,8 @@ import { ReactComponent as ICEmail } from '@IconsV2/ic-email.svg' import { ReactComponent as ICEnterpriseFeat } from '@IconsV2/ic-enterprise-feat.svg' import { ReactComponent as ICEnterpriseTag } from '@IconsV2/ic-enterprise-tag.svg' import { ReactComponent as ICEnv } from '@IconsV2/ic-env.svg' +import { ReactComponent as ICEnvironment } from '@IconsV2/ic-environment.svg' +import { ReactComponent as ICEnvironmentIsolated } from '@IconsV2/ic-environment-isolated.svg' import { ReactComponent as ICError } from '@IconsV2/ic-error.svg' import { ReactComponent as ICExpandRightSm } from '@IconsV2/ic-expand-right-sm.svg' import { ReactComponent as ICExpandSm } from '@IconsV2/ic-expand-sm.svg' @@ -148,6 +151,7 @@ import { ReactComponent as ICQuote } from '@IconsV2/ic-quote.svg' import { ReactComponent as ICRocketGear } from '@IconsV2/ic-rocket-gear.svg' import { ReactComponent as ICRocketLaunch } from '@IconsV2/ic-rocket-launch.svg' import { ReactComponent as ICSelected } from '@IconsV2/ic-selected.svg' +import { ReactComponent as ICShapes } from '@IconsV2/ic-shapes.svg' import { ReactComponent as ICShieldCheck } from '@IconsV2/ic-shield-check.svg' import { ReactComponent as ICSlidersVertical } from '@IconsV2/ic-sliders-vertical.svg' import { ReactComponent as ICSortAscending } from '@IconsV2/ic-sort-ascending.svg' @@ -237,6 +241,7 @@ export const iconMap = { 'ic-close-large': ICCloseLarge, 'ic-close-small': ICCloseSmall, 'ic-cloud-vms': ICCloudVms, + 'ic-cluster-isolated': ICClusterIsolated, 'ic-cluster': ICCluster, 'ic-code': ICCode, 'ic-container': ICContainer, @@ -263,6 +268,8 @@ export const iconMap = { 'ic-enterprise-feat': ICEnterpriseFeat, 'ic-enterprise-tag': ICEnterpriseTag, 'ic-env': ICEnv, + 'ic-environment-isolated': ICEnvironmentIsolated, + 'ic-environment': ICEnvironment, 'ic-error': ICError, 'ic-expand-right-sm': ICExpandRightSm, 'ic-expand-sm': ICExpandSm, @@ -344,6 +351,7 @@ export const iconMap = { 'ic-rocket-gear': ICRocketGear, 'ic-rocket-launch': ICRocketLaunch, 'ic-selected': ICSelected, + 'ic-shapes': ICShapes, 'ic-shield-check': ICShieldCheck, 'ic-sliders-vertical': ICSlidersVertical, 'ic-sort-ascending': ICSortAscending, diff --git a/src/Shared/Components/SelectPicker/SelectPicker.component.tsx b/src/Shared/Components/SelectPicker/SelectPicker.component.tsx index 930559493..482dd211a 100644 --- a/src/Shared/Components/SelectPicker/SelectPicker.component.tsx +++ b/src/Shared/Components/SelectPicker/SelectPicker.component.tsx @@ -187,7 +187,7 @@ const SelectPicker = ({ error, icon, helperText, - placeholder = 'Select a option', + placeholder = 'Select an option', label, showSelectedOptionIcon = true, size = ComponentSizeType.medium,