Skip to content

Commit

Permalink
fix: 修复暗色主题光标问题和变量dot链接错误
Browse files Browse the repository at this point in the history
  • Loading branch information
liangling0628 committed Sep 26, 2023
1 parent d62dada commit 635c7e5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bkmonitor-timeseries-datasource/src/datasource/datasource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ export default class DashboardDatasource extends DataSourceApi<QueryData, QueryO
aliasData: IAliasData,
dimensions: Record<string, string>,
) {
const regex = /\$([\w.]+)|\[\[([\s\S]+?)\]\]/g;
const regex = /\$([\w]+)|\[\[([\s\S]+?)\]\]/g;
const tagRegx = /(\$(tag_|dim_)\$[\w.]+)/gm;
let aliasNew = alias;
aliasNew = alias.replace(tagRegx, (match: any, g1: any, g2: any) => {
Expand Down Expand Up @@ -746,7 +746,10 @@ export default class DashboardDatasource extends DataSourceApi<QueryData, QueryO
newKey = newKey.replace(set, set.replace('_', '').toLocaleUpperCase());
});
}
return typeof metric?.[newKey] === 'undefined' ? match : metric[newKey];
if (typeof metric?.[newKey] === 'undefined') {
return metric?.[tag] || match;
}
return metric?.[newKey] || match;
}
}
const variables = this.buildWhereVariables([match], undefined);
Expand Down
3 changes: 3 additions & 0 deletions bkmonitor-timeseries-datasource/src/sass/query.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1168,6 +1168,9 @@ body {
.metric-dropdown-content .content-list .metric-item.is-checked {
background-color: $monitor-metric-bg-color !important;
}
.cm-content {
caret-color: white !important;
}
}
&.theme-light {
background-color: #f4f5f5 !important;
Expand Down

0 comments on commit 635c7e5

Please sign in to comment.