Skip to content

Commit 457bdf8

Browse files
committed
Merge branch 'main' of github.com:devtron-labs/devtron-fe-common-lib into feat/multi-select-picker
2 parents 7174038 + 7ef87b1 commit 457bdf8

File tree

86 files changed

+1432
-462
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+1432
-462
lines changed

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": "0.1.17",
3+
"version": "0.2.2",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Assets/Icon/ic-book-open.svg

Lines changed: 16 additions & 0 deletions
Loading

src/Assets/Icon/ic-circle.svg

Lines changed: 9 additions & 0 deletions
Loading

src/Assets/Icon/ic-filter-applied.svg

Lines changed: 16 additions & 0 deletions
Loading

src/Assets/Icon/ic-filter.svg

Lines changed: 16 additions & 0 deletions
Loading

src/Assets/Icon/ic-lego-block.svg

Lines changed: 16 additions & 0 deletions
Loading

src/Common/AddCDButton/AddCDButton.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
import React from 'react'
1817
import Tippy from '@tippyjs/react'
1918
import { AddCDButtonProps, TooltipContentProps } from './types'
2019
import { AddCDPositions } from '../Types'

src/Common/AppStatus/AppStatus.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,23 @@ export default function AppStatus({
3333
}
3434
const appStatusLowerCase = status?.toLowerCase()
3535
const isNotDeployed = appStatusLowerCase === StatusConstants.NOT_DEPLOYED.noSpaceLower
36-
const iconClass = isNotDeployed ? StatusConstants.NOT_DEPLOYED.lowerCase : appStatusLowerCase
36+
const isNotReady = appStatus === StatusConstants.NOT_READY.normalCase
3737
const statusMessage = status || (isVirtualEnv ? StatusConstants.NOT_AVILABLE.normalCase : '-')
3838
const notDeployed = isJobView ? YET_TO_RUN : StatusConstants.NOT_DEPLOYED.normalCase
3939
const textContent = isNotDeployed ? notDeployed : statusMessage
4040

41+
const getIconClass = () => {
42+
if (isNotDeployed) {
43+
return StatusConstants.NOT_DEPLOYED.lowerCase
44+
}
45+
if (isNotReady) {
46+
return StatusConstants.NOT_READY.lowerCase
47+
}
48+
return appStatusLowerCase
49+
}
50+
51+
const iconClass = getIconClass()
52+
4153
const renderIcon = () => {
4254
if (iconClass) {
4355
return <span className={`dc__app-summary__icon icon-dim-16 ${iconClass} ${iconClass}--node`} />

src/Common/AppStatus/constants.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ export const StatusConstants = {
2020
normalCase: 'Not deployed',
2121
lowerCase: 'not-deployed',
2222
},
23+
NOT_READY: {
24+
noSpaceLower: 'notready',
25+
normalCase: 'Not Ready',
26+
lowerCase: 'not-ready',
27+
},
2328
APP_STATUS: {
2429
noSpaceLower: 'appStatus',
2530
normalText: 'App status',

0 commit comments

Comments
 (0)