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