Commit bf732f9b authored by yating.lin's avatar yating.lin

增加默认InfluxDB的存储策略不能被修改的处理

parent 22da2b90
Pipeline #1042 passed with stage
in 0 seconds
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
<td nz-td>{{one.remark}}</td> <td nz-td>{{one.remark}}</td>
<td nz-td> <td nz-td>
<span class="editSpan" (click)="onPolicyMgr(one)">{{'retentionPolicyMgr' | translate}}</span> <span class="editSpan" (click)="onPolicyMgr(one)">{{'retentionPolicyMgr' | translate}}</span>
<nz-divider nzType="vertical"></nz-divider> <nz-divider nzType="vertical" *ngIf="0 == one.defaultDatabase"></nz-divider>
<span class="editSpan" (click)="edit(one)" >{{'edit' | translate}}</span> <span class="editSpan" *ngIf="0 == one.defaultDatabase" (click)="edit(one)" >{{'edit' | translate}}</span>
<nz-divider nzType="vertical" *ngIf="0 == one.defaultDatabase"></nz-divider> <nz-divider nzType="vertical" *ngIf="0 == one.defaultDatabase"></nz-divider>
<span class="deleteFontColor" *ngIf="0 == one.defaultDatabase" <span class="deleteFontColor" *ngIf="0 == one.defaultDatabase"
(click)="deleteConfirm(one)">{{'delete' | translate}}</span> (click)="deleteConfirm(one)">{{'delete' | translate}}</span>
......
...@@ -85,7 +85,7 @@ export class InfluxdbComponent implements OnInit { ...@@ -85,7 +85,7 @@ export class InfluxdbComponent implements OnInit {
onPolicyMgr(one) { onPolicyMgr(one) {
this.router.navigate(['/app/systemMgr/influxdbMgr/retentionPolicyMgr'], this.router.navigate(['/app/systemMgr/influxdbMgr/retentionPolicyMgr'],
{queryParams: {influxdbDatabaseNo: one.influxdbDatabaseNo}}); {queryParams: {influxdbDatabaseNo: one.influxdbDatabaseNo, defaultDatabase: one.defaultDatabase}});
} }
edit(one) { edit(one) {
this.isUpdate = true; this.isUpdate = true;
......
<div class="searchBar" @fade> <div class="searchBar" @fade *ngIf="defaultDatabase == 0">
<div class="btnLine"> <div class="btnLine" >
<button nz-button class="searchBtn" [nzLoading]="isLoading" (click)="add()"><span>{{'add' | translate}}</span></button> <button nz-button class="searchBtn" [nzLoading]="isLoading" (click)="add()" ><span>{{'add' | translate}}</span></button>
</div> </div>
</div> </div>
<div class="tableBar" @fade> <div class="tableBar" @fade>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<th nz-th><span>{{'isDefault' | translate}}</span></th> <th nz-th><span>{{'isDefault' | translate}}</span></th>
<th nz-th><span>{{'shardDuration' | translate}}</span></th> <th nz-th><span>{{'shardDuration' | translate}}</span></th>
<th nz-th><span>{{'remark' | translate}}</span></th> <th nz-th><span>{{'remark' | translate}}</span></th>
<th nz-th><span>{{'oper' | translate}}</span></th> <th nz-th *ngIf="defaultDatabase == 0"><span>{{'oper' | translate}}</span></th>
</tr> </tr>
</thead> </thead>
<tbody nz-tbody> <tbody nz-tbody>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<td nz-td><div *ngIf="1 === one.defaultPolicy"></div><div *ngIf="0 === one.defaultPolicy"></div></td> <td nz-td><div *ngIf="1 === one.defaultPolicy"></div><div *ngIf="0 === one.defaultPolicy"></div></td>
<td nz-td>{{one.shardDuration}}</td> <td nz-td>{{one.shardDuration}}</td>
<td nz-td>{{one.remark}}</td> <td nz-td>{{one.remark}}</td>
<td nz-td> <td nz-td *ngIf="defaultDatabase == 0">
<span class="editSpan" (click)="onSetDefalut(one)">{{'setAsDefault' | translate}}</span> <span class="editSpan" (click)="onSetDefalut(one)">{{'setAsDefault' | translate}}</span>
<nz-divider nzType="vertical"></nz-divider> <nz-divider nzType="vertical"></nz-divider>
<span class="editSpan" (click)="edit(one)">{{'edit' | translate}}</span> <span class="editSpan" (click)="edit(one)">{{'edit' | translate}}</span>
...@@ -47,7 +47,9 @@ ...@@ -47,7 +47,9 @@
<app-search-item isMust="true" [label]="'popDuration' | translate" inModal="true" <app-search-item isMust="true" [label]="'popDuration' | translate" inModal="true"
[(value)]="req.duration" [type]="'number'"></app-search-item> [(value)]="req.duration" [type]="'number'"></app-search-item>
<app-search-select isMust="true" [(value)]="req.defaultPolicy" [label]="'isDefault' | translate" inModal="true" <app-search-select isMust="true" [(value)]="req.defaultPolicy" [label]="'isDefault' | translate" inModal="true"
[data]="[{opLabel: '是', opValue: 1}, {opLabel: '否', opValue: 0}]" optL="opLabel" optV="opValue"></app-search-select> [data]="[{opLabel: '是', opValue: 1}, {opLabel: '否', opValue: 0}]"
optL="opLabel" optV="opValue"
*ngIf="!isUpdate"></app-search-select>
<app-search-item isMust="true" [label]="'popShardDuration' | translate" inModal="true" <app-search-item isMust="true" [label]="'popShardDuration' | translate" inModal="true"
[(value)]="req.shardDuration" [type]="'number'" ></app-search-item> [(value)]="req.shardDuration" [type]="'number'" ></app-search-item>
<app-search-item [(value)]="req.remark" [label]="'remark' | translate" inModal="true"></app-search-item> <app-search-item [(value)]="req.remark" [label]="'remark' | translate" inModal="true"></app-search-item>
......
...@@ -16,6 +16,7 @@ import {StringUtil} from '../../service/StringUtil'; ...@@ -16,6 +16,7 @@ import {StringUtil} from '../../service/StringUtil';
export class RetentionPolicyMgrComponent implements OnInit { export class RetentionPolicyMgrComponent implements OnInit {
influxdbDatabaseNo = ''; influxdbDatabaseNo = '';
defaultDatabase = 1;
req: any = {}; req: any = {};
data: any = []; data: any = [];
isLoading = false; isLoading = false;
...@@ -30,8 +31,9 @@ export class RetentionPolicyMgrComponent implements OnInit { ...@@ -30,8 +31,9 @@ export class RetentionPolicyMgrComponent implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.ac.queryParams.subscribe((e) => { this.ac.queryParams.subscribe((param) => {
this.influxdbDatabaseNo = e.influxdbDatabaseNo; this.influxdbDatabaseNo = param.influxdbDatabaseNo;
this.defaultDatabase = param.defaultDatabase;
}); });
this.init(); this.init();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment