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

[bugfix] fix monitor search sync error #2546

Merged
merged 2 commits into from
Aug 17, 2024
Merged
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 @@ -179,26 +179,28 @@ export class MonitorListComponent implements OnInit, OnDestroy {

loadMonitorTable(sortField?: string | null, sortOrder?: string | null) {
this.tableLoading = true;
let monitorInit$ = this.monitorSvc.getMonitors(this.app, this.tag, this.pageIndex - 1, this.pageSize, sortField, sortOrder).subscribe(
message => {
this.tableLoading = false;
this.checkedAll = false;
this.checkedMonitorIds.clear();
if (message.code === 0) {
let page = message.data;
this.monitors = page.content;
this.pageIndex = page.number + 1;
this.total = page.totalElements;
} else {
console.warn(message.msg);
let monitorInit$ = this.monitorSvc
.searchMonitors(this.app, this.tag, this.filterContent, this.filterStatus, this.pageIndex - 1, this.pageSize, sortField, sortOrder)
.subscribe(
message => {
this.tableLoading = false;
this.checkedAll = false;
this.checkedMonitorIds.clear();
if (message.code === 0) {
let page = message.data;
this.monitors = page.content;
this.pageIndex = page.number + 1;
this.total = page.totalElements;
} else {
console.warn(message.msg);
}
monitorInit$.unsubscribe();
},
error => {
this.tableLoading = false;
monitorInit$.unsubscribe();
}
monitorInit$.unsubscribe();
},
error => {
this.tableLoading = false;
monitorInit$.unsubscribe();
}
);
);
}
changeMonitorTable(sortField?: string | null, sortOrder?: string | null) {
this.tableLoading = true;
Expand Down Expand Up @@ -504,7 +506,7 @@ export class MonitorListComponent implements OnInit, OnDestroy {
const currentSort = sort.find(item => item.value !== null);
const sortField = (currentSort && currentSort.key) || null;
const sortOrder = (currentSort && currentSort.value) || null;
this.changeMonitorTable(sortField, sortOrder);
// this.changeMonitorTable(sortField, sortOrder);
}

// begin: app type search filter
Expand Down
Loading