diff --git a/config/default.py b/config/default.py index 4c52061729..8c0f2f9235 100644 --- a/config/default.py +++ b/config/default.py @@ -793,6 +793,10 @@ def monitor_report_config(): # 节点历史最大执行记录数 MAX_RECORDED_NODE_EXECUTION_TIMES = env.MAX_RECORDED_NODE_EXECUTION_TIMES +# 节点最大执行时间限制(需要插件实现中进行主动失败) +WITHOUT_NODE_MAX_EXECUTION_DAYS_TAG = env.WITHOUT_NODE_MAX_EXECUTION_DAYS_TAG +NODE_MAX_EXECUTION_DAYS = env.NODE_MAX_EXECUTION_DAYS + # engine admin permission settings def check_engine_admin_permission(request, *args, **kwargs): @@ -843,7 +847,10 @@ def check_engine_admin_permission(request, *args, **kwargs): ) # 任务列表过滤失败任务最大天数 -TASK_LIST_STATUS_FILTER_DAYS = env.BKPAAS_TASK_LIST_STATUS_FILTER_DAYS +TASK_LIST_STATUS_FILTER_DAYS = env.BKAPP_TASK_LIST_STATUS_FILTER_DAYS + +# 我的动态过滤任务最大天数 +MY_DYNAMIC_LIST_FILTER_DAYS = env.BKAPP_MY_DYNAMIC_LIST_FILTER_DAYS # 第三方插件特殊轮询时间配置 REMOTE_PLUGIN_FIX_INTERVAL_CODES = env.REMOTE_PLUGIN_FIX_INTERVAL_CODES diff --git a/env.py b/env.py index c1d93079bd..52096c0195 100644 --- a/env.py +++ b/env.py @@ -109,9 +109,16 @@ # 节点历史最大执行记录数 MAX_RECORDED_NODE_EXECUTION_TIMES = int(os.getenv("BKAPP_MAX_RECORDED_NODE_EXECUTION_TIMES", 5)) +# 节点最大执行时间限制(需要插件实现中进行主动失败) +WITHOUT_NODE_MAX_EXECUTION_DAYS_TAG = -1 +NODE_MAX_EXECUTION_DAYS = int(os.getenv("BKAPP_NODE_MAX_EXECUTION_DAYS", WITHOUT_NODE_MAX_EXECUTION_DAYS_TAG)) + # 获取 PaaS 注入的蓝鲸域名 BKPAAS_BK_DOMAIN = os.getenv("BKPAAS_BK_DOMAIN", "") or os.getenv("BK_DOMAIN", "") +# PaaS 注入的蓝鲸共享资源域名 +BKPAAS_SHARED_RES_URL = os.getenv("BKPAAS_SHARED_RES_URL", "") + # 任务状态展示版本, v2 为支持了等待处理展示的版本,修改为 v1 会退化为不计算独立子任务的状态 TASK_STATUS_DISPLAY_VERSION = os.getenv("BKAPP_TASK_STATUS_DISPLAY_VERSION", "v2") @@ -124,8 +131,12 @@ or "CLASSIC" ) -# 默认六个月 -BKPAAS_TASK_LIST_STATUS_FILTER_DAYS = int(os.getenv("BKPAAS_TASK_LIST_STATUS_FILTER_DAYS", 180)) +# 任务列表展示时间,默认六个月 +BKAPP_TASK_LIST_STATUS_FILTER_DAYS = int(os.getenv("BKAPP_TASK_LIST_STATUS_FILTER_DAYS", 180)) + +# 我的动态展示时间,默认六个月 +BKAPP_MY_DYNAMIC_LIST_FILTER_DAYS = int(os.getenv("BKAPP_MY_DYNAMIC_LIST_FILTER_DAYS", 30)) + # 第三方插件特殊轮询时间配置 REMOTE_PLUGIN_FIX_INTERVAL_CODES_STR = os.getenv("BKAPP_REMOTE_PLUGIN_FIX_INTERVAL_CODES", "") diff --git a/frontend/desktop/package.json b/frontend/desktop/package.json index 77620e73c2..95b15a839f 100644 --- a/frontend/desktop/package.json +++ b/frontend/desktop/package.json @@ -11,10 +11,11 @@ "license": "ISC", "dependencies": { "@blueking/bkcharts": "^2.0.11-alpha.5", - "@blueking/bkui-form": "0.0.42", + "@blueking/bkui-form": "0.0.42-beta.5", "@blueking/crypto-js-sdk": "0.0.5", "@blueking/login-modal": "^1.0.1", "@blueking/notice-component-vue2": "^2.0.1", + "@blueking/platform-config": "^1.0.2", "@blueking/user-selector": "^1.0.5-beta.2", "@vue/babel-preset-jsx": "^1.3.0", "ajv": "^6.10.2", diff --git a/frontend/desktop/src/App.vue b/frontend/desktop/src/App.vue index ad43263663..9e7d5ca1ce 100644 --- a/frontend/desktop/src/App.vue +++ b/frontend/desktop/src/App.vue @@ -136,7 +136,7 @@ } } }, - created () { + async created () { window.msg_list = [] bus.$on('showLoginModal', args => { const { has_plain, login_url, width, height, method } = args @@ -193,7 +193,8 @@ }) }) } - this.getPageFooter() + await this.getPageFooter() + this.getGlobalConfig() window.addEventListener('message', this.messageHandler, false) }, mounted () { @@ -203,7 +204,9 @@ ...mapActions([ 'getPermissionMeta', 'queryUserPermission', - 'getFooterContent' + 'getFooterContent', + 'getFooterInfo', + 'getGlobalConfig' ]), ...mapActions('appmaker/', [ 'loadAppmakerDetail' @@ -229,7 +232,7 @@ 'setProjectConfig' ]), ...mapMutations([ - 'setPageFooter', + 'setFooterInfo', 'setAdminPerm', 'setStatisticsPerm' ]), @@ -309,12 +312,11 @@ async getPageFooter () { try { this.footerLoading = true - const resp = await this.getFooterContent() + const resp = await this.getFooterInfo() if (resp.result) { - this.setPageFooter(resp.data) + this.setFooterInfo(resp.data) } } catch (e) { - this.setPageFooter(``) console.log(e) } finally { this.footerLoading = false diff --git a/frontend/desktop/src/api/index.js b/frontend/desktop/src/api/index.js index 9a2730b160..edcd4c8a74 100644 --- a/frontend/desktop/src/api/index.js +++ b/frontend/desktop/src/api/index.js @@ -85,11 +85,14 @@ axios.interceptors.response.use( bus.$emit('createSnapshot', true) // 创建模板快照 } - const successUrl = `${window.location.origin}${window.SITE_URL}static/bk_sops/login_success.html` - let [loginUrl] = data.login_url.split('?') - loginUrl = `${loginUrl}?c_url=${encodeURIComponent(successUrl)}` - - showLoginModal({ loginUrl }) + // 退出登录接口不打开登录弹框 + if (response.config.url.indexOf('/logout') === -1) { + const successUrl = `${window.location.origin}${window.SITE_URL}static/bk_sops/login_success.html` + let [loginUrl] = data.login_url.split('?') + loginUrl = `${loginUrl}?c_url=${encodeURIComponent(successUrl)}` + + showLoginModal({ loginUrl }) + } } break case 499: diff --git a/frontend/desktop/src/assets/html/index.html b/frontend/desktop/src/assets/html/index.html index 020008c1b8..f6d862dfee 100644 --- a/frontend/desktop/src/assets/html/index.html +++ b/frontend/desktop/src/assets/html/index.html @@ -52,6 +52,10 @@ 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}} + var LOGIN_URL = '{{LOGIN_URL}}' + var BK_PAAS_SHARED_RES_URL = '{{BK_PAAS_SHARED_RES_URL}}' + var APP_NAME = '{{APP_NAME}}' + var RUN_VER_NAME = '{{RUN_VER_NAME}}' // 是否开启通知中心 var ENABLE_NOTICE_CENTER = {{ENABLE_NOTICE_CENTER}} var MESSAGE_HELPER_URL = '{{MESSAGE_HELPER_URL}}' diff --git a/frontend/desktop/src/components/common/RenderForm/tags/TagInput.vue b/frontend/desktop/src/components/common/RenderForm/tags/TagInput.vue index 22628b9f7d..5be703d51a 100644 --- a/frontend/desktop/src/components/common/RenderForm/tags/TagInput.vue +++ b/frontend/desktop/src/components/common/RenderForm/tags/TagInput.vue @@ -417,7 +417,7 @@ }, // 文本框失焦 handleInputBlur (e) { - this.$emit('blur') + this.$emit('blur', this.input.value) this.input.focus = false // 更新文本框结构,生成tag标签 this.updateInputHtml() diff --git a/frontend/desktop/src/components/common/RenderForm/tags/TagTextarea.vue b/frontend/desktop/src/components/common/RenderForm/tags/TagTextarea.vue index b792a2995c..66b3bb09bc 100644 --- a/frontend/desktop/src/components/common/RenderForm/tags/TagTextarea.vue +++ b/frontend/desktop/src/components/common/RenderForm/tags/TagTextarea.vue @@ -375,7 +375,7 @@ }, // 文本框失焦 handleInputBlur (e) { - this.$emit('blur') + this.$emit('blur', this.input.value) this.input.focus = false // 更新文本框结构,生成tag标签 this.updateInputHtml() diff --git a/frontend/desktop/src/components/layout/CopyrightFooter.vue b/frontend/desktop/src/components/layout/CopyrightFooter.vue index 0f450f64b0..4a331b9551 100644 --- a/frontend/desktop/src/components/layout/CopyrightFooter.vue +++ b/frontend/desktop/src/components/layout/CopyrightFooter.vue @@ -10,7 +10,12 @@ * specific language governing permissions and limitations under the License. */