Skip to content

Commit

Permalink
Merge pull request #7140 from TencentBlueKing/release_horse
Browse files Browse the repository at this point in the history
release horse
  • Loading branch information
normal-wls authored Oct 19, 2023
2 parents 03fbb6a + 7ff3213 commit e73295b
Show file tree
Hide file tree
Showing 154 changed files with 6,265 additions and 2,516 deletions.
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.30.2
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.30.2"
app_version: "3.31.0"
app:
region: default
bk_app_code: bk_sops
Expand Down
6 changes: 4 additions & 2 deletions 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.30.2"
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 Expand Up @@ -766,7 +766,6 @@ def monitor_report_config():
MAX_EXPIRED_SESSION_CLEAN_NUM = env.MAX_EXPIRED_SESSION_CLEAN_NUM
EXPIRED_SESSION_CLEAN_CRON = env.EXPIRED_SESSION_CLEAN_CRON


# V2引擎任务清理配置
ENABLE_CLEAN_EXPIRED_V2_TASK = env.ENABLE_CLEAN_EXPIRED_V2_TASK
CLEAN_EXPIRED_V2_TASK_CRON = env.CLEAN_EXPIRED_V2_TASK_CRON
Expand Down Expand Up @@ -829,3 +828,6 @@ def check_engine_admin_permission(request, *args, **kwargs):
"SYMMETRIC_CIPHER_TYPE": bkcrypto_constants.SymmetricCipherType.AES.value,
}
)

# 任务列表过滤失败任务最大天数
TASK_LIST_STATUS_FILTER_DAYS = env.BKPAAS_TASK_LIST_STATUS_FILTER_DAYS
1 change: 1 addition & 0 deletions docs/develop/tag_usage_dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ ip 选择器,支持静态 ip 或动态 ip 的单选和多选。
- `showMiniMap`: 显示小地图,默认 false
- `showLanguageSwitch`: 显示语言切换,默认 true
- `readOnly`: 只读模式,默认 false
- `variable_render`: 是否开启变量渲染,默认 false

**方法**

Expand Down
1 change: 1 addition & 0 deletions en_docs/develop/tag_usage_dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,7 @@ Code editor
- `showMiniMap`: show minimap. Default: false
- `showLanguageSwitch`: show language switch. Default: true
- `readOnly`: read only mode. Default: false
- `variable_render`: enable variable render. Default: false

**Methods**

Expand Down
3 changes: 3 additions & 0 deletions env.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,6 @@
or os.getenv("BK_CRYPTO_TYPE")
or "CLASSIC"
)

