Skip to content

Commit

Permalink
feat: add deeplinking for the dashboard in meshery
Browse files Browse the repository at this point in the history
Signed-off-by: Amit Amrutiya <[email protected]>
  • Loading branch information
amitamrutiya committed Jan 10, 2025
1 parent 4143d4c commit 3b058e0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/custom/ResourceDetailFormatters/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,5 +299,6 @@ export const KeyValueGridTitle = styled(Typography)({
});

export const KeyValueGridCell = styled(Grid)({
placeSelf: 'center'
placeSelf: 'center',
alignItems: 'center'
});
2 changes: 2 additions & 0 deletions src/custom/ResourceDetailFormatters/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export interface ActionIconButtonProps {
export interface KeyValueProps {
Key: string;
Value: string | number | ReactNode;
showFold?: boolean;
}

export interface EnvironmentFormatterProps {
Expand Down Expand Up @@ -264,4 +265,5 @@ export interface GetResourceCleanDataProps {
dispatchMsgToEditor?: (msg: any) => void;
activeLabels?: string[];
showStatus?: boolean;
router?: any;
}
8 changes: 7 additions & 1 deletion src/custom/ResourceDetailFormatters/useResourceCleanData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export const useResourceCleanData = () => {
resource,
activeLabels,
dispatchMsgToEditor,
router,
showStatus = true
}: GetResourceCleanDataProps) => {
const parsedStatus = resource?.status?.attribute && JSON.parse(resource?.status?.attribute);
Expand Down Expand Up @@ -108,8 +109,13 @@ export const useResourceCleanData = () => {
links: [
{ nodeName: parsedSpec?.nodeName, label: 'Node' },
{ namespace: resource?.metadata?.namespace, label: 'Namespace' },
{ serviceAccount: parsedSpec?.serviceAccountName, label: 'ServiceAccount' }
{
serviceAccount: parsedSpec?.serviceAccountName,
label: 'ServiceAccount',
resourceCategory: 'Security'
}
],
router: router,
dispatchMsgToEditor: dispatchMsgToEditor
},
selector: parsedSpec?.selector?.matchLabels
Expand Down

0 comments on commit 3b058e0

Please sign in to comment.