Skip to content

Commit

Permalink
minor: merge task sttus
Browse files Browse the repository at this point in the history
  • Loading branch information
hanshuaikang committed Dec 20, 2023
2 parents 61cd6df + 4b813df commit 66f6c3d
Show file tree
Hide file tree
Showing 25 changed files with 365 additions and 175 deletions.
Binary file modified frontend/desktop/src/assets/fonts/bksops-icon.eot
Binary file not shown.
45 changes: 39 additions & 6 deletions frontend/desktop/src/assets/fonts/bksops-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/desktop/src/assets/fonts/bksops-icon.ttf
Binary file not shown.
Binary file modified frontend/desktop/src/assets/fonts/bksops-icon.woff
Binary file not shown.
7 changes: 2 additions & 5 deletions frontend/desktop/src/components/common/TableRenderHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -339,17 +339,14 @@
}
.table-header-filter-popover {
.tippy-tooltip {
padding: 4px 0 0 0;
.tippy-content {
background: #fff;
}
padding: 4px 0;
background: #fff !important;
}
.option-list {
width: 200px;
max-height: 350px;
overflow: auto;
@include scrollbar;
margin-bottom: 15px;
background: #fff;
.option-item {
height: 32px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,23 @@
<div v-if="node.status === 'RUNNING'" class="task-status-icon">
<i class="common-icon-loading"></i>
</div>
<!-- 节点等待任务继续 -->
<div v-else-if="node.status === 'PENDING_TASK_CONTINUE'" class="node-pending task-status-icon">
<i v-bk-tooltips="$t('等待任务继续')" class="common-icon-pause"></i>
</div>
<!--节点等待处理/等待审批/等待确认-->
<div v-else-if="isPendingState" class="task-status-icon node-pending">
<i v-if="node.status === 'PENDING_PROCESSING'" v-bk-tooltips="$t('等待处理')" class="common-icon-clock"></i>
<i v-if="node.status === 'PENDING_PROCESSING'" v-bk-tooltips="$t('等待处理')" class="bk-icon icon-time"></i>
<i v-if="node.status === 'PENDING_APPROVAL'" v-bk-tooltips="$t('等待审批')" class="common-icon-pending-approval"></i>
<i v-if="node.status === 'PENDING_CONFIRMATION'" v-bk-tooltips="$t('等待确认')" class="common-icon-pending-confirm"></i>
</div>
<!-- 节点失败后自动忽略icon -->
<div v-else-if="node.status === 'FINISHED' && node.skip" class="task-status-icon">
<i class="bk-icon icon-arrows-right-shape"></i>
<div v-else-if="node.status === 'FINISHED' && node.skip" class="node-manual-skip">
<i class="common-icon-manual-skip"></i>
</div>
<!-- 节点失败后自动忽略icon -->
<div v-else-if="node.status === 'FINISHED' && node.error_ignored" class="task-status-icon node-subscript">
<i class="bk-icon icon-arrows-right-shape"></i>
<div v-else-if="node.status === 'FINISHED' && node.error_ignored" class="node-auto-skip">
<i class="common-icon-auto-skip"></i>
</div>
<!-- 节点顶部右侧生命周期 icon -->
<div class="node-phase-icon" v-if="[1, 2].includes(node.phase)">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
</template>
<span v-if="node.status === 'SUSPENDED'" @click.stop="onSubflowPauseResumeClick('resume')">
<i class="common-icon-play"></i>
{{ $t('继续') }}
{{ $t('确认继续') }}
</span>
</template>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
</bk-checkbox>
</template>
<!-- 节点循环次数 -->
<div v-if="node.loop > 1" :class="['task-status-icon task-node-loop', { 'loop-plural': node.loop > 9 }]">
<i :class="`common-icon-loading-${ node.loop > 9 ? 'oval' : 'round' }`"></i>
<div v-if="node.loop > 1" class="task-status-icon task-node-loop">
<i class="common-icon-loading-oval"></i>
<span>{{ node.loop > 99 ? '99+' : node.loop }}</span>
</div>
<!-- 任务节点自动重试/手动重试 -->
Expand Down Expand Up @@ -79,7 +79,7 @@
<template v-if="['RUNNING', 'PENDING_PROCESSING', 'PENDING_APPROVAL', 'PENDING_CONFIRMATION'].includes(node.status)">
<span v-if="node.code === 'pause_node'" @click.stop="$emit('onTaskNodeResumeClick', node.id)">
<i class="common-icon-play"></i>
{{ $t('继续') }}
{{ $t('确认继续') }}
</span>
<span v-else-if="node.code === 'bk_approve'" @click.stop="$emit('onApprovalClick', node.id)">
<i class="common-icon-circulation"></i>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@
@include nodeClick ($blueDark);
}
}
&.pending_task_continue,
&.pending_processing,
&.pending_approval,
&.pending_confirmation {
Expand Down Expand Up @@ -414,6 +415,11 @@
.node-icon-font {
font-size: 16px;
color: #ffffff;
&.common-icon-bk-plugin-message,
&.common-icon-bk-plugin-confirm,
&.common-icon-bk-plugin-approval {
font-size: 14px;
}
}
.stage-name {
padding: 0 4px;
Expand Down Expand Up @@ -455,19 +461,20 @@
position: absolute;
top: -20px;
left: 0;
height: 20px;
.bk-form-checkbox,
.dark-circle {
margin-bottom: -3px;
margin-bottom: 2px;
font-size: 14px;
color: #979ba5;
}
.error-handle-icon {
display: flex;
align-items: center;
margin: 4px 0 -4px;
margin-left: -4px;
line-height: 12px;
font-size: 12px;
transform: scale(0.75);
transform: scale(0.75) translateY(-1px);
.text {
padding: 2px 3px;
color: #ffffff;
Expand All @@ -480,17 +487,17 @@
background: #dcdee5;
border-radius: 0px 1px 1px 0;
}
&:nth-of-type(2) {
margin-left: -1px;
}
&:last-child {
margin-left: -5px;
}
&:first-child {
margin-left: -4px;
}
&:nth-of-type(3) {
margin-left: -3px;
}
&:nth-of-type(4) {
margin-left: -2px;
margin-left: -5px;
}
&:nth-of-type(5) {
margin-left: -4px;
}
}
}
Expand Down Expand Up @@ -542,16 +549,16 @@
align-items: center;
justify-content: space-between;
top: -10px;
right: -8px;
height: 18px;
right: -10px;
height: 20px;
}
.task-status-icon {
display: flex;
justify-content: center;
align-items: center;
margin-left: 2px;
width: 18px;
height: 18px;
width: 20px;
height: 20px;
font-size: 14px;
border-radius: 50%;
background: #f8b53f;
Expand All @@ -565,7 +572,6 @@
.common-icon-clock {
display: inline-block;
}
.common-icon-clock,
.common-icon-pending-approval,
.common-icon-pending-confirm {
font-size: 12px;
Expand All @@ -575,8 +581,9 @@
display: inline-block;
animation: loading 1.4s infinite linear;
}
.icon-arrows-right-shape {
font-size: 12px;
.common-icon-pause {
font-size: 20px;
transform: scale(0.5);
}
.retry-times {
font-size: 12px;
Expand All @@ -587,29 +594,23 @@
box-shadow: none;
}
&.task-node-loop {
position: relative;
top: 2px;
height: 16px;
width: 16px;
margin-left: 0;
width: 24px;
margin: 0 4px 0 0;
transform: translateY(1px);
color: #3a84ff;
background: #fff !important;
background: transparent !important;
box-shadow: none;
> i {
position: absolute;
font-size: 16px;
font-size: 14px;
}
> span {
position: relative;
top: -1px;
left: 0px;
font-weight: 700;
font-size: 18px;
transform: scale(.5);
}
&.loop-plural {
width: 26px;
height: 16px;
border-radius: 8px;
transform: scale(.5) translateY(2px);
}
}
@keyframes loading {
Expand All @@ -621,13 +622,23 @@
}
}
}
.node-subscript {
font-size: 12px;
background: #ea3636 !important;
.node-manual-skip,
.node-auto-skip {
display: flex;
height: 20px;
font-size: 20px;
border-radius: 50%;
color: #f0a0a0;
background: #fff;
i {
transform: translateY(1px);
}
}
.node-phase-icon {
transform: translateY(-2px);
margin-right: 4px;
i {
font-size: 14px;
font-size: 16px;
&.phase-warn {
color: $yellowDark;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div class="tool-position">
<div
:class="['tool-icon', {
'actived': showSmallMap
'is-active': showSmallMap
}]"
v-bk-tooltips="{
content: $t('缩略视图'),
Expand Down Expand Up @@ -60,7 +60,7 @@
</div>
<div
:class="['tool-icon', {
'actived': isSelectionOpen
'is-active': isSelectionOpen
}]"
v-if="editable"
v-bk-tooltips="{
Expand All @@ -85,7 +85,7 @@
</div>
<div
:class="['tool-icon', {
'actived': isAllSelected
'is-active': isAllSelected
}]"
v-if="isShowSelectAllTool"
v-bk-tooltips="{
Expand All @@ -99,7 +99,7 @@
</div>
<div
:class="['tool-icon', {
'actived': isShowHotKey
'is-active': isShowHotKey
}]"
v-bk-tooltips="{
content: $t('快捷键'),
Expand All @@ -111,7 +111,7 @@
</div>
<div
:class="['tool-icon', {
'actived': isPerspective
'is-active': isPerspective
}]"
v-bk-tooltips="{
content: $t('变量引用预览'),
Expand Down Expand Up @@ -251,7 +251,7 @@
background: #f4f7ff;
border-radius: 1px;
}
&.actived {
&.is-active {
color: #3a84ff;
background: #f4f7ff;
border-radius: 1px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,11 @@
connectionsDetachable: false
})
}
const isExecute = nodes[0].mode === 'execute'
if (isExecute) {
delete combinedEndpointOptions.hoverPaintStyle
delete connectorOptions.hoverPaintStyle
}
return {
isSmallMap: false, // 小地图激活态
smallMapWidth: 344, // 344 小地图宽度
Expand Down
12 changes: 10 additions & 2 deletions frontend/desktop/src/config/i18n/cn.js
Original file line number Diff line number Diff line change
Expand Up @@ -1796,7 +1796,9 @@ const cn = {
'暂停执行': '暂停执行',
'终止执行': '终止执行',
'状态明细': '状态明细',
'已自动重试 m 次 (最多 c 次),手动重试 n 次': '已自动重试 {m} 次 (最多 {c} 次),手动重试 {n} 次',
'包含自动重试 m 次': '包含自动重试 {m} 次',
',手动重试 n 次': ',手动重试 {n} 次',
'包含手动重试 n 次': '包含手动重试 {n} 次',
'刷新': '刷新',
'exFailedText': '节点执行失败,请前往{0}查看错误原因',
'exFailedText_调用日志': '调用日志',
Expand All @@ -1805,7 +1807,13 @@ const cn = {
'最多只能收藏 9 个': '最多只能收藏 9 个',
'解析': '解析',
'IP地址不合法,': 'IP地址不合法,',
'IP地址不存在,': 'IP地址不存在,'
'IP地址不存在,': 'IP地址不存在,',
'节点自动重试中,暂时无法手动重试': '节点自动重试中,暂时无法手动重试',
'失败后自动跳过': '失败后自动跳过',
'失败后手动跳过': '失败后手动跳过',
'等待任务继续': '等待任务继续',
'确认继续': '确认继续',
'使用当前任务数据(节点选择、入参)再次创建任务': '使用当前任务数据(节点选择、入参)再次创建任务'
}

export default cn
15 changes: 11 additions & 4 deletions frontend/desktop/src/config/i18n/en.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const en = {

// 导航
'标准运维': 'Standard OPS',
'首页': 'Home',
Expand Down Expand Up @@ -1833,14 +1832,22 @@ const en = {
'暂停执行': 'Pause',
'终止执行': 'Terminate',
'状态明细': 'Detail',
'已自动重试 m 次 (最多 c 次),手动重试 n 次': 'Automatically retried {m} times (up to {c} times), manual retry {n} times'
'exFailedText_调用日志': 'call log',
'已自动重试 m 次 (最多 c 次),手动重试 n 次': 'Automatically retried {m} times (up to {c} times), manual retry {n} times',
'任务还未执行,暂无执行历史': 'Task not executed, no history available.',
'空分支': 'Empty branch',
'最多只能收藏 9 个': 'Can only collect up to 9 items',
'解析': 'Parse',
'IP地址不合法,': 'IP address is illegal,',
'IP地址不存在,': 'IP address does not exist,'
'IP地址不存在,': 'IP address does not exist,',
'包含自动重试 m 次': 'Automatically retried {m} times',
',手动重试 n 次': ', manual retry {n} times',
'包含手动重试 n 次': ' Manual retry {n} times',
'节点自动重试中,暂时无法手动重试': 'The node is retrying automatically and manual retry is temporarily unavailable.',
'失败后自动跳过': 'Auto Skipped',
'失败后手动跳过': 'Manual Skipped',
'等待任务继续': 'Pending Task Continue',
'确认继续': 'Confirm',
'使用当前任务数据(节点选择、入参)再次创建任务': 'Create task again using current task data (node selection, input parameters)'
}

export default en
6 changes: 4 additions & 2 deletions frontend/desktop/src/constants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ const INVALID_NAME_CHAR = '\'‘"”$&<>'

const SYSTEM_GROUP_ICON = ['CMDB', 'JOB', 'BK', 'Nodeman', 'Monitor', 'GCLOUD', 'TCM', 'WechatWork']
const BK_PLUGIN_ICON = {
'bk_display': 'common-icon-bk-plugin-message',
'pause_node': 'common-icon-bk-plugin-confirm',
'bk_approve': 'common-icon-bk-plugin-approval',
'bk_http_request': 'common-icon-bk-plugin-http',
'bk_notify': 'common-icon-bk-plugin-notify',
'sleep_timer': 'common-icon-bk-plugin-timer',
'pause_node': 'common-icon-bk-plugin-pause'
'sleep_timer': 'common-icon-bk-plugin-timer'
}

// 最大长度常量
Expand Down
Loading

0 comments on commit 66f6c3d

Please sign in to comment.