Skip to content

Commit 5c4425f

Browse files
authored
Merge pull request #873 from devtron-labs/feat/navigation-route
feat: infrastructure management icon moved to common
2 parents dc29a40 + 534f09e commit 5c4425f

File tree

15 files changed

+76
-8
lines changed

15 files changed

+76
-8
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": "1.20.0-alpha-4",
3+
"version": "1.20.1-pre-1",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { URLS } from '@Common/Constants'
2+
import { Button, ButtonComponentType, ButtonVariantType, Icon } from '@Shared/Components'
3+
import { ComponentSizeType } from '@Shared/constants'
4+
5+
export const ApplicationManagementIcon = () => (
6+
<Button
7+
dataTestId="redirect-to-devtron-apps"
8+
component={ButtonComponentType.link}
9+
size={ComponentSizeType.xs}
10+
variant={ButtonVariantType.borderLess}
11+
linkProps={{
12+
to: URLS.APPLICATION_MANAGEMENT_APP,
13+
}}
14+
ariaLabel="Redirect to Devtron Apps"
15+
showAriaLabelInTippy={false}
16+
icon={<Icon name="ic-grid-view" color={null} />}
17+
/>
18+
)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from './ApplicationManagementIcon'
2+
export { getApplicationManagementBreadcrumb } from './utils'
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { ApplicationManagementIcon } from './ApplicationManagementIcon'
2+
3+
export const getApplicationManagementBreadcrumb = () => ({
4+
'application-management': {
5+
component: <ApplicationManagementIcon />,
6+
linked: true,
7+
},
8+
})
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { URLS } from '@Common/Constants'
2+
import { Button, ButtonComponentType, ButtonVariantType, Icon } from '@Shared/Components'
3+
import { ComponentSizeType } from '@Shared/constants'
4+
5+
export const InfrastructureManagementIcon = () => (
6+
<Button
7+
dataTestId="redirect-to-overview-btn"
8+
component={ButtonComponentType.link}
9+
size={ComponentSizeType.xs}
10+
variant={ButtonVariantType.borderLess}
11+
linkProps={{
12+
to: URLS.INFRASTRUCTURE_MANAGEMENT_RESOURCE_BROWSER,
13+
}}
14+
ariaLabel="Redirect to Infrastructure Management Overview"
15+
showAriaLabelInTippy={false}
16+
icon={<Icon name="ic-cloud" color={null} />}
17+
/>
18+
)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from './InfrastructureManagementIcon'
2+
export { getInfrastructureManagementBreadcrumb } from './utils'
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { InfrastructureManagementIcon } from './InfrastructureManagementIcon'
2+
3+
export const getInfrastructureManagementBreadcrumb = () => ({
4+
'infrastructure-management': {
5+
component: <InfrastructureManagementIcon />,
6+
linked: true,
7+
},
8+
})
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from './ApplicationManagementIcon'
2+
export * from './InfrastructureManagementIcon'
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export * from './Overview'
2+
export * from './Shared'

0 commit comments

Comments
 (0)