From 74696b4eb1b2803dda3ec2b9ca7d6e644ca36bba Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 6 Jun 2024 06:44:39 +0000 Subject: [PATCH 01/31] minor: start new version 1.0.32 --- app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.yml b/app.yml index 2349e18..c6b83b0 100644 --- a/app.yml +++ b/app.yml @@ -9,7 +9,7 @@ introduction_en: Process&config manager description: 进程配置管理是腾讯蓝鲸智云推出的一个专注于进程和配置文件管理的 SaaS 工具。 description_en: Process&config manager is a SaaS tool launched by Tencent BlueKing that focuses on process and configuration file management. -version: 1.0.31 +version: 1.0.32 category: 运维工具 language_support: 英语,中文 desktop: From 3924ac5ebe375e4c1cc598f0750a8eb9c4c1ede5 Mon Sep 17 00:00:00 2001 From: hyunfa <1598047833@qq.com> Date: Fri, 14 Jun 2024 12:16:51 +0800 Subject: [PATCH 02/31] =?UTF-8?q?feat(front):=20=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E6=89=98=E7=AE=A1=E7=8A=B6=E6=80=81=EF=BC=8C=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E8=BF=9B=E7=A8=8B=E7=8A=B6=E6=80=81=E6=97=B6=E9=97=B4=E8=BD=AE?= =?UTF-8?q?=E8=AF=A2=20#=20Reviewed,=20transaction=20id:=209804?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/package.json | 1 + web/src/common/use-interval.js | 57 +++++++++++++++++++ web/src/common/util.js | 25 ++++++++ web/src/language/lang/en.js | 1 + web/src/language/lang/zh.js | 1 + web/src/main.js | 4 ++ web/src/store/modules/process.js | 5 ++ .../ProcessManage/Status/ButtonGrounp.vue | 53 ++++++++++++++++- .../ProcessManage/Status/TableContent.vue | 2 +- 9 files changed, 147 insertions(+), 2 deletions(-) create mode 100644 web/src/common/use-interval.js diff --git a/web/package.json b/web/package.json index f43f6e1..c2de0c1 100644 --- a/web/package.json +++ b/web/package.json @@ -40,6 +40,7 @@ "@blueking/bkcharts": "^2.0.10", "@blueking/login-modal": "^1.0.5", "@icon-cool/bk-icon-gsekit": "0.0.9", + "@vue/composition-api": "^1.7.2", "axios": "0.21.4", "bk-magic-vue": "2.2.14", "cookie": "0.4.0", diff --git a/web/src/common/use-interval.js b/web/src/common/use-interval.js new file mode 100644 index 0000000..93c270a --- /dev/null +++ b/web/src/common/use-interval.js @@ -0,0 +1,57 @@ +import { ref } from '@vue/composition-api'; + +/** + * 轮询 + * @param cb 回调 + * @param interval 轮询周期 + * @param immediate 立即执行 + */ +export default function useIntervalFn( + cb, + interval = 5000, + immediate = false, +) { + const isPending = ref(false); + const flag = ref(false); + + const timer = ref(null); + + function clear() { + if (timer.value) { + clearTimeout(timer.value); + timer.value = null; + } + } + + function stop() { + isPending.value = false; + flag.value = false; + clear(); + } + + function start(...args) { + clear(); + if (!interval) return; + + flag.value = true; + async function timerFn() { + // 上一个接口未执行完,不执行本次轮询 + if (isPending.value) return; + + isPending.value = true; + await cb(...args); + isPending.value = false; + if (flag.value) { + timer.value = setTimeout(timerFn, interval); + } + } + setTimeout(() => timerFn(), immediate ? 0 : interval); + } + + return { + isPending, + timer, + start, + stop, + }; +} diff --git a/web/src/common/util.js b/web/src/common/util.js index 42a65c3..15fedb8 100644 --- a/web/src/common/util.js +++ b/web/src/common/util.js @@ -556,3 +556,28 @@ export const copyText = (text) => { document.body.removeChild(textarea); return result; }; + +/** + * 格式化日期为: 6月23号 12:00, + * @param {Number | String} val + * @return {String} + */ +export function specifiedFormatDate(val) { + const date = new Date(timeReplace(val)); + + if (isNaN(date.getTime())) { + console.warn('无效的时间'); + return ''; + } + const months = ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"]; + + const month = months[date.getMonth()]; + const day = date.getDate() + "号"; + + // 获取小时和分钟,并确保他们都是两位数 + const hours = String(date.getHours()).padStart(2, '0'); + const minutes = String(date.getMinutes()).padStart(2, '0'); + + // 返回格式化后的字符串 + return `${month}${day} ${hours}:${minutes}`; +} diff --git a/web/src/language/lang/en.js b/web/src/language/lang/en.js index 7022f88..e4658b8 100644 --- a/web/src/language/lang/en.js +++ b/web/src/language/lang/en.js @@ -232,6 +232,7 @@ export default { 操作成功: 'Operation is successful', '内网IP、云区域': 'Intranet IP, cloud area', 同步进程状态: 'Sync process status', + 状态同步: 'Status synchronized as of {0}. To get the real-time status, please click "Synchronize Process Status".', 同步CMDB进程配置: 'Sync CMDB process config', 同步成功: 'Sync successfully', 暂无其他实例: 'No other instances', diff --git a/web/src/language/lang/zh.js b/web/src/language/lang/zh.js index 7de9663..a92ccf3 100644 --- a/web/src/language/lang/zh.js +++ b/web/src/language/lang/zh.js @@ -232,6 +232,7 @@ export default { 操作成功: '操作成功', '内网IP、云区域': '内网IP、云区域', 同步进程状态: '同步进程状态', + 状态同步: '状态同步于:{0},获取实时状态请点击同步进程状态', 同步CMDB进程配置: '同步CMDB进程配置', 同步成功: '同步成功', 暂无其他实例: '暂无其他实例', diff --git a/web/src/main.js b/web/src/main.js index 51f94e2..07140d5 100644 --- a/web/src/main.js +++ b/web/src/main.js @@ -15,6 +15,7 @@ import { injectCSRFTokenToHeaders } from '@/api'; import '@/mixins/emptyMixin.js'; import StatusView from '@/components/StatusView'; import TableException from '@/components/Empty/TableException'; +import VueCompositionAPI from '@vue/composition-api'; try { const id = window.PROJECT_CONFIG.TAM_AEGIS_KEY; @@ -37,6 +38,7 @@ try { Vue.config.devtools = true; Vue.component('StatusView', StatusView); Vue.component('TableException', TableException); +Vue.use(VueCompositionAPI); injectCSRFTokenToHeaders(); getUserInfo().then(() => { @@ -55,6 +57,7 @@ getUserInfo().then(() => { async function getUserInfo() { try { const res = await store.dispatch('meta/ajaxGetUserInfo'); + console.log("🚀 ~ getUserInfo ~ res:", res) this.username = res.data.username; store.commit('updateUsername', res.data.username); store.commit('updateToggleStaticRouter', !!res.data.is_superuser); @@ -64,6 +67,7 @@ async function getUserInfo() { }); } } catch (e) { + console.log("🚀 ~ getUserInfo ~ e:", e) console.warn(e); } } diff --git a/web/src/store/modules/process.js b/web/src/store/modules/process.js index 46c9fca..2e2c642 100644 --- a/web/src/store/modules/process.js +++ b/web/src/store/modules/process.js @@ -70,5 +70,10 @@ export default { const url = `api/${rootState.bizId}/process/delete_process_template/`; return http.post(url, params.data); }, + // 轮询刷新同步状态时间 + ajaxFlushSyncProcessStateTime({ rootState }) { + const url = `/api/${rootState.bizId}/process/sync_process_status_time/`; + return http.get(url); + }, }, }; diff --git a/web/src/views/ProcessManage/Status/ButtonGrounp.vue b/web/src/views/ProcessManage/Status/ButtonGrounp.vue index 7e94752..7845232 100644 --- a/web/src/views/ProcessManage/Status/ButtonGrounp.vue +++ b/web/src/views/ProcessManage/Status/ButtonGrounp.vue @@ -71,6 +71,11 @@
+

