Skip to content

Commit 19aed84

Browse files
authored
Merge pull request #996 from devtron-labs/feat/app-list-table
feat: use Table in devtron, argo & flux listings
2 parents bc1bafd + 9a9a948 commit 19aed84

17 files changed

Lines changed: 445 additions & 45 deletions

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

src/Assets/IconV2/ic-ses.svg

Lines changed: 6 additions & 0 deletions
Loading

src/Assets/IconV2/ic-slack.svg

Lines changed: 10 additions & 0 deletions
Loading

src/Assets/IconV2/ic-smtp.svg

Lines changed: 7 additions & 0 deletions
Loading
Lines changed: 5 additions & 0 deletions
Loading

src/Common/SortableTableHeaderCell/SortableTableHeaderCell.tsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import Draggable, { DraggableProps } from 'react-draggable'
1919
import { ReactComponent as SortIcon } from '@Icons/ic-arrow-up-down.svg'
2020
import { ReactComponent as SortArrowDown } from '@Icons/ic-sort-arrow-down.svg'
2121
import { Tooltip } from '@Common/Tooltip'
22+
import { Icon } from '@Shared/Components/Icon'
2223

2324
import { SortingOrder } from '../Constants'
2425
import { noop } from '../Helper'
@@ -68,6 +69,7 @@ const SortableTableHeaderCell = ({
6869
id,
6970
handleResize,
7071
isResizable,
72+
infoTooltipText,
7173
}: SortableTableHeaderCellProps) => {
7274
const isCellResizable = !!(isResizable && id && handleResize)
7375

@@ -107,7 +109,18 @@ const SortableTableHeaderCell = ({
107109
data-testid={title}
108110
>
109111
<Tooltip showOnTruncate={showTippyOnTruncate} content={title}>
110-
<span className="dc__uppercase dc__truncate">{title}</span>
112+
<div className="dc__gap-4 flex left">
113+
<span className="dc__uppercase dc__truncate">{title}</span>
114+
115+
{infoTooltipText && (
116+
<Icon
117+
name="ic-help-outline"
118+
color="N600"
119+
size={12}
120+
tooltipProps={{ content: infoTooltipText, alwaysShowTippyOnHover: true }}
121+
/>
122+
)}
123+
</div>
111124
</Tooltip>
112125
{renderSortIcon()}
113126
</button>

src/Common/SortableTableHeaderCell/types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ export type SortableTableHeaderCellProps = {
2626
* @default false
2727
*/
2828
showTippyOnTruncate?: boolean
29+
/**
30+
* If provided, shown in a tooltip on info-icon-outline beside the label
31+
*/
32+
infoTooltipText?: string
2933
} & (
3034
| {
3135
/**

src/Shared/Components/CICDHistory/ConflictedResourcesTable.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import './ConflictedResourcesTable.scss'
1010
const Wrapper = ({ children }: TableViewWrapperProps<unknown, FiltersTypeEnum.STATE>) => (
1111
<div className="dc__overflow-hidden flexbox-col flex-grow-1">{children}</div>
1212
)
13-
const filter = () => true
1413

1514
const ConflictedResourcesTable = ({ resourceConflictDetails }: ConflictedResourcesTableProps) => {
1615
const rows: RowsType<ResourceConflictItemType> = useMemo(
@@ -42,7 +41,7 @@ const ConflictedResourcesTable = ({ resourceConflictDetails }: ConflictedResourc
4241
}}
4342
filtersVariant={FiltersTypeEnum.STATE}
4443
ViewWrapper={Wrapper}
45-
filter={filter}
44+
filter={null}
4645
/>
4746
)
4847
}

src/Shared/Components/Icon/Icon.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,12 @@ import { ReactComponent as ICSecurityPolicy } from '@IconsV2/ic-security-policy.
252252
import { ReactComponent as ICSecurityScan } from '@IconsV2/ic-security-scan.svg'
253253
import { ReactComponent as ICSecurityVulnerability } from '@IconsV2/ic-security-vulnerability.svg'
254254
import { ReactComponent as ICSelected } from '@IconsV2/ic-selected.svg'
255+
import { ReactComponent as ICSes } from '@IconsV2/ic-ses.svg'
255256
import { ReactComponent as ICShapes } from '@IconsV2/ic-shapes.svg'
256257
import { ReactComponent as ICShieldCheck } from '@IconsV2/ic-shield-check.svg'
258+
import { ReactComponent as ICSlack } from '@IconsV2/ic-slack.svg'
257259
import { ReactComponent as ICSlidersVertical } from '@IconsV2/ic-sliders-vertical.svg'
260+
import { ReactComponent as ICSmtp } from '@IconsV2/ic-smtp.svg'
258261
import { ReactComponent as ICSoftwareReleaseManagement } from '@IconsV2/ic-software-release-management.svg'
259262
import { ReactComponent as ICSortAscending } from '@IconsV2/ic-sort-ascending.svg'
260263
import { ReactComponent as ICSortDescending } from '@IconsV2/ic-sort-descending.svg'
@@ -308,6 +311,7 @@ import { ReactComponent as ICWarning } from '@IconsV2/ic-warning.svg'
308311
import { ReactComponent as ICWarningFill } from '@IconsV2/ic-warning-fill.svg'
309312
import { ReactComponent as ICWarningStroke } from '@IconsV2/ic-warning-stroke.svg'
310313
import { ReactComponent as ICWebhook } from '@IconsV2/ic-webhook.svg'
314+
import { ReactComponent as ICWebhookConfig } from '@IconsV2/ic-webhook-config.svg'
311315
import { ReactComponent as ICWifiSlash } from '@IconsV2/ic-wifi-slash.svg'
312316
import { ReactComponent as ICWorldGlobe } from '@IconsV2/ic-world-globe.svg'
313317

@@ -568,9 +572,12 @@ export const iconMap = {
568572
'ic-security-scan': ICSecurityScan,
569573
'ic-security-vulnerability': ICSecurityVulnerability,
570574
'ic-selected': ICSelected,
575+
'ic-ses': ICSes,
571576
'ic-shapes': ICShapes,
572577
'ic-shield-check': ICShieldCheck,
578+
'ic-slack': ICSlack,
573579
'ic-sliders-vertical': ICSlidersVertical,
580+
'ic-smtp': ICSmtp,
574581
'ic-software-release-management': ICSoftwareReleaseManagement,
575582
'ic-sort-ascending': ICSortAscending,
576583
'ic-sort-descending': ICSortDescending,
@@ -623,6 +630,7 @@ export const iconMap = {
623630
'ic-warning-fill': ICWarningFill,
624631
'ic-warning-stroke': ICWarningStroke,
625632
'ic-warning': ICWarning,
633+
'ic-webhook-config': ICWebhookConfig,
626634
'ic-webhook': ICWebhook,
627635
'ic-wifi-slash': ICWifiSlash,
628636
'ic-world-globe': ICWorldGlobe,

0 commit comments

Comments
 (0)