Skip to content

Commit

Permalink
Merge branch 'local_sqlserver' into dev_local
Browse files Browse the repository at this point in the history
  • Loading branch information
hLinx committed Jul 16, 2024
2 parents ebbe87a + 2a68767 commit cdf64d7
Show file tree
Hide file tree
Showing 212 changed files with 20,072 additions and 1,143 deletions.
2 changes: 1 addition & 1 deletion dbm-ui/frontend/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ module.exports = {
],
'vue/prefer-separate-static-class': 'error',
'vue/prefer-true-attribute-shorthand': 'error',
'vue/script-indent': ['error', 2, { baseIndent: 1 }],
'vue/script-indent': ['off', 2, { baseIndent: 1 }],
'vue/component-name-in-template-casing': [
'error',
'PascalCase',
Expand Down
1 change: 1 addition & 0 deletions dbm-ui/frontend/.prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"plugins": [
"prettier-plugin-curly"
],
"$schema": "https://json.schemastore.org/prettierrc",
"semi": true,
"quoteProps": "as-needed",
"jsxSingleQuote": true,
Expand Down
59 changes: 59 additions & 0 deletions dbm-ui/frontend/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"eslint.validate": ["javascript", "javascriptreact", "html", "vue"],
"eslint.alwaysShowStatus": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.formatOnSave": true,
"editor.tabSize": 2,
"css.validate": false,
"stylelint.enable": true,
"scss.validate": false,
"stylelint.validate": ["css", "scss", "vue"],
"preCI.localCodeCheck.filter.whitePath": "",
"preCI.localCodeCheck.filter.skipPath": "",
"preCI.localCodeCheck.checkerSet.JS": ["standard_js"],
"peacock.remoteColor": "#45e35f",
"bk-code-ai.enable": true,
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#71ea85",
"activityBar.background": "#71ea85",
"activityBar.foreground": "#15202b",
"activityBar.inactiveForeground": "#15202b99",
"activityBarBadge.background": "#8874ea",
"activityBarBadge.foreground": "#15202b",
"commandCenter.border": "#15202b99",
"sash.hoverBorder": "#71ea85",
"statusBar.background": "#45e35f",
"statusBar.foreground": "#15202b",
"statusBarItem.hoverBackground": "#20d53e",
"statusBarItem.remoteBackground": "#45e35f",
"statusBarItem.remoteForeground": "#15202b",
"titleBar.activeBackground": "#45e35f",
"titleBar.activeForeground": "#15202b",
"titleBar.inactiveBackground": "#45e35f99",
"titleBar.inactiveForeground": "#15202b99"
}
}
1 change: 1 addition & 0 deletions dbm-ui/frontend/env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ declare module '@blueking/notice-component';
declare module '@blueking/login-modal' {
export function showLoginModal(params: { loginUrl: string }): void;
}
declare module '@blueking/sub-saas';