+ + {{ time }} + +

import { mapState } from 'vuex'; +import useIntervalFn from '@/common/use-interval'; +import { ref } from '@vue/composition-api'; +import { specifiedFormatDate } from '@/common/util'; export default { + data() { + return { + time: ref(''), + } + }, props: { isSelected: { type: Boolean, @@ -161,6 +174,42 @@ export default { this.$emit('synchronousProcess', 'config'); this.$refs.synchronousPopover.hideHandler(); }, + // 同步状态时间 + async SyncProcessStateTime() { + const res = await this.$store.dispatch('process/ajaxFlushSyncProcessStateTime'); + if (res.result) { + this.time = specifiedFormatDate(res.data.time); + } + }, + async initPolling() { + const { start, stop } = useIntervalFn(this.SyncProcessStateTime, 10000, true); + + this.stop = stop; + + // 启动轮询 + start(); + }, + stopPolling() { + if (this.stop) { + this.stop(); + } + } + }, + created() { + // 在组件创建时启动轮询 + this.initPolling(); + }, + beforeDestroy() { + // 在组件销毁前停止轮询 + this.stopPolling(); + }, + deactivated() { + // 在组件停用时停止轮询 + this.stopPolling(); + }, + destroyed() { + // 在组件销毁时停止轮询 + this.stopPolling(); }, }; @@ -177,7 +226,9 @@ export default { .king-btn { min-width: 86px; } - + .syncProcessStateTime { + margin-right: 30px; + } .synchronous-btn { position: absolute; right: 0; diff --git a/web/src/views/ProcessManage/Status/TableContent.vue b/web/src/views/ProcessManage/Status/TableContent.vue index 43b5f88..810ae95 100644 --- a/web/src/views/ProcessManage/Status/TableContent.vue +++ b/web/src/views/ProcessManage/Status/TableContent.vue @@ -329,7 +329,7 @@ export default { fields, setting: { fields, - selectedFields: fields.slice(0, 7), + selectedFields: fields.slice(0, 8), size: 'small', }, // 是否全选 From 7c7dcf84091878bfabc67463bb7321b22e57d10d Mon Sep 17 00:00:00 2001 From: hyunfa <1598047833@qq.com> Date: Fri, 14 Jun 2024 12:33:15 +0800 Subject: [PATCH 03/31] =?UTF-8?q?feat(front):=20=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E6=89=98=E7=AE=A1=E7=8A=B6=E6=80=81=E6=8F=90=E4=BA=A4=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20#=20Reviewed,=20transaction=20id:=209806?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/main.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/web/src/main.js b/web/src/main.js index 07140d5..3d2734b 100644 --- a/web/src/main.js +++ b/web/src/main.js @@ -57,7 +57,6 @@ getUserInfo().then(() => { async function getUserInfo() { try { const res = await store.dispatch('meta/ajaxGetUserInfo'); - console.log("🚀 ~ getUserInfo ~ res:", res) this.username = res.data.username; store.commit('updateUsername', res.data.username); store.commit('updateToggleStaticRouter', !!res.data.is_superuser); @@ -67,7 +66,6 @@ async function getUserInfo() { }); } } catch (e) { - console.log("🚀 ~ getUserInfo ~ e:", e) console.warn(e); } } From 4547b67268d1b00bf318ee1e9cf4b0fc4a1e4c12 Mon Sep 17 00:00:00 2001 From: yunchao Date: Tue, 11 Jun 2024 18:54:36 +0800 Subject: [PATCH 04/31] =?UTF-8?q?feat:=20=E8=BF=9B=E7=A8=8B=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E9=A1=B5=E6=8F=90=E7=A4=BA=E5=BF=AB=E7=85=A7=E6=97=B6?= =?UTF-8?q?=E9=97=B4(closed=20#324)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/gsekit/meta/models.py | 1 + apps/gsekit/periodic_tasks/sync_process.py | 7 ++++--- apps/gsekit/process/handlers/process.py | 23 +++++++++++++++++++--- apps/gsekit/process/views/process.py | 5 +++++ 4 files changed, 30 insertions(+), 6 deletions(-) diff --git a/apps/gsekit/meta/models.py b/apps/gsekit/meta/models.py index 6f7a09a..aa8efef 100644 --- a/apps/gsekit/meta/models.py +++ b/apps/gsekit/meta/models.py @@ -37,6 +37,7 @@ class KEYS: SYNC_BIZ_PROCESS_STATUS_TIMEOUT = "SYNC_BIZ_PROCESS_STATUS_TIMEOUT" # 记录所有业务ID,用于同步新业务到灰度列表对比使用 ALL_BIZ_IDS = "ALL_BIZ_IDS" + SYNC_PROC_STATUS_TIME = "SYNC_PROC_STATUS_TIME" @classmethod def process_task_aggregate_info(cls, bk_biz_id: int) -> typing.Dict[str, str]: diff --git a/apps/gsekit/periodic_tasks/sync_process.py b/apps/gsekit/periodic_tasks/sync_process.py index 598b419..8c8b64f 100644 --- a/apps/gsekit/periodic_tasks/sync_process.py +++ b/apps/gsekit/periodic_tasks/sync_process.py @@ -25,7 +25,10 @@ @task(ignore_result=True) def sync_biz_process_task(bk_biz_id): - ProcessHandler(bk_biz_id=bk_biz_id).sync_biz_process() + logger.info(f"[sync_biz_process_task] start, bk_biz_id={bk_biz_id}") + process_related_infos = ProcessHandler(bk_biz_id=bk_biz_id).sync_biz_process() + ProcessHandler(bk_biz_id=bk_biz_id).sync_biz_process_status(process_related_infos=process_related_infos) + logger.info(f"[sync_biz_process_task] finished, bk_biz_id={bk_biz_id}") @periodic_task(run_every=django_celery_beat.tzcrontab.TzAwareCrontab(minute="*/10", tz=timezone.get_current_timezone())) @@ -40,8 +43,6 @@ def sync_process(bk_biz_id=None): logger.info(f"[sync_process] start, bk_biz_id={biz_id}") countdown = calculate_countdown(count, index) sync_biz_process_task.apply_async((biz_id,), countdown=countdown) - # TODO 由于GSE接口存在延迟,此处暂停同步状态的周期任务,待GSE优化后再开启 - # ProcessHandler(bk_biz_id=biz_id).sync_proc_status_to_db() logger.info(f"[sync_process] bk_biz_id={biz_id} will be run after {countdown} seconds.") diff --git a/apps/gsekit/process/handlers/process.py b/apps/gsekit/process/handlers/process.py index 73e6820..2df4e93 100644 --- a/apps/gsekit/process/handlers/process.py +++ b/apps/gsekit/process/handlers/process.py @@ -9,6 +9,7 @@ See the License for the specific language governing permissions and limitations under the License. """ import copy +from datetime import datetime import json import operator import time @@ -512,6 +513,8 @@ def sync_biz_process(self): self.create_process_inst(process_list) + return process_list + def generate_process_inst_migrate_data(self, process_list: List) -> Dict: """计算准备好变更实例所需的数据""" @@ -1109,11 +1112,11 @@ def get_proc_inst_status_infos( ) return proc_inst_status_infos - def sync_biz_process_status(self): + def sync_biz_process_status(self, process_related_infos=None): begin_time = time.time() - - process_related_infos = batch_request(CCApi.list_process_related_info, {"bk_biz_id": self.bk_biz_id}) + if not process_related_infos: + process_related_infos = batch_request(CCApi.list_process_related_info, {"bk_biz_id": self.bk_biz_id}) bk_process_ids = [process_info["process"]["bk_process_id"] for process_info in process_related_infos] proc_inst_map = defaultdict(list) for proc_inst in ProcessInst.objects.filter(bk_process_id__in=bk_process_ids).values( @@ -1164,6 +1167,14 @@ def sync_biz_process_status(self): cost_time = time.time() - begin_time logger.info("[sync_proc_status] cost: {cost_time}s".format(cost_time=cost_time)) + # 记录同步时间 + with transaction.atomic(): + sync_proc_status_time, _ = GlobalSettings.objects.select_for_update().get_or_create( + key=GlobalSettings.KEYS.SYNC_PROC_STATUS_TIME, defaults={"v_json": {}} + ) + sync_proc_status_time.v_json[str(self.bk_biz_id)] = datetime.now().strftime("%Y-%m-%d %H:%M:%S") + sync_proc_status_time.save() + return {"cost_time": cost_time} def process_instance_simple( @@ -1207,3 +1218,9 @@ def process_info(self, bk_process_id): # 若有疑问请联系 CMDB 排查 raise ProcessNotMatchException(user_bk_process_id=bk_process_id, cc_bk_process_id=cc_process_id) return process_list[0] + + def sync_process_status_time(self): + sync_process_status_time: Dict[str:str] = GlobalSettings.get_config( + key=GlobalSettings.KEYS.SYNC_PROC_STATUS_TIME, default={} + ) + return {"time": sync_process_status_time.get(str(self.bk_biz_id), "")} diff --git a/apps/gsekit/process/views/process.py b/apps/gsekit/process/views/process.py index 32b9998..5804c12 100644 --- a/apps/gsekit/process/views/process.py +++ b/apps/gsekit/process/views/process.py @@ -240,3 +240,8 @@ def process_instance_simple(self, request, bk_biz_id, *args, **kwargs): expression=self.validated_data.get("expression"), ) ) + + @swagger_auto_schema(operation_summary="获取业务进程同步时间", tags=ProcessViewTags) + @action(detail=False, methods=["GET"]) + def sync_process_status_time(self, request, bk_biz_id, *args, **kwargs): + return Response(ProcessHandler(bk_biz_id=bk_biz_id).sync_process_status_time()) From 4ecb875b771ab1ae02454938598c584cd2c6a5ad Mon Sep 17 00:00:00 2001 From: hyunfa <1598047833@qq.com> Date: Mon, 17 Jun 2024 10:52:45 +0800 Subject: [PATCH 05/31] =?UTF-8?q?feat(front):=20=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E5=AD=97=E4=BD=93=E9=A2=9C=E8=89=B2=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=20#=20Reviewed,=20transaction=20id:=209889?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/views/ProcessManage/Status/ButtonGrounp.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/web/src/views/ProcessManage/Status/ButtonGrounp.vue b/web/src/views/ProcessManage/Status/ButtonGrounp.vue index 7845232..70168fe 100644 --- a/web/src/views/ProcessManage/Status/ButtonGrounp.vue +++ b/web/src/views/ProcessManage/Status/ButtonGrounp.vue @@ -71,10 +71,8 @@
-

- - {{ time }} - +

+ {{ $t('状态同步', [time] ) }}

Date: Fri, 14 Jun 2024 16:13:14 +0800 Subject: [PATCH 06/31] =?UTF-8?q?feat(front):=20=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E6=88=90=E5=8A=9F=E7=99=BB=E5=BD=95=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=9E=84=E5=BB=BA=E8=A1=A5=E5=85=85=20#=20Reviewed,?= =?UTF-8?q?=20transaction=20id:=209832?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/build/webpack.prod.conf.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/build/webpack.prod.conf.js b/web/build/webpack.prod.conf.js index 440390e..cab23b7 100644 --- a/web/build/webpack.prod.conf.js +++ b/web/build/webpack.prod.conf.js @@ -150,6 +150,10 @@ const prodConf = merge(baseConf, { // webpack4 这个属性暂时设置为 none,参见 https://github.com/jantimon/html-webpack-plugin/issues/870 chunksSortMode: 'none' }), + new HtmlWebpackPlugin({ + filename: 'login_success.html', + template: resolve(__dirname, '../login_success.html') + }), new MiniCssExtractPlugin({ ignoreOrder: true, From 4bdf14ed222653a099292a379c2cfe460d1b8fc9 Mon Sep 17 00:00:00 2001 From: hyunfa <1598047833@qq.com> Date: Mon, 17 Jun 2024 17:05:19 +0800 Subject: [PATCH 07/31] =?UTF-8?q?feat(front):=20=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=E9=9D=A2=E9=9D=99=E6=80=81=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E6=9B=B4=E6=94=B9=20#=20Reviewed,=20transaction=20id:?= =?UTF-8?q?=209923?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/api/index.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/web/src/api/index.js b/web/src/api/index.js index 6670bad..27abd4b 100644 --- a/web/src/api/index.js +++ b/web/src/api/index.js @@ -187,8 +187,15 @@ function handleReject(error, config) { if (status === 401) { // 未登录, o.a 登录弹窗有问题先不做弹窗 let siteLoginUrl = window.PROJECT_CONFIG.LOGIN_URL; + // 设置login_success.html文件路径 + let successBaseUrl = ''; + if (NODE_ENV === 'development') { + successBaseUrl = window.location.origin; + } else { + successBaseUrl = window.PROJECT_CONFIG.BK_STATIC_URL; + } // 登录成功之后的回调地址,用于执行关闭登录窗口或刷新父窗口页面等动作 - const successUrl = `${window.location.origin}/login_success.html`; + const successUrl =`${successBaseUrl}/login_success.html`; if (!siteLoginUrl) { console.error('Login URL not configured!') return From 4fd203be34966d0bbc68564decf66919c54e0ac0 Mon Sep 17 00:00:00 2001 From: hyunfa <1598047833@qq.com> Date: Mon, 17 Jun 2024 18:02:53 +0800 Subject: [PATCH 08/31] =?UTF-8?q?feat(front):=20=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E6=B3=A8=E5=85=A5=E8=AE=BE=E7=BD=AE=E4=BF=AE=E6=94=B9=20#=20Re?= =?UTF-8?q?viewed,=20transaction=20id:=209944?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/build/webpack.prod.conf.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/build/webpack.prod.conf.js b/web/build/webpack.prod.conf.js index cab23b7..fe94232 100644 --- a/web/build/webpack.prod.conf.js +++ b/web/build/webpack.prod.conf.js @@ -152,7 +152,8 @@ const prodConf = merge(baseConf, { }), new HtmlWebpackPlugin({ filename: 'login_success.html', - template: resolve(__dirname, '../login_success.html') + template: resolve(__dirname, '../login_success.html'), + inject: false, }), new MiniCssExtractPlugin({ From 1a0ae36898126ecceba27826f2457eaa94e7c43b Mon Sep 17 00:00:00 2001 From: hyunfa <1598047833@qq.com> Date: Mon, 17 Jun 2024 20:39:01 +0800 Subject: [PATCH 09/31] =?UTF-8?q?feat(front):=20=E9=9D=99=E6=80=81?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E4=B8=8D=E5=90=8C=E6=BA=90=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E9=9D=99=E6=80=81=E5=9C=B0=E5=9D=80=20#=20Reviewed,?= =?UTF-8?q?=20transaction=20id:=209953?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/api/index.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/web/src/api/index.js b/web/src/api/index.js index 27abd4b..defa27f 100644 --- a/web/src/api/index.js +++ b/web/src/api/index.js @@ -188,14 +188,13 @@ function handleReject(error, config) { // 未登录, o.a 登录弹窗有问题先不做弹窗 let siteLoginUrl = window.PROJECT_CONFIG.LOGIN_URL; // 设置login_success.html文件路径 - let successBaseUrl = ''; - if (NODE_ENV === 'development') { - successBaseUrl = window.location.origin; - } else { - successBaseUrl = window.PROJECT_CONFIG.BK_STATIC_URL; + let successBaseUrl = window.PROJECT_CONFIG.BK_STATIC_URL; + const index = successBaseUrl.indexOf('static'); + if (index > -1) { + successBaseUrl = '/' + successBaseUrl.slice(index); } // 登录成功之后的回调地址,用于执行关闭登录窗口或刷新父窗口页面等动作 - const successUrl =`${successBaseUrl}/login_success.html`; + const successUrl =`${window.location.origin}${successBaseUrl}/login_success.html`; if (!siteLoginUrl) { console.error('Login URL not configured!') return From f0952325aec4c6b568877a0e32854cb5b7ca674c Mon Sep 17 00:00:00 2001 From: yunchao Date: Fri, 12 Jul 2024 19:27:23 +0800 Subject: [PATCH 10/31] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dpipeline=20migra?= =?UTF-8?q?te=E6=8A=A5=E9=94=99=20(closed=20#341)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 3a2c279..9fb3c21 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,7 @@ MarkupSafe==1.1.1 django-dbconn-retry==0.1.5 # django -django==3.2.4 +django==3.2.15 django-celery-beat==2.2.0 #django-celery-results==2.0.0 django-filter==2.4.0 From 898e8090f3a0deecf28344cd868e36db6fd64911 Mon Sep 17 00:00:00 2001 From: yunchao Date: Mon, 15 Jul 2024 12:31:32 +0800 Subject: [PATCH 11/31] =?UTF-8?q?feat:=20=E5=85=A8=E5=B1=80=E9=85=8D?= =?UTF-8?q?=E7=BD=AEtitle/footer/logo/favicon/=E4=BA=A7=E5=93=81=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E5=8F=AF=E4=BF=AE=E6=94=B9=20(closed=20#343)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/context_processors.py | 1 + config/default.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/common/context_processors.py b/common/context_processors.py index de1639d..c09923b 100644 --- a/common/context_processors.py +++ b/common/context_processors.py @@ -58,4 +58,5 @@ def mysetting(request): "CMDB_URL": settings.BK_CC_HOST, "TAM_AEGIS_KEY": settings.TAM_AEGIS_KEY, "TAM_AEGIS_URL": settings.TAM_AEGIS_URL, + "BKPAAS_SHARED_RES_URL": settings.BKPAAS_SHARED_RES_URL, } diff --git a/config/default.py b/config/default.py index 734463f..67ce556 100644 --- a/config/default.py +++ b/config/default.py @@ -251,6 +251,9 @@ TAM_AEGIS_KEY = os.getenv("BKAPP_TAM_AEGIS_KEY") TAM_AEGIS_URL = os.getenv("BKAPP_TAM_AEGIS_URL") +# 平台公共信息 +BKPAAS_SHARED_RES_URL = os.getenv("BKPAAS_SHARED_RES_URL", "") + # ============================================================================== # Cache # ============================================================================== From 6f4d3b9f5c76d05aadef6bc5e11a19b80b781917 Mon Sep 17 00:00:00 2001 From: hyunfa <1598047833@qq.com> Date: Mon, 8 Jul 2024 16:26:38 +0800 Subject: [PATCH 12/31] =?UTF-8?q?feat(front):=20=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E9=85=8D=E7=BD=AEtitle/footer/logo/favicon/=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E5=8F=AF=E4=BF=AE=E6=94=B9=20#=20Reviewed,?= =?UTF-8?q?=20transaction=20id:=2011511?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/index-dev.html | 5 +- web/index.html | 4 +- web/package.json | 1 + web/src/App.vue | 6 ++- web/src/components/Footer.vue | 17 +++++-- web/src/components/Header.vue | 11 ++++- web/src/store/index.js | 2 + web/src/store/modules/platform-config.js | 59 ++++++++++++++++++++++++ 8 files changed, 96 insertions(+), 9 deletions(-) create mode 100644 web/src/store/modules/platform-config.js diff --git a/web/index-dev.html b/web/index-dev.html index d716e04..afafa80 100644 --- a/web/index-dev.html +++ b/web/index-dev.html @@ -20,7 +20,7 @@ const LOGIN_URL = '' const APP_NAME = '进程配置管理' const BKAPP_DOCS_URL = 'https://bk.tencent.com/docs/document/7.0/232/30348' - + const BKPAAS_SHARED_RES_URL = '' // BK_STATIC_URL 不能以 / 结尾 if (BK_STATIC_URL.endsWith('/')) { BK_STATIC_URL = BK_STATIC_URL.slice(0, -1) @@ -41,7 +41,8 @@ CMDB_URL: CMDB_URL, LOGIN_URL: LOGIN_URL, APP_NAME: APP_NAME, - BKAPP_DOCS_URL: BKAPP_DOCS_URL + BKAPP_DOCS_URL: BKAPP_DOCS_URL, + BKPAAS_SHARED_RES_URL: BKPAAS_SHARED_RES_URL } })() diff --git a/web/index.html b/web/index.html index c0d8111..ace09d8 100644 --- a/web/index.html +++ b/web/index.html @@ -22,6 +22,7 @@ const LOGIN_URL = '{{LOGIN_URL}}' const APP_NAME = '{{ APP_NAME }}' // 应用名称 const BKAPP_DOCS_URL = '{{ BKAPP_DOCS_URL }}' // 文档链接 + const BKPAAS_SHARED_RES_URL = '{{ BKPAAS_SHARED_RES_URL }}' //logo,title,appname,footer配置平台路径 // BK_STATIC_URL 不能以 / 结尾 if (BK_STATIC_URL.endsWith('/')) { @@ -45,7 +46,8 @@ CMDB_URL: CMDB_URL, LOGIN_URL: LOGIN_URL, APP_NAME: APP_NAME, - BKAPP_DOCS_URL: BKAPP_DOCS_URL + BKAPP_DOCS_URL: BKAPP_DOCS_URL, + BKPAAS_SHARED_RES_URL: BKPAAS_SHARED_RES_URL } })() diff --git a/web/package.json b/web/package.json index c2de0c1..30aff38 100644 --- a/web/package.json +++ b/web/package.json @@ -39,6 +39,7 @@ "dependencies": { "@blueking/bkcharts": "^2.0.10", "@blueking/login-modal": "^1.0.5", + "@blueking/platform-config": "^1.0.2", "@icon-cool/bk-icon-gsekit": "0.0.9", "@vue/composition-api": "^1.7.2", "axios": "0.21.4", diff --git a/web/src/App.vue b/web/src/App.vue index 5fa58ac..d6d13d5 100644 --- a/web/src/App.vue +++ b/web/src/App.vue @@ -16,6 +16,7 @@ import { mapState } from 'vuex'; import Header from './components/Header'; import AuthModal from '@/components/Auth/AuthModal'; import AuthPage from '@/components/Auth/AuthPage'; +import { setShortcutIcon, setDocumentTitle } from '@blueking/platform-config'; export default { name: 'App', @@ -32,8 +33,11 @@ export default { computed: { ...mapState(['mainContentLoading', 'authPage']), }, - created() { + async created() { this.$store.commit('updateAppName', window.PROJECT_CONFIG.APP_NAME); + await this.$store.dispatch('platform/getConfig'); + setDocumentTitle(this.$store.state.platform.i18n); + setShortcutIcon(this.$store.state.platform.favicon); const platform = window.navigator.platform.toLowerCase(); if (platform.indexOf('win') === 0) { document.body.style['font-family'] = 'Microsoft Yahei, PingFang SC, Helvetica, Aria'; diff --git a/web/src/components/Footer.vue b/web/src/components/Footer.vue index e1c8ce5..b4ed99a 100644 --- a/web/src/components/Footer.vue +++ b/web/src/components/Footer.vue @@ -1,6 +1,6 @@ @@ -18,11 +23,17 @@ export default { footerContent() { return this.$store.state.meta.footerContent; }, + contact() { + return this.$store.state.platform.i18n.footerInfoHTML + }, + copyright() { + return this.$store.state.platform.footerCopyrightContent + } }, }; - + Icon Cool + + +
+

+ +

+
+
单色图标
+
彩色图标
+
+
+
    +
  • + +

    close-line

    +
  • +
  • + +

    down-line

    +
  • +
  • + +

    edit-fill

    +
  • +
  • + +

    exit-full-screen-line

    +
  • +
  • + +

    full-screen-line-line

    +
  • +
  • + +

    help-document-fill

    +
  • +
  • + +

    help-document-line

    +
  • +
  • + +

    incomplete-line

    +
  • +
  • + +

    masterplate-fill

    +
  • +
  • + +

    parenet-node-line

    +
  • +
  • + +

    strategy-fill

    +
  • +
  • + +

    process-manager-fill

    +
  • +
  • + +

    status-fill

    +
  • +
  • + +

    switch-line

    +
  • +
  • + +

    swither-small

    +
  • +
  • + +

    up-line

    +
  • +
  • + +

    jump-fill

    +
  • +
  • + +

    filter-fill

    +
  • +
  • + +

    check-line

    +
  • +
  • + +

    copy

    +
  • +
  • + +

    paste

    +
  • +
  • + +

    updating

    +
  • +
  • + +

    environment

    +
  • +
  • + +

    environment-2

    +
  • +
  • + +

    cc-lock

    +
  • +
  • + +

    lock-radius

    +
  • +
  • + +

    alert

    +
  • +
  • + +

    logout-fill

    +
  • +
  • + +

    shouqi

    +
  • +
  • + +

    zhankai

    +
  • +
  • + +

    weitongbu

    +
  • +
  • + +

    reduce-fill

    +
  • +
  • + +

    shrink-fill

    +
  • +
  • + +

    expand-fill

    +
  • +
  • + +

    angle-left-line

    +
  • +
  • + +

    unfinished

    +
  • +
  • + +

    correct

    +
  • +
  • + +

    bukejian

    +
  • +
  • + +

    kejian

    +
  • +
  • + +

    lang-zh-cn

    +
  • +
  • + +

    lang-en

    +
  • +
+

为什么使用

+
    +
  • 弹性,在网页或者 app 上,展示字体是很便捷的。用字体图标可以很方便的改变 icon 的颜色,或者加入一些其他的效果
  • +
  • 可缩放,可以很方便的改变图标的大小
  • +
  • 矢量,字体图标是矢量的并且具有独立的分辨率,不管在高分辨率还是低分辨率,不管是在网页还是手机端,都具有很好的展示效果,不会出现锯齿或者马赛克模糊
  • +
  • 节省加载时间,字体图标很小,每个小图标只有几 kb,大大节省了加载时间
  • +
+

如何使用

+
    +
  • 将整个目录复制到您的项目里
  • +
  • 引入 style.css
  • +
  • 挑选相应图标并获取类名,如 .bk-icon .icon-demo
  • +
+
+
+
    +
  • + + + +

    close-line

    +
  • +
  • + + + +

    down-line

    +
  • +
  • + + + +

    edit-fill

    +
  • +
  • + + + +

    exit-full-screen-line

    +
  • +
  • + + + +

    full-screen-line-line

    +
  • +
  • + + + +

    help-document-fill

    +
  • +
  • + + + +

    help-document-line

    +
  • +
  • + + + +

    incomplete-line

    +
  • +
  • + + + +

    masterplate-fill

    +
  • +
  • + + + +

    parenet-node-line

    +
  • +
  • + + + +

    strategy-fill

    +
  • +
  • + + + +

    process-manager-fill

    +
  • +
  • + + + +

    status-fill

    +
  • +
  • + + + +

    switch-line

    +
  • +
  • + + + +

    swither-small

    +
  • +
  • + + + +

    up-line

    +
  • +
  • + + + +

    jump-fill

    +
  • +
  • + + + +

    filter-fill

    +
  • +
  • + + + +

    check-line

    +
  • +
  • + + + +

    copy

    +
  • +
  • + + + +

    paste

    +
  • +
  • + + + +

    updating

    +
  • +
  • + + + +

    environment

    +
  • +
  • + + + +

    environment-2

    +
  • +
  • + + + +

    cc-lock

    +
  • +
  • + + + +

    lock-radius

    +
  • +
  • + + + +

    alert

    +
  • +
  • + + + +

    logout-fill

    +
  • +
  • + + + +

    shouqi

    +
  • +
  • + + + +

    zhankai

    +
  • +
  • + + + +

    weitongbu

    +
  • +
  • + + + +

    reduce-fill

    +
  • +
  • + + + +

    shrink-fill

    +
  • +
  • + + + +

    expand-fill

    +
  • +
  • + + + +

    angle-left-line

    +
  • +
  • + + + +

    unfinished

    +
  • +
  • + + + +

    correct

    +
  • +
  • + + + +

    bukejian

    +
  • +
  • + + + +

    kejian

    +
  • +
  • + + + +

    lang-zh-cn

    +
  • +
  • + + + +

    lang-en

    +
  • +
+

为什么使用

+
    +
  • 支持彩色图标
  • +
  • 跨 SVG 使用,使用 use 可调用文档中加载的所有 SVG 图标
  • +
+

如何使用

+
    +
  • 将下载的资源文件中 iconcool.js 文件外部资源通过 script 标签引入
  • +
  • 在 html 模板文件中挑选对应的对应图标的名称使用,例如: +
    +    <svg aria-hidden="true">
    +      <use xlink:href="#icon-xxx"></use>
    +    </svg>
    +          
    +
  • +
+
+ +
+ + + \ No newline at end of file diff --git a/web/src/bk_icon_font/fonts/iconcool.eot b/web/src/bk_icon_font/fonts/iconcool.eot new file mode 100644 index 0000000000000000000000000000000000000000..c6ff3254ef78d6e288bad44299bbf16ccea23732 GIT binary patch literal 8832 zcmc&)d2n3CneVUP%)FVA=DsA2EX^U!NS3T)Ml%y+OCDK=4~!3t1q3RVBg8MF#q?a$hH8hH6U;KLO zWo$9$W_#Em8)Ktvr}myig_B*+hS)B48yjZZ*#s~_)(^}C+lSVoZG^S5Cf0(Q59<%K zn6!jVF^RRT-m-Pochu8=0`eokuG+YzIn{r0)nSzHM7e)(Wc&Eu)aGVzGsT#6e%J6F zJKx>@i|;dL`2l90-95B@NAvj1Lufk($nFNhnXoM&|6@SS?vcs;-+q4KBF1|O3ythn`-z2%3kCa0jT>~m^fYJ~v}^tPi)XjFR{WWjn6%0ZXFDGg8IhvzQu|41 z8H!e8yD&UT4dBBeT4`82vm+$WP{|ea8>nZ&QOA-2BmKoGt@od`JyMyJ~ekG;z587Wr13?oWjgTFB zD)RrY(7kZ6IKKS^mIP2Nv)3^>pjiH}6fMjEp&N|=G@(}vK4yUx95o`v$^&m=UqjiA zKhb`_;#JC&uo6|4DyaprFZ&fz{7QvVt<)&XGz^fJ9@2WISUX#RwObFoP)-S>nz1J` z_Qr;JN?0lO+y&KgGY|7JAM>*S)GEZvSUIa;VOGhOVBf1*ghg45#aRujWeJvKb*!E( z#h_w;|3;4?0Dq&|7fo9#@?6Njc(5vLzX2doF+gaQVu09D#Q-4%iUC486a$3jC!++wSZA$o+q|}fZNm17{U-a@ zODrY3g=JWHlcliMkf2;T;IHz7458D&OL;ylcAS!OQV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9bz82i2W!#O3gVqv~MTAGQ$G)}mqaS?`1lQY3L8n1*H~(VyJ}JL;+_a(x1g*W- zVK2O7cZhnrr$as0(UHwwqdsXbEw%r$Lw#MR`P@6|xu>LODSq1Y)SuAu$@^%j;OZOs z0vZU}K+z8Nkt@*Jn2S|cxRp7HHbbOira)@J0zZN&;BZvlR_k+!$`IU&0dfX?rBnJu$R>a%e~7<99@Mj*U((8{9rIv1e!kHG2lfMg{8np6eB4!n!s)|cU1yZE9$f$!+zd%E7| z>M!tDeto~X_UiJ7f0@6!)oRQ)s?B*dZTr~m_|~5S#gm{@&^m!{{3FQq8UGP5ghSLY z@)0(!)$PSNgJ|8vc5A)HvDwY|D{@(E--K3TBs}oB+Ji44ANn*9Cy7jmDl9luS_!6( zN~n|^h!R|cqYHU)dhk;Kw;CZTqjG%l2~#C5{;Q~(A{3<<#bI4*DFJU>NAjq%edZQK4EWxmq$ literal 0 HcmV?d00001 diff --git a/web/src/bk_icon_font/fonts/iconcool.svg b/web/src/bk_icon_font/fonts/iconcool.svg new file mode 100644 index 0000000..66a164c --- /dev/null +++ b/web/src/bk_icon_font/fonts/iconcool.svg @@ -0,0 +1,158 @@ + + + + + Created by font-carrier + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/web/src/bk_icon_font/fonts/iconcool.ttf b/web/src/bk_icon_font/fonts/iconcool.ttf new file mode 100644 index 0000000000000000000000000000000000000000..0d45d3bc4f402b2e5b007fdfb6a8fd0df6c1ed7f GIT binary patch literal 8664 zcmc&(d2pP?mG9Tz%=gWVG&7o8(#X;r(u`!uI%YI8LAKFt+Fb=KTAK@jZKg_N_+}XevXWpEB?+HO)7%TOB9nFU}VnCk5t;Pos_jw(V=b zIlINZ?9Z&kqIbA(w(AK|5IM#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7s*coBGYc$0V+_~iH;_&)ga1f~R)ggAsw z|9hWFa1a9V9e}B=FpeEVM1<-O!vQ>7!xTWz?vUE$F`z)HGAeTcc&?O?!SSv|XBsrF z{7Fxmjq92IBz-f^v%VIq6pd`suYo%h(-q%2%O|Ys=tp@@i(ZHXhO-0PMuF7HyPW7vY$N>F!sJ>F52q z=D*N3%i2@Qm(ivW^TVwWokc!m zbiOjfVo^~r-0$JTAql`6z;kjJ+1o3k*Ba{@uQaarvp-4ohy}#IbDR4zpSV?7aMx%; zJ21TQ)@8)VfbDbh&f=x(vzn}f?OK?ukTZ8rUb>2XZ0#A`DD045T=n%x@#-D{cW_${ z%Oh~H(5D~$uI>{ZCeex@?9Jy2iYp-f6-6Tj!IJwxV#_m2?QxmWQHc^IPGnQ3Y=wzQ zz2#%1ugk1+!-%xb8@EYtIv;$=CYvPGZ>ee&BkoFSD~Cc?YP*0Cy-KnlqFPuH1P^4G zgU35~{)tES_GLBV>3q4edU~Z_d}a3b%6R?CGW)Kyn8&X4B<_CGqn-W))`fO7C$Xz7 m`2jOlzqCS~1&%9F8eIoH2M^ADO>dX#n=<503$2a;fd2t;o(eMn literal 0 HcmV?d00001 diff --git a/web/src/bk_icon_font/iconcool.js b/web/src/bk_icon_font/iconcool.js new file mode 100644 index 0000000..d8851a7 --- /dev/null +++ b/web/src/bk_icon_font/iconcool.js @@ -0,0 +1,10 @@ +!(function () { + var svgCode = '' + if (document.body) { + document.body.insertAdjacentHTML('afterbegin', svgCode) + } else { + document.addEventListener('DOMContentLoaded', function() { + document.body.insertAdjacentHTML('afterbegin', svgCode) + }) + } +})() \ No newline at end of file diff --git a/web/src/bk_icon_font/iconcool.json b/web/src/bk_icon_font/iconcool.json new file mode 100644 index 0000000..6fdf184 --- /dev/null +++ b/web/src/bk_icon_font/iconcool.json @@ -0,0 +1 @@ +{"iconName":"gsekit","icons":[{"name":"close-line","svgCode":"","codepoint":"\\e101"},{"name":"down-line","svgCode":"","codepoint":"\\e102"},{"name":"edit-fill","svgCode":"","codepoint":"\\e103"},{"name":"exit-full-screen-line","svgCode":"","codepoint":"\\e104"},{"name":"full-screen-line-line","svgCode":"","codepoint":"\\e105"},{"name":"help-document-fill","svgCode":"","codepoint":"\\e106"},{"name":"help-document-line","svgCode":"","codepoint":"\\e107"},{"name":"incomplete-line","svgCode":"","codepoint":"\\e108"},{"name":"masterplate-fill","svgCode":"","codepoint":"\\e109"},{"name":"parenet-node-line","svgCode":"","codepoint":"\\e10a"},{"name":"strategy-fill","svgCode":"","codepoint":"\\e10b"},{"name":"process-manager-fill","svgCode":"","codepoint":"\\e10c"},{"name":"status-fill","svgCode":"","codepoint":"\\e10e"},{"name":"switch-line","svgCode":"","codepoint":"\\e10d"},{"name":"swither-small","svgCode":"","codepoint":"\\e10f"},{"name":"up-line","svgCode":"","codepoint":"\\e110"},{"name":"jump-fill","svgCode":"","codepoint":"\\e111"},{"name":"filter-fill","svgCode":"","codepoint":"\\e112"},{"name":"check-line","svgCode":"","codepoint":"\\e114"},{"name":"copy","svgCode":"","codepoint":"\\e115"},{"name":"paste","svgCode":"","codepoint":"\\e116"},{"name":"updating","svgCode":"","codepoint":"\\e117"},{"name":"environment","svgCode":"","codepoint":"\\e118"},{"name":"environment-2","svgCode":"","codepoint":"\\e11a"},{"name":"cc-lock","svgCode":"","codepoint":"\\e11b"},{"name":"lock-radius","svgCode":"","codepoint":"\\e11f"},{"name":"alert","svgCode":"","codepoint":"\\e120"},{"name":"logout-fill","svgCode":"","codepoint":"\\e121"},{"name":"shouqi","svgCode":"","codepoint":"\\e124"},{"name":"zhankai","svgCode":"","codepoint":"\\e125"},{"name":"weitongbu","svgCode":"","codepoint":"\\e126"},{"name":"reduce-fill","svgCode":"","codepoint":"\\e127"},{"name":"shrink-fill","svgCode":"","codepoint":"\\e128"},{"name":"expand-fill","svgCode":"","codepoint":"\\e129"},{"name":"angle-left-line","svgCode":"","codepoint":"\\e12a"},{"name":"unfinished","svgCode":"","codepoint":"\\e12d"},{"name":"correct","svgCode":"","codepoint":"\\e12e"},{"name":"bukejian","svgCode":"","codepoint":"\\e12f"},{"name":"kejian","svgCode":"","codepoint":"\\e130"},{"name":"lang-zh-cn","svgCode":"","codepoint":"\\e131"},{"name":"lang-en","svgCode":"","codepoint":"\\e132"}]} \ No newline at end of file diff --git a/web/src/bk_icon_font/style.css b/web/src/bk_icon_font/style.css new file mode 100644 index 0000000..4e67510 --- /dev/null +++ b/web/src/bk_icon_font/style.css @@ -0,0 +1,148 @@ +@font-face { + font-family: "gsekit"; + src: url("fonts/iconcool.svg#iconcool") format("svg"), +url("fonts/iconcool.ttf") format("truetype"), +url("fonts/iconcool.woff") format("woff"), +url("fonts/iconcool.eot?#iefix") format("embedded-opentype"); + font-weight: normal; + font-style: normal; +} + +.gsekit-icon { + /* use !important to prevent issues with browser extensions that change fonts */ + font-family: 'gsekit' !important; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + text-align: center; + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.gsekit-icon-close-line:before { + content: "\e101"; +} +.gsekit-icon-down-line:before { + content: "\e102"; +} +.gsekit-icon-edit-fill:before { + content: "\e103"; +} +.gsekit-icon-exit-full-screen-line:before { + content: "\e104"; +} +.gsekit-icon-full-screen-line-line:before { + content: "\e105"; +} +.gsekit-icon-help-document-fill:before { + content: "\e106"; +} +.gsekit-icon-help-document-line:before { + content: "\e107"; +} +.gsekit-icon-incomplete-line:before { + content: "\e108"; +} +.gsekit-icon-masterplate-fill:before { + content: "\e109"; +} +.gsekit-icon-parenet-node-line:before { + content: "\e10a"; +} +.gsekit-icon-strategy-fill:before { + content: "\e10b"; +} +.gsekit-icon-process-manager-fill:before { + content: "\e10c"; +} +.gsekit-icon-status-fill:before { + content: "\e10e"; +} +.gsekit-icon-switch-line:before { + content: "\e10d"; +} +.gsekit-icon-swither-small:before { + content: "\e10f"; +} +.gsekit-icon-up-line:before { + content: "\e110"; +} +.gsekit-icon-jump-fill:before { + content: "\e111"; +} +.gsekit-icon-filter-fill:before { + content: "\e112"; +} +.gsekit-icon-check-line:before { + content: "\e114"; +} +.gsekit-icon-copy:before { + content: "\e115"; +} +.gsekit-icon-paste:before { + content: "\e116"; +} +.gsekit-icon-updating:before { + content: "\e117"; +} +.gsekit-icon-environment:before { + content: "\e118"; +} +.gsekit-icon-environment-2:before { + content: "\e11a"; +} +.gsekit-icon-cc-lock:before { + content: "\e11b"; +} +.gsekit-icon-lock-radius:before { + content: "\e11f"; +} +.gsekit-icon-alert:before { + content: "\e120"; +} +.gsekit-icon-logout-fill:before { + content: "\e121"; +} +.gsekit-icon-shouqi:before { + content: "\e124"; +} +.gsekit-icon-zhankai:before { + content: "\e125"; +} +.gsekit-icon-weitongbu:before { + content: "\e126"; +} +.gsekit-icon-reduce-fill:before { + content: "\e127"; +} +.gsekit-icon-shrink-fill:before { + content: "\e128"; +} +.gsekit-icon-expand-fill:before { + content: "\e129"; +} +.gsekit-icon-angle-left-line:before { + content: "\e12a"; +} +.gsekit-icon-unfinished:before { + content: "\e12d"; +} +.gsekit-icon-correct:before { + content: "\e12e"; +} +.gsekit-icon-bukejian:before { + content: "\e12f"; +} +.gsekit-icon-kejian:before { + content: "\e130"; +} +.gsekit-icon-lang-zh-cn:before { + content: "\e131"; +} +.gsekit-icon-lang-en:before { + content: "\e132"; +} diff --git a/web/src/components/Header.vue b/web/src/components/Header.vue index 607767a..1419d0e 100644 --- a/web/src/components/Header.vue +++ b/web/src/components/Header.vue @@ -26,11 +26,19 @@ v-model="bizId" @selected="handleSelect"> - + +
+ +
+
    + +
