Skip to content

Commit c348662

Browse files
Merge pull request #926 from devtron-labs/feat/backup-locations
feat: backup locations
2 parents 7c274e2 + 45a0b97 commit c348662

10 files changed

Lines changed: 202 additions & 14 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "1.20.6-pre-3",
3+
"version": "1.20.6-pre-7",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",
Lines changed: 6 additions & 6 deletions
Loading

src/Assets/Illustration/img-no-backup-location.svg

Lines changed: 180 additions & 0 deletions
Loading

src/Common/Constants.ts

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

1717
import { SelectPickerOptionType } from '@Shared/Components'
1818
import { CostBreakdownItemViewParamsType, CostBreakdownViewType } from '@PagesDevtron2.0/CostVisibility'
19-
import { BackupAndScheduleListViewEnum } from '@PagesDevtron2.0/DataProtectionManagement/types'
19+
import { BackupAndScheduleListViewEnum, BackupLocationsTypes } from '@PagesDevtron2.0/DataProtectionManagement'
2020

2121
export const FALLBACK_REQUEST_TIMEOUT = 60000
2222
export const Host = window?.__ORCHESTRATOR_ROOT__ ?? '/orchestrator'
@@ -132,7 +132,8 @@ export const URLS = {
132132
DATA_PROTECTION_BACKUP_DETAIL: `${DATA_PROTECTION_ROOT}/backup/:name`,
133133
DATA_PROTECTION_BACKUP_SCHEDULE_DETAIL: `${DATA_PROTECTION_ROOT}/schedule/:name`,
134134
DATA_PROTECTION_RESTORES: `${DATA_PROTECTION_ROOT}/restores`,
135-
DATA_PROTECTION_BACKUP_LOCATIONS: `${DATA_PROTECTION_ROOT}/backup-locations`,
135+
DATA_PROTECTION_BACKUP_LOCATIONS: `${DATA_PROTECTION_ROOT}/backup-locations/:type(${Object.values(BackupLocationsTypes).join('|')})`,
136+
BACKUP_LOCATION_DETAILS: `/:locationId`,
136137
// GLOBAL CONFIGURATION
137138
GLOBAL_CONFIG: GLOBAL_CONFIG_ROOT,
138139
GLOBAL_CONFIG_DOCKER: `${GLOBAL_CONFIG_ROOT}/docker`,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { BackupAndScheduleListViewEnum } from './types'
1+
export * from './types'

src/Pages-Devtron-2.0/DataProtectionManagement/types.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
export enum BackupLocationsTypes {
2+
VOLUME_SNAPSHOT = 'volume-snapshot',
3+
STORAGE = 'storage',
4+
}
5+
16
export enum BackupAndScheduleListViewEnum {
27
Backups = 'backups',
38
Schedules = 'schedules',

src/Shared/Components/Illustration/Illustration.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import ImgDevtronFreemium from '@Illustrations/img-devtron-freemium.webp'
77
import { ReactComponent as ImgFolderEmpty } from '@Illustrations/img-folder-empty.svg'
88
import ImgManOnRocket from '@Illustrations/img-man-on-rocket.webp'
99
import { ReactComponent as ImgMechanicalOperation } from '@Illustrations/img-mechanical-operation.svg'
10+
import { ReactComponent as ImgNoBackupLocation } from '@Illustrations/img-no-backup-location.svg'
1011
import { ReactComponent as ImgNoRestores } from '@Illustrations/img-no-restores.svg'
1112
import ImgNoResult from '@Illustrations/img-no-result.webp'
1213
import NoClusterCostEnabled from '@Illustrations/no-cluster-cost-enabled.webp'
@@ -18,6 +19,7 @@ import { IllustrationBaseProps } from './types'
1819
export const illustrationMap = {
1920
'img-folder-empty': ImgFolderEmpty,
2021
'img-mechanical-operation': ImgMechanicalOperation,
22+
'img-no-backup-location': ImgNoBackupLocation,
2123
'img-no-restores': ImgNoRestores,
2224
'create-backup-schedule': CreateBackupSchedule,
2325
'create-backup-snapshot': CreateBackupSnapshot,

src/Shared/Components/Table/TableContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ const TableContent = <
9292
} = resizableConfig ?? {}
9393

9494
const gridTemplateColumns = rowOnHoverComponentWidth
95-
? `${initialGridTemplateColumns} ${rowOnHoverComponentWidth}px`
95+
? `${initialGridTemplateColumns} ${typeof rowOnHoverComponentWidth === 'number' ? `${rowOnHoverComponentWidth}px` : rowOnHoverComponentWidth}`
9696
: initialGridTemplateColumns
9797

9898
useEffect(() => {

src/Shared/Components/Table/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ export type InternalTableProps<
296296
*/
297297
rowActionOnHoverConfig?: {
298298
Component: FunctionComponent<RowActionsOnHoverComponentProps<RowData, AdditionalProps>>
299-
width: number
299+
width: string | number
300300
}
301301

302302
bulkSelectionReturnValue: BulkSelectionReturnValueType | null

0 commit comments

Comments
 (0)