Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prompt the user background to assign Namespace machine room #144

Merged
merged 10 commits into from
Dec 14, 2018
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ <h3 class="header-title">{{'CONFIGMAP.CREATE_TMP' | translate}}</h3>
<section class="form-block wrap">
<div *ngIf="clusters" formArrayName="clusters" class="form-group form-group-padding">
<label class="col-md-3 form-group-label-override required">{{'TITLE.CLUSTER' | translate}}</label>
<span class="warning-text" *ngIf="!clusters || clusters && clusters.length === 0">{{'CONFIGMAP.CREATE_EDIT_TMP.CLUSTER_MESSAGE' | translate}}</span>
<div *ngFor="let cluster of clusters;let i=index"
style="padding-right: 15px" class="checkbox-inline"
[formGroupName]="i">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ <h3 class="modal-title">{{title}}</h3>
</div>
<div class="form-group" style="padding-left: 135px;">
<label class="col-md-3 form-group-label-override required">{{'TITLE.CLUSTER' | translate}}</label>
<span class="warning-text" *ngIf="!clusters || clusters && clusters.length === 0">{{'CRONJOB.CREATE_EDIT.CLUSTER_MESSAGE' | translate}}</span>
<div *ngFor="let cluster of clusters" class="checkbox-inline">
<div class="checkbox">
<input [(ngModel)]="clusterMetas[cluster.name].checked"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ <h3 class="modal-title">{{title | translate}}</h3>
</div>
<div class="form-group" style="padding-left: 135px;">
<label class="col-md-3 form-group-label-override required">{{'TITLE.CLUSTER' | translate}}</label>
<span class="warning-text" *ngIf="!clusters || clusters && clusters.length === 0">{{'DAEMONSET.CREATE_EDIT.CLUSTER_MESSAGE' | translate}}</span>
<div *ngFor="let cluster of clusters" style="padding-right: 15px" class="checkbox-inline">
<input [(ngModel)]="cluster['checked']"
type="checkbox"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ <h3 class="modal-title">{{title}}</h3>
</div>
<div class="form-group" style="padding-left: 135px;">
<label class="col-md-3 form-group-label-override required">{{'TITLE.CLUSTER' | translate}}</label>
<span class="warning-text" *ngIf="!clusters || clusters && clusters.length === 0">{{'DEPLOYMENT.CREATE_EDIT.CLUSTER_MESSAGE' | translate}}</span>
<div *ngFor="let cluster of clusters" class="checkbox-inline">
<div class="checkbox">
<input [(ngModel)]="clusterMetas[cluster.name].checked"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ <h3 class="modal-title">{{title}}</h3>
</div>
<div class="form-group" style="padding-left: 135px;">
<label class="col-md-3 form-group-label-override required">机房</label>
<span class="warning-text" *ngIf="!clusters || clusters && clusters.length === 0">{{'INGRESS.CREATE_EDIT.CLUSTER_MESSAGE' | translate}}</span>
<div *ngFor="let cluster of clusters" style="padding-right: 15px" class="checkbox-inline">
<input [(ngModel)]="cluster['checked']"
type="checkbox"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ <h3 class="header-title">{{'PVC.CREATE_TMP' | translate}}</h3>
<section class="form-block wrap">
<div *ngIf="clusters" formArrayName="clusters" class="form-group form-group-padding">
<label class="col-md-3 form-group-label-override required">{{'TITLE.CLUSTER' | translate}}</label>
<span class="warning-text" *ngIf="!clusters || clusters && clusters.length === 0">{{'PVC.CREATE_EDIT.CLUSTER_MESSAGE' | translate}}</span>
<div *ngFor="let cluster of clusters;let i=index"
style="padding-right: 15px" class="checkbox-inline"
[formGroupName]="i">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ <h3 class="header-title">{{'SECRET.CREATE_TMP' | translate}}</h3>
<section class="form-block wrap">
<div *ngIf="clusters" formArrayName="clusters" class="form-group form-group-padding">
<label class="col-md-3 form-group-label-override required">{{'TITLE.CLUSTER' | translate}}</label>
<span class="warning-text" *ngIf="!clusters || clusters && clusters.length === 0">{{'SECRET.CREATE_EDIT.CLUSTER_MESSAGE' | translate}}</span>
<div *ngFor="let cluster of clusters;let i=index"
style="padding-right: 15px" class="checkbox-inline"
[formGroupName]="i">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ <h3 class="modal-title">{{title}}</h3>
</div>
<div class="form-group" style="padding-left: 135px;">
<label class="col-md-3 form-group-label-override required">{{'TITLE.CLUSTER' | translate}}</label>
<span class="warning-text" *ngIf="!clusters || clusters && clusters.length === 0">{{'STATEFULSET.CREATE_EDIT.CLUSTER_MESSAGE' | translate}}</span>
<div *ngFor="let cluster of clusters" class="checkbox-inline">
<div class="checkbox">
<input [(ngModel)]="clusterMetas[cluster.name].checked"
Expand Down
42 changes: 34 additions & 8 deletions src/frontend/src/assets/i18n/zh-Hans.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
"DEPARTMENT_NAME": "部门名称",
"CREATE_TIME": "创建时间",
"CPU_USAGE": "CPU 使用(核)",
"CPU_USAGE_SHORT": "CPU使用(核)",
"CPU_USAGE_SHORT": "CPU 使用(核)",
BennieMeng marked this conversation as resolved.
Show resolved Hide resolved
"MEMORY_USAGE": "内存使用(G)",
"MEMORY_USAGE_SHORT": "内存使用(G)",
"DEPLOY_FREQ": "部署上线频数",
Expand Down Expand Up @@ -339,26 +339,38 @@
"CREATE_TMP": "创建部署模板",
"EDIT": "编辑部署",
"DELETE": "删除部署",
"NUM": "部署份数"
"NUM": "部署份数",
"CREATE_EDIT": {
"CLUSTER_MESSAGE": "需要先在后台配置 Namespace 可用集群才可以创建部署"
}
},
"STATEFULSET": {
"TITLE": "状态副本集",
"CREATE": "创建状态副本集",
"CREATE_TMP": "创建状态副本集模板",
"EDIT": "编辑状态副本集",
"DELETE": "删除状态副本集"
"DELETE": "删除状态副本集",
"CREATE_EDIT": {
"CLUSTER_MESSAGE": "需要先在后台配置 Namespace 可用集群才可以创建部署"
BennieMeng marked this conversation as resolved.
Show resolved Hide resolved
}
},
"DAEMONSET": {
"CREATE": "创建守护进程集",
"CREATE_TMP": "创建守护进程集模板",
"EDIT": "编辑守护进程集",
"DELETE": "删除守护进程集"
"DELETE": "删除守护进程集",
"CREATE_EDIT": {
"CLUSTER_MESSAGE": "需要先在后台配置 Namespace 可用集群才可以创建部署"
}
},
"CRONJOB": {
"CREATE": "创建计划任务",
"CREATE_TMP": "创建计划任务模板",
"EDIT": "编辑计划任务",
"DELETE": "删除计划任务",
"CREATE_EDIT": {
"CLUSTER_MESSAGE": "需要先在后台配置 Namespace 可用集群才可以创建部署"
},
"LIST": "计划任务列表",
"DELETE_LIST": "已删除计划任务列表",
"CONFIG": "计划任务配置",
Expand All @@ -377,17 +389,28 @@
"GROUP": "所属集群",
"FAIL_REASON": "失败原因"
},
"INGRESS": {
"CREATE_EDIT": {
"CLUSTER_MESSAGE": "需要先在后台配置 Namespace 可用集群才可以创建部署"
}
},
"CONFIGMAP": {
"CREATE": "创建配置集",
"CREATE_TMP": "创建配置集模板",
"EDIT": "编辑配置集",
"DELETE": "删除配置集"
"DELETE": "删除配置集",
"CREATE_EDIT_TMP": {
"CLUSTER_MESSAGE": "需要先在后台配置 Namespace 可用集群才可以创建部署"
}
},
"SECRET": {
"CREATE": "创建加密字典",
"CREATE_TMP": "创建加密字典模板",
"EDIT": "编辑加密字典",
"DELETE": "删除加密字典"
"DELETE": "删除加密字典",
"CREATE_EDIT_TMP": {
"CLUSTER_MESSAGE": "需要先在后台配置 Namespace 可用集群才可以创建部署"
}
},
"PVC": {
"CREATE": "创建 PVC",
Expand All @@ -414,7 +437,10 @@
"SIZE": "大小",
"DELETE_SNAPSHOOT": "删除快照",
"ROLLBACK_SNAPSHOOT": "回滚快照",
"RECORD": "共{{value}}条快照记录"
"RECORD": "共{{value}}条快照记录",
"CREATE_EDIT_TMP": {
"CLUSTER_MESSAGE": "需要先在后台配置 Namespace 可用集群才可以创建部署"
}
},
"WEBHOOK": {
"TITLE": "{{ value }}列表",
Expand All @@ -425,4 +451,4 @@
},
"OTHER": "其他",
"OF": "的"
}
}
4 changes: 4 additions & 0 deletions src/frontend/src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ textarea {
resize: auto !important;
}

.warning-text{
color: red;
}

/* 设置滚动条的样式 */
::-webkit-scrollbar {
width: 8px;
Expand Down