Skip to content

Commit 34acf7c

Browse files
committed
Merge branch 'develop' of https://github.com/devtron-labs/devtron-fe-common-lib into fix/ai-fixes
2 parents 6faffb6 + 2163c58 commit 34acf7c

46 files changed

Lines changed: 621 additions & 236 deletions

Some content is hidden

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

package-lock.json

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

package.json

Lines changed: 3 additions & 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-48",
3+
"version": "1.20.6-alpha-72",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",
@@ -108,6 +108,7 @@
108108
"@codemirror/lint": "6.8.4",
109109
"@codemirror/merge": "^6.10.0",
110110
"@codemirror/search": "6.5.8",
111+
"@datasert/cronjs-parser": "^1.4.0",
111112
"@lezer/highlight": "1.2.1",
112113
"@replit/codemirror-indentation-markers": "6.5.3",
113114
"@replit/codemirror-vscode-keymap": "6.0.2",
@@ -119,6 +120,7 @@
119120
"ansi_up": "^5.2.1",
120121
"chart.js": "^4.5.0",
121122
"codemirror-json-schema": "0.8.0",
123+
"cronstrue": "^3.9.0",
122124
"dayjs": "^1.11.13",
123125
"fast-json-patch": "^3.1.1",
124126
"focus-trap-react": "^10.3.1",
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

src/Common/BreadCrumb/BreadCrumb.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,7 @@ export const BreadCrumb: React.FC<Breadcrumbs> = ({
114114
{breadcrumb.name}
115115
</ConditionalWrap>
116116

117-
{idx + 1 !== filteredCrumbs.length && breadcrumb.name && (
118-
getBreadCrumbSeparator(sep)
119-
)}
117+
{idx + 1 !== filteredCrumbs.length && breadcrumb.name && getBreadCrumbSeparator(sep)}
120118
</React.Fragment>
121119
))}
122120
</>

src/Common/CIPipeline.Types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ export interface TaskErrorObj {
338338
name: ErrorObj
339339
inlineStepDetail?: StepDetailTaskErrorObj
340340
pluginRefStepDetail?: StepDetailTaskErrorObj
341+
outputDirectoryPath?: ErrorObj[]
341342
}
342343
export interface FormErrorObjectType {
343344
name: ErrorObj

src/Common/Constants.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ const DATA_PROTECTION_ROOT = '/data-protection-management'
6464
const DATA_PROTECTION_BACKUP_AND_SCHEDULE =
6565
`${DATA_PROTECTION_ROOT}/backup-and-schedule/:view(${Object.values(BackupAndScheduleListViewEnum).join('|')})` as const
6666
const GLOBAL_CONFIG_ROOT = '/global-configuration'
67+
const OBSERVABILITY_ROOT = '/observability'
6768

6869
export const URLS = {
6970
LOGIN: '/login',
@@ -91,9 +92,9 @@ export const URLS = {
9192
// APPLICATION MANAGEMENT
9293
APPLICATION_MANAGEMENT: APPLICATION_MANAGEMENT_ROOT,
9394
APPLICATION_MANAGEMENT_OVERVIEW: `${APPLICATION_MANAGEMENT_ROOT}/overview`,
94-
APPLICATION_MANAGEMENT_APP: `${APPLICATION_MANAGEMENT_ROOT}/app`,
95-
APPLICATION_MANAGEMENT_APP_LIST: `${APPLICATION_MANAGEMENT_ROOT}/devtron-apps`,
96-
APPLICATION_MANAGEMENT_CREATE_DEVTRON_APP: `${APPLICATION_MANAGEMENT_ROOT}/devtron-apps/create-app`,
95+
APPLICATION_MANAGEMENT_APP: `${APPLICATION_MANAGEMENT_ROOT}/devtron-app`,
96+
APPLICATION_MANAGEMENT_APP_LIST: `${APPLICATION_MANAGEMENT_ROOT}/devtron-app/list`,
97+
APPLICATION_MANAGEMENT_CREATE_DEVTRON_APP: `${APPLICATION_MANAGEMENT_ROOT}/devtron-app/list/create-app`,
9798
APPLICATION_MANAGEMENT_APPLICATION_GROUP: `${APPLICATION_MANAGEMENT_ROOT}/application-group`,
9899
APPLICATION_MANAGEMENT_TEMPLATES_DEVTRON_APP,
99100
APPLICATION_MANAGEMENT_TEMPLATES_DEVTRON_APP_CREATE: `${APPLICATION_MANAGEMENT_TEMPLATES_DEVTRON_APP}/create`,
@@ -110,7 +111,7 @@ export const URLS = {
110111
INFRASTRUCTURE_MANAGEMENT: INFRASTRUCTURE_MANAGEMENT_ROOT,
111112
INFRASTRUCTURE_MANAGEMENT_OVERVIEW: `${INFRASTRUCTURE_MANAGEMENT_ROOT}/overview`,
112113
INFRASTRUCTURE_MANAGEMENT_APP_LIST: `${INFRASTRUCTURE_MANAGEMENT_ROOT}/apps/:appType(${Object.values(InfrastructureManagementAppListType).join('|')})`,
113-
INFRASTRUCTURE_MANAGEMENT_APP: `${INFRASTRUCTURE_MANAGEMENT_ROOT}/app`,
114+
INFRASTRUCTURE_MANAGEMENT_APP: `${INFRASTRUCTURE_MANAGEMENT_ROOT}/apps`,
114115
INFRASTRUCTURE_MANAGEMENT_CHART_STORE: `${INFRASTRUCTURE_MANAGEMENT_ROOT}/chart-store`,
115116
INFRASTRUCTURE_MANAGEMENT_CHART_STORE_DISCOVER: `${INFRASTRUCTURE_MANAGEMENT_ROOT}/chart-store/discover`,
116117
INFRASTRUCTURE_MANAGEMENT_RESOURCE_BROWSER: `${INFRASTRUCTURE_MANAGEMENT_ROOT}/resource-browser`,
@@ -131,7 +132,10 @@ export const URLS = {
131132
// SECURITY CENTER
132133
SECURITY_CENTER: SECURITY_CENTER_ROOT,
133134
SECURITY_CENTER_OVERVIEW: `${SECURITY_CENTER_ROOT}/overview`,
134-
SECURITY_CENTER_SCANS: `${SECURITY_CENTER_ROOT}/scans`,
135+
SECURITY_CENTER_VULNERABILITIES: `${SECURITY_CENTER_ROOT}/vulnerabilities`,
136+
SECURITY_CENTER_VULNERABILITY_DEPLOYMENTS: `${SECURITY_CENTER_ROOT}/vulnerabilities/deployments`,
137+
SECURITY_CENTER_VULNERABILITY_CVES: `${SECURITY_CENTER_ROOT}/vulnerabilities/cves`,
138+
SECURITY_CENTER_SECURITY_ENABLEMENT: `${SECURITY_CENTER_ROOT}/security-enablement`,
135139
SECURITY_CENTER_POLICIES: `${SECURITY_CENTER_ROOT}/policies`,
136140
// AUTOMATION AND ENABLEMENT
137141
AUTOMATION_AND_ENABLEMENT: AUTOMATION_AND_ENABLEMENT_ROOT,
@@ -152,6 +156,10 @@ export const URLS = {
152156
GLOBAL_CONFIG_EDIT_CLUSTER: `${GLOBAL_CONFIG_ROOT}/cluster-env/edit/:clusterId`,
153157
PERMISSION_GROUPS: `${GLOBAL_CONFIG_ROOT}/auth/groups`,
154158
EXTERNAL_APPS: 'ea',
159+
// OBSERVABILITY
160+
OBSERVABILITY: OBSERVABILITY_ROOT,
161+
OBSERVABILITY_OVERVIEW: `${OBSERVABILITY_ROOT}/overview`,
162+
OBSERVABILITY_CUSTOMER_LIST: `${OBSERVABILITY_ROOT}/tenants`,
155163
} as const
156164

157165
export const ROUTES = {

src/Common/SegmentedBarChart/SegmentedBarChart.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const SegmentedBarChart: React.FC<SegmentedBarChartProps> = ({
3232
countClassName,
3333
labelClassName,
3434
isProportional,
35+
hideTotal,
3536
swapLegendAndBar = false,
3637
showAnimationOnBar = false,
3738
isLoading,
@@ -58,7 +59,7 @@ const SegmentedBarChart: React.FC<SegmentedBarChartProps> = ({
5859
<div className="shimmer w-64 lh-1-5 h-24" />
5960
) : (
6061
<span className={countClassName} data-testid={`segmented-bar-chart-${label}-value`}>
61-
{isProportional ? `${value}/${total}` : value}
62+
{isProportional && !hideTotal ? `${value}/${total}` : value}
6263
</span>
6364
)
6465

src/Common/SegmentedBarChart/types.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,23 @@ type EntityPropType =
3232
entities: NonNullable<Omit<Entity, 'label'> & { label?: never }>[]
3333
}
3434

35+
type ProportionalType =
36+
| {
37+
isProportional?: true
38+
hideTotal?: boolean
39+
}
40+
| {
41+
isProportional?: false | never
42+
hideTotal?: never
43+
}
44+
3545
export type SegmentedBarChartProps = {
3646
rootClassName?: string
3747
countClassName?: string
3848
labelClassName?: string
39-
isProportional?: boolean
4049
swapLegendAndBar?: boolean
4150
showAnimationOnBar?: boolean
4251
isLoading?: boolean
4352
size?: ComponentSizeType
44-
} & EntityPropType
53+
} & EntityPropType &
54+
ProportionalType

0 commit comments

Comments
 (0)