Skip to content

Commit d8b6108

Browse files
committed
fix: update AppStatus to handle 'notdeployed' status and add constant for it
1 parent 3602d3b commit d8b6108

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/Shared/Components/StatusComponent/AppStatus.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ import { APP_STATUS } from './constants'
2020

2121
export const AppStatus = ({ status, isJobView = false, isVirtualEnv = false, ...restProps }: AppStatusProps) => {
2222
const appStatus = isVirtualEnv ? APP_STATUS.NOT_AVAILABLE : status
23-
const isNotDeployed = appStatus.toLowerCase().replace(/ /g, '-') === APP_STATUS.NOT_DEPLOYED
23+
const isNotDeployed =
24+
appStatus.toLowerCase().replace(/ /g, '-') === APP_STATUS.NOT_DEPLOYED ||
25+
appStatus.toLowerCase() === APP_STATUS.NOT_DEPLOYED_NO_SPACE
2426
const notDeployedMessage = isJobView ? APP_STATUS.JOB_VIEW_NOT_DEPLOYED_MESSAGE : APP_STATUS.NOT_DEPLOYED_MESSAGE
2527
const textContent = isNotDeployed ? notDeployedMessage : appStatus
2628

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export const APP_STATUS = {
22
NOT_AVAILABLE: 'Not available',
33
NOT_DEPLOYED: 'not-deployed',
4+
NOT_DEPLOYED_NO_SPACE: 'notdeployed',
45
JOB_VIEW_NOT_DEPLOYED_MESSAGE: 'Yet to run',
56
NOT_DEPLOYED_MESSAGE: 'Not deployed',
67
}

0 commit comments

Comments
 (0)