diff --git a/package-lock.json b/package-lock.json
index 01938014c..98e3a11a7 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@devtron-labs/devtron-fe-common-lib",
- "version": "1.13.0",
+ "version": "1.13.0-redfish-preview-beta-1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@devtron-labs/devtron-fe-common-lib",
- "version": "1.13.0",
+ "version": "1.13.0-redfish-preview-beta-1",
"hasInstallScript": true,
"license": "ISC",
"dependencies": {
diff --git a/package.json b/package.json
index a10088e67..1b7a87f6a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@devtron-labs/devtron-fe-common-lib",
- "version": "1.13.0",
+ "version": "1.13.0-redfish-preview-beta-1",
"description": "Supporting common component library",
"type": "module",
"main": "dist/index.js",
diff --git a/src/Assets/IconV2/ic-terminal.svg b/src/Assets/IconV2/ic-terminal.svg
new file mode 100644
index 000000000..0ebbdcb7c
--- /dev/null
+++ b/src/Assets/IconV2/ic-terminal.svg
@@ -0,0 +1,3 @@
+
diff --git a/src/Assets/IconV2/ic-thermometer.svg b/src/Assets/IconV2/ic-thermometer.svg
new file mode 100644
index 000000000..470af06b5
--- /dev/null
+++ b/src/Assets/IconV2/ic-thermometer.svg
@@ -0,0 +1,3 @@
+
diff --git a/src/Common/SegmentedBarChart/SegmentedBarChart.tsx b/src/Common/SegmentedBarChart/SegmentedBarChart.tsx
index 33d64f26d..cf842a68c 100644
--- a/src/Common/SegmentedBarChart/SegmentedBarChart.tsx
+++ b/src/Common/SegmentedBarChart/SegmentedBarChart.tsx
@@ -23,6 +23,7 @@ import { Entity, SegmentedBarChartProps } from './types'
import './styles.scss'
const SegmentedBarChart: React.FC = ({
+ hideLegend,
entities: userEntities = [FALLBACK_ENTITY],
rootClassName,
countClassName,
@@ -36,7 +37,7 @@ const SegmentedBarChart: React.FC = ({
const total = entities.reduce((sum, entity) => entity.value + sum, 0)
const filteredEntities = entities.filter((entity) => !!entity.value)
- const calcSegmentWidth = (entity: Entity) => `${(entity.value / total) * 100}%`
+ const calcSegmentWidth = (entityValue: Entity['value']) => `${(entityValue / total) * 100}%`
const renderLabel = (label: Entity['label']) =>
isLoading ? (
@@ -88,11 +89,17 @@ const SegmentedBarChart: React.FC = ({
))
}
- const renderLegend = () => (
-
- {renderContent()}
-
- )
+ const renderLegend = () => {
+ if (hideLegend) {
+ return null
+ }
+
+ return (
+
+ {renderContent()}
+
+ )
+ }
const renderBar = () => (
= ({
className={`h-8 ${index === 0 ? 'dc__left-radius-4' : ''} ${
index === map.length - 1 ? 'dc__right-radius-4' : ''
} ${isLoading ? 'shimmer' : ''}`}
- style={{ backgroundColor: entity.color, width: calcSegmentWidth(entity) }}
+ style={{ backgroundColor: entity.color, width: calcSegmentWidth(entity.value) }}
/>
))}
diff --git a/src/Common/SegmentedBarChart/types.ts b/src/Common/SegmentedBarChart/types.ts
index ea56fc846..b0153715f 100644
--- a/src/Common/SegmentedBarChart/types.ts
+++ b/src/Common/SegmentedBarChart/types.ts
@@ -20,8 +20,17 @@ export type Entity = {
value: number
}
-export interface SegmentedBarChartProps {
- entities: NonNullable
+type EntityPropType =
+ | {
+ hideLegend?: false
+ entities: NonNullable
+ }
+ | {
+ hideLegend: true
+ entities: NonNullable & { label?: never }>[]
+ }
+
+export type SegmentedBarChartProps = {
rootClassName?: string
countClassName?: string
labelClassName?: string
@@ -29,4 +38,4 @@ export interface SegmentedBarChartProps {
swapLegendAndBar?: boolean
showAnimationOnBar?: boolean
isLoading?: boolean
-}
+} & EntityPropType
diff --git a/src/Pages/ResourceBrowser/types.ts b/src/Pages/ResourceBrowser/types.ts
index ed8dda683..db3389903 100644
--- a/src/Pages/ResourceBrowser/types.ts
+++ b/src/Pages/ResourceBrowser/types.ts
@@ -16,6 +16,8 @@
import { Dispatch, ReactElement, SetStateAction } from 'react'
+import { TabProps } from '@Shared/Components'
+
import { NodeActionRequest } from './ResourceBrowser.Types'
export enum ClusterFiltersType {
@@ -99,3 +101,8 @@ export interface AdditionalConfirmationModalOptionsProps {
setOptionsData: Dispatch>
children?: ReactElement
}
+
+export type NodeDetailTabsInfoType = (Pick & {
+ id: string
+ renderComponent: () => JSX.Element
+})[]
diff --git a/src/Shared/Components/BulkOperations/types.ts b/src/Shared/Components/BulkOperations/types.ts
index b3a1d5bc7..eea19a919 100644
--- a/src/Shared/Components/BulkOperations/types.ts
+++ b/src/Shared/Components/BulkOperations/types.ts
@@ -17,7 +17,7 @@
import { ReactNode } from 'react'
import { APIOptions, DrawerProps } from '@Common/index'
-import { SegmentedBarChartProps } from '@Common/SegmentedBarChart'
+import { Entity } from '@Common/SegmentedBarChart/types'
import { ConfirmationModalProps } from '../ConfirmationModal/types'
import { getProgressingStateForStatus } from '../Security'
@@ -64,7 +64,7 @@ export interface OperationResultStoreType {
getResults: (
sortComparator: (a: BulkOperationResultType, b: BulkOperationResultType) => number,
) => BulkOperationResultWithIdType[]
- getBarChartEntities: () => SegmentedBarChartProps['entities']
+ getBarChartEntities: () => NonNullable
getResultsStatusCount: () => Record
getSize: () => number
updateResultStatus: (
diff --git a/src/Shared/Components/Icon/Icon.tsx b/src/Shared/Components/Icon/Icon.tsx
index 5db478d3f..be7369e49 100644
--- a/src/Shared/Components/Icon/Icon.tsx
+++ b/src/Shared/Components/Icon/Icon.tsx
@@ -107,7 +107,9 @@ import { ReactComponent as ICStamp } from '@IconsV2/ic-stamp.svg'
import { ReactComponent as ICSuccess } from '@IconsV2/ic-success.svg'
import { ReactComponent as ICSuspended } from '@IconsV2/ic-suspended.svg'
import { ReactComponent as ICTata1mg } from '@IconsV2/ic-tata1mg.svg'
+import { ReactComponent as ICTerminal } from '@IconsV2/ic-terminal.svg'
import { ReactComponent as ICTerminalFill } from '@IconsV2/ic-terminal-fill.svg'
+import { ReactComponent as ICThermometer } from '@IconsV2/ic-thermometer.svg'
import { ReactComponent as ICThumbDown } from '@IconsV2/ic-thumb-down.svg'
import { ReactComponent as ICThumbUp } from '@IconsV2/ic-thumb-up.svg'
import { ReactComponent as ICTimeoutDash } from '@IconsV2/ic-timeout-dash.svg'
@@ -231,6 +233,8 @@ export const iconMap = {
'ic-suspended': ICSuspended,
'ic-tata1mg': ICTata1mg,
'ic-terminal-fill': ICTerminalFill,
+ 'ic-terminal': ICTerminal,
+ 'ic-thermometer': ICThermometer,
'ic-thumb-down': ICThumbDown,
'ic-thumb-up': ICThumbUp,
'ic-timeout-dash': ICTimeoutDash,
diff --git a/src/Shared/Components/Security/SecurityModal/types.ts b/src/Shared/Components/Security/SecurityModal/types.ts
index b1588666a..79e1dac6e 100644
--- a/src/Shared/Components/Security/SecurityModal/types.ts
+++ b/src/Shared/Components/Security/SecurityModal/types.ts
@@ -16,7 +16,7 @@
import React from 'react'
-import { SegmentedBarChartProps } from '@Common/SegmentedBarChart'
+import { Entity } from '@Common/SegmentedBarChart/types'
import { ServerErrors } from '@Common/ServerError'
import { GenericEmptyStateType } from '@Common/Types'
import { LastExecutionResultType, Nodes, NodeType } from '@Shared/types'
@@ -103,7 +103,7 @@ export interface StatusType {
}
export interface InfoCardPropsType extends Pick {
- entities: SegmentedBarChartProps['entities']
+ entities: NonNullable
lastScanTimeString?: string
}
diff --git a/src/index.ts b/src/index.ts
index 4d5f80fe0..16ec9bd43 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -149,6 +149,10 @@ export interface customEnv {
* @default false
*/
FEATURE_APPLICATION_TEMPLATES_ENABLE?: boolean
+ /**
+ * @default false
+ */
+ FEATURE_REDFISH_NODE_ENABLE?: boolean
GATEKEEPER_URL?: string
FEATURE_AI_INTEGRATION_ENABLE?: boolean
LOGIN_PAGE_IMAGE?: string