Skip to content

Commit

Permalink
Merge pull request #181 from wilhelmguo/automated-cherry-pick-of-#180…
Browse files Browse the repository at this point in the history
…-release-v1.2

Fix node list selector error
  • Loading branch information
wilhelmguo authored Dec 25, 2018
2 parents cd565d9 + 7e21907 commit 9d5468b
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,65 +7,65 @@
<clr-dg-string-filter [clrDgStringFilter]="nameFilter"></clr-dg-string-filter>
</clr-dg-column>
<clr-dg-column>
<ng-container *clrDgHideableColumn="showState['标签']">
<ng-container *clrDgHideableColumn="showState['label']">
标签
</ng-container>
<clr-dg-string-filter [clrDgStringFilter]="labelFilter"></clr-dg-string-filter>
</clr-dg-column>
<clr-dg-column>
<ng-container *clrDgHideableColumn="showState['Taints']">
<ng-container *clrDgHideableColumn="showState['taints']">
Taints
</ng-container>
</clr-dg-column>
<clr-dg-column [clrDgSortBy]="readyComparator">
<ng-container *clrDgHideableColumn="showState['Ready']">
<ng-container *clrDgHideableColumn="showState['ready']">
Ready
</ng-container>
</clr-dg-column>
<clr-dg-column [clrDgSortBy]="schedulerComparator">
<ng-container *clrDgHideableColumn="showState['可调度']">
<ng-container *clrDgHideableColumn="showState['schedulable']">
可调度
</ng-container>
</clr-dg-column>

<clr-dg-column>
<ng-container *clrDgHideableColumn="showState['CPU(Core)']">
<ng-container *clrDgHideableColumn="showState['cpu']">
CPU(Core)
</ng-container>
</clr-dg-column>
<clr-dg-column>
<ng-container *clrDgHideableColumn="showState['Memory(G)']">
<ng-container *clrDgHideableColumn="showState['memory']">
Memory(G)
</ng-container>
</clr-dg-column>
<clr-dg-column>
<ng-container *clrDgHideableColumn="showState['Kubelet版本']">
<ng-container *clrDgHideableColumn="showState['kubeletVersion']">
Kubelet版本
</ng-container>
</clr-dg-column>
<clr-dg-column>
<ng-container *clrDgHideableColumn="showState['Age']">
<ng-container *clrDgHideableColumn="showState['age']">
Age
</ng-container>
</clr-dg-column>
<clr-dg-column>
<ng-container *clrDgHideableColumn="showState['kubeProxy版本']">
<ng-container *clrDgHideableColumn="showState['kubeProxyVersion']">
kubeProxy版本
</ng-container>
</clr-dg-column>
<clr-dg-column [clrDgSortBy]="osImageComparator">
<ng-container *clrDgHideableColumn="showState['系统版本']">
<ng-container *clrDgHideableColumn="showState['osImage']">
系统版本
</ng-container>
</clr-dg-column>
<clr-dg-column [clrDgSortBy]="kernelComparator">
<ng-container *clrDgHideableColumn="showState['内核版本']">
<ng-container *clrDgHideableColumn="showState['kernelVersion']">
内核版本
</ng-container>
</clr-dg-column>