# 默认六个月
BKPAAS_TASK_LIST_STATUS_FILTER_DAYS = int(os.getenv("BKPAAS_TASK_LIST_STATUS_FILTER_DAYS", 180))
2 changes: 1 addition & 1 deletion frontend/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"ajv": "^6.10.2",
"art-template": "^4.13.0",
"axios": "^0.18.0",
"bk-magic-vue": "2.5.2",
"bk-magic-vue": "2.5.8-beta.10",
"cron-parser-custom": "^2.13.0",
"dom-to-image": "^2.6.0",
"element-ui": "^2.4.1",
Expand Down
Binary file modified frontend/desktop/src/assets/fonts/bksops-icon.eot
Binary file not shown.
27 changes: 27 additions & 0 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.
1 change: 1 addition & 0 deletions frontend/desktop/src/assets/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
var MAX_NODE_EXECUTE_TIMEOUT = {{MAX_NODE_EXECUTE_TIMEOUT}};
var BK_DOMAIN = '{{BK_DOMAIN}}';
var BK_PAAS_ESB_HOST = '{{BK_PAAS_ESB_HOST}}'
var TASK_LIST_STATUS_FILTER_DAYS = {{TASK_LIST_STATUS_FILTER_DAYS}}
function getCookie(name) {
var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
return (arr = document.cookie.match(reg)) ? unescape(arr[2]) : null;
Expand Down
2 changes: 1 addition & 1 deletion frontend/desktop/src/assets/js/flow.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions frontend/desktop/src/components/common/FullCodeEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
</i>
</div>
<code-editor
ref="codeEditor"
:key="isFullScreen"
:value="value"
:options="options"
Expand Down
100 changes: 85 additions & 15 deletions frontend/desktop/src/components/common/RenderForm/FormGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,21 @@
* specific language governing permissions and limitations under the License.
*/
<template>
<div class="rf-form-group" :key="randomKey" :class="[{ 'rf-has-hook': option.showHook }, scheme.status || '']" v-show="showForm">
<div
class="rf-form-group"
:key="randomKey"
:class="[
{
'rf-has-hook': option.showHook,
'show-render': isShowRenderIcon
},
scheme.status || ''
]"
v-show="showForm">
<!-- 分组名称和提示 -->
<div v-if="showFormTitle" :class="['rf-group-name', { 'not-reuse': showNotReuseTitle }]">
<span class="scheme-name">{{scheme.name || scheme.attrs.name}}</span>
<span class="scheme-code">{{ scheme.tag_code }}</span>
<span class="scheme-code" v-if="!option.showHook">{{ scheme.tag_code }}</span>
<i
v-if="showNotReuseTitle || showPreMakoTip"
v-bk-tooltips="{
Expand Down Expand Up @@ -90,17 +100,18 @@
</component>
</div>
<!-- 变量勾选checkbox -->
<div class="rf-tag-hook" v-if="showHook">
<div class="rf-tag-hook" v-if="showHook" :class="{ 'hide-render-icon': !isShowRenderIcon }">
<i
:class="['common-icon-variable-cite hook-icon', { actived: hook, disabled: !option.formEdit || !render }]"
: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
}"
@click="onHookForm(!hook)">
</i>
<i
v-if="isShowRenderIcon"
:class="['common-icon-render-skip render-skip-icon', { actived: !render, disabled: !option.formEdit || hook }]"
v-bk-tooltips="{
content: !render ? $t('取消变量免渲染') : $t('变量免渲染'),
Expand Down Expand Up @@ -190,12 +201,13 @@
showForm, // combine 类型 Tag 组是否显示
showHook, // combine 类型 Tag 组是否可勾选
isDescTipsShow: false,
isExpand: false
isExpand: false,
isShowRenderIcon: false
}
},
computed: {
showFormTitle () {
return !this.hook && this.option.showGroup && !!(this.scheme.name || this.scheme.attrs.name)
return this.option.showGroup && !!(this.scheme.name || this.scheme.attrs.name)
},
showNotReuseTitle () {
return this.option.formEdit && this.scheme.attrs.notReuse
Expand Down Expand Up @@ -235,6 +247,42 @@
}
})
}
// 移除「变量免渲染」的功能开关
const { type, attrs } = this.scheme
if (type === 'code_editor') {
if (attrs.variable_render === false) { // variable_render 开启变量渲染
/**
* need_render:
1. false
之前已勾选,现在去掉免渲染icon
2.true,判断value
a. 不包含${},需要把need_render置为false,去掉免渲染icon
b. 包含${},保留免渲染icon
*/
if (this.render) {
const regex = /\${[a-zA-Z_]\w*}/g
const matchList = this.value.match(regex)
const isMatch = matchList && matchList.some(item => {
return !!this.constants[item]
})
if (isMatch) {
this.isShowRenderIcon = true
} else {
this.showHook = false
this.$nextTick(() => {
this.onRenderChange()
})
}
}
} else {
this.showHook = false
if (!this.render) {
this.isShowRenderIcon = true
}
}
} else if (!this.render) { // 如果开启了免渲染则展示按钮
this.isShowRenderIcon = true
}
},
beforeDestroy () {
if (this.scheme.events) {
Expand Down Expand Up @@ -369,14 +417,23 @@
<style lang="scss">
.rf-form-group {
position: relative;
margin-top: 15px;
&.added {
background: rgba(220,255,226,0.30);
}
&.deleted {
background: #ffeeec;
}
&.rf-has-hook .rf-tag-form {
margin-right: 64px;
margin-right: 40px;
}
&.show-render {
> .rf-tag-form {
margin-right: 58px;
}
.hook-icon {
padding-right: 3px !important;
}
}
.rf-group-name {
display: block
Expand All @@ -392,22 +449,22 @@
}
.rf-tag-hook {
position: absolute;
top: 0;
top: 30px;
right: 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 8px;
width: 56px;
justify-content: center;
height: 32px;
background: #f0f1f5;
border-radius: 2px;
cursor: pointer;
z-index: 1;
.hook-icon,
.render-skip-icon {
font-size: 16px;
height: 32px;
line-height: 32px;
font-size: 12px;
color: #979ba5;
cursor: pointer;
&.disabled {
color: #c4c6cc;
cursor: not-allowed;
Expand All @@ -417,7 +474,20 @@
}
}
.hook-icon {
font-size: 19px;
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;
margin: 3px 0 0 6px;
}
&.hide-render-icon {
justify-content: center;
}
}
.tag-label-tips {
Expand Down
Loading

0 comments on commit e73295b

Please sign in to comment.