Skip to content

Commit

Permalink
fix: 前端字段排序保存接口参数修复 --bug=133937719 (TencentBlueKing#3895)
Browse files Browse the repository at this point in the history
  • Loading branch information
xintaoLi authored Nov 14, 2024
1 parent d9d8fb1 commit cf26084
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
15 changes: 11 additions & 4 deletions bklog/web/src/views/retrieve-v2/result-comp/context-log.vue
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,9 @@
try {
this.isConfigLoading = true;
const res = await this.$http.request('retrieve/getLogTableHead', {
params: { index_set_id: window.__IS_MONITOR_APM__ ? this.$route.query.indexId : this.$route.params.indexId },
params: {
index_set_id: window.__IS_MONITOR_APM__ ? this.$route.query.indexId : this.$route.params.indexId,
},
query: {
scope: 'search_context',
start_time: this.retrieveParams.start_time,
Expand Down Expand Up @@ -303,7 +305,9 @@
try {
this.logLoading = true;
const res = await this.$http.request('retrieve/getContentLog', {
params: { index_set_id: window.__IS_MONITOR_APM__ ? this.$route.query.indexId : this.$route.params.indexId },
params: {
index_set_id: window.__IS_MONITOR_APM__ ? this.$route.query.indexId : this.$route.params.indexId,
},
data,
});

Expand Down Expand Up @@ -373,13 +377,16 @@
const data = { display_fields: list };
try {
const configRes = await this.$http.request('retrieve/getFieldsConfigByContextLog', {
params: { index_set_id: window.__IS_MONITOR_APM__ ? this.$route.query.indexId : this.$route.params.indexId, config_id: this.currentConfigID },
params: {
index_set_id: window.__IS_MONITOR_APM__ ? this.$route.query.indexId : this.$route.params.indexId,
config_id: this.currentConfigID,
},
});
Object.assign(data, {
sort_list: configRes.data.sort_list,
name: configRes.data.name,
config_id: this.currentConfigID,
index_set_id:window.__IS_MONITOR_APM__ ? this.$route.query.indexId : this.$route.params.indexId,
index_set_id: window.__IS_MONITOR_APM__ ? this.$route.query.indexId : this.$route.params.indexId,
});
await this.$http.request('retrieve/updateFieldsConfig', {
data,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,8 @@
this.isConfirmSubmit = true;
await this.handleUpdateConfig(confirmConfigData);
// 判断当前应用的config_id 与 索引集使用的config_id是否相同 不同则更新config
if (this.currentClickConfigID !== this.filedSettingConfigID) {
await this.submitFieldsSet(this.currentClickConfigID);
if (this.currentClickConfigData.id !== this.filedSettingConfigID) {
await this.submitFieldsSet(this.currentClickConfigData.id);
}
this.cancelModifyFields();
this.$store.commit('updateShowFieldAlias', this.showFieldAlias);
Expand Down Expand Up @@ -662,6 +662,8 @@
isShowEdit: false,
editStr: item.name,
}));


} catch (error) {
} finally {
this.isLoading = false;
Expand Down

0 comments on commit cf26084

Please sign in to comment.