Enforce semicolons in eslint

Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
This commit is contained in:
Panu Horsmalahti committed 2020-11-19 16:35:04 +02:00
1 parent 0f3f5611ba
commit 1477bb8274
531 files changed
+3979 -3975

No files matched your search

@@ -193,12 +193,12 @@ export class AddQuotaDialog extends React.Component<Props> {
<div className="value">{value}</div>
<Icon material="clear" onClick={() => this.quotas[quota] = ""} />
</div>
)
);
})}
</div>
</WizardStep>
</Wizard>
</Dialog>
)
);
}
}
@@ -1,3 +1,3 @@
export * from "./resource-quotas.route"
export * from "./resource-quotas"
export * from "./resource-quota-details"
export * from "./resource-quotas.route";
export * from "./resource-quotas";
export * from "./resource-quota-details";
@@ -20,24 +20,24 @@ const onlyNumbers = /$[0-9]*^/g;
function transformUnit(name: string, value: string): number {
if (name.includes("memory") || name.includes("storage")) {
return unitsToBytes(value)
return unitsToBytes(value);
}
if (name.includes("cpu")) {
return cpuUnitsToNumber(value)
return cpuUnitsToNumber(value);
}
return metricUnitsToNumber(value);
}
function renderQuotas(quota: ResourceQuota): JSX.Element[] {
const { hard = {}, used = {} } = quota.status
const { hard = {}, used = {} } = quota.status;
return Object.entries(hard)
.filter(([name]) => used[name])
.map(([name, value]) => {
const current = transformUnit(name, used[name])
const max = transformUnit(name, value)
const current = transformUnit(name, used[name]);
const max = transformUnit(name, value);
const usage = max === 0 ? 100 : Math.ceil(current / max * 100); // special case 0 max as always 100% usage
return (
@@ -52,8 +52,8 @@ function renderQuotas(quota: ResourceQuota): JSX.Element[] {
}
/>
</div>
)
})
);
});
}
@observer
@@ -104,4 +104,4 @@ kubeObjectDetailRegistry.add({
components: {
Details: (props) => <ReplicaSetDetails {...props} />
}
})
});
@@ -3,7 +3,7 @@ import { buildURL } from "../../../common/utils/buildUrl";
export const resourceQuotaRoute: RouteProps = {
path: "/resourcequotas"
}
};
export interface IResourceQuotaRouteParams {
}