Skip to content

Commit c4045b5

Browse files
committed
refactor: consolidate InstallationType imports across components from common-lib
1 parent c8b4cfa commit c4045b5

File tree

7 files changed

+16
-17
lines changed

7 files changed

+16
-17
lines changed

src/components/common/Banner/Banner.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,13 @@ import {
2424
ComponentSizeType,
2525
Icon,
2626
InfoBlockVariant,
27+
InstallationType,
2728
MotionDiv,
2829
noop,
2930
setActionWithExpiry,
3031
useMainContext,
3132
} from '@devtron-labs/devtron-fe-common-lib'
3233

33-
import { InstallationType } from '@Components/v2/devtronStackManager/DevtronStackManager.type'
34-
3534
import { importComponentFromFELibrary } from '../helpers/Helpers'
3635
import { InteractiveCellText } from '../helpers/InteractiveCellText/InteractiveCellText'
3736
import { useOnline } from '../hooks'

src/components/v2/devtronStackManager/AboutDevtronView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
import React, { useEffect } from 'react'
1818
import AboutDevtron from '../../../assets/img/[email protected]'
1919
import { InstallationWrapper } from './DevtronStackManager.component'
20-
import { AboutDevtronViewType, InstallationType } from './DevtronStackManager.type'
20+
import { AboutDevtronViewType } from './DevtronStackManager.type'
2121
import './AboutDevtronView.scss'
2222
import { URLS } from '../../../config'
23-
import { MarkDown, TabGroup } from '@devtron-labs/devtron-fe-common-lib'
23+
import { InstallationType, MarkDown, TabGroup } from '@devtron-labs/devtron-fe-common-lib'
2424

2525
const AboutDevtronView = ({
2626
parentRef,

src/components/v2/devtronStackManager/DevtronStackManager.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ import {
3535
RAISE_ISSUE,
3636
getDocumentationUrl,
3737
DISCORD_LINK,
38+
InstallationType,
3839
} from '@devtron-labs/devtron-fe-common-lib'
3940
import Tippy from '@tippyjs/react'
4041
import {
41-
InstallationType,
4242
InstallationWrapperType,
4343
ModuleDetails,
4444
ModuleDetailsCardType,

src/components/v2/devtronStackManager/DevtronStackManager.service.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,20 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { get, getUrlWithSearchParams, post, refresh, ToastManager, ToastVariantType } from '@devtron-labs/devtron-fe-common-lib'
17+
import {
18+
get,
19+
getUrlWithSearchParams,
20+
InstallationType,
21+
post,
22+
refresh,
23+
ToastManager,
24+
ToastVariantType,
25+
} from '@devtron-labs/devtron-fe-common-lib'
1826
import { ReactComponent as ICSparkles } from '@Icons/ic-sparkles.svg'
1927
import { ReactComponent as ICArrowClockwise } from '@Icons/ic-arrow-clockwise.svg'
2028
import { ModuleNameMap, Routes, UPDATE_AVAILABLE_TOAST_PROGRESS_BG } from '../../../config'
2129
import {
2230
AllModuleInfoResponse,
23-
InstallationType,
2431
LogPodNameResponse,
2532
ModuleActionRequest,
2633
ModuleActionResponse,

src/components/v2/devtronStackManager/DevtronStackManager.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import {
2525
AppStatusModal,
2626
AppStatusModalTabType,
2727
noop,
28+
InstallationType,
2829
} from '@devtron-labs/devtron-fe-common-lib'
2930
import { ModuleNameMap, SERVER_MODE, URLS } from '../../../config'
3031
import { ErrorBoundary, importComponentFromFELibrary, useInterval } from '../../common'
@@ -39,7 +40,6 @@ import {
3940
import { getAllModules, getLogPodName, getModuleInfo, getReleasesNotes } from './DevtronStackManager.service'
4041
import {
4142
AllModuleInfoResponse,
42-
InstallationType,
4343
LogPodNameResponse,
4444
ModuleDetails,
4545
ModuleInfo,

src/components/v2/devtronStackManager/DevtronStackManager.type.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import React from 'react'
1818
import { RouteComponentProps } from 'react-router-dom'
1919

20-
import { ResponseType } from '@devtron-labs/devtron-fe-common-lib'
20+
import { InstallationType, ResponseType } from '@devtron-labs/devtron-fe-common-lib'
2121

2222
import { ActionResponse } from '../../external-apps/ExternalAppService'
2323

@@ -43,12 +43,6 @@ export enum ModuleActions {
4343
UPGRADE = 'upgrade',
4444
}
4545

46-
export enum InstallationType {
47-
OSS_KUBECTL = 'oss_kubectl',
48-
OSS_HELM = 'oss_helm',
49-
ENTERPRISE = 'enterprise',
50-
}
51-
5246
export interface StackDetailsType {
5347
isLoading: boolean
5448
discoverModulesList: ModuleDetails[]

src/components/v2/devtronStackManager/DevtronStackManager.utils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import React from 'react'
1818
import { RouteComponentProps } from 'react-router-dom'
19-
import { AppType, ModuleStatus } from '@devtron-labs/devtron-fe-common-lib'
19+
import { AppType, InstallationType, ModuleStatus } from '@devtron-labs/devtron-fe-common-lib'
2020
import { ReactComponent as DiscoverIcon } from '../../../assets/icons/ic-compass.svg'
2121
import { ReactComponent as DevtronIcon } from '../../../assets/icons/ic-devtron.svg'
2222
import { ReactComponent as InstalledIcon } from '../../../assets/icons/ic-check.svg'
@@ -25,7 +25,6 @@ import { CLAIR_TOOL_VERSION_V4, ModuleNameMap, TRIVY_TOOL_VERSION, URLS } from '
2525
import { handleError } from './DevtronStackManager.component'
2626
import { executeModuleAction, executeModuleEnableAction, executeServerAction } from './DevtronStackManager.service'
2727
import {
28-
InstallationType,
2928
ModuleActionRequest,
3029
ModuleActions,
3130
ModuleDetails,

0 commit comments

Comments
 (0)