mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix bugs
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
acf03da3af
commit
584f0622ca
@ -174,11 +174,14 @@ export class MetricsSettings extends React.Component<Props> {
|
||||
}
|
||||
|
||||
@computed get buttonLabel() {
|
||||
const allDisabled = !this.featureStates.kubeStateMetrics && !this.featureStates.nodeExporter && !this.featureStates.prometheus;
|
||||
|
||||
if (this.inProgress && this.canUpgrade) return "Upgrading ...";
|
||||
if (this.inProgress && allDisabled) return "Uninstalling ...";
|
||||
if (this.inProgress) return "Applying ...";
|
||||
if (this.canUpgrade) return "Upgrade";
|
||||
|
||||
if (this.changed && !this.featureStates.kubeStateMetrics && !this.featureStates.nodeExporter && !this.featureStates.prometheus) {
|
||||
if (this.changed && allDisabled) {
|
||||
return "Uninstall";
|
||||
}
|
||||
|
||||
|
||||
@ -131,7 +131,7 @@ export class ResourceStack {
|
||||
resourceData = raw.toString();
|
||||
}
|
||||
|
||||
if (!resourceData.trim()) return;
|
||||
if (!resourceData.trim()) continue;
|
||||
|
||||
const resourceArray = yaml.safeLoadAll(resourceData.toString());
|
||||
|
||||
|
||||
@ -83,9 +83,9 @@ export class EntitySettings extends React.Component<Props> {
|
||||
{ groups.map((group) => (
|
||||
<>
|
||||
<div className="header">{group[0]}</div>
|
||||
{ group[1].map((setting) => (
|
||||
{ group[1].map((setting, index) => (
|
||||
<Tab
|
||||
key={setting.id}
|
||||
key={index}
|
||||
value={setting.id}
|
||||
label={setting.title}
|
||||
data-testid={`${setting.id}-tab`}
|
||||
@ -124,7 +124,7 @@ export class EntitySettings extends React.Component<Props> {
|
||||
<section>
|
||||
<h2 data-testid={`${activeSetting.id}-header`}>{activeSetting.title}</h2>
|
||||
<section>
|
||||
<activeSetting.components.View entity={this.entity} />
|
||||
<activeSetting.components.View entity={this.entity} key={activeSetting.title} />
|
||||
</section>
|
||||
</section>
|
||||
</PageLayout>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user