Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
122b568cf5 | ||
|
|
8b97c02d15 | ||
|
|
dcfb016ce5 | ||
|
|
c842de9e23 |
@@ -1,17 +1,17 @@
|
||||
version: '3.3'
|
||||
services:
|
||||
orion-visor-service:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:2.1.1
|
||||
service:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:2.1.2
|
||||
privileged: true
|
||||
ports:
|
||||
- 1081:80
|
||||
environment:
|
||||
- MYSQL_HOST=orion-visor-mysql
|
||||
- MYSQL_HOST=mysql
|
||||
- MYSQL_PORT=3306
|
||||
- MYSQL_DATABASE=orion_visor
|
||||
- MYSQL_USER=root
|
||||
- MYSQL_PASSWORD=Data@123456
|
||||
- REDIS_HOST=orion-visor-redis
|
||||
- REDIS_HOST=redis
|
||||
- REDIS_PASSWORD=Data@123456
|
||||
- SECRET_KEY=uQeacXV8b3isvKLK
|
||||
- DEMO_MODE=false
|
||||
@@ -24,15 +24,15 @@ services:
|
||||
retries: 200
|
||||
start_period: 3s
|
||||
depends_on:
|
||||
orion-visor-mysql:
|
||||
mysql:
|
||||
condition: service_healthy
|
||||
orion-visor-redis:
|
||||
redis:
|
||||
condition: service_healthy
|
||||
links:
|
||||
- orion-visor-mysql
|
||||
- orion-visor-redis
|
||||
orion-visor-mysql:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:2.1.1
|
||||
- mysql
|
||||
- redis
|
||||
mysql:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:2.1.2
|
||||
privileged: true
|
||||
ports:
|
||||
- 3307:3306
|
||||
@@ -51,8 +51,8 @@ services:
|
||||
timeout: 60s
|
||||
retries: 10
|
||||
start_period: 3s
|
||||
orion-visor-redis:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:2.1.1
|
||||
redis:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:2.1.2
|
||||
privileged: true
|
||||
ports:
|
||||
- 6380:6379
|
||||
@@ -71,9 +71,9 @@ services:
|
||||
build:
|
||||
context: ./docker/e2e
|
||||
environment:
|
||||
SERVER: http://orion-visor-service:80
|
||||
SERVER: http://service:80
|
||||
depends_on:
|
||||
orion-visor-service:
|
||||
service:
|
||||
condition: service_healthy
|
||||
links:
|
||||
- orion-visor-service
|
||||
- service
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
version: '3.3'
|
||||
services:
|
||||
orion-visor-service:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:2.1.1
|
||||
service:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:2.1.2
|
||||
privileged: true
|
||||
ports:
|
||||
- 1081:80
|
||||
environment:
|
||||
- MYSQL_HOST=orion-visor-mysql
|
||||
- MYSQL_HOST=mysql
|
||||
- MYSQL_PORT=3306
|
||||
- MYSQL_DATABASE=orion_visor
|
||||
- MYSQL_USER=root
|
||||
- MYSQL_PASSWORD=Data@123456
|
||||
- REDIS_HOST=orion-visor-redis
|
||||
- REDIS_HOST=redis
|
||||
- REDIS_PASSWORD=Data@123456
|
||||
- SECRET_KEY=uQeacXV8b3isvKLK
|
||||
- DEMO_MODE=false
|
||||
@@ -24,15 +24,15 @@ services:
|
||||
retries: 200
|
||||
start_period: 3s
|
||||
depends_on:
|
||||
orion-visor-mysql:
|
||||
mysql:
|
||||
condition: service_healthy
|
||||
orion-visor-redis:
|
||||
redis:
|
||||
condition: service_healthy
|
||||
links:
|
||||
- orion-visor-mysql
|
||||
- orion-visor-redis
|
||||
orion-visor-mysql:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:2.1.1
|
||||
- mysql
|
||||
- redis
|
||||
mysql:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:2.1.2
|
||||
privileged: true
|
||||
ports:
|
||||
- 3307:3306
|
||||
@@ -51,8 +51,8 @@ services:
|
||||
timeout: 60s
|
||||
retries: 10
|
||||
start_period: 3s
|
||||
orion-visor-redis:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:2.1.1
|
||||
redis:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:2.1.2
|
||||
privileged: true
|
||||
ports:
|
||||
- 6380:6379
|
||||
@@ -67,7 +67,12 @@ services:
|
||||
timeout: 60s
|
||||
retries: 10
|
||||
start_period: 3s
|
||||
orion-visor-adminer:
|
||||
image: adminer
|
||||
adminer:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-adminer:2.1.2
|
||||
ports:
|
||||
- 8081:8080
|
||||
depends_on:
|
||||
mysql:
|
||||
condition: service_healthy
|
||||
links:
|
||||
- mysql
|
||||
|
||||
1
docker/adminer/Dockerfile
Normal file
1
docker/adminer/Dockerfile
Normal file
@@ -0,0 +1 @@
|
||||
FROM adminer:latest
|
||||
5
docker/adminer/build.sh
Normal file
5
docker/adminer/build.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#/bin/bash
|
||||
version=2.1.2
|
||||
docker build -t orion-visor-adminer:${version} .
|
||||
docker tag orion-visor-adminer:${version} registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-adminer:${version}
|
||||
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-adminer:${version}
|
||||
@@ -1,5 +1,5 @@
|
||||
#/bin/bash
|
||||
version=2.1.1
|
||||
version=2.1.2
|
||||
cp -r ../../sql ./sql
|
||||
docker build -t orion-visor-mysql:${version} .
|
||||
rm -rf ./sql
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#/bin/bash
|
||||
version=2.1.1
|
||||
version=2.1.2
|
||||
docker build -t orion-visor-redis:${version} .
|
||||
docker tag orion-visor-redis:${version} registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:${version}
|
||||
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:${version}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#/bin/bash
|
||||
version=2.1.1
|
||||
version=2.1.2
|
||||
mv ../../orion-visor-launch/target/orion-visor-launch.jar ./orion-visor-launch.jar
|
||||
mv ../../orion-visor-ui/dist ./dist
|
||||
docker build -t orion-visor-service:${version} .
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<url>https://github.com/dromara/orion-visor</url>
|
||||
|
||||
<properties>
|
||||
<revision>2.1.1</revision>
|
||||
<revision>2.1.2</revision>
|
||||
<spring.boot.version>2.7.17</spring.boot.version>
|
||||
<spring.boot.admin.version>2.7.15</spring.boot.admin.version>
|
||||
<flatten.maven.plugin.version>1.5.0</flatten.maven.plugin.version>
|
||||
|
||||
@@ -14,7 +14,7 @@ public interface AppConst extends OrionConst {
|
||||
/**
|
||||
* 同 ${orion.version} 迭代时候需要手动更改
|
||||
*/
|
||||
String VERSION = "2.1.1";
|
||||
String VERSION = "2.1.2";
|
||||
|
||||
/**
|
||||
* 同 ${spring.application.name}
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { ${vue.featureEntity}QueryRequest, ${vue.featureEntity}QueryResponse } from '@/api/${vue.module}/${vue.feature}';
|
||||
import { usePagination, useColLayout } from '@/types/card';
|
||||
import { useCardPagination, useCardColLayout } from '@/hooks/card';
|
||||
import { computed, reactive, ref, onMounted } from 'vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { objectTruthKeyCount, resetObject } from '@/utils';
|
||||
@@ -136,8 +136,8 @@
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate']);
|
||||
|
||||
const cardColLayout = useColLayout();
|
||||
const pagination = usePagination();
|
||||
const cardColLayout = useCardColLayout();
|
||||
const pagination = useCardPagination();
|
||||
const { loading, setLoading } = useLoading();
|
||||
#if($dictMap.entrySet().size() > 0)
|
||||
const { toOptions, getDictValue } = useDictStore();
|
||||
|
||||
@@ -151,9 +151,9 @@
|
||||
import {} from '../types/const';
|
||||
#end
|
||||
#if($vue.enableRowSelection)
|
||||
import { usePagination, useRowSelection } from '@/types/table';
|
||||
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
#else
|
||||
import { usePagination } from '@/types/table';
|
||||
import { useTablePagination } from '@/hooks/table';
|
||||
#end
|
||||
#if($dictMap.entrySet().size() > 0)
|
||||
import { useDictStore } from '@/store';
|
||||
@@ -161,7 +161,7 @@
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
#if($vue.enableRowSelection)
|
||||
const rowSelection = useRowSelection();
|
||||
#end
|
||||
|
||||
@@ -85,6 +85,8 @@ public class DataPermissionServiceImpl implements DataPermissionService {
|
||||
.eq(DataPermissionDO::getRoleId, roleId)
|
||||
.eq(DataPermissionDO::getType, type);
|
||||
dataPermissionDAO.delete(wrapper);
|
||||
// 删除缓存
|
||||
this.deleteCache(type, userId, roleId);
|
||||
if (Lists.isEmpty(request.getRelIdList())) {
|
||||
return;
|
||||
}
|
||||
@@ -100,8 +102,6 @@ public class DataPermissionServiceImpl implements DataPermissionService {
|
||||
.build())
|
||||
.collect(Collectors.toList());
|
||||
dataPermissionDAO.insertBatch(records);
|
||||
// 删除缓存
|
||||
this.deleteCache(type, userId, roleId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
VITE_API_BASE_URL= 'http://127.0.0.1:9200/orion-visor/api'
|
||||
VITE_WS_BASE_URL= 'ws://127.0.0.1:9200/orion-visor/keep-alive'
|
||||
VITE_APP_VERSION= '2.1.1'
|
||||
VITE_APP_VERSION= '2.1.2'
|
||||
VITE_APP_RELEASE= 'community'
|
||||
VITE_SFTP_PREVIEW_MB= 2
|
||||
VITE_DEMO_MODE= false
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
VITE_API_BASE_URL= '/orion-visor/api'
|
||||
VITE_WS_BASE_URL= '/orion-visor/keep-alive'
|
||||
VITE_APP_VERSION= '2.1.1'
|
||||
VITE_APP_VERSION= '2.1.2'
|
||||
VITE_APP_RELEASE= 'community'
|
||||
VITE_SFTP_PREVIEW_MB= 2
|
||||
VITE_DEMO_MODE= false
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "orion-visor-ui",
|
||||
"description": "Orion Visor UI",
|
||||
"version": "2.1.1",
|
||||
"version": "2.1.2",
|
||||
"private": true,
|
||||
"author": "Jiahang Li",
|
||||
"license": "Apache 2.0",
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
import type { HostQueryResponse } from '@/api/asset/host';
|
||||
import { dataColor } from '@/utils';
|
||||
import { tagColor } from '@/views/asset/host-list/types/const';
|
||||
import { useRowSelection } from '@/types/table';
|
||||
import { useRowSelection } from '@/hooks/table';
|
||||
import columns from '../types/table.columns';
|
||||
import { computed } from 'vue';
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
<script lang="ts" setup>
|
||||
import type { ExecTemplateQueryRequest, ExecTemplateQueryResponse } from '@/api/exec/exec-template';
|
||||
import { reactive, ref } from 'vue';
|
||||
import { usePagination } from '@/types/table';
|
||||
import { useTablePagination } from '@/hooks/table';
|
||||
import useVisible from '@/hooks/visible';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { copy } from '@/hooks/copy';
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
const { visible, setVisible } = useVisible();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
|
||||
const tableRenderData = ref<ExecTemplateQueryResponse[]>([]);
|
||||
const formModel = reactive<ExecTemplateQueryRequest>({
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
import useLoading from '@/hooks/loading';
|
||||
import useVisible from '@/hooks/visible';
|
||||
import { getHistoryValuePage } from '@/api/meta/history-value';
|
||||
import { usePagination } from '@/types/table';
|
||||
import { useTablePagination } from '@/hooks/table';
|
||||
import { copy } from '@/hooks/copy';
|
||||
import columns from './table.columns';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
@@ -96,7 +96,7 @@
|
||||
}>();
|
||||
const emits = defineEmits(['updated']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const { visible, setVisible } = useVisible();
|
||||
const { loading, setLoading } = useLoading();
|
||||
|
||||
|
||||
35
orion-visor-ui/src/hooks/card.ts
Normal file
35
orion-visor-ui/src/hooks/card.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import type { PaginationProps } from '@arco-design/web-vue';
|
||||
import type { ColResponsiveValue } from '@/types/card';
|
||||
import { reactive } from 'vue';
|
||||
import { isNumber } from '@/utils/is';
|
||||
import { useAppStore } from '@/store';
|
||||
import { CardPageSizeOptions } from '@/types/const';
|
||||
|
||||
/**
|
||||
* 创建卡片列表列布局
|
||||
*/
|
||||
export const useCardColLayout = (): ColResponsiveValue => {
|
||||
return reactive({
|
||||
xs: 24,
|
||||
sm: 12,
|
||||
md: 8,
|
||||
lg: 8,
|
||||
xl: 8,
|
||||
xxl: 6,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 创建创建卡片列表分页
|
||||
*/
|
||||
export const useCardPagination = (): PaginationProps => {
|
||||
const appStore = useAppStore();
|
||||
return reactive({
|
||||
total: 0,
|
||||
current: 1,
|
||||
pageSize: isNumber(appStore.defaultCardPageSize) ? appStore.defaultCardPageSize : CardPageSizeOptions[0],
|
||||
showTotal: true,
|
||||
showPageSize: true,
|
||||
pageSizeOptions: CardPageSizeOptions
|
||||
});
|
||||
};
|
||||
@@ -8,7 +8,7 @@ import { TablePageSizeOptions } from '@/types/const';
|
||||
/**
|
||||
* 创建列表分页
|
||||
*/
|
||||
export const usePagination = (ext?: PaginationProps): PaginationProps => {
|
||||
export const useTablePagination = (ext?: PaginationProps): PaginationProps => {
|
||||
const appStore = useAppStore();
|
||||
return reactive({
|
||||
total: 0,
|
||||
@@ -1,9 +1,5 @@
|
||||
import type { PaginationProps, ResponsiveValue } from '@arco-design/web-vue';
|
||||
import type { ResponsiveValue } from '@arco-design/web-vue';
|
||||
import type { VNodeChild } from 'vue';
|
||||
import { reactive } from 'vue';
|
||||
import { useAppStore } from '@/store';
|
||||
import { isNumber } from '@/utils/is';
|
||||
import { CardPageSizeOptions } from '@/types/const';
|
||||
|
||||
/**
|
||||
* 字段对齐方式
|
||||
@@ -88,32 +84,3 @@ export interface HandleVisible {
|
||||
disableSearch?: boolean;
|
||||
disableReset?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建卡片列表列布局
|
||||
*/
|
||||
export const useColLayout = (): ColResponsiveValue => {
|
||||
return {
|
||||
xs: 24,
|
||||
sm: 12,
|
||||
md: 8,
|
||||
lg: 8,
|
||||
xl: 8,
|
||||
xxl: 6,
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* 创建创建卡片列表分页
|
||||
*/
|
||||
export const usePagination = (): PaginationProps => {
|
||||
const appStore = useAppStore();
|
||||
return reactive({
|
||||
total: 0,
|
||||
current: 1,
|
||||
pageSize: isNumber(appStore.defaultCardPageSize) ? appStore.defaultCardPageSize : CardPageSizeOptions[0],
|
||||
showTotal: true,
|
||||
showPageSize: true,
|
||||
pageSizeOptions: CardPageSizeOptions
|
||||
});
|
||||
};
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
import { reactive, ref, onMounted } from 'vue';
|
||||
import { deleteHostConnectLog, getHostConnectLogPage, hostForceOffline } from '@/api/asset/host-connect-log';
|
||||
import { connectStatusKey, connectTypeKey, HostConnectStatus } from '../types/const';
|
||||
import { usePagination, useRowSelection } from '@/types/table';
|
||||
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
import { useDictStore } from '@/store';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import columns from '../types/table.columns';
|
||||
@@ -215,7 +215,7 @@
|
||||
|
||||
const emits = defineEmits(['openClear', 'openDetail']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { toOptions, getDictValue } = useDictStore();
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
import { reactive, ref, onMounted } from 'vue';
|
||||
import { getHostSftpLogPage, deleteHostSftpLog } from '@/api/asset/host-sftp';
|
||||
import { sftpOperatorTypeKey, sftpOperatorResultKey, SftpOperatorType, showPathMaxCount } from '../types/const';
|
||||
import { usePagination, useRowSelection } from '@/types/table';
|
||||
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
import { useDictStore } from '@/store';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import columns from '../types/table.columns';
|
||||
@@ -198,7 +198,7 @@
|
||||
import UserSelector from '@/components/user/user/selector/index.vue';
|
||||
import HostSelector from '@/components/asset/host/selector/index.vue';
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { toOptions, getDictValue } = useDictStore();
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
import type { HostKeyQueryResponse } from '@/api/asset/host-key';
|
||||
import { ref, onMounted } from 'vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { useRowSelection } from '@/types/table';
|
||||
import { useRowSelection } from '@/hooks/table';
|
||||
import { getAuthorizedHostIdentity, grantHostIdentity } from '@/api/asset/asset-data-grant';
|
||||
import { useCacheStore, useDictStore } from '@/store';
|
||||
import { hostIdentityColumns } from '../types/table.columns';
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { getAuthorizedHostKey, grantHostKey } from '@/api/asset/asset-data-grant';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { useRowSelection } from '@/types/table';
|
||||
import { useRowSelection } from '@/hooks/table';
|
||||
import { useCacheStore } from '@/store';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import { hostKeyColumns } from '../types/table.columns';
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { HostIdentityQueryRequest, HostIdentityQueryResponse } from '@/api/asset/host-identity';
|
||||
import { usePagination, useColLayout } from '@/types/card';
|
||||
import { useCardPagination, useCardColLayout } from '@/hooks/card';
|
||||
import { computed, reactive, ref, onMounted } from 'vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { objectTruthKeyCount, resetObject } from '@/utils';
|
||||
@@ -164,8 +164,8 @@
|
||||
|
||||
const list = ref<HostIdentityQueryResponse[]>([]);
|
||||
|
||||
const cardColLayout = useColLayout();
|
||||
const pagination = usePagination();
|
||||
const cardColLayout = useCardColLayout();
|
||||
const pagination = useCardPagination();
|
||||
const { toOptions, getDictValue } = useDictStore();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { hasAnyPermission } = usePermission();
|
||||
|
||||
@@ -183,14 +183,14 @@
|
||||
import usePermission from '@/hooks/permission';
|
||||
import { copy } from '@/hooks/copy';
|
||||
import { useDictStore } from '@/store';
|
||||
import { usePagination, useRowSelection } from '@/types/table';
|
||||
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
import { GrantKey, GrantRouteName } from '@/views/asset/grant/types/const';
|
||||
import { IdentityType, identityTypeKey } from '../types/const';
|
||||
import HostKeySelector from '@/components/asset/host-key/selector/index.vue';
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openKeyView']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { toOptions, getDictValue } = useDictStore();
|
||||
const { loading, setLoading } = useLoading();
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { HostKeyQueryRequest, HostKeyQueryResponse } from '@/api/asset/host-key';
|
||||
import { usePagination, useColLayout } from '@/types/card';
|
||||
import { useCardPagination, useCardColLayout } from '@/hooks/card';
|
||||
import { reactive, ref, onMounted } from 'vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { resetObject } from '@/utils';
|
||||
@@ -94,8 +94,8 @@
|
||||
|
||||
const list = ref<HostKeyQueryResponse[]>([]);
|
||||
|
||||
const cardColLayout = useColLayout();
|
||||
const pagination = usePagination();
|
||||
const cardColLayout = useCardColLayout();
|
||||
const pagination = useCardPagination();
|
||||
const { loading, setLoading } = useLoading();
|
||||
|
||||
const formModel = reactive<HostKeyQueryRequest>({
|
||||
|
||||
@@ -137,12 +137,12 @@
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import columns from '../types/table.columns';
|
||||
import { usePagination, useRowSelection } from '@/types/table';
|
||||
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
import { GrantKey, GrantRouteName } from '@/views/asset/grant/types/const';
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openView']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { loading, setLoading } = useLoading();
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { HostQueryRequest, HostQueryResponse } from '@/api/asset/host';
|
||||
import { usePagination, useColLayout } from '@/types/card';
|
||||
import { useCardPagination, useCardColLayout } from '@/hooks/card';
|
||||
import { computed, reactive, ref, onMounted } from 'vue';
|
||||
import { dataColor, objectTruthKeyCount, resetObject } from '@/utils';
|
||||
import { deleteHost, getHostPage, updateHostStatus } from '@/api/asset/host';
|
||||
@@ -211,8 +211,8 @@
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openUpdateConfig', 'openHostGroup', 'openCopy']);
|
||||
|
||||
const cardColLayout = useColLayout();
|
||||
const pagination = usePagination();
|
||||
const cardColLayout = useCardColLayout();
|
||||
const pagination = useCardPagination();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { toOptions, getDictValue, toggleDictValue, toggleDict } = useDictStore();
|
||||
|
||||
|
||||
@@ -240,7 +240,7 @@
|
||||
import { deleteHost, batchDeleteHost, getHostPage, updateHostStatus } from '@/api/asset/host';
|
||||
import { Message, Modal } from '@arco-design/web-vue';
|
||||
import { tagColor, hostTypeKey, hostStatusKey } from '../types/const';
|
||||
import { usePagination, useRowSelection } from '@/types/table';
|
||||
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
import { useDictStore } from '@/store';
|
||||
import { copy } from '@/hooks/copy';
|
||||
import { dataColor } from '@/utils';
|
||||
@@ -251,7 +251,7 @@
|
||||
|
||||
const emits = defineEmits(['openCopy', 'openAdd', 'openUpdate', 'openUpdateConfig', 'openHostGroup']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { toOptions, getDictValue, toggleDictValue, toggleDict } = useDictStore();
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
import columns from '../types/host-table.columns';
|
||||
import { execHostStatusKey, execHostStatus } from '@/components/exec/log/const';
|
||||
import { useDictStore } from '@/store';
|
||||
import { useExpandable } from '@/types/table';
|
||||
import { useExpandable } from '@/hooks/table';
|
||||
import { dateFormat, formatDuration } from '@/utils';
|
||||
import { downloadExecCommandLogFile, interruptHostExecCommand } from '@/api/exec/exec-command-log';
|
||||
import { copy } from '@/hooks/copy';
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
import useLoading from '@/hooks/loading';
|
||||
import columns from '../types/table.columns';
|
||||
import { execStatus, execStatusKey } from '@/components/exec/log/const';
|
||||
import { useExpandable, usePagination, useRowSelection } from '@/types/table';
|
||||
import { useExpandable, useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
import { useDictStore } from '@/store';
|
||||
import { dateFormat, formatDuration } from '@/utils';
|
||||
import { reExecCommand } from '@/api/exec/exec-command';
|
||||
@@ -230,7 +230,7 @@
|
||||
|
||||
const emits = defineEmits(['viewCommand', 'viewParams', 'viewLog', 'openClear']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const expandable = useExpandable();
|
||||
const { loading, setLoading } = useLoading();
|
||||
|
||||
@@ -133,12 +133,12 @@
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import columns from '../types/table.columns';
|
||||
import { usePagination, useRowSelection } from '@/types/table';
|
||||
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
import { copy } from '@/hooks/copy';
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openExec']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { loading, setLoading } = useLoading();
|
||||
|
||||
|
||||
@@ -187,14 +187,14 @@
|
||||
import useLoading from '@/hooks/loading';
|
||||
import columns from '../types/table.columns';
|
||||
import { UploadTaskStatus, uploadTaskStatusKey } from '../types/const';
|
||||
import { usePagination, useRowSelection } from '@/types/table';
|
||||
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
import { useDictStore } from '@/store';
|
||||
import { copy } from '@/hooks/copy';
|
||||
import UserSelector from '@/components/user/user/selector/index.vue';
|
||||
|
||||
const emits = defineEmits(['openClear']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { toOptions, getDictValue } = useDictStore();
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
import type { SftpFile, ISftpSession } from '../../types/define';
|
||||
import type { VNodeRef } from 'vue';
|
||||
import { ref, computed, watch, inject } from 'vue';
|
||||
import { useRowSelection } from '@/types/table';
|
||||
import { useRowSelection } from '@/hooks/table';
|
||||
import { dateFormat } from '@/utils';
|
||||
import { setAutoFocus } from '@/utils/dom';
|
||||
import { copy } from '@/hooks/copy';
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
import { useDictStore } from '@/store';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import columns from '@/views/exec/exec-command-log/types/host-table.columns';
|
||||
import { useExpandable } from '@/types/table';
|
||||
import { useExpandable } from '@/hooks/table';
|
||||
import { dateFormat, formatDuration } from '@/utils';
|
||||
import { downloadExecJobLogFile } from '@/api/job/exec-job-log';
|
||||
import { copy } from '@/hooks/copy';
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
import useLoading from '@/hooks/loading';
|
||||
import columns from '../types/table.columns';
|
||||
import { execStatus, execStatusKey } from '@/components/exec/log/const';
|
||||
import { useExpandable, usePagination, useRowSelection } from '@/types/table';
|
||||
import { useExpandable, useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
import { useDictStore } from '@/store';
|
||||
import { dateFormat, formatDuration } from '@/utils';
|
||||
import { interruptExecJob } from '@/api/job/exec-job-log';
|
||||
@@ -211,7 +211,7 @@
|
||||
|
||||
const emits = defineEmits(['viewCommand', 'viewParams', 'viewLog', 'openClear']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const expandable = useExpandable();
|
||||
const { loading, setLoading } = useLoading();
|
||||
|
||||
@@ -197,14 +197,14 @@
|
||||
import useLoading from '@/hooks/loading';
|
||||
import columns from '../types/table.columns';
|
||||
import { ExecJobStatus, execJobStatusKey, execStatusKey } from '../types/const';
|
||||
import { usePagination, useRowSelection } from '@/types/table';
|
||||
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
import { useDictStore } from '@/store';
|
||||
import { copy } from '@/hooks/copy';
|
||||
import { dateFormat } from '@/utils';
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openDetail', 'testCron']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { hasPermission } = usePermission();
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import columns from '../types/table.columns';
|
||||
import { usePagination, useRowSelection } from '@/types/table';
|
||||
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
import { dictValueTypeKey } from '../types/const';
|
||||
import { copy } from '@/hooks/copy';
|
||||
import { useCacheStore, useDictStore } from '@/store';
|
||||
@@ -173,7 +173,7 @@
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openView']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { toOptions, getDictValue } = useDictStore();
|
||||
|
||||
@@ -140,13 +140,13 @@
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import columns from '../types/table.columns';
|
||||
import { usePagination, useRowSelection } from '@/types/table';
|
||||
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
import { copy } from '@/hooks/copy';
|
||||
import DictKeySelector from '@/components/system/dict-key/selector/index.vue';
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openHistory']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { loading, setLoading } = useLoading();
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
import { getLogDetail } from '../types/const';
|
||||
import { copy } from '@/hooks/copy';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { usePagination } from '@/types/table';
|
||||
import { useTablePagination } from '@/hooks/table';
|
||||
import { useDictStore } from '@/store';
|
||||
import { getOperatorLogPage } from '@/api/user/operator-log';
|
||||
import { getCurrentUserOperatorLog } from '@/api/user/mine';
|
||||
@@ -95,7 +95,7 @@
|
||||
},
|
||||
});
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { getDictValue } = useDictStore();
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
import columns from '../types/table.columns';
|
||||
import { copy } from '@/hooks/copy';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { usePagination, useRowSelection } from '@/types/table';
|
||||
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
import { useDictStore } from '@/store';
|
||||
import { getOperatorLogPage, deleteOperatorLog } from '@/api/user/operator-log';
|
||||
import { replaceHtmlTag, clearHtmlTag } from '@/utils';
|
||||
@@ -141,7 +141,7 @@
|
||||
|
||||
const emits = defineEmits(['openClear', 'openDetail']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { getDictValue } = useDictStore();
|
||||
|
||||
@@ -137,14 +137,14 @@
|
||||
import useLoading from '@/hooks/loading';
|
||||
import columns from '../types/table.columns';
|
||||
import { RoleStatus, roleStatusKey } from '../types/const';
|
||||
import { usePagination } from '@/types/table';
|
||||
import { useTablePagination } from '@/hooks/table';
|
||||
import usePermission from '@/hooks/permission';
|
||||
import { useDictStore } from '@/store';
|
||||
import { AdminRoleCode } from '@/types/const';
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openGrant']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const { hasPermission } = usePermission();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { toOptions, getDictValue } = useDictStore();
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
import columns from '../types/table.columns';
|
||||
import { userStatusKey, UserStatus } from '../types/const';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { usePagination, useRowSelection } from '@/types/table';
|
||||
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
import usePermission from '@/hooks/permission';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useDictStore, useUserStore } from '@/store';
|
||||
@@ -188,7 +188,7 @@
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openResetPassword', 'openGrantRole']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { hasPermission } = usePermission();
|
||||
const { loading, setLoading } = useLoading();
|
||||
|
||||
2
pom.xml
2
pom.xml
@@ -22,7 +22,7 @@
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<revision>2.1.1</revision>
|
||||
<revision>2.1.2</revision>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<maven.surefire.plugin.version>3.0.0-M5</maven.surefire.plugin.version>
|
||||
|
||||
@@ -411,9 +411,13 @@ DROP TABLE IF EXISTS `host`;
|
||||
CREATE TABLE `host`
|
||||
(
|
||||
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`type` char(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主机类型',
|
||||
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主机名称',
|
||||
`code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主机编码',
|
||||
`address` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主机地址',
|
||||
`port` int(0) NULL DEFAULT NULL COMMENT '主机端口',
|
||||
`status` char(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主机状态',
|
||||
`config` json NULL COMMENT '主机配置',
|
||||
`create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
|
||||
`creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||
@@ -426,31 +430,6 @@ CREATE TABLE `host`
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '主机'
|
||||
ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for host_config
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `host_config`;
|
||||
CREATE TABLE `host_config`
|
||||
(
|
||||
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`host_id` bigint(0) NULL DEFAULT NULL COMMENT '主机id',
|
||||
`type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '配置类型',
|
||||
`status` tinyint(0) NULL DEFAULT 1 COMMENT '状态 0停用 1启用',
|
||||
`config` json NULL COMMENT '配置详情',
|
||||
`version` int(0) NULL DEFAULT 0 COMMENT '配置版本号',
|
||||
`create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
|
||||
`creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||
`updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '更新人',
|
||||
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '是否删除 0未删除 1已删除',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_host_type` (`host_id`, `type`) USING BTREE
|
||||
) ENGINE = InnoDB
|
||||
AUTO_INCREMENT = 1
|
||||
CHARACTER SET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '主机配置'
|
||||
ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for host_connect_log
|
||||
-- ----------------------------
|
||||
|
||||
Reference in New Issue
Block a user