Skip to content

Commit

Permalink
bugfix: 作业模板全局变量展开样式 TencentBlueKing#1569
Browse files Browse the repository at this point in the history
  • Loading branch information
hLinx committed Dec 2, 2022
1 parent 77e9332 commit 0a9f900
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 65 deletions.
4 changes: 4 additions & 0 deletions src/frontend/src/components/jb-dialog/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
:width="renderWidth"
v-on="$listeners"
@input="handleInputValue">
<template #header>
<slot name="header" />
</template>
<template v-if="isRender">
<slot />
</template>
Expand All @@ -46,6 +49,7 @@
<slot name="footer">
<div class="jb-dialog-footer">
<bk-button
v-if="okText"
:loading="isSubmiting"
theme="primary"
@click="handleConfirm">
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/i18n/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ export default {
'警告!': 'Warning !!!',
详见编辑框左侧: 'See the tips on the',
图标的提示: 'icon on the left side of editor for details',
请确定是否要继续执行: 'Are you sure want to continue to run?',
请确定是否要继续执行: 'Are you sure want to proceed?',
继续执行: 'YES',
立即取消: 'CANCEL',
全业务: 'All',
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/utils/assist/script-error-confirm.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export const scriptErrorConfirm = () => new Promise((resolve, reject) => {
if (!scriptCheckError) {
return resolve();
}

if (scriptCheckError.isActionScan) {
sacnDialog(resolve, reject);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,28 +39,19 @@
</div>
<jb-dialog
v-model="isShowDetail"
cancel-text=""
:cancel-text="$t('template.关闭')"
class="global-host-variable-detail-dialog"
:ok-text="$t('template.关闭')"
:title="title"
ok-text=""
:width="1020">
<template #header>
<div class="variable-title">
<span>{{ title }}</span>
<i
class="global-variable-dialog-close bk-icon icon-close"
@click="handleClose" />
</div>
</template>
<div class="variable-title">
<span>{{ title }}</span>
</div>
<div class="content-wraper">
<Empty
v-if="isEmpty"
style="height: 100%;"
:title="$t('template.变量值为空')" />
<scroll-faker v-else>
<!-- <server-panel
detail-mode="dialog"
:host-node-info="hostNodeInfo" /> -->
<ip-selector
readonly
show-view
Expand All @@ -73,7 +64,6 @@
<script>
import TaskHostNodeModel from '@model/task-host-node';

// import ServerPanel from '@components/choose-ip/server-panel';
import Empty from '@components/empty';
import ScrollFaker from '@components/scroll-faker';

Expand Down Expand Up @@ -102,7 +92,7 @@
},
data () {
const { hostNodeInfo } = new TaskHostNodeModel({});

return {
isShowDetail: false,
hostNodeInfo,
Expand All @@ -123,7 +113,7 @@
handlerView () {
const curVariable = this.data.find(item => item.name === this.name);
this.hostNodeInfo = Object.freeze(curVariable.defaultTargetValue.hostNodeInfo);

this.isShowDetail = true;
},
handleClose () {
Expand Down Expand Up @@ -159,58 +149,20 @@
text-align: left;
}

.bk-dialog-wrapper .bk-dialog-body {
padding: 0;

.server-panel {
height: 100%;

&.show-detail {
overflow: hidden;
}

.host-detail.show {
padding-left: 20%;
}
}
}

.content-wraper {
height: 450px;
max-height: 450px;
min-height: 450px;
margin-top: -1px;
}

button[name="cancel"] {
display: none;
}

.variable-title {
position: relative;
height: 68px;
padding-top: 0;
padding-bottom: 0;
padding-left: 25px;
margin-top: 18px;
font-size: 20px;
line-height: 68px;
color: #000;
line-height: 28px;
color: #313238;
text-align: left;
border-bottom: 1px solid #dcdee5;
}

.global-variable-dialog-close {
position: absolute;
top: 0;
right: 0;
font-size: 32px;
color: #c4c6cc;
cursor: pointer;
transition: all 0.15s;

&:hover {
transform: rotateZ(90deg);
}
.content-wraper {
height: 450px;
max-height: 450px;
min-height: 450px;
margin-top: 12px;
}
}
</style>
Expand Down

0 comments on commit 0a9f900

Please sign in to comment.