Add eslint rule padding-line-between-statements (#1593)

Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
This commit is contained in:
Panu Horsmalahti authored and GitHub committed 2020-12-02 09:55:52 +02:00
1 parent 7b77f18376
commit dcf253e7d5
401 files changed
+2018 -40

No files matched your search

@@ -44,6 +44,7 @@ export class DeploymentScaleDialog extends Component<Props> {
@computed get scaleMax() {
const { currentReplicas } = this;
const defaultMax = 50;
return currentReplicas <= defaultMax
? defaultMax * 2
: currentReplicas * 2;
@@ -51,6 +52,7 @@ export class DeploymentScaleDialog extends Component<Props> {
onOpen = async () => {
const { deployment } = this;
this.currentReplicas = await deploymentApi.getReplicas({
namespace: deployment.getNs(),
name: deployment.getName(),
@@ -70,6 +72,7 @@ export class DeploymentScaleDialog extends Component<Props> {
scale = async () => {
const { deployment } = this;
const { currentReplicas, desiredReplicas, close } = this;
try {
if (currentReplicas !== desiredReplicas) {
await deploymentApi.scale({
@@ -94,6 +97,7 @@ export class DeploymentScaleDialog extends Component<Props> {
renderContents() {
const { currentReplicas, desiredReplicas, onChange, scaleMax } = this;
const warning = currentReplicas < 10 && desiredReplicas > 90;
return (
<>
<div className="current-scale" data-testid="current-scale">
@@ -137,6 +141,7 @@ export class DeploymentScaleDialog extends Component<Props> {
<Trans>Scale Deployment <span>{deploymentName}</span></Trans>
</h5>
);
return (
<Dialog
{...dialogProps}