Arc Postgres - Rename shards to workers

Co-authored-by: Brian Bergeron <brberger@microsoft.com>
This commit is contained in:
Brian Bergeron
2020-10-28 16:57:17 -07:00
committed by GitHub
parent e679d70a4b
commit d1b8c15e11
7 changed files with 12 additions and 147 deletions

View File

@@ -387,17 +387,14 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
}
private editWorkerNodeCount() {
let currentShards = this._postgresModel.config?.spec.scale.shards;
if (!currentShards) {
this.workerBox!.min = 0;
this.workerBox!.placeHolder = '';
} else {
this.workerBox!.min = currentShards;
this.workerBox!.placeHolder = currentShards!.toString();
}
// scale.shards was renamed to scale.workers. Check both for backwards compatibility.
let scale = this._postgresModel.config?.spec.scale;
let currentWorkers = scale?.workers ?? scale?.shards ?? 0;
this.workerBox!.min = currentWorkers;
this.workerBox!.placeHolder = currentWorkers.toString();
this.workerBox!.value = '';
this.saveArgs.workers = undefined;
}