[UI] reflect new backup paths and cluster status (#1260)

* [UI] reflect new backup paths and cluster status
This commit is contained in:
Felix Kunde
2020-12-16 15:23:06 +01:00
committed by GitHub
parent 77252e316c
commit 636ba9b846
4 changed files with 34 additions and 19 deletions
+6 -1
View File
@@ -74,11 +74,13 @@ postgresql
.alert.alert-info(if='{ !progress.requestStatus }') PostgreSQL cluster requested
.alert.alert-danger(if='{ progress.requestStatus !== "OK" }') Create request failed
.alert.alert-success(if='{ progress.requestStatus === "OK" }') Create request successful ({ new Date(progress.createdTimestamp).toLocaleString() })
.alert.alert-success(if='{ progress.requestStatus === "OK" }') Manifest creation successful ({ new Date(progress.createdTimestamp).toLocaleString() })
.alert.alert-info(if='{ !progress.postgresql }') PostgreSQL cluster manifest pending
.alert.alert-success(if='{ progress.postgresql }') PostgreSQL cluster manifest created
.alert.alert-danger(if='{progress.status && progress.status.PostgresClusterStatus == "CreateFailed"}') Cluster creation failed: Check events and cluster name!
.alert.alert-info(if='{ !progress.statefulSet }') StatefulSet pending
.alert.alert-success(if='{ progress.statefulSet }') StatefulSet created
@@ -127,6 +129,8 @@ postgresql
this.progress.pooler = false
this.progress.postgresql = true
this.progress.postgresqlManifest = data
// copy status as we delete later for edit
this.progress.status = data.status
this.progress.createdTimestamp = data.metadata.creationTimestamp
this.progress.poolerEnabled = data.spec.enableConnectionPooler
this.uid = this.progress.postgresqlManifest.metadata.uid
@@ -203,6 +207,7 @@ postgresql
delete manifest.metadata.annotations[last_applied]
}
delete manifest.metadata.managedFields
delete manifest.metadata.creationTimestamp
delete manifest.metadata.deletionGracePeriodSeconds
delete manifest.metadata.deletionTimestamp
+3 -5
View File
@@ -63,10 +63,8 @@ postgresqls
td(style='white-space: pre')
| { namespace }
td
a(
href='/#/status/{ cluster_path(this) }'
)
| { name }
a(href='/#/status/{ cluster_path(this) }') { name }
btn.btn-danger(if='{status.PostgresClusterStatus == "CreateFailed"}') Create Failed
td { nodes }
td { cpu } / { cpu_limit }
td { memory } / { memory_limit }
@@ -230,7 +228,7 @@ postgresqls
)
const calcCosts = this.calcCosts = (nodes, cpu, memory, disk) => {
costs = nodes * (toCores(cpu) * opts.config.cost_core + toMemory(memory) * opts.config.cost_memory + toDisk(disk) * opts.config.cost_ebs)
costs = Math.max(nodes, opts.config.min_pods) * (toCores(cpu) * opts.config.cost_core + toMemory(memory) * opts.config.cost_memory + toDisk(disk) * opts.config.cost_ebs)
return costs.toFixed(2)
}