Skip to content

Commit

Permalink
Merge pull request #46 from dromara/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
lijiahangmax authored Jul 29, 2024
2 parents 1b2753a + 8b97c02 commit 122b568
Show file tree
Hide file tree
Showing 47 changed files with 149 additions and 157 deletions.
30 changes: 15 additions & 15 deletions docker-compose-testing.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
33 changes: 19 additions & 14 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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 change: 1 addition & 0 deletions docker/adminer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM adminer:latest
5 changes: 5 additions & 0 deletions docker/adminer/build.sh
Original file line number Diff line number Diff line change
@@ -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}
2 changes: 1 addition & 1 deletion docker/mysql/build.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker/redis/build.sh
Original file line number Diff line number Diff line change
@@ -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}
2 changes: 1 addition & 1 deletion docker/service/build.sh
Original file line number Diff line number Diff line change
@@ -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} .
Expand Down
2 changes: 1 addition & 1 deletion orion-visor-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public interface AppConst extends OrionConst {
/**
* 同 ${orion.version} 迭代时候需要手动更改
*/
String VERSION = "2.1.1";
String VERSION = "2.1.2";

/**
* 同 ${spring.application.name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,17 +151,17 @@
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';
#end

const emits = defineEmits(['openAdd', 'openUpdate']);

const pagination = usePagination();
const pagination = useTablePagination();
#if($vue.enableRowSelection)
const rowSelection = useRowSelection();
#end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ public void updateDataPermission(DataPermissionUpdateRequest request) {
.eq(DataPermissionDO::getRoleId, roleId)
.eq(DataPermissionDO::getType, type);
dataPermissionDAO.delete(wrapper);
// 删除缓存
this.deleteCache(type, userId, roleId);
if (Lists.isEmpty(request.getRelIdList())) {
return;
}
Expand All @@ -100,8 +102,6 @@ public void updateDataPermission(DataPermissionUpdateRequest request) {
.build())
.collect(Collectors.toList());
dataPermissionDAO.insertBatch(records);
// 删除缓存
this.deleteCache(type, userId, roleId);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion orion-visor-ui/.env.development
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion orion-visor-ui/.env.production
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion orion-visor-ui/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
4 changes: 2 additions & 2 deletions orion-visor-ui/src/components/exec/template/modal/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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>({
Expand Down
4 changes: 2 additions & 2 deletions orion-visor-ui/src/components/meta/history/modal/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -96,7 +96,7 @@
}>();
const emits = defineEmits(['updated']);
const pagination = usePagination();
const pagination = useTablePagination();
const { visible, setVisible } = useVisible();
const { loading, setLoading } = useLoading();
Expand Down
35 changes: 35 additions & 0 deletions orion-visor-ui/src/hooks/card.ts
Original file line number Diff line number Diff line change
@@ -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
});
};
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading

0 comments on commit 122b568

Please sign in to comment.