Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
frontend: portal pod status clr-dg-column filter creationTimestamp
  • Loading branch information
wilhelmguo committed Feb 27, 2019
commit ef67ae10c71b98b6b4708c89385ab29594091340
4 changes: 2 additions & 2 deletions src/frontend/src/app/shared/list-pod/list-pod.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h3 class="modal-title">
{{'TITLE.STATUS' | translate}}
</ng-container>
</clr-dg-column>
<clr-dg-column [clrDgField]="'podIp'">
<clr-dg-column [clrDgField]="'podIP'">
<ng-container *clrDgHideableColumn="{hidden: false}">
PODIP
</ng-container>
Expand All @@ -40,7 +40,7 @@ <h3 class="modal-title">
{{'POD.RESTART_NUM' | translate}}
</ng-container>
</clr-dg-column>
<clr-dg-column [clrDgSortBy]="timeComparator" [(clrDgSortOrder)]="sortOrder">
<clr-dg-column [clrDgSortBy]="'creationTimestamp'">
<ng-container *clrDgHideableColumn="{hidden: false}">
Age
</ng-container>
Expand Down
34 changes: 17 additions & 17 deletions src/frontend/src/app/shared/list-pod/list-pod.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,27 +145,27 @@ export class ListPodComponent implements OnDestroy {
}

refresh(state?: ClrDatagridStateInterface) {
if (!this.cluster) {
return;
}
if (state) {
this.state = state;
this.pageState = PageState.fromState(state, {totalPage: this.pageState.page.totalPage, totalCount: this.pageState.page.totalCount});
}
this.podClient.listPageByResouce(this.pageState, this.cluster, this.cacheService.kubeNamespace, this.resourceType,
this.resourceName, this.appId)
.subscribe(
response => {
const data = response.data;
this.pods = data.list;
this.pageState.page.totalPage = data.totalPage;
this.pageState.page.totalCount = data.totalCount;
},
error => {
this.pods = null;
this.messageHandlerService.handleError(error);
}
);
if (this.cluster) {
this.podClient.listPageByResouce(this.pageState, this.cluster, this.cacheService.kubeNamespace, this.resourceType,
this.resourceName, this.appId)
.subscribe(
response => {
const data = response.data;
this.pods = data.list;
this.pageState.page.totalPage = data.totalPage;
this.pageState.page.totalCount = data.totalCount;
},
error => {
this.pods = null;
this.messageHandlerService.handleError(error);
}
);
}

}

deletePod(pod: Pod) {
Expand Down