diff --git a/core/task/handler/runner.go b/core/task/handler/runner.go index 6ea0dfb9..8a7a8182 100644 --- a/core/task/handler/runner.go +++ b/core/task/handler/runner.go @@ -218,12 +218,11 @@ func (r *Runner) Cancel(force bool) (err error) { r.cancel() // Kill process + r.Debugf("attempt to kill process[%d]", r.pid) err = utils.KillProcess(r.cmd, force) if err != nil { - r.Errorf("kill process error: %v", err) - return err + r.Warnf("kill process error: %v", err) } - r.Debugf("attempt to kill process[%d]", r.pid) // Create a context with timeout ctx, cancel := context.WithTimeout(context.Background(), r.svc.GetCancelTimeout()) @@ -1155,7 +1154,7 @@ func (r *Runner) logInternally(level string, message string) { // Send to the same log system as task logs if r.conn != nil { - r.writeLogLines([]string{internalLog}) + go r.writeLogLines([]string{internalLog}) } // Also log through the standard logger diff --git a/frontend/crawlab-ui/src/components/core/autoprobe/useAutoProbe.ts b/frontend/crawlab-ui/src/components/core/autoprobe/useAutoProbe.ts index 17a67e88..55bfc714 100644 --- a/frontend/crawlab-ui/src/components/core/autoprobe/useAutoProbe.ts +++ b/frontend/crawlab-ui/src/components/core/autoprobe/useAutoProbe.ts @@ -10,7 +10,6 @@ const formComponentData = getDefaultFormComponentData(); const useAutoProbe = (store: Store) => { // store const ns = 'autoprobe'; - const state = store.state[ns]; // form rules const formRules: FormRules = { @@ -20,16 +19,6 @@ const useAutoProbe = (store: Store) => { }, }; - // all autoprobe select options - const allAutoProbeSelectOptions = computed(() => - state.allList.map(d => { - return { - label: d.name, - value: d._id, - }; - }) - ); - return { ...useForm( 'autoprobe', @@ -38,7 +27,6 @@ const useAutoProbe = (store: Store) => { formComponentData ), formRules, - allAutoProbeSelectOptions, }; }; diff --git a/frontend/crawlab-ui/src/components/core/dependency/DependencyConfigDialog.vue b/frontend/crawlab-ui/src/components/core/dependency/DependencyConfigDialog.vue index 2edcd5fe..a16735c9 100644 --- a/frontend/crawlab-ui/src/components/core/dependency/DependencyConfigDialog.vue +++ b/frontend/crawlab-ui/src/components/core/dependency/DependencyConfigDialog.vue @@ -10,14 +10,6 @@ const ns: ListStoreNamespace = 'dependency'; const store = useStore(); const { dependency: state, node: nodeState } = store.state as RootStoreState; -const activeNodes = computed(() => nodeState.allList.filter(n => n.active)); - -const toInstallNodes = computed(() => { - const { mode, node_ids } = state.installForm; - if (mode === 'all') return activeNodes.value; - return activeNodes.value.filter(n => node_ids?.includes(n._id!)); -}); - const visible = computed(() => state.activeDialogKey === 'config'); const form = computed(() => state.config); diff --git a/frontend/crawlab-ui/src/components/core/dependency/DependencyInstallDialog.vue b/frontend/crawlab-ui/src/components/core/dependency/DependencyInstallDialog.vue index 63c70be3..c5cd988c 100644 --- a/frontend/crawlab-ui/src/components/core/dependency/DependencyInstallDialog.vue +++ b/frontend/crawlab-ui/src/components/core/dependency/DependencyInstallDialog.vue @@ -9,7 +9,7 @@ const ns: ListStoreNamespace = 'dependency'; const store = useStore(); const { dependency: state, node: nodeState } = store.state as RootStoreState; -const activeNodes = computed(() => nodeState.allList.filter(n => n.active)); +const activeNodes = computed(() => nodeState.activeNodes.filter(n => n.active)); const toInstallNodes = computed(() => { const { mode, node_ids } = state.installForm; diff --git a/frontend/crawlab-ui/src/components/core/dependency/DependencyUninstallDialog.vue b/frontend/crawlab-ui/src/components/core/dependency/DependencyUninstallDialog.vue index 01d1bea7..a91d8805 100644 --- a/frontend/crawlab-ui/src/components/core/dependency/DependencyUninstallDialog.vue +++ b/frontend/crawlab-ui/src/components/core/dependency/DependencyUninstallDialog.vue @@ -9,7 +9,7 @@ const ns: ListStoreNamespace = 'dependency'; const store = useStore(); const { dependency: state, node: nodeState } = store.state as RootStoreState; -const activeNodes = computed(() => nodeState.allList.filter(n => n.active)); +const activeNodes = computed(() => nodeState.activeNodes.filter(n => n.active)); const toUninstallNodes = computed(() => { const { mode, node_ids } = state.uninstallForm; diff --git a/frontend/crawlab-ui/src/components/core/git/CreateGitSpiderDialog.vue b/frontend/crawlab-ui/src/components/core/git/CreateGitSpiderDialog.vue index b6d01933..7b93b0fd 100644 --- a/frontend/crawlab-ui/src/components/core/git/CreateGitSpiderDialog.vue +++ b/frontend/crawlab-ui/src/components/core/git/CreateGitSpiderDialog.vue @@ -1,5 +1,5 @@ diff --git a/frontend/crawlab-ui/src/components/core/user/useUser.ts b/frontend/crawlab-ui/src/components/core/user/useUser.ts index 37c5a0f0..439d1580 100644 --- a/frontend/crawlab-ui/src/components/core/user/useUser.ts +++ b/frontend/crawlab-ui/src/components/core/user/useUser.ts @@ -36,16 +36,6 @@ const useUser = (store: Store) => { }, }; - // all user select options - const allUserSelectOptions = computed(() => - state.allList.map(d => { - return { - label: d.username, - value: d._id, - }; - }) - ); - // on change password const onChangePasswordFunc = async (id?: string) => { if (!id) return; @@ -78,7 +68,6 @@ const useUser = (store: Store) => { ...useForm('user', store, useUserService(store), formComponentData), modeOptions, formRules, - allUserSelectOptions, onChangePasswordFunc, rolesOptions, }; diff --git a/frontend/crawlab-ui/src/interfaces/layout/content/list/ListLayout.d.ts b/frontend/crawlab-ui/src/interfaces/layout/content/list/ListLayout.d.ts index 389db03f..2cbbfbdc 100644 --- a/frontend/crawlab-ui/src/interfaces/layout/content/list/ListLayout.d.ts +++ b/frontend/crawlab-ui/src/interfaces/layout/content/list/ListLayout.d.ts @@ -58,7 +58,6 @@ export declare global { interface ListLayoutActionFunctions { setPagination: (pagination: TablePagination) => void; getList: () => Promise; - getAll: () => Promise; deleteList: (ids: string[]) => Promise; deleteByIdConfirm: (row: BaseModel) => Promise; onHeaderChange?: ( diff --git a/frontend/crawlab-ui/src/interfaces/services/index.d.ts b/frontend/crawlab-ui/src/interfaces/services/index.d.ts index 916ca70a..7c77b401 100644 --- a/frontend/crawlab-ui/src/interfaces/services/index.d.ts +++ b/frontend/crawlab-ui/src/interfaces/services/index.d.ts @@ -5,7 +5,6 @@ export declare global { updateById: (id: string, form: T) => Promise>; deleteById: (id: string) => Promise; getList: (params?: ListRequestParams) => Promise>; - getAll: () => Promise>; createList: (data: T[]) => Promise>; updateList: (ids: string[], data: T, fields: string[]) => Promise; deleteList: (ids: string[]) => Promise; diff --git a/frontend/crawlab-ui/src/interfaces/store/index.d.ts b/frontend/crawlab-ui/src/interfaces/store/index.d.ts index 8cd4b0b2..78e733aa 100644 --- a/frontend/crawlab-ui/src/interfaces/store/index.d.ts +++ b/frontend/crawlab-ui/src/interfaces/store/index.d.ts @@ -81,7 +81,6 @@ export declare global { tablePagination: TablePagination; tableListFilter: FilterConditionData[]; tableListSort: SortData[]; - allList: T[]; sidebarCollapsed: boolean; actionsCollapsed: boolean; tabs: NavItem[]; @@ -93,8 +92,6 @@ export declare global { extends GetterTree { dialogVisible: StoreGetter; formListIds: StoreGetter; - allListSelectOptions: StoreGetter; - allDict: StoreGetter>; } interface BaseStoreMutations @@ -130,8 +127,6 @@ export declare global { { key: string; sort: SortData } >; resetTableListSortByKey: StoreMutation, string>; - setAllList: StoreMutation, T[]>; - resetAllList: StoreMutation>; setTabs: StoreMutation; setDisabledTabKeys: StoreMutation; resetDisabledTabKeys: StoreMutation; @@ -146,7 +141,6 @@ export declare global { deleteById: StoreAction, string>; getList: StoreAction>; getListWithParams: StoreAction, ListRequestParams>; - getAllList: StoreAction>; createList: StoreAction, T[]>; updateList: StoreAction, BatchRequestPayloadWithData>; deleteList: StoreAction, BatchRequestPayload>; diff --git a/frontend/crawlab-ui/src/interfaces/store/modules/node.d.ts b/frontend/crawlab-ui/src/interfaces/store/modules/node.d.ts index 1569dce9..d4eb3ff7 100644 --- a/frontend/crawlab-ui/src/interfaces/store/modules/node.d.ts +++ b/frontend/crawlab-ui/src/interfaces/store/modules/node.d.ts @@ -7,6 +7,7 @@ type NodeStoreModule = BaseModule< interface NodeStoreState extends BaseStoreState { nodeMetricsMap: Record; + activeNodes: CNode[]; } type NodeStoreGetters = BaseStoreGetters; @@ -19,4 +20,5 @@ interface NodeStoreMutations extends BaseStoreMutations { interface NodeStoreActions extends BaseStoreActions { getNodeMetrics: StoreAction; + getActiveNodes: StoreAction; } diff --git a/frontend/crawlab-ui/src/layouts/content/detail/DetailLayout.vue b/frontend/crawlab-ui/src/layouts/content/detail/DetailLayout.vue index c386a786..a586ad6a 100644 --- a/frontend/crawlab-ui/src/layouts/content/detail/DetailLayout.vue +++ b/frontend/crawlab-ui/src/layouts/content/detail/DetailLayout.vue @@ -37,24 +37,9 @@ const computedTabs = computed(() => tabs.value.map((tab: NavItem) => ({ ...tab })) ); -const computedAllListSelectOptions = computed(() => { - if (props.allListSelectOptions) { - return props.allListSelectOptions; - } - return store.state[ns.value].allList.map((item: BaseModel) => ({ - label: item[props.navItemNameKey], - value: item._id, - })); -}); - // get form before mount onBeforeMount(getForm); -// get all list before mount -onBeforeMount(async () => { - await store.dispatch(`${ns.value}/getAllList`); -}); - // reset form before unmount onBeforeUnmount(() => { if (!activeTabName.value) { diff --git a/frontend/crawlab-ui/src/layouts/content/detail/useDetail.ts b/frontend/crawlab-ui/src/layouts/content/detail/useDetail.ts index 34c9a865..5885af5c 100644 --- a/frontend/crawlab-ui/src/layouts/content/detail/useDetail.ts +++ b/frontend/crawlab-ui/src/layouts/content/detail/useDetail.ts @@ -23,14 +23,10 @@ const useDetail = (ns: ListStoreNamespace) => { const showActionsToggleTooltip = ref(false); - const navItems = computed[]>(() => - state.allList.map((d: T) => { - return { - id: d._id, - title: d.name, - } as NavItem; - }) - ); + const navItems = computed[]>(() => { + // TODO: implement + return []; + }); const activeId = computed(() => { const { id } = route.params; @@ -100,7 +96,6 @@ const useDetail = (ns: ListStoreNamespace) => { form: state.form, }); ElMessage.success(t('common.message.success.save')); - await Promise.all([store.dispatch(`${ns}/getAllList`), getForm()]); // after save afterSave.value.map(fn => fn()); diff --git a/frontend/crawlab-ui/src/layouts/content/list/useList.ts b/frontend/crawlab-ui/src/layouts/content/list/useList.ts index 66f2b36b..990c7e33 100644 --- a/frontend/crawlab-ui/src/layouts/content/list/useList.ts +++ b/frontend/crawlab-ui/src/layouts/content/list/useList.ts @@ -78,7 +78,6 @@ const useList = ( setPagination: (pagination: TablePagination) => store.commit(`${ns}/setTablePagination`, pagination), getList: () => store.dispatch(`${ns}/getList`), - getAll: () => store.dispatch(`${ns}/getAllList`), deleteList: async (ids: string[]) => { await store.dispatch(`${ns}/deleteList`, ids); }, diff --git a/frontend/crawlab-ui/src/services/index.ts b/frontend/crawlab-ui/src/services/index.ts index 544e8281..3cf78d47 100644 --- a/frontend/crawlab-ui/src/services/index.ts +++ b/frontend/crawlab-ui/src/services/index.ts @@ -5,7 +5,7 @@ import * as llmService from './llm'; // Export the LLM service export { llmService }; -const { get, put, post, del, getList, getAll, putList, postList, delList } = +const { get, put, post, del, getList, putList, postList, delList } = useRequest(); export const useService = (endpoint: string): Services => { @@ -29,9 +29,6 @@ export const useService = (endpoint: string): Services => { getList: async (params?: ListRequestParams) => { return await getList(`${endpoint}`, params); }, - getAll: async () => { - return await getAll(`${endpoint}`); - }, createList: async (data: T[]) => { return await postList(`${endpoint}/batch`, data); }, diff --git a/frontend/crawlab-ui/src/services/request.ts b/frontend/crawlab-ui/src/services/request.ts index 72114d75..6f53064b 100644 --- a/frontend/crawlab-ui/src/services/request.ts +++ b/frontend/crawlab-ui/src/services/request.ts @@ -175,10 +175,6 @@ const useRequest = () => { return res; }; - const getAll = async (url: string, opts?: AxiosRequestConfig) => { - return await getList(url, { all: true }, opts); - }; - const postList = async ( url: string, data?: T[], @@ -250,7 +246,6 @@ const useRequest = () => { put, del, getList, - getAll, postList, putList, delList, diff --git a/frontend/crawlab-ui/src/utils/list.ts b/frontend/crawlab-ui/src/utils/list.ts index 589eb30d..9803f3ba 100644 --- a/frontend/crawlab-ui/src/utils/list.ts +++ b/frontend/crawlab-ui/src/utils/list.ts @@ -17,28 +17,11 @@ export const getDefaultUseListOptions = ( }; }; -export const setupGetAllList = ( - store: Store, - allListNamespaces: ListStoreNamespace[] -) => { - onBeforeMount(async () => { - await Promise.all( - allListNamespaces?.map(ns => store.dispatch(`${ns}/getAllList`)) || [] - ); - }); -}; - export const setupListComponent = ( ns: ListStoreNamespace, store: Store, - allListNamespaces?: ListStoreNamespace[], autoUpdate: boolean = true ) => { - if (!allListNamespaces) allListNamespaces = []; - - // get all list - setupGetAllList(store, allListNamespaces); - // auto update if (autoUpdate) { setupAutoUpdate(async () => { diff --git a/frontend/crawlab-ui/src/utils/service.ts b/frontend/crawlab-ui/src/utils/service.ts index a739380e..c780667a 100644 --- a/frontend/crawlab-ui/src/utils/service.ts +++ b/frontend/crawlab-ui/src/utils/service.ts @@ -19,7 +19,6 @@ export const getDefaultService = ( return dispatch(`${ns}/getList`); } }, - getAll: () => dispatch(`${ns}/getAllList`), createList: (data: T[]) => dispatch(`${ns}/createList`, data), updateList: (ids: string[], data: T, fields: string[]) => dispatch(`${ns}/updateList`, { ids, data, fields }), diff --git a/frontend/crawlab-ui/src/utils/store.ts b/frontend/crawlab-ui/src/utils/store.ts index bf6e24d4..443b6cfd 100644 --- a/frontend/crawlab-ui/src/utils/store.ts +++ b/frontend/crawlab-ui/src/utils/store.ts @@ -46,7 +46,6 @@ export const getDefaultStoreState = ( tablePagination, tableListFilter: [], tableListSort: [], - allList: [], sidebarCollapsed: false, actionsCollapsed: false, tabs: [{ id: 'overview', title: t('common.tabs.overview') }], @@ -67,21 +66,6 @@ export const getDefaultStoreGetters = ( state.activeDialogKey !== undefined, formListIds: (state: BaseStoreState) => state.formList.map(d => (d as BaseModel)._id as string), - allListSelectOptions: (state: BaseStoreState) => - state.allList.map(d => { - const _d = d as BaseModel; - return { - value: _d[opts?.selectOptionValueKey as string], - label: _d[opts?.selectOptionLabelKey as string], - }; - }), - allDict: (state: BaseStoreState) => { - const dict = new Map(); - state.allList.forEach(d => - dict.set((d as BaseModel)._id as string, d as any) - ); - return dict; - }, }; }; @@ -206,12 +190,6 @@ export const getDefaultStoreMutations = (): BaseStoreMutations => { resetTableListSortByKey: (state: BaseStoreState, key) => { state.tableListSort = state.tableListSort.filter(d => d.key !== key); }, - setAllList: (state: BaseStoreState, value: T[]) => { - state.allList = value; - }, - resetAllList: (state: BaseStoreState) => { - state.allList = []; - }, setTabs: (state: BaseStoreState, tabs) => { state.tabs = tabs; }, @@ -234,9 +212,6 @@ export const getDefaultStoreActions = ( { commit }: StoreActionContext>, ids: string[] ) => Promise; - getAllList: ({ - commit, - }: StoreActionContext>) => Promise>; createList: ( { state, commit }: StoreActionContext>, data: T[] @@ -282,7 +257,6 @@ export const getDefaultStoreActions = ( updateById, deleteById, getList, - getAll, createList, updateList, deleteList, @@ -346,11 +320,6 @@ export const getDefaultStoreActions = ( ) => { return await getList(params); }, - getAllList: async ({ commit }: StoreActionContext>) => { - const res = await getAll(); - commit('setAllList', res.data || []); - return res; - }, createList: async (_: StoreActionContext>, data: T[]) => { return await createList(data); }, diff --git a/frontend/crawlab-ui/src/views/data/list/ResultList.vue b/frontend/crawlab-ui/src/views/data/list/ResultList.vue index 2896116b..7c812148 100644 --- a/frontend/crawlab-ui/src/views/data/list/ResultList.vue +++ b/frontend/crawlab-ui/src/views/data/list/ResultList.vue @@ -109,9 +109,6 @@ const actionFunctions = { }, }); }, - getAll: async () => { - console.warn('getAll is not implemented'); - }, deleteList: (ids: string[]) => { console.warn('deleteList is not implemented'); }, diff --git a/frontend/crawlab-ui/src/views/git/detail/tabs/GitDetailTabFiles.vue b/frontend/crawlab-ui/src/views/git/detail/tabs/GitDetailTabFiles.vue index 02a088c7..a6322501 100644 --- a/frontend/crawlab-ui/src/views/git/detail/tabs/GitDetailTabFiles.vue +++ b/frontend/crawlab-ui/src/views/git/detail/tabs/GitDetailTabFiles.vue @@ -53,7 +53,6 @@ const onDeleteSpider = async (item: FileNavItem) => { ); await store.dispatch(`${nsSpider}/deleteById`, spider._id); ElMessage.success(t('common.message.success.delete')); - await store.dispatch(`${nsSpider}/getAllList`, { id: activeId.value }); }; defineOptions({ name: 'ClGitDetailTabFiles' }); diff --git a/frontend/crawlab-ui/src/views/notification/alert/detail/useNotificationAlertDetail.ts b/frontend/crawlab-ui/src/views/notification/alert/detail/useNotificationAlertDetail.ts index 6c6bd605..2637debd 100644 --- a/frontend/crawlab-ui/src/views/notification/alert/detail/useNotificationAlertDetail.ts +++ b/frontend/crawlab-ui/src/views/notification/alert/detail/useNotificationAlertDetail.ts @@ -1,12 +1,7 @@ -import { useStore } from 'vuex'; import { useDetail } from '@/layouts'; -import { setupGetAllList } from '@/utils'; const useNotificationAlertDetail = () => { const ns: ListStoreNamespace = 'notificationAlert'; - const store = useStore(); - - setupGetAllList(store, ['node']); return { ...useDetail(ns), diff --git a/frontend/crawlab-ui/src/views/notification/channel/detail/useNotificationChannelDetail.ts b/frontend/crawlab-ui/src/views/notification/channel/detail/useNotificationChannelDetail.ts index 0455e2a5..9d5058e1 100644 --- a/frontend/crawlab-ui/src/views/notification/channel/detail/useNotificationChannelDetail.ts +++ b/frontend/crawlab-ui/src/views/notification/channel/detail/useNotificationChannelDetail.ts @@ -1,12 +1,7 @@ -import { useStore } from 'vuex'; -import { setupGetAllList } from '@/utils'; import { useDetail } from '@/layouts'; const useNotificationChannelDetail = () => { const ns: ListStoreNamespace = 'notificationChannel'; - const store = useStore(); - - setupGetAllList(store, ['node', 'notificationChannel']); return { ...useDetail(ns), diff --git a/frontend/crawlab-ui/src/views/notification/setting/detail/useNotificationSettingDetail.ts b/frontend/crawlab-ui/src/views/notification/setting/detail/useNotificationSettingDetail.ts index c841e025..741886c7 100644 --- a/frontend/crawlab-ui/src/views/notification/setting/detail/useNotificationSettingDetail.ts +++ b/frontend/crawlab-ui/src/views/notification/setting/detail/useNotificationSettingDetail.ts @@ -1,12 +1,7 @@ -import { useStore } from 'vuex'; import { useDetail } from '@/layouts'; -import { setupGetAllList } from '@/utils'; const useNotificationSettingDetail = () => { const ns: ListStoreNamespace = 'notificationSetting'; - const store = useStore(); - - setupGetAllList(store, ['notificationAlert', 'notificationChannel']); return { ...useDetail(ns), diff --git a/frontend/crawlab-ui/src/views/schedule/detail/useScheduleDetail.ts b/frontend/crawlab-ui/src/views/schedule/detail/useScheduleDetail.ts index b014f19e..0a03679f 100644 --- a/frontend/crawlab-ui/src/views/schedule/detail/useScheduleDetail.ts +++ b/frontend/crawlab-ui/src/views/schedule/detail/useScheduleDetail.ts @@ -1,15 +1,10 @@ -import { useStore } from 'vuex'; import { useDetail } from '@/layouts'; -import { setupGetAllList } from '@/utils/list'; const useScheduleDetail = () => { - // store - const store = useStore(); - - setupGetAllList(store, ['node', 'spider']); + const ns: ListStoreNamespace = 'schedule'; return { - ...useDetail('schedule'), + ...useDetail(ns), }; }; diff --git a/frontend/crawlab-ui/src/views/spider/detail/actions/SpiderDetailActionsData.vue b/frontend/crawlab-ui/src/views/spider/detail/actions/SpiderDetailActionsData.vue index 2434e553..808210b4 100644 --- a/frontend/crawlab-ui/src/views/spider/detail/actions/SpiderDetailActionsData.vue +++ b/frontend/crawlab-ui/src/views/spider/detail/actions/SpiderDetailActionsData.vue @@ -28,26 +28,25 @@ const form = computed(() => state.form); const { activeId } = useSpiderDetail(); const { allDict: allDatabaseDict } = useDatabase(store); -onBeforeMount(() => { - store.dispatch(`database/getAllList`); -}); const allDatabaseSelectOptions = computed(() => { - return databaseState.allList.map(db => { - const value = db._id; - let dbName = db.name; - if (db._id === EMPTY_OBJECT_ID) { - dbName = t('components.database.default.name'); - } - let label = dbName; - if (db.status === DATABASE_STATUS_OFFLINE) { - label = `${dbName} (${t('components.database.status.label.offline')})`; - } - return { - value, - label, - }; - }); + // TODO: implement + return []; + // return databaseState.allList.map(db => { + // const value = db._id; + // let dbName = db.name; + // if (db._id === EMPTY_OBJECT_ID) { + // dbName = t('components.database.default.name'); + // } + // let label = dbName; + // if (db.status === DATABASE_STATUS_OFFLINE) { + // label = `${dbName} (${t('components.database.status.label.offline')})`; + // } + // return { + // value, + // label, + // }; + // }); }); const currentDatabase = computed(() => { diff --git a/frontend/crawlab-ui/src/views/spider/detail/useSpiderDetail.ts b/frontend/crawlab-ui/src/views/spider/detail/useSpiderDetail.ts index b0b0ca83..1fe95e6f 100644 --- a/frontend/crawlab-ui/src/views/spider/detail/useSpiderDetail.ts +++ b/frontend/crawlab-ui/src/views/spider/detail/useSpiderDetail.ts @@ -1,14 +1,11 @@ import { useStore } from 'vuex'; import { useDetail } from '@/layouts'; -import { setupGetAllList } from '@/utils'; import useFileService from '@/services/utils/file'; const useSpiderDetail = () => { const ns: ListStoreNamespace = 'spider'; const store = useStore(); - setupGetAllList(store, ['node', 'project']); - return { ...useDetail('spider'), ...useFileService(ns, store), diff --git a/frontend/crawlab-ui/src/views/task/detail/useTaskDetail.ts b/frontend/crawlab-ui/src/views/task/detail/useTaskDetail.ts index 17e48438..8f65f751 100644 --- a/frontend/crawlab-ui/src/views/task/detail/useTaskDetail.ts +++ b/frontend/crawlab-ui/src/views/task/detail/useTaskDetail.ts @@ -1,7 +1,6 @@ import { onBeforeUnmount } from 'vue'; import { useStore } from 'vuex'; import { useDetail } from '@/layouts'; -import { setupGetAllList } from '@/utils/list'; const useTaskDetail = () => { // store @@ -16,8 +15,6 @@ const useTaskDetail = () => { store.commit(`${ns}/disableLogAutoUpdate`); }); - setupGetAllList(store, ['node', 'spider']); - return { ...useDetail('task'), };