mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix SwitchCase indent rule in eslint (#1454)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
d7cba7d4d6
commit
43976f5bd9
22 files changed
+406
-400
No files matched your search
@@ -26,30 +26,30 @@ export class HpaDetails extends React.Component<Props> {
|
||||
|
||||
const renderName = (metric: IHpaMetric) => {
|
||||
switch (metric.type) {
|
||||
case HpaMetricType.Resource:
|
||||
const addition = metric.resource.targetAverageUtilization ? <Trans>(as a percentage of request)</Trans> : "";
|
||||
return <Trans>Resource {metric.resource.name} on Pods {addition}</Trans>;
|
||||
case HpaMetricType.Resource:
|
||||
const addition = metric.resource.targetAverageUtilization ? <Trans>(as a percentage of request)</Trans> : "";
|
||||
return <Trans>Resource {metric.resource.name} on Pods {addition}</Trans>;
|
||||
|
||||
case HpaMetricType.Pods:
|
||||
return <Trans>{metric.pods.metricName} on Pods</Trans>;
|
||||
case HpaMetricType.Pods:
|
||||
return <Trans>{metric.pods.metricName} on Pods</Trans>;
|
||||
|
||||
case HpaMetricType.Object:
|
||||
const { target } = metric.object;
|
||||
const { kind, name } = target;
|
||||
const objectUrl = getDetailsUrl(lookupApiLink(target, hpa));
|
||||
return (
|
||||
<Trans>
|
||||
{metric.object.metricName} on{" "}
|
||||
<Link to={objectUrl}>{kind}/{name}</Link>
|
||||
</Trans>
|
||||
);
|
||||
case HpaMetricType.External:
|
||||
return (
|
||||
<Trans>
|
||||
{metric.external.metricName} on{" "}
|
||||
{JSON.stringify(metric.external.selector)}
|
||||
</Trans>
|
||||
);
|
||||
case HpaMetricType.Object:
|
||||
const { target } = metric.object;
|
||||
const { kind, name } = target;
|
||||
const objectUrl = getDetailsUrl(lookupApiLink(target, hpa));
|
||||
return (
|
||||
<Trans>
|
||||
{metric.object.metricName} on{" "}
|
||||
<Link to={objectUrl}>{kind}/{name}</Link>
|
||||
</Trans>
|
||||
);
|
||||
case HpaMetricType.External:
|
||||
return (
|
||||
<Trans>
|
||||
{metric.external.metricName} on{" "}
|
||||
{JSON.stringify(metric.external.selector)}
|
||||
</Trans>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user