mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Minor ClusterSettings fixes
Signed-off-by: alexfront <alex.andreev.email@gmail.com>
This commit is contained in:
parent
29dc7587f0
commit
b4172b3982
@ -28,7 +28,9 @@ export class InstallFeature extends React.Component<Props> {
|
|||||||
<Button
|
<Button
|
||||||
primary
|
primary
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onClick={this.runAction("upgradeFeature")}
|
onClick={this.runAction(() =>
|
||||||
|
clusterIpc.upgradeFeature.invokeFromRenderer(cluster.id, feature))
|
||||||
|
}
|
||||||
>
|
>
|
||||||
Upgrade
|
Upgrade
|
||||||
</Button>
|
</Button>
|
||||||
@ -37,7 +39,9 @@ export class InstallFeature extends React.Component<Props> {
|
|||||||
<Button
|
<Button
|
||||||
accent
|
accent
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onClick={this.runAction("uninstallFeature")}
|
onClick={this.runAction(() =>
|
||||||
|
clusterIpc.uninstallFeature.invokeFromRenderer(cluster.id, feature))
|
||||||
|
}
|
||||||
>
|
>
|
||||||
Uninstall
|
Uninstall
|
||||||
</Button>
|
</Button>
|
||||||
@ -46,7 +50,9 @@ export class InstallFeature extends React.Component<Props> {
|
|||||||
<Button
|
<Button
|
||||||
primary
|
primary
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onClick={this.runAction("installFeature")}
|
onClick={this.runAction(() =>
|
||||||
|
clusterIpc.installFeature.invokeFromRenderer(cluster.id, feature))
|
||||||
|
}
|
||||||
>
|
>
|
||||||
Install
|
Install
|
||||||
</Button>
|
</Button>
|
||||||
@ -57,12 +63,12 @@ export class InstallFeature extends React.Component<Props> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
runAction(action: keyof typeof clusterIpc): () => Promise<void> {
|
runAction(action: () => Promise<any>): () => Promise<void> {
|
||||||
return async () => {
|
return async () => {
|
||||||
const { cluster, feature } = this.props;
|
const { cluster, feature } = this.props;
|
||||||
try {
|
try {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
await clusterIpc[action].invokeFromRenderer(cluster.id, feature);
|
await action();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
Notifications.error(err.toString());
|
Notifications.error(err.toString());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,8 +22,7 @@ export class RemoveClusterButton extends React.Component<Props> {
|
|||||||
labelOk: <Trans>Yes</Trans>,
|
labelOk: <Trans>Yes</Trans>,
|
||||||
labelCancel: <Trans>No</Trans>,
|
labelCancel: <Trans>No</Trans>,
|
||||||
ok: async () => {
|
ok: async () => {
|
||||||
await clusterIpc.disconnect.invokeFromRenderer(cluster.id);
|
await clusterStore.removeById(cluster.id);
|
||||||
await clusterStore.removeById(cluster.id);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,7 +43,7 @@ export enum OverTotalSizeLimitStyle {
|
|||||||
|
|
||||||
export interface BaseProps {
|
export interface BaseProps {
|
||||||
accept?: string;
|
accept?: string;
|
||||||
label: React.ReactElement;
|
label: React.ReactNode;
|
||||||
multiple?: boolean;
|
multiple?: boolean;
|
||||||
|
|
||||||
// limit is the optional maximum number of files to upload
|
// limit is the optional maximum number of files to upload
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user