+
+ @@ -66,11 +74,22 @@ export default { return { isPopoverActive: false, bizId: '', + isShow: false, bizList: [], + langList: [ + { + id: 'zh-cn', // zhCN + name: '中文', + }, + { + id: 'en', // enUS + name: 'English', + }, + ] }; }, computed: { - ...mapState(['username', 'appName', 'language']), + ...mapState(['username', 'appName']), showStaticRouter() { return this.$store.state.showStaticRouter; }, @@ -79,6 +98,9 @@ export default { }, appLogo() { return this.$store.state.platform.appLogo || logoSrc; + }, + language() { + return window.language; } }, watch: { @@ -134,6 +156,37 @@ export default { this.$store.commit('setMainContentLoading', false); } }, + dropdownShow() { + this.isShow = true; + }, + dropdownHide() { + this.isShow = false; + }, + toggleLang(item) { + if (item.id !== this.language) { + const { + BK_COMPONENT_API_URL: overwriteUrl = '', + BK_DOMAIN: domain = '', + } = window.PROJECT_CONFIG; + + const api = `${overwriteUrl}/api/c/compapi/v2/usermanage/fe_update_user_language/?language=${item.id}`; + const scriptId = 'jsonp-script'; + const prevJsonpScript = document.getElementById(scriptId); + if (prevJsonpScript) { + document.body.removeChild(prevJsonpScript); + } + const scriptEl = document.createElement('script'); + scriptEl.type = 'text/javascript'; + scriptEl.src = api; + scriptEl.id = scriptId; + document.body.appendChild(scriptEl); + + const today = new Date(); + today.setTime(today.getTime() + 1000 * 60 * 60 * 24); + document.cookie = `blueking_language=${item.id};path=/;domain=${domain};expires=${today.toUTCString()}`; + location.reload(); + } + }, handleSelect(bizId) { this.$router.push({ query: { @@ -168,130 +221,190 @@ export default { diff --git a/web/src/main.js b/web/src/main.js index 3d2734b..da4e72e 100644 --- a/web/src/main.js +++ b/web/src/main.js @@ -9,6 +9,7 @@ import { bus } from '@/common/bus'; import '@/common/bkmagic'; import '@/common/directives'; import '@icon-cool/bk-icon-gsekit'; +import '@/bk_icon_font/style.css'; import '@/common/svg'; import '@/common/text-tool'; import { injectCSRFTokenToHeaders } from '@/api'; From 7f24601dfe3d225d9ce033a4162aae4a31d174d2 Mon Sep 17 00:00:00 2001 From: yunchao Date: Fri, 9 Aug 2024 15:06:18 +0800 Subject: [PATCH 25/31] =?UTF-8?q?feat:=20=E6=B6=88=E6=81=AF=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E4=B8=AD=E5=BF=83=E7=BB=9F=E4=B8=80=E5=BC=80=E5=85=B3?= =?UTF-8?q?=E9=80=82=E9=85=8D=20(closed=20#2375)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/__init__.py b/config/__init__.py index 41bf7ac..9ef2af7 100644 --- a/config/__init__.py +++ b/config/__init__.py @@ -38,8 +38,8 @@ def get_env_or_raise(key): if RUN_VER == "default": RUN_VER = "open" -APP_ID = APP_CODE = os.environ.get("APP_ID") -APP_TOKEN = SECRET_KEY = os.environ.get("APP_TOKEN") +APP_ID = APP_CODE = os.environ.get("APP_ID", "bk_gsekit") +APP_TOKEN = SECRET_KEY = os.environ.get("APP_TOKEN", "28b7b410-c7b7-4537-9a65-8ce55738170e") # 蓝鲸平台URL BK_URL = os.getenv("BKPAAS_URL", None) # noqa From 0b1738369228bcf4cd127282e3cff7a59a54a189 Mon Sep 17 00:00:00 2001 From: hyunfa <1598047833@qq.com> Date: Fri, 9 Aug 2024 16:38:39 +0800 Subject: [PATCH 26/31] =?UTF-8?q?feat(front):=20=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=E5=85=A8=E5=B1=80=E9=85=8D=E7=BD=AE=E5=8C=85=20#=20Reviewed,?= =?UTF-8?q?=20transaction=20id:=2014823?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/package.json b/web/package.json index 30aff38..76b6b79 100644 --- a/web/package.json +++ b/web/package.json @@ -39,7 +39,7 @@ "dependencies": { "@blueking/bkcharts": "^2.0.10", "@blueking/login-modal": "^1.0.5", - "@blueking/platform-config": "^1.0.2", + "@blueking/platform-config": "^1.0.5", "@icon-cool/bk-icon-gsekit": "0.0.9", "@vue/composition-api": "^1.7.2", "axios": "0.21.4", From 2d329e30c9c18e97a30ea3c4e001485f97e694e9 Mon Sep 17 00:00:00 2001 From: yunchao Date: Fri, 9 Aug 2024 17:06:36 +0800 Subject: [PATCH 27/31] =?UTF-8?q?feat:=20APP=5FNAME=20=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=20(closed=20#363)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/context_processors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/context_processors.py b/common/context_processors.py index 2b653a5..22b4089 100644 --- a/common/context_processors.py +++ b/common/context_processors.py @@ -20,8 +20,8 @@ 除setting外的其他context_processor内容,均采用组件的方式(string) """ WEB_TITLE_MAP = { - "ieod": _("{app_name} | 腾讯蓝鲸智云").format(app_name=settings.APP_NAME), - "open": _("{app_name} | 腾讯蓝鲸智云").format(app_name=settings.APP_NAME), + "ieod": _("{app_name} | 蓝鲸智云").format(app_name=settings.APP_NAME), + "open": _("{app_name} | 蓝鲸智云").format(app_name=settings.APP_NAME), } From 53d9875a450472aa4c8f8b02999d674c8e37dfad Mon Sep 17 00:00:00 2001 From: hyunfa <1598047833@qq.com> Date: Tue, 10 Sep 2024 17:03:25 +0800 Subject: [PATCH 28/31] =?UTF-8?q?feat(front):=20=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E6=A0=8F=E4=B8=AD=E8=8B=B1=E5=88=87=E6=8D=A2=E5=92=8C=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=A0=8F=E5=A2=9E=E5=8A=A0hover=E6=95=88=E6=9E=9C=20#?= =?UTF-8?q?=20Reviewed,=20transaction=20id:=2017976?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/Header.vue | 70 +++++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 27 deletions(-) diff --git a/web/src/components/Header.vue b/web/src/components/Header.vue index 1419d0e..ed51d4f 100644 --- a/web/src/components/Header.vue +++ b/web/src/components/Header.vue @@ -26,8 +26,8 @@ v-model="bizId" @selected="handleSelect"> - -
+ +
    @@ -37,26 +37,23 @@
- - @@ -85,7 +82,9 @@ export default { id: 'en', // enUS name: 'English', }, - ] + ], + triggerType: 'mouseover', + popTriggerType: 'mouseover', }; }, computed: { @@ -101,7 +100,7 @@ export default { }, language() { return window.language; - } + }, }, watch: { bizId(val) { @@ -161,6 +160,14 @@ export default { }, dropdownHide() { this.isShow = false; + this.triggerType = 'mouseover'; + }, + popoverHide() { + this.isPopoverActive = false; + this.popTriggerType = 'mouseover'; + }, + handleClick() { + this.popTriggerType = 'click'; }, toggleLang(item) { if (item.id !== this.language) { @@ -199,6 +206,7 @@ export default { this.$router.push('/process-manage/status'); }, handleLogout() { + // 加上协议头 let loginUrl = window.PROJECT_CONFIG.LOGIN_URL; if (!/http(s)?:\/\//.test(loginUrl)) { @@ -281,10 +289,11 @@ export default { flex-shrink: 0; display: flex; align-items: center; + padding-right: 60px; .king-select { width: 240px; - margin-right: 40px; + margin-right: 20px; background: #252f43; border-color: #252f43; @@ -297,7 +306,7 @@ export default { display: flex; align-items: center; line-height: 40px; - margin-right: 40px; + margin-left: 10px; cursor: pointer; transition: color .2s; user-select: none; @@ -323,9 +332,15 @@ export default { } } } + .profile-popover { + /deep/.bk-dropdown-content { + top: 39px !important; + } + } .bk-dropdown-menu { - .bk-dropdown-content { + /deep/.bk-dropdown-content { margin: 14px 0 !important; + min-width: 100px; } .header-nav-btn { @@ -351,7 +366,6 @@ export default { .bk-dropdown-list { min-width: 100px; - padding: 4px 0; margin: 0; z-index: 2500; border-radius: 2px; @@ -389,10 +403,12 @@ export default {