Skip to content

Commit

Permalink
ui/volume: reformat the indentation
Browse files Browse the repository at this point in the history
update the indentation to meet the setting for vscode

Refs: #2245
  • Loading branch information
ChengYanJin committed Feb 19, 2020
1 parent 958f6ad commit 42def8b
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions ui/src/services/NodeVolumesUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export const isVolumeDeletable = (rowData, persistentVolumes) => {
}
};


// Compute the global status of a volume from its conditions.
//
// Arguments
Expand All @@ -79,28 +78,28 @@ export const computeVolumeGlobalStatus = (name, status) => {
const condStatus = condition?.status;
const condReason = condition?.reason;

switch(condStatus) {
case 'True':
return STATUS_AVAILABLE;
case 'False':
return STATUS_FAILED;
case 'Unknown':
switch(condReason) {
case 'Pending':
return STATUS_PENDING;
case 'Terminating':
return STATUS_TERMINATING;
switch (condStatus) {
case 'True':
return STATUS_READY;
case 'False':
return STATUS_FAILED;
case 'Unknown':
switch (condReason) {
case 'Pending':
return STATUS_PENDING;
case 'Terminating':
return STATUS_TERMINATING;
default:
console.error(
`Unexpected Ready reason for Volume ${name}: ${condReason}`,
);
return STATUS_UNKNOWN;
}
default:
console.error(
`Unexpected Ready reason for Volume ${name}: ${condReason}`,
`Unexpected Ready status for Volume ${name}: ${condStatus}`,
);
return STATUS_UNKNOWN;
}
default:
console.error(
`Unexpected Ready status for Volume ${name}: ${condStatus}`,
);
return STATUS_UNKNOWN;
}
};

Expand Down

0 comments on commit 42def8b

Please sign in to comment.