1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman 2020-11-27 15:07:50 +02:00
parent 6f02e269f1
commit c04887964c

View File

@ -331,7 +331,7 @@ export class AddCluster extends React.Component {
}; };
render() { render() {
const disableSubmit = this.selectedContexts.length === 0; const submitDisabled = this.selectedContexts.length === 0;
return ( return (
<DropFileInput onDropFiles={this.onDropKubeConfig}> <DropFileInput onDropFiles={this.onDropKubeConfig}>
<PageLayout className="AddClusters" header={<h2>Add Clusters</h2>}> <PageLayout className="AddClusters" header={<h2>Add Clusters</h2>}>
@ -365,11 +365,11 @@ export class AddCluster extends React.Component {
<div className="actions-panel"> <div className="actions-panel">
<Button <Button
primary primary
disabled={disableSubmit} disabled={submitDisabled}
label={this.selectedContexts.length < 2 ? <Trans>Add cluster</Trans> : <Trans>Add clusters</Trans>} label={this.selectedContexts.length < 2 ? <Trans>Add cluster</Trans> : <Trans>Add clusters</Trans>}
onClick={this.addClusters} onClick={this.addClusters}
waiting={this.isWaiting} waiting={this.isWaiting}
tooltip={disableSubmit ? _i18n._("Select at least one cluster to add.") : undefined} tooltip={submitDisabled ? _i18n._("Select at least one cluster to add.") : undefined}
tooltipOverrideDisabled tooltipOverrideDisabled
/> />
</div> </div>