Skip to content

Commit

Permalink
Merge pull request #44 from dromara/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
lijiahangmax authored Jul 26, 2024
2 parents b421755 + 29b44b8 commit 1b2753a
Show file tree
Hide file tree
Showing 56 changed files with 208 additions and 177 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

* 🔗 演示地址: http://101.43.254.243:1081/
* 🔏 演示账号: admin/admin
* ⭐ 体验后可以点一下 `star` 这对我很重要! [github](https://github.com/dromara/orion-visor) [gitee](https://gitee.com/dromara/orion-visor) [gitcode](https://gitcode.com/qq_41011894/orion-visor/overview)
* ⭐ 体验后可以点一下 `star` 这对我很重要! [github](https://github.com/dromara/orion-visor) [gitee](https://gitee.com/dromara/orion-visor) [gitcode](https://gitcode.com/dromara/orion-visor/overview)
* 🌈 如果本项目对你有帮助请帮忙推广一下 让更多的人知道此项目!
* 🎭 演示环境部分功能不可用, 完整功能请本地部署!
* 📛 演示环境请不要随便删除数据!
Expand Down
6 changes: 3 additions & 3 deletions docker-compose-testing.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.3'
services:
orion-visor-service:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:2.1.0
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:2.1.1
privileged: true
ports:
- 1081:80
Expand Down Expand Up @@ -32,7 +32,7 @@ services:
- orion-visor-mysql
- orion-visor-redis
orion-visor-mysql:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:2.1.0
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:2.1.1
privileged: true
ports:
- 3307:3306
Expand All @@ -52,7 +52,7 @@ services:
retries: 10
start_period: 3s
orion-visor-redis:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:2.1.0
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:2.1.1
privileged: true
ports:
- 6380:6379
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.3'
services:
orion-visor-service:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:2.1.0
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:2.1.1
privileged: true
ports:
- 1081:80
Expand Down Expand Up @@ -32,7 +32,7 @@ services:
- orion-visor-mysql
- orion-visor-redis
orion-visor-mysql:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:2.1.0
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:2.1.1
privileged: true
ports:
- 3307:3306
Expand All @@ -52,7 +52,7 @@ services:
retries: 10
start_period: 3s
orion-visor-redis:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:2.1.0
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:2.1.1
privileged: true
ports:
- 6380:6379
Expand Down
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.0
version=2.1.1
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.0
version=2.1.1
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.0
version=2.1.1
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.0</revision>
<revision>2.1.1</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.0";
String VERSION = "2.1.1";

/**
* 同 ${spring.application.name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@
:data="tableRenderData"
:pagination="pagination"
:bordered="false"
@page-change="(page) => fetchTableData(page, pagination.pageSize)"
@page-size-change="(size) => fetchTableData(1, size)">
@page-change="(page: number) => fetchTableData(page, pagination.pageSize)"
@page-size-change="(size: number) => fetchTableData(1, size)">
#foreach($field in ${table.fields})
#if(${dictMap.containsKey(${field.propertyName})})
<!-- $field.comment -->
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.0'
VITE_APP_VERSION= '2.1.1'
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.0'
VITE_APP_VERSION= '2.1.1'
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.0",
"version": "2.1.1",
"private": true,
"author": "Jiahang Li",
"license": "Apache 2.0",
Expand Down
2 changes: 1 addition & 1 deletion orion-visor-ui/src/components/app/navbar/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
</template>
</a-button>
</a-tooltip>
<a-dropdown trigger="click" @select="s => changeLocale(s as string)">
<a-dropdown trigger="click" @select="(s: string) => changeLocale(s)">
<div ref="localeRef" class="trigger-btn" />
<template #content>
<a-doption v-for="item in locales"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
:checkable="checkable"
:check-strictly="true"
@drop="moveGroup"
@select="(s) => emits('onSelected', s)">
@select="(s: any) => emits('onSelected', s)">
<!-- 标题 -->
<template #title="node">
<!-- 修改名称输入框 -->
Expand Down
5 changes: 0 additions & 5 deletions orion-visor-ui/src/components/exec/log/panel-modal/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,6 @@
align-items: center;
}
}
.exec-host-items {
width: 100%;
height: calc(100% - 38px);
}
}
:deep(.log-header) {
Expand Down
54 changes: 31 additions & 23 deletions orion-visor-ui/src/components/exec/log/panel/exec-host.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,26 @@
</div>
<!-- 主机列表 -->
<div class="exec-host-items">
<div v-for="item in hosts"
:key="item.id"
class="exec-host-item"
:class="[ current === item.id ? 'exec-host-item-selected' : '' ]"
@click="emits('selected', item.id)">
<!-- 主机名称 -->
<div class="exec-host-item-name">
<span class="host-name">{{ item.hostName }}</span>
<span class="host-address">{{ item.hostAddress }}</span>
<a-scrollbar>
<div v-for="(item, index) in hosts"
:key="item.id"
class="exec-host-item"
:class="[ current === item.id ? 'exec-host-item-selected' : '' ]"
:style="{ marginBottom: index === hosts.length -1 ? 0 : '8px' }"
@click="emits('selected', item.id)">
<!-- 主机名称 -->
<div class="exec-host-item-name">
<span class="host-name">{{ item.hostName }}</span>
<span class="host-address">{{ item.hostAddress }}</span>
</div>
<!-- 状态 -->
<div class="exec-host-item-status">
<a-tag :color="getDictValue(execHostStatusKey, item.status, 'execColor')">
{{ getDictValue(execHostStatusKey, item.status) }}
</a-tag>
</div>
</div>
<!-- 状态 -->
<div class="exec-host-item-status">
<a-tag :color="getDictValue(execHostStatusKey, item.status, 'execColor')">
{{ getDictValue(execHostStatusKey, item.status) }}
</a-tag>
</div>
</div>
</a-scrollbar>
</div>
</div>
</template>
Expand Down Expand Up @@ -78,13 +81,19 @@
}
.exec-host-items {
position: absolute;
width: calc(100% - 32px);
height: calc(100% - 68px);
overflow: auto;
position: relative;
width: 100%;
height: calc(100% - 38px);
:deep(.arco-scrollbar) {
position: absolute;
width: 100%;
height: 100%;
&::-webkit-scrollbar-track {
display: none;
&-container {
height: 100%;
overflow-y: auto;
}
}
}
Expand All @@ -99,7 +108,6 @@
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
background: var(--color-fill-2);
transition: all .2s;
user-select: none;
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 @@ -51,8 +51,8 @@
:pagination="pagination"
:bordered="false"
:scroll="{ x: '100%', y: '60vh' }"
@page-change="(page) => fetchTableData(page, pagination.pageSize)"
@page-size-change="(size) => fetchTableData(1, size)">
@page-change="(page: number) => fetchTableData(page, pagination.pageSize)"
@page-size-change="(size: number) => fetchTableData(1, size)">
<!-- 模板名称 -->
<template #name="{ record }">
<span class="span-blue">{{ record.name }}</span>
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 @@ -34,8 +34,8 @@
:data="tableRenderData"
:pagination="pagination"
:bordered="false"
@page-change="(page) => fetchTableData(page, pagination.pageSize)"
@page-size-change="(size) => fetchTableData(1, size)">
@page-change="(page: number) => fetchTableData(page, pagination.pageSize)"
@page-size-change="(size: number) => fetchTableData(1, size)">
<!-- 修改前 -->
<template #beforeValue="{ record }">
<span class="copy-left"
Expand Down
4 changes: 2 additions & 2 deletions orion-visor-ui/src/components/system/menu/tree/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<!-- 一级菜单 -->
<a-menu-item v-if="!menu.children?.length"
:key="menu.name"
@click="(e) => goto(e, menu)">
@click="(e: any) => goto(e, menu)">
<!-- 图标 -->
<template #icon>
<component v-if="menu.meta?.icon" :is="menu.meta?.icon" />
Expand All @@ -34,7 +34,7 @@
<!-- 子菜单 -->
<a-menu-item v-for="child in menu.children"
:key="child.name"
@click="(e) => goto(e, child)">
@click="(e: any) => goto(e, child)">
<!-- 图标 -->
<template #icon v-if="child.meta?.icon">
<component :is="child.meta?.icon" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
v-model:page-size="(pagination as any).pageSize"
v-bind="pagination as any"
:auto-adjust="false"
@change="page => bubblesEmitter(HeaderEmitter.PAGE_CHANGE, page, (pagination as any).pageSize)"
@page-size-change="limit => bubblesEmitter(HeaderEmitter.PAGE_CHANGE, 1, limit)" />
@change="(page: number) => bubblesEmitter(HeaderEmitter.PAGE_CHANGE, page, (pagination as any).pageSize)"
@page-size-change="(limit: number) => bubblesEmitter(HeaderEmitter.PAGE_CHANGE, 1, limit)" />
</div>
</div>
<!-- 操作部分 -->
Expand Down Expand Up @@ -48,8 +48,8 @@
:placeholder="searchInputPlaceholder as string"
size="small"
allow-clear
@input="(e) => bubblesEmitter(HeaderEmitter.UPDATE_SEARCH_VALUE, e)"
@change="(e) => bubblesEmitter(HeaderEmitter.UPDATE_SEARCH_VALUE, e)"
@input="(e: string) => bubblesEmitter(HeaderEmitter.UPDATE_SEARCH_VALUE, e)"
@change="(e: string) => bubblesEmitter(HeaderEmitter.UPDATE_SEARCH_VALUE, e)"
@keyup.enter="bubblesEmitter(HeaderEmitter.SEARCH)" />
</div>
<!-- 过滤条件 -->
Expand Down
10 changes: 1 addition & 9 deletions orion-visor-ui/src/store/modules/cache/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { CacheState } from './types';
import type { CacheState, CacheType } from './types';
import type { AxiosResponse } from 'axios';
import type { TagType } from '@/api/meta/tag';
import { getTagList } from '@/api/meta/tag';
Expand All @@ -19,14 +19,6 @@ import { getCommandSnippetGroupList } from '@/api/asset/command-snippet-group';
import { getExecJobList } from '@/api/job/exec-job';
import { getPathBookmarkGroupList } from '@/api/asset/path-bookmark-group';

export type CacheType = 'users' | 'menus' | 'roles'
| 'hostGroups' | 'hostKeys' | 'hostIdentities'
| 'dictKeys'
| 'authorizedHostKeys' | 'authorizedHostIdentities'
| 'commandSnippetGroups' | 'pathBookmarkGroups'
| 'execJob'
| string

export default defineStore('cache', {
state: (): CacheState => ({}),

Expand Down
29 changes: 9 additions & 20 deletions orion-visor-ui/src/store/modules/cache/types.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
import type { UserQueryResponse } from '@/api/user/user';
import type { MenuQueryResponse } from '@/api/system/menu';
import type { RoleQueryResponse } from '@/api/user/role';
import type { HostQueryResponse } from '@/api/asset/host';
import type { HostGroupQueryResponse } from '@/api/asset/host-group';
import type { HostKeyQueryResponse } from '@/api/asset/host-key';
import type { HostIdentityQueryResponse } from '@/api/asset/host-identity';
import type { DictKeyQueryResponse } from '@/api/system/dict-key';
// 缓存类型
export type CacheType = 'users' | 'menus' | 'roles'
| 'hostGroups' | 'hostKeys' | 'hostIdentities'
| 'dictKeys'
| 'authorizedHostKeys' | 'authorizedHostIdentities'
| 'commandSnippetGroups' | 'pathBookmarkGroups'
| 'execJob'
| string

export interface CacheState {
users?: UserQueryResponse[];
menus?: MenuQueryResponse[];
roles?: RoleQueryResponse[];
hosts?: HostQueryResponse[];
hostGroups?: HostGroupQueryResponse[];
hostKeys?: HostKeyQueryResponse[];
hostIdentities?: HostIdentityQueryResponse[];
dictKeys?: DictKeyQueryResponse[];
authorizedHostKeys?: HostKeyQueryResponse[];
authorizedHostIdentities?: HostIdentityQueryResponse[];

[key: string]: unknown;
[key: CacheType]: unknown;
}
2 changes: 1 addition & 1 deletion orion-visor-ui/src/store/modules/menu/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { RouteMeta, RouteRecordNormalized } from 'vue-router';
import type { MenuState } from './types';
import type { MenuQueryResponse } from '@/api/system/menu';
import router from '@/router';
import { defineStore } from 'pinia';
import { Notification } from '@arco-design/web-vue';
import { getMenuList } from '@/api/user/auth';
import router from '@/router';
import { EnabledStatus } from '@/types/const';

export default defineStore('menu', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@
:data="tableRenderData"
:pagination="pagination"
:bordered="false"
@page-change="(page) => fetchTableData(page, pagination.pageSize)"
@page-size-change="(size) => fetchTableData(1, size)">
@page-change="(page: number) => fetchTableData(page, pagination.pageSize)"
@page-size-change="(size: number) => fetchTableData(1, size)">
<!-- 连接用户 -->
<template #username="{ record }">
{{ record.username }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@
:data="tableRenderData"
:pagination="pagination"
:bordered="false"
@page-change="(page) => fetchTableData(page, pagination.pageSize)"
@page-size-change="(size) => fetchTableData(1, size)">
@page-change="(page: number) => fetchTableData(page, pagination.pageSize)"
@page-size-change="(size: number) => fetchTableData(1, size)">
<!-- 操作用户 -->
<template #username="{ record }">
{{ record.username }}
Expand Down
Loading

0 comments on commit 1b2753a

Please sign in to comment.