refactor: 主机服务抽离.
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
import useVisible from '@/hooks/visible';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import { getHostConfigAll } from '@/api/asset/host';
|
||||
import { getHostConfigList } from '@/api/asset/host-config';
|
||||
import { useCacheStore, useDictStore } from '@/store';
|
||||
import { dictKeys as sshDictKeys } from './ssh/types/const';
|
||||
import SshConfigForm from './ssh/ssh-config-form.vue';
|
||||
@@ -57,7 +57,7 @@
|
||||
const dictStore = useDictStore();
|
||||
await dictStore.loadKeys([...sshDictKeys]);
|
||||
// 加载配置
|
||||
const { data } = await getHostConfigAll({ hostId: record.value.id });
|
||||
const { data } = await getHostConfigList(record.value.id);
|
||||
data.forEach(s => {
|
||||
config.value[s.type] = s;
|
||||
});
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
import type { FieldRule } from '@arco-design/web-vue';
|
||||
import type { HostSshConfig } from './types/const';
|
||||
import { reactive, ref, watch } from 'vue';
|
||||
import { updateHostConfigStatus, updateHostConfig } from '@/api/asset/host';
|
||||
import { updateHostConfigStatus, updateHostConfig } from '@/api/asset/host-config';
|
||||
import { authTypeKey, AuthType } from './types/const';
|
||||
import rules from './types/form.rules';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
import { dataColor } from '@/utils';
|
||||
import { tagColor } from '@/views/asset/host-list/types/const';
|
||||
import { ref, nextTick } from 'vue';
|
||||
import { updateHostAlias } from '@/api/asset/host';
|
||||
import { updateHostAlias } from '@/api/asset/host-extra';
|
||||
|
||||
const props = defineProps<{
|
||||
hostList: Array<HostQueryResponse>,
|
||||
|
||||
Reference in New Issue
Block a user