Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export class CreateEditCronjobComponent implements OnInit {
this.cronjobService.getById(id, this.app.id).subscribe(
status => {
this.cronjob = status.data;
this.cronjob.metaData = this.cronjob.metaData ? this.cronjob.metaData : '{}';
if (this.clusters && this.clusters.length > 0) {
const replicas = JSON.parse(this.cronjob.metaData)['replicas'];
for (const clu of this.clusters) {
Expand All @@ -77,7 +78,7 @@ export class CreateEditCronjobComponent implements OnInit {
this.clusterMetas[clu.name] = culsterMeta;
}
}
const metaData = JSON.parse(this.cronjob.metaData ? this.cronjob.metaData : '{}');
const metaData = JSON.parse(this.cronjob.metaData);
this.resourceLimitComponent.setValue(metaData['resources']);
},
error => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ export class CreateEditDeploymentComponent implements OnInit {
this.deploymentService.getById(id, app.id).subscribe(
status => {
this.deployment = status.data;
const metaData = JSON.parse(this.deployment.metaData ? this.deployment.metaData : '{}');
this.deployment.metaData = this.deployment.metaData ? this.deployment.metaData : '{}';
const metaData = JSON.parse(this.deployment.metaData);
if (this.clusters && this.clusters.length > 0) {
const replicas = metaData['replicas'];
for (const clu of this.clusters) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export class CreateEditStatefulsetComponent implements OnInit {
this.statefulsetService.getById(id, app.id).subscribe(
status => {
this.statefulset = status.data;
this.statefulset.metaData = this.statefulset.metaData ? this.statefulset.metaData : '{}';
if (this.clusters && this.clusters.length > 0) {
const replicas = JSON.parse(this.statefulset.metaData)['replicas'];
for (const clu of this.clusters) {
Expand Down
1 change: 1 addition & 0 deletions src/frontend/src/assets/i18n/zh-Hans.json
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@
}
},
"LIMIT": {
"DEPLOYMENT": "副本份数不能超过",
"MEMORY": "内存限制",
"STATEFULSET": "状态副本集份数超过系统最大限制"
},
Expand Down