<clr-dg-column [clrDgSortBy]="criComparator">
<ng-container *clrDgHideableColumn="showState['CRI版本']">
<ng-container *clrDgHideableColumn="showState['containerRuntimeVersion']">
CRI版本
</ng-container>
</clr-dg-column>
Expand Down
29 changes: 16 additions & 13 deletions src/frontend/src/app/admin/kubernetes/node/nodes.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,24 @@
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="table-search">
<div class="table-search-left">
<button class="wayne-button normal" (click)="retrieve()">
刷新
</button>
<wayne-filter-box (confirm)="confirmEvent()" (cancel)="cancelEvent()">
<wayne-checkbox-group [(ngModel)]="showList">
<wayne-checkbox>{{'TITLE.NAME' | translate}}</wayne-checkbox>
<wayne-checkbox>标签</wayne-checkbox>
<wayne-checkbox>Taints</wayne-checkbox>
<wayne-checkbox>Ready</wayne-checkbox>
<wayne-checkbox>可调度</wayne-checkbox>
<wayne-checkbox>CPU(Core)</wayne-checkbox>
<wayne-checkbox>Memory(G)</wayne-checkbox>
<wayne-checkbox>Kubelet版本</wayne-checkbox>
<wayne-checkbox>Age</wayne-checkbox>
<wayne-checkbox>kubeProxy版本</wayne-checkbox>
<wayne-checkbox>系统版本</wayne-checkbox>
<wayne-checkbox>内核版本</wayne-checkbox>
<wayne-checkbox>CRI版本</wayne-checkbox>
<wayne-checkbox value="name">{{'TITLE.NAME' | translate}}</wayne-checkbox>
<wayne-checkbox value="label">标签</wayne-checkbox>
<wayne-checkbox value="taints">Taints</wayne-checkbox>
<wayne-checkbox value="ready">Ready</wayne-checkbox>
<wayne-checkbox value="schedulable">可调度</wayne-checkbox>
<wayne-checkbox value="cpu">CPU(Core)</wayne-checkbox>
<wayne-checkbox value="memory">Memory(G)</wayne-checkbox>
<wayne-checkbox value="kubeletVersion">Kubelet版本</wayne-checkbox>
<wayne-checkbox value="age">Age</wayne-checkbox>
<wayne-checkbox value="kubeProxyVersion">kubeProxy版本</wayne-checkbox>
<wayne-checkbox value="osImage">系统版本</wayne-checkbox>
<wayne-checkbox value="kernelVersion">内核版本</wayne-checkbox>
<wayne-checkbox value="containerRuntimeVersion">CRI版本</wayne-checkbox>
</wayne-checkbox-group>
</wayne-filter-box>
</div>
Expand Down
26 changes: 13 additions & 13 deletions src/frontend/src/app/admin/kubernetes/node/nodes.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ import { AceEditorComponent } from '../../../shared/ace-editor/ace-editor.compon

const showState = {
'name': {hidden: false},
'标签': {hidden: false},
'Taints': {hidden: true},
'Ready': {hidden: false},
'可调度': {hidden: false},
'CPU(Core)': {hidden: false},
'Memory(G)': {hidden: false},
'Kubelet版本': {hidden: true},
'Age': {hidden: false},
'kubeProxy版本': {hidden: true},
'系统版本': {hidden: true},
'内核版本': {hidden: true},
'CRI版本': {hidden: true}
'label': {hidden: false},
'taints': {hidden: true},
'ready': {hidden: false},
'schedulable': {hidden: false},
'cpu': {hidden: false},
'memory': {hidden: false},
'kubeletVersion': {hidden: false},
'age': {hidden: false},
'kubeProxyVersion': {hidden: true},
'osImage': {hidden: true},
'kernelVersion': {hidden: true},
'containerRuntimeVersion': {hidden: false}
};

@Component({
Expand All @@ -48,7 +48,7 @@ export class NodesComponent implements OnInit, OnDestroy {
cluster: string;
clusters: Array<any>;
nodes: Node[];
showList: any[] = new Array();
showList: any[] = Array();

subscription: Subscription;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@

<div class="table-search">
<div class="table-search-left">
<button class="wayne-button normal" (click)="retrieve()">
刷新
</button>
<button class="wayne-button normal" (click)="openModal()">
创建持久化存储
</button>

<wayne-filter-box (confirm)="confirmEvent()" (cancel)="cancelEvent()">
<wayne-checkbox-group [(ngModel)]="showList">
<wayne-checkbox>{{'TITLE.NAME' | translate}}</wayne-checkbox>
Expand Down

0 comments on commit 9d5468b

Please sign in to comment.