Compare commits

..

424 Commits

Author SHA1 Message Date
“huailei000”
ee55cebf0e fix: 修复临时密码提示翻译 2022-04-29 10:53:55 +08:00
ibuler
2e5096f386 perf: 修改 build 2022-04-29 10:53:55 +08:00
feng626
bf57ee8910 fix: 开放platform 权限 2022-04-29 10:38:44 +08:00
feng626
f86f08f2b6 Merge pull request #1713 from jumpserver/pr@v2.21@workbench_orgs
fix: myorgs -> workbench_orgs
2022-04-25 11:36:57 +08:00
feng626
6eb429823d fix: myorgs -> workbench_orgs 2022-04-25 11:34:37 +08:00
feng626
d6be84026c Merge pull request #1711 from jumpserver/pr@v2.21@fix_temporary_password_text
fix: 修改临时密码提示文案
2022-04-25 11:05:26 +08:00
“huailei000”
4a7680ec7a fix: 修改临时密码提示文案 2022-04-25 03:00:15 +00:00
Jiangjie.Bai
4fd8956b0d Merge pull request #1707 from jumpserver/dev
v2.21.0
2022-04-21 18:10:49 +08:00
ibuler
9d75e2e6fd perf: 修改 组织 2022-04-21 17:38:17 +08:00
ibuler
6317400da8 perf: 去掉 reload 2022-04-21 17:38:17 +08:00
fit2bot
7f963e9991 perf: 修改 view 切换 (#1705)
* perf: 修改 view 切换

* fix: 修改 view 跳转 bug

* perf:去掉 reload

Co-authored-by: ibuler <ibuler@qq.com>
2022-04-21 17:23:58 +08:00
“huailei000”
8a731937cf fix: 修复用户列表批量更新弹窗组件不重新渲染问题 2022-04-21 17:01:57 +08:00
fit2bot
a593da7fea perf: 修改 cookie get (#1703)
Co-authored-by: ibuler <ibuler@qq.com>
2022-04-21 15:52:39 +08:00
fit2bot
b9547214b7 perf: view switch 默认值 (#1702)
* perf: view switch 默认值

* perf: 去掉冗余

Co-authored-by: ibuler <ibuler@qq.com>
2022-04-21 13:59:58 +08:00
fit2bot
0e7b60a001 fix: 切换视图的问题,修复组织切换的问题 (#1701)
* fix: 切换视图的问题,修复组织切换的问题

* perf: 优化写法

Co-authored-by: ibuler <ibuler@qq.com>
2022-04-21 11:07:56 +08:00
Jiangjie.Bai
20f84db466 Merge pull request #1700 from jumpserver/dev
v2.21.0-rc6
2022-04-20 20:26:24 +08:00
“huailei000”
c5495d9846 fix: 修复会话录像时间1秒显示问题 2022-04-20 20:22:18 +08:00
ibuler
332cd2c073 perf: 修改 org 2022-04-20 19:54:52 +08:00
“huailei000”
2b4d827789 fix: dashboard页面在线用户文案修改为 连接用户 2022-04-20 19:54:29 +08:00
“huailei000”
92144e4f69 fix: 修复移动端搜索框不对齐问题 2022-04-20 17:58:43 +08:00
“huailei000”
41d42c04a6 fix: 修复用户列表批量移除权限位 2022-04-20 17:58:11 +08:00
“huailei000”
f4f42639aa fix: 导入弹框权限根据路由自动判断 2022-04-20 17:57:45 +08:00
“huailei000”
a37af9ed7d fix: 修复命令记录跳转去权限 2022-04-20 16:49:30 +08:00
Jiangjie.Bai
1f0fe18533 fix: 修改系统设置-终端设置创建权限控制 2022-04-20 16:49:01 +08:00
feng626
bc21d7ac17 Merge pull request #1694 from jumpserver/pr@dev@add_orgrolebinding
fix: 修复角色添加用户权限问题
2022-04-20 15:48:35 +08:00
feng626
922ecbf096 fix: 修复角色添加用户权限问题 2022-04-20 15:47:23 +08:00
fit2bot
a162a206bc perf: 修改 tickets orgs (#1691)
* perf: 修改 tickets orgs

* perf: 修改 orgs 切换

Co-authored-by: ibuler <ibuler@qq.com>
2022-04-20 15:27:04 +08:00
fit2bot
12a85da6f7 fix: 修复点击资产授权树勾选框报错的问题 (#1687)
* fix: 修复点击资产授权树勾选狂报错的问题

* fix: 修复点击资产授权树勾选狂报错的问题

Co-authored-by: Jiangjie.Bai <bugatti_it@163.com>
2022-04-20 11:32:25 +08:00
Jiangjie.Bai
585f5e04d6 Merge pull request #1686 from jumpserver/dev
v2.21.0-rc5
2022-04-19 21:59:27 +08:00
feng626
6db90fce09 perf: add org remind 2022-04-19 21:56:18 +08:00
Jiangjie.Bai
69e392b069 fix: 请求设置默认org_id 2022-04-19 20:23:57 +08:00
“huailei000”
e5b2bd7008 fix: 修复会话详情页button 按钮权限位控制 2022-04-19 20:19:00 +08:00
Jiangjie.Bai
c6aaaaf1fd perf: 优化临时密码route控制 2022-04-19 20:18:37 +08:00
“huailei000”
1ab6ed6109 fix: 修复用户详情页按钮权限 2022-04-19 20:18:08 +08:00
“huailei000”
c17d983b2f fix: 修复应用改密计划详情页执行列表操作权限 2022-04-19 20:17:38 +08:00
Jiangjie.Bai
484fb63577 fix: 修复ldap同步interval必填 2022-04-19 18:29:28 +08:00
Jiangjie.Bai
2c8d8c6e66 fix: 修复ldap同步interval必填 2022-04-19 18:29:28 +08:00
Jiangjie.Bai
5577051416 fix: 修改日期搜索默认8天内 2022-04-19 17:45:13 +08:00
“huailei000”
cd51596d45 fix: 恢复资产列表展示字段 2022-04-19 16:18:15 +08:00
Jiangjie.Bai
dd5b805da9 feat: 添加配置项 KoKo SSH Client 方式 2022-04-19 16:17:09 +08:00
ibuler
54097f07be perf: 修改 view orgs 2022-04-19 13:21:22 +08:00
老广
ef5c1b2e23 Merge pull request #1674 from jumpserver/dev
v2.21.0-rc5
2022-04-19 13:15:38 +08:00
ibuler
f104376e92 perf: 优化一些写法 2022-04-19 10:20:41 +08:00
fit2bot
62ed11e7ec perf: 修改用户所属的 org (#1662)
* perf: 修改用户所属的 org

* perf: 修改组织问题

* perf: 修改优化 nav 切换

* perf: 修改 org id

* perf: 修改验证逻辑

* perf: 修改 orgs

Co-authored-by: ibuler <ibuler@qq.com>
2022-04-18 20:20:32 +08:00
“huailei000”
3fd8e23c2c fix: 修改站内信文案为全部已读;调整布局遮挡问题 2022-04-18 16:48:41 +08:00
Jiangjie.Bai
a93ecac15c fix: 修改云任务执行权限控制 2022-04-18 16:05:33 +08:00
Jiangjie.Bai
1fb75fbce0 Merge pull request #1668 from jumpserver/dev
v2.21.0-rc4
2022-04-18 15:34:13 +08:00
“huailei000”
1d594fc594 fix: 修复dialog组件不能关闭问题 2022-04-18 15:33:12 +08:00
“huailei000”
a4abe63ec9 fix: 修复资产列表显示空白字段问题 2022-04-18 15:32:23 +08:00
“huailei000”
4262410038 fix: 内部的message通知使用v-html显示 2022-04-18 15:31:34 +08:00
Jiangjie.Bai
2735d638a2 Merge pull request #1664 from jumpserver/dev
v2.21.0-rc3
2022-04-18 11:44:56 +08:00
Jiangjie.Bai
f9bade6a7c feat: 控制临时密码菜单 2022-04-18 11:32:42 +08:00
Jiangjie.Bai
eaf3c5b013 feat: 设置SessionCookieNamePrefix 2022-04-15 21:14:48 +08:00
“huailei000”
2c2e7d10f9 feat: 增加列表查看、复制组件 2022-04-15 20:06:51 +08:00
Jiangjie.Bai
9243a6699c fix: 系统监控添加Magnus 2022-04-15 16:40:08 +08:00
Jiangjie.Bai
e9a2818580 Merge pull request #1656 from jumpserver/dev
v2.21.0-rc2
2022-04-14 18:40:55 +08:00
feng626
4b318c0aaf Merge pull request #1655 from jumpserver/pr@dev@site_msg
feat: 站内信一键已读
2022-04-14 12:18:29 +08:00
feng626
e9211205cb feat: 站内信一键已读 2022-04-14 11:59:36 +08:00
Jiangjie.Bai
e14a31f31c Merge pull request #1654 from jumpserver/dev
v2.21.0-rc1
2022-04-13 20:31:57 +08:00
jiangweidong
b85db6b73f feat: temp password 2022-04-13 20:09:45 +08:00
jiangweidong
6d8dc058cb feat: 支持临时密码 (one-time-password) 登录 2022-04-13 20:09:45 +08:00
jiangweidong
2b3090b44c feat: 支持资产授权和应用授权的批量更新 2022-04-13 16:53:56 +08:00
“huailei000”
f08b3708d4 fix: 修复更多按钮样式 2022-04-13 14:48:58 +08:00
fit2bot
a8a7538655 feat: 添加Endpoint (#1651)
* feat: 添加Endpoint页面

* feat: 添加Endpoint Rule页面

* feat: 获取connect-url连接地址

* feat: 删除配置KOKO、XRDP、MAGNUS

* feat: 修改翻译

* feat: 修改默认endpoint不能删除

Co-authored-by: Jiangjie.Bai <bugatti_it@163.com>
2022-04-12 19:28:42 +08:00
fit2bot
364f2aaf12 perf: 修改翻译 (#1650)
* perf: 修改 workspace

* perf: 修改翻译

Co-authored-by: ibuler <ibuler@qq.com>
Co-authored-by: Jiangjie.Bai <32935519+BaiJiangJie@users.noreply.github.com>
2022-04-12 13:52:21 +08:00
“huailei000”
dcb87c6216 perf: 调整table列表-操作内容居中显示 2022-04-11 17:06:57 +08:00
“huailei000”
06bd68a874 fix: 概览页显示模块位置调整,增加公告显示;修复概览页跳转权限判断 2022-04-11 15:00:53 +08:00
feng626
4a2b663220 fix: 修复消息订阅无法更新bug 2022-04-08 16:05:34 +08:00
“huailei000”
59342b65c8 fix: 修复终端管理-批量更新弹窗不显示label问题 2022-04-08 15:14:08 +08:00
jiangweidong
4edd9097ab feat: 云同步支持京东云 2022-04-07 11:28:41 +08:00
“huailei000”
6e10f4ccc1 fix: 修复公告对齐展示 2022-04-07 11:25:26 +08:00
“huailei000”
9510dec9e0 fix: 在线会话-命令单行文本省略展示 2022-04-07 11:25:01 +08:00
feng626
31bb679a8e feat: ldap一键导入及设置用户组织 2022-04-06 17:51:31 +08:00
feng626
357b67ffe0 fix: 修改系统用户类型 2022-04-06 14:25:22 +08:00
“huailei000”
07036cdea7 feat: i18n获取浏览器默认语言 2022-04-01 16:28:58 +08:00
一路向北
ec2674a956 Update README.md 2022-04-01 15:24:09 +08:00
“huailei000”
e5791c184d feat: 公告支持换行显示 2022-04-01 15:23:38 +08:00
feng626
bcd0384baa Merge pull request #1622 from jumpserver/pr@dev@koko_setting
feat: koko setting
2022-03-30 19:52:24 +08:00
feng626
461a385596 feat: koko setting 2022-03-30 19:51:05 +08:00
ibuler
0c9440d835 perf: terminal icon 2022-03-30 11:27:01 +08:00
ibuler
9f7c145065 perf: 修改lang 2022-03-29 19:58:33 +08:00
Jiangjie.Bai
05d66c4c4f feat: 改密计划支持su切换用户执行 2022-03-29 16:42:39 +08:00
“huailei000”
c1498d4de5 fix: 修复数据库-创建类型 2022-03-29 14:54:32 +08:00
jiangweidong
34f17beb3c feat: 支持日语 (#1612) 2022-03-28 10:08:53 +08:00
halo
c6f39c79fa perf: 优化长命令记录页面自动换行 2022-03-25 19:40:04 +08:00
ibuler
ae5005ceef feat: 修改 app type 2022-03-25 19:39:29 +08:00
Jiangjie.Bai
dad107d768 Revert "perf:: 修复empty组件为函数式组件"
This reverts commit 8ae14bfb37.
2022-03-25 17:04:25 +08:00
“huailei000”
021dbe6e2e fix:修复资产列表-从节点移除 权限位不准确问题 2022-03-25 14:43:30 +08:00
“huailei000”
8ae14bfb37 perf:: 修复empty组件为函数式组件 2022-03-25 14:42:49 +08:00
“huailei000”
ea2c3f1a11 fix: 修复工单详情detail组件布局问题 2022-03-25 14:38:00 +08:00
“huailei000”
dadeea6d1e perf: 优化日期组件显示遮挡问题 2022-03-22 16:59:21 +08:00
feng626
05e5bcc10d fix: user org perm 2022-03-22 16:58:56 +08:00
ibuler
87d211563f perf: 优化 mongo db 2022-03-22 11:31:06 +08:00
ibuler
6b7f868538 feat: mongodb 支持 2022-03-22 11:31:06 +08:00
ibuler
d3c2d0e7e8 perf: 优化名称显示 2022-03-22 10:52:51 +08:00
“huailei000”
088dbc4e42 fix: 修复系统用户-资产列表按钮权限不准确问题 2022-03-21 19:24:37 +08:00
jiangweidong
18016ffdba feat: 支持百度云资产同步 2022-03-21 19:23:56 +08:00
feng626
b57e65a100 Merge pull request #1599 from jumpserver/pr@dev@asset_user_perm
fix: 修复资产详情中授权用户可查看用户权限
2022-03-21 11:16:49 +08:00
feng626
8852924d45 fix: 修复资产详情中授权用户可查看用户权限 2022-03-21 10:55:27 +08:00
“huailei000”
da1f322e1c fix: 修复apikey权限位问题 2022-03-18 18:16:51 +08:00
“huailei000”
b22b01529a fix: 修复2个tab只给其中一个tab权限接口提示报错问题 2022-03-18 17:15:43 +08:00
Jiangjie.Bai
26ba2c091e fix: 从节点移除资产权限位修改 2022-03-18 17:10:58 +08:00
Jiangjie.Bai
23ee181c63 fix: 修复资产详情系统用户页面权限控制 2022-03-18 16:53:49 +08:00
Jiangjie.Bai
3aca8cdffd fix: 修复工单中会话卡片按钮的权限控制 2022-03-18 16:41:20 +08:00
“huailei000”
b5cd17485e fix: 修复工作台-待我审批权限位问题 2022-03-18 15:11:29 +08:00
Jiangjie.Bai
4db98964dd fix: 修复角色更新、删除权限控制 2022-03-18 14:52:21 +08:00
“huailei000”
3a1870cae1 fix: 修复dashboard页权限位 2022-03-18 12:46:40 +08:00
“huailei000”
c36cc7b15f fix: 修复css样式文件报错 2022-03-18 11:31:06 +08:00
“huailei000”
07b69ab9a8 fix: 修复tab组件没有权限页卡不显示时还会提示接口403问题 2022-03-18 11:22:34 +08:00
fit2bot
222eb4fcb0 perf: 优化详情中各种 box (#1582)
* perf: 优化移动到表单

* perf: 优化详情中各种 box

Co-authored-by: ibuler <ibuler@qq.com>
2022-03-18 11:21:25 +08:00
fit2bot
632dc064d9 perf: 优化手机端 view 切换 (#1583)
* perf: 优化手机端 view 切换

* perf: 优化table 移动端适配

* perf: 优化 pagger overflow

Co-authored-by: ibuler <ibuler@qq.com>
2022-03-18 11:20:18 +08:00
ibuler
cc513c96f5 perf: 优化 form label 位置 2022-03-17 20:31:07 +08:00
ibuler
b3752ba867 perf: 优化详情中btn 2022-03-17 19:52:20 +08:00
ibuler
f18e46ba22 perf: 优化移动端显示 2022-03-17 19:47:16 +08:00
Jiangjie.Bai
ec86037107 Merge pull request #1575 from jumpserver/dev
v2.20.0
2022-03-17 19:24:25 +08:00
“huailei000”
4e9b97700b fix: 修复菜单兼容移动端 2022-03-17 19:09:23 +08:00
ibuler
d189751d67 perf: 修改 table 布局 2022-03-17 18:51:36 +08:00
“huailei000”
6cc04d944b feat: 收集用户-任务执行列表不显示搜索组件 2022-03-17 18:45:32 +08:00
Jiangjie.Bai
35451931b2 fix: 修复工单详情会话卡片按钮权限控制 2022-03-17 18:44:10 +08:00
Jiangjie.Bai
de57c78925 fix: 修复权限依赖 2022-03-17 18:44:10 +08:00
Jiangjie.Bai
96a0d9c5e2 fix: 改密计划权限位 2022-03-17 18:20:52 +08:00
Jiangjie.Bai
977328ff41 fix: 网关测试权限位 2022-03-17 17:59:14 +08:00
Jiangjie.Bai
98c29bb338 fix: 修改工单流程关联工单 2022-03-17 17:59:14 +08:00
Jiangjie.Bai
38c76d0a59 fix: 修复组织创建问题(全局组织);修复资产详情系统用户页面的按钮权限控制 2022-03-17 17:51:29 +08:00
ibuler
c061014d7e perf: 收集用户依赖 2022-03-17 17:24:04 +08:00
Jiangjie.Bai
ca84cb85f4 fix: 修复资产详情授权用户tab页的权限位 2022-03-17 17:23:43 +08:00
Jiangjie.Bai
fc82b4ec30 Merge pull request #1564 from jumpserver/dev
v2.20.0-rc6
2022-03-17 17:08:13 +08:00
Jiangjie.Bai
b3a9c8b8b5 fix: 修改改密计划权限位联动 2022-03-17 17:06:26 +08:00
Jiangjie.Bai
edf09d3260 fix: 修改改密计划权限位联动 2022-03-17 17:06:26 +08:00
fit2bot
fc9b09f5fd perf: 修改 change auth plan (#1561)
* perf: 修改 change auth plan

* perf: 还原

Co-authored-by: ibuler <ibuler@qq.com>
2022-03-17 16:41:00 +08:00
Jiangjie.Bai
79d0144ea0 fix: 创建系统用户su_from必填 2022-03-17 15:22:29 +08:00
Jiangjie.Bai
159e90f48c fix: 资产详情标签加载权限控制 2022-03-17 15:14:45 +08:00
Jiangjie.Bai
3007849abb fix: 修改角色详情中授权用户搜索字段 2022-03-17 15:11:27 +08:00
feng626
e45935ce97 Merge pull request #1557 from jumpserver/pr@dev@view_userapps
fix: view_userapps
2022-03-17 15:04:32 +08:00
feng626
4bef495773 fix: view_userapps 2022-03-17 15:02:36 +08:00
ibuler
e79bd251cb perf: 修改一些bug 2022-03-17 14:55:58 +08:00
Jiangjie.Bai
21c3b1a6cb fix: 修改改密计划路由 2022-03-17 14:55:08 +08:00
feng626
a3653859f8 Merge pull request #1554 from jumpserver/pr@dev@user_match
fix: user match
2022-03-17 14:47:08 +08:00
feng626
fae0104392 fix: user match 2022-03-17 14:44:58 +08:00
Jiangjie.Bai
9ffe34d788 fix: 修改系统用户详情页面权限控制 2022-03-17 14:38:45 +08:00
Jiangjie.Bai
df98ce3a6f fix: 兼容之前的sessiondetail 2022-03-17 14:05:37 +08:00
Jiangjie.Bai
fbed123991 fix: 修复工单详情路由获取 2022-03-17 14:05:37 +08:00
ibuler
51d025b93a perf: 修改创建后的跳转 2022-03-17 12:41:41 +08:00
ibuler
b6004c399c perf: 修改一些依赖 2022-03-17 12:41:41 +08:00
ibuler
2f5e575cb8 perf: 修改批量操作权限 2022-03-17 12:41:41 +08:00
ibuler
c0571bc026 perf: 修改树 2022-03-17 12:41:41 +08:00
“huailei000”
fb9896800a fix: 云同步-同步实例任务执行详情按钮权限控制 2022-03-17 11:51:47 +08:00
Jiangjie.Bai
b63d187f13 fix: 修改组件监控权限控制 2022-03-17 11:51:25 +08:00
Jiangjie.Bai
0f4cb3b916 fix: 去除角色列表搜索项socpe 2022-03-17 11:51:25 +08:00
“huailei000”
09c0647a94 fix: 修复用户列表移除按钮权限位 2022-03-17 11:50:55 +08:00
feng626
7d1e75e4b9 fix: change assetpermission 2022-03-17 11:47:50 +08:00
feng626
df72ced6e8 fix: ticket session bug 2022-03-17 10:42:55 +08:00
Jiangjie.Bai
d794e17f80 Merge pull request #1541 from jumpserver/dev
v2.20.0-rc5
2022-03-16 21:11:54 +08:00
Jiangjie.Bai
39b759661f Merge pull request #1545 from jumpserver/pr@dev@merge_dev
v2.20.0-rc5
2022-03-16 21:11:15 +08:00
fit2bot
14da9fee65 fix: 解决冲突 (#1543)
* chore: 更新Submodule指向

* fix: 修复Build失败的问题

* fix(clone): 修复会话页面产生的clone的问题

* fix: 修复资产授权创建时默认选中了点击的资产和节点问题

修改为指保留最后一次选中的资产或者节点

* fix: 修改命令过滤器添加系统用户协议限制

* fix: 云同步账号详情404

* fix: 修复创建角色成功后跳转详情的问题

* fix: 修复角色详情更新失败的问题

* fix: 删除资产授权刷新缓存接口

* fix: 优化tabmenu默认显示判断

* fix: 修复录像、命令存储权限控制

* perf: 修改订阅,站内信显示禁用 (#1491)

* perf: 修改订阅,站内信显示禁用

* perf: 修改一些 bug

Co-authored-by: ibuler <ibuler@qq.com>

* fix: 修复系统设置终端录像/命令存储创建/更新成功后跳转问题

* fix: 修复会话记录进入详情空白问题

* perf: 修改 tickets 权限

* fix: 修复系统设置终端设置问题

* perf: ticket flow perf

* fix: 修复系统设置终端设置问题

* perf: 优化 perm tree icon

* fix: 修复命令记录列表导出按钮权限

* fix: 修复改密计划-任务列表跳转资产空白页面问题

* fix: 修复终端设置权限依赖关系

* fix: 修复存储测试权限位

* fix: 修复用户列表-授权的应用详情不能点击跳转问题

* fix: 组织管理 详情bug

* fix: 资产树右击菜单

* perf: 优化应用树,统一 dropdown

* perf: 修改 terminal 权限

* fix: 日志审计批量日志过滤资产字段

* fix: 去除change_setting权限位

* fix: 过滤收集用户搜索条件重复问题

* fix: 修复应用改密计划权限控制

* fix: 修复资产管理-平台列表权限位不准确问题

* fix: 修复网管批量删除

* perf: 修复一些bug

* fix: 解决冲突

Co-authored-by: Orange <orangemtony@gmail.com>
Co-authored-by: Jiangjie.Bai <32935519+BaiJiangJie@users.noreply.github.com>
Co-authored-by: 老广 <ibuler@qq.com>
Co-authored-by: Eric_Lee <xplzv@126.com>
Co-authored-by: “怀磊” <2280131253@qq.com>
Co-authored-by: Jiangjie.Bai <bugatti_it@163.com>
Co-authored-by: feng626 <1304903146@qq.com>
2022-03-16 21:01:29 +08:00
Jiangjie.Bai
b1ea8a0b4b fix: 解决冲突 2022-03-16 20:59:56 +08:00
Jiangjie.Bai
25f9a1dd04 fix: 解决冲突 2022-03-16 20:58:04 +08:00
Jiangjie.Bai
f6ee5a7078 fix: 更新资产详情授权用户权限 2022-03-16 20:49:10 +08:00
Jiangjie.Bai
7ab0f5e4b7 fix: 更新用户权限控制 2022-03-16 20:43:05 +08:00
feng626
7e2df6b2eb Merge pull request #1539 from jumpserver/pr@dev@ticket_bug
fix: 修复工单选择org问题
2022-03-16 20:36:41 +08:00
feng626
fdf91c3495 fix: 修复工单选择org问题 2022-03-16 20:31:54 +08:00
fit2bot
96eeda7b4f perf: 修复一些bug (#1538)
* perf: 修改一些翻译

* perf: 修改 权限联动

* perf: 修改消息订阅,站内信默认 check

* perf: 修改 bug

* perf: 修复一些bug

Co-authored-by: ibuler <ibuler@qq.com>
2022-03-16 20:29:57 +08:00
fit2bot
0d39277dae perf: 修改一些翻译 (#1532)
* perf: 修改一些翻译

* perf: 修改 权限联动

* perf: 修改消息订阅,站内信默认 check

* perf: 修改 bug

Co-authored-by: ibuler <ibuler@qq.com>
2022-03-16 20:28:18 +08:00
“huailei000”
59b3deb754 fix: 修复工单详情跳转到命令记录、会话管理权限位;修复跳转之后清楚会话请求 2022-03-16 19:55:14 +08:00
Jiangjie.Bai
3e7ba36f01 fix: 修复终端详情更新权限 2022-03-16 19:33:04 +08:00
feng626
b27a72c295 Merge pull request #1535 from jumpserver/pr@dev@ticketflow
fix: 修复工单流联动
2022-03-16 19:31:11 +08:00
feng626
b5fc2553fe fix: 修复工单流联动 2022-03-16 19:29:46 +08:00
Jiangjie.Bai
f7d528919a fix: 修复adhoc权限 2022-03-16 19:27:03 +08:00
feng626
c1c6592cb2 Merge pull request #1530 from jumpserver/pr@dev@ticket_session
fix: 工单关闭后频繁请求
2022-03-16 19:04:55 +08:00
feng626
e94d95456d Merge pull request #1531 from jumpserver/pr@dev@ticket_touer
fix: ticket bug
2022-03-16 19:04:29 +08:00
feng626
b4201960f9 fix: ticket bug 2022-03-16 19:00:59 +08:00
feng626
fdbde9d010 fix: 工单关闭后频繁请求 2022-03-16 18:23:44 +08:00
fit2bot
796bd11ff7 perf: 修改权限位置 (#1528)
* fix: 修复导入引起的问题

* fix: 修改角色中的用户

* perf: 修改权限位置

* perf: 去掉 debug

Co-authored-by: ibuler <ibuler@qq.com>
2022-03-16 18:16:18 +08:00
Jiangjie.Bai
ba91cdce0d fix: 修复创建k8s系统用户 2022-03-16 18:10:55 +08:00
Jiangjie.Bai
c2b9f0d1dc fix: 修复命令过滤器包含k8s应用 2022-03-16 18:10:36 +08:00
feng626
e62e79e929 fix: 修复用户组详情urlbug 2022-03-16 17:17:03 +08:00
feng626
e181360f27 fix: UserLoginACLDetail title 2022-03-16 17:16:44 +08:00
ibuler
290ac9a6e6 fix: 修改角色中的用户 2022-03-16 17:16:21 +08:00
ibuler
c032dee40c fix: 修复导入引起的问题 2022-03-16 17:16:21 +08:00
feng626
f6bef8d77a fix: ticket perm 2022-03-16 17:15:34 +08:00
Jiangjie.Bai
cea0285523 fix: 修改用户profile更新按钮 2022-03-16 15:39:48 +08:00
Jiangjie.Bai
f44e63db37 fix: 修改工单管理权限位 2022-03-16 14:55:42 +08:00
feng626
09b66476d1 fix: 修复工单命令复合跳转 2022-03-16 14:26:41 +08:00
Jiangjie.Bai
86b5360e0c fix: 修复命令过滤器规则复核人必填 2022-03-16 14:26:18 +08:00
ibuler
2103ccee29 fix: 修复一些 bug 2022-03-16 14:22:37 +08:00
ibuler
500a91914c perf: 修改一些小 bug 2022-03-16 14:22:37 +08:00
ibuler
4ae2f63a88 perf: 修复一些bug 2022-03-15 20:55:43 +08:00
feng626
68999da21f fix: 修复网管批量删除 2022-03-15 20:55:43 +08:00
“huailei000”
b75abba2c1 fix: 修复资产管理-平台列表权限位不准确问题 2022-03-15 20:55:43 +08:00
Jiangjie.Bai
b43328cceb fix: 修复应用改密计划权限控制 2022-03-15 20:55:43 +08:00
“huailei000”
6b54fa8363 fix: 过滤收集用户搜索条件重复问题 2022-03-15 20:55:43 +08:00
Jiangjie.Bai
3a5f427891 fix: 去除change_setting权限位 2022-03-15 20:55:43 +08:00
Jiangjie.Bai
5f1d6bf7f9 fix: 日志审计批量日志过滤资产字段 2022-03-15 20:55:43 +08:00
ibuler
e11e2bfb46 perf: 修改 terminal 权限 2022-03-15 20:55:43 +08:00
ibuler
484b71cbc9 perf: 优化应用树,统一 dropdown 2022-03-15 20:55:43 +08:00
Jiangjie.Bai
7ed866c61f fix: 资产树右击菜单 2022-03-15 20:55:43 +08:00
feng626
daa7de217b fix: 组织管理 详情bug 2022-03-15 20:55:43 +08:00
“huailei000”
f3011a0139 fix: 修复用户列表-授权的应用详情不能点击跳转问题 2022-03-15 20:55:43 +08:00
Jiangjie.Bai
a696048ce8 fix: 修复存储测试权限位 2022-03-15 20:55:43 +08:00
Jiangjie.Bai
15a0bf61fa fix: 修复终端设置权限依赖关系 2022-03-15 20:55:43 +08:00
“huailei000”
90f63c4c45 fix: 修复改密计划-任务列表跳转资产空白页面问题 2022-03-15 20:55:43 +08:00
Jiangjie.Bai
db6e51d077 fix: 修复命令记录列表导出按钮权限 2022-03-15 20:55:43 +08:00
ibuler
f5c25fde74 perf: 优化 perm tree icon 2022-03-15 20:55:43 +08:00
Jiangjie.Bai
87410fd653 fix: 修复系统设置终端设置问题 2022-03-15 20:55:43 +08:00
feng626
1de931ce2a perf: ticket flow perf 2022-03-15 20:55:43 +08:00
Jiangjie.Bai
5bb3e95e23 fix: 修复系统设置终端设置问题 2022-03-15 20:55:43 +08:00
ibuler
f6588a28d9 perf: 修改 tickets 权限 2022-03-15 20:55:43 +08:00
“huailei000”
3ea1fc192a fix: 修复会话记录进入详情空白问题 2022-03-15 20:55:43 +08:00
Jiangjie.Bai
d14cdcf05d fix: 修复系统设置终端录像/命令存储创建/更新成功后跳转问题 2022-03-15 20:55:43 +08:00
fit2bot
d92528ca7c perf: 修改订阅,站内信显示禁用 (#1491)
* perf: 修改订阅,站内信显示禁用

* perf: 修改一些 bug

Co-authored-by: ibuler <ibuler@qq.com>
2022-03-15 20:55:43 +08:00
Jiangjie.Bai
9e55e1145b fix: 修复录像、命令存储权限控制 2022-03-15 20:55:43 +08:00
“huailei000”
666dbce88a fix: 优化tabmenu默认显示判断 2022-03-15 20:55:43 +08:00
feng626
802084a350 fix: 删除资产授权刷新缓存接口 2022-03-15 20:55:43 +08:00
Jiangjie.Bai
408e4d10e8 fix: 修复角色详情更新失败的问题 2022-03-15 20:55:43 +08:00
Jiangjie.Bai
d0504e8970 fix: 修复创建角色成功后跳转详情的问题 2022-03-15 20:55:43 +08:00
Jiangjie.Bai
5f516f1fd1 fix: 云同步账号详情404 2022-03-15 20:55:43 +08:00
Jiangjie.Bai
f804b13b73 fix: 修改命令过滤器添加系统用户协议限制 2022-03-15 20:55:43 +08:00
ibuler
8e4f79fc84 perf: 修复一些bug 2022-03-15 20:55:15 +08:00
feng626
4b76a58b48 Merge pull request #1514 from jumpserver/pr@dev@gateway_del_bulk_update
fix: 修复网管批量删除
2022-03-15 20:46:53 +08:00
feng626
dca4379763 fix: 修复网管批量删除 2022-03-15 20:45:48 +08:00
“huailei000”
167b5df2d8 fix: 修复资产管理-平台列表权限位不准确问题 2022-03-15 20:45:02 +08:00
Jiangjie.Bai
8467a64e9f fix: 修复应用改密计划权限控制 2022-03-15 20:44:29 +08:00
“huailei000”
03431f98c8 fix: 过滤收集用户搜索条件重复问题 2022-03-15 20:24:37 +08:00
Jiangjie.Bai
64591a0ed5 fix: 去除change_setting权限位 2022-03-15 20:24:05 +08:00
Jiangjie.Bai
6f3aea89dd fix: 日志审计批量日志过滤资产字段 2022-03-15 20:17:22 +08:00
ibuler
5730ea8a75 perf: 修改 terminal 权限 2022-03-15 20:08:55 +08:00
ibuler
1282b465f1 perf: 优化应用树,统一 dropdown 2022-03-15 20:08:55 +08:00
Jiangjie.Bai
897e691522 fix: 资产树右击菜单 2022-03-15 20:07:13 +08:00
feng626
57b80ef3fe Merge pull request #1506 from jumpserver/pr@dev@org_detail_del_bug
fix: 组织管理 详情bug
2022-03-15 19:45:55 +08:00
feng626
9ae57dba83 fix: 组织管理 详情bug 2022-03-15 19:44:55 +08:00
“huailei000”
12c17951f5 fix: 修复用户列表-授权的应用详情不能点击跳转问题 2022-03-15 19:40:49 +08:00
Jiangjie.Bai
e9674fd754 fix: 修复存储测试权限位 2022-03-15 19:40:27 +08:00
Jiangjie.Bai
435e324b44 fix: 修复终端设置权限依赖关系 2022-03-15 19:40:04 +08:00
“huailei000”
015209443c fix: 修复改密计划-任务列表跳转资产空白页面问题 2022-03-15 18:45:45 +08:00
Jiangjie.Bai
07c856713a fix: 修复命令记录列表导出按钮权限 2022-03-15 18:45:32 +08:00
ibuler
647065107f perf: 优化 perm tree icon 2022-03-15 18:45:13 +08:00
Jiangjie.Bai
7d98bcd9f5 fix: 修复系统设置终端设置问题 2022-03-15 18:30:43 +08:00
feng626
aafeaa62e4 Merge pull request #1498 from jumpserver/pr@dev@ticket_flow
perf: ticket flow perf
2022-03-15 18:28:31 +08:00
feng626
75aca38fa9 perf: ticket flow perf 2022-03-15 18:26:32 +08:00
Jiangjie.Bai
0a6f6897bf fix: 修复系统设置终端设置问题 2022-03-15 18:20:34 +08:00
ibuler
6b399cb62f perf: 修改 tickets 权限 2022-03-15 18:20:02 +08:00
“huailei000”
4b2d4ab98f fix: 修复会话记录进入详情空白问题 2022-03-15 16:39:07 +08:00
Jiangjie.Bai
105b53e7fa fix: 修复系统设置终端录像/命令存储创建/更新成功后跳转问题 2022-03-15 16:38:32 +08:00
fit2bot
adca72af97 perf: 修改订阅,站内信显示禁用 (#1491)
* perf: 修改订阅,站内信显示禁用

* perf: 修改一些 bug

Co-authored-by: ibuler <ibuler@qq.com>
2022-03-15 16:22:30 +08:00
Jiangjie.Bai
eb8a24a23f fix: 修复录像、命令存储权限控制 2022-03-15 15:42:54 +08:00
“huailei000”
b89fca2af0 fix: 优化tabmenu默认显示判断 2022-03-15 15:28:16 +08:00
feng626
574ec20f18 fix: 删除资产授权刷新缓存接口 2022-03-15 15:24:27 +08:00
Jiangjie.Bai
751b6dcbb5 fix: 修复角色详情更新失败的问题 2022-03-15 14:50:54 +08:00
Jiangjie.Bai
8e887ca271 fix: 修复创建角色成功后跳转详情的问题 2022-03-15 14:50:54 +08:00
Jiangjie.Bai
6f6577b2c8 fix: 云同步账号详情404 2022-03-15 14:19:18 +08:00
Jiangjie.Bai
09ac5be631 fix: 修改命令过滤器添加系统用户协议限制 2022-03-15 13:15:06 +08:00
Jiangjie.Bai
550701a3bc Merge pull request #1482 from jumpserver/dev
v2.20.0-rc3
2022-03-15 11:46:45 +08:00
Jiangjie.Bai
6461a66bc1 fix: 修改列表中字段跳转权限判断 2022-03-15 11:46:24 +08:00
feng626
ebbc5ceb3e fix: asset acl priority required 2022-03-15 11:46:03 +08:00
“huailei000”
9703c335ff fix: 修复收集用户-任务列表权限问题 2022-03-15 11:45:23 +08:00
ibuler
c755f9460f perf: 修复一些权限bug 2022-03-15 11:17:04 +08:00
Jiangjie.Bai
0abf64ad8b fix: 组织详情删除成员tab 2022-03-15 10:52:19 +08:00
“huailei000”
2bf2170088 fix: 修复工单权限位 2022-03-15 10:41:52 +08:00
“huailei000”
df228f5256 fix: 修复作业中心-任务列表路由权限不准确问题 2022-03-15 10:36:54 +08:00
“huailei000”
3ea1353101 fix: 修复资产列表-配置更多信息rbac权限 2022-03-15 10:35:39 +08:00
ibuler
451271fbcf perf: 优化 active menu 2022-03-15 10:35:16 +08:00
Jiangjie.Bai
60df78833c fix: 修复批量命令权限 2022-03-14 20:36:35 +08:00
Jiangjie.Bai
e0fbc57e89 fix: 修复资产改密计划权限控制 2022-03-14 19:13:36 +08:00
feng626
45383bd18e fix: invite user translate 2022-03-14 18:26:05 +08:00
“huailei000”
426724081f fix: 修复更多组件,更新选项重复问题
1、leftSide组件使用_.uniqBy对name相同的选项进行过滤
2、默认使用传入的选项,如果没有穿使用默认的
3、例:组件通过设置name: actionUpdateSelected,重写默认更新选项
2022-03-14 18:25:34 +08:00
ibuler
e598146fa0 perf: default system role 2022-03-14 18:24:10 +08:00
ibuler
d053f6bef7 perf: 修复资产批量 perm 2022-03-14 18:02:28 +08:00
fit2bot
4e0247977b perf: 修改一些 Perm 依赖 (#1468)
Co-authored-by: ibuler <ibuler@qq.com>
Co-authored-by: Jiangjie.Bai <32935519+BaiJiangJie@users.noreply.github.com>
2022-03-14 17:53:47 +08:00
Jiangjie.Bai
d52c624128 fix: 修复更新资产账号权限控制 2022-03-14 17:51:41 +08:00
Jiangjie.Bai
a51edf359b fix: 修复资产/应用账号相关权限 2022-03-14 17:51:41 +08:00
“huailei000”
16f9329869 fix: 修复云同步permissions权限位不生效问题 2022-03-14 16:50:42 +08:00
feng626
326868880e fix: app relation api 2022-03-14 16:49:54 +08:00
“huailei000”
085a18e217 fix: 修复登录复合工单详情不能查看问题 2022-03-14 16:49:22 +08:00
Jiangjie.Bai
aacdb5adb5 fix: 修复页面按钮权限控制(应用账号) 2022-03-14 16:48:13 +08:00
Jiangjie.Bai
8a1556ccdb fix: 修复页面按钮权限控制(资产账号/应用账号) 2022-03-14 16:48:13 +08:00
Jiangjie.Bai
ea435a6c57 fix: 修复页面按钮权限控制(资产账号) 2022-03-14 16:48:13 +08:00
Jiangjie.Bai
e265314b37 Merge pull request #1461 from jumpserver/dev
perf: 修改 perm 依赖
2022-03-14 15:16:20 +08:00
Jiangjie.Bai
cead0fc04b fix: 修改权限树依赖(查看资产账号依赖查看节点) 2022-03-14 15:16:06 +08:00
Jiangjie.Bai
88971327b1 fix: 修改授权显示(工单菜单) 2022-03-14 15:16:06 +08:00
“huailei000”
f15ca7439c fix: 修复用户详情页面报错问题 2022-03-14 15:15:42 +08:00
feng626
fbe2b356fe fix: node perm 2022-03-14 14:43:43 +08:00
“huailei000”
2e3dc366e8 fix: 修复刷新浏览器后页面跳转到404问题 2022-03-14 11:48:42 +08:00
“huailei000”
fe33798972 fix: 修复收集用户权限判断不生效问题 2022-03-14 11:45:49 +08:00
fit2bot
bd028b5bb9 perf: 修改消息订阅 (#1457)
* perf: 修改消息订阅

* perf: 修改一些依赖

Co-authored-by: ibuler <ibuler@qq.com>
2022-03-14 11:17:45 +08:00
Jiangjie.Bai
f467e0e1ab Merge pull request #1456 from jumpserver/dev
v2.20.0-rc2
2022-03-14 10:39:43 +08:00
ibuler
74f997d8f9 perf: 优化依赖 2022-03-14 10:37:05 +08:00
“huailei000”
0e160e2520 fix: 路由不准确重定向到404页面 2022-03-14 10:36:24 +08:00
ibuler
0e34955be1 perf: 去掉 debug 2022-03-11 21:02:06 +08:00
ibuler
74c6981a42 perf: 修改 role perm 联动 2022-03-11 21:02:06 +08:00
Jiangjie.Bai
954d2d9f0e fix: 系统设置移除工单设置 2022-03-11 20:41:15 +08:00
ibuler
f40af3295f perf: 修复角色 clone 2022-03-11 20:40:50 +08:00
ibuler
cc73a74d93 perf: 修改 user detail,修改权限 2022-03-11 20:40:50 +08:00
“huailei000”
a45ab4f197 fix: 修复组织管理创建、删除权限不生效问题;进入详情页报错问题 2022-03-11 20:38:56 +08:00
“huailei000”
3f92156595 fix: 修复云同步权限位不准确问题 2022-03-11 20:38:14 +08:00
“huailei000”
e949623a1d fix: 修复工单权限位问题 2022-03-11 20:37:49 +08:00
feng626
aa5658b078 fix: 邀请用户bug 2022-03-11 19:22:18 +08:00
ibuler
ab99ff3973 perf: 权限树定义依赖联动 2022-03-11 18:42:26 +08:00
老广
1731c70d8e Merge pull request #1442 from jumpserver/dev
v2.20.0-rc1
2022-03-10 20:32:49 +08:00
ibuler
1f7090712b perf: 修改 interface 判断 2022-03-10 20:32:26 +08:00
“huailei000”
a0c5782d5b fix: 修复系统设置-终端设置权限位 2022-03-10 20:19:54 +08:00
fit2bot
be118172e2 perf: 修改路由过滤 (#1443)
* perf: 修改路由过滤

* fix: 去掉 debug

Co-authored-by: ibuler <ibuler@qq.com>
2022-03-10 20:18:58 +08:00
Jiangjie.Bai
a8beac0b7a fix: 修改视图名称 2022-03-10 19:18:48 +08:00
feng626
2b48a3a49a Merge pull request #1440 from jumpserver/pr@dev@workspace
fix: user workspace
2022-03-10 19:14:35 +08:00
feng626
75492c33cc fix: user workspace 2022-03-10 19:12:17 +08:00
“huailei000”
f7e4079523 fix: 修复系统用户详情相关permissions权限 2022-03-10 19:11:05 +08:00
feng626
76d83aa24b Merge pull request #1439 from jumpserver/pr@dev@fix_menu_rbac
fix: 修改菜单rbac权限位
2022-03-10 18:55:18 +08:00
“huailei000”
a3a7a1c7c4 fix: 修改菜单rbac权限位 2022-03-10 18:52:51 +08:00
fit2bot
3c75ab58e4 fix: 修复资产详情中的权限判断 (#1437)
* fix: 修复资产详情中的权限判断

* fix: change

Co-authored-by: ibuler <ibuler@qq.com>
2022-03-10 18:25:39 +08:00
ibuler
5482d6cf83 perf: 修改资产节点创建 2022-03-10 17:48:31 +08:00
“huailei000”
80d109e0ce fix: 修复用户列表权限 2022-03-10 17:48:09 +08:00
feng626
cfdc110bc9 Merge pull request #1435 from jumpserver/pr@dev@fix_assets_cloud_permissions
fix: 修复云同步permissions权限问题
2022-03-10 17:42:11 +08:00
“huailei000”
a6b946ba51 fix: 修复云同步permissions权限问题 2022-03-10 17:39:28 +08:00
feng626
aa62a2c266 Merge pull request #1434 from jumpserver/pr@dev@ticket_add
fix: ticket not create
2022-03-10 17:24:17 +08:00
feng626
7d3321fafe fix: ticket not create 2022-03-10 17:21:39 +08:00
feng626
280217b913 fix: 修复用户详情角色显示bug 2022-03-10 17:13:54 +08:00
“huailei000”
86d3aaa443 fix: 用户列表批量操作添加提示 2022-03-10 17:12:42 +08:00
“huailei000”
ff200aedbc fix: select2组件添加disabled状态判断 2022-03-10 17:12:08 +08:00
Jiangjie.Bai
e575a69f45 revert: 回滚权限树 2022-03-10 15:26:58 +08:00
fit2bot
1f2cda6f63 fix: 修复 asset nodes (#1428)
* perf: 修改 tree nodes

* perf: 去掉 perms

* perf: 修改 perm nodes

Co-authored-by: ibuler <ibuler@qq.com>
2022-03-10 15:14:56 +08:00
Jiangjie.Bai
6f429ef156 fix: 修复role info push id 2022-03-10 13:54:28 +08:00
“huailei000”
acf2d81a8e fix:特权用户的权限和系统用户一样 2022-03-10 11:28:52 +08:00
feng626
930bcab66d Merge pull request #1426 from jumpserver/perf_rbacpermtree
fix: 优化权限树(1)
2022-03-10 11:28:21 +08:00
“huailei000”
cfbd88011a fix: 修复资产授权详情权限显示不准确问题 2022-03-10 11:28:14 +08:00
“huailei000”
d917c0576c fix: 修复用户组进入详情页空白问题 2022-03-10 11:28:14 +08:00
Jiangjie.Bai
98f1dc88ff fix: 优化权限树(1) 2022-03-10 07:00:30 +08:00
“huailei000”
1bf3371a00 fix: select2添加axios参数无权限时不弹出提示 2022-03-09 21:24:56 +08:00
fit2bot
2b984cb456 perf: 修改路由守卫 (#1421)
* perf: 修改路由守卫

* perf: 路由守卫

* perf: 去掉 debug

* perf: 修改img to

* perf: 修改路由

Co-authored-by: ibuler <ibuler@qq.com>
2022-03-09 20:42:36 +08:00
feng626
148f818349 Merge pull request #1420 from jumpserver/pr@dev@admin-user-perm
fix: admin user 按钮权限
2022-03-09 19:18:12 +08:00
feng626
d29b4ee357 fix: admin user 按钮权限 2022-03-09 19:04:21 +08:00
“huailei000”
de8f491832 fix: 修复命令过滤规则权限问题 2022-03-09 18:28:28 +08:00
“huailei000”
75326ae5ab fix: 修复命令过滤perms权限 2022-03-09 18:28:28 +08:00
halo
574fe8b868 feat: 云管中心增加同步实例列表ip字段 2022-03-09 18:06:12 +08:00
feng626
969f0867a0 Merge pull request #1418 from jumpserver/pr@dev@view_setting
fix: 系统设置perm
2022-03-09 18:00:26 +08:00
feng626
9ccb35d329 fix: 系统设置perm 2022-03-09 17:59:23 +08:00
fit2bot
34ac945cb1 fix: 简单修复一下,没有任何权限导致的白屏行为 (#1417)
* fix: 简单修复一下,没有任何权限导致的白屏行为

* perf: 修改路由

* perf: 去掉 index

Co-authored-by: ibuler <ibuler@qq.com>
2022-03-09 17:30:47 +08:00
“huailei000”
d27d0f1e1a fix: 切换组织组件修改判断,有创建或者查看权限时才显示组织管理分组 2022-03-09 17:14:47 +08:00
feng626
c63a4fc672 Merge pull request #1416 from jumpserver/pr@dev@acl_perm
fix: acl perm bug
2022-03-09 16:32:27 +08:00
feng626
1210f8bb18 fix: acl perm bug 2022-03-09 16:31:03 +08:00
“huailei000”
ac34f9de9e fix: 切换组织组件,创建、查看添加权限位控制 2022-03-09 15:37:52 +08:00
“huailei000”
e13a62c206 fix:修复角色列表组件切换数据不准确问题 2022-03-09 15:37:14 +08:00
fit2bot
5897c52268 perf: 优化权限判断 (#1413)
* stash: 暂存 api 权限判断

* perf: 优化列表权限判断,通过 url 来

* perf: 优化权限判断

* perf: remove console

* perf: 还原默认值

* perf: 修改 detail

* perf: 修改路由

* perf: 修改路由

* perf: 修复 table perm

* perf: 修改 home

Co-authored-by: ibuler <ibuler@qq.com>
2022-03-09 15:36:38 +08:00
“huailei000”
833dd305bf feat: 概览页公告添加跳转链接 2022-03-09 14:35:31 +08:00
ibuler
353ab4467b fix: 修复组织切换的问题 2022-03-08 21:13:54 +08:00
feng626
a6c020d8db Merge pull request #1407 from jumpserver/pr@dev@fix_tickets_flow_update_disabled
fix: 修复工单流不能更新问题
2022-03-08 20:33:52 +08:00
feng626
072b880893 Merge pull request #1408 from jumpserver/pr@dev@fix_assets_nopermission_show
fix: 修复资产列表没有权限显示空白menu问题
2022-03-08 20:33:25 +08:00
“huailei000”
0c25dffcce fix: 修复资产列表没有权限显示空白menu问题 2022-03-08 20:11:46 +08:00
“huailei000”
90e6cad407 fix: 修复工单流不能更新问题 2022-03-08 18:56:11 +08:00
“huailei000”
40f331ebfc fix: 修复api key的rbac权限判断 2022-03-08 18:29:23 +08:00
“huailei000”
93d8e6850f fix: 工作台显示切换组织 2022-03-08 17:37:26 +08:00
ibuler
20a91cba24 perf: 联动修改 2022-03-08 17:37:08 +08:00
“huailei000”
5fdf3817ed fix: 修复会话记录详情页的rbac权限判断 2022-03-08 17:36:28 +08:00
“huailei000”
980bb970b6 fix: 修复初始化控制台title报错问题;修复社区版不显示组织管理 2022-03-08 15:29:50 +08:00
“huailei000”
3eb28f5517 fix: 修复云同步点击进入详情页面没有权限问题 2022-03-08 15:13:20 +08:00
“huailei000”
c5c412ccac fix: 修复社区版本判断不准确问题 2022-03-08 15:12:26 +08:00
ibuler
90a1cc8735 perf: perm node 级联选择 2022-03-08 13:49:03 +08:00
ibuler
764096ad1d perf: 优化节点算则 2022-03-08 13:49:03 +08:00
“huailei000”
cf143c8502 fix: 修改概况权限判断页面显示 2022-03-08 11:49:57 +08:00
feng626
740c7a7836 Merge pull request #1397 from jumpserver/pr@dev@perf_ztree_default
perf: 修改 tree check
2022-03-07 20:52:31 +08:00
ibuler
3f6d4606c6 perf: 去掉console 2022-03-07 20:50:00 +08:00
ibuler
381792716b perf: 修改 tree check 2022-03-07 20:43:11 +08:00
feng626
b69b359fc7 Merge pull request #1396 from jumpserver/pr@dev@perf_account_backup
perf: 优化账号备份
2022-03-07 20:15:40 +08:00
ibuler
f2e7cfa5de perf: 优化账号备份 2022-03-07 20:11:06 +08:00
fit2bot
067fdd5993 perf: 修改概览权限判断 (#1395)
* perf: 修改概览权限判断

* perf: 修改路由

Co-authored-by: ibuler <ibuler@qq.com>
2022-03-07 19:55:29 +08:00
“huailei000”
58a7ed3632 fix: 修复云导入perms权限问题;修改名称为云同步 2022-03-07 19:04:44 +08:00
ibuler
23613301d5 perf: 优化工作台菜单 2022-03-07 19:03:45 +08:00
Jiangjie.Bai
dcbeeec964 fix: 修改角色详情 2022-03-07 19:03:03 +08:00
“huailei000”
9f36c18560 fix: MariaDB在社区版开放;替换系统设置-短信设置的布局组件 2022-03-07 17:05:38 +08:00
“huailei000”
d613f5a893 fix: 区分企业版和社区版功能 2022-03-07 16:35:03 +08:00
Jiangjie.Bai
69d963f2a9 fix: 修改角色详情区分系统角色、组织角色;修改邀请用户时的用户名称显示 2022-03-07 15:06:30 +08:00
fit2bot
c93b1a6769 perf: 自动勾选 perm view node (#1388)
Co-authored-by: ibuler <ibuler@qq.com>
2022-03-07 14:43:03 +08:00
“怀磊”
b5008db265 fix: 修复网域列表没有权限也能点击网关跳转问题 2022-03-07 14:21:07 +08:00
feng626
ef228c6442 Merge pull request #1386 from jumpserver/pr@dev@fix_update_role_perms
fix: 修复更新 role perms
2022-03-07 13:29:23 +08:00
ibuler
0730f10e79 fix: 修复更新 role perms 2022-03-07 11:49:07 +08:00
“怀磊”
86dea655a4 fix: 修复会话审计详情页页跳转不成功问题;日志审计perms权限判断问题 2022-03-07 11:33:25 +08:00
Jiangjie.Bai
e14f344b68 fix: 修复创建用户roles必填问题 2022-03-07 11:23:39 +08:00
Jiangjie.Bai
561148521b fix: 修复创建用户roles必填问题 2022-03-07 11:23:39 +08:00
feng626
c8825e52b6 fix: user list perm 2022-03-04 17:59:08 +08:00
“怀磊”
c48e1603b9 fix: 修复系统角色详情-授权用户,不能删除成员问题 2022-03-04 17:18:54 +08:00
“怀磊”
631c03c715 fix: 修复系统角色进入详情之后返回页面空白问题 2022-03-04 15:38:58 +08:00
feng626
842168e16b fix: 修复组织管理员角色权限问题 2022-03-04 14:20:48 +08:00
ibuler
5eb9a58f61 perf: 优化权限判断,支持或的关系 2022-03-04 14:18:07 +08:00
老广
8d0f71f681 Fix rbac (#1375)
* fix: 修复邀请用户为全局用户及工单orgs bug

* fix: 修复资产账号列表点击更新时弹窗不出现的问题

* fix: 修复组织管理员无法进入详情页问题

* perf: 优化角色

* fix: 修复工单流权限问题

* fix: 修复判断默认跳转路由的方法

* fix: 修复perms 许可证判断逻辑

* feat: 修改导航中英文翻译

Co-authored-by: feng626 <1304903146@qq.com>
Co-authored-by: Jiangjie.Bai <bugatti_it@163.com>
Co-authored-by: “怀磊” <2280131253@qq.com>
Co-authored-by: feng626 <57284900+feng626@users.noreply.github.com>
2022-03-04 10:11:57 +08:00
“怀磊”
872add340b fix: 修复vm的this指针问题 2022-03-03 11:26:54 +08:00
Jiangjie.Bai
17e6d2fe84 feat: 用户详情tab页rbac控制 (#1359) (#1362)
* perf: debug account

* Debug: 添加 debug

* debug: 添加线上debug

* debug: remove vue config

* chore: diglog 添加vif

* debug: authbook

* chore: debug account

* fix: 修改资产账号更新弹窗组件传参方式

* perf: 修改 authbook

* fix: 修复资产账号的更新组件不生效问题

* perf: change build scropt

* feat: 配置概况页的路由权限

* fix: 修复工单流自定义用户获取全局用户bug

* feat: 用户详情tab页rbac控制

* feat: 用户组详情tab添加rbac

* feat: 资产详情tab添加rbac

* feat: 角色列表详情tab添加rbac

* feat: 资产管理详情页tab添加rbac

* feat: 账号管理详情tab增加rbac

* feat: 权限管理详情tab添加rbac

* feat: 作业中心详情tab添加rbac

* feat: 系统设置tab添加rbac

Co-authored-by: ibuler <ibuler@qq.com>
Co-authored-by: “怀磊” <2280131253@qq.com>
Co-authored-by: feng626 <1304903146@qq.com>

Co-authored-by: fit2bot <68588906+fit2bot@users.noreply.github.com>
Co-authored-by: ibuler <ibuler@qq.com>
Co-authored-by: “怀磊” <2280131253@qq.com>
Co-authored-by: feng626 <1304903146@qq.com>
2022-03-03 10:36:05 +08:00
fit2bot
c0448afda4 Fix rbac (#1361)
* perf: debug account

* Debug: 添加 debug

* debug: 添加线上debug

* debug: remove vue config

* chore: diglog 添加vif

* debug: authbook

* chore: debug account

* fix: 修改资产账号更新弹窗组件传参方式

* perf: 修改 authbook

* fix: 修复资产账号的更新组件不生效问题

* perf: change build scropt

* feat: 配置概况页的路由权限

* fix: 修复工单流自定义用户获取全局用户bug

* fix: 修复系统角色绑定用户为全局用户

* fix: 修改i18n cn.json=>zh-hans.json 文件名

* fix: 修改i18n cn.json 文件名

Co-authored-by: ibuler <ibuler@qq.com>
Co-authored-by: “怀磊” <2280131253@qq.com>
Co-authored-by: feng626 <1304903146@qq.com>
Co-authored-by: Jiangjie.Bai <bugatti_it@163.com>
2022-03-02 20:49:23 +08:00
Jiangjie.Bai
10655a3ff4 feat: 修改存储翻译信息 2022-02-28 19:27:37 +08:00
Jiangjie.Bai
22bd95b55a feat: 支持COS对象存储 2022-02-28 19:27:37 +08:00
Jiangjie.Bai
263e7a0f34 feat: 支持COS对象存储 2022-02-28 19:27:37 +08:00
ibuler
4366e5b1c8 fix: 去掉一部分role filter 2022-02-28 19:27:37 +08:00
ibuler
20b6b09840 fix: 修复 detail 问题 2022-02-28 19:27:37 +08:00
ibuler
111bb97c65 fix: 修复上次提交的错误 2022-02-28 19:27:37 +08:00
Jiangjie.Bai
88c86c8257 feat: 功能优化 2022-02-28 19:27:37 +08:00
ibuler
8573bc53aa perf: 修改 url 2022-02-28 19:27:37 +08:00
ibuler
340efcfbdf perf: 修改了css 2022-02-28 19:27:37 +08:00
ibuler
500b5e51a2 perf: 修改名称 2022-02-28 19:27:37 +08:00
“怀磊”
13eca9da63 feat: 增加默认进入上次登录的角色功能;优化权限判断逻辑 2022-02-28 19:27:37 +08:00
Jiangjie.Bai
db825c5c30 Fix rbac (#1344)
* fix: 修改导航组件样式;组织组件分组文案颜色

* perf: 修改邀请

* perf: 修改组织样式

* fix: 修复站内信点击打开弹窗遮罩层不能关闭问题

* fix: 过滤用户列表创建用户时系统角色的数据-系统组件

* fix: 修复工单流程设置不能进入详情、不能更新问题

* feat: 修改工单路由配置
1、修改工单路由配置
2、流程设置可以显示切换组织组件
3、修复申请资产授权表单报错问题
4、修复申请应用授权表单报错问题

* fix: 修复api key点击创建报错问题

Co-authored-by: “怀磊” <2280131253@qq.com>
Co-authored-by: ibuler <ibuler@qq.com>
2022-02-25 19:24:52 +08:00
Jiangjie.Bai
2e7f62b7f0 Fix rbac (#1341)
* fix: 修改导航组件样式;组织组件分组文案颜色

* fix: 修复Select2组件没有处理array数据的问题, 触发场景比如(邀请用户的对话框)

Co-authored-by: “怀磊” <2280131253@qq.com>
2022-02-24 12:04:59 +08:00
老广
8e08c5c8e5 Merge pull request #1339 from jumpserver/fix_rbac
fix: rbac
2022-02-24 10:07:26 +08:00
ibuler
55c6fce439 perf: 还原 css 2022-02-24 10:00:48 +08:00
ibuler
b2eea8946d Merge branch 'fix_rbac' of github.com:jumpserver/lina into fix_rbac 2022-02-23 19:54:53 +08:00
ibuler
612d440b21 perf: 修改 css 2022-02-23 19:53:56 +08:00
“怀磊”
01e81105c1 Merge branch 'fix_rbac' of github.com:jumpserver/lina into fix_rbac 2022-02-23 19:25:59 +08:00
“怀磊”
76485bd994 feat: 切换组织组件添加快捷入口到组织管理 2022-02-23 19:25:46 +08:00
feng626
240bcde424 fix: 云导入router perm 2022-02-23 19:22:17 +08:00
“怀磊”
15253267fc feat: api key列表页迁移到个人信息模块下 2022-02-23 18:04:46 +08:00
ibuler
0ad9945765 Merge branch 'fix_rbac' of github.com:jumpserver/lina into fix_rbac 2022-02-23 17:06:16 +08:00
“怀磊”
efcd4aa55c fix: 修复界面设置接口文件找不到报错问题 2022-02-23 17:05:40 +08:00
“怀磊”
1824519d6c Merge branch 'fix_rbac' of github.com:jumpserver/lina into fix_rbac 2022-02-23 16:53:20 +08:00
“怀磊”
6e88e67052 feat: 拆分x-pack模块
1、运营中心迁移到资产列表,创建按钮右侧增加云导入点击跳转
2、界面设置迁移到系统设置
3、组织管理迁移到系统设置,组织下拉组件快捷跳转待添加。。。
4、系统监控迁移到系统设置里的终端设置下添加一个tab显示,名称修改为组件监控
2022-02-23 16:52:46 +08:00
ibuler
d04a5a6d8a perf: 修改 path 2022-02-23 16:23:14 +08:00
ibuler
71d5832c2e perf: 优化一波 profile 2022-02-23 16:14:48 +08:00
ibuler
2954385b62 perf: 修改 nav view switch 2022-02-23 14:54:16 +08:00
ibuler
48efdff4e2 perf: 修改 nav view 2022-02-23 14:00:14 +08:00
“怀磊”
fbb5ce031f feat: ftp日志文件目录、路由迁移到会话审计模块下 2022-02-22 19:46:27 +08:00
“怀磊”
68a53c0e90 fix: 首页展示页卡、展示字段调整 2022-02-22 19:32:36 +08:00
ibuler
2fee1f5a16 perf: 修改用户的概览页 2022-02-22 18:54:27 +08:00
ibuler
8e6b817d5f perf: 修复 v-perms 2022-02-22 18:54:27 +08:00
Jiangjie.Bai
3cef40b2b1 fix: 合并 rbac (#1336)
* fix: 修复访问控制路由权限

* fix: 修复个人信息页跳转错误问题

* perf: 修改 rbac (#1332)

* perf: 修改 route name

* fix: perm app router

* fix: 修复资产应用授权路由权限问题

* perf: 修改 rbac

Co-authored-by: ibuler <ibuler@qq.com>
Co-authored-by: feng626 <1304903146@qq.com>

* fix: 导航

* feat: 修改首页布局风格;修改仪表盘文案为概况

* feat: 调整录像存储、命令存储为终端设置的tab页卡展示

* feat: 修改首页侧边栏图标颜色

* fix: 修复命令过滤权限问题

* perf: 修改 nav icon 颜色 (#1334)

* perf: 修改 nav icon 颜色

* perf: 修改左侧收缩栏图表颜色

Co-authored-by: ibuler <ibuler@qq.com>

* feat: 修改工单路由

* perf: 修改图表

* fix: 修改首页接口

Co-authored-by: feng626 <1304903146@qq.com>
Co-authored-by: “怀磊” <2280131253@qq.com>
Co-authored-by: fit2bot <68588906+fit2bot@users.noreply.github.com>
Co-authored-by: ibuler <ibuler@qq.com>
2022-02-22 18:29:36 +08:00
jiangweidong
7a8d35b986 feat: 支持 MongoDB 数据库的纳管 2022-02-22 10:13:44 +08:00
Jiangjie.Bai
96157bb18d fix: rbac 合并 (#1329)
* perf: 修改 route name

* fix: perm app router

* fix: 修复资产应用授权路由权限问题

* feat: home页放到user里,调整文件位置

* perf: 修复 view change routers (#1326)

Co-authored-by: ibuler <ibuler@qq.com>

* fix: 修复搜集用户 改密计划 账号备份路由

* feat: 终端管理、存储配置文件路径修改,放到系统设置中显示

Co-authored-by: ibuler <ibuler@qq.com>
Co-authored-by: feng626 <1304903146@qq.com>
Co-authored-by: “怀磊” <2280131253@qq.com>
Co-authored-by: fit2bot <68588906+fit2bot@users.noreply.github.com>
2022-02-21 16:24:43 +08:00
dependabot[bot]
172f970a0b build(deps): bump url-parse from 1.4.7 to 1.5.7
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.4.7 to 1.5.7.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.4.7...1.5.7)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 10:29:51 +08:00
fit2bot
d7200ecd62 feat: 添加rbac (#1322)
* stash

* perf: 修改切换

* perf: stash

* perf: 修改组件名称

* perf: 修改acl

* perf: 修改路由

* perf: 修改路由切换

* perf: 完成切换

* perf: 修改菜单

* perf: 优化布局

* perf: route rbac

* perf: 固定heading

* perf: 使用class控制header

* perf: 修改margin

* perf: stash 自动生成permissions

* perf: 暂存rbac

* stash

* perf: 优化rbac

* fix: 还原之前的hidden

* pref: 组件还原名称

* pref: 添加角色创建

* perf: 修改sidebar

* perf: 暂存一下

* feat: 添加 角色详情

* stash: 暂存一下

* feat: 添加首页路由及页面布局

* stash: 暂存一下

* feat: 获取切换视图数据

* feat: 获取切换视图数据

* feat: 调整首页页面布局及组件封装

* perf: 使用统一的 role list

* feat: 调整角色权限按钮

* feat: 主页添加会话模块

* feat: 主页添加会话模块

* feat: 设置table不显示多选

* feat: 调整首页模块展示字段

* fix: 修复菜单父级选中不高亮问题

* feat: 替换首页背景图

* perf: 修改一下

* feat: 更新首页卡片接口

* perf: 修改 rbac

* feat: 工单路由、系统设置路由单独拆分出来,并对系统设置路由进行权限判断

* perf: 修改权限

* feat: 系统设置相关页面更换布局组件

* fix: 修复 profile page

* perf: 修改xpack route

* perf: 优化角色详情

* perf: 优化 role user 处理

* perf: 权限位放到详情里

* perf: 修改role info 和 i18n

* feat: 系统设置相关页面修改布局组件;增加路由大标题

1、系统设置-认证设置:修改布局容器组件
2、系统设置-ldap:页面合并到认证设置里
3、左侧路由菜单顶部增加大标题
4、系统设置路由菜单设置新图标

* feat: 调整切换组织组件显示位置,替换组织icon

* feat: 调整切换组织组件显示位置,替换组织icon

* feat: 拆分个人信息页面相关路由,单独的view显示

* feat: 切换组织组件放到头像左边实现,web终端放到帮助左边图标显示

* style: 角色权限组件设置不可选中样式

* perf: add terminal svg

* feat: 替换邮箱svg

* perf: 修改触发方式

* perf: 完成角色搜索

* perf: 修改位置

* perf: 修改触发方式

* perf: 修复 user create 的role

* feat: 修改切换组织组件显示位置和ui样式
1、站内信、web终端图标添加hover效果提示
2、突出退出登录添加icon
3、修改切换组织组件显示位置和ui样式

* perf: 修改一些 权限

* perf: 修改菜单隐藏判断

* perf: 修改 org

* perf: 修改radius

* perf: 还原 radius

* feat: 调整终端管理文件,统一放到系统设置目录下
1、调整切换组织组件文件位置,放到header目录下
2、调整终端管理相关页面的文件位置放在系统设置目录下
3、终端管理部分页面为迁移完。。。

* perf: 修改了些 css

* perf: 修改分割线颜色

* perf: 修改分隔线样式

* perf: 修改是否显示组织

* perf: 优化继承

* perf: 还原 resource 的处理

* perf: 修改 app api url

* fix: 修复原来 detailApi 引起的问题

* perf: 修改一点 css

* perf: 修改 views

* perf: 修改视图切换

* perf: 修改位置

Co-authored-by: ibuler <ibuler@qq.com>
Co-authored-by: “怀磊” <2280131253@qq.com>
2022-02-18 10:51:15 +08:00
“怀磊”
70d2599d4a fix: 修复资产授权创建时默认选中了点击的资产和节点问题
修改为指保留最后一次选中的资产或者节点
2022-02-17 11:33:39 +08:00
365 changed files with 9352 additions and 4659 deletions

View File

@@ -20,6 +20,6 @@ VUE_APP_LOGOUT_PATH = '/core/auth/logout/'
# Dev server for core proxy
VUE_APP_CORE_HOST = 'http://localhost:8080/'
VUE_APP_CORE_WS = 'http://localhost:8080/'
VUE_APP_CORE_HOST = 'http://localhost:8080'
VUE_APP_CORE_WS = 'ws://localhost:8080'
VUE_APP_ENV = 'development'

View File

@@ -1,6 +1,4 @@
FROM node:10 as stage-build
ARG VERSION
ENV VERSION=$VERSION
ARG NPM_REGISTRY="https://registry.npm.taobao.org"
ENV NPM_REGISTY=$NPM_REGISTRY
ARG SASS_BINARY_SITE="https://npm.taobao.org/mirrors/node-sass"
@@ -15,6 +13,8 @@ COPY package.json yarn.lock /data/
RUN yarn install
RUN npm rebuild node-sass
ARG VERSION
ENV VERSION=$VERSION
ADD . /data
RUN cd utils && bash -xieu build.sh build

View File

@@ -19,7 +19,7 @@ VUE_APP_CORE_HOST = 'JUMPSERVER_APIHOST'
$ yarn serve
4. 构建
$ yarn build
$ yarn build:prod
```
## 生产中部署

View File

@@ -1,4 +1,3 @@
const tokens = {
admin: {
token: 'admin-token'
@@ -46,7 +45,6 @@ export default [
}
}
},
// get user info
{
url: '/vue-admin-template/user/info\.*',

View File

@@ -13,3 +13,9 @@ export function getCurrentOrg() {
method: 'get'
})
}
export default {
getCurrentOrg,
getOrgDetail
}

View File

@@ -69,3 +69,8 @@ export function logout() {
export function refreshSessionIdAge() {
return getProfile()
}
export default {
getProfile,
getUserList
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

View File

@@ -4,7 +4,6 @@
:title="this.$t('assets.UpdateAssetUserToken')"
:visible.sync="visible"
:destroy-on-close="true"
v-bind="$attrs"
@confirm="handleConfirm()"
@cancel="handleCancel()"
v-on="$listeners"

View File

@@ -2,7 +2,7 @@
<div>
<ListTable ref="ListTable" :table-config="tableConfig" :header-actions="headerActions" />
<ShowSecretInfo v-if="showViewSecretDialog" :visible.sync="showViewSecretDialog" :account="account" />
<UpdateSecretInfo :visible.sync="showUpdateSecretDialog" :account="account" @updateAuthDone="onUpdateAuthDone" />
<UpdateSecretInfo v-if="showUpdateSecretDialog" :visible.sync="showUpdateSecretDialog" :account="account" @updateAuthDone="onUpdateAuthDone" />
</div>
</template>
@@ -46,12 +46,17 @@ export default {
}
},
data() {
const vm = this
return {
showViewSecretDialog: false,
showUpdateSecretDialog: false,
account: {},
tableConfig: {
url: this.url,
permissions: {
app: 'assets',
resource: 'authbook'
},
columns: [
'hostname', 'ip', 'username', 'version', 'connectivity',
'systemuser', 'date_created', 'date_updated', 'actions'
@@ -67,6 +72,7 @@ export default {
showOverflowTooltip: true,
formatter: DetailFormatter,
formatterArgs: {
can: this.$hasPerm('assets.view_asset'),
getRoute({ row }) {
return {
name: 'AssetDetail',
@@ -99,15 +105,17 @@ export default {
{
name: 'View',
title: this.$t('common.View'),
can: this.$hasPerm('assets.view_assetaccountsecret'),
type: 'primary',
callback: function({ row }) {
this.account = row
this.showViewSecretDialog = true
}.bind(this)
callback: ({ row }) => {
vm.account = row
vm.showViewSecretDialog = true
}
},
{
name: 'Delete',
title: this.$t('common.Delete'),
can: this.$hasPerm('assets.delete_authbook'),
type: 'primary',
callback: ({ row }) => {
this.$axios.delete(`/api/v1/assets/accounts/${row.id}/`).then(() => {
@@ -119,6 +127,7 @@ export default {
{
name: 'Test',
title: this.$t('common.Test'),
can: this.$hasPerm('assets.test_authbook'),
callback: ({ row }) => {
this.$axios.post(
`/api/v1/assets/accounts/${row.id}/verify/`,
@@ -131,11 +140,16 @@ export default {
{
name: 'Update',
title: this.$t('common.Update'),
can: !this.$store.getters.currentOrgIsRoot,
callback: function({ row }) {
this.account = row
this.showUpdateSecretDialog = true
}.bind(this)
can: this.$hasPerm('assets.change_assetaccountsecret') && !this.$store.getters.currentOrgIsRoot,
callback: ({ row }) => {
vm.account = row
vm.showUpdateSecretDialog = false
setTimeout(() => {
vm.showUpdateSecretDialog = true
console.log('Show update1: ', vm.showUpdateSecretDialog)
})
console.log('Show update2: ', vm.showUpdateSecretDialog)
}
}
]
}
@@ -146,7 +160,7 @@ export default {
hasLeftActions: this.hasLeftActions,
hasMoreActions: false,
hasImport: false,
hasExport: true,
hasExport: this.$hasPerm('assets.view_assetaccountsecret'),
exportOptions: {
url: this.exportUrl,
mfaVerifyRequired: true

View File

@@ -7,7 +7,7 @@
:title="title"
@close="onClose"
>
<span class="announcement-main"> {{ announcement.content }}</span>
<span class="announcement-main">{{ announcement.content }}</span>
<span v-if="announcement.link">
<el-link :href="announcement.link" target="_blank" class="link-more">
{{ $t('common.ViewMore') }}
@@ -60,6 +60,7 @@ export default {
}
.announcement-main {
word-wrap:break-word;
white-space: pre-wrap;
}
.link-more {
font-size: 10px;

View File

@@ -84,6 +84,7 @@ export default {
showOverflowTooltip: true,
formatter: DetailFormatter,
formatterArgs: {
can: this.$hasPerm('assets.view_systemuser'),
getTitle({ row }) {
return row.systemuser_display
},
@@ -107,6 +108,7 @@ export default {
name: 'View',
title: this.$t('common.View'),
type: 'primary',
can: this.$hasPerm('applications.view_applicationaccountsecret'),
callback: function({ row }) {
this.account = row
this.showViewSecretDialog = true
@@ -129,7 +131,7 @@ export default {
hasLeftActions: this.hasLeftActions,
hasMoreActions: false,
hasImport: false,
hasExport: true,
hasExport: this.$hasPerm('applications.view_applicationaccountsecret'),
exportOptions: {
url: this.exportUrl,
mfaVerifyRequired: true

View File

@@ -13,7 +13,7 @@
:title="this.$t('assets.Assets')"
:visible.sync="dialogVisible"
custom-class="asset-select-dialog"
width="70%"
width="80vw"
top="1vh"
@confirm="handleConfirm"
@cancel="handleCancel"
@@ -192,7 +192,7 @@ export default {
.el-dialog__wrapper ::v-deep .el-dialog__body{
padding: 5px 10px;
}
.page ::v-deep .treebox{
.page ::v-deep .treebox {
height: inherit !important;
}
.asset-select-dialog >>> .transition-box:first-child {

View File

@@ -4,9 +4,12 @@
<script>
import TagSearch from '@/components/TagSearch'
import i18n from '@/i18n/i18n'
export default {
name: 'AutoDataSearch',
components: { TagSearch },
components: {
TagSearch
},
props: {
url: {
type: String,
@@ -78,8 +81,8 @@ export default {
}
if (field.type === 'boolean') {
option.children = [
{ label: this.$t('common.Yes'), value: true },
{ label: this.$t('common.No'), value: false }
{ label: i18n.t('common.Yes'), value: true },
{ label: i18n.t('common.No'), value: false }
]
}
vm.internalOptions.push(option)

View File

@@ -64,7 +64,6 @@ export default {
}
},
computed: {
},
watch: {
config: {
@@ -174,8 +173,8 @@ export default {
}
if (column.type === 'boolean') {
col.filters = [
{ text: this.$t('common.Yes'), value: true },
{ text: this.$t('common.No'), value: false }
{ text: i18n.t('common.Yes'), value: true },
{ text: i18n.t('common.No'), value: false }
]
col.sortable = false
col['column-key'] = col.prop
@@ -211,7 +210,7 @@ export default {
},
generateTotalColumns() {
const config = _.cloneDeep(this.config)
const columns = []
let columns = []
for (let col of config.columns) {
if (typeof col === 'object') {
columns.push(col)
@@ -220,6 +219,15 @@ export default {
columns.push(col)
}
}
columns = columns.filter(item => {
let has = item.has
if (has === undefined) {
has = true
} else if (typeof has === 'function') {
has = has()
}
return has
})
// 第一次初始化时记录 totalColumns
this.totalColumns = columns
config.columns = columns

View File

@@ -1,13 +1,13 @@
<template>
<DataZTree ref="dataztree" :setting="treeSetting" class="data-z-tree" v-on="$listeners">
<slot v-if="treeSetting.hasRightMenu" slot="rMenu">
<li id="m_create" class="rmenu" tabindex="-1" @click="createTreeNode">
<li v-if="treeSetting.showCreate" id="m_create" class="rmenu" tabindex="-1" @click="createTreeNode">
<i class="fa fa-plus-square-o" /> {{ this.$t('tree.CreateNode') }}
</li>
<li id="m_edit" class="rmenu" tabindex="-1" @click="editTreeNode">
<li v-if="treeSetting.showUpdate" id="m_edit" class="rmenu" tabindex="-1" @click="editTreeNode">
<i class="fa fa-pencil-square-o" /> {{ this.$t('tree.RenameNode') }}
</li>
<li id="m_del" class="rmenu" tabindex="-1" @click="removeTreeNode">
<li v-if="treeSetting.showDelete" id="m_del" class="rmenu" tabindex="-1" @click="removeTreeNode">
<i class="fa fa-minus-square" /> {{ this.$t('tree.DeleteNode') }}
</li>
<slot name="rMenu" />
@@ -34,6 +34,9 @@ export default {
data() {
return {
defaultSetting: {
showCreate: true,
showDelete: true,
showUpdate: true,
async: {
enable: true,
url: (process.env.VUE_APP_ENV === 'production') ? (`${this.setting.treeUrl}`) : (`${process.env.VUE_APP_BASE_API}${this.setting.treeUrl}`),
@@ -100,6 +103,9 @@ export default {
// Request URL: http://localhost/api/v1/assets/assets/?node_id=d8212328-538d-41a6-bcfd-1e8cc7e3aed4&show_current_asset=null&draw=2&limit=15&offset=0&_=1587022917769
onSelected: function(event, treeNode) {
const show_current_asset = this.$cookie.get('show_current_asset') || '0'
if (!this.setting.url) {
return
}
let combinator = '?'
if (this.setting.url.indexOf('?') !== -1) {
combinator = '&'

View File

@@ -1,5 +1,5 @@
<template>
<div :class="grouped ? 'el-button-group' : 'el-button-ungroup'">
<div :class="grouped ? 'el-button-group' : 'el-button-ungroup'" class="layout">
<template v-for="action in iActions">
<el-dropdown
v-if="action.dropdown"
@@ -13,9 +13,14 @@
<el-button :size="size" v-bind="cleanButtonAction(action)">
{{ action.title }}<i class="el-icon-arrow-down el-icon--right" />
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-menu slot="dropdown" style="overflow: auto;max-height: 60vh">
<template v-for="option in action.dropdown">
<div v-if="option.group" :key="'group:'+option.name" class="dropdown-menu-title" style="width:130px">
<div
v-if="option.group"
:key="'group:'+option.name"
class="dropdown-menu-title"
style="width:130px"
>
{{ option.group }}
</div>
<el-dropdown-item
@@ -149,6 +154,11 @@ export default {
</script>
<style scoped>
.layout {
display: flex;
justify-content: center;
}
.dropdown-menu-title {
text-align: left;
font-size: 12px;
@@ -165,7 +175,7 @@ export default {
}
.el-button-ungroup .action-item {
margin-left: 4px
margin-left: 4px;
}
.el-button-ungroup .action-item:first-child {

View File

@@ -1,9 +1,10 @@
<template>
<ElFormRender
ref="form"
:class="mobile? 'mobile' : 'desktop'"
:content="fields"
:form="basicForm"
label-position="right"
:label-position="labelPosition"
label-width="20%"
v-bind="$attrs"
v-on="$listeners"
@@ -68,6 +69,14 @@ export default {
basicForm: this.form
}
},
computed: {
mobile() {
return this.$store.state.app.device === 'mobile'
},
labelPosition() {
return this.mobile ? 'top' : 'right'
}
},
methods: {
// 获取表单数据
submitForm(formName, addContinue) {
@@ -99,27 +108,35 @@ export default {
</script>
<style lang="less" scoped>
.el-form ::v-deep .el-form-item {
.el-form ::v-deep .el-form-item {
margin-bottom: 12px;
}
.el-form ::v-deep .el-form-item__content {
.el-form ::v-deep .el-form-item__content {
width: 75%;
}
.el-form ::v-deep .el-form-item__label {
.mobile.el-form ::v-deep .el-form-item__content {
width: 100%;
}
.el-form ::v-deep .el-form-item__label {
padding: 0 30px 0 0;
}
.el-form ::v-deep .el-form-item__error {
.el-form ::v-deep .el-form-item__error {
position: inherit;
}
.el-form ::v-deep .form-group-header {
.el-form ::v-deep .form-group-header {
margin-left: 50px;
}
.el-form ::v-deep .help-block {
.el-form.mobile ::v-deep .form-group-header {
margin-left: 0;
}
.el-form ::v-deep .help-block {
display: block;
margin-top: 5px;
margin-bottom: 10px;
@@ -127,7 +144,10 @@ export default {
font-size: 12px;
line-height: 18px;
}
.el-form ::v-deep .help-block a {
.el-form ::v-deep .help-block a {
color: #1c84c6;
}
.form-buttons {
padding-top: 10px;
}
</style>

View File

@@ -2,8 +2,11 @@
<el-dialog
:title="title"
:top="top"
:width="iWidth"
class="dialog"
v-bind="$attrs"
:append-to-body="false"
:modal-append-to-body="false"
v-on="$listeners"
>
<slot />
@@ -38,6 +41,10 @@ export default {
type: String,
default: '3vh'
},
width: {
type: String,
default: '60%'
},
showConfirm: {
type: Boolean,
default: true
@@ -57,6 +64,11 @@ export default {
return {
}
},
computed: {
iWidth() {
return this.$store.getters.isMobile ? '80%' : this.width
}
},
methods: {
onCancel() {
this.$emit('cancel')

View File

@@ -91,18 +91,22 @@ export default {
}
</script>
<style lang='less' scoped>
<style lang='scss' scoped>
.datepicker{
width: 233px;
&>>> .el-range__icon {
margin-top: 2px;
margin-right: 3px;
}
&>>> .el-range-input {
width: 49%;
}
}
.el-input__inner{
border: 1px solid #dcdee2;
border-radius: 3px;
height: 36px;
}
/*.el-date-editor ::v-deep .el-input__icon{*/
/* line-height: 28px;*/
/*}*/
.el-date-editor ::v-deep .el-range-separator{
line-height: 28px;
}

View File

@@ -1,5 +1,5 @@
<template>
<el-link @click="onClick">
<el-link :disabled="disabled" @click="onClick">
{{ title }}
</el-link>
</template>
@@ -15,6 +15,10 @@ export default {
title: {
type: String,
default: ''
},
disabled: {
type: Boolean,
default: false
}
},
methods: {

View File

@@ -12,6 +12,7 @@
filterable
popper-append-to-body
class="select2"
:disabled="selectDisabled"
v-bind="$attrs"
@change="onChange"
@visible-change="onVisibleChange"
@@ -85,9 +86,14 @@ export default {
disabledValues: {
type: Array,
default: () => []
},
disabled: {
type: Boolean,
default: false
}
},
data() {
const vm = this
const defaultPageSize = 10
const defaultParams = {
search: '',
@@ -95,7 +101,20 @@ export default {
hasMore: true,
pageSize: defaultPageSize
}
// 设置axios全局报错提示不显示
const validateStatus = (status) => {
if (status === 403) {
setTimeout(() => {
vm.initialized = true
vm.selectDisabled = true
}, 200)
return 200
}
return status
}
return {
validateStatus,
selectDisabled: this.disabled,
loading: false,
initialized: false,
defaultParams: _.cloneDeep(defaultParams),
@@ -143,10 +162,19 @@ export default {
}
const transformOption = this.ajax.transformOption || defaultTransformOption
const defaultProcessResults = (data) => {
let results = data.results
let results = []
let more = false
let total = 0
if (Array.isArray(data)) {
results = data
total = data.length
} else if (typeof data === 'object') {
results = data?.results || []
more = !!data.next
total = data.count
}
results = results.map(transformOption)
const more = !!data.next
const total = data.count
results = results.filter(Boolean)
return { results: results, pagination: more, total: total }
}
const defaultAjax = {
@@ -154,7 +182,8 @@ export default {
pageSize: defaultPageSize,
makeParams: defaultMakeParams,
transformOption: defaultTransformOption,
processResults: defaultProcessResults
processResults: defaultProcessResults,
validateStatus: this.validateStatus
}
return Object.assign(defaultAjax, this.ajax, this.url ? { url: this.url } : {})
}
@@ -222,9 +251,13 @@ export default {
this.getOptions()
},
async getInitialOptions() {
const { url, processResults, validateStatus } = this.iAjax
const params = this.safeMakeParams(this.params)
let data = await this.$axios.get(this.iAjax.url, { params: params })
data = this.iAjax.processResults.bind(this)(data)
let data = await this.$axios.get(url, {
params,
validateStatus
})
data = processResults.bind(this)(data)
data.results.forEach((v) => {
this.initialOptions.push(v)
if (this.optionsValues.indexOf(v.value) === -1) {
@@ -242,9 +275,13 @@ export default {
}
},
async getOptions() {
const { url, processResults, validateStatus } = this.iAjax
const params = this.safeMakeParams(this.params)
const resp = await this.$axios.get(this.iAjax.url, { params: params })
const data = this.iAjax.processResults.bind(this)(resp)
const resp = await this.$axios.get(url, {
params,
validateStatus
})
const data = processResults.bind(this)(resp)
if (!data.pagination) {
this.params.hasMore = false
}

View File

@@ -0,0 +1,26 @@
<template>
<span>
{{ text }}
</span>
</template>
<script>
export default {
name: 'Text',
props: {
text: {
type: String,
default: ''
}
},
methods: {
onClick() {
window.open(this.href)
}
}
}
</script>
<style scoped>
</style>

View File

@@ -32,16 +32,16 @@ export default {
return callback()
}
const patterns = []
if (passwordRule.SECURITY_PASSWORD_UPPER_CASE) {
if (passwordRule['SECURITY_PASSWORD_UPPER_CASE']) {
patterns.push([/[A-Z]/, i18n.t('common.password.UPPER_CASE_REQUIRED')])
}
if (passwordRule.SECURITY_PASSWORD_LOWER_CASE) {
if (passwordRule['SECURITY_PASSWORD_LOWER_CASE']) {
patterns.push([/[a-z]/, i18n.t('common.password.LOWER_CASE_REQUIRED')])
}
if (passwordRule.SECURITY_PASSWORD_NUMBER) {
if (passwordRule['SECURITY_PASSWORD_NUMBER']) {
patterns.push([/\d/, i18n.t('common.password.NUMBER_REQUIRED')])
}
if (passwordRule.SECURITY_PASSWORD_SPECIAL_CHAR) {
if (passwordRule['SECURITY_PASSWORD_SPECIAL_CHAR']) {
const pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~@#¥……&*()——|{}【】‘;:”“'。,、?]")
patterns.push([pattern, i18n.t('common.password.SPECIAL_CHAR_REQUIRED')])
}
@@ -50,7 +50,7 @@ export default {
return callback(new Error(msg))
}
}
let secureLength = passwordRule ? passwordRule.SECURITY_PASSWORD_MIN_LENGTH : 7
let secureLength = passwordRule ? passwordRule['SECURITY_PASSWORD_MIN_LENGTH'] : 7
if (userIsOrgAdmin) {
secureLength = passwordRule ? passwordRule.SECURITY_ADMIN_USER_PASSWORD_MIN_LENGTH : 7
}

View File

@@ -9,6 +9,7 @@ import UserPassword from './UserPassword'
import WeekCronSelect from './WeekCronSelect'
import UpdateToken from './UpdateToken'
import JsonEditor from './JsonEditor'
import Text from './Text'
export default {
DatetimeRangePicker,
@@ -21,7 +22,8 @@ export default {
UserPassword,
WeekCronSelect,
UpdateToken,
JsonEditor
JsonEditor,
Text
}
export {
@@ -35,5 +37,6 @@ export {
UserPassword,
WeekCronSelect,
UpdateToken,
JsonEditor
JsonEditor,
Text
}

View File

@@ -1,8 +1,6 @@
<template>
<div style="">
<el-button type="primary" class="hamburger" size="mini" @click="toggleClick">
<i class="fa fa-bars" style="color: white; margin-right: 0" />
</el-button>
<div style="padding: 0 15px;" @click="toggleClick">
<svg-icon icon-class="hamburger" class="hamburger" :class="{'is-active':isActive}" />
</div>
</template>
@@ -25,11 +23,12 @@ export default {
<style scoped>
.hamburger {
padding: 7px 12px;
display: inline-block;
vertical-align: middle;
font-size: 20px;
color: rgb(167, 177, 194);
}
.hamburger.is-active {
transform: rotate(180deg);
}
</style>

View File

@@ -92,11 +92,11 @@ export default {
return this.selectedRows.length > 0
},
tableQuery() {
const listTableRef = this.$parent.$parent.$parent.$parent
const listTableRef = this.$parent?.$parent?.$parent?.$parent
if (!listTableRef) {
return {}
}
const query = listTableRef.dataTable.getQuery()
const query = listTableRef?.dataTable?.getQuery() || {}
delete query['limit']
delete query['offset']
delete query['date_from']
@@ -199,8 +199,11 @@ export default {
this.mfaDialogShow = false
},
handleExportCancel() {
this.exportDialogShow = false
this.mfaDialogShow = false
const vm = this
setTimeout(() => {
vm.exportDialogShow = false
vm.mfaDialogShow = false
}, 100)
}
}
}

View File

@@ -13,8 +13,12 @@
>
<el-form v-if="!showTable" label-position="left" style="padding-left: 50px">
<el-form-item :label="$t('common.Import' )" :label-width="'100px'">
<el-radio v-model="importOption" class="export-item" label="create">{{ this.$t('common.Create') }}</el-radio>
<el-radio v-model="importOption" class="export-item" label="update">{{ this.$t('common.Update') }}</el-radio>
<el-radio v-if="canImportCreate" v-model="importOption" class="export-item" label="create">
{{ this.$t('common.Create') }}
</el-radio>
<el-radio v-if="canImportUpdate" v-model="importOption" class="export-item" label="update">
{{ this.$t('common.Update') }}
</el-radio>
<div style="line-height: 1.5">
<span class="el-upload__tip">
{{ downloadTemplateTitle }}
@@ -77,12 +81,20 @@ export default {
url: {
type: String,
default: () => ''
},
canImportCreate: {
type: Boolean,
default: false
},
canImportUpdate: {
type: Boolean,
default: false
}
},
data() {
return {
showImportDialog: false,
importOption: 'create',
importOption: this.canImportCreate && this.canImportUpdate ? 'create' : this.canImportCreate ? 'create' : 'update',
errorMsg: '',
loadStatus: false,
importTypeOption: 'csv',

View File

@@ -1,7 +1,7 @@
<template>
<div>
<el-row>
<el-col :span="8">
<el-col :md="8" :sm="24">
<div class="tableFilter">
<el-radio-group v-model="importStatusFilter" size="small">
<el-radio-button label="all">{{ $t('common.Total') }}</el-radio-button>
@@ -11,7 +11,7 @@
</el-radio-group>
</div>
</el-col>
<el-col :span="8" style="text-align: center">
<el-col :md="8" :sm="24" style="text-align: center">
<span class="summary-item summary-total"> {{ $t('common.Total') }}: {{ totalCount }}</span>
<span class="summary-item summary-success"> {{ $t('common.Success') }}: {{ successCount }}</span>
<span class="summary-item summary-failed"> {{ $t('common.Failed') }}: {{ failedCount }}</span>

View File

@@ -35,7 +35,9 @@ export default {
default: false
},
hasBulkDelete: defaultTrue,
canBulkDelete: defaultTrue,
hasBulkUpdate: defaultFalse,
canBulkUpdate: defaultTrue,
hasMoreActions: defaultTrue,
tableUrl: {
type: String,
@@ -98,6 +100,7 @@ export default {
const createCreateAction = Object.assign(defaultMoreCreate, this.moreCreates)
defaultActions.push(createCreateAction)
}
const vm = this
return {
defaultActions: defaultActions,
defaultMoreActions: [
@@ -107,7 +110,7 @@ export default {
has: this.hasBulkDelete,
can({ selectedRows }) {
// vm.$log.debug('Delete select rows length: ', selectedRows.length)
return selectedRows.length > 0
return selectedRows.length > 0 && vm.canBulkDelete
},
callback: this.defaultBulkDeleteCallback
},
@@ -115,7 +118,9 @@ export default {
title: this.$t('common.updateSelected'),
name: 'actionUpdateSelected',
has: this.hasBulkUpdate,
can: ({ selectedRows }) => selectedRows.length > 0,
can: ({ selectedRows }) => {
return selectedRows.length > 0 && vm.canBulkUpdate
},
callback: this.handleBulkUpdate
}
]
@@ -136,7 +141,7 @@ export default {
if (!this.hasMoreActions) {
return
}
let dropdown = [...this.defaultMoreActions, ...this.extraMoreActions]
let dropdown = _.uniqBy([...this.extraMoreActions, ...this.defaultMoreActions], 'name')
dropdown = cleanActions(dropdown, true, {
selectedRows: this.selectedRows,
reloadTable: this.reloadTable

View File

@@ -76,6 +76,14 @@ export default {
extraRightSideActions: {
type: Array,
default: () => []
},
canCreate: {
type: Boolean,
default: false
},
canBulkUpdate: {
type: Boolean,
default: false
}
},
data() {
@@ -102,7 +110,11 @@ export default {
return this.selectedRows.length > 0
},
iImportOptions() {
return assignIfNot(this.importOptions, { url: this.tableUrl })
return assignIfNot(this.importOptions, {
url: this.tableUrl,
canImportCreate: this.canCreate,
canImportUpdate: this.canBulkUpdate
})
},
iExportOptions() {
const options = assignIfNot(this.exportOptions, { url: this.tableUrl })
@@ -164,8 +176,4 @@ export default {
justify-content:center;
}
.export-item {
}
</style>

View File

@@ -1,17 +1,11 @@
<template>
<div class="table-header">
<div class="table-header clearfix" :class="device">
<slot name="header">
<div class="table-header-left-side">
<LeftSide v-if="hasLeftActions" :selected-rows="selectedRows" :table-url="tableUrl" v-bind="$attrs" v-on="$listeners" />
<span v-else style="display: flex;flex-direction: row">
<AutoDataSearch v-if="hasSearch" class="right-side-item action-search" v-bind="iSearchTableConfig" @tagSearch="handleTagSearch" />
<DatetimeRangePicker v-if="hasDatePicker" v-bind="datePicker" class="datepicker" @dateChange="handleDateChange" />
</span>
</div>
<div class="table-action-right-side">
<AutoDataSearch v-if="hasLeftActions && hasSearch" class="right-side-item action-search" v-bind="iSearchTableConfig" @tagSearch="handleTagSearch" />
<DatetimeRangePicker v-if="hasDatePicker && hasLeftActions" v-bind="datePicker" class="datepicker" @dateChange="handleDateChange" />
<RightSide v-if="hasRightActions" :selected-rows="selectedRows" :table-url="tableUrl" v-bind="$attrs" v-on="$listeners" />
<LeftSide v-if="hasLeftActions" class="left-side" :selected-rows="selectedRows" :table-url="tableUrl" v-bind="$attrs" v-on="$listeners" />
<RightSide v-if="hasRightActions" class="right-side" :selected-rows="selectedRows" :table-url="tableUrl" v-bind="$attrs" v-on="$listeners" />
<div class="search" :class="searchClass">
<AutoDataSearch v-if="hasSearch" class="right-side-item action-search" v-bind="iSearchTableConfig" @tagSearch="handleTagSearch" />
<DatetimeRangePicker v-if="hasDatePicker" v-bind="datePicker" class="datepicker" @dateChange="handleDateChange" />
</div>
</slot>
</div>
@@ -77,6 +71,15 @@ export default {
url: this.tableUrl
}
return Object.assign(configDefault, this.searchConfig)
},
device() {
if (this.$store.state.app.device === 'mobile') {
return 'mobile'
}
return ''
},
searchClass() {
return this.hasLeftActions ? 'right' : 'left'
}
},
methods: {
@@ -92,9 +95,9 @@ export default {
<style scoped>
.table-header {
display: flex;
flex-direction: row;
justify-content: space-between;
/*display: flex;*/
/*flex-direction: row;*/
/*justify-content: space-between;*/
}
.right-side-item {
@@ -143,5 +146,34 @@ export default {
.datepicker{
margin-left: 10px;
}
.left-side {
float: left;
display: block;
line-height: 36px;
}
.right-side {
float: right;
}
.search {
display: flex;
flex-direction: row
}
.mobile .search {
display: inherit;
}
.mobile .search .datepicker {
margin-left: 0;
}
.search.left {
float: left;
}
.search.right {
float: right;
}
.mobile .search.right {
float: left;
}
.mobile .right-side {
padding-top: 5px;
}
</style>

View File

@@ -6,7 +6,7 @@
:date-pick="handleDateChange"
:selected-rows="selectedRows"
:reload-table="reloadTable"
v-bind="headerActions"
v-bind="iHeaderActions"
/>
<IBox class="table-content">
<AutoDataTable
@@ -25,7 +25,9 @@ import AutoDataTable from '../AutoDataTable'
import IBox from '../IBox'
import TableAction from './TableAction'
import Emitter from '@/mixins/emitter'
import { getResourceFromApiUrl } from '@/utils/jms'
import deepmerge from 'deepmerge'
import { mapGetters } from 'vuex'
export default {
name: 'ListTable',
@@ -55,17 +57,65 @@ export default {
}
},
computed: {
...mapGetters(['currentOrgIsRoot']),
dataTable() {
return this.$refs.dataTable.$refs.dataTable
},
iHeaderActions() {
const actions = {
canCreate: { action: 'add', checkRoot: true },
canBulkDelete: { action: 'delete', checkRoot: false },
canBulkUpdate: { action: 'change', checkRoot: true },
hasImport: { action: 'add|change', checkRoot: true },
hasExport: { action: 'view', checkRoot: false }
}
const defaults = {}
for (const [k, v] of Object.entries(actions)) {
let hasPerm = v.action.split('|').some(i => this.hasActionPerm(i.trim()))
if (v.checkRoot) {
hasPerm = hasPerm && !this.currentOrgIsRoot
}
defaults[k] = hasPerm
}
return Object.assign(defaults, this.headerActions)
},
iTableConfig() {
const config = deepmerge(this.tableConfig, { extraQuery: this.extraQuery })
const config = deepmerge(this.tableConfig, {
extraQuery: this.extraQuery
})
const formatterArgs = {
'columnsMeta.actions.formatterArgs.canUpdate': 'change',
'columnsMeta.actions.formatterArgs.canDelete': 'delete',
'columnsMeta.actions.formatterArgs.canClone': 'add',
'columnsMeta.name.formatterArgs.can': 'view'
}
for (const [arg, action] of Object.entries(formatterArgs)) {
const notSet = _.get(config, arg) === undefined
if (notSet) {
_.set(config, arg, this.hasActionPerm(action))
}
}
this.$log.debug('Header actions', this.headerActions)
this.$log.debug('ListTable: iTableConfig change', config)
return config
},
tableUrl() {
return this.iTableConfig.url
return this.tableConfig.url
},
permissions() {
// 获取 permissions获取不到通过 url 解析
const permissions = this.tableConfig.permissions || {}
const { app: apiApp, resource: apiResource } = getResourceFromApiUrl(this.tableUrl)
const app = permissions.app || apiApp
const resource = permissions.resource || apiResource
const actions = ['add', 'change', 'delete', 'view']
const defaultPermissions = actions.reduce((result, action) => {
result[action] = `${app}.${action}_${resource}`
return result
}, {})
const perms = Object.assign(defaultPermissions, permissions)
// this.$log.debug('Permissions: ', perms)
return perms
}
},
watch: {
@@ -97,6 +147,10 @@ export default {
this.$emit('TagFilter', attrs)
this.$refs.dataTable.$refs.dataTable.search(attrs, true)
},
hasActionPerm(action) {
const permRequired = this.permissions[action]
return this.$hasPerm(permRequired)
},
handleDateChange(attrs) {
let dateFrom = ''
let dateTo = ''
@@ -139,6 +193,15 @@ export default {
& >>> .el-table__header thead > tr > th {
background-color: white;
}
&>>> .el-table__row .cell {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
&>>> .el-table__expanded-cell pre {
max-height: 500px;
overflow-y: scroll;
}
}
//修改颜色

View File

@@ -10,14 +10,14 @@
v-on="$listeners"
>
<el-row :gutter="20">
<el-col :span="4">
<el-col :md="4" :sm="24">
<div style="line-height: 34px;text-align: center">MFA</div>
</el-col>
<el-col :span="14">
<el-col :md="14" :sm="24">
<el-input v-model="MFAToken" />
<span class="help-tips help-block">{{ $t('common.MFARequireForSecurity') }}</span>
</el-col>
<el-col :span="4">
<el-col :md="4" :sm="24">
<el-button size="mini" type="primary" style="line-height:20px " @click="verifyMFA">
{{ this.$t('common.Confirm') }}
</el-button>

View File

@@ -217,9 +217,17 @@ export default {
async loadHasObjects() {
this.$log.debug('Start loadHasObject: ', this.params)
const params = this.safeMakeParams(this.params)
let data = await this.$axios.get(this.iAjax.url, { params: params })
let data = await this.$axios.get(this.iAjax.url, {
params: params,
validateStatus: (status) => {
if (status === 403) {
return 200
}
return status
}
})
data = this.iAjax.processResults.bind(this)(data)
data.results.forEach((v) => {
data.results && data.results.forEach((v) => {
if (!this.hasObjects.find((item) => item.value === v.value)) {
this.iHasObjects.push(v)
}

View File

@@ -84,15 +84,11 @@ export default {
default: function() {
return {
hasUpdate: true, // can set function(row, value)
canUpdate: () => {
return !this.$store.getters.currentOrgIsRoot
}, // can set function(row, value)
canUpdate: true, // can set function(row, value)
hasDelete: true, // can set function(row, value)
canDelete: true,
hasClone: true,
canClone: () => {
return !this.$store.getters.currentOrgIsRoot
},
canClone: true,
updateRoute: this.$route.name.replace('List', 'Update'),
cloneRoute: this.$route.name.replace('List', 'Create'),
performDelete: defaultPerformDelete,

View File

@@ -1,5 +1,11 @@
<template>
<el-button ref="deleteButton" size="mini" type="danger" :disabled="iDisabled" @click="onDelete(col, row, cellValue, reload)">
<el-button
ref="deleteButton"
size="mini"
type="danger"
:disabled="iDisabled"
@click="onDelete(col, row, cellValue, reload)"
>
<i class="fa fa-minus" />
</el-button>
</template>

View File

@@ -1,9 +1,10 @@
<template>
<el-link class="detail" :type="col.type || 'success'" @click="goDetail">{{ iTitle }}</el-link>
<el-link class="detail" :disabled="disabled" :type="col.type || 'success'" @click="goDetail">{{ iTitle }}</el-link>
</template>
<script>
import BaseFormatter from './base'
export default {
name: 'DetailFormatter',
extends: BaseFormatter,
@@ -14,7 +15,8 @@ export default {
return {
route: this.$route.name.replace('List', 'Detail'),
getRoute: null,
routeQuery: {},
routeQuery: null,
can: true,
getTitle({ col, row, cellValue }) {
return cellValue
}
@@ -35,6 +37,13 @@ export default {
row: this.row,
cellValue: this.cellValue
})
},
disabled() {
let can = this.formatterArgs.can
if (typeof can === 'function') {
can = can(this.col)
}
return !can
}
},
methods: {
@@ -42,13 +51,17 @@ export default {
// const defaultRoute = this.$route.name.replace('List', 'Detail')
let route = this.formatterArgs.route
if (this.formatterArgs.getRoute && typeof this.formatterArgs.getRoute === 'function') {
route = this.formatterArgs.getRoute({ row: this.row, col: this.col, cellValue: this.cellValue })
route = this.formatterArgs.getRoute({
row: this.row,
col: this.col,
cellValue: this.cellValue
})
}
if (!route) {
console.error('No route found')
return
}
let detailRoute = {}
let detailRoute = { replace: true }
if (typeof route === 'string') {
detailRoute.name = route
detailRoute.params = { id: this.row.id }

View File

@@ -0,0 +1,82 @@
<template>
<div class="content">
<span>{{ currentValue }}</span>
<span class="right">
<el-tooltip
effect="dark"
placement="top"
:content="this.$t('common.View')"
>
<i class="el-icon-view" @click="onShow()" />
</el-tooltip>
<el-tooltip
effect="dark"
placement="top"
:content="this.$t('common.Copy')"
>
<i class="el-icon-copy-document" @click="onCopy()" />
</el-tooltip>
</span>
</div>
</template>
<script>
import BaseFormatter from './base'
export default {
name: 'ShowKeyCopyFormatter',
extends: BaseFormatter,
proops: {
cellValue: {
type: String,
default: () => ''
}
},
data() {
return {
currentValue: this.switchShowValue()
}
},
methods: {
switchShowValue() {
return '******' + this.cellValue.replace(/[\w-]/g, '')
},
onShow() {
const { currentValue, cellValue, switchShowValue } = this
this.currentValue = currentValue === cellValue ? switchShowValue() : cellValue
},
onCopy: _.throttle(function() {
const inputDom = document.createElement('input')
inputDom.id = 'creatInputDom'
inputDom.value = this.cellValue
document.body.appendChild(inputDom)
inputDom.select()
document?.execCommand('copy')
this.$message({
message: this.$t('common.CopySuccess'),
type: 'success',
duration: 1400
})
document.body.removeChild(inputDom)
}, 1800)
}
}
</script>
<style lang="scss" scoped>
.content {
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
.right {
float: right;
font-size: 15px;
cursor: pointer;
.el-icon-view, .el-icon-copy-document {
&:hover {
color: #1c84c6;
}
}
}
}
</style>

View File

@@ -7,6 +7,7 @@ import DeleteActionFormatter from './DeleteActionFormatter'
import DateFormatter from './DateFormatter'
import SystemUserFormatter from './GrantedSystemUsersShowFormatter'
import ShowKeyFormatter from '@/components/TableFormatters/ShowKeyFormatter'
import ShowKeyCopyFormatter from './ShowKeyCopyFormatter'
import DialogDetailFormatter from './DialogDetailFormatter'
import EditableInputFormatter from './EditableInputFormatter'
import StatusFormatter from './StatusFormatter'
@@ -21,6 +22,7 @@ export default {
DateFormatter,
SystemUserFormatter,
ShowKeyFormatter,
ShowKeyCopyFormatter,
DialogDetailFormatter,
ArrayFormatter,
EditableInputFormatter,
@@ -37,6 +39,7 @@ export {
DateFormatter,
SystemUserFormatter,
ShowKeyFormatter,
ShowKeyCopyFormatter,
DialogDetailFormatter,
ArrayFormatter,
EditableInputFormatter,

View File

@@ -102,30 +102,26 @@ export default {
}
},
watch: {
// filterTags: {
// handler(val) {
// this.$nextTick(() => this.$emit('tagSearch', this.filterMaps))
// // this.$emit('tagSearch', this.filterMaps)
// },
// deep: true
// }
options: {
handler(val) {
if (val && val.length > 0) {
const routeFilter = this.checkInTableColumns()
const routerSearch = routeFilter.search || {}
const routerSearchArrs = routerSearch?.value?.split(',') || []
const routerSearchArrsLength = routerSearchArrs.length || 0
if (routerSearch && routerSearchArrsLength > 0) {
for (let i = 0; i < routerSearchArrsLength; i++) {
const cur = routerSearchArrs[i]
routeFilter[`search_${cur}`] = {
...routerSearch,
value: cur
}
let routerSearchAttrs = []
if (typeof routerSearch?.value === 'string') {
routerSearchAttrs = routerSearch?.value?.split(',') || []
}
for (const attr of routerSearchAttrs) {
routeFilter[`search_${attr}`] = {
...routerSearch,
value: attr
}
}
if (routerSearchAttrs.length !== 0) {
delete routeFilter.search
}
const asFilterTags = _.cloneDeep(this.filterTags)
this.filterTags = {
...asFilterTags,
@@ -157,32 +153,32 @@ export default {
const routeQueryKeys = Object.keys(routeQuery)
const routeQueryKeysLength = routeQueryKeys.length
const keys = {}
if (routeQueryKeysLength < 1) return keys
if (routeQueryKeysLength > 0) {
for (let i = 0; i < routeQueryKeysLength; i++) {
const key = routeQueryKeys[i]
let valueDecode = decodeURI(routeQuery[key])
const isSearch = key !== 'search'
const curOptions = this.options || []
for (let k = 0, len = curOptions.length; k < len; k++) {
const cur = curOptions[k]
if (cur?.type === 'boolean') {
valueDecode = !!valueDecode
if (routeQueryKeysLength < 1) {
return keys
}
for (const [key, value] of Object.entries(routeQuery)) {
let valueDecode = decodeURI(value)
const isSearch = key !== 'search'
const curOptions = this.options || []
for (let k = 0, len = curOptions.length; k < len; k++) {
const cur = curOptions[k]
if (cur?.type === 'boolean') {
valueDecode = !!valueDecode
}
if (key === cur.value || !isSearch) {
const curChildren = cur.children || []
keys[key] = {
...cur,
key,
label: isSearch ? cur.label : '',
value: valueDecode
}
if (key === cur.value || !isSearch) {
const curChildren = cur.children || []
keys[key] = {
...cur,
key,
label: isSearch ? cur.label : '',
value: valueDecode
}
if (isSearch && curChildren.length > 0) {
for (const item of curChildren) {
if (valueDecode === item.value) {
keys[key].valueLabel = item.label
break
}
if (isSearch && curChildren.length > 0) {
for (const item of curChildren) {
if (valueDecode === item.value) {
keys[key].valueLabel = item.label
break
}
}
}

View File

@@ -1,7 +1,7 @@
<template>
<el-collapse-transition>
<div style="display: flex;justify-items: center; flex-wrap: nowrap;justify-content:space-between;">
<div v-show="iShowTree" :style="iShowTree?('width:20%;'):('width:0;')" class="transition-box">
<div v-show="iShowTree" :style="iShowTree?('width:20%;'):('width:0;')" class="transition-box left">
<component
:is="component"
ref="AutoDataZTree"
@@ -76,6 +76,9 @@ export default {
deep: true
}
},
mounted() {
// console.log(this.treeSetting)
},
methods: {
handleUrlChange(url) {
this.$set(this.iTableConfig, 'url', url)
@@ -129,4 +132,7 @@ export default {
overflow: auto;
/*border-right: solid 1px red;*/
}
.transition-box.left {
background: #f3f3f3;
}
</style>

1
src/directive/index.js Normal file
View File

@@ -0,0 +1 @@
import './permission'

View File

@@ -0,0 +1,39 @@
import { hasPermission, getRouteRequiredPerms, getApiUrlRequirePerms } from '@/utils/jms'
import permission from './permission'
import Vue from 'vue'
const install = function(Vue) {
Vue.directive('perms', permission)
Vue.prototype.$hasPerm = function(perms) {
return hasPermission(perms)
}
Vue.prototype.$hasApiActionPerm = function(url, action) {
const permsRequired = getApiUrlRequirePerms(url, action)
return hasPermission(permsRequired)
}
Vue.prototype.$getCurrentResActionPerms = function(action) {
return getRouteRequiredPerms(this.$route, action)
}
Vue.prototype.$hasCurrentResAction = function(action) {
const permsRequired = getRouteRequiredPerms(this.$route, action)
return hasPermission(permsRequired)
}
Vue.prototype.$hasLicense = function() {
return this.$store.getters.hasValidLicense
}
Vue.prototype.$isRootOrg = function() {
return this.$store.getters.currentOrgIsRoot
}
}
window['permission'] = permission
Vue.use(install); // eslint-disable-line
permission.install = install
export default permission

View File

@@ -0,0 +1,18 @@
import { hasPermission } from '@/utils/jms'
function checkPermission(el, binding) {
const { value } = binding
if (!hasPermission(value)) {
el.parentNode && el.parentNode.removeChild(el)
}
}
export default {
inserted(el, binding) {
checkPermission(el, binding)
},
update(el, binding) {
checkPermission(el, binding)
}
}

47
src/guards.js Normal file
View File

@@ -0,0 +1,47 @@
/* eslint-disable no-unused-vars */
import router from './router'
import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css' // progress bar style
import { startup } from '@/utils/startup'
import store from '@/store'
import { isSameView } from '@/utils/jms'
NProgress.configure({
showSpinner: false
}) // NProgress Configuration
router.beforeEach(async(to, from, next) => {
// start progress bar
NProgress.start()
try {
await startup({ to, from, next })
next()
} catch (e) {
const msg = 'Start service error: ' + e
console.log(e)
}
})
function generateViewRoutesIfChange({ to, from }) {
const sameView = isSameView(to, from)
if (!sameView) {
return store.dispatch('permission/generateViewRoutes', { to: to, from: from })
}
}
function setPageTitle() {
const currentRoute = router.currentRoute
const loginTitle = store.getters.publicSettings['LOGIN_TITLE']
const routeTitle = currentRoute.meta.title
if (routeTitle) {
document.title = routeTitle + ' - ' + loginTitle
}
}
router.afterEach(async(to, from) => {
// finish progress bar
await setPageTitle()
await generateViewRoutesIfChange({ to, from })
NProgress.done()
})

View File

@@ -26,5 +26,19 @@ export default {
year: 'numeric', month: 'short', day: 'numeric',
hour: 'numeric', minute: 'numeric', hour12: true
}
},
'ja': {
short: {
year: 'numeric', month: 'short', day: 'numeric'
},
medium: {
year: 'numeric', month: '2-digit', day: '2-digit',
hour: '2-digit', minute: '2-digit', second: '2-digit',
hourCycle: 'h23', hour12: false
},
long: {
year: 'numeric', month: 'short', day: 'numeric',
hour: 'numeric', minute: 'numeric', hour12: true
}
}
}

View File

@@ -4,10 +4,15 @@ import locale from 'element-ui/lib/locale'
import VueI18n from 'vue-i18n'
import messages from './langs'
import date from './date'
import VueCookie from 'vue-cookie'
Vue.use(VueI18n)
const cookieLang = VueCookie.get('django_language')
const browserLang = navigator.systemLanguage || navigator.language
let lang = cookieLang || browserLang || 'zh'
lang = lang.slice(0, 2)
const i18n = new VueI18n({
locale: localStorage.lang || 'cn',
locale: lang,
fallbackLocale: 'en',
silentFallbackWarn: true,
silentTranslationWarn: true,

View File

@@ -40,11 +40,12 @@
"vmware_client":"Vmware Client",
"custom":"Custom",
"mysql": "MySQL",
"redis": "Redis",
"oracle": "Oracle",
"postgresql": "PostgreSQL",
"mariadb": "MariaDB",
"sqlserver": "SQLServer",
"redis": "Redis",
"mongodb": "MongoDB",
"k8s": "kubernetes"
},
"applicationsCategory": {
@@ -238,7 +239,10 @@
"User": "User",
"Username": "Username",
"SystemUserName": "System username",
"View": "View"
"View": "View",
"LoginIP": "Login IP",
"LoginCity": "Login city",
"LoginDate": "Login date"
},
"auth": {
"LoginRequiredMsg": "You account has logout, Please login again",
@@ -252,9 +256,14 @@
"IPLoginLimit": "IP login limit",
"Setting": "Setting",
"Certificate": "Certificate",
"Scope": "Type",
"Builtin": "Builtin",
"DateCreated": "Date created",
"UpdatedBy": "Update by",
"ViewMore": "View more",
"Announcement": "Announcement",
"Logging": "Logging",
"RecentLogin": "Recent login",
"Database": "Database",
"Params": "Params",
"MFAVerify": "Verify MFA",
@@ -305,12 +314,15 @@
"Delete": "Delete",
"Disable": "Disable",
"Download": "Download",
"Copy": "Copy",
"CopySuccess": "Copy success",
"Enable": "Enable",
"On/Off": "On/Off",
"EnterForSearch": "Press enter to search",
"Export": "Export",
"Import": "Import",
"ContinueImport": "ContinueImport",
"ImportAll": "Import All",
"Continue": "Continue",
"Stop": "Stop",
"Finished": "Finished",
@@ -379,8 +391,10 @@
"deleteFailedMsg": "Delete failed",
"deleteSelected": "Delete selected",
"deleteSuccessMsg": "Delete success",
"activateSuccessMsg": "Active success",
"deleteWarningMsg": "Are you sure to delete ",
"disableSelected": "Disable selected",
"disableSuccessMsg": "Disable success",
"fieldRequiredError": "This field is required",
"getErrorMsg": "Get failed",
"fileType": "File type",
@@ -405,14 +419,22 @@
},
"isValid": "Is valid",
"nav": {
"TempPassword": "Temporary password",
"APIKey": "API Key",
"AdminPage": "Admin page",
"Workbench": "Workbench",
"Navigation": "Navigation",
"Console": "Console",
"Audits": "Audit",
"HomePage": "Home page",
"QuickAccess": "Quick access",
"SwitchPage": "Switch page",
"Docs": "Docs",
"Help": "Help",
"Logout": "Logout",
"Profile": "Profile",
"Support": "Support",
"UserPage": "User page",
"View": "View",
"EnterpriseEdition": "Enterprise edition"
},
"passwordOrPassphrase": "Password or Passphrase",
@@ -425,6 +447,7 @@
"Loading": "Loading"
},
"updateErrorMsg": "Update failed",
"ErrorMsg": "Error",
"updateSelected": "Update selected",
"updateSuccessMsg": "Update success",
"SelectProperties": "Select properties",
@@ -438,6 +461,7 @@
"SPECIAL_CHAR_REQUIRED": "Special char required",
"MIN_LENGTH_ERROR": "Password minimum length {}"
},
"noAnnouncement": "No announcement",
"lastCannotBeDeleteMsg": "The last one can't be delete",
"InvalidJson": "Not a valid json format",
"time_period": "Time period",
@@ -514,6 +538,7 @@
"Monthly": "Monthly",
"OnlineSessions": "Online sessions",
"OnlineUsers": "Online users",
"ConnectUsers": "Connect users",
"TimesWeekUnit": "times/week",
"TopAssetsOfWeek": "Top assets of week",
"TopUsersOfWeek": "Top user of week",
@@ -566,11 +591,12 @@
"version": "Version",
"versionDetail": "Version detail",
"versionRunExecution": "Version run execution",
"Unkown": "Unkown"
"Unkown": "Unkown",
"Unknown": "Unknown"
},
"perms": {
"": "",
"Actions": "Permission",
"Actions": "Actions",
"Permission": "Permissions",
"Asset": "Asset",
"Basic": "Basic",
@@ -630,10 +656,25 @@
},
"route": {
"": "",
"CreateEndpoint": "Create endpoint",
"UpdateEndpoint": "Update endpoint",
"CreateEndpointRule": "Create endpoint rule",
"UpdateEndpointRule": "Update endpoint rule",
"SystemSetting": "System setting",
"Index": "Index",
"Role": "Role",
"Overview": "Overview",
"OrgRole": "Org role",
"OrgRoles": "Organization roles",
"SystemRole": "System roles",
"RoleList": "Roles",
"RoleCreate": "Role create",
"RoleUpdate": "Role update",
"RoleDetail": "Role detail",
"SessionDetail": "SessionDetail",
"Accounts": "Accounts",
"AssetAccount": "Asset account",
"ApplicationAccount": "Application account",
"AssetAccount": "Asset Account",
"ApplicationAccount": "Application Account",
"Ticket": "Tickets",
"CommandConfirm": "Command confirm",
"AdminUserCreate": "Admin user create",
@@ -650,7 +691,9 @@
"AssetPermissionUpdate": "Asset permissions update",
"AssetUpdate": "Asset update",
"Assets": "Assets",
"Audits": "Audits",
"LogsAudits": "Logs audit",
"SessionsAudit": "Sessions audit",
"SessionList": "Session list",
"BatchCommand": "Batch Command",
"BatchCommandLog": "Batch Command Logs",
"CeleryTaskLog": "Celery task log",
@@ -663,6 +706,7 @@
"CommandFilterUpdate": "Command filter update",
"CommandStorageUpdate": "Command storage update",
"Commands": "Commands",
"FileTransfer": "File transfer",
"CreateCommandStorage": "Create command storage",
"CreateReplayStorage": "Create replay storage",
"Dashboard": "Dashboard",
@@ -700,7 +744,7 @@
"FtpLog": "FTP Logs",
"GatewayCreate": "Gateway create",
"GatewayUpdate": "Gateway update",
"JobCenter": "Jobcenter",
"JobCenter": "Devops",
"LabelCreate": "Label create",
"LabelList": "Labels",
"LabelUpdate": "Label update",
@@ -732,6 +776,7 @@
"Activity": "Activity",
"SessionOffline": "Sessions offline",
"SessionOnline": "Sessions online",
"RecentSession": "Recent session",
"Sessions": "Sessions",
"Settings": "Settings",
"SystemUserCreate": "System user create",
@@ -750,7 +795,7 @@
"UserFirstLogin": "UserFirstLogin",
"UserGroupCreate": "User group create",
"UserGroupDetail": "User group detail",
"UserGroupList": "User Groups",
"UserGroupList": "Groups",
"UserGroupUpdate": "User group update",
"UserGuide": "UserGuide",
"UserList": "Users",
@@ -761,7 +806,16 @@
"WebTerminal": "Web Terminal",
"Notifications": "Notifications",
"SiteMessageList": "Site message",
"UserLoginACL": "User Login ACL"
"UserLoginACL": "User Login ACL",
"UserLoginACLDetail": "User Login ACL",
"NoPermission403": "403 No permission",
"NoPermissionVew": "No permission view current page",
"AjaxError404": "404 ajax error",
"CannotAccess": "Unable to access the current page",
"GoHomePage": "Go home page"
},
"rbac": {
"Permissions": "Permissions"
},
"sessions": {
"SetToDefaultStorage": "Set to default storage",
@@ -840,12 +894,12 @@
"helpText": {
"esUrl": "Tip: If you have multiple hosts, use comma (, ) to split (eg: http://www.jumpserver.a.com, http://www.jumpserver.b.com)",
"esIndex":"Es provides the default index: jumpserver",
"esDocType": "Es provides the default document type: command",
"s3Endpoint": "S3: http://s3.{REGION_NAME}.amazonaws.com<br>S3(China): http://s3.{REGION_NAME}.amazonaws.com.cn<br>Example: http://s3.cn-north-1.amazonaws.com.cn",
"ossEndpoint": "OSS: http://{REGION_NAME}.aliyuncs.com<br>Example: http://oss-cn-hangzhou.aliyuncs.com"
"esDocType": "Es provides the default document type: command"
}
},
"setting": {
"EnableKoKoSSHHelpText": "Enabled, connect assets to display SSH Client pull-up method",
"SettingInEndpointHelpText": "Configure the service address and port in System Settings / Terminal Settings / Service Endpoints",
"Feature": "Feature",
"SMSProvider": "SMS provider",
"SMS": "SMS",
@@ -858,6 +912,7 @@
"SMTP": "SMTP server",
"Setting": "Setting",
"AuthMethod": "Auth methods",
"SSO": "SSO",
"AuthLimit": "Auth limit",
"Ops": "Task",
"OTP": "OTP(MFA)",
@@ -865,6 +920,8 @@
"Cleaning": "Period clean",
"Perms": "Perms",
"CASSetting": "CAS setting",
"CAS": "CAS",
"OIDC": "OIDC",
"Other": "More...",
"Auth": "Auth",
"SyncSetting": "Sync setting",
@@ -937,6 +994,7 @@
"LDAPUser": "LDAP User",
"InsecureCommandAlert": "Insecure command alert",
"helpText": {
"TempPassword": "For a while, there is a period of 300 seconds, failure immediately after use",
"ApiKeyList": "The API key is used to sign the request header. The header of each request is different. Please refer to the usage documentation",
"authLdapSearchFilter": "Choice may be (cn|uid|sAMAccountName)=%(user)s)",
"authLdapSearchOu": "Use | split User OUs",
@@ -1012,7 +1070,7 @@
"refreshLdapCache":"Refreshing Ldap cache ",
"LicenseExpired": "License expired",
"LicenseWillBe": "License will expire at ",
"Expire": "",
"Expire": "Expire",
"WeCom": "WeCom",
"DingTalk": "DingTalk",
"dingTalkTest": "Test",
@@ -1090,12 +1148,19 @@
"UpdateNodeAssetHardwareInfo": "Update node asset hardware information"
},
"users": {
"InviteSuccess": "Invite success",
"FileEncryptionPassword": "File encryption password",
"OrgRoles": "Org roles",
"RoleUsers": "Role users",
"RoleInfo": "Role info",
"RolePerms": "Role perms",
"MessageSubscription": "Message Subscription",
"AuthSettings": "Auth settings",
"UserName": "Name",
"Account": "Account",
"Existing":"Existing",
"AccountInformation": "Account information",
"PersonalSetting": "Personal setting",
"Authentication": "Account",
"Comment": "Comment",
"ConfirmPassword": "Confirm password",
@@ -1127,7 +1192,8 @@
"MFAOfUserFirstLoginPersonalInformationImprovementPage": "Enable multi-factor authentication to make the account more secure <br/> After is enabled, you will enter the multi-factor authentication binding process on your next login <br/> You can also bind directly in (personal information -> fast modifier -> modifier multiple factor Settings)",
"MFAOfUserFirstLoginUserGuidePage": "To protect the security of you and the company <br/> please properly keep your account, password, key and other important and sensitive information <br/> (e.g., set a complex password and enable multi-factor authentication)",
"SSHKeyOfProfileSSHUpdatePage": "Copy your public key here",
"OrgRoleHelpText": "Organizational roles are the user's role in the current organization"
"OrgRoleHelpText": "Organizational roles are the user's role in the current organization",
"addRolePermissions": "After add or update success, set permissions in detail page"
},
"IAgree": "I agree",
"ImprovePersonalInformation": "Improve personal information",
@@ -1146,8 +1212,8 @@
"ResetAndDownloadSSHKey": "Reset and download SSH Key",
"ResetPublicKeyAndDownload": "Reset public key and download",
"Role": "Role",
"SuperRole": "Super role",
"OrgRole": "Org role",
"SystemRoles": "System roles",
"OrgRole": "Org roles",
"SSHKey": "SSH Key",
"SSHKeySetting": "SSH Key setting",
"Secure": "Secure",
@@ -1211,6 +1277,7 @@
"Sender": "Sender",
"MarkAsRead": "Mark as read",
"OneClickRead": "Currently read",
"AllClickRead": "All read",
"OneClickReadMsg": "Are you sure you want to mark the current information as read?",
"NoUnreadMsg": "No unread messages",
"SiteMessage": "Site messages",
@@ -1225,6 +1292,7 @@
"officialWebsiteTip": "You can change the URL of the site navigation bar help -> Website",
"Admin": "Admin",
"Asset": "Asset",
"ip": "IP",
"Database": "Database",
"AssetCount": "Asset count",
"Auditor": "Auditor",
@@ -1291,15 +1359,16 @@
"AccountBackupPlan": {
"Types": "Types",
"Backup": "Backup",
"AccountBackupPlan": "Account backup plan",
"AccountBackupPlanreate": "Account backup plan",
"AccountBackupPlanUpdate": "Account backup plan",
"AccountBackupPlan": "Account Backup Plan",
"AccountBackupPlanCreate": "Account backup plan create",
"AccountBackupPlanUpdate": "Account backup plan update",
"ExecutionDetail": "Execution detail",
"MailRecipient": "Mail recipient",
"IsSuccess": "Is success",
"Reason": "Reason"
},
"Cloud": {
"CloudSync": "Cloud sync",
"ServerAccountKey": "Server Account Key",
"IPNetworkSegment": "Ip Network Segment",
"Aliyun": "Ali Cloud",
@@ -1311,6 +1380,8 @@
"AWS_China": "AWS(China)",
"AWS_Int": "AWS(International)",
"HuaweiCloud": "Huawei Cloud",
"BaiduCloud": "Baidu Cloud",
"JDCloud": "JD Cloud",
"Azure":"Azure(China)",
"Azure_Int": "Azure(International)",
"HostnameStrategy": "Used to produce the asset hostname. For example, 1. Instance name (instanceDemo)2. Instance name and Partial IP (instanceDemo-250.1)",
@@ -1376,7 +1447,9 @@
"InterfaceSettings": "Interface Setting",
"License": "License",
"LicenseDetail": "License detail",
"SystemMonitor": "System Monitor",
"ComponentMonitor": "System Monitor",
"Endpoint": "Endpoint",
"EndpointRule": "Endpoint rule",
"ServiceRatio": "Service ratio",
"LoadStatus":"Status",
"NormalLoad":"Normal",
@@ -1387,7 +1460,9 @@
"NoLicense": "No License",
"Node": "Node",
"Organization": {
"AllOrganization": "All organization",
"OrganizationCreate": "Create organization",
"OrganizationLists": "Organization lists",
"OrganizationDetail": "Org detail",
"OrganizationList": "Organizations",
"OrganizationUpdate": "Update org",

View File

@@ -1,15 +1,21 @@
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
import enLocale from 'element-ui/lib/locale/lang/en'
import zh from './cn.json'
import jaLocale from 'element-ui/lib/locale/lang/ja'
import zh from './zh.json'
import en from './en.json'
import ja from './ja.json'
export default {
cn: {
zh: {
...zhLocale,
...zh
},
en: {
...enLocale,
...en
},
ja: {
...jaLocale,
...ja
}
}

1560
src/i18n/langs/ja.json Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,8 @@ import json
i18n_report_path = '/tmp/abc.json'
lang_paths = {
'cn': 'cn.json',
'en': 'en.json'
'en': 'en.json',
'ja': 'ja.json'
}
@@ -51,5 +52,5 @@ def remove_keys(lang):
f.write(data)
for i in ['cn', 'en']:
for i in ['cn', 'en', 'ja']:
remove_keys(i)

View File

@@ -45,11 +45,12 @@
"vmware_client":"Vmware Client",
"custom":"Custom",
"mysql": "MySQL",
"redis": "Redis",
"oracle": "Oracle",
"postgresql": "PostgreSQL",
"mariadb": "MariaDB",
"sqlserver": "SQLServer",
"redis": "Redis",
"mongodb": "MongoDB",
"k8s": "Kubernetes"
},
"applicationsCategory": {
@@ -243,13 +244,17 @@
"User": "用户",
"Username": "用户名",
"View": "查看",
"SystemUserName": "系统用户名"
"SystemUserName": "系统用户名",
"LoginIP": "登录IP",
"LoginCity": "登录城市",
"LoginDate": "登录日期"
},
"auth": {
"LoginRequiredMsg": "账号已退出,请重新登录",
"ReLogin": "重新登录"
},
"common": {
"Component": "组件",
"PrivateCloud": "私有云",
"PublicCloud": "公有云",
"Correlation": "关联",
@@ -257,9 +262,14 @@
"IPLoginLimit": "IP 登录限制",
"Setting": "设置",
"Certificate": "证书",
"Scope": "类别",
"Builtin": "内置",
"DateCreated": "创建日期",
"UpdatedBy": "更新者",
"ViewMore": "查看更多",
"Announcement": "公告",
"Logging": "日志记录",
"RecentLogin": "最近登录",
"Database": "数据库记录",
"Params": "参数",
"BasicInfo": "基本信息",
@@ -317,12 +327,15 @@
"Delete": "删除",
"Disable": "禁用",
"Download": "下载",
"Copy": "复制",
"CopySuccess": "复制成功",
"Enable": "启用",
"On/Off": "启/停",
"EnterForSearch": "按回车进行搜索",
"Export": "导出",
"Import": "导入",
"ContinueImport": "继续导入",
"ImportAll": "导入全部",
"Continue": "继续",
"Stop": "停止",
"Finished": "完成",
@@ -342,7 +355,7 @@
"NoData": "暂无数据",
"Open": "打开",
"Other": "其它",
"Others": "其",
"Others": "其",
"Push": "推送",
"QuickUpdate": "快速更新",
"RemoveSuccessMsg": "移除成功",
@@ -388,8 +401,10 @@
"deleteFailedMsg": "删除失败",
"deleteSelected": "删除所选",
"deleteSuccessMsg": "删除成功",
"activateSuccessMsg": "激活成功",
"deleteWarningMsg": "你确定要删除",
"disableSelected": "禁用所选",
"disableSuccessMsg": "禁用成功",
"fieldRequiredError": "这个字段是必填项",
"getErrorMsg": "获取失败",
"MFAErrorMsg": "MFA错误请检查",
@@ -417,14 +432,22 @@
"fileType": "文件类型",
"isValid": "有效",
"nav": {
"TempPassword": "临时密码",
"APIKey": "API Key",
"AdminPage": "管理页面",
"Workbench": "工作台",
"Navigation": "导航",
"Console": "控制台",
"Audits": "审计台",
"HomePage": "首页",
"QuickAccess": "快速访问",
"SwitchPage": "切换视图",
"Docs": "文档",
"Help": "帮助",
"Logout": "退出登录",
"Profile": "个人信息",
"Support": "支持",
"UserPage": "用户页面",
"UserPage": "用户视图",
"View": "视图",
"EnterpriseEdition": "企业版"
},
"passwordOrPassphrase": "密码或密钥密码",
@@ -437,6 +460,7 @@
"Loading": "加载中"
},
"updateErrorMsg": "更新失败",
"ErrorMsg": "错误",
"updateSelected": "更新所选",
"updateSuccessMsg": "更新成功",
"SelectProperties": "选择属性",
@@ -450,6 +474,7 @@
"SPECIAL_CHAR_REQUIRED": "须包含特殊字符",
"MIN_LENGTH_ERROR": "密码最小长度 {0} 位"
},
"noAnnouncement": "暂无公告",
"lastCannotBeDeleteMsg": "最后一项,不能被删除",
"InvalidJson": "不是合法 JSON",
"time_period": "时段",
@@ -525,6 +550,7 @@
"Monthly": "按月",
"OnlineSessions": "在线会话",
"OnlineUsers": "在线用户",
"ConnectUsers": "连接用户",
"TimesWeekUnit": "次/周",
"TopAssetsOfWeek": "周资产 TOP10",
"TopUsersOfWeek": "周用户 TOP10",
@@ -577,11 +603,12 @@
"version": "版本",
"versionDetail": "版本详情",
"versionRunExecution": "执行历史",
"Unkown": "未知"
"Unkown": "未知",
"Unknown": "未知"
},
"perms": {
"": "",
"Actions": "权限",
"Actions": "动作",
"Asset": "资产",
"Basic": "基本",
"Exclude": "不包含",
@@ -628,7 +655,7 @@
"appsList":"应用列表",
"DatabaseAppCount": "数据库应用数量",
"KubernetesAppCount": "Kubernetes应用数量",
"systemUserCount": "系统用户数量",
"systemUserCount": "系统用户",
"upDownload": "上传下载",
"uploadFile": "上传文件",
"clipboardCopyPaste":"剪贴板复制粘贴",
@@ -640,6 +667,21 @@
},
"route": {
"": "",
"CreateEndpoint": "创建端点",
"UpdateEndpoint": "更新端点",
"CreateEndpointRule": "创建端点规则",
"UpdateEndpointRule": "更新端点规则",
"Index": "首页",
"SystemSetting": "系统设置",
"WorkBench": "工作台",
"Role": "角色",
"Overview": "概览",
"RoleDetail": "角色详情",
"RoleList": "角色列表",
"RoleCreate": "创建角色",
"RoleUpdate": "更新角色",
"OrgRole": "组织角色",
"SystemRole": "系统角色",
"TicketFlow": "工单流",
"TicketFlowCreate": "创建审批流",
"TicketFlowUpdate": "更新审批流",
@@ -664,8 +706,13 @@
"AssetPermissionUpdate": "更新资产授权规则",
"AssetUpdate": "更新资产",
"Assets": "资产管理",
"Audits": "日志审计",
"SessionsAudit": "会话审计",
"LogsAudit": "日志审计",
"SessionList": "会话记录",
"BatchCommand": "批量命令",
"TicketsTodo": "待办工单",
"TicketsDone": "已办工单",
"TicketsNew": "提交工单",
"BatchCommandLog": "批量命令",
"CeleryTaskLog": "Celery任务日志",
"CommandExecutions": "命令执行",
@@ -677,6 +724,7 @@
"CommandFilterUpdate": "更新命令过滤器",
"CommandStorageUpdate": "更新命令存储",
"Commands": "命令记录",
"FileTransfer": "文件传输",
"CreateCommandStorage": "创建命令存储",
"CreateReplayStorage": "创建录像存储",
"Dashboard": "仪表盘",
@@ -745,6 +793,7 @@
"Detail": "详情",
"SessionOffline": "历史会话",
"SessionOnline": "在线会话",
"RecentSession": "最近会话",
"Sessions": "会话管理",
"Settings": "系统设置",
"SystemUserCreate": "创建系统用户",
@@ -758,7 +807,7 @@
"Terminal": "终端管理",
"TicketDetail": "工单详情",
"TicketCreate": "创建工单",
"Tickets": "工单管理",
"Tickets": "工单列表",
"Templates": "模版管理",
"TemplateDetail": "模版详情",
"TemplateCreate": "创建模版",
@@ -779,7 +828,16 @@
"WebTerminal": "Web终端",
"Notifications": "通知",
"SiteMessageList": "站内信",
"UserLoginACL": "用户登录"
"UserLoginACL": "用户登录",
"UserLoginACLDetail": "用户登录限制",
"NoPermission403": "403 暂无权限",
"NoPermissionVew": "没有权限查看当前页面",
"AjaxError404": "404 请求错误",
"CannotAccess": "无法访问当前页面",
"GoHomePage": "去往首页"
},
"rbac": {
"Permissions": "权限"
},
"sessions": {
"SetToDefaultStorage": "设置为默认存储",
@@ -858,12 +916,12 @@
"helpText": {
"esUrl": "提示:如果有多台主机,请使用逗号 ( , ) 进行分割。eg: http://www.jumpserver.a.com:3000,http://www.jumpserver.b.com:3000",
"esIndex": "es提供默认indexjumpserver",
"esDocType": "es默认文档类型command",
"s3Endpoint": "S3 格式: http://s3.{REGION_NAME}.amazonaws.com<br>S3(China) 格式: http://s3.{REGION_NAME}.amazonaws.com.cn<br>如: http://s3.cn-north-1.amazonaws.com.cn",
"ossEndpoint": "OSS 格式: http://{REGION_NAME}.aliyuncs.com<br>如: http://oss-cn-hangzhou.aliyuncs.com"
"esDocType": "es默认文档类型command"
}
},
"setting": {
"EnableKoKoSSHHelpText": "开启时连接资产会显示 SSH Client 拉起方式",
"SettingInEndpointHelpText": "在 系统设置 / 终端设置 / 服务端点 中配置服务地址和端口",
"Feature": "功能",
"AlibabaCloud": "阿里云",
"TencentCloud": "腾讯云",
@@ -886,6 +944,8 @@
"Cleaning": "定期清理",
"Other": "其它设置",
"CASSetting": "CAS 配置",
"CAS": "CAS",
"OIDC": "OIDC",
"Auth": "认证设置",
"SyncSetting": "同步设置",
"Advanced": "高级设置",
@@ -961,6 +1021,7 @@
"LDAPServerInfo": "LDAP 服务器",
"LDAPUser": "LDAP 用户",
"helpText": {
"TempPassword": "临时密码有效期为 300 秒,使用后立刻失效",
"ApiKeyList": "使用api key签名请求头每个请求的头部是不一样的, 请查阅使用文档",
"authLdapSearchFilter": "可能的选项是(cn或uid或sAMAccountName=%(user)s)",
"authLdapSearchOu": "使用|分隔各OU",
@@ -1127,11 +1188,17 @@
"UpdateNodeAssetHardwareInfo": "更新节点资产硬件信息"
},
"users": {
"InviteSuccess": "邀请成功",
"FileEncryptionPassword": "文件加密密码",
"RoleUsers": "授权用户",
"RoleInfo": "角色信息",
"RolePerms": "角色权限",
"MessageSubscription": "消息订阅",
"AuthSettings": "认证配置",
"UserName": "姓名",
"Account": "账户",
"AccountInformation": "账号信息",
"PersonalSetting": "个人设置",
"Authentication": "认证",
"Comment": "备注",
"ConfirmPassword": "确认密码",
@@ -1162,7 +1229,8 @@
"MFAOfUserFirstLoginPersonalInformationImprovementPage": "启用多因子认证,使账号更加安全。<br/> 启用之后您将会在下次登录时进入多因子认证绑定流程;您也可以在(个人信息->快速修改->更改多因子设置)中直接绑定!",
"MFAOfUserFirstLoginUserGuidePage": "为了保护您和公司的安全,请妥善保管您的账户、密码和密钥等重要敏感信息;(如:设置复杂密码,并启用多因子认证)",
"SSHKeyOfProfileSSHUpdatePage": "复制你的公钥到这里",
"OrgRoleHelpText": "组织角色是用户在当前组织中的角色"
"OrgRoleHelpText": "组织角色是用户在当前组织中的角色",
"addRolePermissions": "创建/更新成功后,详情中添加权限"
},
"IAgree": "我同意",
"ImprovePersonalInformation": "完善个人信息",
@@ -1182,8 +1250,8 @@
"ResetAndDownloadSSHKey": "重置并下载密钥",
"ResetPublicKeyAndDownload": "重置并下载SSH密钥",
"Role": "角色",
"SuperRole": "系统角色",
"OrgRole": "组织角色",
"SystemRoles": "系统角色",
"OrgRoles": "组织角色",
"SSHKey": "SSH公钥",
"SSHKeySetting": "SSH公钥设置",
"Secure": "安全",
@@ -1250,6 +1318,7 @@
"Sender": "发送人",
"MarkAsRead": "标记已读",
"OneClickRead": "当前已读",
"AllClickRead": "全部已读",
"OneClickReadMsg": "你确定要将当前信息标记为已读吗?",
"NoUnreadMsg": "暂无未读消息",
"SiteMessage": "站内信",
@@ -1265,6 +1334,7 @@
"officialWebsiteTip": "可以更改网站导航栏 帮助 -> 官网 的网址",
"Admin": "管理员",
"Asset": "资产",
"ip": "IP",
"Database": "数据库",
"AssetCount": "资产数量",
"Auditor": "审计员",
@@ -1342,6 +1412,7 @@
"Reason": "原因"
},
"Cloud": {
"CloudSync": "云同步",
"ServerAccountKey": "服务账号密钥",
"IPNetworkSegment": "IP网段",
"Aliyun": "阿里云",
@@ -1353,6 +1424,8 @@
"AWS_China": "AWS(中国)",
"AWS_Int": "AWS(国际)",
"HuaweiCloud": "华为云",
"BaiduCloud": "百度云",
"JDCloud": "京东云",
"Azure":"Azure(中国)",
"Azure_Int": "Azure(国际)",
"HostnameStrategy": "用于生成资产主机名。例如1. 实例名称 (instanceDemo)2. 实例名称和部分IP(后两位) (instanceDemo-250.1)",
@@ -1420,7 +1493,9 @@
"ImportLicenseTip": "请导入许可证",
"InterfaceSettings": "界面设置",
"License": "许可证",
"SystemMonitor": "系统监控",
"ComponentMonitor": "组件监控",
"Endpoint": "服务端点",
"EndpointRule": "端点规则",
"ServiceRatio": "组件负载统计",
"LoadStatus":"组件状态",
"NormalLoad":"正常",
@@ -1432,7 +1507,9 @@
"NoLicense": "暂无许可证",
"Node": "节点",
"Organization": {
"AllOrganization": "所有组织",
"OrganizationCreate": "创建组织",
"OrganizationLists": "组织列表",
"OrganizationDetail": "组织详情",
"OrganizationList": "组织管理",
"OrganizationUpdate": "更新组织",
@@ -1440,14 +1517,14 @@
"DeleteOrgTitle": "请确保组织内的以下信息已删除",
"DeleteOrgMsg": "用户列表、用户组、资产列表、网域列表、管理用户、系统用户、标签管理、资产授权规则",
"OrgRole": "组织角色",
"users_amount": "用户数量",
"groups_amount": "用户组数量",
"assets_amount": "资产数量",
"admin_users_amount": "特权用户数量",
"system_users_amount": "系统用户数量",
"applications_amount": "应用数量",
"asset_perms_amount": "资产授权数量",
"app_perms_amount": "应用授权数量",
"users_amount": "用户",
"groups_amount": "用户组",
"assets_amount": "资产",
"admin_users_amount": "特权用户",
"system_users_amount": "系统用户",
"applications_amount": "应用",
"asset_perms_amount": "资产授权",
"app_perms_amount": "应用授权",
"CreateOrgMsg": "请去组织详情内添加用户",
"AddOrgMembers": "添加组织成员"
},

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1645509697274" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2361" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M867.046319 156.952658 156.952658 156.952658c-49.040926 0-88.317465 39.720653-88.317465 88.76158l-0.444115 532.570501c0 49.040926 39.720653 88.76158 88.76158 88.76158l710.09366 0c49.040926 0 88.76158-39.720653 88.76158-88.76158L955.807898 245.714238C955.808922 196.673311 916.087245 156.952658 867.046319 156.952658zM867.046319 334.476841l-355.047342 221.903949-355.047342-221.903949 0-88.76158 355.047342 221.903949 355.047342-221.903949L867.046319 334.476841z" p-id="2362"></path></svg>

After

Width:  |  Height:  |  Size: 865 B

2
src/icons/svg/email.svg Normal file
View File

@@ -0,0 +1,2 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg t="1644305786242" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7592" width="160" height="160"><path d="M64 186.688 512 506.688 960 186.688 960 272 512 592 64 272Z" p-id="7593"></path><path d="M0 128l0 768 1024 0L1024 128 0 128zM960 832 64 832 64 192l896 0L960 832z" p-id="7594"></path></svg>

After

Width:  |  Height:  |  Size: 479 B

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1584946926481" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2735" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z" p-id="2736"></path></svg>

After

Width:  |  Height:  |  Size: 868 B

2
src/icons/svg/logout.svg Normal file
View File

@@ -0,0 +1,2 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg t="1644392731383" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2175" width="660" height="660"><path d="M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5-32.6 32.5-70.5 58.1-112.7 75.9-43.6 18.4-90 27.8-137.9 27.8-47.9 0-94.3-9.4-137.9-27.8-42.2-17.8-80.1-43.4-112.7-75.9-32.6-32.5-58.1-70.4-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-0.4-12.3-6.7-12.3z" p-id="2176"></path><path d="M956.9 505.7L815 393.7c-5.3-4.2-13-0.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112c4.1-3.2 4.1-9.4 0-12.6z" p-id="2177"></path></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1645523497356" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8682" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M512.5 390.6c-29.9 0-57.9 11.6-79.1 32.8-21.1 21.2-32.8 49.2-32.8 79.1 0 29.9 11.7 57.9 32.8 79.1 21.2 21.1 49.2 32.8 79.1 32.8 29.9 0 57.9-11.7 79.1-32.8 21.1-21.2 32.8-49.2 32.8-79.1 0-29.9-11.7-57.9-32.8-79.1-21.2-21.2-49.2-32.8-79.1-32.8z" p-id="8683"></path><path d="M924.8 626.1l-65.4-55.9c3.1-19 4.7-38.4 4.7-57.7s-1.6-38.8-4.7-57.7l65.4-55.9c10.1-8.6 13.8-22.6 9.3-35.2l-0.9-2.6c-18.1-50.4-44.8-96.8-79.6-137.7l-1.8-2.1c-8.6-10.1-22.5-13.9-35.1-9.5l-81.2 28.9c-30-24.6-63.4-44-99.6-57.5l-15.7-84.9c-2.4-13.1-12.7-23.3-25.8-25.7l-2.7-0.5c-52-9.4-106.8-9.4-158.8 0l-2.7 0.5c-13.1 2.4-23.4 12.6-25.8 25.7l-15.8 85.3c-35.9 13.6-69.1 32.9-98.9 57.3l-81.8-29.1c-12.5-4.4-26.5-0.7-35.1 9.5l-1.8 2.1c-34.8 41.1-61.5 87.4-79.6 137.7l-0.9 2.6c-4.5 12.5-0.8 26.5 9.3 35.2l66.2 56.5c-3.1 18.8-4.6 38-4.6 57 0 19.2 1.5 38.4 4.6 57l-66 56.5c-10.1 8.6-13.8 22.6-9.3 35.2l0.9 2.6c18.1 50.3 44.8 96.8 79.6 137.7l1.8 2.1c8.6 10.1 22.5 13.9 35.1 9.5l81.8-29.1c29.8 24.5 63 43.9 98.9 57.3l15.8 85.3c2.4 13.1 12.7 23.3 25.8 25.7l2.7 0.5c26.1 4.7 52.7 7.1 79.4 7.1 26.7 0 53.4-2.4 79.4-7.1l2.7-0.5c13.1-2.4 23.4-12.6 25.8-25.7l15.7-84.9c36.2-13.6 69.6-32.9 99.6-57.5l81.2 28.9c12.5 4.4 26.5 0.7 35.1-9.5l1.8-2.1c34.8-41.1 61.5-87.4 79.6-137.7l0.9-2.6c4.3-12.4 0.6-26.3-9.5-35z m-412.3 52.2c-97.1 0-175.8-78.7-175.8-175.8s78.7-175.8 175.8-175.8 175.8 78.7 175.8 175.8-78.7 175.8-175.8 175.8z" p-id="8684"></path></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1645506884918" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2221" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M872.554667 306.304c-22.613333 8.128-45.696 9.941333-69.162667 4.373333a119.722667 119.722667 0 0 1-85.504-158.144c1.749333-4.842667 0.853333-6.954667-3.605333-8.96-17.92-8.106667-35.541333-16.917333-53.674667-24.533333-11.925333-4.992-24.533333-8.384-36.501333-12.373333-23.146667 47.658667-59.456 74.88-112.064 74.88-52.821333 0-89.258667-27.306667-111.978667-74.538667a411.733333 411.733333 0 0 0-95.530667 39.573333c17.216 49.493333 10.922667 94.634667-26.538666 131.925334-37.376 37.205333-82.496 43.712-131.776 26.282666A413.290667 413.290667 0 0 0 106.666667 400.298667c46.933333 22.656 74.197333 58.666667 74.517333 110.997333 0.32 53.162667-26.986667 89.770667-74.538667 112.768a410.154667 410.154667 0 0 0 39.637334 95.530667c47.808-16.789333 91.669333-11.370667 128.64 23.253333 39.957333 37.44 47.274667 83.626667 29.653333 134.933333a404.949333 404.949333 0 0 0 95.530667 39.466667c23.04-47.36 59.349333-74.474667 111.978666-74.453333 52.885333 0.064 89.216 27.541333 111.893334 74.538666a411.584 411.584 0 0 0 95.488-39.616c-17.386667-49.493333-10.816-94.4 26.24-131.626666 37.290667-37.418667 82.432-43.776 132.053333-26.538667a407.637333 407.637333 0 0 0 39.509333-95.509333c-47.786667-23.210667-74.986667-59.946667-74.517333-113.066667 0.448-52.053333 27.562667-87.957333 74.56-110.656a420.394667 420.394667 0 0 0-38.016-92.970667c-2.048-3.712-4.309333-1.92-6.762667-1.066666z m85.952 82.794667a42.666667 42.666667 0 0 1-22.613334 49.642666c-34.602667 16.725333-50.176 39.146667-50.453333 72.618667-0.298667 34.282667 15.253333 57.194667 50.496 74.304a42.666667 42.666667 0 0 1 22.549333 49.536 450.304 450.304 0 0 1-43.669333 105.472 42.666667 42.666667 0 0 1-51.050667 19.178667c-36.650667-12.736-63.850667-7.68-87.808 16.362666-23.914667 24.021333-28.949333 51.093333-16.213333 87.381334a42.666667 42.666667 0 0 1-19.072 51.178666 454.229333 454.229333 0 0 1-105.344 43.690667 42.666667 42.666667 0 0 1-49.770667-22.592c-16.725333-34.688-39.509333-50.368-73.493333-50.389333-33.92-0.021333-56.597333 15.509333-73.578667 50.432a42.666667 42.666667 0 0 1-49.322666 22.570666 447.338667 447.338667 0 0 1-105.6-43.562666 42.666667 42.666667 0 0 1-19.328-50.986667c13.034667-37.973333 7.381333-65.728-18.474667-89.941333-23.594667-22.101333-50.090667-26.517333-85.333333-14.144a42.666667 42.666667 0 0 1-51.157334-19.050667 452.821333 452.821333 0 0 1-43.733333-105.450667 42.666667 42.666667 0 0 1 22.549333-49.706666c35.072-16.938667 50.666667-39.808 50.453334-74.069334-0.213333-33.642667-15.786667-56.149333-50.389334-72.853333A42.666667 42.666667 0 0 1 65.493333 389.12a455.808 455.808 0 0 1 43.541334-105.344 42.666667 42.666667 0 0 1 51.392-19.242667c36.096 12.778667 63.317333 7.722667 87.466666-16.298666 24-23.893333 29.034667-51.072 16.32-87.68a42.666667 42.666667 0 0 1 19.178667-51.050667 454.4 454.4 0 0 1 105.386667-43.669333 42.666667 42.666667 0 0 1 49.706666 22.656c16.725333 34.730667 39.509333 50.389333 73.536 50.368 33.898667 0 56.576-15.616 73.664-50.837334a42.666667 42.666667 0 0 1 51.882667-21.845333c2.517333 0.832 4.992 1.621333 9.28 2.965333l7.530667 2.346667c8.96 2.88 15.786667 5.290667 22.698666 8.192 10.154667 4.245333 18.090667 7.872 35.029334 15.829333 10.069333 4.736 14.4 6.741333 19.733333 9.152 25.024 11.306667 35.349333 36.821333 26.154667 62.336-16 44.352 9.344 91.221333 55.253333 102.144 14.805333 3.52 29.418667 2.538667 44.864-3.029333a33.28 33.28 0 0 1 4.48-1.621333c5.269333-1.621333 10.88-2.453333 17.322667-1.941334 16.853333 1.344 29.525333 11.093333 36.736 24.170667a462.890667 462.890667 0 0 1 41.813333 102.357333zM522.666667 320a202.666667 202.666667 0 1 0 166.4 86.954667 21.333333 21.333333 0 0 0-35.008 24.384 160 160 0 1 1-69.184-56.128 21.333333 21.333333 0 0 0 16.597333-39.317334A202.090667 202.090667 0 0 0 522.666667 320z" fill="#3D3D3D" p-id="2222"></path></svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1645509489750" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1546" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M1021.5936 836.5056 702.3616 480.9216 1021.0304 185.0368C1022.5152 189.3376 1023.8976 193.6896 1023.8976 198.3488L1023.8976 825.6C1023.8976 829.4912 1022.5664 832.9216 1021.5936 836.5056ZM39.168 155.1872C42.0864 154.6752 44.6464 153.5488 47.5648 153.5488L976.5376 153.5488C979.456 153.5488 982.0672 154.6752 984.9344 155.1872L512.0512 572.416 39.168 155.1872ZM2.4576 836.5568C1.536 832.9728 0.1024 829.5424 0.1024 825.6L0.1024 198.3488C0.1024 193.5872 1.5872 189.2864 3.0208 184.9856L321.8432 480.9216 2.4576 836.5568ZM496.8448 618.8032C501.248 622.336 506.6752 624.0256 512.0512 624.0256 517.4784 624.0256 522.8032 622.336 527.1552 618.8032L665.7536 509.7472 988.1088 868.1984C984.32 869.12 980.6336 870.4512 976.5376 870.4512L47.5648 870.4512C43.52 870.4512 39.8336 869.12 36.096 868.1984L358.4 509.7472 496.8448 618.8032Z" p-id="1547"></path></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1645509271413" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3715" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M0 128v768h1024V128H0z m242.816 577.536L192 654.72l154.304-154.368L192 346.048l50.816-50.816L448 500.352l-205.184 205.184z m584.32 13.248H512V640h315.072v78.72z" fill="#262626" p-id="3716"></path></svg>

After

Width:  |  Height:  |  Size: 579 B

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1645509388374" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3850" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M0 64l0 896 1024 0 0-896-1024 0zM960 896l-896 0 0-768 896 0 0 768zM896 192l-768 0 0 640 768 0 0-640zM448 512l-64 0 0 64-64 0 0 64-64 0 0-64 64 0 0-64 64 0 0-64-64 0 0-64-64 0 0-64 64 0 0 64 64 0 0 64 64 0 0 64zM704 640l-192 0 0-64 192 0 0 64z" p-id="3851"></path></svg>

After

Width:  |  Height:  |  Size: 646 B

View File

@@ -32,7 +32,7 @@ export default {
/*padding: 10px 20px 10px;*/
}
.fixed-header+.app-main {
padding-top: 50px;
padding-top: 55px;
}
.hasTagsView {
.app-main {

View File

@@ -153,12 +153,14 @@ export default {
msgLinkName = res.hostname
}
const h = this.$createElement
const detailRoute = this.objectDetailRoute
detailRoute.params = { id: res.id }
if (this.hasDetailInMsg) {
this.$message({
message: h('p', null, [
h('el-link', {
on: {
click: () => this.$router.push(this.objectDetailRoute)
click: () => this.$router.push(detailRoute)
},
style: { 'vertical-align': 'top' }
}, msgLinkName),
@@ -181,7 +183,7 @@ export default {
default(res, method, vm, addContinue) {
const route = this.getNextRoute(res, method)
if (!(route.params && route.params.id)) {
route['params'] = { 'id': res.id }
route['params'] = Object.assign(route['params'] || {}, { 'id': res.id })
}
this.$emit('submitSuccess', res)
@@ -194,6 +196,7 @@ export default {
onPerformError: {
type: Function,
default(error, method, vm) {
this.$log.error('error: ', error)
this.$emit('submitError', error)
const response = error.response
const data = response.data

View File

@@ -28,10 +28,20 @@ export default {
ActionsGroup
},
props: {
url: {
type: String,
required: false,
default: ''
},
object: {
type: Object,
required: true
},
titlePrefix: {
type: String,
required: false,
default: ''
},
title: {
type: String,
default: ''
@@ -61,12 +71,11 @@ export default {
getTitle: {
type: Function,
default: function(obj) {
const objectType = this.$route.meta.title
.replace('Detail', '')
.replace('详情', '')
const objectType = this.$route.meta.title.replace('Detail', '').replace('详情', '')
this.$log.debug('Object is: ', obj)
const titlePrefix = this.titlePrefix || objectType
const objectName = this.getObjectName(obj)
let title = `${objectType}: ${objectName}`
let title = `${titlePrefix}: ${objectName}`
if (title.length > 80) {
title = title.slice(0, 80) + '...'
}
@@ -82,20 +91,29 @@ export default {
},
data() {
const vm = this
const detailApiUrl = (function() {
if (vm.url) {
return `${vm.url}/${vm.$route.params.id}/`
} else {
return getApiPath(vm)
}
}())
const defaultActions = {
canDelete: true,
deleteCallback: function(item) { this.defaultDelete(item) },
deleteApiUrl: getApiPath(this),
// Delete button
canDelete: vm.$hasCurrentResAction('delete'),
deleteCallback: function(item) { vm.defaultDelete(item) },
deleteApiUrl: detailApiUrl,
deleteSuccessRoute: this.$route.name.replace('Detail', 'List'),
// Update button
canUpdate: () => {
return !vm.currentOrgIsRoot
return !vm.currentOrgIsRoot && vm.$hasCurrentResAction('change')
},
updateCallback: function(item) { this.defaultUpdate(item) },
updateRoute: this.$route.name.replace('Detail', 'Update'),
detailApiUrl: getApiPath(this)
updateRoute: this.$route.name.replace('Detail', 'Update')
}
return {
defaultActions: defaultActions,
detailApiUrl,
defaultActions,
loading: true,
validActions: Object.assign(defaultActions, this.actions)
}
@@ -146,7 +164,7 @@ export default {
defaultDelete() {
const msg = this.$t('common.deleteWarningMsg') + ' ' + this.iTitle + ' ?'
const title = this.$t('common.Info')
const performDelete = async function() {
const performDelete = () => {
const url = this.validActions.deleteApiUrl
this.$log.debug('Start perform delete: ', url)
return this.$axios.delete(url)
@@ -183,7 +201,8 @@ export default {
this.$router.push(route)
},
getObject() {
const url = this.validActions.detailApiUrl
// 兼容之前的 detailApiUrl
const url = this.validActions.detailApiUrl || this.detailApiUrl
return this.$axios.get(url, { disableFlashErrorMsg: true }).then(data => {
this.$emit('update:object', data)
this.$emit('getObjectDone', data)

View File

@@ -4,23 +4,17 @@
<script>
import ListTable from '@/components/ListTable/index'
import { mapGetters } from 'vuex'
export default {
name: 'GenericListTable',
components: {
ListTable
},
computed: {
...mapGetters(['currentOrgIsRoot'])
},
created() {
const headerActions = this.$attrs['header-actions'] || {}
if (headerActions.canCreate === undefined && this.currentOrgIsRoot) {
_.set(this.$attrs, 'header-actions.canCreate', false)
}
if (headerActions.hasImport === undefined && this.currentOrgIsRoot) {
_.set(this.$attrs, 'header-actions.hasImport', false)
}
},
methods: {
}
}
</script>

View File

@@ -7,15 +7,22 @@
:show-cancel="false"
:show-confirm="false"
>
<el-row>
<el-col :span="4">
<el-row :gutter="20">
<el-col :md="4" :sm="24">
<div class="select-prop-label">
<label>{{ selectPropertiesLabel }}</label>
</div>
</el-col>
<el-col :span="18">
<el-col :md="18" :sm="24">
<el-checkbox-group v-model="checkedFields" @change="handleCheckedFieldsChange">
<el-checkbox v-for="(value, name) in iFormSetting.fieldsMeta" :key="name" :checked="true" :label="name">{{ value.label }}</el-checkbox>
<el-checkbox
v-for="(value, name) in iFormSetting.fieldsMeta"
:key="name"
:checked="true"
:label="name"
>
{{ value.label }}
</el-checkbox>
</el-checkbox-group>
</el-col>
</el-row>
@@ -90,10 +97,10 @@ export default {
getDefaultFormSetting() {
const vm = this
return {
submitMethod: () => 'post',
submitMethod: () => 'patch',
cleanFormValue: function(value) {
const filterValue = {}
Object.keys(value).filter((key) => vm.checkedFields.includes(key)).forEach((key) => {
Object.keys(value).filter((key) => vm.checkedFields?.includes(key)).forEach((key) => {
filterValue[key] = value[key]
})
const formValue = []

View File

@@ -1,87 +0,0 @@
<template>
<transition name="sidebarLogoFade">
<el-select
v-if="needShow()"
:value="currentOrg.id"
class="org-select"
filterable
:placeholder="$t('common.Select')"
@change="changeOrg"
>
<template slot="prefix">
<i class="fa fa-bookmark" />
</template>
<el-option
v-for="item in userAdminOrgList"
:key="item.id"
:selected="item.id === currentOrg.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</transition>
</template>
<script>
import { mapGetters } from 'vuex'
import rolec from '@/utils/role'
import orgUtil from '@/utils/org'
export default {
props: {
isCollapse: {
type: Boolean,
default: () => {
return true
}
}
},
computed: {
...mapGetters([
'currentOrg',
'currentRole',
'userAdminOrgList'
]),
inAdminPage() {
return (this.currentRole & rolec.PERM_USE) !== rolec.PERM_USE
}
},
methods: {
needShow() {
const hasValidLicense = this.$store.getters.hasValidLicense
return !this.isCollapse && this.inAdminPage && hasValidLicense
},
changeOrg(orgId) {
orgUtil.changeOrg(orgId)
}
}
}
</script>
<style lang="scss" scoped>
.org-select {
padding: 0 10px 7px 18px;
transition: opacity 0s;
}
.org-select >>> input.el-input__inner {
background: none;
border: none;
color: #8095a8;
font-size: 13px;
}
.org-select >>> input.el-input__inner::placeholder {
opacity: 0.2;
}
.org-select >>> .el-input__prefix {
line-height: 34px;
/*margin: auto 5px;*/
}
.sidebarLogoFade-enter,
.sidebarLogoFade-leave-to {
opacity: 0;
}
</style>

View File

@@ -1,64 +0,0 @@
<template>
<div :class="{'has-logo':showLogo}">
<div class="nav-header">
<logo v-if="showLogo" :collapse="isCollapse" />
<Organization :is-collapse="isCollapse" />
</div>
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-menu
:default-active="activeMenu"
:collapse="isCollapse"
:background-color="variables.menuBg"
:text-color="variables.menuText"
:text-weigth="variables.menuTextWeight"
:unique-opened="true"
:active-text-color="variables.menuActiveText"
:collapse-transition="false"
mode="vertical"
>
<sidebar-item v-for="route in permission_routes" :key="route.path" :item="route" :base-path="route.path" />
</el-menu>
</el-scrollbar>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import Logo from './Logo'
import SidebarItem from './SidebarItem'
import Organization from './Organization'
import variables from '@/styles/variables.scss'
export default {
components: { SidebarItem, Logo, Organization },
computed: {
...mapGetters([
'permission_routes',
'sidebar'
]),
activeMenu() {
const route = this.$route
const { meta, path } = route
// if set path, the sidebar will highlight the path you set
if (meta.activeMenu) {
return meta.activeMenu
}
return path
},
showLogo() {
return this.$store.state.settings.sidebarLogo
},
variables() {
return variables
},
isCollapse() {
return !this.sidebar.opened
}
}
}
</script>
<style scoped>
.nav-header {
background-image: url('~@/assets/img/header-profile.png');
}
</style>

View File

@@ -1,36 +1,34 @@
<template>
<div class="header-tools header-profile">
<el-dropdown trigger="click" @command="handleClick">
<el-dropdown :show-timeout="50" @command="handleClick">
<span class="el-dropdown-link">
<el-avatar :src="avatarUrl" class="header-avatar" />
{{ currentUser.name }}
<i class="el-icon-arrow-down el-icon--right" />
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item icon="el-icon-user" command="profile">{{ $t('common.nav.Profile') }}</el-dropdown-item>
<template v-if="currentOrgRoles.length > 1 || hasAdminOrg ">
<el-dropdown-item v-if="isInAdminRole " icon="el-icon-guide" command="userPage">{{ $t('common.nav.UserPage') }}</el-dropdown-item>
<el-dropdown-item v-else icon="el-icon-guide" command="adminPage">{{ $t('common.nav.AdminPage') }}</el-dropdown-item>
</template>
<el-dropdown-item icon="el-icon-key" command="apiKey">{{ $t('common.nav.APIKey') }}</el-dropdown-item>
<el-dropdown-item divided command="logout">{{ $t('common.nav.Logout') }}</el-dropdown-item>
<el-dropdown-item icon="el-icon-user" command="profile">
{{ $t('common.nav.Profile') }}
</el-dropdown-item>
<el-dropdown-item v-if="$hasPerm('authentication.view_accesskey')" icon="el-icon-key" command="apiKey">
{{ $t('common.nav.APIKey') }}
</el-dropdown-item>
<el-dropdown-item v-if="$store.getters.publicSettings.AUTH_TEMP_TOKEN && $hasPerm('authentication.view_temptoken')" icon="el-icon-magic-stick" command="tempPassword">
{{ $t('common.nav.TempPassword') }}
</el-dropdown-item>
<el-dropdown-item divided command="logout"><svg-icon icon-class="logout" style="margin-right: 4px" />
{{ $t('common.nav.Logout') }}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<ApiKey ref="api" />
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import ApiKey from './ApiKey'
import rolec from '@/utils/role'
import orgUtil from '@/utils/org'
export default {
name: 'AccountDropdown',
components: {
ApiKey
},
data() {
return {
avatarUrl: require('@/assets/img/admin.png'),
@@ -39,59 +37,26 @@ export default {
},
computed: {
...mapGetters([
'currentUser',
'currentRole',
'currentOrgRoles',
'userAdminOrgList',
'currentOrgPerms'
]),
isInAdminRole() {
const inAdmin = rolec.hasPerm(rolec.ADMIN_PAGE_REQUIRE_PERM_MIN, this.currentRole)
return inAdmin
},
hasAdminOrg() {
return this.userAdminOrgList.length > 0
},
adminPageRequirePerm() {
return rolec.PERM_SUPER | rolec.PERM_ADMIN | rolec.PERM_AUDIT
},
hasCurrentOrgAdminPagePerm() {
// 只有有一个权限就可以
return rolec.hasAdminPagePerm(this.currentOrgPerms)
},
currentOrgUsePagePerm() {
const userPageRequireRole = rolec.PERM_USE
return userPageRequireRole & this.currentOrgPerms
}
'currentUser'
])
},
created() {
},
methods: {
handleClick(val) {
switch (val) {
case 'profile':
this.$router.push({ name: 'UserProfile' })
break
case 'adminPage':
if (this.hasCurrentOrgAdminPagePerm) {
const currentRole = rolec.getUserInAdminPagePerm(this.currentOrgPerms)
this.$store.dispatch('users/setCurrentRole', currentRole)
window.location.href = `/ui/`
} else {
orgUtil.change2PropOrg()
}
break
case 'userPage':
if (this.currentOrgUsePagePerm) {
this.$store.dispatch('users/setCurrentRole', rolec.USER)
window.location.href = `/ui/`
}
this.$router.push('/profile')
break
case 'logout':
this.logout()
window.location.href = `${process.env.VUE_APP_LOGOUT_PATH}?next=${this.$route.fullPath}`
break
case 'apiKey':
this.$refs.api.showApi()
this.$router.push('/profile/key')
break
case 'tempPassword':
this.$router.push('/profile/temp-password')
}
},
logout() {
@@ -107,4 +72,7 @@ export default {
margin-right: 5px;
vertical-align: middle;
}
.mobile .header-avatar {
display: none;
}
</style>

View File

@@ -1,5 +1,5 @@
<template>
<el-dropdown trigger="click" @command="handleCommand">
<el-dropdown :show-timeout="50" @command="handleCommand">
<span class="el-dropdown-link">
{{ $t('common.nav.Help') }}<i class="el-icon-arrow-down el-icon--right" />
</span>

View File

@@ -1,5 +1,5 @@
<template>
<el-dropdown trigger="click">
<el-dropdown>
<span class="el-dropdown-link">
{{ currentLang.title }}<i class="el-icon-arrow-down el-icon--right" />
</span>
@@ -25,6 +25,11 @@ export default {
title: '中文(简体)',
code: 'cn',
cookieCode: 'zh-hans' // cookie code是为了让后端知道当前语言
},
{
title: '日本語',
code: 'ja',
cookieCode: 'ja' // cookie code是为了让后端知道当前语言
}
]
}
@@ -58,6 +63,8 @@ export default {
changeMomentLang() {
if (this.currentLang.code.indexOf('en') > -1) {
this.$moment.locale('en')
} else if (this.currentLang.code.indexOf('ja') > -1) {
this.$moment.locale('ja')
} else {
this.$moment.locale('zh-cn')
}

View File

@@ -0,0 +1,190 @@
<template>
<el-select
:value="currentOrgId"
class="org-select organization"
filterable
:placeholder="$t('common.Select')"
@change="changeOrg"
>
<template slot="prefix">
<i class="fa fa-sitemap icon" />
</template>
<el-option-group
v-for="group in orgGroups"
:key="group.label"
:label="group.label"
class="option-group"
>
<el-option
v-for="item in group.options"
:key="item.id"
:selected="item.id === currentOrg.id"
:label="item.name"
:value="item.id"
:disabled="item.disabled"
>
<span v-if="item.icon" style="float: right; font-size: 12px">
<i class="fa" :class="item.icon" />
</span>
<span>{{ item.name }}</span>
</el-option>
</el-option-group>
</el-select>
</template>
<script>
import { mapGetters } from 'vuex'
import orgUtil from '@/utils/org'
export default {
props: {
isCollapse: {
type: Boolean,
default: () => {
return true
}
}
},
data() {
return {
orgOption: []
}
},
computed: {
...mapGetters([
'currentOrg',
'usingOrgs',
'currentViewRoute'
]),
orgActionsGroup() {
const orgActions = {
label: this.$t('xpack.Organization.OrganizationList'),
options: [
{
id: 'create',
icon: 'fa-plus',
disabled: !this.$hasPerm('orgs.add_organization'),
name: this.$t('xpack.Organization.OrganizationCreate')
},
{
id: 'list',
icon: 'fa-list-ul',
disabled: !this.$hasPerm('orgs.view_organization'),
name: this.$t('xpack.Organization.OrganizationLists')
}
]
}
const hasPerms = this.$hasPerm('orgs.view_organization | orgs.add_organization')
const isConsole = this.currentViewRoute.name === 'console'
return hasPerms && isConsole ? orgActions : {}
},
orgChoicesGroup() {
return {
label: this.$t('xpack.Organization.AllOrganization'),
options: this.usingOrgs
}
},
orgGroups() {
return [
this.orgActionsGroup,
this.orgChoicesGroup
]
},
currentOrgId() {
const usingOrgIds = this.usingOrgs.map(o => o.id)
let currentOrgId = this.currentOrg.id
const find = usingOrgIds.indexOf(currentOrgId) > -1
if (!find) {
currentOrgId = null
}
return currentOrgId
}
},
methods: {
changeOrg(orgId) {
const org = this.usingOrgs.find(item => item.id === orgId)
switch (orgId) {
case 'create':
this.$router.push({ name: 'OrganizationCreate' })
break
case 'list':
this.$router.push({ name: 'OrganizationList' })
break
default:
orgUtil.changeOrg(org)
}
}
}
}
</script>
<style lang="scss" scoped>
@import '~@/styles/element-variables.scss';
.org-select {
padding: 0 10px 0 18px;
line-height: 55px;
background-color: #293846;
color: white;
font-weight: 600;
font-size: 15px;
//border-top: solid 1px rgb(47, 64, 80);
::v-deep .el-input {
input.el-input__inner {
line-height: 55px;
height: 55px;
background: none;
border: none;
}
}
}
.icon {
color: #606266;
cursor: pointer;
}
.organization {
height: 35px;
line-height: 35px;
background: #E0E0E0;
border-radius: 19px;
color: #606266;
&:after {
position: absolute;
top: 15%;
left: -16px;
content: '';
width: 1px;
height: 25px;
background-color: rgba(144, 147, 152, .5);
}
&>>> .el-input__prefix {
left: 8px
}
&>>> .el-input--prefix .el-input__inner {
line-height: 35px !important;
height: 35px !important;
}
&>>> .fa-sitemap {
padding-left: 4px;
}
&>>> .el-input__icon {
color: #606266;
}
}
.option-group >>> .el-select-group__title {
color: #909399 !important;
padding-left: 15px;
font-size: 12px;
line-height: 30px;
}
</style>

View File

@@ -1,23 +1,24 @@
<template>
<div>
<el-badge :value="unreadMsgCount" :hidden="unreadMsgCount === 0" :max="99" size="mini" type="primary">
<a style="color: #606266 !important; width: 30px" @click="toggleDrawer">
<i class="el-icon-message" style="font-size: 18px" />
</a>
<el-link style="height: 100%" @click="toggleDrawer">
<svg-icon icon-class="email-fill" />
</el-link>
</el-badge>
<el-drawer
class="drawer"
:visible.sync="show"
:before-close="handleClose"
:modal="false"
:title="$t('notifications.SiteMessage')"
custom-class="site-msg"
size="25%"
:size="width"
@open="getMessages"
>
<div slot="title">
<span>{{ $t('notifications.SiteMessage') }}</span>
<div v-if="unreadMsgCount !== 0" class="msg-list-all-read-btn" @click.stop="oneClickRead(messages)">
<a> {{ $t('notifications.OneClickRead') }}</a>
<a style="vertical-align: sub;"> {{ $t('notifications.AllClickRead') }}</a>
</div>
</div>
<div v-if="unreadMsgCount !== 0" class="msg-list">
@@ -93,6 +94,11 @@ export default {
unreadMsgCount: 0
}
},
computed: {
width() {
return this.$store.state.app.device === 'mobile' ? '70%' : '20%'
}
},
mounted() {
this.enablePullMsgCount()
},
@@ -132,13 +138,22 @@ export default {
confirmButtonClass: 'el-button--danger',
beforeClose: async(action, instance, done) => {
if (action !== 'confirm') return done()
this.markAsRead(msgs)
this.markAsReadAll(msgs)
done()
}
}).catch(() => {
/* 取消*/
})
},
markAsReadAll(msgs) {
const url = `/api/v1/notifications/site-message/mark-as-read-all/`
this.$axios.patch(url, {}).then(res => {
this.msgDetailVisible = false
this.getMessages()
}).catch(err => {
this.$message(err.detail)
})
},
markAsRead(msgs) {
const url = `/api/v1/notifications/site-message/mark-as-read/`
const msgIds = []
@@ -187,6 +202,9 @@ export default {
</script>
<style lang="scss" scoped>
.drawer {
height: calc(100% - 40px);
}
.el-badge ::v-deep .el-badge__content.is-fixed{
top:10px;
}

View File

@@ -0,0 +1,21 @@
<template>
<el-link @click="goto()">
<svg-icon icon-class="setting-fill" @click="goto()" />
</el-link>
</template>
<script>
export default {
name: 'WebTerminal',
computed: {},
methods: {
goto() {
this.$router.push({ name: 'SystemSetting' })
}
}
}
</script>
<style scoped>
</style>

View File

@@ -1,6 +1,5 @@
<template>
<div>
<!-- <el-link class="el-link" target="_blank" @click="goToTickets">{{ $t('route.Ticket') }}</el-link>-->
<el-badge :value="assignedTicketCount" :hidden="assignedTicketCount===0" size="mini" type="primary">
<el-link class="el-link" target="_blank" @click="goToTickets">{{ $t('route.Ticket') }}</el-link>
</el-badge>
@@ -33,7 +32,8 @@ export default {
})
},
goToTickets() {
this.$router.push({ name: 'TicketList' })
// this.$router.push({ name: 'TicketList' })
this.$router.push('/tickets')
}
}
}

View File

@@ -0,0 +1,150 @@
<template>
<el-menu
:default-active="currentViewRoute.name"
class="menu-main"
:class="mode"
:mode="mode"
@select="handleSelectView"
>
<el-submenu
index="2"
popper-class="view-switcher"
>
<template slot="title">
<span class="title-label">
<i class="fa fa-bars" />
<span>{{ $t('common.nav.View') }}</span>
</span>
</template>
<el-menu-item
v-for="view of views"
:key="view.name"
:index="view.name"
>
<i v-if="mode === 'horizontal'" class="icons" :class="view.meta.icon" />
<span slot="title" class="icons-title">{{ view.meta.title }}</span>
</el-menu-item>
</el-submenu>
</el-menu>
</template>
<script>
import { mapGetters } from 'vuex'
import store from '@/store'
export default {
name: 'ViewSwitcher',
props: {
showTitle: {
type: Boolean,
default: false
},
mode: {
type: String,
default: 'horizontal'
}
},
data() {
return {
showTip: true
}
},
computed: {
...mapGetters([
'currentViewRoute',
'viewRoutes'
]),
views() {
return this.viewRoutes.filter((item) => {
let show = item.meta?.showNavSwitcher
if (typeof show === 'function') {
show = show()
}
return show
})
},
viewsMapper() {
const mapper = {}
for (const view of this.views) {
mapper[view.name] = view
}
return mapper
},
currentView() {
return this.viewsMapper[this.currentViewRoute.name]
}
},
methods: {
async handleSelectView(key, keyPath) {
const routeName = this.viewsMapper[key] || '/'
localStorage.setItem('PreView', key)
// Next 之前要重置 init 状态,否则这些路由守卫就不走了
await store.dispatch('app/reset')
this.$router.push(routeName)
}
}
}
</script>
<style lang="scss" scoped>
.menu-main.el-menu {
background-color: transparent;
// margin-top: -5px;
::v-deep .el-submenu .el-submenu__title {
height: 55px;
line-height: 55px;
border-bottom: none;
}
&.el-menu--horizontal {
border-bottom: none;
}
&>>> .el-icon-arrow-down {
font-size: 13px;
color: #606266;
}
}
.el-menu--horizontal .el-menu .el-menu-item {
display: inline-block!important;
padding: 10px 10px;
text-align: center;
height: 70px;
width: 70px;
&:hover {
color: inherit;
i {
color: inherit;
}
}
&:first-child {
margin-left: 20px;
}
&:last-child {
margin-right: 20px;
}
}
.el-submenu.is-opened {
background-color: transparent;
}
.title-label {
padding-left: 12px;
font-size: 14px;
vertical-align: unset;
color: #606266!important;
}
.icons {
display: block;
font-size: 23px;
text-align: center;
}
.icons-title {
display: inline-block;
font-size: 14px;
}
.el-menu-item.is-active {
font-weight: bold;
}
.menu-main.mobile-view-switch >>> .el-submenu__icon-arrow {
right: 10px;
}
</style>

View File

@@ -1,5 +1,7 @@
<template>
<el-link class="el-link" :href="webTerminalUrl" target="_blank">{{ $t('route.WebTerminal') }}</el-link>
<el-link :href="webTerminalUrl" target="_blank">
<svg-icon icon-class="terminal" />
</el-link>
</template>
<script>
@@ -16,9 +18,4 @@ export default {
</script>
<style scoped>
.el-link {
color: #606266 !important;
font-size: 13px;
font-weight: 400
}
</style>

View File

@@ -1,28 +1,40 @@
<template>
<div class="navbar">
<div class="navbar-header">
<hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
</div>
<ul class="navbar-right">
<li class="header-item header-icon">
<SiteMessages />
<el-tooltip effect="dark" :content="this.$t('route.SiteMessageList')">
<SiteMessages />
</el-tooltip>
</li>
<li class="header-item" style="margin-left: 10px">
<Help />
<li v-perms="['rbac.view_webterminal']" class="header-item header-icon">
<el-tooltip effect="dark" :content="this.$t('route.WebTerminal')">
<WebTerminal />
</el-tooltip>
</li>
<li class="header-item">
<Language />
<li v-perms="'settings.view_setting'" class="header-item header-icon">
<el-tooltip effect="dark" :content="this.$t('route.SystemSetting')">
<SystemSetting />
</el-tooltip>
</li>
<li v-if="showTickets" class="header-item">
<li v-if="this.$hasLicense() && this.$hasPerm('tickets.view_ticket')" class="header-item header-hover">
<Tickets />
</li>
<li class="header-item">
<WebTerminal />
<li class="header-item active-menu">
<Help />
</li>
<li class="header-item header-profile">
<AccountDropdown />
</li>
</ul>
<hamburger :is-active="sidebar.opened" class="hamburger-container is-show-menu" @toggleClick="toggleSideBar" />
<ul class="navbar-left">
<li class="left-item">
<ViewSwitcher />
</li>
<li v-if="showOrganize()" class="left-item" style="margin-left: 12px">
<Organization class="organization" />
</li>
</ul>
</div>
</template>
@@ -32,21 +44,23 @@ import Hamburger from '@/components/Hamburger'
import AccountDropdown from './AccountDropdown'
import SiteMessages from './SiteMessages'
import Help from './Help'
import Language from './Language'
import WebTerminal from './WebTerminal'
import Tickets from './Tickets'
import rolc from '@/utils/role'
import ViewSwitcher from './ViewSwitcher'
import Organization from './Organization'
import SystemSetting from './SystemSetting'
export default {
components: {
// Breadcrumb,
Hamburger,
ViewSwitcher,
Organization,
AccountDropdown,
Language,
Help,
Tickets,
WebTerminal,
SiteMessages
SiteMessages,
SystemSetting
},
data() {
return {
@@ -54,71 +68,112 @@ export default {
},
computed: {
...mapGetters([
'sidebar', 'publicSettings', 'currentOrgRoles'
]),
isOrgAuditor() {
return rolc.getRolesDisplay(this.currentOrgRoles).includes('OrgAuditor') || rolc.getRolesDisplay(this.currentOrgRoles).includes('Auditor')
},
showTickets() {
return this.publicSettings.TICKETS_ENABLED &&
this.publicSettings['XPACK_LICENSE_IS_VALID']
}
'sidebar', 'publicSettings', 'currentOrgRoles', 'currentViewRoute'
])
},
methods: {
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar')
},
showOrganize() {
return (this.$route.meta?.showOrganization !== false) && this.$hasLicense()
}
}
}
</script>
<style lang="scss" scoped>
.navbar {
height: 50px;
overflow: hidden;
position: relative;
height: 55px;
overflow: hidden;
background: #f3f3f4;
box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
.hamburger-container {
line-height: 46px;
height: 100%;
.navbar-left {
float: left;
cursor: pointer;
transition: background .3s;
-webkit-tap-highlight-color: transparent;
padding-left: 20px;
.left-item {
line-height: 55px;
display: inline-block;
vertical-align: middle;
&>>> .el-submenu__title {
font-family: "open sans","Helvetica Neue",Helvetica,Arial,sans-serif;
padding: 0 14px;
}
&>>> .org-select {
padding: 0;
}
}
}
.navbar-right {
float: right;
margin-right: 10px;
.header-item {
line-height: 50px;
display: inline-block;
padding-right: 10px;
padding-left: 10px;
}
.header-icon {
.header-hover {
&:hover {
background-color: #e6e6e6;
}
}
.header-item {
line-height: 55px;
display: inline-block;
padding-right: 10px;
padding-left: 10px;
vertical-align: middle;
}
.header-icon {
padding-left: 8px;
padding-right: 8px;
&:hover {
background-color: #e6e6e6;
}
&>>> i {
color: #7c7e7f;
font-size: 16px;
}
&>>> .svg-icon {
color: #7c7e7f;
font-size: 16px;
}
}
}
.breadcrumb-container {
float: left;
padding-left: 20px;
}
}
.el-header {
background-color: #ffffff;
}
ul {
margin: 0;
padding-inline-start: 0;
}
.is-show-menu {
display: none;
}
.hamburger-container {
float: left;
height: 26px;
margin: 12px;
padding: 0 10px!important;
line-height: 30px;
border-radius: 4px;
border-color: #1ab394;
background-color: #1ab394;
color: #fff;
cursor: pointer;
transition: .2s;
-webkit-tap-highlight-color: transparent;
&>>> .svg-icon {
font-size: 16px;
color: #fff;
}
}
@media screen and (max-width: 1006px) {
.is-show-menu {
display: block;
}
.navbar-left {
display: none;
}
}
@media screen and (max-width: 480px){
.active-menu {
display: none!important;;
}
}
</style>

View File

@@ -2,10 +2,10 @@
<div class="sidebar-logo-container" :class="{'collapse':collapse}">
<transition name="sidebarLogoFade">
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
<img :src="logoSrc" class="sidebar-logo">
<img :src="logoSrc" class="sidebar-logo" alt="logo">
</router-link>
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
<img :src="logoTextSrc" class="sidebar-logo-text">
<img :src="logoTextSrc" class="sidebar-logo-text" alt="logo">
</router-link>
</transition>
</div>
@@ -55,8 +55,8 @@ export default {
.sidebar-logo-container {
position: relative;
width: 100%;
height: 70px;
line-height: 60px;
height: 55px;
line-height: 55px;
// background: #2b2f3a;
text-align: center;
overflow: hidden;
@@ -92,10 +92,10 @@ export default {
}
&.collapse {
height: 50px;
line-height: 50px;
height: 55px;
line-height: 55px;
.sidebar-logo {
margin-right: 0px;
margin-right: 0;
}
}
}

View File

@@ -1,6 +1,10 @@
<template>
<div v-if="!item.hidden">
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
<div v-if="!item.hidden && (item.alwaysShow || !allChildrenHidden(item))">
<template
v-if="hasOneShowingChild(item.children, item) &&
(!onlyOneChild.children || onlyOneChild.noShowingChildren) &&
!item.alwaysShow"
>
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
@@ -57,6 +61,17 @@ export default {
return {}
},
methods: {
allChildrenHidden(item) {
if (!item.children) {
return false
}
for (const child of item.children) {
if (!this.allChildrenHidden(child)) {
return false
}
}
return true
},
hasOneShowingChild(children = [], parent) {
const showingChildren = children.filter(item => {
if (item.hidden) {

View File

@@ -0,0 +1,186 @@
<template>
<div :class="{'has-logo': showLogo, 'show-orgs': showOrgs}">
<div class="nav-header">
<div class="nav-logo">
<Logo v-if="showLogo" :collapse="isCollapse" />
</div>
<div class="active-mobile">
<ViewSwitcher mode="vertical" class="mobile-view-switch" />
<Organization class="organization" />
</div>
<div class="nav-title" :class="{'collapsed': isCollapse}">
{{ isTitle }}
</div>
</div>
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-menu
class="left-menu"
:default-active="activeMenu"
:collapse="isCollapse"
:background-color="variables['menuBg']"
:text-color="variables['menuText']"
:text-weigth="variables['menuTextWeight']"
:active-text-color="variables['menuActiveText']"
:unique-opened="true"
:collapse-transition="false"
mode="vertical"
>
<sidebar-item
v-for="route in currentViewRoute.children"
:key="route.path"
:item="route"
:base-path="route.path"
/>
</el-menu>
</el-scrollbar>
<div class="nav-footer">
<div class="toggle-bar">
<Hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
</div>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import Logo from './Logo'
import SidebarItem from './SidebarItem'
import variables from '@/styles/variables.scss'
import Hamburger from '@/components/Hamburger'
import ViewSwitcher from '../NavHeader/ViewSwitcher'
import Organization from '../NavHeader/Organization'
export default {
components: {
SidebarItem,
Logo,
Hamburger,
ViewSwitcher,
Organization
},
computed: {
...mapGetters([
'currentViewRoute',
'sidebar'
]),
activeMenu() {
const route = this.$route
const { meta, path } = route
// if set path, the sidebar will highlight the path you set
if (!meta.activeMenu && !meta.hidden) {
return path
}
if (meta.activeMenu) {
return meta.activeMenu
}
const { location } = this.$router.resolve('_Mark_')
let locPath = location.path.replace('_Mark_', '')
const parmaId = location.params?.id || route.params?.id
if (parmaId) {
locPath = locPath.replace('/' + parmaId, '')
}
if (locPath.endsWith('/')) {
locPath = locPath.slice(0, locPath.length - 1)
}
this.$log.debug('Active menu path3: ', locPath)
return locPath
},
showLogo() {
return this.$store.state.settings.sidebarLogo
},
showOrgs() {
return this.$store.getters.hasValidLicense
// return !this.isCollapse && this.inAdminPage && hasValidLicense
},
variables() {
return variables
},
isCollapse() {
return !this.sidebar.opened
},
isTitle() {
return this.currentViewRoute.meta?.title || ''
}
},
methods: {
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar')
}
}
}
</script>
<style lang="scss" scoped>
.nav-header {
background-image: url('~@/assets/img/header-profile.png');
}
.nav-logo {
height: 55px;
}
.nav-title {
box-sizing: border-box;
height: 55px;
padding: 17px 0 17px 22px;
font-size: 15px;
font-weight: 460;
color: #fff;
//background: #293846;
}
.collapsed {
padding: 6px 12px!important;
}
.organizations {
height: 55px;
}
.nav-footer {
display: block;
width: 100%;
height: 40px;
background-color: #293846;
.toggle-bar {
width: 55px;
height: 40px;
bottom: 0;
left: 0;
top: auto;
border: 0;
z-index: 1000;
position: relative;
cursor: pointer;
}
.toggle-bar:hover {
background-color: rgb(59, 76, 91);
}
.hamburger-container {
left: 2px;
top: 10px;
position: absolute;
}
}
.active-mobile {
display: none;
&>>> .organization {
padding-left: 8px;
background: transparent;
color: #fff;
}
&>>> .menu-main {
margin-left: -10px;
}
&>>> .title-label {
color: white !important;
}
}
@media screen and (max-width: 992px) {
.active-mobile {
display: block;
}
}
</style>

View File

@@ -41,7 +41,7 @@ export default {
<style scoped>
.page-heading {
border-top: 0;
padding: 15px 30px 15px 25px;
padding: 12px 30px 13px 25px;
background-color: #ffffff;
min-height: 1px;
}

View File

@@ -1,13 +1,15 @@
<template>
<div class="page">
<PageHeading class="disabled-when-print">
<PageHeading v-if="iTitle || helpMessage" class="disabled-when-print">
<slot name="title">{{ iTitle }}</slot>
<template #rightSide>
<slot name="headingRightSide" />
</template>
</PageHeading>
<PageContent>
<el-alert v-if="helpMessage" type="success"> <span v-html="helpMessage" /> </el-alert>
<el-alert v-if="helpMessage" type="success">
<span class="announcement-main" v-html="helpMessage" />
</el-alert>
<slot />
</PageContent>
</div>
@@ -34,7 +36,6 @@ export default {
},
computed: {
iTitle() {
// return ''
return this.title || this.$route.meta.title
}
}
@@ -52,5 +53,9 @@ export default {
.print-margin{
margin-top: 10px;
}
.announcement-main {
word-wrap:break-word;
white-space: pre-wrap;
}
}
</style>

View File

@@ -9,15 +9,14 @@
<div>
<el-tabs
v-if="submenu.length > 0"
v-if="tabIndices.length > 0"
slot="submenu"
v-model="iActiveMenu"
class="page-submenu"
@tab-click="handleTabClick"
>
<template v-for="item in submenu">
<template v-for="item in tabIndices">
<el-tab-pane
v-if="checkShow(item)"
:key="item.name"
:label-content="item.labelContent"
:name="item.name"
@@ -31,8 +30,12 @@
</el-tab-pane>
</template>
</el-tabs>
<transition name="fade-transform" mode="out-in">
<slot />
<transition name="fade-transform" mode="out-in" appear>
<slot>
<keep-alive>
<component :is="computeActiveComponent" />
</keep-alive>
</slot>
</transition>
</div>
</Page>
@@ -69,24 +72,30 @@ export default {
}
},
tabIndices() {
const map = {}
this.submenu.forEach((v, i) => {
map[v.name] = i
const map = []
this.submenu.forEach((v) => {
const hidden = typeof v.hidden === 'function' ? v.hidden() : v.hidden
if (!hidden) {
map.push(v)
}
})
return map
},
computeActiveComponent() {
let needActiveComponent = ''
for (const i of this.submenu) {
if (i.component && (i.name === this.iActiveMenu)) {
needActiveComponent = i.component
break
}
}
return needActiveComponent
}
},
mounted() {
created() {
this.iActiveMenu = this.getPropActiveTab()
},
methods: {
checkShow(item) {
let hidden = item.hidden
if (typeof hidden === 'function') {
hidden = hidden()
}
return !hidden
},
handleTabClick(tab) {
this.$emit('tab-click', tab)
this.$emit('update:activeMenu', tab.name)
@@ -108,14 +117,16 @@ export default {
]
for (const preTab of preActiveTabs) {
for (const tabName in this.tabIndices) {
if (preTab && tabName && preTab.toLowerCase() === tabName.toLowerCase()) {
return tabName
const currentTab = typeof preTab === 'object' ? preTab?.name : preTab
for (const tabName of this.tabIndices) {
const currentTabName = tabName?.name || ''
if (currentTab?.toLowerCase() === currentTabName?.toLowerCase()) {
return currentTabName
}
}
}
activeTab = this.submenu[0].name
activeTab = this.tabIndices[0].name
return activeTab
}
}

View File

@@ -1,13 +1,13 @@
export { default as NavBar } from './NavBar'
export { default as NavLeft } from './NavLeft'
export { default as NavHeader } from './NavHeader'
export { default as AppMain } from './AppMain'
export { default as Page } from './Page'
export { default as TagsView } from './TagsView'
export { default as GenericDetailPage } from './GenericDetailPage'
export { default as TabPage } from './TabPage'
export { default as Footer } from './Footer'
export { default as GenericListPage } from './GenericListPage'
export { default as GenericListTable } from './GenericListTable'
export { default as GenericDetailPage } from './GenericDetailPage'
export { default as GenericCreateUpdatePage } from './GenericCreateUpdatePage'
export { default as GenericCreateUpdateForm } from './GenericCreateUpdateForm'
export { default as GenericUpdateFormDialog } from './GenericUpdateFormDialog'

View File

@@ -1,11 +1,10 @@
<template>
<div :class="classObj" class="app-wrapper">
<div v-if="device==='mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<NavBar class="sidebar-container disabled-when-print" />
<div :class="{hasTagsView:needTagsView}" class="main-container">
<div :class="{'fixed-header':fixedHeader}" class="disabled-when-print">
<NavLeft class="sidebar-container disabled-when-print" />
<div :class="{hasTagsView: needTagsView}" class="main-container">
<div :class="{'fixed-header': fixedHeader}" class="disabled-when-print">
<NavHeader />
<tags-view v-if="needTagsView" />
</div>
<app-main />
<Footer class="disabled-when-print" />
@@ -14,17 +13,16 @@
</template>
<script>
import { NavHeader, NavBar, AppMain, Footer, TagsView } from './components'
import { NavHeader, NavLeft, AppMain, Footer } from './components'
import ResizeMixin from './mixin/ResizeHandler'
export default {
name: 'Layout',
components: {
NavBar,
NavLeft,
NavHeader,
AppMain,
Footer,
TagsView
Footer
},
mixins: [ResizeMixin],
computed: {
@@ -35,7 +33,8 @@ export default {
return this.$store.state.app.device
},
fixedHeader() {
return this.$store.state.settings.fixedHeader
return true
// return this.$store.state.settings.fixedHeader
},
needTagsView() {
return false
@@ -92,7 +91,7 @@ export default {
}
.hideSidebar .fixed-header {
width: calc(100% - 54px)
width: calc(100% - 55px)
}
.mobile .fixed-header {
@@ -113,7 +112,7 @@ export default {
display: none;
}
.main-container{
margin-left: 0px !important;
margin-left: 0 !important;
}
//.fixed-header{
// width: 100% !important;

View File

@@ -14,7 +14,8 @@ import router from './router'
import i18n from './i18n/i18n'
import '@/icons' // icon
import '@/permission' // permission control
import '@/guards' // permission control
import '@/directive'
/**
* If you don't want to use mock-server

View File

@@ -1,27 +0,0 @@
/* eslint-disable no-unused-vars */
import router from './router'
import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css' // progress bar style
import { startup } from '@/utils/startup'
NProgress.configure({
showSpinner: false
}) // NProgress Configuration
router.beforeEach(async(to, from, next) => {
// start progress bar
NProgress.start()
try {
await startup({ to, from, next })
next()
} catch (e) {
const msg = 'Start service error: ' + e
console.log(e)
}
})
router.afterEach(() => {
// finish progress bar
NProgress.done()
})

59
src/router/audit/index.js Normal file
View File

@@ -0,0 +1,59 @@
import Layout from '@/layout'
import i18n from '@/i18n/i18n'
import SessionRoutes from './sessions'
import LogRoutes from './logs'
import empty from '@/layout/empty'
import store from '@/store'
export default {
path: '/audit/',
name: 'audit',
component: Layout,
redirect: '/audit/dashboard',
meta: {
title: i18n.t('common.nav.Audits'),
icon: 'el-icon-s-claim',
showNavSwitcher: () => {
return store.getters.auditOrgs.length > 0
},
permissions: [],
view: 'audit'
},
children: [
{
path: '/audit/dashboard',
component: () => import('@/views/dashboard/index'),
name: 'AuditDashboard',
meta: {
icon: 'dashboard',
title: i18n.t('route.Dashboard'),
permissions: []
}
},
{
path: '/audit/sessions',
component: empty,
name: 'Sessions',
redirect: '/audit/sessions/sessions',
meta: {
title: i18n.t('route.SessionsAudit'),
icon: 'rocket',
permissions: []
},
children: SessionRoutes
},
{
path: '/audit/logs',
component: empty,
redirect: '',
name: 'Audits',
meta: {
title: i18n.t('route.LogsAudit'),
icon: 'history',
permissions: []
},
children: LogRoutes
}
]
}

View File

@@ -1,35 +1,40 @@
import i18n from '@/i18n/i18n'
import rolec from '@/utils/role'
export default [
{
path: 'login-log',
name: 'LoginLog',
component: () => import('@/views/audits/LoginLogList'),
meta: { title: i18n.t('route.LoginLog'), permissions: [rolec.PERM_AUDIT] }
},
{
path: 'ftp-log',
name: 'FtpLog',
component: () => import('@/views/audits/FTPLogList'),
meta: { title: i18n.t('route.FtpLog'), permissions: [rolec.PERM_AUDIT] }
meta: {
title: i18n.t('route.LoginLog'),
permissions: ['audits.view_userloginlog']
}
},
{
path: 'operate-log',
name: 'OperateLog',
component: () => import('@/views/audits/OperateLogList'),
meta: { title: i18n.t('route.OperateLog'), permissions: [rolec.PERM_AUDIT] }
meta: {
title: i18n.t('route.OperateLog'),
permissions: ['audits.view_operatelog']
}
},
{
path: 'password-change-log',
name: 'PasswordChangeLog',
component: () => import('@/views/audits/PasswordChangeLogList'),
meta: { title: i18n.t('route.PasswordChangeLog'), permissions: [rolec.PERM_AUDIT] }
meta: {
title: i18n.t('route.PasswordChangeLog'),
permissions: ['audits.view_passwordchangelog']
}
},
{
path: 'command-execution-log',
name: 'BatchCommandLog',
component: () => import('@/views/audits/CommandExecutionList'),
meta: { title: i18n.t('route.BatchCommandLog'), permissions: [rolec.PERM_AUDIT] }
meta: {
title: i18n.t('route.BatchCommandLog'),
permissions: ['ops.view_commandexecution']
}
}
]

View File

@@ -0,0 +1,52 @@
import i18n from '@/i18n/i18n'
import empty from '@/layout/empty'
export default [
{
path: 'sessions',
redirect: '',
component: empty,
meta: {
title: i18n.t('route.Sessions'),
app: 'terminal',
resource: 'session',
permissions: ['terminal.view_session']
},
children: [
{
path: '',
name: 'SessionList',
component: () => import('@/views/sessions/SessionList'),
meta: {
title: i18n.t('route.SessionList'),
permissions: ['terminal.view_session']
}
},
{
path: ':id',
name: 'SessionDetail',
component: () => import('@/views/sessions/SessionDetail'),
hidden: true,
meta: { title: i18n.t('route.SessionDetail') }
}
]
},
{
path: 'command',
name: 'CommandList',
component: () => import('@/views/sessions/CommandList'),
meta: {
title: i18n.t('route.Commands'),
permissions: ['terminal.view_command']
}
},
{
path: 'ftp',
name: 'FtpLog',
component: () => import('@/views/sessions/FTPLogList'),
meta: {
title: i18n.t('route.FileTransfer'),
permissions: ['audits.view_ftplog']
}
}
]

View File

@@ -1,4 +1,3 @@
import Layout from '@/layout/index'
import i18n from '@/i18n/i18n'
/**
@@ -6,51 +5,35 @@ import i18n from '@/i18n/i18n'
* the routes that need to be dynamically loaded based on admin or user roles
*/
export default [
{
path: '/users/profile',
component: Layout,
hidden: true,
children: [
{
path: '',
name: 'UserProfile',
component: () => import('@/userviews/users/UserProfile/index'),
meta: { title: i18n.t('route.UserProfile'), icon: 'user', activeMenu: '/users/profile' }
}
]
},
{
path: '/users/first-login',
component: Layout,
meta: { title: i18n.t('route.UserFirstLogin'), icon: 'user' },
children: [
{
path: 'personal-information-improvement/',
component: () => import('@/userviews/users/UserFirstLogin/PersonalInformationImprovement/index'),
name: 'PersonalInformationImprovement',
meta: { title: i18n.t('route.PersonalInformationImprovement') }
},
{
path: 'guide/',
component: () => import('@/userviews/users/UserFirstLogin/UserGuide/index'),
name: 'UserGuide',
meta: { title: i18n.t('route.UserGuide') }
}
],
hidden: true
},
{
path: '/ops/celery/task/:id/log/',
component: () => import('@/views/ops/CeleryTaskLog'),
name: 'CeleryTaskLog',
hidden: true,
meta: { title: i18n.t('route.CeleryTaskLog'), roles: ['SuperAdmin', 'Admin', 'Auditor', 'User'] }
meta: {
title: i18n.t('route.CeleryTaskLog'),
permissions: []
}
},
{
path: '/ops/task/task/:id/log/',
component: () => import('@/views/ops/CeleryTaskLog'),
name: 'TaskLog',
hidden: true,
meta: { title: i18n.t('route.CeleryTaskLog'), roles: ['SuperAdmin', 'Admin', 'Auditor', 'User'] }
meta: {
title: i18n.t('route.CeleryTaskLog'),
permissions: []
}
},
{
path: '/terminal/sessions/:id',
name: 'OldSessionDetail',
meta: {
permissions: ['terminal.view_session']
},
hidden: true,
beforeEnter: (to, from, next) => {
next({ name: 'SessionDetail', params: to.params, query: to.query })
}
}
]

View File

@@ -1,17 +1,26 @@
import i18n from '@/i18n/i18n'
import empty from '@/layout/empty'
export default [
{
path: 'asset-accounts',
path: 'authbook',
component: empty,
meta: { title: i18n.t('route.AssetAccount') },
meta: {
title: i18n.t('route.AssetAccount'),
app: 'assets',
licenseRequired: true
},
redirect: '',
children: [
{
path: '',
name: 'AssetAccountList',
component: () => import('@/views/accounts/AssetAccount/AssetAccountList'),
meta: { title: i18n.t('route.AssetAccount') }
meta: {
title: i18n.t('route.AssetAccount'),
app: 'assets',
permissions: ['assets.view_authbook']
}
}
]
},
@@ -19,13 +28,23 @@ export default [
path: 'application-accounts',
component: empty,
redirect: '',
meta: { title: i18n.t('route.AssetAccount') },
meta: {
title: i18n.t('route.AssetAccount'),
permissions: ['applications.view_account'],
app: 'applications',
resource: 'account',
licenseRequired: true
},
children: [
{
path: '',
name: 'ApplicationAccountList',
component: () => import('@/views/accounts/ApplicationAccount/ApplicationAccountList'),
meta: { title: i18n.t('route.ApplicationAccount') }
meta: {
title: i18n.t('route.ApplicationAccount'),
permissions: ['applications.view_account'],
resource: 'account'
}
}
]
},
@@ -33,48 +52,62 @@ export default [
path: 'gathered-user',
component: empty,
redirect: '',
meta: { title: i18n.t('xpack.GatherUser.GatherUserList') },
meta: {
title: i18n.t('xpack.GatherUser.GatherUserList'),
app: 'assets',
licenseRequired: true
},
children: [
{
path: '',
component: () => import('@/views/accounts/GatheredUser/index'),
name: 'GatherUserListIndex',
meta: { title: i18n.t('xpack.GatherUser.GatherUser'), activeMenu: '/accounts/gathered-user' }
meta: {
title: i18n.t('xpack.GatherUser.GatherUser'),
permissions: ['assets.view_gathereduser|xpack.view_gatherusertask']
}
},
{
path: '',
component: () => import('@/views/accounts/GatheredUser/GatheredUserList'),
name: 'GatherUserList',
hidden: true,
meta: { title: i18n.t('xpack.GatherUser.GatherUserList'), activeMenu: '/accounts/gathered-user' }
},
{
path: 'tasks',
component: () => import('@/views/accounts/GatheredUser/TaskList'),
name: 'GatherUserTaskList',
meta: { title: i18n.t('xpack.GatherUser.GatherUserTaskList'), activeMenu: '/accounts/gathered-user' },
hidden: true
meta: {
title: i18n.t('xpack.GatherUser.GatherUserList'),
activeMenu: '/accounts/gathered-user'
}
},
{
path: 'tasks/:id',
component: () => import('@/views/accounts/GatheredUser/TaskDetail/index'),
name: 'GatherUserTaskDetail',
meta: { title: i18n.t('xpack.GatherUser.GatherUserTaskDetail'), activeMenu: '/accounts/gathered-user' },
hidden: true
hidden: true,
meta: {
title: i18n.t('xpack.GatherUser.GatherUserTaskDetail'),
permissions: ['xpack.view_gatherusertask']
}
},
{
path: 'tasks/create',
component: () => import('@/views/accounts/GatheredUser/TaskCreateUpdate'),
name: 'GatherUserTaskCreate',
meta: { title: i18n.t('xpack.GatherUser.GatherUserTaskCreate'), activeMenu: '/accounts/gathered-user' },
hidden: true
hidden: true,
meta: {
title: i18n.t('xpack.GatherUser.GatherUserTaskCreate'),
permissions: ['xpack.add_gatherusertask']
}
},
{
path: 'tasks/:id/update',
component: () => import('@/views/accounts/GatheredUser/TaskCreateUpdate'),
name: 'GatherUserTaskUpdate',
meta: { title: i18n.t('xpack.GatherUser.GatherUserTaskUpdate'), action: 'update', activeMenu: '/accounts/gathered-user' },
hidden: true
hidden: true,
meta: {
title: i18n.t('xpack.GatherUser.GatherUserTaskUpdate'),
action: 'update',
permissions: ['xpack.change_gatherusertask'],
activeMenu: '/accounts/gathered-user'
}
}
]
},
@@ -82,82 +115,119 @@ export default [
path: 'change-auth-plan',
component: empty,
redirect: '',
meta: { title: i18n.t('xpack.ChangeAuthPlan.ChangeAuthPlan') },
meta: {
title: i18n.t('xpack.ChangeAuthPlan.ChangeAuthPlan'),
app: 'xpack',
licenseRequired: true
},
children: [
{
path: '',
component: () => import('@/views/accounts/ChangeAuthPlan/index.vue'),
name: 'ChangeAuthPlanIndex',
meta: { title: i18n.t('xpack.ChangeAuthPlan.ChangeAuthPlan'), activeMenu: '/accounts/change-auth-plan' }
meta: {
title: i18n.t('xpack.ChangeAuthPlan.ChangeAuthPlan'),
permissions: ['xpack.view_changeauthplan|xpack.view_applicationchangeauthplan']
}
},
{
path: 'plan',
component: () => import('@/views/accounts/ChangeAuthPlan/AssetChangeAuthPlan/ChangeAuthPlanList.vue'),
name: 'AssetChangeAuthPlanList',
meta: { title: i18n.t('xpack.ChangeAuthPlan.AssetChangeAuthPlan'), activeMenu: '/accounts/change-auth-plan' },
meta: {
title: i18n.t('xpack.ChangeAuthPlan.AssetChangeAuthPlan'),
permissions: ['xpack.view_changeauthplan']
},
hidden: true
},
{
path: 'plan/create',
component: () => import('@/views/accounts/ChangeAuthPlan/AssetChangeAuthPlan/ChangeAuthPlanCreateUpdate.vue'),
name: 'AssetChangeAuthPlanCreate',
meta: { title: i18n.t('xpack.ChangeAuthPlan.AssetChangeAuthPlanCreate'), activeMenu: '/accounts/change-auth-plan', action: 'create' },
hidden: true
hidden: true,
meta: {
title: i18n.t('xpack.ChangeAuthPlan.AssetChangeAuthPlanCreate'),
permissions: ['xpack.add_changeauthplan']
}
},
{
path: 'plan/:id/update',
component: () => import('@/views/accounts/ChangeAuthPlan/AssetChangeAuthPlan/ChangeAuthPlanCreateUpdate.vue'),
name: 'AssetChangeAuthPlanUpdate',
meta: { title: i18n.t('xpack.ChangeAuthPlan.AssetChangeAuthPlanUpdate'), activeMenu: '/accounts/change-auth-plan', action: 'update' },
hidden: true
hidden: true,
meta: {
title: i18n.t('xpack.ChangeAuthPlan.AssetChangeAuthPlanUpdate'),
permissions: ['xpack.change_changeauthplan']
}
},
{
path: 'plan/:id',
component: () => import('@/views/accounts/ChangeAuthPlan/AssetChangeAuthPlan/ChangeAuthPlanDetail/index.vue'),
name: 'AssetChangeAuthPlanDetail',
meta: { title: i18n.t('xpack.ChangeAuthPlan.AssetChangeAuthPlan'), activeMenu: '/accounts/change-auth-plan' },
hidden: true
hidden: true,
meta: {
title: i18n.t('xpack.ChangeAuthPlan.AssetChangeAuthPlan'),
permissions: ['xpack.view_changeauthplan']
}
},
{
path: 'plan-execution/:id',
component: () => import('@/views/accounts/ChangeAuthPlan/AssetChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/index.vue'),
name: 'ChangeAuthPlanExecutionDetail',
meta: { title: i18n.t('xpack.ChangeAuthPlan.ExecutionDetail'), activeMenu: '/accounts/change-auth-plan' },
hidden: true
hidden: true,
meta: {
title: i18n.t('xpack.ChangeAuthPlan.ExecutionDetail'),
permissions: ['xpack.view_changeauthplanexecution']
}
},
{
path: 'app-plan',
component: () => import('@/views/accounts/ChangeAuthPlan/AppChangeAuthPlan/AppChangeAuthPlanList.vue'),
name: 'AppChangeAuthPlanList',
meta: { title: i18n.t('xpack.ChangeAuthPlan.AppChangeAuthPlan'), activeMenu: '/accounts/change-auth-plan' },
meta: {
title: i18n.t('xpack.ChangeAuthPlan.AppChangeAuthPlan'),
permissions: ['xpack.view_applicationchangeauthplan']
},
hidden: true
},
{
path: 'app-plan/create',
component: () => import('@/views/accounts/ChangeAuthPlan/AppChangeAuthPlan/AppChangeAuthPlanCreateUpdate.vue'),
name: 'AppChangeAuthPlanCreate',
meta: { title: i18n.t('xpack.ChangeAuthPlan.AppChangeAuthPlanCreate'), activeMenu: '/accounts/change-auth-plan', action: 'create' },
meta: {
title: i18n.t('xpack.ChangeAuthPlan.AppChangeAuthPlanCreate'),
permissions: ['xpack.add_applicationchangeauthplan']
},
hidden: true
},
{
path: 'app-plan/:id',
component: () => import('@/views/accounts/ChangeAuthPlan/AppChangeAuthPlan/ChangeAuthPlanDetail/index.vue'),
name: 'AppChangeAuthPlanDetail',
meta: { title: i18n.t('xpack.ChangeAuthPlan.AppChangeAuthPlan'), activeMenu: '/accounts/change-auth-plan' },
meta: {
title: i18n.t('xpack.ChangeAuthPlan.AppChangeAuthPlan'),
permissions: ['xpack.view_applicationchangeauthplan']
},
hidden: true
},
{
path: 'app-plan/:id/update',
component: () => import('@/views/accounts/ChangeAuthPlan/AppChangeAuthPlan/AppChangeAuthPlanCreateUpdate.vue'),
name: 'AppChangeAuthPlanUpdate',
meta: { title: i18n.t('xpack.ChangeAuthPlan.AppChangeAuthPlanUpdate'), activeMenu: '/accounts/change-auth-plan', action: 'update' },
meta: {
title: i18n.t('xpack.ChangeAuthPlan.AppChangeAuthPlanUpdate'),
permissions: ['xpack.change_applicationchangeauthplan']
},
hidden: true
},
{
path: 'app-plan-execution/:id',
component: () => import('@/views/accounts/ChangeAuthPlan/AppChangeAuthPlan/ChangeAuthPlanDetail/AppChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/index.vue'),
name: 'AppChangeAuthPlanExecutionDetail',
meta: { title: i18n.t('xpack.ChangeAuthPlan.ExecutionDetail'), activeMenu: '/accounts/change-auth-plan' },
meta: {
title: i18n.t('xpack.ChangeAuthPlan.ExecutionDetail'),
permissions: ['xpack.view_applicationchangeauthplanexecution']
},
hidden: true
}
]
@@ -166,47 +236,58 @@ export default [
path: 'backup',
component: empty,
redirect: '',
meta: { title: i18n.t('xpack.AccountBackupPlan.AccountBackupPlan') },
meta: {
title: i18n.t('xpack.AccountBackupPlan.AccountBackupPlan'),
app: 'assets',
resource: 'accountbackupplan',
licenseRequired: true
},
children: [
{
path: '',
component: () => import('@/views/accounts/AccountBackupPlan/index.vue'),
component: () => import('@/views/accounts/AccountBackupPlan/AccountBackupPlanList'),
name: 'AccountBackupPlanIndex',
meta: { title: i18n.t('xpack.AccountBackupPlan.AccountBackupPlan'), activeMenu: '/accounts/backup' }
meta: { title: i18n.t('xpack.AccountBackupPlan.AccountBackupPlan') }
},
{
path: '',
component: () => import('@/views/accounts/AccountBackupPlan/AccountBackupPlanList.vue'),
name: 'AccountBackupPlanList',
meta: { title: i18n.t('xpack.AccountBackupPlan.AccountBackupPlan'), activeMenu: '/accounts/backup' },
meta: { title: i18n.t('xpack.AccountBackupPlan.AccountBackupPlan') },
hidden: true
},
{
path: 'create',
component: () => import('@/views/accounts/AccountBackupPlan/AccountBackupPlanCreateUpdate.vue'),
name: 'AccountBackupPlanCreate',
meta: { title: i18n.t('xpack.AccountBackupPlan.AccountBackupPlanCreate'), activeMenu: '/accounts/backup', action: 'create' },
meta: {
title: i18n.t('xpack.AccountBackupPlan.AccountBackupPlanCreate'),
action: 'create'
},
hidden: true
},
{
path: ':id/update',
component: () => import('@/views/accounts/AccountBackupPlan/AccountBackupPlanCreateUpdate.vue'),
name: 'AccountBackupPlanUpdate',
meta: { title: i18n.t('xpack.AccountBackupPlan.AccountBackupPlanUpdate'), activeMenu: '/accounts/backup', action: 'update' },
meta: {
title: i18n.t('xpack.AccountBackupPlan.AccountBackupPlanUpdate'),
action: 'update'
},
hidden: true
},
{
path: ':id',
component: () => import('@/views/accounts/AccountBackupPlan/AccountBackupPlanDetail/index.vue'),
name: 'AccountBackupPlanDetail',
meta: { title: i18n.t('xpack.AccountBackupPlan.AccountBackupPlan'), activeMenu: '/accounts/backup' },
meta: { title: i18n.t('xpack.AccountBackupPlan.AccountBackupPlan') },
hidden: true
},
{
path: 'plan-execution/:id',
component: () => import('@/views/accounts/AccountBackupPlan/AccountBackupPlanDetail/AccountBackupPlanExecution/AccountBackupPlanExecutionDetail/index.vue'),
name: 'AccountBackupPlanExecutionDetail',
meta: { title: i18n.t('xpack.AccountBackupPlan.ExecutionDetail'), activeMenu: '/accounts/backup' },
meta: { title: i18n.t('xpack.AccountBackupPlan.ExecutionDetail') },
hidden: true
}
]

View File

@@ -1,5 +1,6 @@
import i18n from '@/i18n/i18n'
import empty from '@/layout/empty'
export default [
{
path: 'asset-acl',
@@ -7,35 +8,36 @@ export default [
redirect: '',
meta: {
title: i18n.t('route.AssetAclList'),
licenseRequired: true
licenseRequired: true,
resource: 'loginassetacl'
},
children: [
{
path: '',
name: 'AssetAclList',
component: () => import('@/views/acl/AssetAcl/AssetAclList'),
meta: { title: i18n.t('route.AssetAclList'), activeMenu: '/acl/asset-acl' }
meta: { title: i18n.t('route.AssetAclList') }
},
{
path: 'create',
name: 'AssetAclCreate',
component: () => import('@/views/acl/AssetAcl/AssetAclCreateUpdate'),
meta: { title: i18n.t('route.AssetAclCreate'), activeMenu: '/acl/asset-acl' },
hidden: true
hidden: true,
meta: { title: i18n.t('route.AssetAclCreate') }
},
{
path: ':id',
name: 'AssetAclDetail',
component: () => import('@/views/acl/AssetAcl/AssetAclDetail'),
meta: { title: i18n.t('route.AssetAclDetail'), activeMenu: '/acl/asset-acl' },
hidden: true
hidden: true,
meta: { title: i18n.t('route.AssetAclDetail') }
},
{
path: ':id/update',
name: 'AssetAclUpdate',
component: () => import('@/views/acl/AssetAcl/AssetAclCreateUpdate'),
meta: { title: i18n.t('route.AssetAclUpdate'), activeMenu: '/acl/asset-acl' },
hidden: true
hidden: true,
meta: { title: i18n.t('route.AssetAclUpdate') }
}
]
}

View File

@@ -6,34 +6,39 @@ export default [
path: 'remote-apps',
redirect: '',
component: empty,
meta: { title: i18n.t('route.RemoteApp'), licenseRequired: true },
meta: {
title: i18n.t('route.RemoteApp'),
licenseRequired: true,
app: 'applications',
resource: 'application'
},
children: [
{
path: '',
name: 'RemoteAppList',
meta: { title: i18n.t('route.RemoteApp'), activeMenu: '/applications/remote-apps' },
meta: { title: i18n.t('route.RemoteApp') },
component: () => import('@/views/applications/RemoteApp/RemoteAppList')
},
{
path: 'create',
name: 'RemoteAppCreate',
component: () => import('@/views/applications/RemoteApp/RemoteAppCreateUpdate'),
meta: { title: i18n.t('route.RemoteApp'), activeMenu: '/applications/remote-apps', action: 'create' },
hidden: true
hidden: true,
meta: { title: i18n.t('route.RemoteApp') }
},
{
path: ':id/update',
name: 'RemoteAppUpdate',
component: () => import('@/views/applications/RemoteApp/RemoteAppCreateUpdate'),
meta: { title: i18n.t('route.RemoteAppUpdate'), activeMenu: '/applications/remote-apps', action: 'update' },
hidden: true
hidden: true,
meta: { title: i18n.t('route.RemoteAppUpdate') }
},
{
path: ':id',
name: 'RemoteAppDetail',
component: () => import('@/views/applications/RemoteApp/RemoteAppDetail/index'),
meta: { title: i18n.t('route.RemoteAppDetail'), activeMenu: '/applications/remote-apps' },
hidden: true
component: () => import('@/views/applications/RemoteApp/RemoteAppDetail'),
hidden: true,
meta: { title: i18n.t('route.RemoteAppDetail') }
}
]
},
@@ -41,7 +46,10 @@ export default [
path: 'databases',
component: empty,
redirect: '',
meta: { title: i18n.t('route.DatabaseApp') },
meta: {
title: i18n.t('route.DatabaseApp'),
resource: 'application'
},
children: [
{
path: '',
@@ -53,29 +61,32 @@ export default [
path: 'create',
name: 'DatabaseAppCreate',
component: () => import('@/views/applications/DatabaseApp/DatabaseAppCreateUpdate'),
meta: { title: i18n.t('route.DatabaseAppCreate'), activeMenu: '/applications/databases', action: 'create' },
hidden: true
hidden: true,
meta: { title: i18n.t('route.DatabaseAppCreate') }
},
{
path: ':id/update',
name: 'DatabaseAppUpdate',
component: () => import('@/views/applications/DatabaseApp/DatabaseAppCreateUpdate'),
meta: { title: i18n.t('route.DatabaseAppUpdate'), activeMenu: '/applications/databases', action: 'update' },
hidden: true
hidden: true,
meta: { title: i18n.t('route.DatabaseAppUpdate') }
},
{
path: ':id',
name: 'DatabaseAppDetail',
component: () => import('@/views/applications/DatabaseApp/DatabaseAppDetail/index'),
meta: { title: i18n.t('route.DatabaseAppDetail'), activeMenu: '/applications/databases' },
hidden: true
component: () => import('@/views/applications/DatabaseApp/DatabaseAppDetail'),
hidden: true,
meta: { title: i18n.t('route.DatabaseAppDetail') }
}
]
},
{
path: 'kubernetes',
component: empty,
meta: { title: i18n.t('route.KubernetesApp') },
meta: {
title: i18n.t('route.KubernetesApp'),
resource: 'application'
},
children: [
{
path: '',
@@ -87,22 +98,22 @@ export default [
path: 'create',
name: 'KubernetesAppCreate',
component: () => import('@/views/applications/KubernetesApp/KubernetesAppCreateUpdate'),
meta: { title: i18n.t('route.KubernetesAppCreate'), activeMenu: '/applications/kubernetes', action: 'create' },
hidden: true
hidden: true,
meta: { title: i18n.t('route.KubernetesAppCreate') }
},
{
path: ':id/update',
name: 'KubernetesAppUpdate',
component: () => import('@/views/applications/KubernetesApp/KubernetesAppCreateUpdate'),
meta: { title: i18n.t('route.KubernetesAppUpdate'), activeMenu: '/applications/kubernetes', action: 'update' },
hidden: true
hidden: true,
meta: { title: i18n.t('route.KubernetesAppUpdate') }
},
{
path: ':id',
name: 'KubernetesAppDetail',
component: () => import('@/views/applications/KubernetesApp/KubernetesAppDetail/index'),
meta: { title: i18n.t('route.KubernetesAppDetail'), activeMenu: '/applications/kubernetes' },
hidden: true
component: () => import('@/views/applications/KubernetesApp/KubernetesAppDetail'),
hidden: true,
meta: { title: i18n.t('route.KubernetesAppDetail') }
}
]
}

View File

@@ -1,46 +1,47 @@
import i18n from '@/i18n/i18n'
import rolec from '@/utils/role'
import empty from '@/layout/empty'
import XPackRoutes from './xpack'
export default [
{
path: 'assets',
component: empty,
redirect: '',
meta: { title: i18n.t('route.AssetList') },
meta: { title: i18n.t('route.AssetList'), permissions: ['assets.view_asset'] },
children: [
{
path: '',
name: 'AssetList',
component: () => import('@/views/assets/Asset/AssetList.vue'),
meta: { title: i18n.t('route.AssetList'), activeMenu: '/assets/assets' }
meta: { title: i18n.t('route.AssetList') }
},
{
path: 'create',
name: 'AssetCreate',
component: () => import('@/views/assets/Asset/AssetCreateUpdate.vue'),
meta: { title: i18n.t('route.AssetCreate'), activeMenu: '/assets/assets' },
hidden: true
hidden: true,
meta: { title: i18n.t('route.AssetCreate') }
},
{
path: ':id',
name: 'AssetDetail',
component: () => import('@/views/assets/Asset/AssetDetail/index.vue'),
meta: { title: i18n.t('route.AssetDetail'), activeMenu: '/assets/assets' },
hidden: true
component: () => import('@/views/assets/Asset/AssetDetail'),
hidden: true,
meta: { title: i18n.t('route.AssetDetail') }
},
{
path: ':id/update',
name: 'AssetUpdate',
component: () => import('@/views/assets/Asset/AssetCreateUpdate.vue'),
meta: { title: i18n.t('route.AssetUpdate'), activeMenu: '/assets/assets' },
hidden: true
hidden: true,
meta: { title: i18n.t('route.AssetUpdate') }
},
{
path: 'detail/:id/update',
name: 'AssetMoreInformationEdit',
component: () => import('@/views/assets/Asset/AssetMoreInformationEdit.vue'),
meta: { title: i18n.t('common.UpdateAssetDetail'), activeMenu: '/assets/assets' },
hidden: true
hidden: true,
meta: { title: i18n.t('common.UpdateAssetDetail'), action: 'update' }
}
]
},
@@ -48,34 +49,36 @@ export default [
path: 'domains',
component: empty,
redirect: '',
meta: { },
meta: {
permissions: ['assets.view_domain']
},
children: [
{
path: '',
name: 'DomainList',
component: () => import('@/views/assets/Domain/DomainList.vue'),
meta: { title: i18n.t('route.DomainList'), activeMenu: '/assets/domains' }
meta: { title: i18n.t('route.DomainList') }
},
{
path: 'create',
name: 'DomainCreate',
component: () => import('@/views/assets/Domain/DomainCreateUpdate.vue'),
meta: { title: i18n.t('route.DomainCreate'), activeMenu: '/assets/domains' },
hidden: true
hidden: true,
meta: { title: i18n.t('route.DomainCreate') }
},
{
path: ':id/update',
name: 'DomainUpdate',
component: () => import('@/views/assets/Domain/DomainCreateUpdate.vue'),
meta: { title: i18n.t('route.DomainUpdate'), activeMenu: '/assets/domains' },
hidden: true
hidden: true,
meta: { title: i18n.t('route.DomainUpdate') }
},
{
path: ':id',
name: 'DomainDetail',
component: () => import('@/views/assets/Domain/DomainDetail/index.vue'),
meta: { title: i18n.t('route.DomainDetail'), activeMenu: '/assets/domains' },
hidden: true
component: () => import('@/views/assets/Domain/DomainDetail'),
hidden: true,
meta: { title: i18n.t('route.DomainDetail') }
}
]
},
@@ -84,20 +87,27 @@ export default [
component: empty,
redirect: 'create',
hidden: true,
meta: {
permissions: ['assets.view_gateway']
},
children: [
{
path: 'create',
name: 'GatewayCreate',
component: () => import('@/views/assets/Domain/DomainDetail/GatewayCreateUpdate.vue'),
meta: { title: i18n.t('route.GatewayCreate'), activeMenu: '/assets/domains' },
hidden: true
meta: {
title: i18n.t('route.GatewayCreate'),
permissions: ['assets.view_gateway']
}
},
{
path: ':id/update',
name: 'GatewayUpdate',
component: () => import('@/views/assets/Domain/DomainDetail/GatewayCreateUpdate.vue'),
meta: { title: i18n.t('route.GatewayUpdate'), activeMenu: '/assets/domains' },
hidden: true
meta: {
title: i18n.t('route.GatewayUpdate'),
permissions: ['assets.change_gateway']
}
}
]
},
@@ -105,34 +115,36 @@ export default [
path: 'system-users',
component: empty,
redirect: '',
meta: { },
meta: {
permissions: ['assets.view_systemuser']
},
children: [
{
path: '',
name: 'SystemUserList',
component: () => import('@/views/assets/SystemUser/SystemUserList/index.vue'),
meta: { title: i18n.t('route.SystemUserList'), activeMenu: '/assets/system-users' }
component: () => import('@/views/assets/SystemUser/SystemUserList'),
meta: { title: i18n.t('route.SystemUserList') }
},
{
path: 'create',
name: 'SystemUserCreate',
component: () => import('@/views/assets/SystemUser/SystemUserCreateUpdate/index.vue'),
meta: { title: i18n.t('route.SystemUserCreate'), activeMenu: '/assets/system-users' },
hidden: true
component: () => import('@/views/assets/SystemUser/SystemUserCreateUpdate'),
hidden: true,
meta: { title: i18n.t('route.SystemUserCreate') }
},
{
path: ':id/update',
name: 'SystemUserUpdate',
component: () => import('@/views/assets/SystemUser/SystemUserCreateUpdate/index.vue'),
meta: { title: i18n.t('route.SystemUserUpdate'), activeMenu: '/assets/system-users' },
hidden: true
component: () => import('@/views/assets/SystemUser/SystemUserCreateUpdate'),
hidden: true,
meta: { title: i18n.t('route.SystemUserUpdate') }
},
{
path: ':id',
name: 'SystemUserDetail',
component: () => import('@/views/assets/SystemUser/SystemUserDetail/index.vue'),
meta: { title: i18n.t('route.SystemUserDetail'), activeMenu: '/assets/system-users' },
hidden: true
component: () => import('@/views/assets/SystemUser/SystemUserDetail'),
hidden: true,
meta: { title: i18n.t('route.SystemUserDetail') }
}
]
},
@@ -140,34 +152,37 @@ export default [
path: 'cmd-filters',
component: empty,
redirect: '',
meta: { },
meta: {
resource: 'commandfilter',
permissions: ['assets.view_commandfilter']
},
children: [
{
path: '',
name: 'CommandFilterList',
component: () => import('@/views/assets/CommandFilter/CommandFilterList.vue'),
meta: { title: i18n.t('route.CommandFilterList'), activeMenu: '/assets/cmd-filters' }
meta: { title: i18n.t('route.CommandFilterList') }
},
{
path: ':id/update',
component: () => import('@/views/assets/CommandFilter/CommandFilterCreateUpdate.vue'), // Parent router-view
name: 'CommandFilterUpdate',
meta: { title: i18n.t('route.CommandFilterUpdate'), activeMenu: '/assets/cmd-filters' },
hidden: true
hidden: true,
meta: { title: i18n.t('route.CommandFilterUpdate') }
},
{
path: 'create',
component: () => import('@/views/assets/CommandFilter/CommandFilterCreateUpdate.vue'), // Parent router-view
name: 'CommandFilterCreate',
meta: { title: i18n.t('route.CommandFilterCreate'), activeMenu: '/assets/cmd-filters' },
hidden: true
hidden: true,
meta: { title: i18n.t('route.CommandFilterCreate') }
},
{
path: ':id',
component: () => import('@/views/assets/CommandFilter/CommandFilterDetail/index.vue'), // Parent router-view
component: () => import('@/views/assets/CommandFilter/CommandFilterDetail'), // Parent router-view
name: 'CommandFilterDetail',
meta: { title: i18n.t('route.CommandFilterDetail'), activeMenu: '/assets/cmd-filters' },
hidden: true
hidden: true,
meta: { title: i18n.t('route.CommandFilterDetail') }
}
]
},
@@ -175,55 +190,65 @@ export default [
path: 'command-filter-rules',
component: empty,
hidden: true,
meta: {
resource: 'commandfilterrule'
},
children: [
{
path: 'create',
component: () => import('@/views/assets/CommandFilter/CommandFilterDetail/RulesCreateUpdate.vue'), // Parent router-view
name: 'CommandFilterRulesCreate',
meta: { title: i18n.t('route.CommandFilterRulesCreate'), activeMenu: '/assets/cmd-filters' },
hidden: true
meta: {
title: i18n.t('route.CommandFilterRulesCreate'),
activeMenu: '/console/assets/cmd-filters'
}
},
{
path: ':id/update',
component: () => import('@/views/assets/CommandFilter/CommandFilterDetail/RulesCreateUpdate.vue'), // Parent router-view
name: 'CommandFilterRulesUpdate',
meta: { title: i18n.t('route.CommandFilterRulesUpdate'), activeMenu: '/assets/cmd-filters' },
hidden: true
meta: {
title: i18n.t('route.CommandFilterRulesUpdate'),
activeMenu: '/console/assets/cmd-filters'
}
}
]
},
{
path: 'platforms',
component: empty,
meta: { permissions: [rolec.PERM_SUPER] },
meta: {
permissions: ['assets.view_platform'],
resource: 'platform'
},
redirect: '',
children: [
{
path: '',
name: 'PlatformList',
component: () => import('@/views/assets/Platform/PlatformList'),
meta: { title: i18n.t('route.PlatformList'), activeMenu: '/assets/platforms' }
meta: { title: i18n.t('route.PlatformList') }
},
{
path: 'create',
component: () => import('@/views/assets/Platform/PlatformCreateUpdate.vue'), // Parent router-view
name: 'PlatformCreate',
meta: { title: i18n.t('route.PlatformCreate'), activeMenu: '/assets/platforms' },
hidden: true
hidden: true,
meta: { title: i18n.t('route.PlatformCreate') }
},
{
path: ':id/update',
component: () => import('@/views/assets/Platform/PlatformCreateUpdate.vue'), // Parent router-view
name: 'PlatformUpdate',
meta: { title: i18n.t('route.PlatformUpdate'), activeMenu: '/assets/platforms', permissions: [rolec.PERM_SUPER] },
hidden: true
hidden: true,
meta: { title: i18n.t('route.PlatformUpdate'), permissions: [] }
},
{
path: ':id',
component: () => import('@/views/assets/Platform/PlatformDetail.vue'), // Parent router-view
name: 'PlatformDetail',
meta: { title: i18n.t('route.PlatformDetail'), activeMenu: '/assets/platforms' },
hidden: true
hidden: true,
meta: { title: i18n.t('route.PlatformDetail') }
}
]
},
@@ -231,28 +256,32 @@ export default [
path: 'labels',
component: empty,
redirect: '',
meta: { },
meta: {
resource: 'label',
permissions: ['assets.view_label']
},
children: [
{
path: '',
name: 'LabelList',
component: () => import('@/views/assets/Label/LabelList.vue'),
meta: { title: i18n.t('route.LabelList'), activeMenu: '/assets/labels' }
meta: { title: i18n.t('route.LabelList') }
},
{
path: 'create',
name: 'LabelCreate',
component: () => import('@/views/assets/Label/LabelCreateUpdate.vue'),
meta: { title: i18n.t('route.LabelCreate'), activeMenu: '/assets/labels' },
hidden: true
hidden: true,
meta: { title: i18n.t('route.LabelCreate') }
},
{
path: ':id/update',
name: 'LabelUpdate',
component: () => import('@/views/assets/Label/LabelCreateUpdate.vue'),
meta: { title: i18n.t('route.LabelUpdate'), activeMenu: '/assets/labels' }, hidden: true
hidden: true,
meta: { title: i18n.t('route.LabelUpdate') }
}
]
}
},
...XPackRoutes
]

Some files were not shown because too many files have changed in this diff Show More