Skip to content

Commit

Permalink
chore: 前端构建任务升级 TencentBlueKing#2042
Browse files Browse the repository at this point in the history
  • Loading branch information
hLinx committed May 11, 2023
1 parent 3e979b5 commit 135671e
Show file tree
Hide file tree
Showing 108 changed files with 223 additions and 216 deletions.
1 change: 1 addition & 0 deletions src/frontend/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ module.exports = {
['^@views'],
['^@components'],
['^@\\w'],
['^@/'],
['^\\.\\.'],
['^\\.'],
],
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@
import RouterBack from '@components/router-back';
import SystemLog from '@components/system-log';

import Layout from './layout-new';

import I18n, { setLocale } from '@/i18n';

import Layout from './layout-new';

export default {
name: 'App',
components: {
Expand Down
3 changes: 2 additions & 1 deletion src/frontend/src/components/ace-editor/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@
import Empty from '@components/empty';
import ScrollFaker from '@components/scroll-faker';

import I18n from '@/i18n';

import DefaultScript from './default-script';

import 'ace/mode-sh';
Expand All @@ -171,7 +173,6 @@
import 'ace/ext-language_tools';
import 'ace/ext-keybinding_menu';
import 'ace/ext-elastic_tabstops_lite';
import I18n from '@/i18n';

export const builtInScript = Object.keys(DefaultScript).reduce((result, item) => {
result[item] = Base64.encode(DefaultScript[item]);
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/components/apply-permission/apply-dialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@
<script>
import PermissionCheckService from '@service/permission-check';

import AskPermission from './index';

import I18n from '@/i18n';

import AskPermission from './index';

export default {
components: {
AskPermission,
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/components/apply-permission/apply-page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
</div>
</template>
<script>
import AskPermission from './index';

import I18n from '@/i18n';

import AskPermission from './index';

export default {
components: {
AskPermission,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@
<script>
import EventBus from '@utils/event-bus';

import AskPermission from './index';

import I18n from '@/i18n';

import AskPermission from './index';

export default {
components: {
AskPermission,
Expand Down
3 changes: 2 additions & 1 deletion src/frontend/src/components/auth/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@

import PermissionCheckService from '@service/permission-check';

import './style.css';
import {
permissionDialog,
} from '@/common/bkmagic';

import './style.css';

export default {
props: {
permission: {
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/components/choose-ip/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@

import TaskHostNodeModel from '@model/task-host-node';

import I18n from '@/i18n';

import PreviewGroup from './components/preview-group';
import RenderBusinessTopology from './components/render-business-topology';
import RenderDynamicBusinessTopology from './components/render-dynamic-business-topology';
Expand All @@ -166,8 +168,6 @@
} from './components/utils';
import Preview from './preview';

import I18n from '@/i18n';

const DIALOG_FOOTER_HEIGHT = 58;
const CONTENT_TAB_HEIGHT = 42;

Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/components/choose-ip/preview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@
/**
* 预览已选主机数据
*/
import ServerPanel from './server-panel';

import I18n from '@/i18n';

import ServerPanel from './server-panel';

export default {
name: '',
components: {
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/components/choose-ip/view/group.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,15 @@

import JbCollapseItem from '@components/jb-collapse-item';

import I18n from '@/i18n';

import ActionExtend from '../components/action-extend';
import HostTable from '../components/host-table';
import StatisticsText from '../components/statistics-text';
import {
statisticsHost,
} from '../components/utils';

import I18n from '@/i18n';

export default {
name: 'ViewGroup',
components: {
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/components/choose-ip/view/host-search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@
</div>
</template>
<script>
import I18n from '@/i18n';

import ActionExtend from '../components/action-extend';
import HostTable from '../components/host-table';
import {
sortHost,
statisticsHost,
} from '../components/utils';

import I18n from '@/i18n';

export default {
name: '',
components: {
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/components/choose-ip/view/host.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@

import JbCollapseItem from '@components/jb-collapse-item';

import I18n from '@/i18n';

import ActionExtend from '../components/action-extend';
import HostTable from '../components/host-table';
import {
sortHost,
statisticsHost,
} from '../components/utils';

import I18n from '@/i18n';

export default {
name: 'ViewHost',
components: {
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/components/choose-ip/view/node.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@

import JbCollapseItem from '@components/jb-collapse-item';

import I18n from '@/i18n';

import ActionExtend from '../components/action-extend';
import HostTable from '../components/host-table';
import StatisticsText from '../components/statistics-text';
import {
statisticsHost,
} from '../components/utils';

import I18n from '@/i18n';

const genNodeKey = ({ objectId, instanceId }) => `#${objectId}#${instanceId}`;

export default {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,12 @@

import ComposeFormItem from '@components/compose-form-item';

import I18n from '@/i18n';

import DropdownMenu from './components/dropdown-menu';
import DropdownMenuGroup from './components/dropdown-menu/group';
import DropdownMenuItem from './components/dropdown-menu/item';

import I18n from '@/i18n';

export default {
components: {
ComposeFormItem,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@

import rollingExprParse from '@utils/rolling-expr-parse';

import Guide from './guide';

import I18n from '@/i18n';

import Guide from './guide';

export default {
name: '',
components: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@

import QuertGlobalSettingService from '@service/query-global-setting';

import ViewFile from './view';

import I18n from '@/i18n';

import ViewFile from './view';

export default {
name: 'SourceFileBase',
components: {
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/domain/service/dangerous-rule.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
/* eslint-disable no-param-reassign */
import DangerousRuleModel from '@model/dangerous-rule';

import DangerousRuleSource from '../source/dangerous-rule';

import I18n from '@/i18n';

import DangerousRuleSource from '../source/dangerous-rule';

export default {
fetchList(params = {}, payload = {}) {
return DangerousRuleSource.getData(params, payload)
Expand Down
15 changes: 8 additions & 7 deletions src/frontend/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,20 @@ import TaskExecuteService from '@service/task-execute';
import TaskPlanService from '@service/task-plan';

import { getURLSearchParams } from '@utils/assist';
import { scopeCache } from '@utils/cache-helper';
import EntryTask from '@utils/entry-task';

import '@/common/bkmagic';
import '@/css/reset.css';
import '@/css/app.css';
import '@bk-icon/style.css';
import '@bk-icon/iconcool.js';
import App from '@/App';
import i18n from '@/i18n';
import IframeApp from '@/iframe-app';
import createRouter from '@/router';
import store from '@/store';
import { scopeCache } from '@/utils/cache-helper';
import EntryTask from '@/utils/entry-task';

import '@/common/bkmagic';
import '@/css/reset.css';
import '@/css/app.css';
import '@bk-icon/style.css';
import '@bk-icon/iconcool.js';

/**
* @desc 启动打印当前系统信息
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/utils/request/middleware/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ import AuthResultModel from '@model/auth-result';

import EventBus from '@utils/event-bus';

import RequestError from '../lib/request-error';

import {
loginDialog,
messageError,
permissionDialog,
} from '@/common/bkmagic';

import RequestError from '../lib/request-error';

// 标记已经登录过状态
// 第一次登录跳转登录页面,之后弹框登录
let hasLogined = false;
Expand Down
2 changes: 2 additions & 0 deletions src/frontend/src/utils/rolling-expr-parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ const translateCN = (value) => {
};
const result = [];
value.forEach((atoms, index) => {
// eslint-disable-next-line prefer-spread
result.push.apply(result, parse(atoms, index + 1));
});
return result.join(',');
Expand Down Expand Up @@ -230,6 +231,7 @@ const translateEN = (value) => {
};
const result = [];
value.forEach((atoms, index) => {
// eslint-disable-next-line prefer-spread
result.push.apply(result, parse(atoms, index + 1));
});
return result.join(', ');
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/views/account-manage/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
<jb-router-view />
</template>
<script>
import Local from './local';

import {
loadLanguage,
} from '@/i18n';

import Local from './local';

loadLanguage(Local);

export default {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@
import AccountSelect from '@components/account-select';
import JbInput from '@components/jb-input';

import I18n from '@/i18n';

import AccountDatabase from './account-strategy/database-account';
import AccountOS from './account-strategy/os-account';

import I18n from '@/i18n';

const generatorDefault = () => ({
id: '',
account: '',
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/views/account-manage/index/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,10 @@
import ListActionLayout from '@components/list-action-layout';
import RenderList from '@components/render-list';

import Operation from './components/operation';

import I18n from '@/i18n';

import Operation from './components/operation';

const TABLE_COLUMN_CACHE = 'account_manage_columns';

export default {
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/views/cron-job/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
<jb-router-view />
</template>
<script>
import Local from './local';

import {
loadLanguage,
} from '@/i18n';

import Local from './local';

loadLanguage(Local);

export default {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,13 @@
import ToggleDisplay from '@components/global-variable/toggle-display';
import JbInput from '@components/jb-input';

import I18n from '@/i18n';

import RenderInfoDetail from '../render-info-detail';

import CronJob from './cron-job';
import FormItemFactory from './form-item-strategy';

import I18n from '@/i18n';

const onceItemList = [
'executeBeforeNotify',
];
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/views/cron-job/list/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -357,12 +357,12 @@
import ListActionLayout from '@components/list-action-layout';
import RenderList from '@components/render-list';

import I18n from '@/i18n';

import TaskDetail from './components/detail';
import HistoryRecord from './components/history-record';
import TaskOperation from './components/operation';

import I18n from '@/i18n';

const TABLE_COLUMN_CACHE = 'cron_list_columns';

export default {
Expand Down
Loading

0 comments on commit 135671e

Please sign in to comment.