Skip to content

Commit

Permalink
Merge pull request #864 from TencentBlueKing/hotfix_V4.3.1-227
Browse files Browse the repository at this point in the history
Hotfix v4.3.1 227
  • Loading branch information
EvildoerXiaoyy committed Apr 15, 2022
2 parents 7d6005a + 9c20fe9 commit a198f2a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 22 deletions.
30 changes: 16 additions & 14 deletions bk_dataview/grafana/settings.py
Expand Up @@ -33,24 +33,28 @@
"CODE_INJECTIONS": {
"<head>": """<head>
<style>
.sidemenu {
.sidemenu {{
display: none !important;
}
.navbar-page-btn .gicon-dashboard {
}}
.navbar-page-btn .gicon-dashboard {{
display: none !important;
}
.navbar .navbar-buttons--tv {
}}
.navbar .navbar-buttons--tv {{
display: none !important;
}
.css-1jrggg2 {
}}
.css-1jrggg2 {{
left: 0 !important;
}
.css-9nwlx8 {
}}
.css-9nwlx8 {{
display: none;
}
}}
</style>
<script src="http://cdn-go.cn/aegis/aegis-sdk/latest/aegis.min.js?_bid=3977"></script>
<script>"""
{}
<script>""".format(
"""<script src="http://cdn-go.cn/aegis/aegis-sdk/latest/aegis.min.js?_bid=3977"></script>"""
if settings.TAM_AEGIS_KEY
else ""
)
+ f"""window.ageisId = "{settings.TAM_AEGIS_KEY}";"""
+ """
setTimeout(function(){
Expand All @@ -70,7 +74,6 @@
})
}
},5000);
var _wr = function(type) {
var orig = history[type];
return function() {
Expand Down Expand Up @@ -113,7 +116,6 @@

IMPORT_STRINGS = ["AUTHENTICATION_CLASSES", "PERMISSION_CLASSES", "PROVISIONING_CLASSES", "BACKEND_CLASS"]


APP_LABEL = "grafana"


Expand Down
8 changes: 4 additions & 4 deletions web/src/components/nav/head-nav.vue
Expand Up @@ -515,7 +515,7 @@ export default {
if (item.id === 'search') {
item.id = 'retrieve';
}
item.id = item.id.replaceAll('_', '-');
item.id = item.id.replace(/_/g, '-');
if (item.children) {
this.replaceMenuId(item.children);
}
Expand Down Expand Up @@ -623,12 +623,12 @@ export default {
if (project?.permission?.view_business) {
return true;
}
this.$store.commit('updateProject', project.project_id);
this.$store.commit('updateProject', project?.project_id);
this.$store.dispatch('getApplyData', {
action_ids: ['view_business'],
resources: [{
type: 'biz',
id: project.bk_biz_id,
id: project?.bk_biz_id,
}],
}).then((res) => {
this.$emit('auth', res.data);
Expand Down Expand Up @@ -755,7 +755,7 @@ export default {
resMenu.children.forEach((item) => {
item.id = this.routeMap[item.id] || item.id;
if (resMenu.id === 'dashboard') {
item.id = item.id.replaceAll('-', '_');
item.id = item.id.replace(/-/g, '_');
}
const menu = oldMenu.children.find(menuItem => menuItem.id === item.id);
if (menu) {
Expand Down
Expand Up @@ -172,7 +172,7 @@ export default {
if (item.bk_obj_id === 'module' && !dict[item.bk_inst_name]) {
dict[item.bk_inst_name] = item;
}
if (item?.children?.length) {
if (item.children?.length) {
this.filterList(item.children, dict);
}
});
Expand Down Expand Up @@ -203,7 +203,7 @@ export default {
}
}
if (treeNode?.children?.length) {
if (treeNode.children?.length) {
this.recursiveFindDefault(
treeNode.children,
treeNode,
Expand Down Expand Up @@ -231,7 +231,7 @@ export default {
nodes.forEach((node) => {
node.checked = bool;
node.disabled = bool;
node?.children?.length && this.inheritCheckNode(node.children, bool);
node.children?.length && this.inheritCheckNode(node.children, bool);
});
},
// 遍历树找到勾选的节点,如果父节点已勾选,子孙节点不算在列表内
Expand All @@ -244,7 +244,7 @@ export default {
bk_obj_id: data.bk_obj_id,
bk_biz_id: data.bk_biz_id,
});
} else if (node?.children?.length) {
} else if (node.children?.length) {
node.children.forEach((child) => {
this.recursiveFindTopoNodes(child, selectedTopoList);
});
Expand Down

0 comments on commit a198f2a

Please sign in to comment.