Skip to content

Commit 69ab02a

Browse files
authored
Merge pull request #912 from devtron-labs/feat/context-switcher-text
feat: resource context added in context switcher
2 parents e2ce781 + 3f10890 commit 69ab02a

File tree

4 files changed

+6
-4
lines changed

4 files changed

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

src/Shared/Components/ContextSwitcher/ContextSwitcher.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export const ContextSwitcher = ({
4545
optionListError,
4646
reloadOptionList,
4747
classNamePrefix,
48+
resource,
4849
}: ContextSwitcherTypes) => {
4950
const selectRef = useRef<SelectInstance<SelectPickerOptionType>>(null)
5051
const shouldShowToastRef = useRef<boolean>(true)
@@ -60,7 +61,7 @@ export const ContextSwitcher = ({
6061
if (shouldShowToastRef.current) {
6162
ToastManager.showToast({
6263
variant: ToastVariantType.shortcut,
63-
text: 'to switch Applications',
64+
text: `to switch ${resource}`,
6465
shortcuts: ['S'],
6566
})
6667
}

src/Shared/Components/ContextSwitcher/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export interface ContextSwitcherTypes
3636
> {
3737
options: GroupBase<SelectPickerOptionType<string | number>>[]
3838
isAppDataAvailable?: boolean
39+
resource: 'Cluster' | 'Release' | 'Tenant' | 'Application' | 'Job' | 'Application Group' | 'Chart Store'
3940
}
4041

4142
export interface RecentlyVisitedOptions extends SelectPickerOptionType<number> {

0 commit comments

Comments
 (0)