⚡ 修改前端包结构.
This commit is contained in:
@@ -0,0 +1,40 @@
|
|||||||
|
package com.orion.visor.framework.common.enums;
|
||||||
|
|
||||||
|
import com.orion.lang.utils.Strings;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 端点定义
|
||||||
|
*
|
||||||
|
* @author Jiahang Li
|
||||||
|
* @version 1.0.0
|
||||||
|
* @since 2024/6/21 19:15
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum EndpointDefine {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传临时分区
|
||||||
|
*/
|
||||||
|
UPLOAD_SWAP("/upload/swap/{}"),
|
||||||
|
|
||||||
|
;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 端点
|
||||||
|
*/
|
||||||
|
private final String endpoint;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 格式化
|
||||||
|
*
|
||||||
|
* @param params params
|
||||||
|
* @return path
|
||||||
|
*/
|
||||||
|
public String format(Object... params) {
|
||||||
|
return Strings.format(this.endpoint, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,4 +1,52 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"name": "Dracula",
|
||||||
|
"dark": true,
|
||||||
|
"schema": {
|
||||||
|
"background": "#1E1F29",
|
||||||
|
"foreground": "#F8F8F2",
|
||||||
|
"cursor": "#BBBBBB",
|
||||||
|
"selectionBackground": "#44475A",
|
||||||
|
"black": "#000000",
|
||||||
|
"red": "#FF5555",
|
||||||
|
"green": "#50FA7B",
|
||||||
|
"yellow": "#F1FA8C",
|
||||||
|
"blue": "#BD93F9",
|
||||||
|
"cyan": "#8BE9FD",
|
||||||
|
"white": "#BBBBBB",
|
||||||
|
"brightBlack": "#555555",
|
||||||
|
"brightRed": "#FF5555",
|
||||||
|
"brightGreen": "#50FA7B",
|
||||||
|
"brightYellow": "#F1FA8C",
|
||||||
|
"brightBlue": "#BD93F9",
|
||||||
|
"brightCyan": "#8BE9FD",
|
||||||
|
"brightWhite": "#FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Atom",
|
||||||
|
"dark": true,
|
||||||
|
"schema": {
|
||||||
|
"background": "#161719",
|
||||||
|
"foreground": "#C5C8C6",
|
||||||
|
"cursor": "#D0D0D0",
|
||||||
|
"selectionBackground": "#444444",
|
||||||
|
"black": "#000000",
|
||||||
|
"red": "#FD5FF1",
|
||||||
|
"green": "#87C38A",
|
||||||
|
"yellow": "#FFD7B1",
|
||||||
|
"blue": "#85BEFD",
|
||||||
|
"cyan": "#85BEFD",
|
||||||
|
"white": "#E0E0E0",
|
||||||
|
"brightBlack": "#000000",
|
||||||
|
"brightRed": "#FD5FF1",
|
||||||
|
"brightGreen": "#94FA36",
|
||||||
|
"brightYellow": "#F5FFA8",
|
||||||
|
"brightBlue": "#96CBFE",
|
||||||
|
"brightCyan": "#85BEFD",
|
||||||
|
"brightWhite": "#E0E0E0"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "catppuccin-mocha",
|
"name": "catppuccin-mocha",
|
||||||
"dark": true,
|
"dark": true,
|
||||||
@@ -95,54 +143,6 @@
|
|||||||
"brightWhite": "#DCDFE4"
|
"brightWhite": "#DCDFE4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "Dracula",
|
|
||||||
"dark": true,
|
|
||||||
"schema": {
|
|
||||||
"background": "#1E1F29",
|
|
||||||
"foreground": "#F8F8F2",
|
|
||||||
"cursor": "#BBBBBB",
|
|
||||||
"selectionBackground": "#44475A",
|
|
||||||
"black": "#000000",
|
|
||||||
"red": "#FF5555",
|
|
||||||
"green": "#50FA7B",
|
|
||||||
"yellow": "#F1FA8C",
|
|
||||||
"blue": "#BD93F9",
|
|
||||||
"cyan": "#8BE9FD",
|
|
||||||
"white": "#BBBBBB",
|
|
||||||
"brightBlack": "#555555",
|
|
||||||
"brightRed": "#FF5555",
|
|
||||||
"brightGreen": "#50FA7B",
|
|
||||||
"brightYellow": "#F1FA8C",
|
|
||||||
"brightBlue": "#BD93F9",
|
|
||||||
"brightCyan": "#8BE9FD",
|
|
||||||
"brightWhite": "#FFFFFF"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Atom",
|
|
||||||
"dark": true,
|
|
||||||
"schema": {
|
|
||||||
"background": "#161719",
|
|
||||||
"foreground": "#C5C8C6",
|
|
||||||
"cursor": "#D0D0D0",
|
|
||||||
"selectionBackground": "#444444",
|
|
||||||
"black": "#000000",
|
|
||||||
"red": "#FD5FF1",
|
|
||||||
"green": "#87C38A",
|
|
||||||
"yellow": "#FFD7B1",
|
|
||||||
"blue": "#85BEFD",
|
|
||||||
"cyan": "#85BEFD",
|
|
||||||
"white": "#E0E0E0",
|
|
||||||
"brightBlack": "#000000",
|
|
||||||
"brightRed": "#FD5FF1",
|
|
||||||
"brightGreen": "#94FA36",
|
|
||||||
"brightYellow": "#F5FFA8",
|
|
||||||
"brightBlue": "#96CBFE",
|
|
||||||
"brightCyan": "#85BEFD",
|
|
||||||
"brightWhite": "#E0E0E0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "Apple System Colors",
|
"name": "Apple System Colors",
|
||||||
"dark": true,
|
"dark": true,
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ public class TerminalThemeGenerator {
|
|||||||
List<File> files = Files1.listFiles("D:\\idea-project\\iTerm2-Color-Schemes\\vhs");
|
List<File> files = Files1.listFiles("D:\\idea-project\\iTerm2-Color-Schemes\\vhs");
|
||||||
// 过滤的 theme
|
// 过滤的 theme
|
||||||
List<String> schemaFilter = Lists.of(
|
List<String> schemaFilter = Lists.of(
|
||||||
|
"Dracula", "Atom",
|
||||||
"catppuccin-mocha", "MaterialDesignColors",
|
"catppuccin-mocha", "MaterialDesignColors",
|
||||||
"catppuccin-macchiato", "OneHalfDark",
|
"catppuccin-macchiato", "OneHalfDark",
|
||||||
"Dracula", "Atom",
|
|
||||||
"Apple System Colors", "Builtin Tango Light",
|
"Apple System Colors", "Builtin Tango Light",
|
||||||
"Duotone Dark", "BlulocoLight",
|
"Duotone Dark", "BlulocoLight",
|
||||||
"Chester", "CLRS",
|
"Chester", "CLRS",
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
:before-change="s => updateStatus(s as number)" />
|
:before-change="s => updateStatus(s as number)" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<!-- 表单 -->
|
||||||
<a-spin v-show="config.status" :loading="loading" class="config-form-wrapper">
|
<a-spin v-show="config.status" :loading="loading" class="config-form-wrapper">
|
||||||
<!-- 表单 -->
|
<!-- 表单 -->
|
||||||
<a-form :model="formModel"
|
<a-form :model="formModel"
|
||||||
@@ -140,16 +141,16 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { FieldRule } from '@arco-design/web-vue';
|
import type { FieldRule } from '@arco-design/web-vue';
|
||||||
import type { HostSshConfig } from './types/const';
|
import type { HostSshConfig } from '../types/const';
|
||||||
import { reactive, ref, watch } from 'vue';
|
import { reactive, ref, watch } from 'vue';
|
||||||
import { updateHostConfigStatus, updateHostConfig } from '@/api/asset/host-config';
|
import { updateHostConfigStatus, updateHostConfig } from '@/api/asset/host-config';
|
||||||
import { sshAuthTypeKey, sshOsTypeKey, SshAuthType, SshOsType } from './types/const';
|
import { sshAuthTypeKey, sshOsTypeKey, SshAuthType, SshOsType } from '../types/const';
|
||||||
import rules from './types/form.rules';
|
import rules from '../types/ssh-form.rules';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import { useDictStore } from '@/store';
|
import { useDictStore } from '@/store';
|
||||||
import { EnabledStatus } from '@/types/const';
|
import { EnabledStatus } from '@/types/const';
|
||||||
import { HostConfigType } from '../../../types/const';
|
import { HostConfigType } from '../types/const';
|
||||||
import HostKeySelector from '@/components/asset/host-key/selector/index.vue';
|
import HostKeySelector from '@/components/asset/host-key/selector/index.vue';
|
||||||
import HostIdentitySelector from '@/components/asset/host-identity/selector/index.vue';
|
import HostIdentitySelector from '@/components/asset/host-identity/selector/index.vue';
|
||||||
|
|
||||||
@@ -30,16 +30,15 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { HostConfigWrapper } from '../../types/const';
|
import type { HostConfigWrapper, HostSshConfig } from '../types/const';
|
||||||
import type { HostSshConfig } from './ssh/types/const';
|
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import useVisible from '@/hooks/visible';
|
import useVisible from '@/hooks/visible';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import { getHostConfigList } from '@/api/asset/host-config';
|
import { getHostConfigList } from '@/api/asset/host-config';
|
||||||
import { useCacheStore, useDictStore } from '@/store';
|
import { useCacheStore, useDictStore } from '@/store';
|
||||||
import { dictKeys } from './ssh/types/const';
|
import { dictKeys } from '../types/const';
|
||||||
import SshConfigForm from './ssh/ssh-config-form.vue';
|
import SshConfigForm from '../components/ssh-config-form.vue';
|
||||||
|
|
||||||
const { visible, setVisible } = useVisible();
|
const { visible, setVisible } = useVisible();
|
||||||
const { loading, setLoading } = useLoading();
|
const { loading, setLoading } = useLoading();
|
||||||
@@ -1,3 +1,10 @@
|
|||||||
|
// 主机所有配置
|
||||||
|
export interface HostConfigWrapper {
|
||||||
|
ssh: HostSshConfig;
|
||||||
|
|
||||||
|
[key: string]: unknown;
|
||||||
|
}
|
||||||
|
|
||||||
// 主机 SSH 配置
|
// 主机 SSH 配置
|
||||||
export interface HostSshConfig {
|
export interface HostSshConfig {
|
||||||
osType?: string;
|
osType?: string;
|
||||||
@@ -31,6 +38,11 @@ export const SshOsType = {
|
|||||||
WINDOWS: 'WINDOWS',
|
WINDOWS: 'WINDOWS',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 主机配置类型
|
||||||
|
export const HostConfigType = {
|
||||||
|
SSH: 'ssh'
|
||||||
|
};
|
||||||
|
|
||||||
// 主机验证方式 字典项
|
// 主机验证方式 字典项
|
||||||
export const sshAuthTypeKey = 'hostSshAuthType';
|
export const sshAuthTypeKey = 'hostSshAuthType';
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
import { useCacheStore } from '@/store';
|
import { useCacheStore } from '@/store';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import { updateHostGroupRel } from '@/api/asset/host-group';
|
import { updateHostGroupRel } from '@/api/asset/host-group';
|
||||||
import HostTransfer from './host-transfer.vue';
|
import HostTransfer from '../components/host-transfer.vue';
|
||||||
import HostGroupTree from '@/components/asset/host-group/tree/index.vue';
|
import HostGroupTree from '@/components/asset/host-group/tree/index.vue';
|
||||||
|
|
||||||
const { visible, setVisible } = useVisible();
|
const { visible, setVisible } = useVisible();
|
||||||
@@ -37,8 +37,8 @@
|
|||||||
import HostTable from './components/host-table.vue';
|
import HostTable from './components/host-table.vue';
|
||||||
import HostCardList from './components/host-card-list.vue';
|
import HostCardList from './components/host-card-list.vue';
|
||||||
import HostFormModal from './components/host-form-modal.vue';
|
import HostFormModal from './components/host-form-modal.vue';
|
||||||
import HostConfigDrawer from './components/config/host-config-drawer.vue';
|
import HostConfigDrawer from '../host-config/drawer/index.vue';
|
||||||
import HostGroupDrawer from './components/group/host-group-drawer.vue';
|
import HostGroupDrawer from '../host-group/drawer/index.vue';
|
||||||
|
|
||||||
const table = ref();
|
const table = ref();
|
||||||
const card = ref();
|
const card = ref();
|
||||||
|
|||||||
@@ -1,17 +1,3 @@
|
|||||||
import type { HostSshConfig } from '../components/config/ssh/types/const';
|
|
||||||
|
|
||||||
// 主机所有配置
|
|
||||||
export interface HostConfigWrapper {
|
|
||||||
ssh: HostSshConfig;
|
|
||||||
|
|
||||||
[key: string]: unknown;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 主机配置类型
|
|
||||||
export const HostConfigType = {
|
|
||||||
SSH: 'ssh'
|
|
||||||
};
|
|
||||||
|
|
||||||
// tag 颜色
|
// tag 颜色
|
||||||
export const tagColor = [
|
export const tagColor = [
|
||||||
'arcoblue',
|
'arcoblue',
|
||||||
|
|||||||
Reference in New Issue
Block a user