-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Display of UI and functional integration in Kube Panel (#4365)
* feat: Replaced mobx with zustand * fix: displayed wrong time and info * fix: The content of badge overflow * style: Collected theme and added dumpKubeObject function
- Loading branch information
Showing
9 changed files
with
64 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { ThemeConfig } from 'antd'; | ||
|
||
export const theme: ThemeConfig = { | ||
components: { | ||
Menu: { | ||
itemSelectedBg: '#9699B41A', | ||
itemColor: '#485058' | ||
}, | ||
Collapse: { | ||
headerPadding: 0 | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { KubeObject } from '@/k8slens/kube-object'; | ||
import { dump } from 'js-yaml'; | ||
import { PartialDeep } from 'type-fest'; | ||
|
||
export function dumpKubeObject<K extends KubeObject = KubeObject>(obj: PartialDeep<K>) { | ||
const objWithoutFunction: Record<string, any> = {}; | ||
for (const [key, value] of Object.entries(obj)) { | ||
if (typeof value !== 'function') { | ||
objWithoutFunction[key] = value; | ||
} | ||
} | ||
return dump(objWithoutFunction); | ||
} |