declare module '@blueking/sub-saas' {
export function connectToMain(router: Router): any;
Expand Down
432 changes: 216 additions & 216 deletions dbm-ui/frontend/lib/bk-icon/fonts/iconcool.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion dbm-ui/frontend/lib/bk-icon/iconcool.json

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions dbm-ui/frontend/lib/bk-icon/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -635,9 +635,15 @@ url("fonts/iconcool.eot?#iefix") format("embedded-opentype");
.db-icon-daoru:before {
content: "\e1ef";
}
<<<<<<< HEAD
.db-icon-piliangluru:before {
content: "\e1f1";
}
.db-icon-cluster-standardize:before {
content: "\e1f9";
}
<<<<<<< HEAD
=======
=======
>>>>>>> 3155ff4ed (feat(frontend): sqlserver 工具箱 #3485)
>>>>>>> local_sqlserver
65 changes: 33 additions & 32 deletions dbm-ui/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,81 +18,82 @@
"dependencies": {
"@blueking/app-select": "0.0.1-beta.12",
"@blueking/bk-weweb": "0.0.24",
"@blueking/bkflow.js": "0.1.10",
"@blueking/date-picker": "0.0.72",
"@blueking/bkflow.js": "0.1.11",
"@blueking/date-picker": "^1.0.1",
"@blueking/ip-selector": "0.3.0-beta.23",
"@blueking/notice-component": "2.0.5",
"@blueking/sub-saas": "^0.0.0-beta.6",
"@blueking/login-modal": "^1.0.3",
"@icon-cool/bk-icon-bk-biz-components": "0.0.4",
"@vueuse/core": "10.9.0",
"axios": "1.6.8",
"bkui-vue": "2.0.1-beta.19",
"date-fns": "3.0.4",
"bkui-vue": "2.0.1-beta.31",
"date-fns": "3.6.0",
"dayjs": "1.11.10",
"html-to-image": "1.11.11",
"js-cookie": "3.0.5",
"jsencrypt": "3.3.2",
"lodash": "4.17.21",
"mitt": "3.0.1",
"monaco-editor": "0.46.0",
"monaco-editor": "0.48.0",
"pinia": "2.1.7",
"qs": "6.11.2",
"qs": "6.12.1",
"screenfull": "6.0.2",
"tiny-pinyin": "1.3.2",
"tippy.js": "6.3.7",
"unplugin-auto-import": "0.17.2",
"url-join": "5.0.0",
"vite-plugin-monaco-editor": "1.1.0",
"vite-plugin-static-copy": "1.0.0",
"vue": "3.4.15",
"vue": "^3.4.27",
"vue-content-loader": "2.0.1",
"vue-i18n": "9.6.5",
"vue-i18n": "^9.13.1",
"vue-request": "2.0.4",
"vue-router": "4.2.5",
"vue-router": "^4.3.2",
"vue-types": "^5.1.2",
"vuedraggable": "4.1.0",
"xlsx": "0.18.5"
},
"devDependencies": {
"@commitlint/config-conventional": "19.0.0",
"@commitlint/config-conventional": "^19.2.2",
"@trivago/prettier-plugin-sort-imports": "4.3.0",
"@types/lodash": "4.14.202",
"@types/node": "20.11.21",
"@types/qs": "6.9.12",
"@vitejs/plugin-basic-ssl": "1.0.2",
"@tsconfig/node20": "20.1.4",
"@types/lodash": "4.17.0",
"@types/node": "^20.12.10",
"@types/qs": "^6.9.15",
"@vitejs/plugin-basic-ssl": "1.1.0",
"@vitejs/plugin-vue": "5.0.4",
"@vitejs/plugin-vue-jsx": "3.1.0",
"@vue/eslint-config-typescript": "12.0.0",
"@vue/eslint-config-typescript": "13.0.0",
"@vue/tsconfig": "0.5.1",
"commitlint": "19.0.1",
"commitlint": "^19.3.0",
"cross-env": "7.0.3",
"eslint": "8.56.0",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-config-tencent": "1.0.4",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-simple-import-sort": "12.0.0",
"eslint-plugin-vue": "9.18.1",
"eslint-plugin-simple-import-sort": "12.1.0",
"eslint-plugin-vue": "^9.25.0",
"less": "4.2.0",
"lint-staged": "15.0.2",
"lint-staged": "15.2.2",
"npm-run-all2": "6.1.2",
"postcss-html": "1.5.0",
"postcss-html": "1.6.0",
"postcss-less": "6.0.0",
"prettier": "3.2.5",
"prettier-plugin-curly": "0.1.4",
"simple-git-hooks": "2.9.0",
"stylelint": "16.2.1",
"prettier-plugin-curly": "0.2.1",
"simple-git-hooks": "2.11.0",
"stylelint": "16.5.0",
"stylelint-config-standard": "36.0.0",
"stylelint-less": "3.0.1",
"stylelint-order": "6.0.4",
"typescript": "5.3.2",
"unplugin-vue-components": "0.26.0",
"vite": "5.0.10",
"typescript": "5.4.5",
"unplugin-auto-import": "0.17.5",
"unplugin-vue-components": "0.27.0",
"vite": "^5.2.11",
"vite-plugin-babel": "1.2.0",
"vite-plugin-html-env": "1.2.8",
"vite-plugin-imp": "2.4.0",
"vite-plugin-monaco-editor": "1.1.0",
"vite-plugin-static-copy": "^1.0.4",
"vite-plugin-style-import": "2.0.0",
"vue-component-type-helpers": "2.0.6",
"vue-tsc": "1.8.22"
"vue-tsc": "2.0.16"
},
"simple-git-hooks": {
"pre-commit": "cd dbm-ui/frontend && npx lint-staged",
Expand Down
1 change: 1 addition & 0 deletions dbm-ui/frontend/src/common/const/ticketTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export enum TicketTypes {
TENDBCLUSTER_MIGRATE_CLUSTER = 'TENDBCLUSTER_MIGRATE_CLUSTER', // spider 迁移主从
TENDBCLUSTER_RESTORE_LOCAL_SLAVE = 'TENDBCLUSTER_RESTORE_LOCAL_SLAVE', // spider 重建从库-原地重建
TENDBCLUSTER_RESTORE_SLAVE = 'TENDBCLUSTER_RESTORE_SLAVE', // spider 重建从库-新机重建
TENDBCLUSTER_DUMP_DATA = 'TENDBCLUSTER_DUMP_DATA', // spider 数据导出
}
export enum TicketTypes {
MONGODB_DISABLE = 'MONGODB_DISABLE', // mongodb禁用
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,6 @@
import AccountRulesTable from './accouter-rules-selector/components/AccountRulesTable.vue';
import AccountRulesSelector from './accouter-rules-selector/Index.vue';
export default {
name: 'ClusterAuthorize',
};
</script>

<script setup lang="tsx">
Expand Down Expand Up @@ -261,7 +257,7 @@
type ClusterSelectorResult = Record<string, Array<ResourceItem>>
const props = withDefaults(defineProps<Props>(), {
const props = withDefaults(defineProps<Props>(), {
user: '',
accessDbs: () => [],
selected: () => [],
Expand All @@ -272,11 +268,16 @@
const emits = defineEmits<Emits>();
defineOptions({
name: 'ClusterAuthorize',
})
const isShow = defineModel<boolean>({
required: true,
default: false,
});
/**
* 重置表单数据
*/
Expand Down Expand Up @@ -665,6 +666,7 @@
remark: '',
ticket_type: ticketTypeMap[props.accountType],
};
createTicket(params)
.then((res) => {
ticketMessage(res.id);
Expand Down Expand Up @@ -748,11 +750,11 @@
if (state.isLoading) return false;
if (window.changeConfirm) {
return new Promise((resolve) => {
return new Promise<boolean>((resolve) => {
InfoBox({
title: t('确认离开当前页'),
content: t('离开将会导致未保存信息丢失'),
confirmTxt: t('离开'),
confirmText: t('离开'),
onConfirm: () => {
window.changeConfirm = false;
resolve(true);
Expand Down
64 changes: 64 additions & 0 deletions dbm-ui/frontend/src/components/cluster-export-data/Index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<!--
* TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-DB管理系统(BlueKing-BK-DBM) available.
*
* Copyright (C) 2017-2023 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License athttps://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
* the specific language governing permissions and limitations under the License.
-->

<template>
<DbSideslider
v-model:is-show="isShow"
class="export-data"
width="960">
<template #header>
<span>{{ t('导出数据') }}</span>
<div class="cluster-domain">{{ data.master_domain }}</div>
</template>
<Content
:data="data"
:ticket-type="ticketType" />
</DbSideslider>
</template>

<script setup lang="tsx">
import { useI18n } from 'vue-i18n';

import TendbhaModel from '@services/model/mysql/tendbha';
import TendbsingleModel from '@services/model/mysql/tendbsingle';
import TendbClusterModel from '@services/model/spider/tendbCluster';

import { TicketTypes } from '@common/const';

import Content from './component/Content.vue';

interface Props {
data: TendbsingleModel | TendbhaModel | TendbClusterModel;
ticketType: TicketTypes.MYSQL_DUMP_DATA | TicketTypes.TENDBCLUSTER_DUMP_DATA;
}

defineProps<Props>();
const isShow = defineModel<boolean>('isShow', {
required: true,
default: false,
});

const { t } = useI18n();
</script>

<style lang="less">
.export-data {
.cluster-domain {
padding-left: 8px;
margin-left: 8px;
color: #979ba5;
font-size: 14px;
border-left: 1px solid #dcdee5;
}
}
</style>
Loading

0 comments on commit cdf64d7

Please sign in to comment.