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

fix:1.14 问题修复 #862

Merged
merged 5 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
2 changes: 1 addition & 1 deletion src/dashboard-front/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ src/views/permission/apply/index.vue
src/assets/**
*bak*
src/views/resource/setting/detail.vue
src/views/resource/setting/import.vue
src/views/resource/setting/comps/table-res-to-action.vue
12 changes: 12 additions & 0 deletions src/dashboard-front/src/components/ag-editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ const initEditor = () => {
enabled: props.minimap, // 小地图
},
wordWrap: 'on', // 启用 soft-wraps
contextmenu: false, // 禁用右键菜单
});

editorMounted(); // 编辑器初始化后
Expand All @@ -148,6 +149,17 @@ const initEditor = () => {
'editor.background': '#1A1A1A',
},
});

// 全屏监听
const domNode = editor.getDomNode();
const container = (domNode.parentNode).parentNode;
if (container) {
container.addEventListener('fullscreenchange', () => {
if (!document.fullscreenElement) {
isFullScreen.value = false;
}
});
}
};

const editorMounted = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
type="search"
:placeholder="t('请输入资源名称')"
@blur="getList()"
@enter="getList()"
/>

<bk-date-picker
Expand Down
15 changes: 14 additions & 1 deletion src/dashboard-front/src/views/online-debug/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
v-for="item in stageList"
:id="item.id"
:key="item.id"
:name="item.name"
:name="getItemName(item)"
:disabled="['unreleased', 'failure'].includes(item?.release?.status)"
/>
</bk-select>
<div class="search-source">
Expand Down Expand Up @@ -537,6 +538,18 @@ const resourceGroup = computed(() => {
return group;
});

const getItemName = (item: any) => {
if (!['unreleased', 'failure'].includes(item?.release?.status)) {
return item.name;
}
if (item?.release?.status === 'unreleased') {
return `${item.name} (未发布)`;
}
if (item?.release?.status === 'failure') {
return `${item.name} (发布失败)`;
}
};

const handleStageChange = (payload: number) => {
const hasData = stageList.value.find((item: Record<string, number>) => item.id === payload);
// 如果是未发布或者发布失败则不需要调资源列表
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,8 @@ const renderChart = (data: Record<string, any>) => {
},
},
toolbox: {
right: 12,
top: -8,
right: 22,
top: -10,
feature: {
dataZoom: {
show: true,
Expand Down
Loading
Loading