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

humming_bird_sync_master #7146

Merged
merged 23 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
9566623
optimization: 任务列表过滤 sql 语句优化
normal-wls Oct 7, 2023
afc5b21
minor: 变量禁止删除提示文案统一
ywywZhou Oct 9, 2023
fcefd91
bugfix: 修复 Job 引用全局变量场景下值解析不符合预期的问题
ZhuoZhuoCrayon Oct 9, 2023
58a6518
minor: release 3.30.1
ZhuoZhuoCrayon Oct 10, 2023
dad3fb6
bugfix: 修复表格内tag blur事件不生效的问题
luofann Oct 10, 2023
722ad4d
feature: 密码tag支持小眼睛查看输入值
luofann Sep 29, 2023
ca21d14
feature: 密码tag支持小眼睛查看输入值
luofann Sep 29, 2023
41d3cfd
minor: version bumps to 3.30.2
normal-wls Oct 10, 2023
630b28e
minor: 补充node_callback的日志
hanshuaikang Oct 10, 2023
f674472
minor: update pre-commit-config
normal-wls Oct 8, 2023
ed9df69
minor: 后端国际化优化
normal-wls Oct 10, 2023
03fbb6a
minor: job 类自动去除用户输入的左右空格
hanshuaikang Sep 26, 2023
b1918b3
minor: 后端国际化更新
normal-wls Oct 11, 2023
c87d099
optimization: 验收会问题修复
ywywZhou Oct 11, 2023
7a8d18c
optimization: 添加自定义属性&&优化任务节点详情拖拽宽度
ywywZhou Oct 13, 2023
4495f96
optimization: 输出参数hover触发热区优化
ywywZhou Oct 16, 2023
c9e5c51
Merge remote-tracking branch 'upstream/master' into release_V3.31.0_beta
normal-wls Oct 16, 2023
29e335d
minor: release V3.31.0_beta1
normal-wls Oct 16, 2023
25400bb
Merge pull request #7128 from normal-wls/release_V3.31.0_beta
normal-wls Oct 16, 2023
0d014ba
bugfix: 变量联想体验问题修复&&侧栏拖拽优化
ywywZhou Oct 16, 2023
4e7fba0
optimization: 禁用画布工具栏点击展开节点菜单侧栏&&画布选中态样式调整
ywywZhou Oct 17, 2023
7ff3213
minor: release V3.31.0
normal-wls Oct 19, 2023
e73295b
Merge pull request #7140 from TencentBlueKing/release_horse
normal-wls Oct 19, 2023
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
7 changes: 3 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ repos:
hooks:
- id: check-merge-conflict
- repo: https://github.com/psf/black
rev: 22.3.0
rev: stable
hooks:
- id: black
name: black
language: python
language_version: python3.6
- repo: https://github.com/pycqa/isort
rev: 5.11.5
rev: 5.6.4
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
Expand Down
2 changes: 1 addition & 1 deletion app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ is_use_celery: True
author: 蓝鲸智云
introduction: 标准运维是通过一套成熟稳定的任务调度引擎,把在多系统间的工作整合到一个流程,助力运维实现跨系统调度自动化的SaaS应用。
introduction_en: SOPS is a SaaS application that utilizes a set of mature and stable task scheduling engines to help realize cross-system scheduling automation, and integrates the work among multiple systems into a single process.
version: 3.31.0-alpha2
version: 3.31.0
category: 运维工具
language_support: 中文
desktop:
Expand Down
2 changes: 1 addition & 1 deletion app_desc.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
spec_version: 2
app_version: "3.31.0-alpha2"
app_version: "3.31.0"
app:
region: default
bk_app_code: bk_sops
Expand Down
2 changes: 1 addition & 1 deletion config/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
# mako模板中:<script src="/a.js?v=${ STATIC_VERSION }"></script>
# 如果静态资源修改了以后,上线前改这个版本号即可

STATIC_VERSION = "3.31.0-alpha2"
STATIC_VERSION = "3.31.0"
DEPLOY_DATETIME = datetime.datetime.now().strftime("%Y%m%d%H%M%S")

STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")]
Expand Down
Binary file modified frontend/desktop/src/assets/fonts/bksops-icon.eot
Binary file not shown.
2 changes: 1 addition & 1 deletion 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.
27 changes: 21 additions & 6 deletions frontend/desktop/src/components/common/RenderForm/FormGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
<i
:class="['common-icon-variable-hook hook-icon', { actived: hook, disabled: !option.formEdit || !render }]"
v-bk-tooltips="{
content: hook ? $t('恢复为非变量节点内维护') : $t('转换为变量集中维护'),
content: hook ? $t('取消使用变量,节点内维护') : $t('转换为变量,集中维护'),
placement: 'bottom',
zIndex: 3000
}"
Expand Down Expand Up @@ -425,7 +425,15 @@
background: #ffeeec;
}
&.rf-has-hook .rf-tag-form {
margin-right: 45px;
margin-right: 40px;
}
&.show-render {
> .rf-tag-form {
margin-right: 58px;
}
.hook-icon {
padding-right: 3px !important;
}
}
.rf-group-name {
display: block
Expand All @@ -446,15 +454,17 @@
display: flex;
align-items: center;
justify-content: center;
padding: 0 8px;
height: 32px;
background: #f0f1f5;
border-radius: 2px;
cursor: pointer;
z-index: 1;
.hook-icon {
font-size: 16px;
.hook-icon,
.render-skip-icon {
height: 32px;
line-height: 32px;
font-size: 12px;
color: #979ba5;
cursor: pointer;
&.disabled {
color: #c4c6cc;
cursor: not-allowed;
Expand All @@ -464,8 +474,13 @@
}
}
.hook-icon {
line-height: 33px;
padding: 0 8px;
font-size: 16px;
}
.render-skip-icon {
padding: 0 8px 0 3px;
}
.icon-angle-up-fill {
font-size: 12px;
color: #c4c6cc;
Expand Down
18 changes: 12 additions & 6 deletions frontend/desktop/src/components/common/RenderForm/FormItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -477,12 +477,15 @@
}
&.rf-has-hook {
& > .rf-tag-form {
margin-right: 45px;
margin-right: 40px;
}
}
&.show-render {
> .rf-tag-form {
margin-right: 64px;
margin-right: 58px;
}
.hook-icon {
padding-right: 3px !important;
}
}
&.rf-col-layout {
Expand Down Expand Up @@ -548,16 +551,17 @@
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 8px;
height: 32px;
background: #f0f1f5;
border-radius: 2px;
z-index: 1;
cursor: pointer;
.hook-icon,
.render-skip-icon {
font-size: 14px;
height: 32px;
line-height: 32px;
font-size: 12px;
color: #979ba5;
cursor: pointer;
&.disabled {
color: #c4c6cc;
cursor: not-allowed;
Expand All @@ -567,10 +571,12 @@
}
}
.hook-icon {
line-height: 31px;
padding: 0 8px;
font-size: 16px;
}
.render-skip-icon {
margin-left: 7px;
padding: 0 8px 0 3px;
}
.icon-angle-up-fill {
font-size: 12px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,14 @@
}
})
})
} else if (this.decorationsMap[lineNumber]) {
this.decorationsMap[lineNumber].forEach(decorations => {
monacoInstance.deltaDecorations(
[...decorations],
[]
)
} else {
Object.keys(this.decorationsMap).forEach(key => {
this.decorationsMap[key].forEach(decorations => {
monacoInstance.deltaDecorations(
[...decorations],
[]
)
})
})
this.decorationsMap = {}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
:parent-value="scope.row"
@init="onInitColumn(scope.$index, cIndex, ...arguments)"
@change="onEditColumn(scope.$index, cIndex, ...arguments)"
@blur="onColumnInputBlur(scope.$index, ...arguments)">
@blur="onColumnInputBlur(scope.$index, cIndex, ...arguments)">
</component>
</template>
</el-table-column>
Expand Down Expand Up @@ -570,8 +570,8 @@
this.$set(this.tableValue[this.editRowNumber], field, val)
this.triggerSameRowEvent('change', row, col, val)
},
onColumnInputBlur (scope, val) {
this.triggerSameRowEvent('blur', scope.$index, scope.column.index, val)
onColumnInputBlur (row, col, val) {
this.triggerSameRowEvent('blur', row, col, val)
},
onDelete (index, row) {
if (this.pagination) {
Expand Down
66 changes: 43 additions & 23 deletions frontend/desktop/src/components/common/RenderForm/tags/TagInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
}"
:contenteditable="!isDisabled"
:data-placeholder="placeholder"
data-test-name="formTag_input_divInput"
v-bk-clickoutside="handleClickOutSide"
@mouseup="handleInputMouseUp"
@focus="handleInputFocus"
Expand All @@ -48,11 +49,11 @@
<li
class="rf-select-item"
v-for="item in varList"
v-bk-overflow-tips
:key="item"
:class="{ 'is-hover': hoverKey === item }"
@click.stop="onSelectVal(item)">
{{ item }}
:key="item.key"
:class="{ 'is-hover': hoverKey === item.key }"
@click.stop="onSelectVal(item.key)">
<span class="key">{{ item.key }}</span>
<span class="name" v-bk-overflow-tips>{{ item.name }}</span>
</li>
</ul>
</div>
Expand Down Expand Up @@ -122,14 +123,14 @@
}),
constantArr: {
get () {
let Keylist = []
let KeyList = []
if (this.constants) {
Keylist = [...Object.keys(this.constants)]
KeyList = [...Object.values(this.constants)]
}
if (this.internalVariable) {
Keylist = [...Keylist, ...Object.keys(this.internalVariable)]
KeyList = [...KeyList, ...Object.values(this.internalVariable)]
}
return Keylist
return KeyList
},
set (val) {
this.varList = val
Expand Down Expand Up @@ -203,7 +204,7 @@
const divInputDom = this.$el.querySelector('.div-input')
if (divInputDom) {
divInputDom.innerHTML = this.value
if (this.render) {
if (this.render && this.value) {
this.handleInputBlur()
}
}
Expand Down Expand Up @@ -330,7 +331,7 @@
matchResult = [matchText]
}
if (matchResult && matchResult[0]) {
this.varList = this.constantArr.filter(item => item.indexOf(matchText) > -1)
this.varList = this.constantArr.filter(item => item.key.indexOf(matchText) > -1)
// 计算变量下拉列表的left
this.isListOpen = false
if (this.varList.length) {
Expand All @@ -352,11 +353,10 @@
this.$el.appendChild(newDom)
const focusValueWidth = newDom.offsetWidth || 0
this.$el.removeChild(newDom)
let right = inputWidth - 238 - previousDomLeft - previousDomWidth - focusValueWidth
right = right > 0 ? right : 0
this.varListPositionRight = right
this.$nextTick(() => {
const { height: varListHeight } = document.querySelector('.rf-select-list').getBoundingClientRect()
const { width: varListWidth, height: varListHeight } = this.$el.querySelector('.rf-select-list').getBoundingClientRect()
let right = inputWidth - varListWidth - previousDomLeft - previousDomWidth - focusValueWidth
right = right > 0 ? right : 0
const top = window.innerHeight < inputTop + 30 + varListHeight + 50 ? -95 : 30
this.varListPosition = `right: ${right}px; top: ${top}px`
})
Expand All @@ -382,9 +382,14 @@
// 获取行内纯文本
const divInputDom = this.$el.querySelector('.div-input')
let inputValue = divInputDom.textContent
inputValue.replace(' ', ' ')
if (divInputDom.childNodes.length) {
inputValue = Array.from(divInputDom.childNodes).map(item => {
return item.type === 'button' ? item.value : item.textContent
return item.type === 'button'
? item.value
: item.textContent.trim() === ''
? ' '
: item.textContent.replace(/&nbsp;/g, ' ')
}).join('')
}
this.input.value = inputValue
Expand All @@ -410,7 +415,7 @@
let isExistVar = false
if ($0) {
isExistVar = this.constantArr.some(item => {
const varText = item.slice(2, -1)
const varText = item.key.slice(2, -1)
if ($0.indexOf(varText) > -1) {
const regexp = new RegExp(`^(.*\\W|\\W)?${varText}(\\W|\\W.*)?$`)
return regexp.test($0)
Expand All @@ -424,6 +429,7 @@
return match
})
divInputDom.innerHTML = innerHtml
this.updateInputValue()
},
// 文本框按键事件
handleInputKeyDown (e) {
Expand Down Expand Up @@ -451,12 +457,12 @@
if (len) {
event.preventDefault()
event.stopPropagation()
let curIndex = this.varList.findIndex(item => item === this.hoverKey)
let curIndex = this.varList.findIndex(item => item.key === this.hoverKey)
curIndex = event.code === 'ArrowDown' ? curIndex + 1 : curIndex - 1
curIndex = curIndex > len - 1 ? 0 : (curIndex < 0 ? len - 1 : curIndex)
const option = this.varList[curIndex]
if (option) {
this.hoverKey = option
this.hoverKey = option.key
const selectDom = this.$el.querySelector('.rf-select-content')
const hoverItemDom = selectDom.querySelector('.is-hover')
if (hoverItemDom) {
Expand Down Expand Up @@ -487,12 +493,17 @@
position: absolute;
top: 30px;
right: 0;
width: 238px;
max-width: 600px;
background: #ffffff;
border: 1px solid #dcdee5;
border-radius: 2px;
box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.1);
box-shadow: 0 3px 9px 0 rgba(0,0,0,.1);
overflow-y: hidden;
z-index: 100;
.name {
color: #c4c6cc;
margin-left: 16px;
}
}
.rf-select-content {
max-height: 100px;
Expand All @@ -501,12 +512,21 @@
@include scrollbar;
}
.rf-select-item {
display: flex;
align-items: center;
padding: 0 10px;
line-height: 32px;
font-size: 12px;
cursor: pointer;
overflow: hidden;
text-overflow: ellipsis;
> span {
flex-shrink: 0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.name {
max-width: 250px;
}
&.is-hover,
&:hover {
background: #f5f7fa;
Expand Down
Loading