Sync kubeconfigs from catalog (#3573)

* Kubeconfig syncs from Catalog

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Allow to select directory to sync

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Convert Preferences to Route-based component

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Jump from notification to Preferences

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Adding navigateWithoutHistoryChange() method

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Cleaning up

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fixing integration tests (no check for Telemetry tab)

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fixing tests harder

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev authored and GitHub committed 2021-08-11 13:24:33 +03:00
1 parent 2760178196
commit b7be3ae21a
22 files changed
+672 -317

No files matched your search

@@ -73,9 +73,10 @@ export class CatalogAddButton extends React.Component<CatalogAddButtonProps> {
@boundMethod
onButtonClick() {
if (this.menuItems.length == 1) {
this.menuItems[0].onClick();
}
const defaultAction = this.menuItems.find(item => item.defaultAction)?.onClick;
const clickAction = defaultAction || (this.menuItems.length === 1 ? this.menuItems[0].onClick : null);
clickAction?.();
}
render() {
@@ -97,9 +98,12 @@ export class CatalogAddButton extends React.Component<CatalogAddButtonProps> {
{ this.menuItems.map((menuItem, index) => {
return <SpeedDialAction
key={index}
icon={<Icon material={menuItem.icon} />}
icon={<Icon material={menuItem.icon}/>}
tooltipTitle={menuItem.title}
onClick={() => menuItem.onClick()}
onClick={(evt) => {
evt.stopPropagation();
menuItem.onClick();
}}
TooltipClasses={{
popper: "catalogSpeedDialPopper"
}}