Compare commits

..

1507 Commits

Author SHA1 Message Date
“huailei000”
9d3874a61c fix: 批量更新不请求接口 2022-09-06 19:06:42 +08:00
Jiangjie.Bai
d222ca0684 Revert "fix: form表单组件增加是否回显配置;批量更新弹窗组件默认设置为不回显"
This reverts commit 40655ca239.
2022-09-06 18:30:31 +08:00
“huailei000”
40655ca239 fix: form表单组件增加是否回显配置;批量更新弹窗组件默认设置为不回显 2022-09-06 18:12:20 +08:00
“huailei000”
ec28702181 fix: moment.js 插件升级修复官方漏洞 2022-09-05 13:55:17 +08:00
Jiangjie.Bai
4bb4d3fbf4 fix: 修复上传json文件上传问题 2022-08-19 13:39:17 +08:00
“huailei000”
a34fff2caa fix: 修复LDAP用户导入失败弹出提示 2022-08-19 11:06:11 +08:00
“huailei000”
a9eb32de6c fix: 升级lodash 2022-08-19 11:05:51 +08:00
Jiangjie.Bai
776090d6ba Merge pull request #2001 from jumpserver/dev
v2.25.0
2022-08-18 16:12:45 +08:00
feng626
2c66bec7c9 Merge pull request #2000 from jumpserver/pr@dev@ticket_translate
fix: 修复工单翻译
2022-08-18 15:10:45 +08:00
feng626
b10f7faf25 fix: 修复工单翻译 2022-08-18 15:09:26 +08:00
feng626
450014ab16 Merge pull request #1999 from jumpserver/pr@dev@batch_command_filter
perf: 批量命令搜索优化
2022-08-18 11:48:22 +08:00
feng626
8ad0d2ac58 perf: 批量命令搜索优化 2022-08-18 11:44:45 +08:00
Jiangjie.Bai
bd41f96df3 fix: 修复属性映射字段值不显示的问题 2022-08-18 11:01:13 +08:00
Jiangjie.Bai
3a37952288 Merge pull request #1996 from jumpserver/dev
v2.25.0-rc4
2022-08-17 16:53:23 +08:00
Jiangjie.Bai
5346eb1ef1 fix: 修复云同步 lan attrs ip_group 必填项问题,gcp 上传文件不显示问题 2022-08-17 16:46:32 +08:00
Jiangjie.Bai
62b8fc0e3b Merge pull request #1994 from jumpserver/dev
v2.25.0-rc3
2022-08-16 19:08:23 +08:00
“huailei000”
f532d624e0 fix: 字段设置为必填项 2022-08-16 16:31:13 +08:00
“huailei000”
4ce6f49b30 fix: 修复应用授权远程应用以外的类型不显示字段说明 2022-08-16 15:55:19 +08:00
Jiangjie.Bai
2fb160b5f7 fix: 修改表单默认值的设置,gcp 的 attrs 字段中是 child 不是 children 2022-08-16 15:53:25 +08:00
“huailei000”
4ed9fb2acc fix: 取消树搜索input自动提示最近输入 2022-08-16 14:25:54 +08:00
“huailei000”
722fc083cb perf: 替换资产树title 2022-08-16 12:24:35 +08:00
Jiangjie.Bai
4356b79ecc perf: 优化 attrs 字段 default 值的返回 2022-08-15 16:23:13 +08:00
feng626
5eff817b05 Merge pull request #1987 from jumpserver/pr@dev@update_TICKET_AUTHORIZE_DEFAULT_TIME
fix: 配置工单授权时间后更新vuex
2022-08-15 11:28:12 +08:00
feng626
4f08fef25a fix: 配置工单授权时间后更新vuex 2022-08-15 11:27:13 +08:00
Jiangjie.Bai
b2028869cb Merge pull request #1986 from jumpserver/dev
v2.25.0-rc2
2022-08-12 18:06:56 +08:00
feng626
325f21f8b5 Merge pull request #1985 from jumpserver/fix_tree_search_url
fix: 资产树默认关闭搜索;调整搜索url携带的参数
2022-08-12 16:53:33 +08:00
“huailei000”
802d6f6cd3 fix: 资产树默认关闭搜索;调整搜索url携带的参数 2022-08-12 16:49:47 +08:00
feng626
f2120521d6 Merge pull request #1984 from jumpserver/pr@dev@ticket_flow
fix: 还原工单流逻辑
2022-08-12 14:27:02 +08:00
feng626
cbdeea9be7 fix: 还原工单流逻辑 2022-08-12 14:21:53 +08:00
“huailei000”
8d2d38327a fix: 添加正则过滤表情符号方法;修复创建云同步名称能输入表情符号问题 2022-08-12 11:33:22 +08:00
“huailei000”
5c564c42dc fix: 修复资产树右键不显示菜单问题 2022-08-12 11:33:00 +08:00
feng626
0c47f8f962 Merge pull request #1981 from jumpserver/pr@dev@ticket_flow
fix:  全局组织下不能修改工单流
2022-08-12 10:44:12 +08:00
feng626
65d625ad3c fix: 全局组织下不能修改工单流 2022-08-12 10:43:20 +08:00
feng626
0e65b7f1be Merge pull request #1979 from jumpserver/pr@dev@actions
fix: 修复授权动作不展示
2022-08-11 18:05:27 +08:00
feng626
22cfaf8665 fix: 修复授权动作不展示 2022-08-11 18:03:30 +08:00
feng626
b3670fe528 fix: 修复系统工具切换时 清空终端信息 2022-08-11 16:26:19 +08:00
Jiangjie.Bai
2f80b66b07 perf: 云同步 LAN 添加测试超时时间选项 2022-08-11 16:25:54 +08:00
Jiangjie.Bai
5277a725f8 Merge pull request #1973 from jumpserver/dev
v2.25.0-rc1
2022-08-11 14:11:59 +08:00
“huailei000”
b400c13965 perf: 优化资产树搜索等待时间 2022-08-11 14:11:29 +08:00
fit2bot
c71f0c17fc feat: 添加树的title显示模块 (#1975)
* feat: 树组件增加搜索功能

* feat: 添加插入节点

* feat: zTree组件增加搜索功能配置、创建根节点配置

* feat: 添加树的title显示模块

Co-authored-by: “huailei000” <2280131253@qq.com>
2022-08-11 13:43:08 +08:00
fit2bot
a952477c3b fix: 修复创建应用工单action (#1971)
* fix: 修复创建应用工单action

* 调整结构

Co-authored-by: feng626 <1304903146@qq.com>
2022-08-10 19:36:22 +08:00
feng626
1153a3b38b fix: 修复翻译 2022-08-10 11:01:56 +08:00
fit2bot
2e69cd86aa feat: 系统工具Ping和Telnet (#1961)
Co-authored-by: halo <wuyihuangw@gmail.com>
Co-authored-by: Jiangjie.Bai <32935519+BaiJiangJie@users.noreply.github.com>
2022-08-09 17:55:14 +08:00
jiangweidong
a5ea6360bd perf: 优化测试按钮交互 2022-08-09 16:10:39 +08:00
jiangweidong
0639b139d7 feat: 支持CMPPv2.0协议短信网关 2022-08-09 16:10:39 +08:00
ibuler
a8867dee83 perf: aes key 强制最大 16 2022-08-05 14:55:00 +08:00
Jiangjie.Bai
c4d0462362 feat: Cloud 支持局域网 IP 扫描 2022-08-05 14:38:23 +08:00
“huailei000”
db97240ad3 perf: 调整导航栏对齐;替换站内信图标 2022-08-04 14:46:52 +08:00
jiangweidong
5b6f06ac0e feat: 认证方式支持OAuth2.0协议 (#1963)
* feat: 认证方式支持OAuth2.0协议

* 增加scope参数

* perf: 优化 OAuth2 认证逻辑和Logo,支持上传图标

* perf: 优化 OAuth2 认证逻辑和Logo,支持上传图标

Co-authored-by: Jiangjie.Bai <bugatti_it@163.com>
2022-08-04 14:41:20 +08:00
“huailei000”
51de827c2b fix: 修复浏览器控制台提示icons提示告警问题 2022-08-03 14:24:55 +08:00
ibuler
49566cdae7 perf: 修改头像 2022-08-03 14:24:37 +08:00
“huailei000”
b6786687b6 fix: 修复修改个人信息后点击tip链接跳转失败问题 2022-08-03 14:24:06 +08:00
feng626
c83abe32c6 Merge pull request #1960 from jumpserver/pr@dev@ticket_app_add_action
feat: 应用工单支持选择动作
2022-07-22 16:25:10 +08:00
feng626
1b19e0201d feat: 应用工单支持选择动作 2022-07-22 16:20:48 +08:00
feng626
7681250fff Merge pull request #1959 from jumpserver/pr@dev@ticket_perm_default_time
feat: 添加默认工单授权时间
2022-07-22 15:23:02 +08:00
feng626
9fe4e0b613 feat: 添加默认工单授权时间 2022-07-22 15:21:22 +08:00
Jiangjie.Bai
f137788c1a Merge pull request #1957 from jumpserver/dev
v2.24.0-rc5
2022-07-20 19:06:03 +08:00
“huailei000”
2f09c3f355 fix: 修复会话记录跳转链接颜色问题 2022-07-20 15:03:28 +08:00
“huailei000”
ea047e01d1 fix: 修复element-button类型为danger&plain的颜色问题 2022-07-20 15:02:59 +08:00
Jiangjie.Bai
f7d17c8de7 Merge pull request #1954 from jumpserver/dev
v2.24.0-rc4
2022-07-19 16:18:13 +08:00
“huailei000”
86ead72858 fix: 创建工单-切换组织时清空节点、资产、系统用户 2022-07-19 16:17:53 +08:00
ibuler
48b22edace perf: 修改 org 变量名称 2022-07-19 15:59:10 +08:00
ibuler
ea682a2aaa perf: 优化 dialog footer padding 2022-07-19 15:39:29 +08:00
fit2bot
8b499d8f7f pref: 优化体验 (#1952)
* perf: 修改 padding

* pref: 优化体验

Co-authored-by: ibuler <ibuler@qq.com>
2022-07-19 15:14:45 +08:00
“huailei000”
25c04e9c05 fix: 修复下拉选中项鼠标hover颜色问题 2022-07-19 15:10:44 +08:00
huangzhiwen
5dca562a12 fix: 修改动作选择为默认全展开 2022-07-19 14:58:18 +08:00
“huailei000”
7701bc9b67 fix: 修复从审批工单进入资产授权点击更新后获取不到数据问题 2022-07-18 17:17:30 +08:00
“huailei000”
157bc08f84 fix: 修复右键资产树后点击切换到其他组织不生效问题 2022-07-18 15:15:17 +08:00
Jiangjie.Bai
feea70b0be Merge pull request #1944 from jumpserver/dev
v2.24.0-rc3
2022-07-18 12:05:42 +08:00
“huailei000”
7921f1f9e5 fix: 修复element-ui 字体图标加载不出来问题 2022-07-18 10:59:06 +08:00
“huailei000”
a7252d16d1 fix: 修复element-ui字体图标加载失败问题 2022-07-17 11:20:20 +08:00
Jiangjie.Bai
04696ef3d6 Merge pull request #1940 from jumpserver/dev
v2.24.0-rc2
2022-07-15 18:07:37 +08:00
feng626
cdde3799af Merge pull request #1939 from jumpserver/pr@dev@confirm_css
fix: confirm css
2022-07-15 16:55:40 +08:00
feng626
f0b987ed54 fix: confirm css 2022-07-15 16:55:01 +08:00
jiangweidong
af60fdabda perf: 优化测试邮箱连接等功能时,交互界面优化,显示loading 2022-07-15 14:57:06 +08:00
“huailei000”
af0d6202bb perf: 优化首屏加载速度 2022-07-15 14:19:15 +08:00
feng626
c1e3c23523 Merge pull request #1937 from jumpserver/pr@dev@ticket_org
fix: 修复工单选择资源组织问题
2022-07-15 11:42:17 +08:00
feng626
7232706a7f fix: 修复工单选择资源组织问题 2022-07-15 11:41:06 +08:00
“huailei000”
dd2b76473f fix: 修复站内信链接颜色 2022-07-15 11:07:52 +08:00
“huailei000”
b41c3ac687 fix: 修复默认主题颜色配置不全问题 2022-07-15 11:01:08 +08:00
Jiangjie.Bai
1731f4f788 Merge pull request #1934 from jumpserver/dev
v2.24.0-rc1
2022-07-14 18:27:51 +08:00
feng626
fa74dad83d fix: vuex add notRootWorkbenchOrgs 2022-07-14 18:11:21 +08:00
Jiangjie.Bai
6f25d93909 Merge pull request #1931 from jumpserver/dev
v2.24.0-rc1
2022-07-14 17:51:58 +08:00
feng626
06a09b90e2 Merge pull request #1932 from jumpserver/pr@dev@ticket_title_css
fix: 修改创建更新工单 标题的css
2022-07-14 16:39:46 +08:00
feng626
3c9767b791 fix: 修改创建更新工单 标题的css 2022-07-14 16:38:17 +08:00
Jiangjie.Bai
da66f5e123 perf: 优化命令过滤器页面说明文案 2022-07-14 15:30:59 +08:00
feng626
e4f33cce14 Merge pull request #1928 from jumpserver/pr@dev@ticket_default_org
fix: ticket del global org
2022-07-14 15:14:50 +08:00
feng626
a5b374e524 fix: ticket del global org 2022-07-14 15:13:02 +08:00
Jiangjie.Bai
46461ec324 Merge pull request #1925 from jumpserver/dev
v2.24.0-rc1
2022-07-14 15:12:15 +08:00
Jiangjie.Bai
0dfcf42635 Merge pull request #1927 from jumpserver/pr@dev@fix_mergemaster
fix: merge dev
2022-07-14 15:11:42 +08:00
Jiangjie.Bai
0aa42bc72a fix: merge dev 2022-07-14 15:10:26 +08:00
fit2bot
cbf76c17d5 pref: 系统用户有 key 后,更新显示指纹 (#1906)
Co-authored-by: ibuler <ibuler@qq.com>
2022-07-14 14:54:55 +08:00
“huailei000”
216a2df6da perf:优化默认主题文件格式 2022-07-14 14:53:36 +08:00
“huailei000”
0b2db0615e fix: 系统用户-telnet协议用户名设置为非必填 2022-07-14 14:47:22 +08:00
“huailei000”
3544fe5bfa fix: 修复无痕模式下其他组织创建新用户登录没有权限问题 2022-07-14 14:42:55 +08:00
feng626
2cd30fc9d8 Merge pull request #1921 from jumpserver/pr@dev@del_history_account
perf: 暂时禁用账号历史
2022-07-14 10:40:45 +08:00
feng626
71bbe7b0c5 perf: 暂时禁用账号历史 2022-07-14 10:38:51 +08:00
feng626
29f1523113 Merge pull request #1919 from jumpserver/pr@dev@audit_command_filter
perf: 批量命令添加搜索项
2022-07-13 17:34:24 +08:00
feng626
6b5981e3af perf: 批量命令添加搜索项 2022-07-13 17:33:13 +08:00
Jiangjie.Bai
273a6cbb3b feat: Endpoint 支持 oracle 版本 2022-07-13 16:32:01 +08:00
feng626
6c78f04d12 Merge pull request #1731 from jumpserver/pr@dev@ticket
fix: 工单 bug
2022-07-13 15:50:08 +08:00
feng626
1b86b4e4cd fix: ticket bug 2022-07-13 15:47:36 +08:00
“huailei000”
94d3560410 fix:资产授权-资产节点列表默认显示资产 2022-07-13 14:03:47 +08:00
“huailei000”
897749547d fix: 修复资产账号连续点击查看不触发问题 2022-07-13 14:03:06 +08:00
ibuler
6fb34451d9 perf: 修改主题 btn 颜色 2022-07-13 11:13:23 +08:00
ibuler
3fba41b27b perf: 优化配色 2022-07-13 10:03:11 +08:00
Jiangjie.Bai
6c5f991494 fix: 修改连接令牌 is_valid 字段 2022-07-12 18:33:58 +08:00
ibuler
e80499b7b4 fix: 修复普通用户登录默认 404
perf: 添加注释
2022-07-12 17:12:03 +08:00
feng626
732788ac72 Merge pull request #1905 from jumpserver/pr@dev@confirm
fix: oauth bind confirm url
2022-07-12 16:02:57 +08:00
feng626
5a63cd253d fix: oauth bind confirm url 2022-07-12 15:59:58 +08:00
feng626
bc17b5c504 feat: 工单支持审批时修改资产 2022-07-12 15:29:27 +08:00
feng626
5dfcfd7b71 Merge pull request #1904 from jumpserver/pr@dev@perf_colors
fix: theme colors default
2022-07-12 14:56:21 +08:00
feng626
39766553fa fix: theme colors default 2022-07-12 14:55:02 +08:00
ibuler
b6be60c584 perf: 优化 theme color 2022-07-12 14:15:45 +08:00
fit2bot
a6d9bd1ab3 perf: 优化 btn 颜色 (#1902)
* perf: 修改 theme

* perf: 优化 btn 颜色

Co-authored-by: ibuler <ibuler@qq.com>
2022-07-12 13:43:33 +08:00
ibuler
940a3c50f3 perf: 修改 theme 2022-07-12 13:28:28 +08:00
ibuler
ca45f61c2c perf: remove unused css 2022-07-12 10:29:05 +08:00
fit2bot
7644bffe12 feat: 添加连接令牌页面 (#1891)
* feat: 修改 API Key action 启停->启用/禁用

* feat: 添加连接令牌页面

* feat: 添加连接令牌页面

* feat: 修改敏感字段组件

* feat: 添加help text

Co-authored-by: Jiangjie.Bai <bugatti_it@163.com>
2022-07-11 19:38:56 +08:00
feng626
ba1923cd21 Merge pull request #1899 from jumpserver/pr@dev@yarn_lock
perf: update yarn lock
2022-07-11 18:23:21 +08:00
feng626
e0dc7ab451 perf: update yarn lock 2022-07-11 18:21:57 +08:00
“huailei000”
3a1f0b6d38 fix: 修复info类型button的样式特殊处理 2022-07-11 18:19:52 +08:00
“huailei000”
13b91a541c fix: 修复el-link边框颜色 2022-07-11 17:06:59 +08:00
“huailei000”
0cd96e1d82 fix: 修复混合颜色方法判断错误问题 2022-07-11 15:55:51 +08:00
ibuler
efe6247dbc perf: 修改 theme color 2022-07-11 15:17:34 +08:00
ibuler
b8b7c73bb1 perf: 修改主题 2022-07-11 11:18:23 +08:00
“huailei000”
3b1ea689d1 perf: 删除没有引用的主题文件 2022-07-11 11:16:35 +08:00
“huailei000”
c5a611af06 perf: 修改淘宝镜像新域名 2022-07-11 11:09:25 +08:00
ibuler
ef41dc809c perf: 修改 demo 2022-07-08 15:38:42 +08:00
“huailei000”
bc0ca617a1 fix: 修复修改密码组件颜色随主题色变化 2022-07-08 15:38:11 +08:00
“huailei000”
d25620ecfe fix: 修复element-ui,link标签hover状态的颜色 2022-07-08 15:37:45 +08:00
“huailei000”
bc9d0aeeb3 fix: 修复工单查看受理人翻译问题、颜色问题;修复button focus状态下颜色问题 2022-07-08 13:34:54 +08:00
“huailei000”
bbd2951496 fix: 修复命令存储默认初始值不准确问题 2022-07-08 11:19:58 +08:00
“huailei000”
0d80eca595 feat: 添加主题预览功能 2022-07-07 19:43:03 +08:00
fit2bot
d8cf5ad553 perf: 修改一些名字 (#1882)
* perf: 修改一些名字

* perf: 修改 colors

Co-authored-by: ibuler <ibuler@qq.com>
2022-07-07 18:34:15 +08:00
“huailei000”
ec9b8f0005 perf: 优化修改主题相关方法传参 2022-07-07 18:07:38 +08:00
feng626
d98c961fd8 Merge pull request #1880 from jumpserver/pr@dev@confirm
fix: 调整confirm
2022-07-07 17:07:28 +08:00
feng626
639122aeca fix: 调整confirm 2022-07-07 17:04:54 +08:00
“huailei000”
45852eb4b9 fix: 修复修改主题颜色以后button hover颜色不一致问题 2022-07-07 15:03:15 +08:00
“huailei000”
24e716df5d fix: 修复修改主题颜色后提交保存页面刷新不生效问题 2022-07-07 12:55:24 +08:00
dependabot[bot]
fbda43b9dd build(deps): bump shell-quote from 1.7.2 to 1.7.3
Bumps [shell-quote](https://github.com/substack/node-shell-quote) from 1.7.2 to 1.7.3.
- [Release notes](https://github.com/substack/node-shell-quote/releases)
- [Changelog](https://github.com/substack/node-shell-quote/blob/master/CHANGELOG.md)
- [Commits](https://github.com/substack/node-shell-quote/compare/v1.7.2...1.7.3)

---
updated-dependencies:
- dependency-name: shell-quote
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-07 09:35:02 +08:00
“huailei000”
e5f18fa2bb perf: 去掉预览效果 2022-07-06 20:02:42 +08:00
“huailei000”
a3e97cb039 fix: 修复菜单颜色不变化问题 2022-07-06 19:50:28 +08:00
fit2bot
f4292796fc perf: 优化配色 (#1871)
* perf: 优化配色

* perf: 修改 interface

Co-authored-by: ibuler <ibuler@qq.com>
2022-07-06 19:45:44 +08:00
“huailei000”
bc991fe762 perf: 调整主题配置文件结构 2022-07-06 19:43:18 +08:00
“huailei000”
3de65f9a5b fix: 修复仪表盘不随主题颜色变化问题;修复SAML2-link标签颜色;修复select-down显示颜色 2022-07-06 17:49:38 +08:00
“huailei000”
000c8da6ae perf: 优化主题配置文件对象写法 2022-07-06 15:03:48 +08:00
ibuler
bc253c26b9 perf: 修改 css 名称 2022-07-06 11:01:13 +08:00
“huailei000”
abc3738309 perf: 优化css文件命名;删除没用css文件;解决设置主题保存也生效问题 2022-07-06 10:50:01 +08:00
ibuler
c305ca2e22 pref: 还原高度 2022-07-05 20:17:53 +08:00
“huailei000”
6618afc72f fix: 修复倒入组件报错问题 2022-07-05 20:17:17 +08:00
huailei
ab4b4d5230 Feat addtheme (#1864)
* feat: 删除没用的css文件

* feat: 添加修改主题组件

* feat: 设置全局css变量

* feat: 替换修改主题方法

* perf: 修改 bg color

* perf: 修改 left bar css

* perf: 修改 element

* perf: 暂存与喜爱

* feat: 添加颜色转换方法

* perf: 修改一些

* perf: 修改颜色

* feat: 修改默认elemet-ui样式

* feat: 暂存

* feat: 添加切换菜单栏颜色方法

* feat: 调整配置颜色

* feat: 调整主题相关配色
1、修复弹窗出现黑屏问题
2、修复左侧菜单展开、折叠出现白色闪动问题
3、迁移element-ui.scss文件内容到extra.css文件里

* feat: 调整styles下文件结构;升级sass插件修复构建提示语法错误问题

* feat: 拆分主题配置文件;添加设置到基本设置里

* feat: 修复public-fonts目录下文件内容

* fix: 解决冲突

* feat: 修改颜色配置

Co-authored-by: ibuler <ibuler@qq.com>
2022-07-05 20:06:28 +08:00
fit2bot
be842a3e3a perf: 修改颜色 (#1862)
* perf: 修改颜色

* perf: 优化主题

Co-authored-by: ibuler <ibuler@qq.com>
2022-07-05 17:35:05 +08:00
fit2bot
114704f668 perf: 优化主题配色 (#1859)
* perf: 优化主题配色

* perf: 修改主题

* perf: 修改更新 theme

* perf: 修改主题

* perf: 修改 avart

* perf: css

* perf: css

Co-authored-by: ibuler <ibuler@qq.com>
2022-07-05 14:31:50 +08:00
fit2bot
5f8b3f1986 feat: 账号历史信息 (#1841)
* perf: 账号历史信息

* del app

Co-authored-by: feng626 <1304903146@qq.com>
2022-07-04 18:55:46 +08:00
“huailei000”
4b376b65b3 fix: 修复当前用户加入组织后创建工单不显示加入的组织问题 2022-07-04 11:27:54 +08:00
feng626
f5c7abcbd8 perf: confirm 优化 2022-07-04 11:24:25 +08:00
Jiangjie.Bai
bb91fbb327 perf: 会话列表显示终端名称; 2022-07-04 11:22:30 +08:00
fit2bot
c3cc54a2d2 perf: 简单修改配色 (#1857)
* perf: 简单修改配色

* perf: 吸怪透明度

* perf: 默认红色

Co-authored-by: ibuler <ibuler@qq.com>
2022-07-01 16:12:36 +08:00
fit2bot
109b40f3b2 perf: 修改 css (#1856)
* perf: 修改 css

* perf: 菜单颜色

* perf: 修改主题

* perf: 统一颜色 css

* perf: 修改 css

* perf: 修改 css

Co-authored-by: ibuler <ibuler@qq.com>
2022-07-01 15:15:17 +08:00
Jiangjie.Bai
47a3005b6a perf: 创建更新用户和用户列表添加 is_active 字段 2022-06-30 18:28:35 +08:00
ibuler
7c6530d9e8 perf: 修改统一 css 2022-06-30 18:28:17 +08:00
ibuler
8e57d76713 perf: 整理 css 2022-06-30 18:28:17 +08:00
ibuler
8f6c9af3fb perf: 修改主题 2022-06-30 13:07:22 +08:00
ibuler
2719925f8b perf: remove duplicate css 2022-06-30 13:07:22 +08:00
feng626
51c7a3e8cc Merge pull request #1852 from jumpserver/pr@dev@ticket_bug
fix: 修复工单命令复合显示bug
2022-06-30 11:17:46 +08:00
feng626
0946fedce2 fix: 修复工单命令复合显示bug 2022-06-30 11:16:16 +08:00
Jiangjie.Bai
8b11146e44 feat: Endpoint 添加帮助信息 2022-06-29 18:51:05 +08:00
“huailei000”
263ab8c913 fix: 修复进入工单流程设置详情页,页面布局出现遮挡问题 2022-06-29 10:51:43 +08:00
“huailei000”
33b8e7a21b perf: 修复工单-创建应用授权error提示方式 2022-06-29 10:49:21 +08:00
“huailei000”
ccecaf7aae fix: 修复工单页面刷新会返回到工作台问题 2022-06-28 18:14:19 +08:00
feng626
fc8d9b4509 Merge pull request #1844 from jumpserver/pr@dev@fix_ticket_bug
fix: 解决一些工单已知问题
2022-06-28 17:19:54 +08:00
feng626
25999801d5 fix: 解决一些工单已知问题 2022-06-28 17:15:02 +08:00
“huailei000”
763c8338ef fix: 修复终端管理操作不显示问题 2022-06-28 16:32:49 +08:00
“huailei000”
340516297b fix: 修复密码过期组件变量没找到报错问题 2022-06-28 15:55:42 +08:00
ibuler
069ba9cfc4 perf: 修改 msg 2022-06-23 17:28:11 +08:00
ibuler
4c88a331d5 perf: 修改 license 提示 2022-06-23 17:28:11 +08:00
“huailei000”
d7016c5de2 perf: 优化左侧菜单折叠后title修改为显示图标 2022-06-23 15:54:41 +08:00
feng626
3d41215a63 Merge pull request #1780 from jumpserver/pr@dev@refactor_tickiets
perf: 工单重构
2022-06-23 14:38:44 +08:00
feng626
57e5452220 优化一波 2022-06-23 14:31:06 +08:00
“huailei000”
cc94eb6d4e perf: 优化帮助文案 2022-06-22 16:40:51 +08:00
“huailei000”
0b82947e8f fix: 修复左侧菜单英文翻译问题 2022-06-22 16:22:10 +08:00
ibuler
e4507e35fd perf: 优化站内信布局 2022-06-21 14:27:16 +08:00
“huailei000”
40fd62cd2b fix: 修改在更新页面下切换组织,点击浏览器后退操作接口500问题 2022-06-17 19:00:21 +08:00
ibuler
5e8c1b4881 pref: 优化添加批量删除 2022-06-17 18:20:03 +08:00
ibuler
5f984ecbe6 perf: 修改移动设备下的表现 2022-06-17 18:19:30 +08:00
feng626
111d3d56e2 perf: 优化confirm 重新登录翻译 2022-06-16 18:47:37 +08:00
feng626
91c6a4d6b2 perf: 优化confirm 重新登录翻译 2022-06-16 18:32:14 +08:00
Jiangjie.Bai
58ab7139d6 Merge pull request #1817 from jumpserver/dev
v2.23.0 rc6
2022-06-16 18:13:04 +08:00
“huailei000”
81d8cd971c fix: 切换视图提示信息判断移动端不显示 2022-06-16 18:11:20 +08:00
ibuler
ea3e26b92c perf: 修改移动端 table 2022-06-16 18:09:26 +08:00
feng626
a076a277c9 fix: confirm bug 2022-06-16 18:08:40 +08:00
feng626
3c9a3b693b 修啊修 2022-06-16 17:53:50 +08:00
Jiangjie.Bai
79f6bea423 perf: 优化会话加入记录结束状态显示 2022-06-16 16:42:08 +08:00
Jiangjie.Bai
ea8af7deb3 Merge pull request #1810 from jumpserver/dev
v2.23.0 rc5
2022-06-16 15:53:41 +08:00
ibuler
fcfd26c58f perf: 优化 icon 2022-06-16 15:47:49 +08:00
“huailei000”
a6c1e16339 fix: 修复资产列表右击资产搜索框出现空白tag问题 2022-06-16 15:45:08 +08:00
“huailei000”
c899b209d7 fix: 修复全局组织下不能创建判断;平台列表全局组织可以创建、克隆判断 2022-06-16 14:50:34 +08:00
“huailei000”
bba8f8a9a0 fix: 修复终端管理-翻译问题 2022-06-16 14:50:18 +08:00
“huailei000”
d1b620956e perf: 帮助下拉内容与luna保持一致 2022-06-16 14:15:54 +08:00
Jiangjie.Bai
f260979a11 fix: 修复创建、更新用户时need_update_password字段样式 2022-06-16 13:56:34 +08:00
feng626
f3bc6bdd46 Merge pull request #1804 from jumpserver/pr@dev@confirm_bug
fix: confirm bug
2022-06-16 12:44:03 +08:00
feng626
7fe91756c9 fix: confirm bug 2022-06-16 12:39:41 +08:00
feng626
0fa05aaeb4 Merge pull request #1803 from jumpserver/pr@dev@confirm_input_perf
perf: user confirm input
2022-06-16 12:32:02 +08:00
feng626
2183e6bc89 perf: user confirm input 2022-06-16 12:31:03 +08:00
Jiangjie.Bai
1ecc57b21b Merge pull request #1797 from jumpserver/dev
v2.23.0 rc4
2022-06-15 19:35:36 +08:00
feng626
76085f42c5 fix: 修复profile更新 会取消三方绑定账号问题 2022-06-15 19:31:33 +08:00
“huailei000”
ba0a425359 fix: 修复全局组织下克隆权限判断 2022-06-15 19:31:16 +08:00
feng626
c18f712b84 修改一点 2022-06-15 18:59:00 +08:00
“huailei000”
6815d3be13 fix: 修复资产列表自定义搜索显示true问题 2022-06-15 17:46:52 +08:00
ibuler
385e654fbe perf: 搜索下拉 ID 2022-06-15 16:34:08 +08:00
“huailei000”
09010e4e94 fix: 修复创建用户表单翻译问题 2022-06-15 15:36:12 +08:00
ibuler
f347833ea8 perf: 优化 license 报错 2022-06-15 15:35:18 +08:00
“huailei000”
ae9c5c389d fix: 修复任务列表-删除任务名称不一样问题 2022-06-15 15:31:16 +08:00
Jiangjie.Bai
15a53c4b90 Merge pull request #1791 from jumpserver/dev
v2.23.0-rc3
2022-06-13 17:43:21 +08:00
“huailei000”
703898e707 fix: 修复资产树右键-显示资产详情弹窗不显示问题 2022-06-13 17:39:19 +08:00
feng626
fe0d7a7e3f 修改 2022-06-13 16:25:30 +08:00
Jiangjie.Bai
09b6bc1c18 Merge pull request #1789 from jumpserver/dev
v2.23.0-rc1
2022-06-09 17:40:42 +08:00
Jiangjie.Bai
d1a2564359 perf: 优化Su用户提示信息颜色样式 2022-06-09 17:20:47 +08:00
feng626
a3193beabf 改又改 2022-06-09 14:26:08 +08:00
dependabot[bot]
f46a1054ea build(deps): bump async from 2.6.3 to 2.6.4
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-09 10:34:58 +08:00
dependabot[bot]
64813f9cb6 build(deps): bump follow-redirects from 1.13.1 to 1.14.8
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.13.1 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.13.1...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-09 10:34:34 +08:00
dependabot[bot]
a6c0207c7e build(deps): bump moment from 2.29.1 to 2.29.2
Bumps [moment](https://github.com/moment/moment) from 2.29.1 to 2.29.2.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.1...2.29.2)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-09 10:33:48 +08:00
dependabot[bot]
bf207285a8 build(deps): bump eventsource from 1.0.7 to 1.1.1
Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.0.7 to 1.1.1.
- [Release notes](https://github.com/EventSource/eventsource/releases)
- [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md)
- [Commits](https://github.com/EventSource/eventsource/compare/v1.0.7...v1.1.1)

---
updated-dependencies:
- dependency-name: eventsource
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-09 10:33:29 +08:00
ibuler
dd026f11ee perf: 修改 tree add 2022-06-09 10:23:08 +08:00
feng626
a58accca4d Merge pull request #1786 from jumpserver/pr@dev@relogin_bug
fix: relogin visible
2022-06-08 19:41:09 +08:00
feng626
bb572a3de9 fix: relogin visible 2022-06-08 19:39:27 +08:00
feng626
8836284b88 Merge pull request #1785 from jumpserver/pr@dev@user_confirm
perf: 统一校验当前用户api
2022-06-07 19:25:58 +08:00
feng626
68d97242cc perf: 统一校验当前用户api 2022-06-07 19:20:50 +08:00
Jiangjie.Bai
1bb3f0a48e feat: 添加组件类型 razor 并替换 XRDP_ENABLED 2022-06-07 13:42:24 +08:00
Jiangjie.Bai
7b566ae46f feat: 创建API增加clone_from查询参数 2022-06-06 16:12:41 +08:00
feng626
9dd89fe7ae fix: 合并后的bug 2022-06-02 15:05:51 +08:00
feng626
db67aa9b39 merge pr@dev@refactor_tickets 2022-06-02 11:39:59 +08:00
feng626
df96ce4112 perf: 工单重构 2022-06-02 10:34:05 +08:00
ibuler
4d27014330 perf: 优化工单 2022-06-02 08:48:53 +08:00
Jiangjie.Bai
1cb10902d5 feat: OIDC 用户添加属性映射值 2022-05-31 16:04:12 +08:00
“huailei000”
b71b602433 fix: 修复删除已绑定用户的角色,重复提示报错问题
1、删除组件内错误提示信息,统一走全局错误提示信息
2022-05-31 15:55:27 +08:00
ibuler
e39c4fc339 perf: 优化 ldap 导入 2022-05-30 11:41:21 +08:00
“huailei000”
9107c6a76a feat: 命令过滤详情添加用户、用户组、应用右侧卡片快捷入口 2022-05-30 10:31:26 +08:00
ibuler
55a83a2064 perf: 速度慢点,为以后优化留下空间 2022-05-30 10:30:43 +08:00
ibuler
92f52b100a perf: 优化动画速度 2022-05-30 10:21:18 +08:00
“huailei000”
5cd3aea0a3 feat: 应用授权详情按钮添加权限控制 2022-05-25 09:50:21 +08:00
ibuler
78b72ec68a perf: bool 使用 switcher 2022-05-20 11:43:21 +08:00
fit2bot
04c0c10d46 perf: remote app, cloud, setting 字段支持加密 (#1763)
* stash: 暂存

* pref: 其它字段也加密

* perf: 设置存储字段支持加密

Co-authored-by: ibuler <ibuler@qq.com>
2022-05-20 11:33:18 +08:00
Jiangjie.Bai
c2833cefc2 Merge pull request #1770 from jumpserver/dev
v2.22.0-rc5
2022-05-19 13:07:56 +08:00
“huailei000”
1878376295 fix: 修复消息订阅接受人数不准确问题 2022-05-19 11:44:03 +08:00
Jiangjie.Bai
b25b7dfbc9 Merge pull request #1767 from jumpserver/dev
v2.22.0-rc4
2022-05-18 19:49:38 +08:00
Jiangjie.Bai
98c2677571 fix: 修改 es 翻译 2022-05-18 19:46:33 +08:00
“huailei000”
dd58f400a6 fix: 命令存储索引转换为小写 2022-05-18 19:40:49 +08:00
“huailei000”
a0baca0859 fix: 修复导入弹窗组件参数类型报错问题 2022-05-18 17:35:10 +08:00
“huailei000”
8f7bcc2e26 fix: 修复zTree添加、移动资产时menu无法关闭问题 2022-05-18 17:34:51 +08:00
ibuler
5835ac7f70 perf: 添加 session guard 2022-05-18 14:50:16 +08:00
Jiangjie.Bai
fe5941e078 Merge pull request #1758 from jumpserver/dev
v2.22.0-rc3
2022-05-17 21:13:32 +08:00
ibuler
b497f80a76 perf: 开启工单启用 2022-05-17 18:59:24 +08:00
ibuler
8efb405fc0 perf: 恢复 tickets 2022-05-17 18:01:36 +08:00
“huailei000”
51d0861550 fix: 修复工单详情跳转资产授权、应用授权权限位判断问题 2022-05-17 17:28:58 +08:00
Jiangjie.Bai
3050b09b2d Merge pull request #1753 from jumpserver/dev
v2.22.0-rc2
2022-05-17 15:22:01 +08:00
fit2bot
aa00f1e4a6 perf: 修改 console.log() 语句为 debug() 标识 (#1749)
Co-authored-by: Jiangjie.Bai <bugatti_it@163.com>
Co-authored-by: Jiangjie.Bai <32935519+BaiJiangJie@users.noreply.github.com>
2022-05-17 15:16:33 +08:00
ibuler
c604957e66 perf: 账户更新加密 2022-05-17 15:14:18 +08:00
ibuler
91d0f6f92b revert: 暂时还原一下 2022-05-17 14:58:47 +08:00
feng626
f11131e9ad Merge pull request #1751 from jumpserver/pr@dev@fix_bulk_update
fix: 修复批量提交的问题
2022-05-17 12:08:01 +08:00
ibuler
db1b02c262 fix: 修复批量提交的问题 2022-05-17 12:02:04 +08:00
jiangweidong
2610645703 feat: 云同步资产支持Fusion Compute私有云 2022-05-16 18:11:03 +08:00
feng626
a9ee9ac919 Merge pull request #1747 from jumpserver/pr@dev@ticket_perm_workbench
fix: 修复申请工单时未选择工作台权限没有对应组织bug
2022-05-16 13:06:58 +08:00
feng626
b9cd54127c fix: 修复申请工单时未选择工作台权限没有对应组织bug 2022-05-16 13:05:53 +08:00
Jiangjie.Bai
b24deb6c1e Merge pull request #1745 from jumpserver/dev
v2.22.0 rc1
2022-05-12 17:03:12 +08:00
ibuler
ee901e54d3 perf: 修改 token 2022-05-12 15:43:54 +08:00
Jiangjie.Bai
0b5820edba feat: Endpoint添加Redis Port 2022-05-12 14:48:15 +08:00
ibuler
f10118d9d2 perf: 关闭浏览器失效会话 2022-05-12 11:36:05 +08:00
Jiangjie.Bai
c7bf054af7 fix: 删除用户向导配置项 2022-05-11 17:31:47 +08:00
Jiangjie.Bai
fd9916b21b feat: LDAP同步用户支持组织 2022-05-11 11:10:12 +08:00
fit2bot
e78e0cf132 perf: 优化加密传输 (#1739)
* perf: 优化加密

* perf: 优化加密传输

Co-authored-by: ibuler <ibuler@qq.com>
2022-05-10 17:41:14 +08:00
ibuler
441c1eb91d perf: 优化加密 2022-05-10 17:29:07 +08:00
feng626
ab4edd37d4 Merge pull request #1738 from jumpserver/pr@dev@terminal_bulk_update_command_storage
fix: 修复终端存储批量更新
2022-05-10 11:34:30 +08:00
feng626
def43f8e07 fix: 修复终端存储批量更新 2022-05-10 11:32:45 +08:00
“huailei000”
ea1148159b fix: 调整切换视图提示位置 2022-05-10 10:46:00 +08:00
jiangweidong
92a23c6e69 perf: 优化字段 2022-05-09 16:38:23 +08:00
jiangweidong
d6c3cce161 perf: 命令存储ES可根据日期动态建立索引 2022-05-09 16:38:23 +08:00
ibuler
fe5649fbd2 perf: 优化 view switch 切换,增加提示 2022-05-09 14:50:51 +08:00
ibuler
e91ca71812 perf: 修改使用 rsa 加密数据 2022-05-07 15:42:46 +08:00
Jiangjie.Bai
4a8305979e feat: public settings 区分 public 和 open 2022-05-07 12:22:55 +08:00
Frank
b81cbb3d16 文件上传的时候 会让人误以为是直接点击上传按钮。其实是两种方式:要么退拽到此处,或者点击此处上传文件。 2022-05-07 11:11:58 +08:00
“huailei000”
b95867d229 fix: 系统用户应用账号列表设置为不可点击 2022-05-05 16:05:21 +08:00
jiangweidong
1ac9ca4593 feat: 账号管理下的资产账号及系统用户下的资产账号支持批量删除 2022-05-05 16:04:47 +08:00
jiangweidong
e59a71285d perf: 查看账号管理中的密码记录日志 2022-05-05 16:04:21 +08:00
Jiangjie.Bai
fac0c6ff9a feat: 添加License数量限制超过提示 2022-05-05 15:54:38 +08:00
Jiangjie.Bai
688eb5838f perf: 优化 OIDC 支持选择认证方式 2022-04-29 14:28:28 +08:00
“huailei000”
075ad0358b fix: 修复临时密码提示翻译 2022-04-29 10:45:49 +08:00
“huailei000”
1187892370 fix: 修复不同语言下switcherview边距问题 2022-04-29 10:44:06 +08:00
feng626
68e30c29fa fix: 开放platform 权限 2022-04-29 10:39:02 +08:00
fit2bot
565ed805da perf: 优化 tree table (#1722)
* perf: 优化 tree table

* perf: 还原信息

Co-authored-by: ibuler <ibuler@qq.com>
2022-04-28 16:06:02 +08:00
feng626
59fa4cd6e0 Merge pull request #1712 from jumpserver/pr@dev@workbench_orgs
fix: myorgs -> workbench_orgs
2022-04-25 11:37:17 +08:00
feng626
547263d44c fix: myorgs -> workbench_orgs 2022-04-25 11:33:32 +08:00
feng626
59a0a41586 Merge pull request #1710 from jumpserver/pr@dev@fix_temporary_password_text
fix: 修改临时密码提示文案
2022-04-25 11:05:52 +08:00
“huailei000”
2d887df226 fix: 修改临时密码提示文案 2022-04-25 03:00:15 +00:00
ibuler
03ad4cc73c perf: 修改 build 2022-04-24 09:32:23 +08: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
“怀磊”
c093e7d621 fix: 修复资产授权创建时默认选中了点击的资产和节点问题
修改为指保留最后一次选中的资产或者节点
2022-02-17 18:20:47 +08:00
“怀磊”
70d2599d4a fix: 修复资产授权创建时默认选中了点击的资产和节点问题
修改为指保留最后一次选中的资产或者节点
2022-02-17 11:33:39 +08:00
Jiangjie.Bai
b4183b421f Merge pull request #1316 from jumpserver/dev
v2.19.0-rc3
2022-02-16 16:42:58 +08:00
“怀磊”
9c6281cf02 fix: 修复资产账号导出条数不准确问题 2022-02-16 16:41:10 +08:00
feng626
e7bdf6276d fix: 工单流需要超级管理员配置 2022-02-16 14:50:45 +08:00
“怀磊”
fa860dbd85 fix: 修复命令记录页面筛选数据时tree自动刷新问题 2022-02-15 18:04:42 +08:00
Jiangjie.Bai
2bb4ca3ec0 fix: 修改LDAP SYNC相关参数设置 2022-02-15 17:58:20 +08:00
feng626
93a08d265b fix: 修复工单流只在当前组织管理员或系统管理员显示 2022-02-15 17:01:07 +08:00
Jiangjie.Bai
b7be7784c6 Merge pull request #1310 from jumpserver/dev
v2.19.0-rc2
2022-02-14 18:33:51 +08:00
“怀磊”
375c6bf44b fix: 修复搜索组件在页面刷新后搜索条件是布尔类型时页面不显示中文问题
1、优化获取url中搜索条件的算法
2022-02-14 18:23:03 +08:00
feng626
542e34208e feat: 工单添加redis类型 2022-02-14 17:46:07 +08:00
“怀磊”
f041b0de74 fix: 修复命令记录页面layout布局不能自适应问题 2022-02-14 16:16:59 +08:00
“怀磊”
7ff75280a5 fix: 修复search组件去重搜索不准确问题 2022-02-14 16:16:29 +08:00
ibuler
d76009de3a pref: 优化数据库协议翻译 2022-02-14 15:01:45 +08:00
“怀磊”
851f4508e2 fix: 资产账号替换密码框组件 2022-02-10 15:04:56 +08:00
feng626
a36e5196f8 perf: 工单流显示组织名称 2022-02-10 15:04:09 +08:00
Jiangjie.Bai
d22d16681e Merge pull request #1300 from jumpserver/dev
v2.19.0-rc1
2022-02-10 10:50:21 +08:00
“怀磊”
31c86fb281 feat: table搜索框支持多级自定义搜索 2022-02-09 18:47:24 +08:00
Michael Bai
f83739b496 fix: 修改第三方认证用户进行MFA认证配置项变量名 2022-02-09 10:34:09 +08:00
Michael Bai
1d9eddb11f feat: 增加系统设置(安全)控制第三方认证用户是否进行MFA认证 2022-02-08 17:49:21 +08:00
Michael Bai
da14abc83b feat: 命令过滤规则增加忽略大小写选项 2022-02-08 12:31:48 +08:00
“怀磊”
7b705dfc75 perf: 表单自动滚动到校验出错位置 2022-01-21 18:35:13 +08:00
“怀磊”
4516d83ce4 fix: 修复搜索框不能搜索false选项的问题 2022-01-20 15:05:35 +08:00
Jiangjie.Bai
db753bd1c2 Merge pull request #1292 from jumpserver/dev
v2.18
2022-01-20 13:48:00 +08:00
Michael Bai
ac14e5964d fix: 修复强制启用用户MFA后,个人信息页面设置按钮被禁用的问题 2022-01-20 11:59:56 +08:00
feng626
232c22c8ae fix: 应用改密去掉redis 2022-01-20 11:00:08 +08:00
Jiangjie.Bai
610da9f9b2 Merge pull request #1289 from jumpserver/dev
v2.18.0-rc4
2022-01-19 19:40:47 +08:00
Michael Bai
29631b1eaf fix: 修改IP(Doamin) -> IP(Host)翻译信息 2022-01-19 19:09:13 +08:00
“怀磊”
537887553d fix: 修复资产账号、账号备份、上传ssh密钥组件翻译问题
1、替换了改密计划-资产改密,密码框组件
2022-01-19 14:12:43 +08:00
“怀磊”
c1ddc0f8e0 fix: 修复工单创建应用保存时报错问题 2022-01-19 13:54:48 +08:00
feng626
316b39d15b fix: 修复工单命令复合跳转非当前组织404问题 2022-01-19 11:26:04 +08:00
Jiangjie.Bai
b18b05b8fb Merge pull request #1284 from jumpserver/dev
v2.18.0-rc3
2022-01-18 19:36:45 +08:00
“怀磊”
cd5534c20a feat: 系统用户上传ssh协议i18n翻译 2022-01-18 19:34:00 +08:00
feng626
048fee7ede Merge pull request #1279 from jumpserver/pr@dev@fix_accounts_edit_password_errortip
fix: 修复资产账号修改密码时报错提示重复问题
2022-01-18 19:16:34 +08:00
feng626
083b4bc499 Merge pull request #1282 from jumpserver/pr@dev@translate
fix: 改密翻译修改
2022-01-18 19:15:44 +08:00
怀磊
eb44856807 Merge branch 'dev' into pr@dev@translate 2022-01-18 19:09:39 +08:00
feng626
fff2288069 fix: 改密翻译修改 2022-01-18 19:07:17 +08:00
feng626
d5fc939a40 fix: 改密翻译修改 2022-01-18 19:07:15 +08:00
“怀磊”
6489cbe488 fix:修复应用授权克隆报错问题 2022-01-18 19:03:04 +08:00
“怀磊”
941f1d855e fix: 修复资产账号修改密码时报错提示重复问题 2022-01-18 17:13:14 +08:00
“怀磊”
ff88a0bd42 fix: 修复table搜索框回车搜索时重复搜索问题 2022-01-18 16:01:10 +08:00
Michael Bai
c87412f4c0 fix: 修改审计日志操作日志动作翻译问题 2022-01-18 15:21:11 +08:00
Michael Bai
2da4e4f7a0 fix: 修复应用账号查询问题 2022-01-18 15:03:46 +08:00
Michael Bai
848bdcba36 fix: 修改审计日志中支持i18n的显示字段display 2022-01-18 14:34:26 +08:00
“怀磊”
96206f10a2 perf: 优化table搜索框切换搜索字段后不能回车搜索问题 2022-01-18 14:03:37 +08:00
“怀磊”
a6012eba4a fix: 修复资产授权详情用户组添加会显示更多 2022-01-18 11:21:12 +08:00
Jiangjie.Bai
2570aa63fc Merge pull request #1272 from jumpserver/dev
v2.18.0-rc2
2022-01-17 19:22:44 +08:00
“怀磊”
43797c2f46 fix: 修复工单搜索条件-动作可编辑问题;增加搜索选项关闭动画 2022-01-17 16:31:01 +08:00
feng626
e98e23dad8 perf: 账号备份优化 2022-01-17 15:59:25 +08:00
v-hleihuai
11c845c0fd fix: 修复自定义字段展示,没有label的字段不在列表中展示 2022-01-17 15:49:46 +08:00
feng626
6310fae385 feat: 特权用户添加ssh密钥密码 2022-01-17 15:46:44 +08:00
“怀磊”
c20453a1de feat: 修改工单会话展示字段 2022-01-14 16:57:23 +08:00
Michael Bai
b1733835a4 feat: 修改Copyright信息 2022-01-13 18:56:06 +08:00
ibuler
4e1c921451 perf: 优化 ops 任务名称,支持 i18n 2022-01-13 15:04:34 +08:00
Jiangjie.Bai
0a4238fe93 Merge pull request #1262 from jumpserver/dev
v2.18.0-rc1
2022-01-12 20:35:54 +08:00
“怀磊”
2aad1110d0 feat: 账号备份详情页替换接口 2022-01-12 20:25:56 +08:00
feng626
03031e94c1 feat: 逃生通道 2022-01-12 20:25:56 +08:00
“怀磊”
aa94c1792c feat: 工单列表和详情添加编号字段 2022-01-12 14:34:30 +08:00
“怀磊”
f13bc4fccb fix: 修复上传下载组件展示问题 2022-01-10 17:32:45 +08:00
v-hleihuai
def153cc42 fix: 修改i18n中文国际化 2022-01-10 10:30:07 +08:00
“怀磊”
8add1b7f92 feat: lina 修改时间区间 2022-01-04 15:08:54 +08:00
xinwen
0cafadd230 feat: 资产列表增加 is_active 字段 2021-12-31 17:25:56 +08:00
“怀磊”
61c777532b feat: 工单会话添加状态字段 2021-12-31 17:25:25 +08:00
feng626
e13f2b34ff fix: ticket bug 2021-12-31 16:36:21 +08:00
“怀磊”
fa3daea82d feat: 工单添加会话功能 2021-12-31 16:29:32 +08:00
feng626
16c6f4c77f feat: add passphrase 2021-12-31 14:48:56 +08:00
Michael Bai
31e699bd2d feat: 应用授权增加Action动作控制 2021-12-30 17:24:21 +08:00
“怀磊”
4ecdf1575d fix: 应用管理类型搜索,搜索条件过滤 2021-12-30 10:27:45 +08:00
xinwen
ec00a541f8 feat: 命令记录接口增加 remote_addr 字段 2021-12-28 18:48:09 +08:00
jiangweidong
ef97df09cb feat: 支持 Redis 数据库的纳管 (#1246)
* feat: 支持 Redis 数据库的纳管

* feat: 支持Redis数据库的纳管, 将redis_acl协议合并到redis协议中
2021-12-28 18:16:13 +08:00
Jiangjie.Bai
0b18b57701 Merge pull request #1244 from jumpserver/dev
v2.17.0
2021-12-16 13:45:59 +08:00
“怀磊”
2804a488dc fix: 工单设置默认搜索条件 2021-12-16 13:17:36 +08:00
Jiangjie.Bai
0637fa9e8b Merge pull request #1242 from jumpserver/dev
v2.17.0 rc4
2021-12-15 22:04:42 +08:00
ibuler
66ecf89d35 perf: 优化 saml2 配置 2021-12-15 21:01:01 +08:00
xinwen
f11dc2f7a3 fix: ansible 任务日志读取错误 2021-12-15 18:01:25 +08:00
“怀磊”
e54c9cbd3b fix: 系统用户更新增加判断,如果设置了AD域名不能设置自动推送 2021-12-15 16:36:33 +08:00
“怀磊”
b9cdac0850 fix: 修复系统用户关联节点不显示问题 2021-12-15 16:36:07 +08:00
“怀磊”
33368cb901 perf: 优化搜索条件选项 2021-12-15 16:35:46 +08:00
“怀磊”
44e899e271 fix: 系统用户去掉重复的搜索条件 2021-12-15 16:22:20 +08:00
“怀磊”
f416cfa435 feat: 封装json editor组件 2021-12-15 15:36:53 +08:00
feng626
e2aa932ccb Merge pull request #1234 from jumpserver/pr@dev@translate
perf: 翻译修改
2021-12-15 14:41:02 +08:00
feng626
47e0435ad9 Merge pull request #1236 from jumpserver/pr@dev@ticket_filer_perf
perf: ticket filter perf
2021-12-15 14:40:49 +08:00
feng626
d36802e7bb perf: ticket filter perf 2021-12-15 14:24:08 +08:00
feng626
eda66cab41 perf: 翻译修改 2021-12-14 22:45:13 +08:00
Jiangjie.Bai
3a44b8fea7 Merge pull request #1233 from jumpserver/dev
v2.17.0 rc3
2021-12-14 21:59:16 +08:00
feng626
c461b707c8 fix: 云管特权用户bug 2021-12-14 20:20:25 +08:00
Jiangjie.Bai
01e6367196 Merge pull request #1230 from jumpserver/dev
v2.17.0 rc2
2021-12-13 19:48:49 +08:00
“怀磊”
aa2fe5e87e fix: 修改站内信文案和显示遮挡问题 2021-12-13 19:33:48 +08:00
“怀磊”
31d29e9e6a fex: 修复多个tab页相互切换时搜索条件还会保留问题,
cearchconfig 添加参数getUrlQuery:是否获取url中参数
2021-12-13 19:31:11 +08:00
“怀磊”
cb2ceea132 feat: 资产授权去掉节点的筛选条件 2021-12-13 19:29:00 +08:00
Michael Bai
582b2582bf fix: 查看节点详情不包含节点key信息 2021-12-13 19:28:30 +08:00
Michael Bai
89c6936d56 fix: 修复系统用户详情页面绑定命令过滤器的显示问题 2021-12-13 19:12:08 +08:00
jiangweidong
66ea5ab714 feat: saml2单点登录支持在页面上设置高级配置 2021-12-13 10:55:55 +08:00
Michael Bai
32dc622f1a fix: 修改命令过滤规则列表页字段排序问题 2021-12-13 10:39:18 +08:00
feng626
744acee097 Merge pull request #1223 from jumpserver/pr@dev@ticket_perf
perf: 默认展示当前组织
2021-12-13 10:26:30 +08:00
feng626
c088726412 perf: 默认展示当前组织 2021-12-11 12:53:48 +08:00
ibuler
bef02b3e29 fix: 修复创建 remote app 中类型 label 问题
fix: 修复
2021-12-09 21:03:19 +08:00
Jiangjie.Bai
821ce00f5c Merge pull request #1220 from jumpserver/dev
v2.17.0 rc1
2021-12-09 21:01:00 +08:00
ibuler
6d4d826629 perf: 修改翻译问题
fix: 修改词
2021-12-09 20:46:32 +08:00
Michael Bai
6e3ca56e98 fix: 修复系统用户命令过滤器创建页面 2021-12-09 20:09:23 +08:00
Michael Bai
90adcaf843 feat: 命令过滤器支持多维度绑定 2021-12-09 19:10:30 +08:00
jiangweidong
3eff78817b pr@dev@feat_saml2_auth (#1216)
* feat: 支持saml2协议单点登录认证

* fix: 合并遗漏的翻译文件

* fix: 合并遗漏的翻译文件
2021-12-09 16:01:46 +08:00
feng626
0b71032631 fix: 修复加密文件跳转命题 2021-12-08 17:31:27 +08:00
“怀磊”
ee2c15ccd5 feat: 查询参数保存在url中 2021-12-08 17:23:57 +08:00
halo
669bd50bfa feat: 站内信一键已读已经加载信息 2021-12-08 15:56:22 +08:00
feng626
5eff271cb2 feat: 密码计划邮件提醒 2021-12-07 17:01:00 +08:00
feng626
91162f6013 fix: 工单bug 2021-12-06 19:10:42 +08:00
“怀磊”
022309ef15 feat: 修改LICENSE 2021-12-06 18:03:36 +08:00
feng626
4466d0ddd4 feat: 工单创建资产添加节点 2021-11-30 16:54:19 +08:00
xinwen
04584bbd7b fix: 将应用从某个授权中移除时,会从所有授权中移除 2021-11-29 17:10:55 +08:00
ibuler
5ac8a6bdba feat: 资产显示标签 2021-11-29 14:57:11 +08:00
“怀磊”
6675a01b9d fix: 修复返回时间时区不同的问题 2021-11-29 14:39:52 +08:00
ibuler
84851b89a6 fix: 修复法国用户因为时区时间不同引起的错误 2021-11-25 17:51:23 +08:00
“怀磊”
408590a9e3 fix: 修复终端管理数字显示不正确问题 2021-11-25 14:48:40 +08:00
jiangweidong
09f91941d5 feat: 云管同步支持OpenStack私有云同步 2021-11-24 16:18:04 +08:00
fit2cloud--chenqiao
7132c869f7 feat: 支持数据库sqlserver的托管 (#1194) 2021-11-24 11:23:29 +08:00
Michael Bai
96c10f6980 fix: 修改翻译 2021-11-19 18:48:05 +08:00
feng626
9184026ca0 perf: ip黑白名单 2021-11-19 18:48:05 +08:00
Jiangjie.Bai
8b320d92c1 Merge pull request #1199 from jumpserver/dev
v2.16
2021-11-18 18:52:58 +08:00
“怀磊”
e46c1cfad9 fix: 修复系统设置-飞书认证:启动时按钮状态的显示 2021-11-18 18:50:04 +08:00
Michael Bai
f17df86e98 fix: 修复创建资产成功后提示信息中不包含详情链接 2021-11-18 18:08:19 +08:00
Jiangjie.Bai
fb89f710d7 Merge pull request #1196 from jumpserver/dev
v2.16.0 rc4
2021-11-18 17:00:51 +08:00
feng626
d64aea15c2 fix: 资产创建工单添加校验 2021-11-18 16:26:45 +08:00
“怀磊”
8c106ec718 fix: 替换了密码即将过期时天数的计算方法 2021-11-18 14:22:49 +08:00
Jiangjie.Bai
e5033407f4 Merge pull request #1191 from jumpserver/dev
v2.16.0 rc3
2021-11-18 13:03:22 +08:00
ibuler
7665104347 pref: 修改获取不到语言默认为英文 2021-11-18 12:54:24 +08:00
Jiangjie.Bai
cfb7f2be43 Merge pull request #1189 from jumpserver/dev
v2.16.0 rc2
2021-11-17 19:43:41 +08:00
Michael Bai
6fb9234583 fix: 修复资产列表资产树右击菜单添加/移动资产到节点确认/取消后自动关闭弹窗 2021-11-17 19:35:48 +08:00
Michael Bai
520abd783a fix: 修复更新资产更多信息成功后,点击详情跳转到编辑页面的问题 2021-11-17 19:35:32 +08:00
“怀磊”
133dd02de7 feat: 终端管理数字显示小数保留1位 2021-11-17 19:15:04 +08:00
feng626
c6988578cb perf: help信息迁移到public中 2021-11-17 15:45:29 +08:00
“怀磊”
b1eef7d2f3 perf: 搜索框组件:如果没有搜索选项不能点击下拉菜单 2021-11-17 15:24:03 +08:00
ibuler
526578a520 fix: 修复公告中的重置无反应 2021-11-17 15:22:17 +08:00
“怀磊”
adf5b51a63 fix: 修复应用授权详情,用户组不能删除问题 2021-11-17 15:05:13 +08:00
feng626
d9fab3f258 Merge pull request #1181 from jumpserver/pr@dev@ticket_flow_bug
fix: 修复工单流修改不生效
2021-11-17 11:40:08 +08:00
feng626
7887458239 fix: 修复工单流修改不生效 2021-11-17 11:36:18 +08:00
“怀磊”
4ed40f763c fix: 修复用户登录规则详情更新完之后,点击message跳转详情没有数据问题 2021-11-15 17:14:14 +08:00
ibuler
64b3be5d45 fix: 修复重置mfa的bug 2021-11-15 16:23:41 +08:00
“怀磊”
9a1263f9af fix: 修复select2组件选项过长文字溢出问题 2021-11-15 12:23:10 +08:00
feng626
bdb38362ff fix: 修复登录资产复合路由跳转问题 2021-11-15 11:26:29 +08:00
“怀磊”
cf8b0970e3 fix: 修复工单-登录复核:点击返回路由不能返回列表页问题 2021-11-12 19:06:27 +08:00
“怀磊”
e9bab6a623 fix: 修复创建工单时必填字段校验不生效问题 2021-11-12 19:05:47 +08:00
feng626
df088cc1b6 fix: 修复关闭ssh后 仍然可以修改密钥 2021-11-12 18:00:39 +08:00
“怀磊”
63cde369fa fix: 密码框使用 updatetoken组件 2021-11-12 15:04:03 +08:00
“怀磊”
902364fdc3 fix: 修复命令记录,命令存储tree搜索时刷新问题 2021-11-12 15:02:18 +08:00
feng626
cceca0e1ab feat: 添加全局ip黑名单 2021-11-12 14:58:26 +08:00
Michael Bai
39b84e9a8f fix: 移动【会话设置保留时间】至定期清理设置页面 2021-11-12 14:57:32 +08:00
feng626
1e2b6caf93 fix: 完善工单样式 2021-11-12 14:15:24 +08:00
Jiangjie.Bai
4f7ea2b0ab Merge pull request #1167 from jumpserver/dev
v2.16.0 rc1
2021-11-11 14:03:33 +08:00
ibuler
e0b98ba758 perf: 修改i18n
pref: 修改翻译
2021-11-11 13:01:51 +08:00
ibuler
a7ba36b734 perf: 优化资产更多信息 2021-11-11 13:00:15 +08:00
ibuler
27332dffb8 perf: 修改翻译 2021-11-10 17:11:42 +08:00
jiangweidong
2d174bc46d feat: 支持管理员配置导航栏上帮助中的url 2021-11-10 17:09:28 +08:00
“怀磊”
f000810ccf fix: 优化UpdateToken组件:创建时直接显示输入框和防止浏览器自动填充密码 2021-11-10 17:05:14 +08:00
xinwen
68a08a25dc feat: 异地登录提醒可配置是否启用 2021-11-08 15:25:36 +08:00
Michael Bai
b5a268bf83 fix: 修改切换用户 -> 用户切换 2021-11-05 16:42:11 +08:00
Michael Bai
c446d1dcf6 feat: 添加Su用户列表 2021-11-05 16:04:07 +08:00
Michael Bai
92620510da feat: 添加切换至用户列表 2021-11-05 16:04:07 +08:00
Michael Bai
d62a4ca36e feat: 添加系统用户su_enabled 2021-11-05 16:04:07 +08:00
Michael Bai
d2cd0a2242 feat: 添加OBS存储 2021-11-05 13:38:25 +08:00
“怀磊”
a39f2294bc fix: 修复创建工单,应用类型下拉选择联动清空 2021-11-04 18:13:00 +08:00
halo
4a8f147178 fix: 修复用户应用授权规则更新和删除操作报错 2021-11-04 12:39:26 +08:00
“怀磊”
69b378c2a7 feat: rdp 系统用户还原自动生成密码 2021-11-04 11:43:57 +08:00
“怀磊”
55743eb2c8 feat: 修改系统用户查看ssh密钥的input框展示样式 2021-11-03 17:37:11 +08:00
“怀磊”
9ba5214937 perf: 系统用户相关表单使用UpdateToken组件 2021-11-03 17:01:24 +08:00
fit2bot
e1c6d0a686 feat: 封装密码输入框组件 (#1149)
* feat: 封装密码输入框组件

* feat: 批量替换密码输入框组件

* perf: 修改样式

* feat: 批量替换密码输入框组件

Co-authored-by: “怀磊” <2280131253@qq.com>
Co-authored-by: ibuler <ibuler@qq.com>
2021-11-02 18:51:58 +08:00
Michael Bai
b68616501c fix: 修复UploadKey失败问题 2021-11-01 14:58:20 +08:00
Michael Bai
3355036f49 fix: 修改基本设置项
fix: 修改基本设置项
2021-10-29 19:24:57 +08:00
xinwen
7ee3d307df fix: 非本地用户不能绑定三方认证 2021-10-29 13:20:17 +08:00
Michael Bai
803090dff9 fix: 修改基本设置工单启用控制 2021-10-29 13:19:35 +08:00
Jiangjie.Bai
886d34211c Merge pull request #1138 from jumpserver/dev
v2.15.0
2021-10-28 18:13:43 +08:00
fit2bot
22d8cb7e44 fix: 创建工单-应用类型,去掉默认值 (#1137)
* fix: 修复创建应用授权工单报错问题

* fix: 创建工单-应用类型,去掉默认值

Co-authored-by: “怀磊” <2280131253@qq.com>
2021-10-28 18:12:31 +08:00
Jiangjie.Bai
1a1c50086f Merge pull request #1136 from jumpserver/dev
v2.15.0
2021-10-28 17:50:12 +08:00
feng626
87c8d11bf4 fix: acl migrate 2021-10-28 17:38:30 +08:00
“怀磊”
dcbb73e59d fix: 修复创建应用授权工单报错问题 2021-10-28 17:25:00 +08:00
“怀磊”
79068f44bf fix: crontab组件增加清除功能 2021-10-28 16:59:15 +08:00
Jiangjie.Bai
0575ff606c Merge pull request #1132 from jumpserver/dev
v2.15.0
2021-10-28 15:32:37 +08:00
ibuler
68411de25b perf: 修复组织table
perf: 修改翻译
2021-10-28 15:21:37 +08:00
“怀磊”
d174fdae6f fix: 修复table组件的tooltip提示的最大宽度 2021-10-28 14:34:14 +08:00
ibuler
fa1dad3731 perf: 修改requied提示 2021-10-28 14:19:07 +08:00
Michael Bai
44edc1e712 fix: 修复创建云服务账号json格式文件判断 2021-10-28 13:36:22 +08:00
feng626
1cd8de8cbc fix: 登陆复合信息显示不全 2021-10-28 13:25:10 +08:00
Jiangjie.Bai
040cb0aa5a Merge pull request #1124 from jumpserver/dev
v2.15.0-rc3
2021-10-27 19:34:31 +08:00
“怀磊”
ffe152809d feat: 系统设置邮件服务器设置设置传参 2021-10-27 19:34:12 +08:00
“怀磊”
dc0bb5d557 fix: 定时执行控制定期执行显示隐藏 2021-10-27 19:07:08 +08:00
“怀磊”
233aaaa82b feat: 分时段登录组件增加全选功能 2021-10-27 14:46:41 +08:00
ibuler
b13e5995c9 perf: 修改label 2021-10-27 14:30:36 +08:00
ibuler
5f8e2e4f75 perf: 修改ticket组件名称,太长了 2021-10-27 14:30:36 +08:00
Michael Bai
b9baf360c0 fix: 修改工单列表action->state 2021-10-27 11:16:27 +08:00
“怀磊”
5e40da0037 feat: 调整远程应用创建是类型展示风格 2021-10-27 10:31:26 +08:00
Michael Bai
a948105ebd fix: 普通系统用户列表搜索项排除: type 字段 2021-10-26 18:10:17 +08:00
“怀磊”
46c9598788 feat: 用户登录规则详情:修改时段展示、增加右侧快速更新板块 2021-10-26 15:18:30 +08:00
ibuler
8f35d4edc0 fix: 修复启用公告后,不变绿的问题 2021-10-26 15:12:48 +08:00
ibuler
2e70c3fa4c perf: 去掉debug 2021-10-26 15:12:19 +08:00
ibuler
5e377c2572 perf: 修改工单 2021-10-26 15:12:19 +08:00
Michael Bai
d50b1201e7 fix: 修复用户详情页面最后登录日期显示1970的问题 2021-10-26 13:47:16 +08:00
“怀磊”
fc72fe9ff2 fix: 修改日志审批-批量命令,主机弹窗展示字段和遮罩层问题 2021-10-26 13:07:04 +08:00
ibuler
23a7d9dfbe perf: 统一dashboard页面,去掉email签名设置 2021-10-26 11:12:36 +08:00
Jiangjie.Bai
08452d1e00 Merge pull request #1112 from jumpserver/dev
v2.15.0-rc2
2021-10-25 15:08:35 +08:00
Michael Bai
45f29e3e6d fix: 系统用户列表添加 应用数量 字段 2021-10-25 15:06:45 +08:00
feng626
3f03f0f18c Merge pull request #1109 from jumpserver/pr@dev@ticket_bug
fix: 工单资产信息不显示
2021-10-25 11:32:28 +08:00
feng626
2d3387b739 fix: 工单资产信息不显示 2021-10-25 11:25:24 +08:00
“怀磊”
6d50c6df35 fix: 修复公告组件数字不换行问题 2021-10-21 18:11:16 +08:00
ibuler
0a3f7f6616 fix: 修复 select2 error bug 2021-10-21 17:34:32 +08:00
feng626
4c74e75673 Merge pull request #1104 from jumpserver/pr@dev@ticket_bug
fix: 工单详情资产信息未显示
2021-10-21 15:11:11 +08:00
feng626
98c44a51e7 Merge pull request #1106 from jumpserver/pr@dev@acl_bug
perf: acl 列表界面添加字段
2021-10-21 15:10:55 +08:00
feng626
6cb7e47747 perf: acl 列表界面添加字段 2021-10-21 14:57:53 +08:00
feng626
5b96475610 fix: 工单详情资产信息未显示 2021-10-21 14:37:30 +08:00
Jiangjie.Bai
c0a412a12d Merge pull request #1102 from jumpserver/dev
v2.15.0 rc1
2021-10-20 20:25:15 +08:00
“怀磊”
4b75d90090 fix: 修复crontab月组件名称错误问题 2021-10-20 19:53:10 +08:00
“怀磊”
7dd11f1259 fix: 修复crontab选择月 日的时间重置问题 2021-10-20 19:53:10 +08:00
ibuler
761eb0c3b1 perf: 修改ldap密码不是必填 2021-10-20 19:16:15 +08:00
“怀磊”
f7fb35e625 fix: 修复资产授权列表-来自工单,否显示空 2021-10-20 19:14:27 +08:00
fit2bot
224b13b4e7 perf: 整理 acl 位置 (#734)
* stash

* s

* 界面调整

* feat: 添加分时段选择组件

* feat: 添加分时段选择组件

* feat: 分时段登录组件创建时传参

* 分时登陆

* feat: 分时段组件展示默认数据

* feat: 分时段选中时间在详情里展示

* alc 部分优化

* fix: 修复用户规则登录error报错

* feat: 调整规则详情-时段展示

Co-authored-by: ibuler <ibuler@qq.com>
Co-authored-by: feng626 <1304903146@qq.com>
Co-authored-by: “怀磊” <2280131253@qq.com>
2021-10-20 18:56:59 +08:00
“怀磊”
ae9b3f2707 style: 修复跳转链接文本溢出长度问题 2021-10-20 14:47:12 +08:00
Michael Bai
0675f22181 fix: 用户登录日志添加reason_display字段 2021-10-19 15:29:39 +08:00
fit2bot
92dd661a3b 登录验证可配置 (#1092)
* 登录验证可配置

* perf: 修改安全内容设置

* perf: 还原yarn

Co-authored-by: feng626 <1304903146@qq.com>
Co-authored-by: ibuler <ibuler@qq.com>
2021-10-18 14:50:57 +08:00
“怀磊”
1926cdde15 style: table跳转链接文本溢出显示省略号随页面宽度变化 2021-10-15 15:28:00 +08:00
fit2bot
3e60c9501e feat: 资产详情添加授权用户列表页 (#1093)
* feat: 资产详情添加授权用户列表页

* feat: 取消console log

* perf: 优化一下前端

* feat: 修改授权用户组分隔符

Co-authored-by: Michael Bai <baijiangjie@gmail.com>
Co-authored-by: ibuler <ibuler@qq.com>
2021-10-15 15:02:31 +08:00
“怀磊”
c86fb5cfde fix: 全局导出公告组件 2021-10-12 16:11:20 +08:00
“怀磊”
d8e1e14bd6 feat: crontab 组件封装 2021-10-12 11:13:30 +08:00
“怀磊”
bb9e9a87d0 feat: 列表增加定时执行字段展示 2021-10-12 10:52:18 +08:00
“怀磊”
96506acc9b feat: 授权列表来自工单,是显示对勾 2021-10-12 10:29:01 +08:00
ibuler
9a5171a1bf perf: 优化公告 2021-10-12 10:27:12 +08:00
Jiangjie.Bai
d1f61797a5 Merge pull request #1085 from jumpserver/pr@dev@feat_annoucement
perf: 完成公告功能
2021-09-29 14:59:42 +08:00
ibuler
30b936330c perf: 优化翻译 2021-09-28 18:59:34 +08:00
ibuler
6f5db82ce3 perf: 优化公告 2021-09-28 18:09:34 +08:00
ibuler
9fcc9bc9da perf: 完成公告功能 2021-09-28 17:02:27 +08:00
ibuler
972b7276cf feat: 添加公告功能 2021-09-28 10:20:39 +08:00
ibuler
8db10e806a Merge branch 'dev' of github.com:jumpserver/lina into dev 2021-09-27 15:40:02 +08:00
fit2bot
1cb6e49785 perf: 优化站内信 (#1082)
* perf: 修改不再存储 .env.devlopement

* perf: 优化站内信

Co-authored-by: ibuler <ibuler@qq.com>
2021-09-27 15:40:00 +08:00
ibuler
8950fadfa1 Merge branch 'dev' of github.com:jumpserver/lina into dev 2021-09-27 14:54:22 +08:00
fit2bot
e32d4e7ee0 perf: 优化弹窗 (#1081)
* perf: 修改不再存储 .env.devlopement

* perf: 优化弹窗

Co-authored-by: ibuler <ibuler@qq.com>
2021-09-27 14:54:14 +08:00
fit2bot
a382c82732 perf: 优化代码,搜索 (#1080)
* perf: 修改不再存储 .env.devlopement

* perf: 优化代码,搜索

Co-authored-by: ibuler <ibuler@qq.com>
2021-09-27 14:29:37 +08:00
ibuler
fa458cd456 Merge branch 'dev' of github.com:jumpserver/lina into dev 2021-09-27 14:23:10 +08:00
fit2bot
731d01450f fix: 修复setting中forget url 多处显示的问题 (#1079)
* perf: 修改不再存储 .env.devlopement

* fix: 修复setting中forget url 多处显示的问题

Co-authored-by: ibuler <ibuler@qq.com>
2021-09-27 14:22:51 +08:00
ibuler
bf97d82626 Merge branch 'dev' of github.com:jumpserver/lina into dev 2021-09-24 15:11:04 +08:00
Michael Bai
49b8e0b33a fix: 修复邮件测试参数传递 2021-09-24 14:15:09 +08:00
ibuler
5a913e4d3a branch -D pr@dev@perf_env_file
Merge branch 'dev' of github.com:jumpserver/lina into dev
2021-09-24 13:29:22 +08:00
ibuler
2983f89f54 perf: 修改不再存储 .env.devlopement 2021-09-24 13:29:00 +08:00
ibuler
87a0384949 perf: 修改不再存储 .env.devlopement 2021-09-24 13:20:39 +08:00
ibuler
d36fe8aa94 perf: 修复 asset select 2021-09-24 13:14:04 +08:00
“怀磊”
5764ddc271 fix: 修复webpack配置报错 2021-09-23 13:56:01 +08:00
“怀磊”
edbdef3f58 perf: 增加webpack别名配置 2021-09-22 18:18:52 +08:00
feng626
5d308ac546 perf: 工单优化 2021-09-22 17:20:18 +08:00
ibuler
986cf6b4f7 perf: 修复dialog 不能滚动问题 2021-09-22 17:02:17 +08:00
ibuler
6cbac3c875 fix: 修复select2初始可能报错的bug
perf: 去掉debug
2021-09-18 15:05:44 +08:00
feng626
09a04efe1a Merge pull request #1062 from jumpserver/pr@dev@ticket_perf
perf: 工单 优化
2021-09-17 15:50:53 +08:00
feng626
d5b631c012 perf: 工单 优化 2021-09-17 15:40:02 +08:00
Jiangjie.Bai
7e8de4c73b Merge pull request #1061 from jumpserver/dev
merge: dev to master
2021-09-16 20:16:02 +08:00
老广
47a0641fed Merge pull request #1060 from jumpserver/pr@dev@perF_setting
perf: 修改setting
2021-09-16 20:02:35 +08:00
ibuler
ad118c5eda perf: 修改setting 2021-09-16 20:01:38 +08:00
老广
9bd3b37371 Merge pull request #1059 from jumpserver/dev
Merge dev to master
2021-09-16 19:33:01 +08:00
ibuler
274f50da95 fix: 修改select2 2021-09-16 19:09:55 +08:00
xinwen
8f87c42c8c fix: Otp 绑定问题 2021-09-16 19:09:34 +08:00
ibuler
35c793785c perf: 优化 detail formatter 2021-09-16 16:54:01 +08:00
feng626
abe176831b fix: 修复数据库改密bug 2021-09-16 16:53:41 +08:00
xinwen
c97512c99b fix: 重置用户密码提示消息 2021-09-16 16:46:43 +08:00
Jiangjie.Bai
6a8553ddfd Merge pull request #1053 from jumpserver/dev
v2.14.0 rc3
2021-09-15 21:06:24 +08:00
feng626
23f1f371e6 Merge pull request #1052 from jumpserver/pr@dev@mail_setting_bug
fix: 去掉站内信
2021-09-15 20:45:11 +08:00
feng626
0878e93f24 fix: 去掉站内信 2021-09-15 20:36:15 +08:00
fit2bot
cc76a66a34 perf: 优化用户资产页面宽度 (#1049)
Co-authored-by: ibuler <ibuler@qq.com>
2021-09-15 20:32:39 +08:00
fit2bot
d17556cdc7 perf: 优化认证中的url检查 (#1050)
* perf: 优化认证中的url检查

* perf: 优化配置

Co-authored-by: ibuler <ibuler@qq.com>
2021-09-15 20:32:17 +08:00
Michael Bai
f5f4edaf63 fix: 修复vmware账号密码必填标志显示问题 2021-09-15 20:21:53 +08:00
Michael Bai
62329d57a4 fix: 修复系统用户页面资产页中没有显示已关联节点的问题 2021-09-15 19:40:13 +08:00
ibuler
bc90d1e9c6 perf: 优化安全设置,保存后刷新页面 2021-09-15 19:39:35 +08:00
feng626
60d4da29cb Merge pull request #1047 from jumpserver/pr@dev@ticket_perf
perf: 工单流详情优化
2021-09-15 19:34:52 +08:00
feng626
b9bdf35bb9 perf: 工单流详情优化 2021-09-15 19:32:28 +08:00
fit2bot
b9b6bccb7f perf: 优化路由 (#1045)
* perf: 优化路由

* perf: 优化提示

* oerf: ...

Co-authored-by: ibuler <ibuler@qq.com>
2021-09-15 18:56:09 +08:00
xinwen
f2bbe4841a feat: 用户详情页面显示 手机号,钉钉,企业微信,飞书 2021-09-15 18:26:18 +08:00
Michael Bai
d920eeda7a fix: 修改创建/更新系统用户标题文案 2021-09-15 18:05:04 +08:00
ibuler
7361acae6a perf: 优化弹窗显示 2021-09-15 18:04:39 +08:00
xinwen
a56799ca22 fix: 用户不能重置自己的 mfa 2021-09-15 17:28:53 +08:00
Michael Bai
88ddd86154 fix: 修改录像水印 2021-09-15 17:28:07 +08:00
feng626
d9532d5a93 Merge pull request #1040 from jumpserver/pr@dev@ticket_perf
perf: 工单详情样式优化
2021-09-15 14:07:18 +08:00
feng626
02b9e83e3d perf: 工单详情样式优化 2021-09-15 14:03:35 +08:00
feng626
a29afbbeea Merge pull request #1039 from jumpserver/pr@dev@ticket_bug
perf: 工单优化
2021-09-15 11:19:02 +08:00
feng626
0f4f4a2ca7 perf: 工单优化 2021-09-15 11:18:26 +08:00
feng626
a23cd151ae Merge pull request #1037 from jumpserver/pr@dev@ticket_flow_perm
fix: 工单流程权限
2021-09-14 22:26:23 +08:00
feng626
5f3855d8c1 fix: 工单流程权限 2021-09-14 22:12:30 +08:00
ibuler
6ad44e2830 perf: 修复路由问题 2021-09-14 18:54:32 +08:00
ibuler
51446c0c9a perf: 添加会话翻译 2021-09-14 17:43:34 +08:00
feng626
e3a493a6c5 fix: 不同组织资产可读 2021-09-14 17:42:06 +08:00
Michael Bai
9dfca98828 fix: 删除 PERIOD_TASK_ENABLED 配置 2021-09-14 17:41:34 +08:00
Michael Bai
599a1bb705 fix: 修复CAS配置RENAME_ATTR未加载的问题 2021-09-14 16:42:59 +08:00
ibuler
52e4a6d6ed perf: remove debug 2021-09-14 16:41:57 +08:00
ibuler
4b5ac9aaa9 perf: 优化资产列表,拆分大组件 2021-09-14 16:41:57 +08:00
feng626
3b2c4975b6 Merge pull request #1030 from jumpserver/pr@dev@ticket_perf
perf: 工单详情优化
2021-09-14 14:09:55 +08:00
feng626
c3cbafce6d perf: 工单详情优化 2021-09-14 14:00:53 +08:00
ibuler
b75f0be9e5 fix: 修复资产页面table不能拖拽 2021-09-14 11:02:09 +08:00
Jiangjie.Bai
8df0f05ee5 Merge pull request #1028 from jumpserver/dev
v2.14.0 rc2
2021-09-13 21:28:12 +08:00
Michael Bai
fa7a78523f fix: i18n 2021-09-13 20:44:30 +08:00
ibuler
11e803be19 perf: 优化短信通用 2021-09-13 20:40:18 +08:00
Michael Bai
060781443f fix: 授权规则支持通过 from_ticket 工单过滤 2021-09-13 20:25:11 +08:00
fit2bot
555c8fd2d6 perf: 优化短信设置 (#1024)
* perf: 优化短信设置

* perf: 优化分宜

Co-authored-by: ibuler <ibuler@qq.com>
2021-09-13 19:44:14 +08:00
feng626
2c84e4ffa6 fix: 修复工单bug 2021-09-13 14:18:58 +08:00
Michael Bai
16dafaaf42 perf: 取消API Token的配置 2021-09-13 14:03:16 +08:00
xinwen
819438a2e8 fix: 用户消息订阅暂不支持短信 2021-09-13 13:25:20 +08:00
fit2bot
61e8467849 perf: 优化更新auth (#1018)
* perf: 优化更新auth

* perf: 优化提交

Co-authored-by: ibuler <ibuler@qq.com>
2021-09-10 16:46:51 +08:00
feng626
491f3d3dde feat: 添加登陆复合 2021-09-10 16:23:02 +08:00
ibuler
4588965a8d perf: 优化站内信点击的问题 2021-09-10 13:59:19 +08:00
feng626
48d07b4d6d perf: 工单流优化 2021-09-10 13:51:44 +08:00
feng626
45c74ba470 perf: sms样式修改 2021-09-10 13:51:08 +08:00
feng626
2e2c8fe086 feat: 短信迁移 2021-09-10 13:51:08 +08:00
Michael Bai
459843669b perf: 修改授权规则Actions上传下载复制粘贴选择时,连接不可取消 2021-09-10 11:28:36 +08:00
fit2bot
f839e1fc0d perf: 去掉debug (#1013)
* perf: 去掉debug

* perf: 修改 debug

* perf: 修改msg

Co-authored-by: ibuler <ibuler@qq.com>
2021-09-10 10:21:03 +08:00
Jiangjie.Bai
399b381aa9 Merge pull request #1014 from jumpserver/dev
v2.14.0 rc1
2021-09-09 21:19:35 +08:00
Eric_Lee
7670c277aa Merge pull request #1012 from jumpserver/revert-1004-dependabot/npm_and_yarn/axios-0.21.2
Revert "chore(deps): bump axios from 0.21.1 to 0.21.2"
2021-09-09 21:03:52 +08:00
老广
cbc78de7c4 Revert "chore(deps): bump axios from 0.21.1 to 0.21.2"
This reverts commit e8f013a5be.
2021-09-09 21:02:36 +08:00
ibuler
e64cd82dba perf: 修改setting 2021-09-09 20:45:21 +08:00
ibuler
f154a252d3 perf: 修改配置 2021-09-09 20:01:06 +08:00
Michael Bai
984483c470 perf: 用户个人信息页面添加开启消息接受方式 2021-09-09 19:46:31 +08:00
dependabot[bot]
e8f013a5be chore(deps): bump axios from 0.21.1 to 0.21.2
Bumps [axios](https://github.com/axios/axios) from 0.21.1 to 0.21.2.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.21.1...v0.21.2)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-09 19:41:02 +08:00
ibuler
e1850d758f perf: 提供xrdp开启禁用 2021-09-09 19:39:28 +08:00
feng626
60e5c994f4 feat: 短信服务配置 2021-09-09 18:53:32 +08:00
xinwen
1adf138175 fix: 用户个人页面,修改个人部分信息使用 patch 2021-09-09 16:16:05 +08:00
fit2bot
4e5ed82ec7 perf: 优化导入导出顺序 (#999)
Co-authored-by: ibuler <ibuler@qq.com>
Co-authored-by: Jiangjie.Bai <32935519+BaiJiangJie@users.noreply.github.com>
2021-09-09 16:15:21 +08:00
fit2cloud-jiangweidong
52e2d58567 feat: 改密计划支持数据库改密 (#991)
* feat: 改密计划支持数据库改密

* perf: 修改应用账号

* merge: dev

* perf: 暂存修改数据库

* fix: bug

* fix: bug

* perf: 优化系统用户详情,增加应用列表

* perf: 修改clone

* fix: 修复更新系统用户bug

Co-authored-by: ibuler <ibuler@qq.com>
Co-authored-by: feng626 <1304903146@qq.com>
2021-09-09 16:04:40 +08:00
fit2bot
411fca98b0 feat: 页面配置serializer版 (#1000)
* feat: 页面配置serializer版

* perf: 优化配置

* perf: 优化匹配值

* perf: 优化设置

* perf: 优化配置

* perf: 修改翻译

* perf: 修改secure

Co-authored-by: feng626 <1304903146@qq.com>
Co-authored-by: ibuler <ibuler@qq.com>
2021-09-09 14:03:47 +08:00
Bai
e0c3243986 feat: 云管中心添加GCP 2021-09-07 18:26:48 +08:00
Jiangjie.Bai
e4240d7a8f feat: 会话详情添加活动页面 (#1003)
* fix: 添加配置 SECURITY_SESSION_SHARE

* fix: 添加会话活动页面

* fix: 添加会话活动页面

* fix: 添加会话活动页面

* fix: 添加会话活动页面
2021-09-07 18:16:38 +08:00
feng626
db4b09603b perf: disabled 2021-09-06 18:16:51 +08:00
Eric
a88499d10c fix: 修复普通用户页面 动作 问题 2021-08-27 15:17:31 +08:00
feng626
0b2cfb88a2 Merge pull request #993 from jumpserver/pr@dev@ticket_flow_bug
perf: 优化
2021-08-27 10:14:17 +08:00
feng626
13443a7137 perf: 优化 2021-08-26 18:31:52 +08:00
fit2bot
5aa3226132 feat: 审批模版管理 (#964)
Co-authored-by: feng626 <1304903146@qq.com>
Co-authored-by: Jiangjie.Bai <32935519+BaiJiangJie@users.noreply.github.com>
2021-08-25 19:01:45 +08:00
fit2bot
ea9316f0a0 feat: 工单管理 (#963)
* feat: 工单多级审批

* fix: action bug

Co-authored-by: feng626 <1304903146@qq.com>
2021-08-25 19:00:21 +08:00
ibuler
d05d3f3fa3 perf: 优化创建简单 2021-08-20 14:22:09 +08:00
Bai
5da000c8a1 fix: 修复AssetSelect弹窗的protocols显示 2021-08-20 14:14:36 +08:00
Jiangjie.Bai
f85d3567a7 Merge pull request #986 from jumpserver/dev
v2.13.0
2021-08-19 18:53:13 +08:00
ibuler
78174b23fd fix: 修复app详情更新按钮 2021-08-19 16:05:10 +08:00
xinwen
07151b2bfe fix: 命令记录默认倒序 2021-08-19 15:47:28 +08:00
ibuler
1cc395c22d perf: 修复 url 2021-08-19 15:36:00 +08:00
ibuler
a18507f9c6 perf: 修复命令导出问题
perf: 优化
2021-08-19 15:00:59 +08:00
ibuler
790e2315e2 perf: 修复app 授权详情中更新 2021-08-19 12:00:03 +08:00
Jiangjie.Bai
4f2f4a7a9d Merge pull request #978 from jumpserver/dev
v2.13.0 rc4
2021-08-18 19:46:06 +08:00
Bai
32817390c2 fix: 修复同步任务创建时协议字段为空的错误提示 2021-08-18 19:33:16 +08:00
Bai
8af7c46f02 feat: 系统设置添加水印开启选项 2021-08-18 19:15:55 +08:00
ibuler
ed4162cbd5 perf: 优化select2初始值
perf: 优化select2

perf: 修改初始值
2021-08-18 15:16:42 +08:00
Eric
973b1fbae2 fix: 修复消息接受人用户搜索问题 2021-08-18 11:50:28 +08:00
ibuler
8906fa3292 fix: 修复资产树点击的bug 2021-08-18 11:13:16 +08:00
Bai
5c94c1c870 fix: 修复管理员更新用户登录规则没有权限的问题 2021-08-18 10:32:13 +08:00
Jiangjie.Bai
16757b7df0 Merge pull request #972 from jumpserver/dev
v2.13.0 rc3
2021-08-17 20:34:39 +08:00
Bai
679103db03 fix: 更新用户,密码规则根据当前用户的原角色(非当前表单角色)进行处理 2021-08-17 20:29:12 +08:00
ibuler
a7aa763e37 fix: 修复导入时页码跳动问题 2021-08-17 20:28:21 +08:00
ibuler
f30ba0a98d perf: 修改应用权限创建的bug
perf: 修改列表

fix: 去掉get url
2021-08-17 14:00:46 +08:00
ibuler
c426841a7c perf: 优化应用授权 2021-08-17 14:00:46 +08:00
老广
288bfe4727 Merge pull request #967 from jumpserver/pr@dev@fix_ldap_setting
fix(settings): 修复ldap settings的bug
2021-08-16 15:09:48 +08:00
ibuler
c4c39188aa fix(settings): 修复ldap settings的bug 2021-08-16 15:07:07 +08:00
老广
52d8bfeac3 Merge pull request #966 from jumpserver/dev
v2.13.0-rc1
2021-08-16 11:24:36 +08:00
ibuler
20c201f351 fix(applications): 修复更新数据库页面不对的问题 2021-08-16 11:01:25 +08:00
老广
94b5aa700d Merge pull request #962 from jumpserver/dev
v2.13.0 rc1
2021-08-13 11:05:47 +08:00
fit2bot
e030fc313e feat: 添加飞书 (#958)
* feat: 添加飞书

* s

* 翻译

* 翻译

Co-authored-by: xinwen <coderWen@126.com>
2021-08-13 11:03:53 +08:00
Jiangjie.Bai
917fa0ea44 Merge pull request #961 from jumpserver/dev
v2.13.0 rc1
2021-08-12 19:51:30 +08:00
Bai
68df311a9c feat: 云管中心同步任务添加 unix_admin_user 和 windows_admin_user 2021-08-11 14:43:25 +08:00
Bai
e819e4aaff feat: 添加Monitor组件 celery和core 2021-08-10 10:17:21 +08:00
feng626
364b6b0bcf perf: 改密计划前端优化 2021-08-06 17:25:11 +08:00
feng626
a0534e0c2e feat: xpack 批量修改密钥 2021-08-03 15:47:29 +08:00
ibuler
0152ad269b perf: 修改import 2021-07-30 19:28:19 +08:00
ibuler
b651f82eb6 perf: 优化树 2021-07-30 17:30:22 +08:00
ibuler
0e665912ff perf: 优化应用授权列表 2021-07-30 17:30:22 +08:00
fit2bot
8929957fd9 perf: 管理员密码长度 (#946)
* feat: 支持配置系统管理员强制MFA和独立密码长度限制

* feat: 支持配置系统管理员强制MFA和独立密码长度限制

* feat: 支持配置系统管理员强制MFA和独立密码长度限制

* feat: 支持配置系统管理员强制MFA和独立密码长度限制

* fix: 修改管理员最小密码长度变量名称

* fix: 修改管理员最小密码长度变量名称

* perf: 基本完成更改

Co-authored-by: fit2cloud-jiangweidong <weidong.jiang@fit2cloud.com>
Co-authored-by: ibuler <ibuler@qq.com>
2021-07-30 15:33:49 +08:00
Bai
959bb56a3e fix: 修复数据库应用更新页面异常问题 2021-07-29 14:57:48 +08:00
fit2bot
cb5fe0f2a0 perf: 使用 mini 接口 (#945)
* perf: 使用 mini 接口

* perf: 资产列表默认展示平台和协议

* perf: 添加排序

Co-authored-by: 吴小白 <296015668@qq.com>
2021-07-29 14:57:20 +08:00
吴小白
05c06e4fc2 feat: 资产授权添加批量删除 2021-07-29 11:33:04 +08:00
ibuler
d3ae9e3f0f perf: 账号列表去掉克隆 2021-07-28 18:20:42 +08:00
fit2bot
1af14a5743 perf: 修改系统用户展现 (#940)
* perf: 优化系统用户select显示

* perf: 修改系统用户展现

Co-authored-by: ibuler <ibuler@qq.com>
2021-07-28 15:18:29 +08:00
feng626
7c0621b357 feat: 应用管理添加批量删除 2021-07-27 16:18:32 +08:00
feng626
4d4085798d fix: 去除前端规则判断 自定义承接后端required 2021-07-27 15:52:34 +08:00
Jiangjie.Bai
0da0c2af4f Merge pull request #931 from jumpserver/pr@dev@perf_account_list
perf: 优化账号列表
2021-07-27 15:52:06 +08:00
ibuler
ba78bdeed7 perf: 还原收集用户 2021-07-27 14:37:00 +08:00
ibuler
0f76f6ad96 perf: 基本完成应用正好改造 2021-07-27 14:18:37 +08:00
Bai
2a14b0cfcd feat: 改密计划执行列表添加trigger字段和搜索项 2021-07-27 10:45:55 +08:00
Jiangjie.Bai
8537a7b6e4 Merge pull request #935 from jumpserver/pr@dev@fix_generic_route_userloginacl
fix: 修改通用创建更新成功后的Route; 优化用户ACL创建ip_group错误时的信息显示
2021-07-26 17:45:25 +08:00
Bai
bf74adc037 fix: 修改通用创建更新成功后的Route; 优化用户ACL创建ip_group错误时的信息显示 2021-07-26 17:20:36 +08:00
Bai
f7d75ca92c fix: 修改通用创建更新成功后的Route; 优化用户ACL创建ip_group错误时的信息显示 2021-07-26 17:11:43 +08:00
fit2bot
0d3029e6b1 perf: 优化表单 (#933)
* perf: 优化表单

* fix: 修复国际化

* fix: 去掉排序

* perf: 系统平台排序

* fix: 修复错误

* fix: 去掉多余的逗号

Co-authored-by: 吴小白 <296015668@qq.com>
2021-07-26 17:09:28 +08:00
feng626
7fda66cda4 工单处理人显示 与右侧一致 2021-07-26 17:04:13 +08:00
ibuler
de4af07858 perf: 修改 icon 2021-07-26 11:09:06 +08:00
Bai
6bab31d74c fix: 修改账号列表更新表单错误提示 2021-07-23 19:02:52 +08:00
ibuler
1c6da15301 perf: 优化账号列表 2021-07-22 18:56:04 +08:00
dependabot[bot]
cbd18814f6 chore(deps): bump ws from 5.2.2 to 5.2.3 (#838)
* chore: 更新Submodule指向

* fix: 修复Build失败的问题

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

* chore(deps): bump ws from 5.2.2 to 5.2.3

Bumps [ws](https://github.com/websockets/ws) from 5.2.2 to 5.2.3.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/5.2.2...5.2.3)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

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: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-22 14:15:37 +08:00
ibuler
3be8794a58 perf: 优化记录当前组织和角色 2021-07-22 14:08:00 +08:00
ibuler
2183cf9bb0 perf: 修复微信钉钉测试两次报错 2021-07-22 14:06:49 +08:00
ibuler
dfd710daf7 perf: 优化打开task页面 2021-07-22 14:02:26 +08:00
ibuler
e38817b24a fix(settings): 修复配置消息订阅时,用户为当前组织的问题 2021-07-21 19:11:51 +08:00
fit2bot
34b18d5220 云管中心同步任务支持设置同步IP网段和协议组 (#925)
* 云管中心同步任务支持设置同步IP网段和协议组

* fix: 修改重复定义的getMethod()和getUrl()等方法

* fix: 修改重复定义的getMethod()和getUrl()等方法2

Co-authored-by: Bai <bugatti_it@163.com>
2021-07-21 19:06:14 +08:00
ibuler
d07b311b76 perf: 去掉首页无意义的标签显示 2021-07-21 10:24:21 +08:00
ibuler
0e67594ba9 perf: 新页面创建资产,创建成功重定向到详情页 2021-07-20 19:33:38 +08:00
wojiushixiaobai
5f3b307785 perf: 优化构建速度 2021-07-20 19:31:18 +08:00
ibuler
96ee47b4ac perf: 优化工单详情 2021-07-20 19:30:34 +08:00
ibuler
574ec53d23 fix(assets): 修复创建网关没有密码的问题 2021-07-20 19:29:52 +08:00
Bai
1720c183ad feat: 资产详情页面添加关联系统用户列表 2021-07-20 17:01:13 +08:00
Jiangjie.Bai
9bbd2ac293 Merge pull request #916 from jumpserver/dev
v2.12.0 rc5
2021-07-15 19:19:49 +08:00
Bai
fc7bb98fbb fix: 修改翻译 2021-07-15 19:18:18 +08:00
Jiangjie.Bai
32d37a4860 Merge pull request #914 from jumpserver/dev
v2.12.0 rc5
2021-07-15 18:24:21 +08:00
xinwen
699b12178a fix: 组织管理页面 管理用户改成特权用户 2021-07-15 18:15:01 +08:00
Jiangjie.Bai
fb87ebd0e7 Merge pull request #912 from jumpserver/dev
v2.12.0 rc5
2021-07-15 17:05:11 +08:00
fit2bot
b8ba53cf5e perf: 添加 系统用户 到 账号 (#911)
Co-authored-by: ibuler <ibuler@qq.com>
2021-07-15 10:30:22 +08:00
Jiangjie.Bai
c3f27dd0a8 Merge pull request #910 from jumpserver/dev
v2.12.0 rc4
2021-07-14 19:03:39 +08:00
Bai
c94544df39 fix: 隐藏ROOT组织资产列表导入按钮 2021-07-14 18:06:43 +08:00
ibuler
35c7b81359 perf: 优化clone 2021-07-14 16:51:09 +08:00
ibuler
e7ae4bfbd3 perf: 优化特权账号创建,都特殊的api 2021-07-14 16:31:59 +08:00
Bai
d1c3c63efc fix: 修改收集用户任务详情也文案 2021-07-14 15:39:59 +08:00
Bai
bfc5ae9bf7 fix: 修改普通用户/特权用户文案 2021-07-14 12:25:33 +08:00
Jiangjie.Bai
fa0c4d66bb Merge pull request #904 from jumpserver/dev
v2.12.0 rc3
2021-07-13 20:47:54 +08:00
ibuler
31d011b1fc perf: 修复账号导出了所有的bug 2021-07-13 19:12:48 +08:00
老广
f4cd0efd29 Merge pull request #901 from jumpserver/dev
v2.12.0 rc3
2021-07-13 19:10:00 +08:00
Bai
f946cf5d11 fix: 完美修复录像存储无法clone的问题 2021-07-13 18:51:07 +08:00
ibuler
8d42071d4a perf: root组织,去掉导入 2021-07-13 18:38:54 +08:00
Bai
b374979b32 fix: 修复网关更新密码代填提交问题 2021-07-13 18:25:02 +08:00
ibuler
430f2e4856 perf: 普通系统用户添加批量处理 2021-07-13 18:24:41 +08:00
ibuler
59a8971af0 perf: 修复消息订阅,取消按钮无法使用的问题 2021-07-13 18:07:10 +08:00
fit2bot
4f70f3bea7 pref: 添加指纹 (#896)
* fix(perms): 修复无法clone的问题

* pref: 添加指纹

Co-authored-by: ibuler <ibuler@qq.com>
2021-07-13 17:26:18 +08:00
ibuler
30ffa13b01 fix(perms): 修复无法clone的问题 2021-07-13 17:22:52 +08:00
fit2bot
4fb8e4073c fix: 修复审计员首页用户数空白的问题 (#894)
Co-authored-by: ibuler <ibuler@qq.com>
2021-07-13 16:24:58 +08:00
Bai
fef38ea007 fix: 修复审计员可以点击dashboard页面的资产/用户总数的问题 2021-07-13 13:44:30 +08:00
ibuler
41c5ac5f12 perf: 优化左侧组织列表,有xpack时直接显示
perf: 优化显示组织
2021-07-13 13:09:03 +08:00
ibuler
4056c601b1 perf: admin sftp root help text 2021-07-13 13:06:03 +08:00
ibuler
34a72467d2 fix: 修复导入时url中有参数导致的拼接错误
perf: 优化一下获取url
2021-07-13 10:56:58 +08:00
fit2bot
e4657f3bf6 fix: 修复系统用户详情中测试连接性 (#889)
Co-authored-by: ibuler <ibuler@qq.com>
2021-07-12 20:32:37 +08:00
Jiangjie.Bai
c6cde723ec Merge pull request #888 from jumpserver/dev
v2.12.0 rc2
2021-07-12 18:29:50 +08:00
ibuler
8b31666f67 fix: 修复管理用户克隆 2021-07-12 18:22:18 +08:00
Bai
0a01ad3552 fix: 修复资产可连接性显示图标 2021-07-12 18:21:47 +08:00
ibuler
8d783dd650 fix: 修复动态系统用户无法提交
fix: 修复动态系统用户
2021-07-12 12:59:12 +08:00
ibuler
425e47d613 perf: 修复资产详情中账号列表 2021-07-08 18:55:43 +08:00
Jiangjie.Bai
2bf83e241e Merge pull request #880 from jumpserver/dev
v2.12 rc1
2021-07-08 15:24:38 +08:00
fit2bot
ec3bdb0eac perf: 显示账号 (#881)
Co-authored-by: ibuler <ibuler@qq.com>
2021-07-08 15:18:36 +08:00
健健
49ee321c83 for k8s system user, hide () (#879)
* chore: 更新Submodule指向

* fix: 修复Build失败的问题

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

* for k8s system user, not show ()

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>
2021-07-08 14:32:58 +08:00
fit2bot
44f93f5aea perf: 合并系统用户和管理用户 (#878)
* perf: 暂存优化 vault table

* perf: 修改导入出

* refactor: 整合系统用户和管理用户

* perf: 暂存一下

* perf: 暂存

* xxx

* ..

* perf: ...

* .

* xxx

* perf: 优化翻译

* perf: 优化提示

* ...

* 完成list

* xx

* perf: 修改更新

* perf: 完成更新和查看

* ...

* stash it

* perf: 完成下载导入的 mfa

* xxx

* perf: 基本完成

* 修改一点

* perf: 优化资产列表

Co-authored-by: ibuler <ibuler@qq.com>
2021-07-08 14:28:23 +08:00
ibuler
baf6ba7496 fix(settings): 修复系统设置中邮件没有更改就无法更新的问题 2021-06-28 19:03:34 +08:00
Bai
fa9b4abba1 feat: 支持设置默认存储(2) 2021-06-28 10:33:20 +08:00
Bai
35e0d57a05 feat: 支持设置默认存储 2021-06-28 10:33:20 +08:00
jiangweidong
90eebea2e6 fix: 修改华为及青云私有云变量名称 2021-06-21 15:56:41 +08:00
jiangweidong
dab32e33ad feat: 华为私有云、青云私有云云管同步 2021-06-21 15:56:41 +08:00
ibuler
bf877f415a fix: 修复会话详情中播放bug 2021-06-18 18:08:13 +08:00
ibuler
1ffb1d9cab fix(infra): 修复基础平台等可以删除更新问题 2021-06-18 11:05:47 +08:00
ibuler
4d4dc35735 perf: 优化 table 去掉clone
perf: 去掉

perf: xxx
2021-06-18 10:26:59 +08:00
Jiangjie.Bai
95ccc5bc16 Merge pull request #869 from jumpserver/dev
Dev
2021-06-17 15:23:54 +08:00
ibuler
dc112bfee8 fix: 修复创建资产 2021-06-17 15:23:15 +08:00
ibuler
84930b27fa fix: 修复切换组织时的错误提示 2021-06-17 15:22:37 +08:00
Jiangjie.Bai
2bf1496480 Merge pull request #866 from jumpserver/dev
v2.11.0 rc5
2021-06-17 12:23:58 +08:00
Bai
27a78c3b23 fix: 修改应用账号(k8s)导出/查看均显示token字段 2021-06-17 12:13:41 +08:00
ibuler
95007a52a5 fix(assets): 修复资产创建时,没有把节点带过去的问题 2021-06-17 12:00:51 +08:00
Jiangjie.Bai
50850af382 Merge pull request #863 from jumpserver/dev
v2.11.0 rc5
2021-06-17 11:33:42 +08:00
Bai
92097e11e5 fix: 修改账号管理样式 2021-06-17 11:31:09 +08:00
Jiangjie.Bai
02e1299cbd Merge pull request #859 from jumpserver/dev
v2.11.0 rc5 (2)
2021-06-16 19:48:27 +08:00
ibuler
bccaaac1c7 perf: 优化系统用户详情信息 2021-06-16 19:10:40 +08:00
ibuler
3b91b60bc2 perf: 优化工单申请
去掉debug
2021-06-16 18:38:43 +08:00
ibuler
dca0753492 perf(setting): 优化安全设置中的,危险命令告警 2021-06-16 18:03:47 +08:00
Bai
d1920595d8 fix: 列表页添加org_name列表名 2021-06-16 14:29:49 +08:00
Bai
97638bc7a3 fix: 收集用户列表去掉asset搜索项 2021-06-16 14:29:49 +08:00
Bai
f8ab8035e5 fix: 修改云管账号详情页validity显示字段 2021-06-16 14:29:49 +08:00
Jiangjie.Bai
39c1aa1e7e Merge pull request #853 from jumpserver/dev
v2.11.0 rc5
2021-06-16 13:05:08 +08:00
ibuler
6f07c36393 fix(sessions): 修复监控地址错误的问题 2021-06-16 12:26:44 +08:00
Jiangjie.Bai
b700d0fc83 Merge pull request #850 from jumpserver/dev
v2.11.0 rc3
2021-06-15 14:50:23 +08:00
xinwen
2d7fd30da1 fix: 修复站内信 WebSocket 问题 2021-06-15 14:48:12 +08:00
Jiangjie.Bai
99b852d552 Merge pull request #848 from jumpserver/dev
v2.11.0 rc2
2021-06-15 10:51:38 +08:00
Jiangjie.Bai
37234f0e20 Merge pull request #840 from jumpserver/pr@dev@fix_accounts
fix: 修复账号管理-资产账号导出需要进行MFA认证样式
2021-06-15 10:43:14 +08:00
ibuler
da87848f44 fix: 去掉执行任务中的clone按钮 2021-06-11 18:12:03 +08:00
ibuler
2aa363f6ce perf: 优化websocket,实时获取数量
perf: 优化提示i18n

perf: remove yarn

..
2021-06-11 18:11:38 +08:00
Bai
97a98ace03 perf: 优化账号管理-列表2 2021-06-11 13:54:16 +08:00
Bai
f53be25e19 perf: 优化账号管理-列表 2021-06-11 11:48:07 +08:00
ibuler
3c36b50c35 fix: 修复es添加报错问题 2021-06-11 11:25:12 +08:00
Bai
eb75122a76 fix: 修复账号管理-应用账号导出需要进行MFA认证 2021-06-11 11:03:40 +08:00
fit2bot
9f3a1e082b fix: 修复我的资产页面button消失的bug (#844)
* perf: 修改命令存储创建

* fix: 修复我的资产页面button消失的bug

Co-authored-by: ibuler <ibuler@qq.com>
2021-06-11 10:44:52 +08:00
fit2bot
ca8307338f perf: 继续优化名称 (#842)
* perf: 修改命令存储创建

* perf: 继续优化名称

xxx

Co-authored-by: ibuler <ibuler@qq.com>
2021-06-10 19:18:32 +08:00
fit2bot
ee53941fb0 fix(settings): 修复ldap提交时,json报错 (#836)
* perf: 修改命令存储创建

* fix(settings): 修复ldap提交时,json报错

Co-authored-by: ibuler <ibuler@qq.com>
2021-06-10 19:05:08 +08:00
Bai
6d7fec5bf9 fix: 修复账号管理-资产账号导出需要进行MFA认证搜索项 2021-06-10 17:10:31 +08:00
Bai
d31492f43b fix: 修复账号管理-资产账号导出需要进行MFA认证样式 2021-06-10 16:56:56 +08:00
Bai
5056c8cbf9 fix: 修复账号管理-资产账号导出需要进行MFA认证 2021-06-10 16:52:28 +08:00
Jiangjie.Bai
00cf2c34b9 Merge pull request #835 from jumpserver/dev
v2.11.0 rc1
2021-06-10 14:01:52 +08:00
fit2bot
c15f22e05b perf: 优化一下,暂时不支持查看全部站内信 (#833)
* perf: 修改命令存储创建

* perf: 优化一下,暂时不支持查看全部站内信

Co-authored-by: ibuler <ibuler@qq.com>
2021-06-10 12:58:25 +08:00
fit2bot
283dfc97ec perf: 系统监控中添加 xrdp (#834)
* perf: 修改命令存储创建

* perf: 系统监控中添加 xrdp

perf: gua

Co-authored-by: ibuler <ibuler@qq.com>
2021-06-10 12:53:01 +08:00
ibuler
a13c009b37 perf: 优化站内信和xrdp监控
perf: 优化 can has

perf: 修改提示i18n
2021-06-09 19:59:31 +08:00
fit2bot
2494583098 perf: 优化session监控 (#830)
* perf: 修改命令存储创建

* perf: 优化session监控

Co-authored-by: ibuler <ibuler@qq.com>
2021-06-09 15:43:00 +08:00
fit2bot
2bb1fce491 feat: 添加rdp配置 (#828)
* perf: 修改命令存储创建

* feat: 添加rdp配置

* perf: 优化xrdp显示位置

Co-authored-by: ibuler <ibuler@qq.com>
2021-06-08 15:26:40 +08:00
Bai
49e2c547e7 fix: 修改账号管理列表相关问题 2021-06-08 11:38:26 +08:00
老广
0bac33c9fc Merge pull request #822 from jumpserver/pr@dev@feat_subscription
feat: 系统消息订阅页面
2021-06-08 11:23:14 +08:00
ibuler
1b3f5403dd perf: 国际化 2021-06-07 20:05:36 +08:00
xinwen
b4fd09e308 去掉websocket 2021-06-07 19:40:22 +08:00
xinwen
96b002eccb 添加标记已读与websockt 2021-06-07 17:09:10 +08:00
ibuler
15e253804e perf: 优化msg 2021-06-07 15:47:13 +08:00
fit2bot
8427cb4e22 feat(terminal): 危险命令变色 (#825)
* perf: 修改命令存储创建

* feat(terminal): 危险命令变色

* perf: 去掉那个标签

Co-authored-by: ibuler <ibuler@qq.com>
2021-06-07 10:47:57 +08:00
Jiangjie.Bai
c8c6cbc3b1 Merge pull request #826 from jumpserver/feat_account_manager
feat: 添加账号管理模块
2021-06-04 11:21:01 +08:00
xinwen
ef841149de feat: 添加站内信页面 2021-06-04 10:41:20 +08:00
Bai
b51783d98f feat: 账号管理(翻译) 2021-06-03 13:10:18 +08:00
dependabot[bot]
80ff4064e6 chore(deps): bump browserslist from 4.10.0 to 4.16.6 (#820)
* chore: 更新Submodule指向

* fix: 修复Build失败的问题

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

* chore(deps): bump browserslist from 4.10.0 to 4.16.6

Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.10.0 to 4.16.6.
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/browserslist/browserslist/compare/4.10.0...4.16.6)

Signed-off-by: dependabot[bot] <support@github.com>

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: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-02 19:26:46 +08:00
Bai
091038de95 feat: 优化收集用户列表 2021-06-02 18:53:29 +08:00
ibuler
cc994b8ecd perf: logo和文案
perf: 去掉title
2021-06-02 18:11:34 +08:00
dependabot[bot]
73d4ec0fa5 chore(deps): bump dns-packet from 1.3.1 to 1.3.4 (#821)
* chore: 更新Submodule指向

* fix: 修复Build失败的问题

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

* chore(deps): bump dns-packet from 1.3.1 to 1.3.4

Bumps [dns-packet](https://github.com/mafintosh/dns-packet) from 1.3.1 to 1.3.4.
- [Release notes](https://github.com/mafintosh/dns-packet/releases)
- [Changelog](https://github.com/mafintosh/dns-packet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mafintosh/dns-packet/compare/v1.3.1...v1.3.4)

Signed-off-by: dependabot[bot] <support@github.com>

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: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-02 17:52:15 +08:00
Bai
8ee39c036f feat: 资产账号列表添加 BackendDisplay 和 Name 字段 2021-06-02 17:01:34 +08:00
xinwen
e8335d9c73 feat: 系统消息订阅页面 2021-06-01 17:48:36 +08:00
Bai
f720eaf05a feat: 账号管理模块(基本完成) 2021-05-28 17:19:35 +08:00
Bai
7f118d7074 feat: 移动 xpack/ChangeAuthPlan > accounts/CahngeAuthPlan 2 2021-05-28 16:53:08 +08:00
Bai
a1ad901b40 feat: 移动 xpack/ChangeAuthPlan > accounts/CahngeAuthPlan 2021-05-28 16:50:40 +08:00
Bai
27b39ad910 feat: 移除 xpack/vault 2021-05-28 16:00:17 +08:00
Bai
f053a37606 feat: 移动 xpack/GatheredUser > accounts/GatheredUser 2021-05-28 15:40:34 +08:00
Bai
dcb94f4aac feat: 优化应用账号(操作按钮: 更新) 2021-05-28 11:35:18 +08:00
Bai
91cbe97a5b feat: 优化应用账号(应用列表选中行、应用用户列表背景色) 2021-05-28 11:23:49 +08:00
Bai
d3053fdf18 feat: 优化资产账号(资产列表选中行及资产用户列表背景色) 2021-05-27 16:45:55 +08:00
Bai
226f17c4fd feat: 优化资产账号(资产树的显示/隐藏) 2021-05-27 14:10:06 +08:00
Bai
34a30571c1 feat: 添加应用账号模块(基本完成,细节待优化) 2021-05-26 18:38:02 +08:00
Bai
0a19829c4a feat: 添加资产账号模块(基本完成,细节待优化) 2021-05-26 17:23:42 +08:00
Bai
09a252f282 feat: 添加账号管理路由 2021-05-25 12:51:28 +08:00
Michael Bai
c7c6f5ac82 fix: 修复导入模版生成table时,没有显示number字段类型所在列的问题 2021-05-23 22:00:30 -05:00
Michael Bai
f3b15727cb fix: 修改用户创建/更新密码策略选项值 2021-05-23 21:58:28 -05:00
Jiangjie.Bai
0eb8e1fab3 Merge pull request #815 from jumpserver/dev
v2.10.0 rc4
2021-05-19 19:29:38 +08:00
ibuler
a80918139b perf: 修改命令存储创建 2021-05-19 05:59:40 -05:00
ibuler
67ffda2fd0 fix: 修复ldap导入不能隐藏dialog问题 2021-05-19 18:34:10 +08:00
ibuler
fa6831b743 perf: 优化钉钉企业微信提交 2021-05-19 18:33:11 +08:00
Bai
8bd77fa6c9 fix: 修复创建云管账号成功重定向页面问题 2021-05-19 18:29:50 +08:00
ibuler
6a45fccfcd fix: 修复系统用户用户名禁用的问题 2021-05-19 18:13:43 +08:00
ibuler
c39733cf66 fix: 修复多tab引起的设置和弹窗问题
fix: 优化

perf: 移除不用的代码

perf: 修复不能刷新的bug

perf: 去掉conole
2021-05-18 22:22:35 -05:00
Jiangjie.Bai
ea4a7f53e3 Merge pull request #808 from jumpserver/dev
v2.10.0 rc3
2021-05-18 19:18:19 +08:00
Bai
6639614caf fix: 修复云管中心创建账户后跳转到任务列表页面的问题 2021-05-18 18:31:59 +08:00
Bai
f17ec57b3a feat: 收集用户任务添加详情页面和执行历史页面 2021-05-18 17:46:53 +08:00
Bai
b04cf80201 fix: 修复云管账号详情页面点击更新失败的问题 2021-05-18 17:45:51 +08:00
ibuler
6dc71fe612 perf(assets): 修复系统用户详情中更新按钮地址不对的问题 2021-05-18 14:15:13 +08:00
ibuler
9cbec5e1ab perf: 优化系统用户用户名显示禁用
perf: 优化系统用户用户名隐藏与禁用
2021-05-18 14:14:22 +08:00
ibuler
703eadf292 perf: 优化工单,处理人去掉关闭的按钮,只能同意或拒绝 2021-05-18 14:12:13 +08:00
Bai
d2aa4e99da fix: 修复改密计划页面更新资产/节点报错的问题 2021-05-18 14:11:02 +08:00
Bai
4509970f7d fix: 修复组织详情关联用户报错的问题 2021-05-17 19:12:39 +08:00
ibuler
b03af2c995 perf(users): 修复全局组织用户组问题的 2021-05-17 18:35:14 +08:00
ibuler
328e068aca fix(xpack): 修复收集任务表头设置的bug 2021-05-17 18:34:04 +08:00
Bai
65c6922621 fix: 修复收集用户任务创建不填写interval报错的问题 2021-05-17 18:30:54 +08:00
xinwen
ebb8af42f2 fix: 修复绑定企业微信&钉钉的一些问题 2021-05-17 17:21:14 +08:00
ibuler
0b821ffc04 perf: 优化profile中的翻译 2021-05-17 16:57:53 +08:00
Bai
5b6e2970bf fix: 去掉RemoteApp的导入/导出功能 2021-05-17 16:36:05 +08:00
Bai
d01e991885 fix: 申请资产工单详情添加资产授权详情链接 2021-05-17 15:52:37 +08:00
Bai
552b26e163 fix: 申请资产详情添加 action 字段 2021-05-17 15:52:37 +08:00
Bai
35814d3d5c fix: 添加系统监控组件名称(lion) 2021-05-17 15:00:17 +08:00
xinwen
31e46a3ede fix: oauth2 i18n 2021-05-17 01:51:56 -05:00
ibuler
e7815f528c fix: 修复系统用户详情中,没有更多操作的bug 2021-05-17 01:51:25 -05:00
ibuler
4d747686cd fix: 修复资产详情页面,toLowerCase 报错 2021-05-17 01:50:47 -05:00
Jiangjie.Bai
12697ab279 Merge pull request #788 from jumpserver/dev
v2.10.0 rc1
2021-05-13 19:47:27 +08:00
老广
f4f4b7ccc1 增加 rdp vnc 监控 (#787)
Co-authored-by: Eric <xplzv@126.com>
2021-05-13 19:44:47 +08:00
ibuler
41bbd4a70b perf(assets): 优化资产创建更新时的label 2021-05-13 19:24:35 +08:00
Jiangjie.Bai
a66403dcf0 Merge pull request #786 from jumpserver/dev
v2.10 rc1
2021-05-13 19:21:04 +08:00
xinwen
31b75aa139 feat: 添加企业微信,钉钉扫码登录 2021-05-13 19:12:51 +08:00
xinwen
411aae6829 feat: ES 命令存储支持忽略证书验证 2021-05-07 03:48:15 -05:00
ibuler
0ad025f63b fix: 修复系统用户vnc用户名可以不必填 2021-05-06 22:31:40 -05:00
jym503558564
312de6c6eb perf(i18n): 修改用户页面Router 翻译 2021-05-06 22:30:47 -05:00
jym503558564
5b05bd12c6 fix(i18n): 修改更新资源密码时,更新密码字段没翻译的问题 2021-05-06 22:30:10 -05:00
Bai
a87ea94e78 fix: 删除资产授权创建页面多余的输入框 2021-04-30 14:57:25 +08:00
ibuler
9994020f97 perf: 优化自动推送那个按钮
perf: 修改名称
2021-04-29 04:31:31 -05:00
fit2bot
fc0709f1ce fix: 修复点击修改密码密码框丢失的问题 (#771)
Co-authored-by: ibuler <ibuler@qq.com>
2021-04-29 17:28:23 +08:00
ibuler
9235d68825 refactor: 改变组件位置
stash

refacter: 整理了forms组件位置

perf: 修改导入
2021-04-28 23:59:49 -05:00
ibuler
4a17efb015 perf: 优化登录前更新密码 2021-04-28 23:58:43 -05:00
fit2cloud-jiangweidong
1cc69e4203 feat: 管理员可以设置用户是否下次登录需修改密码 (#758)
* feat: 管理员可以设置用户是否下次登录需修改密码

* feat: 管理员可以设置用户下次是否需要更改密码,本次修改:字段命名规范化

* fix: 用户是否需要更改密码,变量名称规范化

* fix: 管理员可设置用户下次登录是否需要改密,字段名称更改
2021-04-28 19:24:30 +08:00
jym503558564
9de8d622e4 fix(i18n): 修改翻译 2021-04-28 05:20:40 -05:00
Bai
844dfb5ac1 feat: 修复用户页面获取命令复核功能详情失败的问题 2021-04-28 16:26:37 +08:00
fit2cloud-jiangweidong
9d3fd73367 feat: 用户更改密码不可使用前n次历史密码,管理员可设置历史密码重复次数 2021-04-28 02:46:13 -05:00
ibuler
c7731a1d2f perf: 优化公钥认证,根据开关来限制公钥认证 2021-04-27 04:50:43 -05:00
Bai
bf161d688a feat: 添加命令复核工单逻辑3 2021-04-27 16:37:54 +08:00
Bai
ab2d5b3fed feat: 添加命令复核工单逻辑2 2021-04-27 16:37:54 +08:00
Bai
6a40ab1a4c feat: 添加命令复核工单逻辑 2021-04-27 16:37:54 +08:00
jym503558564
4d11e638e8 fix:修改Xpack-router翻译 2021-04-26 05:37:13 -05:00
fit2bot
97c4a397e2 fix:修改翻译 (#762)
Co-authored-by: jym503558564 <503558564@qq.com>
2021-04-25 18:07:31 +08:00
Orange
9239d69c14 fix: 修改DB协议系统用户手动登录时用户名必填 2021-04-25 01:16:26 -05:00
ibuler
3ea68fe13f perf: 优化换行 2021-04-25 01:09:39 -05:00
Orange
04ce056076 fix: 社区版本隐藏全局组织名称设置 2021-04-25 01:09:39 -05:00
Orange
67c1c8db58 fix: 临时移除 Database 协议的用户名与密码相同 选项 2021-04-19 04:01:32 -05:00
Jiangjie.Bai
d8566d2f9e Merge pull request #753 from jumpserver/dev
v2.9.0 发版
2021-04-15 21:05:14 +08:00
fit2bot
d74da503c8 fix: 修复不能禁用的问题 (#751)
perf: 优化系统用户创建

Co-authored-by: ibuler <ibuler@qq.com>
2021-04-15 19:41:07 +08:00
Orange
e1d8e4aea6 fix: 修复v2.9测试中的bugs 2021-04-15 06:40:30 -05:00
Orange
d21559599f fix: 修复系统设置邮件bugs 2021-04-15 06:39:42 -05:00
Orange
f8cadb545f fix: 修复首页面板链接跳转有误的问题
Closes https://github.com/jumpserver/jumpserver/issues/5850
2021-04-15 06:39:07 -05:00
Orange
2bc4b53159 Merge pull request #747 from jumpserver/pr@dev@fix_create_asset_node_lost
fix(assets): 修复选中资产创建时,没有默认选中节点的问题
2021-04-15 16:19:51 +08:00
ibuler
7f28cc0aad fix(assets): 修复选中资产创建时,没有默认选中节点的问题 2021-04-15 15:39:26 +08:00
Orange
7e95e38d24 Merge pull request #744 from jumpserver/dev
v2.9.0 rc3
2021-04-14 18:55:07 +08:00
Orange
57bafc01e3 fix: 修改翻译 2021-04-14 18:54:34 +08:00
Orange
834033f2fd fix: 隐藏终端详情中的端口数据
Closes https://github.com/jumpserver/trello/issues/986
2021-04-14 05:30:25 -05:00
Orange
9a41ccbdd7 fix: 禁止全局组织中批量更新用户组 2021-04-14 05:30:04 -05:00
ibuler
3793370c9c fix: 修复导入id重复的bug 2021-04-14 05:29:38 -05:00
Orange
4486dc55a7 Merge pull request #740 from jumpserver/dev
v2.9.0 rc2
2021-04-13 19:30:56 +08:00
fit2bot
bdb63b865a fix: 修复v2.9 bugs (#739)
* fix: 修复资产列表协议组显示的问题

* fix: 全局组织批量更新用户禁止更新用户组

* fix: 修复网关无法克隆的Bug

* fix: 修复平台列表更新bug

* fix: 修复翻译问题

* fix: 修复更新管理用户账户秘钥的问题

Co-authored-by: Orange <orangemtony@gmail.com>
2021-04-13 19:30:24 +08:00
fit2bot
2d17b48b86 fix(import): 修复导入编辑,空格无法编辑的问题 (#735)
fix: 修复点击节点导入出问题的bug

perf(import): 优化使用分页导入

Co-authored-by: ibuler <ibuler@qq.com>
2021-04-13 14:19:07 +08:00
老广
67091d5a22 Merge pull request #733 from jumpserver/dev
Merge Dev v2.9
2021-04-08 06:24:13 -05:00
liuboF2c
798c4ca64e feat:支持配置全局组织的显示名称 (#731)
Co-authored-by: liubo <liubo@fit2cloud.com>
2021-04-08 13:57:26 +08:00
fit2bot
eddd27e95d perf: 优化 csv/xlsx 导入 (#725)
* perf: 优化导入csv

* perf: 优化导入

stash

perf: 优化导入

perf: 更新导入

perf: 优化导入

feat: 完成导入优化

perf: 修复bug

* perf: 继续优化导入,性能提高三倍

Co-authored-by: ibuler <ibuler@qq.com>
2021-04-08 10:09:58 +08:00
dependabot[bot]
12ffa363c1 chore(deps): bump lodash from 4.17.15 to 4.17.19 (#213)
* chore: 更新Submodule指向

* fix: 修复Build失败的问题

* fix(preload): 开启Preload

开启preload,提高首屏加载速度

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: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-07 15:51:21 +08:00
dependabot[bot]
cd79246f0d build(deps): bump http-proxy from 1.18.0 to 1.18.1 (#368)
* build(deps): bump http-proxy from 1.18.0 to 1.18.1

Bumps [http-proxy](https://github.com/http-party/node-http-proxy) from 1.18.0 to 1.18.1.
- [Release notes](https://github.com/http-party/node-http-proxy/releases)
- [Changelog](https://github.com/http-party/node-http-proxy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/http-party/node-http-proxy/compare/1.18.0...1.18.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-07 15:50:29 +08:00
dependabot[bot]
94583e2156 build(deps): bump ini from 1.3.5 to 1.3.7 (#545)
* build(deps): bump ini from 1.3.5 to 1.3.7

Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-07 15:44:08 +08:00
dependabot[bot]
ca602a8052 build(deps): bump axios from 0.18.1 to 0.21.1 (#567)
* build(deps): bump axios from 0.18.1 to 0.21.1

Bumps [axios](https://github.com/axios/axios) from 0.18.1 to 0.21.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v0.21.1/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.18.1...v0.21.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-07 15:43:11 +08:00
dependabot[bot]
5bdc4e4e3a build(deps): bump elliptic from 6.5.2 to 6.5.4 (#649)
* build(deps): bump elliptic from 6.5.2 to 6.5.4

Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.4.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-07 15:41:53 +08:00
dependabot[bot]
da1b73d3fd build(deps): bump y18n from 3.2.1 to 3.2.2 (#721)
* build(deps): bump y18n from 3.2.1 to 3.2.2

Bumps [y18n](https://github.com/yargs/y18n) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)
2021-04-07 15:35:50 +08:00
Orange
4bc4012520 feat: 支持首页PDF导出,优化打印样式 2021-04-07 15:32:28 +08:00
Orange
b8f1cb7a8e feat: 支持首页PDF导出,优化打印样式 2021-04-07 15:32:28 +08:00
liubo
ee6a3c6d68 feat: 支持添加nutanix云账号 2021-04-07 15:19:26 +08:00
Orange
be176ad408 perf: 用户来源不是本地时禁用更新密码 2021-04-07 11:17:50 +08:00
Orange
73c17fccbe perf: 优化翻译批量命令选择资产时提示资产不支持SSH协议;连接 2021-04-07 11:04:40 +08:00
Orange
30c1284a41 fix: 完善页面邮箱地址校验规则
Closes https://github.com/jumpserver/trello/issues/933
2021-04-07 11:03:09 +08:00
Orange
191900381a fix: 修复资产更多信息更新失败的问题 2021-04-07 11:02:08 +08:00
Orange
91e04a8d18 perf: 优化编译命令 2021-03-29 19:29:06 +08:00
Orange
1b223f0486 fix: 修复命令存储更新失败的问题 2021-03-29 19:27:58 +08:00
Orange
22eb78339e Merge pull request #719 from jumpserver/pr@dev@perf_status
perf: 优化系统监控页面
2021-03-29 19:23:00 +08:00
ibuler
5831cb326c perf: 优化系统监控页面 2021-03-29 16:59:33 +08:00
Orange
52a4c1824f fix: 修复创建K8S系统用户的权限问题 2021-03-23 17:55:06 +08:00
Orange
c155e5a59b perf: 优化全局组织下禁止用户更新用户组 2021-03-23 17:54:15 +08:00
Orange
ff90e56763 fix: 修复创建远程应用默认Path丢失的问题 2021-03-23 17:50:54 +08:00
Orange
14000317b9 fix: 恢复RDP系统用户user_group字段 2021-03-23 17:49:52 +08:00
Orange
a24fab51af Merge pull request #702 from jumpserver/dev
Merge v2.8.1
2021-03-19 19:06:18 +08:00
Orange
4184401432 fix: 修复LDAP属性映射的字段显示问题 2021-03-19 17:40:40 +08:00
Orange
dc59836a66 fix: 修复更多操作数量为空时仍然展示的Bug 2021-03-19 15:08:50 +08:00
Orange
ba6433a585 Merge pull request #699 from jumpserver/dev
v2.8真的发版
2021-03-18 20:47:40 +08:00
fit2bot
b88c90bb75 fix: 全局组织系统用户详情页中禁用添加资产 (#694)
* fix: 去掉组织创建保存并继续按钮

* fix: 全局组织系统用户详情页中禁用添加资产

* fix: 全局组织系统用户详情页中禁用添加资产

* fix: 修复bugs

* fix: 修复bugs

Co-authored-by: Orange <orangemtony@gmail.com>
2021-03-18 20:41:42 +08:00
ibuler
4eb5155aed perf: 优化has valid license 写法 2021-03-18 20:39:37 +08:00
ibuler
dd4aed9cf4 perf: 优化用户中角色显示问题 2021-03-18 20:39:10 +08:00
Bai
2274b65d83 feat: 添加云管中心账号 Azure 国际 2021-03-18 20:20:42 +08:00
ibuler
e0a927c7e1 perf: 去掉more actions 2021-03-18 20:11:24 +08:00
Jiangjie.Bai
d294111e9e Merge pull request #693 from jumpserver/dev
v2.8 发版 (rc6)
2021-03-18 17:44:46 +08:00
ibuler
d6fef086c0 fix: 修复一些license验证问题 2021-03-18 16:12:26 +08:00
Orange
cd6418ef4b fix: 全局组织禁用批量更新及修复翻译问题 2021-03-18 16:12:06 +08:00
Orange
00909b364d fix: 全局组织禁用批量更新和从节点移除 2021-03-18 16:12:06 +08:00
ibuler
cdd3df1562 perf: 优化 relacation card 在root组织下应该disabled的问题 2021-03-18 14:39:02 +08:00
Orange
081f43887b fix: 去掉组织创建保存并继续按钮 2021-03-18 14:09:09 +08:00
Orange
95ba08afa6 fix: 修复LDAP显示隐藏问题 2021-03-18 13:40:50 +08:00
ibuler
88aa17550b perf: 优化 nested field error 2021-03-18 12:39:32 +08:00
Orange
8c3337f581 fix: 补全登录控制更新URl 2021-03-18 10:51:57 +08:00
ibuler
6d0d9650b4 perf: 禁用 detail 更新
perf: terminal 可以更新
2021-03-18 10:51:23 +08:00
Orange
86285c12bd Merge pull request #684 from jumpserver/dev
v2.8-rc4 发版
2021-03-17 20:19:11 +08:00
fit2bot
89b96a4542 fix: 修复前端显示Bugs (#679)
* fix: 修复前端显示Bugs

* fix: 修复引用取值问题

* fix: 还原更新设置

Co-authored-by: Orange <orangemtony@gmail.com>
2021-03-17 20:18:39 +08:00
Orange
707bf497b0 perf: 不可用节点添加提示 2021-03-17 20:12:58 +08:00
Orange
7a0ef53d78 perf: 不可用节点添加提示 2021-03-17 20:12:58 +08:00
Orange
2a0626e4f0 fix: 增加RDP自动推送 2021-03-17 20:11:56 +08:00
Orange
a760d0eeaa fix: 优化应用表单克隆功能 2021-03-17 20:11:07 +08:00
ibuler
f7ccbde502 perf(orgs): 优化用户组织选择,避免在没有启用xpack情况下,切换到root组织中 2021-03-17 19:57:44 +08:00
ibuler
8b350ba819 perf: 优化requet错误日志 2021-03-17 16:08:01 +08:00
Orange
f87d605e13 fix: 修复组织ID变更为000000000002 2021-03-17 16:04:20 +08:00
ibuler
4a38cb7168 fix: 修复hasBulkDelete的问题 2021-03-17 10:48:55 +08:00
Jiangjie.Bai
1ebb8dda0a Merge pull request #675 from jumpserver/dev
Merge v2.8 rc4
2021-03-16 20:49:31 +08:00
Orange
2f9b33898f perf: 增加表格Url初始状态校验 2021-03-16 20:47:44 +08:00
fit2bot
14b854a872 fix: 移除多余的clone (#673)
* fix: 移除多余的clone

* fix: 移除多余的clone

* fix: 移除多余的更多操作

* fix: 移除多余的更多操作

Co-authored-by: Orange <orangemtony@gmail.com>
2021-03-16 19:18:07 +08:00
ibuler
235131fd81 fix(assets): 修复 root 组织节点可以创建的问题 2021-03-16 19:12:54 +08:00
Orange
9b1ba09404 fix: 统一修复批量移除url问题 2021-03-16 19:11:47 +08:00
ibuler
6fc8a43e34 perf: 优化创建storage,使用新的通用组件
perf: 优化工单创建使用新的组件
2021-03-16 19:11:42 +08:00
Orange
324db2fdae fix: 修复 cellValue 取值问题 2021-03-16 19:10:25 +08:00
ibuler
3367363445 perf(orgs): 优化在 root 组织下,可以 克隆和创建的问题
perf: 优化 update, root组织下不能编辑
2021-03-16 18:31:34 +08:00
ibuler
5f6846fa47 perf: 优化创建acl左侧路由高亮 2021-03-16 15:25:55 +08:00
老广
d15292ad0e Merge pull request #665 from jumpserver/dev
Merge V2.8 Rc3
2021-03-15 20:00:09 +08:00
fit2bot
65cd456ae9 fix: 修复密码匣子包含克隆的问题 (#659)
Co-authored-by: Orange <orangemtony@gmail.com>
2021-03-15 19:40:02 +08:00
fit2bot
1748ae760a fix: 修复ACL展示Bugs (#660)
* fix: 修复ACL展示Bugs

* fix: 修复资产ACL更新异常

Co-authored-by: Orange <orangemtony@gmail.com>
2021-03-15 19:39:29 +08:00
Orange
7dc5ec8fa7 fix: 删除管理用户详情页的冗余快捷功能 2021-03-15 19:34:07 +08:00
老广
543e0f7aa7 Merge pull request #663 from jumpserver/pr@dev@fix_system_user
fix: 修复系统用户详情选择协议的Bugs
2021-03-15 19:32:48 +08:00
ibuler
4b152bf9bf fix: 修复root组织可以创建的问题
fix: 修复全局组织可以clone的问题
2021-03-15 19:31:27 +08:00
老广
0afc160b56 Merge pull request #664 from jumpserver/pr@dev@fix_table_action_row_id
fix: 批量修改表格Action取值为Row.id
2021-03-15 19:31:05 +08:00
ibuler
79c89676a6 perf: 优化移除用户和删除用户的行为 2021-03-15 19:30:27 +08:00
Orange
78fa90c9f8 fix: 批量修改表格Action取值为Row.id 2021-03-15 19:21:40 +08:00
Orange
c1ed466b8b fix: 修复系统用户详情选择协议的Bugs 2021-03-15 19:01:08 +08:00
Eric_Lee
35b8181589 Merge pull request #657 from jumpserver/dev
v2.8 rc2
2021-03-12 18:26:43 +08:00
Orange
c172056998 fix: 修复默认优先级 2021-03-12 18:24:20 +08:00
Orange
752e3a7a28 fix: 修复默认优先级 2021-03-12 18:24:20 +08:00
Orange
4935c32bb9 fix: 修改flower路径 2021-03-12 18:10:55 +08:00
老广
7e184a4061 Merge pull request #654 from jumpserver/dev
v2.8 准备发版
2021-03-11 21:19:28 +08:00
fit2bot
30a7063999 perf: 优化各页面列控制 (#652)
perf: 优化页面列表col

Co-authored-by: ibuler <ibuler@qq.com>
2021-03-11 20:24:03 +08:00
ibuler
c94a451df9 fix: 修复 root 组织 下可以创建的问题 2021-03-11 20:21:08 +08:00
fit2bot
f6aab29ecc perf: 增加ACL控制页面 (#651)
* perf: 增加ACL控制页面

* fix: 修改页面

* fix: 修改页面

* fix: 修改页面

* fix: 修改页面

* fix: update

* fix: 完善路由条件

* fix: 完善默认值

* fix: 完善翻译

* fix: 完善表单默认值

* fix: 完善表单默认值

Co-authored-by: Orange <orangemtony@gmail.com>
2021-03-11 20:11:19 +08:00
fit2bot
3ad157848a refactor: 重构命令记录结构 (#622)
* refactor: 重构命令记录结构

* fix: 调整tree构建字段

* fix: 修复首次打开页面报错的问题

* fix: 修复命令记录Tree刷新的问题

* fix: 添加时间戳排序

* fix: 删除多余的Consolelog

Co-authored-by: Orange <orangemtony@gmail.com>
2021-03-11 20:09:37 +08:00
xinwen
e9c54d7eeb feat: 资产授权规则添加是否起作用过滤条件 2021-03-10 15:44:54 +08:00
ibuler
b8b19fed53 perf: 优化嵌套表单的问题 2021-03-10 01:04:39 +08:00
Orange
8dbc7a404f fix: 修复Tag搜索会出现重复项的问题 2021-03-09 18:22:59 +08:00
Orange
a9e95fd705 fix: 增加资产列表可显示字段 2021-03-09 18:21:13 +08:00
Orange
a127b872cc fix: 修复组织管理样式错误 2021-03-09 14:11:03 +08:00
Orange
01aa92adc0 feat: 添加SSH指纹字段显示 2021-03-09 14:07:10 +08:00
fit2bot
0d31318fd5 fix: 修复用户页面无权限显示的问题 (#638)
* fix: 修复用户页面无权限显示的问题

* fix: 修复用户页面无权限显示的问题

Co-authored-by: Orange <orangemtony@gmail.com>
2021-03-09 14:06:28 +08:00
Orange
a595d28a5b fix: 修复显示空更多操作列表的Bug 2021-03-09 12:37:03 +08:00
fit2bot
5d973944ea fix: 修复Dropdown Menu的回调异常 (#642)
* fix: 修复Dropdown Menu的回调异常

* perf: 优化创建

Co-authored-by: Orange <orangemtony@gmail.com>
Co-authored-by: ibuler <ibuler@qq.com>
2021-03-09 12:35:44 +08:00
ibuler
1d008330a1 feat(settings): 支持自定义忘记密码的 url 2021-03-08 16:15:38 +08:00
ibuler
337ff47806 perf: 继续优化action group 2021-03-05 18:53:27 +08:00
fit2bot
e453a9a740 perf: 创建系统用户时需选择协议 (#631)
* perf: 创建系统用户时需选择协议

* feat: 添加action groups

* perf: 优化创建的按钮

Co-authored-by: Orange <orangemtony@gmail.com>
Co-authored-by: ibuler <ibuler@qq.com>
2021-03-05 15:01:04 +08:00
Orange
e4ec8565f0 fix: 修复平台列表默认可删除的错误 (#634)
* fix: 修复平台列表默认可删除的错误
2021-03-05 14:09:59 +08:00
Orange
22904ba421 fix: 修复Default组织ID的问题 2021-03-05 13:59:56 +08:00
Orange
5371faf019 fix: 更新云账号字段 2021-03-04 11:31:28 +08:00
Orange
7c6a3340ad fix: 修复工单匹配Meta字段 2021-03-04 11:05:45 +08:00
Orange
166e66ff9e fix: 优化带Meta的表单数据获取与提交的问题 2021-03-04 11:05:45 +08:00
Orange
1c39d33d43 fix: 修复表格获取ID异常的问题 2021-03-03 19:07:56 +08:00
Orange
159c6d8208 fix: 修复表格获取ID异常的问题 2021-03-03 19:07:56 +08:00
ibuler
917d95cc7b fix: 修复编辑出问题的bug
perf: 优化嵌套的form

perf: 优化嵌套的form

perf: 优化其那套form

perf: 优化nestfield, 但报错存在问题

perf: 优化
2021-03-03 14:48:41 +08:00
fit2bot
6fde735cbd perf: 优化全局组织 (#621)
* feat: 默认组织改为实体组织

* perf: 优化在root组织下,应不能创建

* perf: 优化全局组织

* perf: 优化组织选择

Co-authored-by: ibuler <ibuler@qq.com>
2021-03-03 14:47:44 +08:00
Orange
4ee32dd51b fix: 修复应用授权克隆报错 2021-03-03 13:51:22 +08:00
ibuler
19dc6aa5a0 fix: 修复编辑出问题的bug 2021-03-01 17:12:17 +08:00
fit2bot
8c7f08a971 refactor: 重构云同步账号模块 (#624)
* refactor: cloud (v0.1)

* refactor: 重构云同步账号模块

* fix: 干掉多余的代码

Co-authored-by: Bai <bugatti_it@163.com>
Co-authored-by: Orange <orangemtony@gmail.com>
2021-03-01 15:01:31 +08:00
ibuler
8df3841040 perf(applications): 去掉remote app中的网域 2021-03-01 11:07:48 +08:00
fit2bot
a4a14fecdd refactor: 重构录像存储模块 (#620)
* refactor: 重构录像存储模块

* refactor: 重构录像存储模块

* refactor: 重构录像存储模块

Co-authored-by: Orange <orangemtony@gmail.com>
2021-02-26 14:54:25 +08:00
Orange
52616fead9 fix: 修复RelationCard展示问题 2021-02-26 14:52:11 +08:00
fit2bot
95d0afc5cb feat: 添加模块自定义表格列 (#618)
* feat: 添加资产管理模块自定义表格列

* feat: 添加应用管理模块自定义表格列

* feat: 添加授权模块自定义表格列

* feat: 添加会话模块自定义表格列

Co-authored-by: Orange <orangemtony@gmail.com>
2021-02-26 14:51:14 +08:00
xinwen
07c36e717e refactor: 调整校对节点资产数量 url 2021-02-23 17:29:10 +08:00
ibuler
de393cd2b6 perf(ops): 优化命令执行的输出 2021-02-20 11:09:47 +08:00
Orange
1203941e6b perf: 表格配置存储到localStorage中 2021-02-08 00:28:13 -06:00
Orange
cfa8fcf352 perf: 允许用户修改Source 2021-02-08 00:27:17 -06:00
ibuler
8bfd6b8654 perf: 优化table下拉的配色 2021-02-05 14:49:06 +08:00
ibuler
9840396a6f feat: 修复min的问题 2021-01-29 11:05:07 +08:00
ibuler
309d9379b9 feat: 修改过滤逻辑 2021-01-29 11:05:07 +08:00
Orange
a15ce0b77f feat: 添加自定义表格列功能 2021-01-29 11:05:07 +08:00
Orange
06e80fe75f feat: 添加自定义表格列功能 2021-01-29 11:05:07 +08:00
fit2bot
009be1be83 fix: 临时调整因为Chrome的兼容性问题导致的日期计算错误 (#605)
* fix: 临时调整因为Chrome的兼容性问题导致的日期计算错误

* fix: 修复工单字段展示问题

Co-authored-by: Orange <orangemtony@gmail.com>
2021-01-28 19:29:55 +08:00
Orange
eb20b32fcf fix: 修复工单列表字段展示错误 2021-01-26 04:08:56 -06:00
ibuler
9b19d862f6 perf: 优化ldap配置 2021-01-26 18:01:54 +08:00
ibuler
38b21357b7 perf(settings): 修改翻译 2021-01-26 18:01:54 +08:00
ibuler
c40bd0a9ab perf: 完成终端和安全setting 2021-01-26 18:01:54 +08:00
ibuler
48a7310739 perf(settings): 优化配置页面 2021-01-26 18:01:54 +08:00
Jiangjie.Bai
2c69b36291 Merge pull request #598 from jumpserver/dev
Dev
2021-01-21 15:35:46 +08:00
Orange
d267cd1f5e fix: 移除提交应用申请工单时多余的字段 2021-01-21 15:33:02 +08:00
Orange
807e3a407a fix: 移除重复的权限提醒 2021-01-21 15:33:02 +08:00
Orange
1ba790e680 fix: 调整工单主机名字段变成主机名组 2021-01-21 15:33:02 +08:00
Orange
44b701edbc fix: 修复命令过滤规则创建提示有详情的问题 2021-01-21 15:33:02 +08:00
fit2bot
8619ab8bca fix: 修改测试产生的bugs (#596)
* fix: 修改创建录像存储的条件为必填

* fix: 修改最后一次执行的log类型为Ansible

* fix: 修复批量测试资产可连接性的权限问题

Co-authored-by: Orange <orangemtony@gmail.com>
2021-01-21 12:43:36 +08:00
Jiangjie.Bai
79e92fa46b Merge pull request #595 from jumpserver/dev
Dev
2021-01-20 19:27:59 +08:00
fit2bot
f19c863440 feat: 添加管理用户列表 (#588)
* feat: 添加管理用户列表

* fix: 整理管理用户详情页面

* fix: 整理管理用户详情页面

Co-authored-by: Orange <orangemtony@gmail.com>
2021-01-20 19:07:00 +08:00
fit2bot
fff8b79a45 fix: 修正测试产生的Bugs (#593)
* fix: 调整登录复核工单字段

* fix: 移除创建网关的详情链接展示

* fix: 调整我发起的工单的API字段

* fix: 移除工单申请表单的非必选字段

* fix: 修正创建密码匣子时表单错误

* fix: 调整申请应用时推荐应用对应字段

* fix: 移除旧版本请求

* fix: 优化内部变量写法

* fix: 干掉旧刷新方法

* fix: 优化写法

Co-authored-by: Orange <orangemtony@gmail.com>
2021-01-20 17:32:52 +08:00
fit2bot
cf810b3d3e revert: 回滚表格自定义列功能 (#594)
* revert: 回滚表格自定义列功能

* fix: 优化写法

Co-authored-by: Orange <orangemtony@gmail.com>
2021-01-20 17:12:04 +08:00
fit2bot
f58e37a76a feat: 添加批量测试资产可连接性功能 (#590)
* feat: 添加批量测试资产可连接性功能

* feat: 添加批量测试资产可连接性功能

Co-authored-by: Orange <orangemtony@gmail.com>
2021-01-20 14:56:03 +08:00
ibuler
5889e20aae fix(perms): 修复应用详情中移除系统用户的错误 2021-01-20 14:39:00 +08:00
fit2bot
7caa2c8264 fix: 禁止用户更新用户名与登录名相同选项 (#591)
* fix: 禁止用户更新用户名与登录名相同选项

Co-authored-by: Orange <orangemtony@gmail.com>
2021-01-20 11:27:29 +08:00
Jiangjie.Bai
865388dedc Merge pull request #589 from jumpserver/dev
Dev
2021-01-19 19:52:52 +08:00
Orange
35c1077eed fix: 修复新版工单的Bugs 2021-01-19 19:50:35 +08:00
Orange
487e199995 fix: 修复资产列表无克隆创建的bug 2021-01-19 03:31:23 -06:00
fit2bot
f584e96675 fix: 暂时移除应用的克隆创建 (#587)
Co-authored-by: Orange <orangemtony@gmail.com>
2021-01-19 17:29:17 +08:00
fit2bot
1f4f1d3712 fix: 调整Session过期检查 10mins -> 30s (#586)
* fix: 调整Session过期检查 10mins -> 30s

Co-authored-by: Orange <orangemtony@gmail.com>
2021-01-19 17:23:02 +08:00
fit2bot
08facb1eda fix: 添加WS链接类型 (#585)
* fix: 添加WS链接类型


Co-authored-by: Orange <orangemtony@gmail.com>
2021-01-19 17:12:52 +08:00
Jiangjie.Bai
34cb9424d4 Merge pull request #582 from jumpserver/dev
Dev
2021-01-17 17:59:42 +08:00
fit2bot
36767cd265 feat: 添加组织详情统计 (#580)
* feat: 添加组织详情统计

* feat: 添加组织详情统计

Co-authored-by: Orange <orangemtony@gmail.com>
2021-01-13 20:48:25 +08:00
Orange
86b9fc8f5a fix: 修复工单详情问题 2021-01-13 19:05:50 +08:00
Orange
49054e5dc0 fix: 修复工单详情问题 2021-01-13 19:05:50 +08:00
Orange
bac7cef23c fix: 修复工单详情问题 2021-01-13 19:05:50 +08:00
Orange
4013ea6212 fix: 修复表单生成问题 2021-01-13 18:51:13 +08:00
Orange
37153ebe1d fix: 修复用户界面加载问题 2021-01-13 18:41:51 +08:00
Orange
da35d9be25 修改版权时间 2021-01-12 17:16:33 +08:00
Orange
c3c24b0ad1 feat: 创建资产授权时按协议过滤资产 2021-01-12 17:16:17 +08:00
Orange
98da517724 fix: 移除命令过滤规则的克隆功能 2021-01-12 17:16:04 +08:00
Orange
f002c7f917 feat: 优化重构工单 2021-01-12 15:07:42 +08:00
Orange
0d4e4324ce feat: 重构申请工单系统 2021-01-12 15:07:42 +08:00
Orange
fdeab46970 feat: 重构申请工单系统 2021-01-12 15:07:42 +08:00
Orange
5acbdd5679 feat: 修改录像存储和会话存储接口 2021-01-12 15:07:25 +08:00
Orange
3a64120241 fix: 移除多余的Console.log 2021-01-12 15:04:31 +08:00
Orange
81d1cbf3a1 perf: 修复表格生成Error并记录页码数据 2021-01-12 15:04:31 +08:00
Orange
cec17bbef8 Merge pull request #537 from jumpserver/pr@dev@feat_custom_col_list
feat: 允许用户自定义表格列显示功能
2021-01-12 02:10:29 +08:00
Orange
fbc3373e1b Merge branch 'dev' into pr@dev@feat_custom_col_list 2021-01-12 02:10:02 +08:00
老广
b4a935ab15 Merge pull request #563 from jumpserver/pr@dev@fix_test_storage_notify
fix: 统一测试存储时的命令提醒
2021-01-06 14:33:14 +08:00
老广
7fbff42067 Merge pull request #560 from jumpserver/pr@dev@fix_remove_unuse_func
fix: 移除未使用的函数
2021-01-06 14:08:36 +08:00
老广
5077fec5a8 Merge pull request #564 from jumpserver/pr@dev@fix_create_ticeket
fix: 修复创建工单提示信息
2021-01-06 11:20:27 +08:00
老广
c4619af96f Merge pull request #566 from jumpserver/pr@dev@fix_tree_rightclick
fix: 修复资产树超过屏幕,右键菜单显示不全问题
2021-01-06 11:03:30 +08:00
Orange
025d0abeae fix: 修复资产树超过屏幕,右键菜单显示不全问题 2021-01-05 16:45:22 +08:00
Orange
5735a591ba feat: 允许用户自定义表格列显示功能 2020-12-30 20:08:58 +08:00
Orange
3b664ee1dc feat: 允许用户自定义表格列显示功能 2020-12-30 19:59:23 +08:00
Orange
a3f6de330e fix: 修复创建工单提示信息 2020-12-25 11:15:14 +08:00
Orange
cbc67a5a4c fix: 统一测试存储时的命令提醒 2020-12-23 15:53:44 +08:00
Orange
dec0593907 fix: 移除未使用的函数 2020-12-21 18:23:23 +08:00
Orange
1ed432b1e2 feat: 添加资产编号字段 2020-12-21 14:32:24 +08:00
Jiangjie.Bai
b65664f9c4 Merge pull request #557 from jumpserver/dev
Merge Dev
2020-12-17 18:13:49 +08:00
Orange
f64def0bec fix: 修改箭头颜色 2020-12-17 18:13:09 +08:00
Orange
06f6202bc4 fix: Filter使用后端搜索 2020-12-17 18:13:09 +08:00
Jiangjie.Bai
6fa7800d6b Merge pull request #554 from jumpserver/dev
Chore: Merge Dev
2020-12-17 15:14:11 +08:00
ibuler
54aa252c20 fix(some): 修复没有clone的列表 2020-12-17 15:12:53 +08:00
ibuler
c083f6c4a4 fix(clone): 修复一下clone丢失的问题 2020-12-17 15:12:53 +08:00
Orange
73bb854ebb fix: 去除批量移除, 去除简单写法 2020-12-17 15:03:28 +08:00
Orange
d6f9df277e fix: 修复样式异常和Bug 2020-12-17 15:03:28 +08:00
Jiangjie.Bai
ba78e33f89 Merge pull request #551 from jumpserver/dev
chore: Merge master from dev
2020-12-16 18:42:40 +08:00
Orange
09ef15cff0 fix: 修复工单提示报错 2020-12-16 17:54:38 +08:00
Orange
62d520e625 fix: 修复工单提示报错 2020-12-16 17:54:38 +08:00
Orange
f07a857813 fix: 修复命令过滤器添加系统用户问题 2020-12-16 17:54:38 +08:00
Orange
2699d5e8eb fix: 禁用命令存储文档类型修改 2020-12-16 17:54:38 +08:00
Orange
fb398ca3e4 调整页面errorMessage 2020-12-16 17:54:38 +08:00
Orange
3230c37318 fix: 调整页面保存设置, 优化页面Bug 2020-12-16 17:54:38 +08:00
Jiangjie.Bai
bc258a7ff8 Merge pull request #549 from jumpserver/dev
chore: Merge master from dev
2020-12-15 20:33:14 +08:00
Orange
64d610e282 fix: 修改系统监控页面 2020-12-15 20:32:04 +08:00
Orange
4d95461b5c fix: 添加组件负载状态 2020-12-15 20:32:04 +08:00
Orange
f364c8fdf9 fix: 批量修复2.6版本测试产生的Bug 2020-12-15 20:32:04 +08:00
Orange
88dc2d9271 Merge pull request #547 from jumpserver/dev
fix: 批量修复2.6版本测试产生的Bug
2020-12-14 19:05:38 +08:00
Orange
3aced25da4 fix: 批量修复2.6版本测试产生的Bug 2020-12-14 19:00:16 +08:00
老广
fcf142b696 Merge pull request #544 from jumpserver/dev
Dev
2020-12-11 19:33:54 +08:00
fit2bot
2123037897 fix: 添加组件总量显示 (#543)
Co-authored-by: Orange <orangemtony@gmail.com>
2020-12-11 19:30:58 +08:00
Orange
f5bc2842ec fix: 修复日期显示问题及用户应用授权更新路由问题 2020-12-11 19:28:26 +08:00
Orange
2c95e5f10b fix: 移除中断心跳间隔设置并添加认证方式字段 2020-12-11 19:28:08 +08:00
Jiangjie.Bai
b3ff9c5bcb Merge pull request #539 from jumpserver/dev
chore(merge): dev 合并到 master
2020-12-10 23:47:30 +08:00
Orange
905e5e00b1 fix: 去掉多余JS引用 2020-12-10 23:43:43 +08:00
Orange
81db3d86fa feat: 添加系统监控页面 2020-12-10 23:43:43 +08:00
Orange
ea15515264 feat: 系统用户详情页面增加资产分页面,增加指定资产推送功能 2020-12-10 20:54:14 +08:00
fit2bot
4048a000c7 feat: 添加表格过滤字段选项 (#527)
* feat: 添加表格过滤字段选项

* fix: 如果已有Filter的情况下去掉过滤

Co-authored-by: Orange <orangemtony@gmail.com>
2020-12-10 17:52:12 +08:00
xinwen
a60693c41c perf(asset): 资产树,右击增加计算节点数量的菜单,可以让后台去计算 #527 2020-12-10 17:51:10 +08:00
Orange
06d6c54db8 feat: 允许用户自定义表格列显示功能 2020-12-10 14:26:17 +08:00
fit2bot
57d5c893d3 fix: 修复自动生成表格字段冲突问题 (#536)
Co-authored-by: Orange <orangemtony@gmail.com>
2020-12-09 16:32:52 +08:00
fit2bot
435ce24c75 fix: 修复删除source字段引起的无法更新密码的问题 (#534)
Co-authored-by: Orange <orangemtony@gmail.com>
2020-12-09 16:21:59 +08:00
Orange
4a757bb6bc fix: 不允许用户修改source字段 2020-12-08 20:56:11 +08:00
fit2bot
32fa4f0b11 feat: 资产允许编辑更多信息 (#530)
* feat: 资产允许编辑更多信息

* feat: 资产允许编辑更多资产信息

* feat: 资产允许编辑更多资产信息

* fix: 修改组件名称

Co-authored-by: Orange <orangemtony@gmail.com>
2020-12-08 20:25:54 +08:00
Orange
9f12e1aa18 perf: 禁用应用的导入导出 2020-12-08 11:12:00 +08:00
jym503558564
6165709747 perf(assetBatchOperation): 资产模块添加批量删除操作 2020-12-08 11:10:15 +08:00
fit2bot
0ad1eef196 feat: 添加xlsx格式支持 (#526)
* feat: 添加xlsx格式支持

* feat: 添加xlsx格式支持

* feat: 添加xlsx格式支持

* feat: 添加xlsx格式支持

Co-authored-by: Orange <orangemtony@gmail.com>
2020-12-07 15:22:56 +08:00
Orange
d2d07555b5 fix: 修复批量更新终端存储时附带的保存并继续添加 2020-12-07 14:06:48 +08:00
Orange
7f60224c6d fix: 修复会话时间显示问题 2020-12-07 14:04:26 +08:00
Orange
bbf502c85d fix: 调整select2组件默认长度 2020-12-07 14:03:30 +08:00
Orange
e6aaa52506 perf: 恢复Web终端入口 2020-11-26 12:38:28 +08:00
ibuler
70affacfde fix(list): 修复列表克隆的bug 2020-11-26 12:37:28 +08:00
Orange
40a8da5e58 fix: 修复批量更新组件的问题 2020-11-23 14:00:34 +08:00
Orange
24266bb929 fix: 修复批量批量更新组件的问题 2020-11-22 16:53:01 +08:00
680 changed files with 35607 additions and 11493 deletions

View File

@@ -1,3 +1,4 @@
lina
dist
node_modules
.git

View File

@@ -1,8 +1,6 @@
# 全局环境变量 请勿随意改动
ENV = 'development'
# base api
VUE_APP_BASE_API = ''
VUE_APP_PUBLIC_PATH = '/ui/'
@@ -23,4 +21,5 @@ VUE_APP_LOGOUT_PATH = '/core/auth/logout/'
# Dev server for core proxy
VUE_APP_CORE_HOST = 'http://localhost:8080'
VUE_APP_CORE_WS = 'ws://localhost:8080'
VUE_APP_ENV = 'development'

1
.gitignore vendored
View File

@@ -15,3 +15,4 @@ tests/**/coverage/
*.ntvs*
*.njsproj
*.sln
.env.development

View File

@@ -1,9 +1,7 @@
FROM node:10 as stage-build
ARG VERSION
ENV VERSION=$VERSION
ARG NPM_REGISTRY="https://registry.npm.taobao.org"
ARG NPM_REGISTRY="https://registry.npmmirror.com"
ENV NPM_REGISTY=$NPM_REGISTRY
ARG SASS_BINARY_SITE="https://npm.taobao.org/mirrors/node-sass"
ARG SASS_BINARY_SITE="https://npmmirror.com/mirrors/node-sass"
ENV SASS_BINARY_SITE=$SASS_BINARY_SITE
WORKDIR /data
@@ -12,9 +10,11 @@ RUN npm config set sass_binary_site=${SASS_BINARY_SITE}
RUN npm config set registry ${NPM_REGISTRY}
RUN yarn config set registry ${NPM_REGISTRY}
COPY package.json yarn.lock /data/
COPY utils /data/utils/
RUN ls && cd utils && bash -xieu build.sh dep
RUN yarn install
RUN npm rebuild node-sass
ARG VERSION
ENV VERSION=$VERSION
ADD . /data
RUN cd utils && bash -xieu build.sh build

837
LICENSE
View File

@@ -1,281 +1,622 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Version 3, 29 June 2007
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
TERMS AND CONDITIONS
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
0. Definitions.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
"This License" refers to version 3 of the GNU General Public License.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
A "covered work" means either the unmodified Program or a work based
on the Program.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
1. Source Code.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
The Corresponding Source for a work in source code form is that
same work.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
2. Basic Permissions.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
13. Use with the GNU Affero General Public License.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
14. Revised Versions of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
NO WARRANTY
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
15. Disclaimer of Warranty.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
@@ -287,15 +628,15 @@ free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{description}
Copyright (C) {year} {fullname}
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@@ -303,37 +644,31 @@ the "copyright" line and a pointer to where the full notice is found.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
{signature of Ty Coon}, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@@ -19,7 +19,7 @@ VUE_APP_CORE_HOST = 'JUMPSERVER_APIHOST'
$ yarn serve
4. 构建
$ yarn build
$ yarn build:prod
```
## 生产中部署
@@ -46,12 +46,4 @@ server {
## License & Copyright
Copyright (c) 2014-2020 飞致云 FIT2CLOUD, All rights reserved.
Licensed under The GNU General Public License version 2 (GPLv2) (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.gnu.org/licenses/gpl-2.0.html
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Be consistent with [jumpserver](https://github.com/jumpserver/jumpserver)

View File

@@ -1,5 +1,8 @@
module.exports = {
presets: [
'@vue/app'
],
plugins: [
'@babel/plugin-proposal-optional-chaining',
]
}

View File

@@ -24,9 +24,9 @@ if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
)
app.listen(port, function () {
console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`))
// debug(chalk.green(`> Preview at http://localhost:${port}${publicPath}`))
if (report) {
console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`))
// debug(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`))
}
})

View File

@@ -56,7 +56,7 @@ const responseFake = (url, type, respond) => {
url: new RegExp(`${process.env.VUE_APP_BASE_API}${url}`),
type: type || 'get',
response(req, res) {
console.log('request invoke:' + req.path)
// debug('request invoke:' + req.path)
res.json(Mock.mock(respond instanceof Function ? respond(req, res) : respond))
}
}

View File

@@ -59,9 +59,9 @@ module.exports = app => {
mockRoutesLength = mockRoutes.mockRoutesLength
mockStartIndex = mockRoutes.mockStartIndex
console.log(chalk.magentaBright(`\n > Mock Server hot reload success! changed ${path}`))
// debug(chalk.magentaBright(`\n > Mock Server hot reload success! changed ${path}`))
} catch (error) {
console.log(chalk.redBright(error))
// debug(chalk.redBright(error))
}
}
})

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

@@ -1,6 +1,16 @@
server {
listen 80;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
#gzip_http_version 1.0;
gzip_comp_level 8;
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
gzip_vary off;
gzip_static on;
gzip_disable "MSIE [1-6].";
location /ui/ {
try_files $uri / /ui/index.html;
alias /opt/lina/;

View File

@@ -15,21 +15,30 @@
"test:ci": "npm run lint && npm run test:unit",
"svgo": "svgo -f src/icons/svg --config=src/icas/svgo.yml",
"vue-i18n-extract": "vue-i18n-extract",
"vue-i18n-report": "vue-i18n-extract report -v './src/**/*.?(js|vue)' -l './src/i18n/langs/**/*.json'"
"vue-i18n-report": "vue-i18n-extract report -v './src/**/*.?(js|vue)' -l './src/i18n/langs/**/*.json'",
"vue-i18n-report-json": "vue-i18n-extract report -v './src/**/*.?(js|vue)' -l './src/i18n/langs/**/*.json' -o /tmp/abc.json",
"vue-i18n-report-add-miss": "vue-i18n-extract report -v './src/**/*.?(js|vue)' -l './src/i18n/langs/**/*.json' -a"
},
"dependencies": {
"@babel/plugin-proposal-optional-chaining": "^7.13.12",
"@ztree/ztree_v3": "3.5.44",
"axios": "0.18.1",
"axios": "0.21.1",
"axios-retry": "^3.1.9",
"cron-parser": "^4.0.0",
"crypto-js": "^4.1.1",
"css-color-function": "^1.3.3",
"deepmerge": "^4.2.2",
"echarts": "^4.7.0",
"element-ui": "2.13.2",
"eslint-plugin-html": "^6.0.0",
"install": "^0.13.0",
"jquery": "^3.5.0",
"js-cookie": "2.2.0",
"jsencrypt": "^3.2.1",
"krry-transfer": "^1.7.3",
"less": "^3.10.3",
"less-loader": "^5.0.0",
"lodash": "^4.17.15",
"lodash": "^4.17.21",
"lodash.clonedeep": "^4.5.0",
"lodash.frompairs": "^4.0.1",
"lodash.get": "^4.4.2",
@@ -41,8 +50,10 @@
"lodash.set": "^4.3.2",
"lodash.topairs": "^4.3.0",
"lodash.values": "^4.3.0",
"moment-parseformat": "^3.0.0",
"moment": "^2.29.4",
"moment-parseformat": "^4.0.0",
"normalize.css": "7.0.0",
"npm": "^7.8.0",
"nprogress": "0.2.0",
"path-to-regexp": "2.4.0",
"vue": "2.6.10",
@@ -50,6 +61,7 @@
"vue-cookie": "^1.1.4",
"vue-echarts": "^5.0.0-beta.0",
"vue-i18n": "^8.15.5",
"vue-json-editor": "^1.4.3",
"vue-moment": "^4.1.0",
"vue-password-strength-meter": "^1.7.2",
"vue-router": "3.0.6",
@@ -73,6 +85,7 @@
"babel-eslint": "10.0.1",
"babel-jest": "23.6.0",
"chalk": "2.4.2",
"compression-webpack-plugin": "^6.1.1",
"connect": "3.6.6",
"element-theme-chalk": "^2.13.1",
"eslint": "^5.15.3",
@@ -84,7 +97,7 @@
"lint-staged": "^10.1.2",
"mockjs": "1.0.1-beta3",
"runjs": "^4.3.2",
"sass": "^1.26.10",
"sass": "~1.32.6",
"sass-loader": "^7.1.0",
"script-ext-html-webpack-plugin": "2.1.3",
"script-loader": "0.7.2",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -8,8 +8,8 @@
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Cache" content="no-cache">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= webpackConfig.name %></title>
<link rel="stylesheet" href="<%= BASE_URL %>theme/element-ui.css">
</head>
<body>
<noscript>

23
public/theme/README.md Normal file
View File

@@ -0,0 +1,23 @@
# 主题颜色
```
alpha-1: "rgba(64, 158, 255, 0.1)"
alpha-2: "rgba(64, 158, 255, 0.2)"
alpha-3: "rgba(64, 158, 255, 0.3)"
alpha-4: "rgba(64, 158, 255, 0.4)"
alpha-5: "rgba(64, 158, 255, 0.5)"
alpha-6: "rgba(64, 158, 255, 0.6)"
alpha-7: "rgba(64, 158, 255, 0.7)"
alpha-8: "rgba(64, 158, 255, 0.8)"
alpha-9: "rgba(64, 158, 255, 0.9)"
light-1: "#53a8ff"
light-2: "#66b1ff"
light-3: "#79bbff"
light-4: "#8cc5ff"
light-5: "#a0cfff"
light-6: "#b3d8ff"
light-7: "#c6e2ff"
light-8: "#d9ecff"
light-9: "#ecf5ff"
primary: "#409EFF"
```
primary是初始主题颜色其他颜色均属于primary的系列颜色

View File

@@ -1,63 +1,84 @@
// cover some element-ui styles
/* 这里只写element-variables里面改不动的、且和主题系列颜色相关的样式 */
/* 主题相关看该文件夹下的README.md */
/* info type special treatment */
.el-button--info {
background-color: info;
border-color: info;
}
.el-button--text {
padding: 5px
}
.el-button--text:hover {
background-color: rgba(0, 0, 0, .05);
}
.el-button--success {
background-color: success;
border-color: success;
}
.el-alert--info.is-light {
background-color: light-9;
color: light-2;
border: 1px solid;
}
.el-alert--info .el-alert__description {
color: light-2;
}
.el-pagination.is-background .el-pager li:not(.disabled):hover {
color: white;
background-color: primary;
}
.el-pagination.is-background .btn-next,
.el-pagination.is-background .btn-prev,
.el-pagination.is-background .el-pager li {
margin: 0 5px;
background-color: white;
color: #606266;
min-width: 28px;
border-radius: 2px;
border: 1px solid #DCDFE6;
font-size: 12px;
line-height: 26px;
font-weight: 400;
}
.el-breadcrumb__inner,
.el-breadcrumb__inner a {
font-weight: 400 !important;
}
$--color-primary: #1ab394;
$--color-success: #1c84c6;
$--color-info: #23c6c8;
$--color-warning: #f8ac59;
$--color-danger: #ed5565;
$--color-text-primary: #303133;
/// color|1|Font Color|2
$--color-text-regular: #606266;
.el-upload {
input[type="file"] {
display: none !important;
}
.el-upload input[type="file"] {
display: none !important;
}
.el-upload__input {
display: none;
}
// to fixed https://github.com/ElemeFE/element/issues/2461
.el-dialog {
transform: none;
left: 0;
position: relative;
margin: 0 auto;
}
// refine element ui upload
.upload-container {
.el-upload {
.upload-container .el-upload {
width: 100%;
.el-upload-dragger {
width: 100%;
height: 200px;
}
}
}
// dropdown
.el-dropdown-menu {
a {
display: block
}
.upload-container .el-upload .el-upload-dragger {
width: 100%;
height: 200px;
}
.el-dropdown-menu a {
display: block
}
.el-table th > .cell {
color: rgb(104, 106, 108);
}
// to fix el-date-picker css style
.el-range-separator {
box-sizing: content-box;
}
@@ -108,22 +129,6 @@ td .el-button.el-button--mini {
border-left-color: rgb(220, 223, 230);
}
.el-alert--success.is-light {
border: #bce8f1 solid 1px;
}
.el-alert--info.is-light {
border: #bce8f1 solid 1px;
}
.el-alert--warning.is-light {
border: #faebcc solid 1px;
}
.el-alert--error.is-light {
border: #f1dfe2 solid 1px;
}
.el-alert__content {
line-height: 1.5;
}
@@ -137,32 +142,32 @@ td .el-button.el-button--mini {
}
.el-card.primary > .el-card__header {
background-color: $--color-primary;
border-color: $--color-primary;
background-color: primary;
border-color: primary;
color: white;
}
.el-card.success > .el-card__header {
background-color: $--color-success;
border-color: $--color-success;
background-color: success;
border-color: success;
color: #ffffff;
}
.el-card.info > .el-card__header {
background-color: $--color-info;
border-color: $--color-info;
background-color: info;
border-color: info;
color: #ffffff;
}
.el-card.warning > .el-card__header {
background-color: $--color-warning;
border-color: $--color-warning;
background-color: warning;
border-color: warning;
color: #ffffff;
}
.el-card.danger > .el-card__header {
background-color: $--color-danger;
border-color: $--color-danger;
background-color: danger;
border-color: danger;
color: #ffffff;
}
@@ -189,28 +194,14 @@ td .el-button.el-button--mini {
line-height: 34px;
}
.el-select-dropdown__item.selected {
font-weight: 400;
color: $--color-text-primary;
background-color: #ddd;
}
.el-select-dropdown.is-multiple .el-select-dropdown__item.selected {
color: #606266;
background-color: #ddd;
font-weight: 400;
}
//.el-select-dropdown.is-multiple .el-select-dropdown__item.selected {
// color: #606266;
// background-color: #ddd;
// font-weight: 400;
//}
.el-select-dropdown__item.hover, .el-select-dropdown__item:hover {
background-color: $--color-primary;
.el-select-dropdown__item.hover {
background-color: primary;
color: white;
}
@@ -219,27 +210,27 @@ td .el-button.el-button--mini {
}
.el-select-dropdown.is-multiple .el-select-dropdown__item.selected::after {
color: $--color-primary;
color: primary;
}
.el-select-dropdown.is-multiple .el-select-dropdown__item.selected.hover {
color: white;
background-color: $--color-primary;
background-color: primary;
}
.el-tag.el-tag--info {
background-color: #f1f1f1;
border-color: #e5e6e7;
color: #333333;
background-color: #f1f1f1!important;
border-color: #e5e6e7!important;
color: #333333!important;
}
.el-tag.el-tag--info .el-tag__close {
color: #333333;
color: #333333!important;
background-color: inherit;
}
.el-tag.el-tag--info.is-hit {
border-color: #e5e6e7;
border-color: #e5e6e7!important;
}
.el-tag.el-tag--info .el-tag__close:hover {
@@ -257,119 +248,61 @@ td .el-button.el-button--mini {
}
.text-danger {
color: $--color-danger;
color: danger;
}
.text-primary {
color: $--color-primary;
color: primary;
}
.text-info {
color: $--color-info;
color: info;
}
.text-warning {
color: $--color-warning;
color: warning;
}
.text-success {
color: $--color-success;
color: success;
}
.el-radio__input.is-checked+.el-radio__label {
color: inherit;
}
.el-radio__input.is-checked .el-radio__inner {
border-color: #409EFF;
background-color: #409EFF;
}
.el-checkbox__input.is-checked .el-checkbox__inner {
border-color: #409EFF;
background-color: #409EFF;
}
.el-radio__inner:hover {
border-color: #409EFF;
}
.el-textarea__inner {
border-radius: 0;
}
.el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner {
border-color: #409EFF;
background-color: #409EFF;
}
.el-checkbox__input.is-checked+.el-checkbox__label {
color: #606266;
}
.el-checkbox__inner:hover {
border-color: #409EFF;
}
.el-checkbox__input.is-focus .el-checkbox__inner {
border-color: #409EFF;
}
.el-pagination.is-background .btn-next, .el-pagination.is-background .btn-prev, .el-pagination.is-background .el-pager li {
margin: 0 5px;
background-color: white;
color: #606266;
min-width: 28px;
border-radius: 2px;
border: 1px solid #DCDFE6;
font-size: 12px;
line-height: 26px;
font-weight: 400;
}
.el-pagination.is-background .el-pager li:not(.disabled):hover {
color: white;
background-color: $--color-primary;
}
.el-pagination.is-background .number {
padding: 0;
}
.el-card.primary .el-card__header {
background-color: primary;
}
.el-card.success .el-card__header {
background-color: success;
}
.el-card.info .el-card__header {
background-color: info;
}
.el-card.warning .el-card__header {
background-color: warning;
}
.el-card.danger .el-card__header {
background-color: danger;
}
.el-message-box__headerbtn .el-message-box__close {
color: #606266;
}
.el-card.primary {
.el-card__header {
background-color: $--color-primary;
}
}
.el-card.success {
.el-card__header {
background-color: $--color-success;
}
}
.el-card.info {
.el-card__header {
background-color: $--color-info;
}
}
.el-card.warning {
.el-card__header {
background-color: $--color-warning;
}
}
.el-card.danger {
.el-card__header {
background-color: $--color-danger;
}
}
.el-tooltip__popper.is-light {
background: #FFF;
border: 1px solid #e7eaec;
@@ -388,21 +321,13 @@ td .el-button.el-button--mini {
border-bottom: 1px solid #e7e7e7 !important;
}
.el-table .cell, .el-table--border td:first-child .cell, .el-table--border th:first-child .cell {
.el-table .cell,
.el-table--border td:first-child .cell,
.el-table--border th:first-child .cell {
padding-left: 10px;
padding-right: 14px;
}
.el-tag--dark.el-tag--info {
background-color: #23c6c8;
border-color: #23c6c8;
color: #fff;
}
a {
color: #428bca !important;
text-decoration: none;
}
.el-tag--default.el-tag--dark {
background-color: #d1dade;
@@ -414,7 +339,6 @@ a {
color: #676a6c;
}
.el-table__empty-block {
width: 100% !important;
}
@@ -430,27 +354,101 @@ a {
color: #000;
font-size: 22px;
font-weight: 800;
//color: red;
}
.el-tag--default.el-tag--dark {
background-color: #d1dade;
color: #5e5e5e;
border: none;
}
.el-card {
color: #676a6c;
}
.el-table__empty-block {
width: 100% !important;
}
.el-dialog__headerbtn .el-dialog__close {
font-size: 21px;
font-weight: 700;
color: #000;
text-shadow: 0 1px 0 #fff;
}
.el-dialog__headerbtn:focus .el-dialog__close, .el-dialog__headerbtn:hover .el-dialog__close {
color: #000;
font-size: 22px;
font-weight: 800;
}
.el-button--danger.is-plain {
color: $--color-danger;
color: danger;
background: #ffffff;
border-color: $--color-danger;
border-color: danger;
}
.el-button--danger.is-plain.is-disabled,
.el-button--danger.is-plain.is-disabled:active,
.el-button--danger.is-plain.is-disabled:focus,
.el-button--danger.is-plain.is-disabled:hover {
color: white;
}
.el-alert .el-alert__description {
margin: 1px 0 0;
}
.el-input-group__prepend div.el-select .el-input__inner {
color: $--color-text-primary;
}
.el-input-group__prepend div.el-select .el-input__inner:hover {
color: $--color-text-primary;
}
.el-table {
font-size: 13px;
}
.el-dialog {
position: absolute;
top: 50%;
left: 50%;
margin: 0 !important;
transform: translate(-50%, -50%);
max-height: calc(100% - 30px);
max-width: calc(100% - 30px);
display: flex;
flex-direction: column;
}
.el-dialog .el-dialog__body {
max-height: 90vh;
overflow: auto;
padding: 30px;
}
.el-dialog .el-dialog__body form {
padding-right: 20px;
}
.el-dialog .el-dialog__footer {
padding: 10px 30px 30px;
}
.el-cascader {
line-height: 34px;
}
.el-input__icon {
line-height: 34px;
}
.el-checkbox__input.is-checked+.el-checkbox__label {
color: #606266;
}
.el-select-dropdown__item.selected {
font-weight: 400;
color: #606266;
background-color: #ddd;
}
.el-input-group__prepend div.el-select .el-input__inner,
.el-input-group__prepend div.el-select .el-input__inner:hover {
color: #303133;
}

File diff suppressed because one or more lines are too long

View File

@@ -9,3 +9,6 @@ export default {
name: 'App'
}
</script>
<style>
</style>

View File

@@ -1,8 +1,8 @@
import request from '@/utils/request'
export function postInterface(formData) {
export function updateInterface(formData) {
return request({
url: '/api/v1/xpack/interface/setting',
url: '/api/v1/xpack/interface/setting/',
method: 'put',
headers: {
'Content-Type': 'multipart/form-data'
@@ -12,15 +12,15 @@ export function postInterface(formData) {
}
export function getInterfaceInfo() {
return request({
url: '/api/v1/xpack/interface/setting',
url: '/api/v1/xpack/interface/setting/',
method: 'get'
})
}
export function restoreInterface() {
return request({
url: '/api/v1/xpack/interface/restore',
method: 'get'
url: '/api/v1/xpack/interface/setting/restore/',
method: 'put'
})
}
@@ -34,3 +34,10 @@ export function importLicense(formData) {
data: formData
})
}
export function previewThemes() {
return request({
url: `/api/v1/xpack/interface/setting/themes/`,
method: 'get'
})
}

21
src/api/orgs.js Normal file
View File

@@ -0,0 +1,21 @@
import request from '@/utils/request'
export function getOrgDetail(oid) {
return request({
url: `/api/v1/orgs/orgs/current/?oid=${oid}`,
method: 'get'
})
}
export function getCurrentOrg() {
return request({
url: `/api/v1/orgs/orgs/current/`,
method: 'get'
})
}
export default {
getCurrentOrg,
getOrgDetail
}

View File

@@ -57,6 +57,26 @@ export function TestReplayStorage(id) {
})
}
function SetToDefaultStorage(url) {
return request({
url: url,
method: 'patch',
data: { 'is_default': true }
})
}
export function SetToDefaultCommandStorage(id) {
return SetToDefaultStorage(
`/api/v1/terminal/command-storages/${id}/`,
)
}
export function SetToDefaultReplayStorage(id) {
return SetToDefaultStorage(
`/api/v1/terminal/replay-storages/${id}/`,
)
}
export function getReplayStorage(id) {
return request({
url: `/api/v1/terminal/replay-storages/${id}/`,

View File

@@ -51,7 +51,7 @@ export function refreshLdapUserCache() {
})
}
export function StartLdapUserCache() {
export function startLdapUserCache() {
return request({
disableFlashErrorMsg: true,
url: '/api/v1/settings/ldap/users/?cache_police=1',
@@ -68,15 +68,21 @@ export function importLdapUser(data) {
})
}
export function getPublicSettings() {
export function getPublicSettings(isOpen) {
let url
if (isOpen) {
url = '/api/v1/settings/public/open/'
} else {
url = '/api/v1/settings/public/'
}
return request({
url: '/api/v1/settings/public/',
url: url,
method: 'get'
})
}
export function getLogo() {
return request({
url: '/api/v1/xpack/interface/setting',
url: '/api/v1/xpack/interface/setting/',
method: 'get'
})
}

View File

@@ -2,7 +2,7 @@ import request from '@/utils/request'
export function getTicketOpenCount(assign) {
return request({
url: `/api/v1/tickets/tickets/?assign=${assign}&status=open&offset=0&limit=15&display=1&draw=1/`,
url: `/api/v1/tickets/tickets/?assignees__id=${assign}&status=open&offset=0&limit=15&display=1&draw=1/`,
method: 'get'
})
}

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

BIN
src/assets/img/header-profile.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -0,0 +1,156 @@
<template>
<div>
<GenericListPage :table-config="tableConfig" :header-actions="headerActions" :help-message="title" />
<ShowSecretInfo v-if="showViewSecretDialog" :visible.sync="showViewSecretDialog" :account="account" />
</div>
</template>
<script>
import { ActionsFormatter, DetailFormatter, DisplayFormatter } from '@/components/TableFormatters'
import ShowSecretInfo from '../AccountListTable/ShowSecretInfo'
import { GenericListPage } from '@/layout/components'
export default {
name: 'AccountHistoryTable',
components: {
GenericListPage,
ShowSecretInfo
},
props: {
url: {
type: String,
required: true
},
exportUrl: {
type: String,
default() {
return this.url.replace('/assets/accounts-history/', '/assets/account-history-secrets/')
}
},
hasLeftActions: {
type: Boolean,
default: false
},
otherActions: {
type: Array,
default: null
},
hasClone: {
type: Boolean,
default: false
}
},
data() {
const vm = this
return {
showViewSecretDialog: false,
account: {},
tableConfig: {
url: this.url,
permissions: {
app: 'assets',
resource: 'authbook'
},
columns: [
'hostname', 'ip', 'username', 'version',
'systemuser', 'date_created', 'date_updated', 'actions'
],
columnsShow: {
min: ['username', 'actions'],
default: ['hostname', 'ip', 'username', 'version', 'actions']
},
columnsMeta: {
hostname: {
prop: 'hostname',
label: this.$t('assets.Hostname'),
showOverflowTooltip: true,
formatter: DetailFormatter,
formatterArgs: {
can: this.$hasPerm('assets.view_asset'),
getRoute({ row }) {
return {
name: 'AssetDetail',
params: { id: row.asset }
}
}
}
},
ip: {
width: '120px'
},
username: {
showOverflowTooltip: true
},
systemuser: {
formatter: DisplayFormatter
},
version: {
width: '70px'
},
actions: {
formatter: ActionsFormatter,
formatterArgs: {
hasUpdate: false, // can set function(row, value)
hasDelete: false, // can set function(row, value)
hasClone: this.hasClone,
moreActionsTitle: this.$t('common.More'),
extraActions: [
{
name: 'View',
title: this.$t('common.View'),
can: this.$hasPerm('assets.view_assethistoryaccountsecret'),
type: 'primary',
callback: ({ row }) => {
vm.account = row
vm.showViewSecretDialog = true
}
}
]
}
}
}
},
headerActions: {
hasLeftActions: this.hasLeftActions,
hasMoreActions: false,
hasCreate: false,
hasImport: false,
hasExport: this.$hasPerm('assets.view_assethistoryaccountsecret'),
exportOptions: {
url: this.exportUrl,
mfaVerifyRequired: true
},
searchConfig: {
exclude: ['systemuser', 'asset']
},
hasSearch: true
}
}
},
computed: {
title() {
return this.$t('accounts.AccountHistableHelpMessage')
}
},
watch: {
url(iNew) {
this.$set(this.tableConfig, 'url', iNew)
this.$set(this.headerActions.exportOptions, 'url', iNew.replace('/accounts-history/', '/account-history-secrets/'))
}
},
mounted() {
if (this.otherActions) {
const actionColumn = this.tableConfig.columns[this.tableConfig.columns.length - 1]
for (const item of this.otherActions) {
actionColumn.formatterArgs.extraActions.push(item)
}
}
},
methods: {
}
}
</script>
<style lang='less' scoped>
</style>

View File

@@ -0,0 +1,83 @@
<template>
<div>
<UserConfirmDialog
:url="url"
@UserConfirmDone="getAuthInfo"
@UserConfirmCancel="exit"
/>
<Dialog
:title="dialogTitle"
:show-confirm="false"
:show-cancel="false"
:destroy-on-close="true"
:width="'50'"
:visible.sync="showAuthInfo"
v-bind="$attrs"
v-on="$listeners"
>
<div>
<el-form label-position="right" label-width="80px" :model="authInfo">
<el-form-item :label="this.$t('assets.Hostname')">
<el-input v-model="account.hostname" readonly />
</el-form-item>
<el-form-item :label="this.$t('assets.Username')">
<el-input v-model="account['username']" readonly />
</el-form-item>
<el-form-item :label="this.$t('assets.Password')">
<el-input v-model="authInfo.password" type="password" show-password />
</el-form-item>
<el-form-item :label="this.$t('users.SSHKey')">
<el-input v-model="authInfo['private_key']" class="item-textarea" type="textarea" show-password />
</el-form-item>
</el-form>
</div>
</Dialog>
</div>
</template>
<script>
import Dialog from '@/components/Dialog'
import UserConfirmDialog from '@/components/UserConfirmDialog'
export default {
name: 'ShowSecretInfo',
components: {
Dialog,
UserConfirmDialog
},
props: {
account: {
type: Object,
default: () => ({})
},
visible: {
type: Boolean,
default: false
}
},
data() {
return {
dialogTitle: this.$t('common.ViewSecret'),
authInfo: {},
showAuthInfo: false,
url: `/api/v1/assets/account-secrets/${this.account.id}/`
}
},
methods: {
getAuthInfo() {
this.$axios.get(this.url, { disableFlashErrorMsg: true }).then(resp => {
this.authInfo = resp
this.showAuthInfo = true
})
},
exit() {
this.$emit('update:visible', false)
}
}
}
</script>
<style scoped>
.item-textarea >>> .el-textarea__inner {
height: 110px;
}
</style>

View File

@@ -0,0 +1,98 @@
<template>
<Dialog
width="50"
:title="this.$t('assets.UpdateAssetUserToken')"
:visible.sync="visible"
:destroy-on-close="true"
@confirm="handleConfirm()"
@cancel="handleCancel()"
v-on="$listeners"
>
<el-form label-position="right" label-width="90px">
<el-form-item :label="this.$t('assets.Hostname')">
<el-input v-model="account.hostname" readonly />
</el-form-item>
<el-form-item :label="this.$t('assets.Username')">
<el-input v-model="account['username']" readonly />
</el-form-item>
<el-form-item :label="this.$t('assets.Password')">
<UpdateToken v-model="authInfo.password" />
</el-form-item>
<el-form-item :label="this.$t('assets.SSHSecretKey')">
<UploadKey @input="getFile" />
</el-form-item>
<el-form-item :label="this.$t('assets.Passphrase')">
<UpdateToken v-model="authInfo.passphrase" />
</el-form-item>
</el-form>
</Dialog>
</template>
<script>
import Dialog from '@/components/Dialog'
import { UpdateToken, UploadKey } from '@/components/FormFields'
import { encryptPassword } from '@/utils/crypto'
export default {
name: 'UpdateSecretInfo',
components: {
Dialog,
UploadKey,
UpdateToken
},
props: {
account: {
type: Object,
default: () => ({})
},
visible: {
type: Boolean,
default: false
}
},
data() {
return {
authInfo: {
password: '',
private_key: '',
passphrase: ''
}
}
},
methods: {
handleConfirm() {
const data = {}
if (this.authInfo.password !== '') {
data.password = encryptPassword(this.authInfo.password)
}
if (this.authInfo.private_key !== '') {
data.private_key = encryptPassword(this.authInfo.private_key)
if (this.authInfo.passphrase) data.passphrase = this.authInfo.passphrase
}
this.$axios.patch(
`/api/v1/assets/accounts/${this.account.id}/`,
data,
{ disableFlashErrorMsg: true }
).then(res => {
this.authInfo = { password: '', private_key: '' }
this.$message.success(this.$tc('common.updateSuccessMsg'))
this.$emit('updateAuthDone', res)
this.$emit('update:visible', false)
}).catch(err => {
const errMsg = Object.values(err.response.data).join(', ')
this.$message.error(this.$tc('common.updateErrorMsg') + ' ' + errMsg)
this.$emit('update:visible', true)
})
},
handleCancel() {
this.$emit('update:visible', false)
},
getFile(file) {
this.authInfo.private_key = file
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,36 @@
import { toSafeLocalDateStr } from '@/utils/common'
import ChoicesFormatter from '@/components/TableFormatters/ChoicesFormatter'
import i18n from '@/i18n/i18n'
export const connectivityMeta = {
label: i18n.t('assets.Reachable'),
formatter: ChoicesFormatter,
formatterArgs: {
iconChoices: {
ok: 'fa-check',
failed: 'fa-times',
unknown: 'fa-circle-o'
},
classChoices: {
ok: 'text-primary',
failed: 'text-danger',
unknown: 'text-warning'
},
hasTips: true,
getTips: ({ row, cellValue }) => {
const mapper = {
'ok': i18n.t('assets.Reachable'),
'failed': i18n.t('assets.Unreachable'),
'unknown': i18n.t('assets.Unknown')
}
let tips = mapper[cellValue]
if (row['date_verified']) {
const datetime = toSafeLocalDateStr(row['date_verified'])
tips += '<br> ' + datetime
}
return tips
}
},
width: '90px',
align: 'center'
}

View File

@@ -0,0 +1,213 @@
<template>
<div>
<ListTable ref="ListTable" :table-config="tableConfig" :header-actions="headerActions" />
<ShowSecretInfo v-if="showViewSecretDialog" :visible.sync="showViewSecretDialog" :account="account" />
<UpdateSecretInfo v-if="showUpdateSecretDialog" :visible.sync="showUpdateSecretDialog" :account="account" @updateAuthDone="onUpdateAuthDone" />
</div>
</template>
<script>
import ListTable from '@/components/ListTable/index'
import { ActionsFormatter, DetailFormatter, DisplayFormatter } from '@/components/TableFormatters'
import ShowSecretInfo from './ShowSecretInfo'
import UpdateSecretInfo from './UpdateSecretInfo'
import { connectivityMeta } from './const'
import { openTaskPage } from '@/utils/jms'
// import i18n from '@/i18n/i18n'
export default {
name: 'AccountListTable',
components: {
ListTable,
UpdateSecretInfo,
ShowSecretInfo
},
props: {
url: {
type: String,
required: true
},
exportUrl: {
type: String,
default() {
return this.url.replace('/assets/accounts/', '/assets/account-secrets/')
}
},
hasLeftActions: {
type: Boolean,
default: false
},
otherActions: {
type: Array,
default: null
},
hasClone: {
type: Boolean,
default: false
}
},
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'
],
columnsShow: {
min: ['username', 'actions'],
default: ['hostname', 'ip', 'username', 'version', 'actions']
},
columnsMeta: {
hostname: {
prop: 'hostname',
label: this.$t('assets.Hostname'),
showOverflowTooltip: true,
formatter: DetailFormatter,
formatterArgs: {
can: this.$hasPerm('assets.view_asset'),
getRoute({ row }) {
return {
name: 'AssetDetail',
params: { id: row.asset }
}
}
}
},
ip: {
width: '120px'
},
username: {
showOverflowTooltip: true
},
systemuser: {
formatter: DisplayFormatter
},
version: {
width: '70px'
},
connectivity: connectivityMeta,
actions: {
formatter: ActionsFormatter,
formatterArgs: {
hasUpdate: false, // can set function(row, value)
hasDelete: false, // can set function(row, value)
hasClone: this.hasClone,
moreActionsTitle: this.$t('common.More'),
extraActions: [
{
name: 'View',
title: this.$t('common.View'),
can: this.$hasPerm('assets.view_assetaccountsecret'),
type: 'primary',
callback: ({ row }) => {
vm.account = row
vm.showViewSecretDialog = false
setTimeout(() => {
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(() => {
this.$message.success(this.$tc('common.deleteSuccessMsg'))
this.$refs.ListTable.reloadTable()
})
}
},
{
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/`,
{ action: 'test' }
).then(res => {
openTaskPage(res['task'])
})
}
},
{
name: 'Update',
title: this.$t('common.Update'),
can: this.$hasPerm('assets.change_assetaccountsecret') && !this.$store.getters.currentOrgIsRoot,
callback: ({ row }) => {
vm.account = row
vm.showUpdateSecretDialog = false
setTimeout(() => {
vm.showUpdateSecretDialog = true
})
}
}
// {
// name: 'History',
// title: i18n.t('common.History'),
// can: this.$hasPerm('assets.view_assethistoryaccount') && !this.$store.getters.currentOrgIsRoot,
// callback: ({ row }) => {
// this.$router.push({
// name: 'AssetAccountHistoryList',
// query: { id: row.id }
// })
// }
// }
]
}
}
}
},
headerActions: {
hasLeftActions: this.hasLeftActions,
hasMoreActions: true,
hasCreate: false,
hasImport: false,
hasExport: this.$hasPerm('assets.view_assetaccountsecret'),
exportOptions: {
url: this.exportUrl,
mfaVerifyRequired: true
},
searchConfig: {
exclude: ['systemuser', 'asset']
},
hasSearch: true
}
}
},
watch: {
url(iNew) {
this.$set(this.tableConfig, 'url', iNew)
this.$set(this.headerActions.exportOptions, 'url', iNew.replace('/accounts/', '/account-secrets/'))
}
},
mounted() {
if (this.otherActions) {
const actionColumn = this.tableConfig.columns[this.tableConfig.columns.length - 1]
for (const item of this.otherActions) {
actionColumn.formatterArgs.extraActions.push(item)
}
}
},
methods: {
onUpdateAuthDone(account) {
Object.assign(this.account, account)
}
}
}
</script>
<style lang='less' scoped>
</style>

View File

@@ -1,40 +1,15 @@
<template>
<div :class="grouped ? 'el-button-group' : ''">
<el-button v-for="item in iActions" :key="item.name" :size="size" v-bind="item" @click="handleClick(item.name)">
<el-tooltip v-if="['actionExport', 'actionImport', 'actionRefresh'].indexOf(item.name) !== -1" effect="dark" :content="item.tip" placement="top">
<i v-if="item.fa" :class="'fa ' + item.fa" />{{ item.title }}
</el-tooltip>
<span v-else>
<i v-if="item.fa" :class="'fa ' + item.fa" />{{ item.title }}
</span>
</el-button>
<el-dropdown v-if="iMoreActions.length > 0" trigger="click" :placement="moreActionsPlacement" @command="handleClick">
<el-button :size="size" :type="moreActionsType" class="btn-more-actions">
{{ iMoreActionsTitle }}<i class="el-icon-arrow-down el-icon--right" />
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="item in iMoreActions" :key="item.name" :command="item.name" v-bind="item" @click="handleClick(item.name)">{{ item.title }} </el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
<DataActions :actions="iActions" v-bind="$attrs" />
</template>
<script>
import DataActions from '@/components/DataActions'
export default {
name: 'ActionsGroup',
components: {
DataActions
},
props: {
grouped: {
type: Boolean,
default: false
},
size: {
type: String,
default: 'small'
},
type: {
type: String,
default: ''
},
actions: {
type: Array,
default: () => []
@@ -61,79 +36,22 @@ export default {
},
computed: {
iActions() {
return this.cleanActions(this.actions)
},
iMoreActions() {
return this.cleanActions(this.moreActions)
},
totalActions() {
return [...this.actions, ...this.moreActions]
},
totalNamedActions() {
const actions = {}
for (const action of this.totalActions) {
if (!action || !action.hasOwnProperty('name')) {
continue
}
actions[action.name] = action
const actions = [...this.actions]
if (this.iMoreAction && this.iMoreAction.dropdown.length > 0) {
actions.push(this.iMoreAction)
}
return actions
},
iMoreAction() {
return {
name: 'moreActions',
title: this.iMoreActionsTitle,
dropdown: this.moreActions || []
}
},
iMoreActionsTitle() {
return this.moreActionsTitle || this.$t('common.MoreActions')
}
},
methods: {
handleClick(item) {
const action = this.totalNamedActions[item]
if (action && action.callback) {
action.callback(action)
} else {
this.$log.debug('No callback found')
}
this.$emit('actionClick', item)
},
checkItem(item, attr, defaults) {
if (!item) {
return true
}
let ok = item[attr]
if (ok && typeof ok === 'function') {
ok = ok(item)
} else if (ok == null) {
ok = defaults === undefined ? true : defaults
}
return ok
},
cleanActions(actions) {
const cleanedActions = []
const cloneActions = _.cloneDeep(actions)
for (const v of cloneActions) {
if (!v) {
continue
}
const action = Object.assign({}, v)
// 是否拥有这个action
const has = this.checkItem(action, 'has')
delete action['has']
if (!has) {
continue
}
// 是否有分割线
const divided = this.checkItem(action, 'divided', false)
delete action['divided']
action.divided = divided
// 是否是disabled
const can = this.checkItem(action, 'can')
delete action['can']
action.disabled = !can
cleanedActions.push(action)
// 删掉callback避免前台看到
delete action['callback']
}
return cleanedActions
}
}
}
</script>

View File

@@ -0,0 +1,71 @@
<template>
<el-alert
v-if="enabled && !isViewed()"
class="announcement"
type="success"
:center="false"
:title="title"
@close="onClose"
>
<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') }}
</el-link>
<i class="fa fa-external-link" />
</span>
</el-alert>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
name: 'Announcement',
data() {
return {
viewedKey: 'AnnouncementViewed'
}
},
computed: {
...mapGetters([
'publicSettings'
]),
announcement() {
const ann = this.publicSettings.ANNOUNCEMENT
return { id: ann['ID'], subject: ann['SUBJECT'], content: ann['CONTENT'], link: ann['LINK'] }
},
enabled() {
return this.publicSettings.ANNOUNCEMENT_ENABLED && (this.announcement.content || this.announcement.subject)
},
title() {
return this.$t('common.Announcement') + ': ' + this.announcement.subject
}
},
methods: {
onClose() {
localStorage.setItem(this.viewedKey, this.announcement.id)
},
isViewed() {
const viewedId = localStorage.getItem(this.viewedKey)
return viewedId === this.announcement.id
}
}
}
</script>
<style scoped>
.announcement >>> .el-alert__content {
width: 100%;
}
.announcement-main {
word-wrap:break-word;
white-space: pre-wrap;
}
.link-more {
font-size: 10px;
margin-left: 10px;
border-bottom: solid 1px;
}
</style>

View File

@@ -0,0 +1,78 @@
<template>
<div>
<UserConfirmDialog
:url="url"
@UserConfirmDone="getAuthInfo"
@UserConfirmCancel="exit"
/>
<Dialog
:title="dialogTitle"
:show-confirm="false"
:show-cancel="false"
:destroy-on-close="true"
:width="'50'"
:visible.sync="showAuthInfo"
v-bind="$attrs"
v-on="$listeners"
>
<div>
<el-form label-position="right" label-width="80px" :model="authInfo">
<el-form-item :label="this.$t('applications.appName')">
<el-input v-model="account['app_display']" readonly />
</el-form-item>
<el-form-item :label="this.$t('assets.Username')">
<el-input v-model="account['username']" readonly />
</el-form-item>
<el-form-item :label="this.$t('assets.Password')">
<el-input v-model="authInfo.password" type="password" show-password />
</el-form-item>
</el-form>
</div>
</Dialog>
</div>
</template>
<script>
import Dialog from '@/components/Dialog'
import UserConfirmDialog from '@/components/UserConfirmDialog'
export default {
name: 'ShowSecretInfo',
components: {
Dialog,
UserConfirmDialog
},
props: {
account: {
type: Object,
default: () => ({})
},
visible: {
type: Boolean,
default: false
}
},
data() {
return {
dialogTitle: this.$t('common.ViewSecret'),
authInfo: {},
showAuthInfo: false,
url: `/api/v1/applications/account-secrets/${this.account.id}/`
}
},
methods: {
getAuthInfo() {
this.$axios.get(this.url, { disableFlashErrorMsg: true }).then(resp => {
this.authInfo = resp
this.showAuthInfo = true
})
},
exit() {
this.$emit('update:visible', false)
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,31 @@
import { ChoicesFormatter } from '@/components/TableFormatters'
import { toSafeLocalDateStr } from '@/utils/common'
import i18n from '@/i18n/i18n'
export const connectivityMeta = {
label: i18n.t('assets.Reachable'),
formatter: ChoicesFormatter,
formatterArgs: {
iconChoices: {
ok: 'fa-check text-primary',
failed: 'fa-times text-danger',
unknown: 'fa-circle text-warning'
},
hasTips: true,
getTips: ({ row, cellValue }) => {
const mapper = {
'ok': i18n.t('assets.Reachable'),
'failed': i18n.t('assets.Unreachable'),
'unknown': i18n.t('assets.Unknown')
}
let tips = mapper[cellValue]
if (row['date_verified']) {
const datetime = toSafeLocalDateStr(row['date_verified'])
tips += '<br> ' + datetime
}
return tips
}
},
width: '90px',
align: 'center'
}

View File

@@ -0,0 +1,173 @@
<template>
<div>
<ListTable ref="ListTable" :table-config="tableConfig" :header-actions="headerActions" />
<ShowSecretInfo v-if="showViewSecretDialog" :visible.sync="showViewSecretDialog" :account="account" />
</div>
</template>
<script>
import ListTable from '@/components/ListTable/index'
import { ActionsFormatter, DetailFormatter } from '@/components/TableFormatters'
import ShowSecretInfo from './ShowSecretInfo'
export default {
name: 'Detail',
components: {
ListTable,
ShowSecretInfo
},
props: {
url: {
type: String,
required: true
},
exportUrl: {
type: String,
default() {
return this.url.replace('/applications/accounts/', '/applications/account-secrets/')
}
},
hasLeftActions: {
type: Boolean,
default: false
},
otherActions: {
type: Array,
default: null
},
hasClone: {
type: Boolean,
default: false
},
systemUserDisabled: {
type: Boolean,
default: true
}
},
data() {
return {
showViewSecretDialog: false,
showUpdateSecretDialog: false,
account: {},
tableConfig: {
url: this.url,
columns: [
'app_display', 'username', 'category_display',
'type_display', 'systemuser', 'actions'
],
columnsMeta: {
app_display: {
showOverflowTooltip: true,
formatter: DetailFormatter,
formatterArgs: {
getRoute({ row }) {
switch (row['category']) {
case 'remote_app':
return {
name: 'RemoteAppDetail',
params: { id: row.app }
}
case 'db':
return {
name: 'DatabaseAppDetail',
params: { id: row.app }
}
default:
return {
name: 'KubernetesAppDetail',
params: { id: row.app }
}
}
}
}
},
username: {
showOverflowTooltip: true
},
systemuser: {
showOverflowTooltip: true,
formatter: DetailFormatter,
formatterArgs: {
can: this.systemUserDisabled && this.$hasPerm('assets.view_systemuser'),
getTitle({ row }) {
return row.systemuser_display
},
getRoute({ row }) {
return {
name: 'SystemUserDetail',
params: { id: row.systemuser }
}
}
}
},
actions: {
formatter: ActionsFormatter,
formatterArgs: {
hasUpdate: false, // can set function(row, value)
hasDelete: false, // can set function(row, value)
hasClone: this.hasClone,
moreActionsTitle: this.$t('common.More'),
extraActions: [
{
name: 'View',
title: this.$t('common.View'),
type: 'primary',
can: this.$hasPerm('applications.view_applicationaccountsecret'),
callback: function({ row }) {
this.account = row
this.showViewSecretDialog = true
}.bind(this)
},
{
name: 'Update',
title: this.$t('common.Update'),
can: !this.$store.getters.currentOrgIsRoot,
callback: function({ row }) {
this.$message.success(this.$tc('applications.updateAccountMsg'))
}.bind(this)
}
]
}
}
}
},
headerActions: {
hasLeftActions: this.hasLeftActions,
hasMoreActions: false,
hasImport: false,
hasExport: this.$hasPerm('applications.view_applicationaccountsecret'),
exportOptions: {
url: this.exportUrl,
mfaVerifyRequired: true
},
searchConfig: {
exclude: ['systemuser', 'app']
},
hasSearch: true
}
}
},
watch: {
url(iNew) {
this.$set(this.tableConfig, 'url', iNew)
}
},
mounted() {
if (this.otherActions) {
const actionColumn = this.tableConfig.columns[this.tableConfig.columns.length - 1]
for (const item of this.otherActions) {
actionColumn.formatterArgs.extraActions.push(item)
}
}
},
methods: {
onUpdateAuthDone(account) {
Object.assign(this.account, account)
}
}
}
</script>
<style lang='less' scoped>
</style>

View File

@@ -3,12 +3,12 @@
<table style="width: 100%">
<tr>
<td colspan="2">
<AssetSelect ref="assetSelect" :can-select="canSelect" />
<AssetSelect ref="assetSelect" :disabled="disabled" :can-select="canSelect" />
</td>
</tr>
<tr>
<td colspan="2">
<el-button :type="type" size="small" @click="addObjects">{{ $t('common.Add') }}</el-button>
<el-button :type="type" size="small" :disabled="disabled" @click="addObjects">{{ $t('common.Add') }}</el-button>
</td>
</tr>
</table>
@@ -38,6 +38,10 @@ export default {
type: String,
default: 'primary'
},
disabled: {
type: [Boolean, Function],
default: false
},
value: {
type: [Array, Number, String],
default: () => []

View File

@@ -1,12 +1,19 @@
<template>
<div class="asset-select-dialog">
<Select2 ref="select2" v-bind="select2Config" @input="onInputChange" @focus.stop="handleFocus" v-on="$listeners" />
<Select2
ref="select2"
v-model="select2Config.value"
v-bind="select2Config"
@input="onInputChange"
@focus.stop="handleFocus"
v-on="$listeners"
/>
<Dialog
v-if="dialogVisible"
:title="this.$t('assets.Assets')"
:visible.sync="dialogVisible"
custom-class="asset-select-dialog"
width="70%"
width="80vw"
top="1vh"
@confirm="handleConfirm"
@cancel="handleCancel"
@@ -23,8 +30,8 @@
<script>
import TreeTable from '@/components/TreeTable'
import { DetailFormatter } from '@/components/ListTable/formatters'
import Select2 from '@/components/Select2'
import { DetailFormatter } from '@/components/TableFormatters'
import Select2 from '@/components/FormFields/Select2'
import Dialog from '@/components/Dialog'
export default {
@@ -40,6 +47,10 @@ export default {
default(row, index) {
return true
}
},
disabled: {
type: [Boolean, Function],
default: false
}
},
data() {
@@ -64,6 +75,8 @@ export default {
showMenu: false,
showRefresh: true,
showAssets: false,
showSearch: true,
customTreeHeader: true,
url: '/api/v1/assets/assets/?fields_size=mini',
nodeUrl: '/api/v1/assets/nodes/',
// ?assets=0不显示资产. =1显示资产
@@ -72,7 +85,7 @@ export default {
select2Config: select2Config,
dialogSelect2Config: select2Config,
tableConfig: {
url: '/api/v1/assets/assets/',
url: '/api/v1/assets/assets/?fields_size=mini',
hasTree: true,
canSelect: this.canSelect,
columns: [
@@ -90,6 +103,18 @@ export default {
prop: 'ip',
label: this.$t('assets.ipDomain'),
sortable: 'custom'
},
{
prop: 'platform',
label: this.$t('assets.Platform'),
sortable: true
},
{
prop: 'protocols',
formatter: function(row) {
return <span> {row.protocols.toString()} </span>
},
label: this.$t('assets.Protocols')
}
],
listeners: {
@@ -169,7 +194,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

@@ -1,364 +0,0 @@
<template><div>
<div>
<ListTable ref="ListTable" :table-config="tableConfig" :header-actions="headerActions" />
<Dialog v-if="showMFADialog" width="50" :title="this.$t('common.MFAConfirm')" :visible.sync="showMFADialog" :show-confirm="false" :show-cancel="false" :destroy-on-close="true">
<div v-if="MFAConfirmed">
<el-form label-position="right" label-width="80px" :model="MFAInfo">
<el-form-item :label="this.$t('assets.Hostname')">
<el-input v-model="MFAInfo.hostname" disabled />
</el-form-item>
<el-form-item :label="this.$t('assets.Username')">
<el-input v-model="MFAInfo.username" disabled />
</el-form-item>
<el-form-item :label="this.$t('assets.Password')">
<el-input v-model="MFAInfo.password" type="password" show-password />
</el-form-item>
</el-form>
</div>
<el-row v-else :gutter="20">
<el-col :span="4">
<div style="line-height: 34px;text-align: center">MFA</div>
</el-col>
<el-col :span="14">
<el-input v-model="MFAInput" />
<span class="help-tips help-block">{{ $t('common.MFARequireForSecurity') }}</span>
</el-col>
<el-col :span="4">
<el-button size="mini" type="primary" style="line-height:20px " @click="MFAConfirm">{{ this.$t('common.Confirm') }}</el-button>
</el-col>
</el-row>
</Dialog>
<Dialog width="50" :title="this.$t('assets.UpdateAssetUserToken')" :visible.sync="showDialog" @confirm="handleConfirm()" @cancel="handleCancel()">
<el-form label-position="right" label-width="80px" :model="dialogInfo">
<el-form-item :label="this.$t('assets.Hostname')">
<el-input v-model="dialogInfo.hostname" disabled />
</el-form-item>
<el-form-item :label="this.$t('assets.Username')">
<el-input v-model="dialogInfo.username" disabled />
</el-form-item>
<el-form-item :label="this.$t('assets.Password')">
<el-input v-model="dialogInfo.password" type="password" />
</el-form-item>
<el-form-item :label="this.$t('assets.sshkey')">
<input type="file" @change="Onchange">
</el-form-item>
</el-form>
</Dialog>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import ListTable from '@/components/ListTable/index'
import Dialog from '@/components/Dialog'
import { ActionsFormatter, DateFormatter } from '@/components/ListTable/formatters'
export default {
name: 'Detail',
components: {
ListTable,
Dialog
},
props: {
url: {
type: String,
required: true
},
hasLeftActions: {
type: Boolean,
default: false
},
otherActions: {
type: Array,
default: null
},
handleExport: {
type: Function,
default: null
},
handleImport: {
type: Function,
default: null
},
hasImport: {
type: Boolean,
default: true
},
hasExport: {
type: Boolean,
default: true
}
},
data() {
return {
MFAConfirmed: false,
MFAInput: '',
MFAInfo: {
asset: '',
username: '',
hostname: '',
password: ''
},
showDialog: false,
showMFADialog: false,
dialogInfo: {
asset: '',
username: '',
hostname: '',
password: '',
key: ''
},
tableConfig: {
url: this.url,
columns: [
{
prop: 'hostname',
label: this.$t('assets.Hostname'),
showOverflowTooltip: true
},
{
prop: 'ip',
label: this.$t('assets.ip'),
width: '120px'
},
{
prop: 'username',
label: this.$t('assets.Username'),
showOverflowTooltip: true
},
{
prop: 'version',
label: this.$t('assets.Version'),
width: '70px'
},
{
prop: 'date_created',
label: this.$t('assets.date_joined'),
formatter: DateFormatter
},
{
prop: 'id',
label: this.$t('common.Action'),
align: 'center',
width: 150,
formatter: ActionsFormatter,
formatterArgs: {
hasUpdate: false, // can set function(row, value)
hasDelete: false, // can set function(row, value)
moreActionsTitle: this.$t('common.More'),
extraActions: [
{
name: 'View',
title: this.$t('common.View'),
type: 'primary',
callback: function(val) {
this.MFAInfo.asset = val.cellValue
if (!this.needMFAVerify) {
this.showMFADialog = true
this.MFAConfirmed = true
this.$axios.get(`/api/v1/assets/asset-user-auth-infos/${this.MFAInfo.asset}/`).then(res => {
this.MFAConfirmed = true
this.MFAInfo.hostname = res.hostname
this.MFAInfo.password = res.password
this.MFAInfo.username = res.username
})
} else {
this.showMFADialog = true
}
}.bind(this)
},
{
name: 'Delete',
title: this.$t('common.Delete'),
type: 'primary',
callback: (val) => {
this.$axios.delete(`/api/v1/assets/asset-users/${val.cellValue}/`).then(() => {
this.$message.success(this.$t('common.deleteSuccessMsg'))
this.$refs.ListTable.reloadTable()
})
}
},
{
name: 'Test',
title: this.$t('common.Test'),
callback: (val) => {
this.$axios.post(
`/api/v1/assets/asset-users/tasks/?id=${val.cellValue}`,
{ action: 'test' }
).then(res => {
window.open(`/#/ops/celery/task/${res.task}/log/`, '', 'width=900,height=600')
})
}
},
{
name: 'Update',
title: this.$t('common.Update'),
callback: function(val) {
this.showDialog = true
this.dialogInfo.asset = val.row.asset
this.dialogInfo.hostname = val.row.hostname
this.dialogInfo.username = val.row.username
}.bind(this)
}
]
}
}
],
extraQuery: {
latest: 1
}
},
headerActions: {
hasLeftActions: this.hasLeftActions,
hasBulkDelete: false,
hasImport: this.hasImport,
hasExport: this.hasExport,
hasSearch: true,
searchConfig: {
options: [
{
label: this.$t('assets.OnlyLatestVersion'),
value: 'latest',
children: [
{
label: this.$t('common.Yes'),
value: 1
},
{
label: this.$t('common.No'),
value: 0
}
]
}
]
}
}
}
},
computed: {
...mapGetters([
'MFA_TTl',
'MFAVerifyAt',
'publicSettings'
]),
needMFAVerify() {
if (!this.publicSettings.SECURITY_VIEW_AUTH_NEED_MFA) {
return false
}
const ttl = this.publicSettings.SECURITY_MFA_VERIFY_TTL
const now = new Date()
return !(this.MFAVerifyAt && (now - this.MFAVerifyAt) < ttl * 1000)
}
},
watch: {
url(iNew) {
this.$set(this.tableConfig, 'url', iNew)
}
},
mounted() {
if (this.otherActions) {
const actionColumn = this.tableConfig.columns[this.tableConfig.columns.length - 1]
for (const item of this.otherActions) {
actionColumn.formatterArgs.extraActions.push(item)
}
}
},
created() {
if (this.handleExport) {
this.headerActions.handleExport = this.handleExport
}
if (this.handleImport) {
this.headerActions.handleImport = this.handleImport
}
},
methods: {
MFAConfirm() {
if (this.MFAInput.length !== 6) {
return this.$message.error(this.$t('common.MFAErrorMsg'))
}
this.$axios.post(
`/api/v1/authentication/otp/verify/`, {
code: this.MFAInput
}
).then(
res => {
this.$store.dispatch('users/setMFAVerify')
this.$axios.get(`/api/v1/assets/asset-user-auth-infos/${this.MFAInfo.asset}/`).then(res => {
this.MFAConfirmed = true
this.MFAInfo.hostname = res.hostname
this.MFAInfo.password = res.password
this.MFAInfo.username = res.username
})
}
)
},
handleMFAConfirm() {
this.MFAInfo = {
asset: '',
username: '',
hostname: '',
password: ''
}
this.MFAInput = ''
this.showMFADialog = false
this.MFAConfirmed = false
},
handleCancel() {
this.dialogInfo = {
asset: '',
username: '',
hostname: '',
password: '',
key: ''
}
this.showDialog = false
this.$refs.ListTable.reloadTable()
},
Onchange(e) {
const vm = this
// TODO 校验文件类型
const reader = new FileReader()
reader.onload = function() {
vm.dialogInfo.key = this.result
}
reader.readAsText(
e.target.files[0]
)
},
handleConfirm() {
const data = {
asset: this.dialogInfo.asset,
username: this.dialogInfo.username
}
if (this.dialogInfo.password !== '') {
data.password = this.dialogInfo.password
}
if (this.dialogInfo.key !== '') {
data.key = this.dialogInfo.key
}
this.$axios.post(
`/api/v1/assets/asset-users/`,
data
).then(res => {
this.$message.success(this.$t('common.updateSuccessMsg'))
}).catch(err => {
this.$message.error(this.$t('common.updateErrorMsg' + ' ' + err))
})
this.dialogInfo = {
asset: '',
username: '',
hostname: '',
password: '',
key: ''
}
this.showDialog = false
this.$refs.ListTable.reloadTable()
}
}
}
</script>
<style lang='less' scoped>
</style>

View File

@@ -0,0 +1,81 @@
<template>
<DataForm
:fields="iFields"
:form="value"
style="margin-left: -26%;margin-right: -6%"
v-bind="kwargs"
v-on="$listeners"
/>
</template>
<script>
import DataForm from '@/components/DataForm'
export default {
name: 'NestedField',
components: {
DataForm
},
props: {
fields: {
type: Array,
default: () => []
},
value: {
type: Object,
default: () => ({})
},
errors: {
type: [Object, String],
default: ''
}
},
data() {
return {
kwargs: {
hasReset: false,
hasSaveContinue: false,
hasButtons: false
}
}
},
computed: {
iFields() {
const fields = this.fields
if (this.errors && typeof this.errors === 'object') {
// eslint-disable-next-line prefer-const
for (let [name, error] of Object.entries(this.errors)) {
const field = fields.find((v) => v.prop === name)
if (!field) {
continue
}
this.$log.debug(`${name}: ${error}`)
if (typeof error === 'object' && !Array.isArray(error)) {
error = this.objectToString(error)
}
field.attrs.error = error.toString()
}
}
this.$log.debug('Fields change: ', fields, this.errors)
return fields
}
},
methods: {
objectToString(obj) {
let data = ''
// eslint-disable-next-line prefer-const
for (let [key, value] of Object.entries(obj)) {
if (typeof value === 'object') {
value = this.objectToString(value)
}
data += ` ${key}: ${value} `
}
return data
}
}
}
</script>
<style scoped>
</style>

View File

@@ -1,15 +1,20 @@
<template>
<DataForm ref="dataForm" v-loading="loading" :fields="totalFields" v-bind="$attrs" v-on="$listeners">
<FormGroupHeader v-for="(group, i) in groups" :slot="'id:'+group.name" :key="'group-'+group.name" :title="group.title" :line="i != 0" />
<DataForm ref="dataForm" v-loading="loading" :fields="totalFields" :form="iForm" v-bind="$attrs" v-on="$listeners">
<FormGroupHeader
v-for="(group, i) in groups"
:slot="'id:'+group.name"
:key="'group-'+group.name"
:group="group"
:index="i"
:line="i !== 0"
/>
</DataForm>
</template>
<script>
import DataForm from '../DataForm'
import FormGroupHeader from '@/components/FormGroupHeader'
// import { optionUrlMeta } from '@/api/common'
import rules from '@/components/DataForm/rules'
import Select2 from '@/components/Select2'
import { FormFieldGenerator } from '@/components/AutoDataForm/utils'
export default {
name: 'AutoDataForm',
components: {
@@ -31,6 +36,10 @@ export default {
return []
}
},
form: {
type: Object,
default: () => ({})
},
fieldsMeta: {
type: Object,
default: () => ({})
@@ -38,151 +47,60 @@ export default {
},
data() {
return {
meta: {},
remoteMeta: {},
totalFields: [],
loading: true,
groups: []
groups: [],
iForm: this.form,
errors: {}
}
},
mounted() {
this.optionUrlMeta()
this.optionUrlMetaAndGenerateColumns()
},
methods: {
optionUrlMeta() {
optionUrlMetaAndGenerateColumns() {
this.$store.dispatch('common/getUrlMeta', { url: this.url }).then(data => {
this.meta = data.actions[this.method.toUpperCase()] || {}
this.remoteMeta = data.actions[this.method.toUpperCase()] || {}
this.generateColumns()
this.cleanFormValue()
}).catch(err => {
this.$log.error(err)
}).finally(() => {
this.loading = false
})
},
generateFieldByType(type, field, fieldMeta) {
switch (type) {
case 'choice':
type = 'radio-group'
field.options = fieldMeta.choices.map(v => {
return { label: v.display_name, value: v.value }
})
break
case 'datetime':
type = 'date-picker'
field.el = {
type: 'datetime'
}
break
case 'field':
type = ''
field.component = Select2
if (fieldMeta.required) {
field.el.clearable = false
}
break
case 'string':
type = 'input'
if (!fieldMeta.max_length) {
field.el.type = 'textarea'
field.el.rows = 3
}
break
default:
type = 'input'
break
}
if (type === 'radio-group') {
const options = fieldMeta.choices.map(v => {
return { label: v.display_name, value: v.value }
})
if (options.length > 4) {
type = 'select'
field.el.filterable = true
}
}
field.type = type
return field
},
generateFieldByName(name, field) {
switch (name) {
case 'email':
field.el.type = 'email'
break
case 'password':
field.el.type = 'password'
break
case 'comment':
field.el.type = 'textarea'
break
}
return field
},
generateFieldByOther(field, fieldMeta) {
const filedRules = field.rules || []
if (fieldMeta.required) {
if (field.type === 'input') {
filedRules.push(rules.Required)
} else {
filedRules.push(rules.RequiredChange)
}
}
field.rules = filedRules
return field
},
generateField(name) {
let field = { id: name, prop: name, el: {}, attrs: {}}
// const fieldMeta = this.meta[name] || this.meta['attrs']['children'][name] || {}
const fieldMeta = this.meta[name] || ((this.meta['attrs']) ? (this.meta['attrs']['children'][name]) : {})
field.label = fieldMeta.label
field = this.generateFieldByType(fieldMeta.type, field, fieldMeta)
field = this.generateFieldByName(name, field)
field = this.generateFieldByOther(field, fieldMeta)
field = Object.assign(field, this.fieldsMeta[name] || {})
_.set(field, 'attrs.error', '')
return field
},
generateFieldGroup(data) {
const [groupTitle, fields] = data
this.groups.push({
id: groupTitle,
title: groupTitle,
name: fields[0]
})
return this.generateFields(fields)
},
generateFieldAttrs(name) {
const fields = []
Object.keys(this.meta[name]['children']).forEach((key, i) => {
const filed = this.generateField(key)
fields.push(filed)
})
return fields
},
generateFields(data) {
let fields = []
for (let field of data) {
if (field instanceof Array) {
const items = this.generateFieldGroup(field)
fields = [...fields, ...items]
} else if (field === 'attrs') {
const items = this.generateFieldAttrs(field)
fields = [...fields, ...items]
// 修改title插入ID
this.groups[this.groups.length - 1].name = items[0].id
} else if (typeof field === 'string') {
field = this.generateField(field)
fields.push(field)
} else if (field instanceof Object) {
this.errors[field.prop] = ''
_.set(field, 'attrs.error', '')
fields.push(field)
}
}
return fields
},
generateColumns() {
this.totalFields = this.generateFields(this.fields)
const generator = new FormFieldGenerator()
this.totalFields = generator.generateFields(this.fields, this.fieldsMeta, this.remoteMeta)
this.groups = generator.groups
this.$log.debug('Total fields: ', this.totalFields)
},
_cleanFormValue(form, remoteMeta) {
for (const [k, v] of Object.entries(remoteMeta)) {
let valueSet = form[k]
if (v.type === 'nested object' && v.children) {
// 有一些字段属性时 nested object 类型,但是没有 children没有children的不需要走递归逻辑
// 比如:认证配置中的属性映射字段
if (typeof valueSet !== 'object') {
// 处理一些前端没有设置初始值的情况
valueSet = {}
}
form[k] = valueSet
this._cleanFormValue(valueSet, v.children)
}
if (valueSet !== undefined) {
continue
}
if (v.default === undefined) {
continue
}
form[k] = v.default
}
},
cleanFormValue() {
this._cleanFormValue(this.iForm, this.remoteMeta)
},
setFieldError(name, error) {
const field = this.totalFields.find((v) => v.prop === name)
if (!field) {
@@ -191,7 +109,11 @@ export default {
if (field.attrs.error === error) {
error += '.'
}
field.attrs.error = error
if (field.type === 'nestedField') {
field.el.errors = error
} else {
field.attrs.error = error
}
}
}
}

View File

@@ -0,0 +1,163 @@
import Vue from 'vue'
import Select2 from '@/components/FormFields/Select2'
import NestedField from '@/components/AutoDataForm/components/NestedField'
import Swicher from '@/components/FormFields/Swicher'
import rules from '@/components/DataForm/rules'
import { assignIfNot } from '@/utils/common'
export class FormFieldGenerator {
constructor() {
this.groups = []
}
generateFieldByType(type, field, fieldMeta, fieldRemoteMeta) {
switch (type) {
case 'choice':
type = 'radio-group'
if (!fieldRemoteMeta.read_only) {
field.options = fieldRemoteMeta.choices.map(v => {
return { label: v.display_name, value: v.value }
})
}
break
case 'multiple choice':
field.el.choices = fieldRemoteMeta['choices']
break
case 'datetime':
type = 'date-picker'
field.el = {
type: 'datetime'
}
break
case 'field':
type = ''
field.component = Select2
if (fieldRemoteMeta.required) {
field.el.clearable = false
}
break
case 'string':
type = 'input'
if (!fieldRemoteMeta['max_length']) {
field.el.type = 'textarea'
field.el.rows = 3
}
if (fieldRemoteMeta['write_only']) {
field.el.type = 'password'
}
break
case 'boolean':
type = ''
field.component = Swicher
break
case 'nested object':
type = 'nestedField'
field.component = NestedField
field.label = ''
field.labelWidth = 0
field.el.fields = this.generateNestFields(field, fieldMeta, fieldRemoteMeta)
field.el.errors = {}
Vue.$log.debug('All fields in generate: ', field.el.allFields)
break
default:
type = 'input'
break
}
if (type === 'radio-group') {
if (!fieldRemoteMeta.read_only) {
const options = fieldRemoteMeta.choices.map(v => {
return { label: v.display_name, value: v.value }
})
if (options.length > 4) {
type = 'select'
field.el.filterable = true
}
}
}
field.type = type
return field
}
generateNestFields(field, fieldMeta, fieldRemoteMeta) {
const fields = []
const nestedFields = fieldMeta.fields || []
const nestedFieldsMeta = fieldMeta.fieldsMeta || {}
const nestedFieldsRemoteMeta = fieldRemoteMeta.children || {}
for (const name of nestedFields) {
const f = this.generateField(name, nestedFieldsMeta, nestedFieldsRemoteMeta)
fields.push(f)
}
Vue.$log.debug('NestFields: ', fields)
return fields
}
generateFieldByName(name, field) {
switch (name) {
case 'email':
field.el.type = 'email'
break
case 'password':
field.el.type = 'password'
break
case 'comment':
field.el.type = 'textarea'
break
}
return field
}
generateFieldByOther(field, fieldMeta, fieldRemoteMeta) {
const filedRules = field.rules || []
if (fieldRemoteMeta.required) {
if (field.type === 'input') {
filedRules.push(rules.Required)
} else {
filedRules.push(rules.RequiredChange)
}
}
field.rules = filedRules
return field
}
generateField(name, fieldsMeta, remoteFieldsMeta) {
let field = { id: name, prop: name, el: {}, attrs: {}, rules: [] }
const remoteFieldMeta = remoteFieldsMeta[name] || {}
const fieldMeta = fieldsMeta[name] || {}
field.label = remoteFieldMeta.label
field.helpText = remoteFieldMeta.help_text
field = this.generateFieldByType(remoteFieldMeta.type, field, fieldMeta, remoteFieldMeta)
field = this.generateFieldByName(name, field)
field = this.generateFieldByOther(field, fieldMeta, remoteFieldMeta)
const el = assignIfNot(fieldMeta.el || {}, field.el)
const rules = fieldMeta.rules || field.rules
field = Object.assign(field, fieldMeta)
field.el = el
field.rules = rules
_.set(field, 'attrs.error', '')
// Vue.$log.debug('Generate field: ', name, field)
return field
}
generateFieldGroup(field, fieldsMeta, remoteFieldsMeta) {
const [groupTitle, fields] = field
this.groups.push({
id: groupTitle,
title: groupTitle,
name: fields[0],
fields: fields
})
return this.generateFields(fields, fieldsMeta, remoteFieldsMeta)
}
generateFields(_fields, fieldsMeta, remoteFieldsMeta) {
let fields = []
for (let field of _fields) {
if (field instanceof Array) {
const items = this.generateFieldGroup(field, fieldsMeta, remoteFieldsMeta)
fields = [...fields, ...items]
} else if (typeof field === 'string') {
field = this.generateField(field, fieldsMeta, remoteFieldsMeta)
fields.push(field)
} else if (field instanceof Object) {
if (this.errors) {
this.errors[field.prop] = ''
}
fields.push(field)
}
}
return fields
}
}

View File

@@ -1,12 +1,15 @@
<template>
<TagSearch :options="options" v-bind="$attrs" v-on="$listeners" />
<TagSearch :options="iOption" v-bind="$attrs" v-on="$listeners" />
</template>
<script>
import TagSearch from '@/components/TagSearch'
import i18n from '@/i18n/i18n'
export default {
name: 'AutoDataSearch',
components: { TagSearch },
components: {
TagSearch
},
props: {
url: {
type: String,
@@ -23,9 +26,22 @@ export default {
default: () => []
}
},
data() {
return {
internalOptions: []
}
},
computed: {
iOption() {
return this.options.concat(this.internalOptions)
}
},
watch: {
options() {
// 空函数,方便子组件刷新
},
url() {
this.genericOptions()
}
},
mounted() {
@@ -36,6 +52,7 @@ export default {
methods: {
async genericOptions() {
const vm = this // 透传This
vm.internalOptions = [] // 重置
const data = await this.optionUrlMeta()
const meta = data.actions['GET'] || {}
for (const [name, field] of Object.entries(meta)) {
@@ -49,7 +66,6 @@ export default {
label: field.label,
type: field.type,
value: name
}
if (field.type === 'choice' && field.choices) {
option.children = field.choices.map(item => {
@@ -65,11 +81,14 @@ 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.options.push(option)
if (option.value === 'id') {
option.label = 'ID'
}
vm.internalOptions.push(option)
}
},
optionUrlMeta() {
@@ -81,5 +100,4 @@ export default {
</script>
<style lang='less' scoped>
</style>

View File

@@ -0,0 +1,91 @@
<template>
<Dialog
v-if="showColumnSettingPopover"
:title="$t('common.CustomCol')"
:visible.sync="showColumnSettingPopover"
:destroy-on-close="true"
:show-cancel="false"
width="35%"
top="10%"
@confirm="handleColumnConfirm()"
>
<el-alert type="success">
{{ this.$t('common.TableColSettingInfo') }}
</el-alert>
<el-checkbox-group
v-model="iCurrentColumns"
>
<el-row>
<el-col
v-for="item in totalColumnsList"
:key="item.prop"
:span="8"
style="margin-top:5px;"
>
<el-checkbox
:label="item.prop"
:disabled="
item.prop==='id' ||
item.prop==='actions' ||
minColumns.indexOf(item.prop)!==-1
"
>
{{ item.label }}
</el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
</Dialog>
</template>
<script>
import Dialog from '@/components/Dialog/index'
export default {
name: 'ColumnSettingPopover',
components: {
Dialog
},
props: {
totalColumnsList: {
type: Array,
default: () => []
},
currentColumns: {
type: Array,
default: () => []
},
minColumns: {
type: Array,
default: () => []
},
url: {
type: String,
default: ''
}
},
data() {
return {
showColumnSettingPopover: false,
iCurrentColumns: ''
}
},
mounted() {
this.$eventBus.$on('showColumnSettingPopover', ({ url }) => {
if (url === this.url) {
this.showColumnSettingPopover = true
this.iCurrentColumns = this.currentColumns
}
})
},
methods: {
handleColumnConfirm() {
this.showColumnSettingPopover = false
this.$emit('columnsUpdate', { columns: this.iCurrentColumns, url: this.url })
}
}
}
</script>
<style lang='less' scoped>
</style>

View File

@@ -1,20 +1,50 @@
<template>
<DataTable v-if="!loading" ref="dataTable" v-loading="loading" :config="iConfig" v-bind="$attrs" v-on="$listeners" />
<div>
<DataTable
v-if="!loading"
ref="dataTable"
v-loading="loading"
:config="iConfig"
v-bind="$attrs"
v-on="$listeners"
@filter-change="filterChange"
/>
<ColumnSettingPopover
:current-columns="popoverColumns.currentCols"
:total-columns-list="popoverColumns.totalColumnsList"
:min-columns="popoverColumns.minCols"
:url="config.url"
@columnsUpdate="handlePopoverColumnsChange"
/>
</div>
</template>
<script type="text/jsx">
import DataTable from '../DataTable'
import { DateFormatter, DetailFormatter, DisplayFormatter, BooleanFormatter, ActionsFormatter } from '@/components/ListTable/formatters'
import {
DateFormatter,
DetailFormatter,
DisplayFormatter,
ActionsFormatter,
ChoicesFormatter
} from '@/components/TableFormatters'
import i18n from '@/i18n/i18n'
import ColumnSettingPopover from './components/ColumnSettingPopover'
import { newURL } from '@/utils/common'
export default {
name: 'AutoDataTable',
components: {
DataTable
DataTable,
ColumnSettingPopover
},
props: {
config: {
type: Object,
default: () => ({})
},
filterTable: {
type: Function,
default: () => ({})
}
},
data() {
@@ -23,9 +53,18 @@ export default {
method: 'get',
autoConfig: {},
iConfig: {},
meta: {}
meta: {},
cleanedColumnsShow: {},
totalColumns: [],
popoverColumns: {
totalColumnsList: [],
minCols: [],
currentCols: []
}
}
},
computed: {
},
watch: {
config: {
handler(iNew) {
@@ -40,10 +79,18 @@ export default {
},
methods: {
async optionUrlMetaAndGenCols() {
if (this.config.url === '') { return }
const url = (this.config.url.indexOf('?') === -1) ? `${this.config.url}?draw=1&display=1` : `${this.config.url}&draw=1&display=1`
this.$store.dispatch('common/getUrlMeta', { url: url }).then(data => {
this.meta = data.actions[this.method.toUpperCase()] || {}
this.generateColumns()
const method = this.method.toUpperCase()
this.meta = data.actions && data.actions[method] ? data.actions[method] : {}
this.generateTotalColumns()
}).then(() => {
// 根据当前列重新生成最终渲染表格
this.filterShowColumns()
}).then(() => {
// 生成给子组件使用的TotalColList
this.generatePopoverColumns()
}).catch((error) => {
this.$log.error('Error occur: ', error)
}).finally(() => {
@@ -59,7 +106,7 @@ export default {
break
case 'actions':
col = {
prop: 'id',
prop: 'actions',
label: i18n.t('common.Actions'),
align: 'center',
width: '150px',
@@ -69,7 +116,7 @@ export default {
break
case 'is_valid':
col.label = i18n.t('common.Validity')
col.formatter = BooleanFormatter
col.formatter = ChoicesFormatter
col.align = 'center'
col.width = '80px'
break
@@ -89,7 +136,7 @@ export default {
col.formatter = DisplayFormatter
break
case 'boolean':
col.formatter = BooleanFormatter
col.formatter = ChoicesFormatter
col.align = 'center'
col.width = '80px'
break
@@ -118,6 +165,37 @@ export default {
}
return col
},
addFilterIfNeed(col) {
if (col.prop) {
const column = this.meta[col.prop] || {}
if (!column.filter) {
return col
}
if (column.type === 'boolean') {
col.filters = [
{ text: i18n.t('common.Yes'), value: true },
{ text: i18n.t('common.No'), value: false }
]
col.sortable = false
col['column-key'] = col.prop
}
if (column.type === 'choice' && column.choices) {
col.filters = column.choices.map(item => {
if (typeof (item.value) === 'boolean') {
if (item.value) {
return { text: item['display_name'], value: 'True' }
} else {
return { text: item['display_name'], value: 'False' }
}
}
return { text: item['display_name'], value: item.value }
})
col.sortable = false
col['column-key'] = col.prop
}
}
return col
},
generateColumn(name) {
const colMeta = this.meta[name] || {}
const customMeta = this.config.columnsMeta ? this.config.columnsMeta[name] : {}
@@ -127,11 +205,12 @@ export default {
col = this.generateColumnByType(colMeta.type, col)
col = Object.assign(col, customMeta)
col = this.addHelpTipsIfNeed(col)
col = this.addFilterIfNeed(col)
return col
},
generateColumns() {
generateTotalColumns() {
const config = _.cloneDeep(this.config)
const columns = []
let columns = []
for (let col of config.columns) {
if (typeof col === 'object') {
columns.push(col)
@@ -140,8 +219,96 @@ 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
this.iConfig = config
},
// 生成给子组件使用的TotalColList
cleanColumnsShow() {
const totalColumnsNames = this.totalColumns.map(obj => obj.prop)
// 默认列
let defaultColumnsNames = _.get(this.iConfig, 'columnsShow.default', [])
if (defaultColumnsNames.length === 0) {
defaultColumnsNames = totalColumnsNames
}
// Clean it
defaultColumnsNames = totalColumnsNames.filter(n => defaultColumnsNames.indexOf(n) > -1)
// 最小列
const minColumnsNames = _.get(this.iConfig, 'columnsShow.min', ['actions', 'id'])
.filter(n => defaultColumnsNames.indexOf(n) > -1)
// 应该显示的列
const _tableConfig = localStorage.getItem('tableConfig')
? JSON.parse(localStorage.getItem('tableConfig'))
: {}
const tableName = this.config.name || this.$route.name + '_' + newURL(this.iConfig.url).pathname
const configShowColumnsNames = _.get(_tableConfig[tableName], 'showColumns', null)
let showColumnsNames = configShowColumnsNames || defaultColumnsNames
if (showColumnsNames.length === 0) {
showColumnsNames = totalColumnsNames
}
// 校对显示的列,是不是包含最小列
minColumnsNames.forEach((v, i) => {
if (showColumnsNames.indexOf(v) === -1) {
showColumnsNames.push(v)
}
})
// Clean it
showColumnsNames = totalColumnsNames.filter(n => showColumnsNames.indexOf(n) > -1)
this.cleanedColumnsShow = {
default: defaultColumnsNames,
show: showColumnsNames,
min: minColumnsNames,
configShow: configShowColumnsNames
}
this.$log.debug('Cleaned columns show: ', this.cleanedColumnsShow)
},
filterShowColumns() {
this.cleanColumnsShow()
this.iConfig.columns = this.totalColumns.filter(obj => {
return this.cleanedColumnsShow.show.indexOf(obj.prop) > -1
})
},
generatePopoverColumns() {
this.popoverColumns.totalColumnsList = this.totalColumns.filter(obj => {
if (obj.label) {
return { prop: obj.prop, label: obj.label }
}
})
this.popoverColumns.currentCols = this.cleanedColumnsShow.show
this.popoverColumns.minCols = this.cleanedColumnsShow.min
this.$log.debug('Popover cols: ', this.popoverColumns)
},
handlePopoverColumnsChange({ columns, url }) {
this.$log.debug('Columns change: ', columns)
this.popoverColumns.currentCols = columns
const _tableConfig = localStorage.getItem('tableConfig')
? JSON.parse(localStorage.getItem('tableConfig'))
: {}
const tableName = this.config.name || this.$route.name + '_' + newURL(url).pathname
_tableConfig[tableName] = {
'showColumns': columns
}
localStorage.setItem('tableConfig', JSON.stringify(_tableConfig))
this.filterShowColumns()
},
filterChange(filters) {
const key = Object.keys(filters)[0]
const attr = {}
attr[key] = filters[key][0]
this.filterTable(attr)
}
}
}

View File

@@ -1,13 +1,13 @@
<template>
<DataZTree ref="dataztree" :setting="treeSetting">
<slot slot="rMenu">
<li id="m_create" class="rmenu" tabindex="-1" @click="createTreeNode">
<DataZTree ref="dataztree" :setting="treeSetting" class="data-z-tree" v-on="$listeners">
<slot v-if="treeSetting.hasRightMenu" slot="rMenu">
<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" />
@@ -18,6 +18,7 @@
<script>
import DataZTree from '../DataZTree'
import $ from '@/utils/jquery-vendor'
import { mapGetters } from 'vuex'
export default {
name: 'AutoDataZTree',
@@ -34,13 +35,20 @@ export default {
data() {
return {
defaultSetting: {
showCreate: true,
showDelete: true,
showUpdate: true,
showSearch: false,
// 自定义header
customTreeHeader: false,
customTreeHeaderName: this.$t('assets.AssetTree'),
async: {
enable: true,
url: (process.env.VUE_APP_ENV === 'production') ? (`${this.setting.treeUrl}`) : (`${process.env.VUE_APP_BASE_API}${this.setting.treeUrl}`),
autoParam: ['id=key', 'name=n', 'level=lv'],
type: 'get',
headers: {
'X-JMS-ORG': JSON.parse(this.$cookie.get('jms_current_org')) ? JSON.parse(this.$cookie.get('jms_current_org')).id : ''
'X-JMS-ORG': this.$store.getters.currentOrg ? this.$store.getters.currentOrg.id : ''
}
},
callback: {
@@ -55,14 +63,19 @@ export default {
// beforeDrag
// onDrag
// beforeAsync: this.defaultCallback.bind(this, 'beforeAsync')
}
},
hasRightMenu: true
},
currentNode: '',
currentNodeId: ''
}
},
computed: {
...mapGetters([
'currentOrg'
]),
treeSetting() {
this.$log.debug('Settings: ', this.setting)
return _.merge(this.defaultSetting, this.setting)
},
zTree() {
@@ -76,6 +89,10 @@ export default {
$('body').unbind('mousedown')
},
methods: {
refreshTree: function() {
// const refreshIconRef = $('#tree-refresh')
// refreshIconRef.click()
},
editTreeNode: function() {
this.hideRMenu()
const currentNode = this.zTree.getSelectedNodes()[0]
@@ -83,7 +100,7 @@ export default {
return
}
if (currentNode) {
currentNode.name = currentNode.meta.node.value
currentNode.name = currentNode.meta.data.value
}
this.zTree.editName(currentNode)
},
@@ -94,19 +111,29 @@ 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 = '&'
}
let url = ''
const query = Object.assign({}, this.$route.query)
const objectId = treeNode.meta.data.id
if (treeNode.meta.type === 'node') {
this.currentNode = treeNode
this.currentNodeId = treeNode.meta.node.id
this.$route.query['node'] = this.currentNodeId
this.$emit('urlChange', `${this.setting.url}${combinator}node_id=${treeNode.meta.node.id}&show_current_asset=${show_current_asset}`)
this.currentNodeId = treeNode.meta.data.id
query['node'] = this.currentNodeId
query['asset'] = ''
url = `${this.setting.url}${combinator}node_id=${objectId}&show_current_asset=${show_current_asset}`
} else if (treeNode.meta.type === 'asset') {
this.$route.query['asset'] = treeNode.meta.asset.id
this.$emit('urlChange', `${this.setting.url}${combinator}asset_id=${treeNode.meta.asset.id}&show_current_asset=${show_current_asset}`)
query['asset'] = treeNode.meta.data.id
query['node'] = ''
url = `${this.setting.url}${combinator}asset_id=${objectId}&show_current_asset=${show_current_asset}`
}
this.$router.push({ query })
this.$emit('urlChange', url)
},
removeTreeNode: function() {
this.hideRMenu()
@@ -115,12 +142,13 @@ export default {
return
}
this.$axios.delete(
`${this.treeSetting.nodeUrl}${currentNode.meta.node.id}/`
`${this.treeSetting.nodeUrl}${currentNode.meta.data.id}/`
).then(() => {
this.$message.success(this.$t('common.deleteSuccessMsg'))
this.zTree.removeNode(currentNode)
this.refreshTree()
}).catch(() => {
// this.$message.error(this.$t('common.deleteErrorMsg' + ' ' + error))
// this.$message.error(this.$t('common.deleteErrorMsg') + ' ' + error)
})
},
onRename: function(event, treeId, treeNode, isCancel) {
@@ -132,14 +160,15 @@ export default {
url,
{ 'value': treeNode.name }
).then(res => {
let assetsAmount = treeNode.meta.node.assetsAmount
let assetsAmount = treeNode.meta.data['assetsAmount']
if (!assetsAmount) {
assetsAmount = 0
}
treeNode.name = treeNode.name + ' (' + assetsAmount + ')'
treeNode.meta.data = res
this.zTree.updateNode(treeNode)
this.$message.success(this.$t('common.updateSuccessMsg'))
})
}).finally(() => { this.refreshTree() })
},
onBodyMouseDown: function(event) {
const rMenuID = this.$refs.dataztree.$refs.ztree.iRMenuID
@@ -151,12 +180,17 @@ export default {
const rMenuID = this.$refs.dataztree.$refs.ztree.iRMenuID
const zTreeID = this.$refs.dataztree.$refs.ztree.iZTreeID
const offset = $(`#${zTreeID}`).offset()
const scrollTop = document.querySelector('.treebox').scrollTop
const scrollTop = document.querySelector('.treebox')?.scrollTop
x -= offset.left
// Tmp
y -= (offset.top + scrollTop) / 3 - 10
x += document.body.scrollLeft
y += document.body.scrollTop + document.documentElement.scrollTop
if (y + $(`#${rMenuID} ul`).height() >= window.innerHeight) {
y -= $(`#${rMenuID} ul`).height()
}
this.rMenu.css({ 'top': y + 'px', 'left': x + 'px', 'visibility': 'visible' })
$(`#${rMenuID} ul`).show()
$('body').bind('mousedown', this.onBodyMouseDown)
@@ -166,7 +200,7 @@ export default {
return
}
// 屏蔽收藏资产
if (treeNode.id === '-12') {
if (treeNode?.id === '-12') {
return
}
if (!treeNode && event.target.tagName.toLowerCase() !== 'button' && $(event.target).parents('a').length === 0) {
@@ -192,9 +226,9 @@ export default {
onDrop: function(event, treeId, treeNodes, targetNode, moveType) {
const treeNodesIds = []
$.each(treeNodes, function(index, value) {
treeNodesIds.push(value.meta.node.id)
treeNodesIds.push(value.meta.data.id)
})
const theUrl = `${this.treeSetting.nodeUrl}${targetNode.meta.node.id}/children/add/`
const theUrl = `${this.treeSetting.nodeUrl}${targetNode.meta.data.id}/children/add/`
this.$axios.put(
theUrl, {
nodes: treeNodesIds
@@ -203,7 +237,7 @@ export default {
this.$message.success(this.$t('common.updateSuccessMsg'))
}).catch(error => {
this.$message.error(this.$t('common.updateErrorMsg' + ' ' + error))
})
}).finally()
},
createTreeNode: function() {
this.hideRMenu()
@@ -213,21 +247,22 @@ export default {
}
this.zTree.expandNode(parentNode, true, false, true, false)
// http://localhost/api/v1/assets/nodes/85aa4ee2-0bd9-41db-9079-aa3646448d0c/children/
const url = `${this.treeSetting.nodeUrl}${parentNode.meta.node.id}/children/`
const url = `${this.treeSetting.nodeUrl}${parentNode.meta.data.id}/children/`
this.$axios.post(url, {}).then(data => {
const newNode = {
id: data['key'],
name: data['value'],
pId: parentNode.id,
isParent: true,
meta: {
'node': data
data: data,
type: 'node'
}
}
newNode.checked = this.zTree.getSelectedNodes()[0].checked
this.zTree.addNodes(parentNode, 0, newNode)
// vm.$refs.dataztree.refresh()
const node = this.zTree.getNodeByParam('id', newNode.id, parentNode)
this.currentNodeId = node.meta.node.id || newNode.id
this.currentNodeId = node.meta.data.id || newNode.id
this.zTree.editName(node)
this.$message.success(this.$t('common.createSuccessMsg'))
}).catch(error => {
@@ -235,19 +270,21 @@ export default {
})
},
refresh: function() {
this.$axios.post(
'/api/v1/assets/nodes/00000000-0000-0000-0000-000000000000/tasks/',
{ action: 'refresh_cache' }
)
},
getSelectedNodes: function() {
return this.zTree.getSelectedNodes()
},
getNodes: function() {
return this.zTree.getNodes()
},
selectNode: function(node) {
return this.zTree.selectNode(node)
}
}
}
</script>
<style lang='less' scoped>
<style scoped>
.rmenu {
font-size: 12px;
padding: 0 16px;
@@ -270,4 +307,8 @@ export default {
.rmenu:hover{
background-color: #f5f7fa;
}
.data-z-tree >>> .fa {
width: 10px;
}
</style>

View File

@@ -0,0 +1,452 @@
/* eslint-disable */
<template>
<div>
<el-tabs type="border-card">
<el-tab-pane v-if="shouldHide('min')" :label="this.$t('common.CronTab.min')">
<CrontabMin
ref="cronmin"
:check="checkNumber"
:cron="contabValueObj"
@update="updateContabValue"
/>
</el-tab-pane>
<el-tab-pane v-if="shouldHide('hour')" :label="this.$t('common.CronTab.hour')">
<CrontabHour
ref="cronhour"
:check="checkNumber"
:cron="contabValueObj"
@update="updateContabValue"
/>
</el-tab-pane>
<el-tab-pane v-if="shouldHide('day')" :label="this.$t('common.CronTab.day')">
<CrontabDay
ref="cronday"
:check="checkNumber"
:cron="contabValueObj"
@update="updateContabValue"
/>
</el-tab-pane>
<el-tab-pane v-if="shouldHide('month')" :label="this.$t('common.CronTab.month')">
<CrontabMonth
ref="cronmonth"
:check="checkNumber"
:cron="contabValueObj"
@update="updateContabValue"
/>
</el-tab-pane>
<el-tab-pane v-if="shouldHide('week')" :label="this.$t('common.CronTab.week')">
<CrontabWeek
ref="cronweek"
:check="checkNumber"
:cron="contabValueObj"
@update="updateContabValue"
/>
</el-tab-pane>
</el-tabs>
<div class="popup-main">
<div class="popup-result">
<p class="title">{{ this.$t('common.CronTab.timeExpression') }}</p>
<table>
<thead>
<th v-for="item of tabTitles" :key="item" width="40">{{ item }}</th>
</thead>
<tbody>
<td>
<el-input
v-model.trim="contabValueObj.min"
min="0"
max="5"
size="small"
onkeyup="value=value.replace(/[^\0-9\-\*\,]/g,'')"
/>
</td>
<td>
<el-input
v-model.trim="contabValueObj.hour"
size="small"
onkeyup="value=value.replace(/[^\0-9\-\*\,]/g,'')"
/>
</td>
<td>
<el-input
v-model.trim="contabValueObj.day"
size="small"
onkeyup="value=value.replace(/[^\0-9\\-\*\,]/g,'')"
/>
</td>
<td>
<el-input
v-model.trim="contabValueObj.month"
size="small"
onkeyup="value=value.replace(/[^\0-9\-\*\,]/g,'')"
/>
</td>
<td>
<el-input
v-model.trim="contabValueObj.week"
size="small"
onkeyup="value=value.replace(/[^\0-9\-\*\,]/g,'')"
/>
</td>
</tbody>
</table>
<div style="margin: 0 auto; text-align: center">
<div style="font-size: 13px;">{{ this.$t('common.CronTab.cronExpression') }}</div>
<div style="font-size: 13px;">{{ contabValueString }}</div>
</div>
</div>
<CrontabResult :ex="contabValueString" />
<div class="pop_btn">
<el-button
size="small"
@click="clearCron"
>
{{ this.$t('common.Reset') }}
</el-button>
<el-button
size="small"
type="primary"
@click="submitFill"
>
{{ this.$t('common.Confirm') }}
</el-button>
</div>
</div>
</div>
</template>
<script>
import CrontabMin from './components/Crontab-Min.vue'
import CrontabHour from './components/Crontab-Hour.vue'
import CrontabDay from './components/Crontab-Day.vue'
import CrontabMonth from './components/Crontab-Month.vue'
import CrontabWeek from './components/Crontab-Week.vue'
import CrontabResult from './components/Crontab-Result.vue'
export default {
name: 'Vcrontab',
components: {
CrontabMin,
CrontabHour,
CrontabDay,
CrontabMonth,
CrontabWeek,
CrontabResult
},
props: {
expression: {
type: String,
default() {
return ''
}
},
hideComponent: {
type: Array,
default() {
return []
}
}
},
data() {
return {
tabTitles: [this.$t('common.CronTab.min'), this.$t('common.CronTab.hour'), this.$t('common.CronTab.day'), this.$t('common.CronTab.month'), this.$t('common.CronTab.week')],
tabActive: 0,
myindex: 0,
contabValueObj: {
second: '0',
min: '0',
hour: '*',
day: '*',
month: '*',
week: '*'
// year: "",
},
newContabValueString: ''
}
},
computed: {
contabValueString: {
get() {
const obj = this.contabValueObj
const str =
obj.min +
' ' +
obj.hour +
' ' +
obj.day +
' ' +
obj.month +
' ' +
obj.week
return str
},
set() {
}
}
},
watch: {
expression: 'resolveExp',
hideComponent(value) {
// 隐藏部分组件
}
},
mounted: function() {
this.resolveExp()
},
methods: {
shouldHide(key) {
if (this.hideComponent && this.hideComponent.includes(key)) return false
return true
},
resolveExp() {
// 反解析 表达式
if (this.expression) {
const arr = this.expression.split(' ')
if (arr.length >= 5) {
// 5 位以上是合法表达式
const obj = {
min: arr[0],
hour: arr[1],
day: arr[2],
month: arr[3],
week: arr[4]
}
this.contabValueObj = {
...this.contabValueObj,
...obj
}
for (const i in obj) {
if (obj[i]) this.changeRadio(i, obj[i])
}
}
} else {
// 没有传入的表达式 则还原
this.clearCron()
}
},
// tab切换值
tabCheck(index) {
this.tabActive = index
},
// 由子组件触发,更改表达式组成的字段值
updateContabValue(name, value, from) {
this.contabValueObj[name] = value
if (from && from !== name) {
// debug(`来自组件 ${from} 改变了 ${name} ${value}`)
this.changeRadio(name, value)
}
},
// 赋值到组件
changeRadio(name, value) {
const arr = ['second', 'min', 'hour', 'month']
const refName = 'cron' + name
let insVlaue
if (!this.$refs[refName]) return
if (arr.includes(name)) {
if (value === '*') {
insVlaue = 1
} else if (value.indexOf('-') > -1) {
const indexArr = value.split('-')
isNaN(indexArr[0])
? (this.$refs[refName].cycle01 = 0)
: (this.$refs[refName].cycle01 = indexArr[0])
this.$refs[refName].cycle02 = indexArr[1]
insVlaue = 2
} else if (value.indexOf('/') > -1) {
const indexArr = value.split('/')
isNaN(indexArr[0])
? (this.$refs[refName].average01 = 0)
: (this.$refs[refName].average01 = indexArr[0])
this.$refs[refName].average02 = indexArr[1]
insVlaue = 3
} else {
insVlaue = 4
this.$refs[refName].checkboxList = value.split(',')
}
} else if (name === 'day') {
if (value === '*') {
insVlaue = 1
} else if (value === '?') {
insVlaue = 2
} else if (value.indexOf('-') > -1) {
const indexArr = value.split('-')
isNaN(indexArr[0])
? (this.$refs[refName].cycle01 = 0)
: (this.$refs[refName].cycle01 = indexArr[0])
this.$refs[refName].cycle02 = indexArr[1]
insVlaue = 3
} else if (value.indexOf('/') > -1) {
const indexArr = value.split('/')
isNaN(indexArr[0])
? (this.$refs[refName].average01 = 0)
: (this.$refs[refName].average01 = indexArr[0])
this.$refs[refName].average02 = indexArr[1]
insVlaue = 4
} else if (value.indexOf('W') > -1) {
const indexArr = value.split('W')
isNaN(indexArr[0])
? (this.$refs[refName].workday = 0)
: (this.$refs[refName].workday = indexArr[0])
insVlaue = 5
} else if (value === 'L') {
insVlaue = 6
} else {
this.$refs[refName].checkboxList = value.split(',')
insVlaue = 7
}
} else if (name === 'week') {
if (value === '*') {
insVlaue = 1
} else if (value === '?') {
insVlaue = 2
} else if (value.indexOf('-') > -1) {
const indexArr = value.split('-')
isNaN(indexArr[0])
? (this.$refs[refName].cycle01 = 0)
: (this.$refs[refName].cycle01 = indexArr[0])
this.$refs[refName].cycle02 = indexArr[1]
insVlaue = 3
} else if (value.indexOf('#') > -1) {
const indexArr = value.split('#')
isNaN(indexArr[0])
? (this.$refs[refName].average01 = 1)
: (this.$refs[refName].average01 = indexArr[0])
this.$refs[refName].average02 = indexArr[1]
insVlaue = 4
} else if (value.indexOf('L') > -1) {
const indexArr = value.split('L')
isNaN(indexArr[0])
? (this.$refs[refName].weekday = 1)
: (this.$refs[refName].weekday = indexArr[0])
insVlaue = 5
} else {
this.$refs[refName].checkboxList = value.split(',')
insVlaue = 6
}
} else if (name === 'year') {
if (value === '') {
insVlaue = 1
} else if (value === '*') {
insVlaue = 2
} else if (value.indexOf('-') > -1) {
insVlaue = 3
} else if (value.indexOf('/') > -1) {
insVlaue = 4
} else {
this.$refs[refName].checkboxList = value.split(',')
insVlaue = 5
}
}
this.$refs[refName].radioValue = insVlaue
},
// 表单选项的子组件校验数字格式(通过-props传递
checkNumber(value, minLimit, maxLimit) {
// 检查必须为整数
value = Math.floor(value)
if (value < minLimit) {
value = minLimit
} else if (value > maxLimit) {
value = maxLimit
}
return value
},
// 隐藏弹窗
hidePopup() {
this.$emit('hide')
},
// 填充表达式
submitFill() {
this.$emit('fill', this.contabValueString)
this.hidePopup()
},
clearCron() {
// 还原选择项
this.contabValueObj = {
second: '0',
min: '0',
hour: '0',
day: '*',
month: '*',
week: '*'
// year: "",
}
for (const j in this.contabValueObj) {
this.changeRadio(j, this.contabValueObj[j])
}
}
}
}
</script>
<style scoped>
.pop_btn {
text-align: center;
margin-top: 20px;
}
.popup-main {
position: relative;
margin: 10px auto 0;
background: #fff;
border-radius: 5px;
font-size: 12px;
overflow: hidden;
}
.popup-title {
overflow: hidden;
line-height: 34px;
padding-top: 6px;
background: #f2f2f2;
}
.popup-result {
position: relative;
box-sizing: border-box;
line-height: 24px;
margin: 17px auto;
padding: 10px 10px 10px;
border: 1px solid #dcdfe6;
box-shadow: 0 2px 4px 0 rgb(0 0 0 / 12%), 0 0 6px 0 rgb(0 0 0 / 4%);
}
.popup-result .title {
position: absolute;
top: -17px;
left: 50%;
width: 140px;
font-size: 14px;
margin-left: -70px;
text-align: center;
line-height: 30px;
background: #fff;
}
.popup-result table {
text-align: center;
width: 100%;
margin: 0 auto;
}
.popup-result table span {
display: block;
width: 100%;
font-family: arial;
line-height: 30px;
height: 30px;
white-space: nowrap;
overflow: hidden;
border: 1px solid #e8e8e8;
}
.popup-result-scroll {
font-size: 12px;
line-height: 24px;
height: 10em;
overflow-y: auto;
}
.el-form-item--mini.el-form-item,
.el-form-item--small.el-form-item {
margin-bottom: 10px;
}
</style>

View File

@@ -0,0 +1,189 @@
/* eslint-disable */
<template>
<el-form size="small">
<el-form-item>
<el-radio v-model="radioValue" :label="1">
{{ this.$t('common.CronTab.day') }}{{ this.$t('common.CronTab.wildcardsAllowed') }}[, - * /]
</el-radio>
</el-form-item>
<el-form-item>
<el-radio v-model="radioValue" :label="3">
{{ this.$t('common.CronTab.from') }}
<el-input-number v-model="cycle01" :min="0" :max="31" /> -
<el-input-number v-model="cycle02" :min="0" :max="31" /> {{ this.$t('common.CronTab.day') }}
</el-radio>
</el-form-item>
<el-form-item>
<el-radio v-model="radioValue" :label="4">
{{ this.$t('common.CronTab.every') }}
<el-input-number v-model="average02" :min="1" :max="31" /> {{ this.$t('common.CronTab.day') }}{{ this.$t('common.CronTab.executeOnce') }}
</el-radio>
</el-form-item>
<el-form-item>
<el-radio v-model="radioValue" :label="7">
{{ this.$t('common.CronTab.appoint') }}
<el-select v-model="checkboxList" clearable :placeholder="this.$t('common.CronTab.manyChoose')" multiple style="width:100%">
<el-option v-for="item in 31" :key="item" :value="item">{{ item }}</el-option>
</el-select>
</el-radio>
</el-form-item>
</el-form>
</template>
<script>
export default {
name: 'CrontabDay',
props: {
cron: {
type: Object,
default: () => {
return {}
}
},
check: {
type: Function,
default: () => {}
}
},
data() {
return {
radioValue: 1,
workday: 1,
cycle01: 1,
cycle02: 2,
average01: 1,
average02: 1,
checkboxList: [],
checkNum: this.$options.propsData.check
}
},
computed: {
cycleTotal: {
get() {
return this.cycle01 + '-' + this.cycle02
},
set() {
this.cycle01 = this.checkNum(this.cycle01, 1, 31)
this.cycle02 = this.checkNum(this.cycle02, 1, 31)
}
},
averageTotal: {
get() {
return '*' + '/' + this.average02
},
set() {
this.average01 = this.checkNum(this.average01, 1, 31)
this.average02 = this.checkNum(this.average02, 1, 31)
}
},
checkboxString: {
get() {
const str = this.checkboxList.join()
return str === '' ? '*' : str
},
set() {
}
}
},
watch: {
'radioValue': 'radioChange',
'cycleTotal': 'cycleChange',
'averageTotal': 'averageChange',
'workdayCheck': 'workdayChange',
'checkboxString': 'checkboxChange'
},
created() {
this.$nextTick(() => {
const arrs = []
for (let index = 0; index < this.checkboxList.length; index++) {
const cur = this.checkboxList[index]
arrs.push(parseFloat(cur))
}
this.checkboxList = arrs
})
},
methods: {
// 单选按钮值变化时
radioChange() {
('day rachange')
if (this.radioValue === 1) {
this.$emit('update', 'day', '*', 'day')
} else {
if (this.cron.hour === '*') {
this.$emit('update', 'hour', '0', 'day')
}
if (this.cron.min === '*') {
this.$emit('update', 'min', '0', 'day')
}
if (this.cron.second === '*') {
this.$emit('update', 'second', '0', 'day')
}
}
switch (this.radioValue) {
case 2:
this.$emit('update', 'day', '?')
break
case 3:
this.$emit('update', 'day', this.cycle01 + '-' + this.cycle02)
break
case 4:
this.$emit('update', 'day', '*' + '/' + this.average02)
break
case 5:
this.$emit('update', 'day', this.workday + 'W')
break
case 6:
this.$emit('update', 'day', 'L')
break
case 7:
this.$emit('update', 'day', this.checkboxString)
break
}
('day rachange end')
},
// 周期两个值变化时
cycleChange() {
if (this.radioValue === 3) {
this.$emit('update', 'day', this.cycleTotal)
}
},
// 平均两个值变化时
averageChange() {
if (this.radioValue === 4) {
this.$emit('update', 'day', this.averageTotal)
}
},
// 最近工作日值变化时
workdayChange() {
if (this.radioValue === 5) {
this.$emit('update', 'day', this.workday + 'W')
}
},
// checkbox值变化时
checkboxChange() {
if (this.radioValue === 7) {
this.$emit('update', 'day', this.checkboxString)
}
},
// 父组件传递的week发生变化触发
weekChange() {
// 判断week值与day不能同时为“?”
if (this.cron.week === '?' && this.radioValue === 2) {
this.radioValue = '1'
} else if (this.cron.week !== '?' && this.radioValue !== 2) {
this.radioValue = '2'
}
}
}
}
</script>
<style scoped>
.el-form-item--small.el-form-item {
margin-bottom: 10px;
}
</style>

View File

@@ -0,0 +1,158 @@
/* eslint-disable */
<template>
<el-form size="small">
<el-form-item>
<el-radio v-model="radioValue" :label="1">
{{ this.$t('common.CronTab.hour') }}{{ this.$t('common.CronTab.wildcardsAllowed') }}[, - * /]
</el-radio>
</el-form-item>
<el-form-item>
<el-radio v-model="radioValue" :label="2">
{{ this.$t('common.CronTab.from') }}
<el-input-number v-model="cycle01" :min="0" :max="60" /> -
<el-input-number v-model="cycle02" :min="0" :max="60" /> {{ this.$t('common.CronTab.hour') }}
</el-radio>
</el-form-item>
<el-form-item>
<el-radio v-model="radioValue" :label="3">
{{ this.$t('common.CronTab.every') }}
<el-input-number v-model="average02" :min="1" :max="60" /> {{ this.$t('common.CronTab.hour') }}{{ this.$t('common.CronTab.executeOnce') }}
</el-radio>
</el-form-item>
<el-form-item>
<el-radio v-model="radioValue" :label="4">
{{ this.$t('common.CronTab.appoint') }}
<el-select v-model="checkboxList" clearable :placeholder="this.$t('common.CronTab.manyChoose')" multiple style="width:100%">
<el-option v-for="item in 24" :key="item" :value="item-1">{{ item-1 }}</el-option>
</el-select>
</el-radio>
</el-form-item>
</el-form>
</template>
<script>
export default {
name: 'CrontabHour',
props: {
cron: {
type: Object,
default: () => {
return {}
}
},
check: {
type: Function,
default: () => {}
}
},
data() {
return {
radioValue: 1,
cycle01: 0,
cycle02: 1,
average01: 0,
average02: 1,
checkboxList: [],
checkNum: this.$options.propsData.check
}
},
computed: {
cycleTotal: {
get() {
return this.cycle01 + '-' + this.cycle02
},
set() {
this.cycle01 = this.checkNum(this.cycle01, 0, 23)
this.cycle02 = this.checkNum(this.cycle02, 0, 23)
}
},
averageTotal: {
get() {
return '*' + '/' + this.average02
},
set() {
this.average01 = this.checkNum(this.average01, 0, 23)
this.average02 = this.checkNum(this.average02, 1, 23)
}
},
checkboxString: {
get() {
const str = this.checkboxList.join()
return str === '' ? '*' : str
},
set() {
}
}
},
watch: {
'radioValue': 'radioChange',
'cycleTotal': 'cycleChange',
'averageTotal': 'averageChange',
'checkboxString': 'checkboxChange'
},
created() {
this.$nextTick(() => {
const arrs = []
for (let index = 0; index < this.checkboxList.length; index++) {
const cur = this.checkboxList[index]
arrs.push(parseFloat(cur))
}
this.checkboxList = arrs
})
},
methods: {
// 单选按钮值变化时
radioChange() {
if (this.radioValue === 1) {
this.$emit('update', 'hour', '*', 'hour')
// this.$emit('update', 'day', '*', 'hour')
} else {
if (this.cron.min === '*') {
this.$emit('update', 'min', '0', 'hour')
}
if (this.cron.second === '*') {
this.$emit('update', 'second', '0', 'hour')
}
}
switch (this.radioValue) {
case 2:
this.$emit('update', 'hour', this.cycle01 + '-' + this.cycle02)
break
case 3:
this.$emit('update', 'hour', '*' + '/' + this.average02)
break
case 4:
this.$emit('update', 'hour', this.checkboxString)
break
}
},
// 周期两个值变化时
cycleChange() {
if (this.radioValue === 2) {
this.$emit('update', 'hour', this.cycleTotal)
}
},
// 平均两个值变化时
averageChange() {
if (this.radioValue === 3) {
this.$emit('update', 'hour', this.averageTotal)
}
},
// checkbox值变化时
checkboxChange() {
if (this.radioValue === 4) {
this.$emit('update', 'hour', this.checkboxString)
}
}
}
}
</script>
<style scoped>
.el-form-item--small.el-form-item {
margin-bottom: 10px
}
</style>

View File

@@ -0,0 +1,156 @@
/* eslint-disable */
<template>
<el-form size="small">
<el-form-item>
<el-radio v-model="radioValue" :label="1" size="mini">
{{ this.$t('common.CronTab.min') }}{{ this.$t('common.CronTab.wildcardsAllowed') }}[, - * /]
</el-radio>
</el-form-item>
<el-form-item>
<el-radio v-model="radioValue" :label="2">
{{ this.$t('common.CronTab.from') }}
<el-input-number v-model="cycle01" :min="0" :max="60" /> -
<el-input-number v-model="cycle02" :min="0" :max="60" /> {{ this.$t('common.CronTab.min') }}
</el-radio>
</el-form-item>
<el-form-item>
<el-radio v-model="radioValue" :label="3">
{{ this.$t('common.CronTab.from') }}
<el-input-number v-model="average02" :min="1" :max="60" /> {{ this.$t('common.CronTab.min') }}{{ this.$t('common.CronTab.executeOnce') }}
</el-radio>
</el-form-item>
<el-form-item>
<el-radio v-model="radioValue" :label="4">
{{ this.$t('common.CronTab.appoint') }}
<el-select v-model="checkboxList" clearable :placeholder="this.$t('common.CronTab.manyChoose')" multiple style="width:100%" size="small">
<el-option v-for="item in 60" :key="item" :value="item-1">{{ item-1 }}</el-option>
</el-select>
</el-radio>
</el-form-item>
</el-form>
</template>
<script>
export default {
name: 'CrontabMin',
props: {
cron: {
type: Object,
default: () => {
return {}
}
},
check: {
type: Function,
default: () => {}
}
},
data() {
return {
radioValue: 1,
cycle01: 1,
cycle02: 2,
average01: 0,
average02: 1,
checkboxList: [],
checkNum: this.$options.propsData.check
}
},
computed: {
cycleTotal: {
get() {
return this.cycle01 + '-' + (this.cycle02 ? this.cycle02 : '')
},
set() {
this.cycle01 = this.checkNum(this.cycle01, 0, 59)
this.cycle02 = this.checkNum(this.cycle02, 0, 59)
}
},
averageTotal: {
get() {
return '*' + '/' + (this.average02 ? this.average02 : 0)
},
set() {
this.average01 = this.checkNum(this.average01, 0, 59)
this.average02 = this.checkNum(this.average02, 1, 59)
}
},
checkboxString: {
get() {
const str = this.checkboxList.join()
return str === '' ? '*' : str
},
set() {
}
}
},
watch: {
'radioValue': 'radioChange',
'cycleTotal': 'cycleChange',
'averageTotal': 'averageChange',
'checkboxString': 'checkboxChange'
},
created() {
this.$nextTick(() => {
const arrs = []
for (let index = 0; index < this.checkboxList.length; index++) {
const cur = this.checkboxList[index]
arrs.push(parseFloat(cur))
}
this.checkboxList = arrs
})
},
methods: {
// 单选按钮值变化时
radioChange() {
if (this.radioValue !== 1 && this.cron.second === '*') {
this.$emit('update', 'second', '0', 'min')
}
switch (this.radioValue) {
case 1:
this.$emit('update', 'min', '*', 'min')
this.$emit('update', 'hour', '*', 'min')
break
case 2:
this.$emit('update', 'min', this.cycle01 + '-' + this.cycle02, 'min')
break
case 3:
this.$emit('update', 'min', '*' + '/' + this.average02, 'min')
break
case 4:
this.$emit('update', 'min', this.checkboxString, 'min')
break
}
},
// 周期两个值变化时
cycleChange() {
if (this.radioValue === 2) {
this.$emit('update', 'min', this.cycleTotal, 'min')
}
},
// 平均两个值变化时
averageChange() {
if (this.radioValue === 3) {
this.$emit('update', 'min', this.averageTotal, 'min')
}
},
// checkbox值变化时
checkboxChange() {
if (this.radioValue === 4) {
this.$emit('update', 'min', this.checkboxString, 'min')
}
}
}
}
</script>
<style scoped>
.el-form-item--small.el-form-item {
margin-bottom: 10px;
}
</style>

View File

@@ -0,0 +1,163 @@
/* eslint-disable */
<template>
<el-form size="small">
<el-form-item>
<el-radio v-model="radioValue" :label="1">
{{ this.$t('common.CronTab.month') }}{{ this.$t('common.CronTab.wildcardsAllowed') }}[, - * /]
</el-radio>
</el-form-item>
<el-form-item>
<el-radio v-model="radioValue" :label="2">
{{ this.$t('common.CronTab.from') }}
<el-input-number v-model="cycle01" :min="1" :max="12" /> -
<el-input-number v-model="cycle02" :min="1" :max="12" /> {{ this.$t('common.CronTab.month') }}
</el-radio>
</el-form-item>
<el-form-item>
<el-radio v-model="radioValue" :label="3">
{{ this.$t('common.CronTab.every') }}
<el-input-number v-model="average02" :min="1" :max="12" /> {{ this.$t('common.CronTab.month') }}{{ this.$t('common.CronTab.executeOnce') }}
</el-radio>
</el-form-item>
<el-form-item>
<el-radio v-model="radioValue" :label="4">
{{ this.$t('common.CronTab.appoint') }}
<el-select v-model="checkboxList" clearable :placeholder="this.$t('common.CronTab.manyChoose')" multiple style="width:100%">
<el-option v-for="item in 12" :key="item" :value="item">{{ item }}</el-option>
</el-select>
</el-radio>
</el-form-item>
</el-form>
</template>
<script>
export default {
name: 'CrontabMonth',
props: {
cron: {
type: Object,
default: () => {
return {}
}
},
check: {
type: Function,
default: () => {}
}
},
data() {
return {
radioValue: 1,
cycle01: 1,
cycle02: 2,
average01: 1,
average02: 1,
checkboxList: [],
checkNum: this.check
}
},
computed: {
cycleTotal: {
get() {
return this.cycle01 + '-' + this.cycle02
},
set() {
this.cycle01 = this.checkNum(this.cycle01, 1, 12)
this.cycle02 = this.checkNum(this.cycle02, 1, 12)
}
},
averageTotal: {
get() {
return '*' + '/' + this.average02
},
set() {
this.average01 = this.checkNum(this.average01, 1, 12)
this.average02 = this.checkNum(this.average02, 1, 12)
}
},
checkboxString: {
get() {
const str = this.checkboxList.join()
return str === '' ? '*' : str
},
set() {
}
}
},
watch: {
'radioValue': 'radioChange',
'cycleTotal': 'cycleChange',
'averageTotal': 'averageChange',
'checkboxString': 'checkboxChange'
},
created() {
this.$nextTick(() => {
const arrs = []
for (let index = 0; index < this.checkboxList.length; index++) {
const cur = this.checkboxList[index]
arrs.push(parseFloat(cur))
}
this.checkboxList = arrs
})
},
methods: {
// 单选按钮值变化时
radioChange() {
if (this.radioValue === 1) {
this.$emit('update', 'month', '*')
} else {
if (this.cron.day === '*') {
this.$emit('update', 'day', '*', 'month')
}
if (this.cron.hour === '*') {
this.$emit('update', 'hour', '0', 'month')
}
if (this.cron.min === '*') {
this.$emit('update', 'min', '0', 'month')
}
if (this.cron.second === '*') {
this.$emit('update', 'second', '0', 'month')
}
}
switch (this.radioValue) {
case 2:
this.$emit('update', 'month', this.cycle01 + '-' + this.cycle02)
break
case 3:
this.$emit('update', 'month', '*' + '/' + this.average02)
break
case 4:
this.$emit('update', 'month', this.checkboxString)
break
}
},
// 周期两个值变化时
cycleChange() {
if (this.radioValue === 2) {
this.$emit('update', 'month', this.cycleTotal)
}
},
// 平均两个值变化时
averageChange() {
if (this.radioValue === 3) {
this.$emit('update', 'month', this.averageTotal)
}
},
// checkbox值变化时
checkboxChange() {
if (this.radioValue === 4) {
this.$emit('update', 'month', this.checkboxString)
}
}
}
}
</script>
<style scoped>
.el-form-item--small.el-form-item {
margin-bottom: 10px;
}
</style>

View File

@@ -0,0 +1,62 @@
/* eslint-disable */
<template>
<div class="popup-result">
<p class="title">{{ this.$t('common.CronTab.runningTimes') }}</p>
<ul class="popup-result-scroll">
<template v-if="isShow">
<li v-for="item in resultList" :key="item">{{ item }}</li>
</template>
<li v-else>{{ this.$t('common.CronTab.calculationResults') }}</li>
</ul>
</div>
</template>
<script>
import parser from 'cron-parser'
import moment from 'moment'
export default {
name: 'CrontabResult',
props: {
ex: {
type: String,
default() {
return ''
}
}
},
data() {
return {
dayRule: '',
dayRuleSup: '',
dateArr: [],
resultList: [],
isShow: false
}
},
watch: {
'ex': 'expressionChange222'
},
mounted: function() {
// 初始化 获取一次结果
this.expressionChange222()
},
methods: {
expressionChange222() {
this.isShow = true
const rule = 0 + ' ' + this.$options.propsData.ex
try {
this.resultList = []
var interval = parser.parseExpression(rule)
for (let index = 0; index < 5; index++) {
const cur = interval.next().toString()
this.resultList.push(moment(cur).format('YYYY-MM-DD HH:mm:ss'))
}
} catch (error) {
this.isShow = false
// debug(error, 'error')
}
}
}
}
</script>

View File

@@ -0,0 +1,178 @@
/* eslint-disable */
<template>
<el-form size="small">
<el-form-item>
<el-radio v-model="radioValue" :label="1">
{{ this.$t('common.CronTab.week') }}{{ this.$t('common.CronTab.wildcardsAllowed') }}[, - * /]
</el-radio>
</el-form-item>
<el-form-item>
<el-radio v-model="radioValue" :label="3">
{{ this.$t('common.CronTab.cycleFromWeek') }}
<el-input-number v-model="cycle01" :min="1" :max="7" /> -
<el-input-number v-model="cycle02" :min="1" :max="7" />
</el-radio>
</el-form-item>
<el-form-item>
<el-radio v-model="radioValue" :label="6">
{{ this.$t('common.CronTab.appoint') }}
<el-select v-model="checkboxList" clearable :placeholder="this.$t('common.CronTab.manyChoose')" multiple style="width:100%">
<el-option v-for="(item,index) of weekList" :key="index" :value="index+1">{{ item }}</el-option>
</el-select>
</el-radio>
</el-form-item>
</el-form>
</template>
<script>
export default {
name: 'CrontabWeek',
props: {
cron: {
type: Object,
default: () => {
return {}
}
},
check: {
type: Function,
default: () => {}
}
},
data() {
return {
radioValue: 2,
weekday: 1,
cycle01: 1,
cycle02: 2,
average01: 1,
average02: 1,
checkboxList: [],
weekList: [this.$t('common.CronTab.Monday'), this.$t('common.CronTab.Tuesday'), this.$t('common.CronTab.Wednesday'), this.$t('common.CronTab.Thursday'), this.$t('common.CronTab.Friday'), this.$t('common.CronTab.Saturday'), this.$t('common.CronTab.Sunday')],
checkNum: this.$options.propsData.check
}
},
computed: {
cycleTotal: {
get() {
return this.cycle01 + '-' + this.cycle02
},
set() {
this.cycle01 = this.checkNum(this.cycle01, 1, 7)
this.cycle02 = this.checkNum(this.cycle02, 1, 7)
}
},
averageTotal: {
get() {
return this.average01 + '#' + this.average02
},
set() {
this.average01 = this.checkNum(this.average01, 1, 4)
this.average02 = this.checkNum(this.average02, 1, 7)
}
},
checkboxString: {
get() {
const str = this.checkboxList.join()
return str === '' ? '*' : str
},
set() {
}
}
},
watch: {
'radioValue': 'radioChange',
'cycleTotal': 'cycleChange',
'averageTotal': 'averageChange',
'weekdayCheck': 'weekdayChange',
'checkboxString': 'checkboxChange'
},
created() {
this.$nextTick(() => {
const arrs = []
for (let index = 0; index < this.checkboxList.length; index++) {
const cur = this.checkboxList[index]
arrs.push(parseFloat(cur))
}
this.checkboxList = arrs
})
},
methods: {
// 单选按钮值变化时
radioChange() {
if (this.radioValue === 1) {
this.$emit('update', 'week', '*')
this.$emit('update', 'year', '*')
} else {
if (this.cron.month === '*') {
this.$emit('update', 'month', '*', 'week')
}
if (this.cron.day === '*') {
this.$emit('update', 'day', '*', 'week')
}
if (this.cron.hour === '*') {
this.$emit('update', 'hour', '*', 'week')
}
if (this.cron.min === '*') {
this.$emit('update', 'min', '*', 'week')
}
if (this.cron.second === '*') {
this.$emit('update', 'second', '*', 'week')
}
}
switch (this.radioValue) {
case 2:
this.$emit('update', 'week', '?')
break
case 3:
this.$emit('update', 'week', this.cycle01 + '-' + this.cycle02)
break
case 4:
this.$emit('update', 'week', this.average01 + '#' + this.average02)
break
case 5:
this.$emit('update', 'week', this.weekday + 'L')
break
case 6:
this.$emit('update', 'week', this.checkboxString)
break
}
},
// 根据互斥事件更改radio的值
// 周期两个值变化时
cycleChange() {
if (this.radioValue === 3) {
this.$emit('update', 'week', this.cycleTotal)
}
},
// 平均两个值变化时
averageChange() {
if (this.radioValue === 4) {
this.$emit('update', 'week', this.averageTotal)
}
},
// 最近工作日值变化时
weekdayChange() {
if (this.radioValue === 5) {
this.$emit('update', 'week', this.weekday + 'L')
}
},
// checkbox值变化时
checkboxChange() {
if (this.radioValue === 6) {
this.$emit('update', 'week', this.checkboxString)
}
}
}
}
</script>
<style scoped>
.el-form-item--small.el-form-item {
margin-bottom: 10px;
}
</style>

View File

@@ -0,0 +1,55 @@
<template>
<div>
<div class="box">
<el-input v-model="input" clearable @focus="showDialog" @clear="onClear" />
</div>
<el-dialog :title="this.$t('common.CronTab.newCron')" :visible.sync="showCron" top="8vh" width="580px" append-to-body>
<Crontab
:expression="expression"
@hide="showCron = false"
@fill="crontabFill"
/>
</el-dialog>
</div>
</template>
<script>
import Crontab from './Crontab.vue'
export default {
components: { Crontab },
props: {
value: {
type: String,
default: ''
}
},
data() {
return {
input: _.cloneDeep(this.value),
expression: _.cloneDeep(this.value),
showCron: false
}
},
methods: {
crontabFill(value) {
// 确定后回传的值
this.input = value
this.$emit('change', value)
},
showDialog() {
this.expression = this.input
this.showCron = true
},
onClear() {
this.input = ''
this.$emit('change', '')
}
}
}
</script>
<style scoped>
.el-dialog__body {
padding: 12px 16px;
}
</style>

View File

@@ -0,0 +1,184 @@
<template>
<div :class="grouped ? 'el-button-group' : 'el-button-ungroup'" class="layout">
<template v-for="action in iActions">
<el-dropdown
v-if="action.dropdown"
v-show="action.dropdown.length > 0"
:key="action.name"
class="action-item"
trigger="click"
placement="bottom-start"
@command="handleDropdownCallback"
>
<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" 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"
>
{{ option.group }}
</div>
<el-dropdown-item
:key="option.name"
:command="[option, action]"
v-bind="option"
>
{{ option.title }}
</el-dropdown-item>
</template>
</el-dropdown-menu>
</el-dropdown>
<el-button
v-else
:key="action.name"
:size="size"
v-bind="cleanButtonAction(action)"
class="action-item"
@click="handleClick(action)"
>
<el-tooltip :disabled="!action.tip" :content="action.tip" placement="top">
<span>
<i v-if="action.fa" :class="'fa ' + action.fa" />{{ action.title }}
</span>
</el-tooltip>
</el-button>
</template>
</div>
</template>
<script>
export default {
name: 'DataActions',
props: {
grouped: {
type: Boolean,
default: false
},
size: {
type: String,
default: 'small'
},
type: {
type: String,
default: ''
},
actions: {
type: Array,
default: () => []
}
},
computed: {
iActions() {
return this.cleanActions(this.actions)
}
},
methods: {
handleDropdownCallback(command) {
const [option, dropdown] = command
const defaultCallback = () => this.$log.debug('No callback found: ', option, dropdown)
let callback = option.callback
if (!callback) {
callback = dropdown.callback
}
if (!callback) {
callback = defaultCallback
}
return callback(option)
},
handleClick(action) {
if (action && action.callback) {
action.callback(action)
} else {
this.$log.debug('No callback found')
}
this.$emit('actionClick', action)
},
checkItem(item, attr, defaults) {
if (!item) {
return true
}
let ok = item[attr]
if (ok && typeof ok === 'function') {
ok = ok(item)
} else if (ok == null) {
ok = defaults === undefined ? true : defaults
}
return ok
},
cleanButtonAction(action) {
action = _.cloneDeep(action)
delete action['dropdown']
delete action['callback']
delete action['name']
delete action['can']
return action
},
cleanActions(actions) {
const cleanedActions = []
const cloneActions = _.cloneDeep(actions)
for (const v of cloneActions) {
if (!v) {
continue
}
const action = Object.assign({}, v)
// 是否拥有这个action
const has = this.checkItem(action, 'has')
delete action['has']
if (!has) {
continue
}
// 是否有分割线
action.divided = this.checkItem(action, 'divided', false)
// 是否是disabled
const can = this.checkItem(action, 'can')
action.disabled = !can
if (action.dropdown) {
// const dropdown = this.cleanActions(action.dropdown)
action.dropdown = this.cleanActions(action.dropdown)
}
cleanedActions.push(action)
}
return cleanedActions
}
}
}
</script>
<style scoped>
.layout {
display: flex;
justify-content: center;
}
.dropdown-menu-title {
text-align: left;
font-size: 12px;
color: #909399;
line-height: 30px;
padding-left: 10px;
padding-top: 10px;
border-top: solid 1px #e4e7ed;
}
.dropdown-menu-title:first-child {
padding-top: 0;
border-top: none;
}
.el-button-ungroup .action-item {
margin-left: 4px;
}
.el-button-ungroup .action-item:first-child {
margin-left: 0;
}
</style>

View File

@@ -97,6 +97,7 @@ export default {
}
},
props: {
// eslint-disable-next-line vue/require-default-prop
data: Object,
prop: {
type: String,
@@ -104,10 +105,13 @@ export default {
return this.data.id
}
},
// eslint-disable-next-line vue/require-prop-types,vue/require-default-prop
itemValue: {},
// eslint-disable-next-line vue/require-default-prop
value: Object,
disabled: Boolean,
readonly: Boolean,
// eslint-disable-next-line vue/require-default-prop
options: Array
},
data() {

View File

@@ -1,7 +1,7 @@
<template>
<el-form ref="elForm" v-bind="$attrs" :model="value" class="el-form-renderer">
<template v-for="item in innerContent">
<slot :name="`id:${item.id}`" />
<slot v-if="!isHidden(item)" :name="`id:${item.id}`" />
<component
:is="item.type === GROUP ? 'render-form-group' : 'render-form-item'"
:key="item.id"
@@ -13,7 +13,7 @@
:options="options[item.id]"
@updateValue="updateValue"
/>
<slot :name="`$id:${item.id}`" />
<slot v-if="!isHidden(item)" :name="`$id:${item.id}`" />
</template>
<slot />
</el-form>
@@ -146,7 +146,7 @@ export default {
* - el-form 的 resetFields 不会触发 input & change 事件,无法监听
* - bug1: https://github.com/FEMessage/el-data-table/issues/176#issuecomment-587280825
* - bug2:
* 0. 建议先在监听器 watch.value 里 console.log(v.name, oldV.name)
* 0. 建议先在监听器 watch.value 里 // debug(v.name, oldV.name)
* 1. 打开 basic 示例
* 2. 在 label 为 name 的输入框里输入 1此时 log'1' ''
* 3. 点击 reset 按钮,此时 log 两条数据: '1' '1', '' ''
@@ -202,6 +202,18 @@ export default {
setOptions(id, options) {
_set(this.options, id, options)
this.options = { ...this.options } // 设置之前不存在的 options 时需要重新设置响应式更新
},
isHidden(item) {
if (!item.el || !item.el['hiddenGroup']) {
return false
}
if (item.hidden === true) {
return true
}
if (typeof item.hidden === 'function') {
return item.hidden(this.value)
}
return false
}
}
}

View File

@@ -1,10 +1,11 @@
<template>
<ElFormRender
ref="form"
:class="mobile? 'mobile' : 'desktop'"
:content="fields"
:form="basicForm"
label-position="right"
label-width="17%"
:label-position="labelPosition"
label-width="20%"
v-bind="$attrs"
v-on="$listeners"
>
@@ -12,8 +13,8 @@
<slot v-for="item in fields" :slot="`id:${item.id}`" :name="`id:${item.id}`" />
<slot v-for="item in fields" :slot="`$id:${item.id}`" :name="`$id:${item.id}`" />
<el-form-item>
<el-button v-for="button in moreButtons" :key="button.title" size="small" v-bind="button" @click="handleClick(button)">{{ button.title }}</el-button>
<el-form-item v-if="hasButtons" class="form-buttons">
<el-button v-for="button in moreButtons" :key="button.title" size="small" v-bind="button" :loading="button.loading" @click="handleClick(button)">{{ button.title }}</el-button>
<el-button v-if="defaultButton && hasReset" size="small" @click="resetForm('form')">{{ $t('common.Reset') }}</el-button>
<el-button v-if="defaultButton && hasSaveContinue" size="small" @click="submitForm('form', true)">{{ $t('common.SaveAndAddAnother') }}</el-button>
<el-button v-if="defaultButton" size="small" :loading="isSubmitting" type="primary" @click="submitForm('form')">{{ $t('common.Submit') }}</el-button>
@@ -23,6 +24,7 @@
<script>
import ElFormRender from './components/el-form-renderer'
import { scrollToError } from '@/utils'
export default {
components: {
ElFormRender
@@ -32,6 +34,10 @@ export default {
type: Boolean,
default: true
},
hasButtons: {
type: Boolean,
default: true
},
hasReset: {
type: Boolean,
default: true
@@ -47,7 +53,7 @@ export default {
// 初始值
form: {
type: Object,
default: () => { return {} }
default: () => ({})
},
moreButtons: {
type: Array,
@@ -63,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) {
@@ -72,6 +86,7 @@ export default {
this.$emit('submit', form.getFormValue(), form, addContinue)
} else {
this.$emit('invalid', valid)
scrollToError(form.$el)
return false
}
})
@@ -82,38 +97,46 @@ export default {
},
handleClick(button) {
const callback = button.callback || function(values, form) {
// console.log('Click ', button.title, ': ', values)
// debug('Click ', button.title, ': ', values)
}
const form = this.$refs['form']
const values = form.getFormValue()
callback(values, form)
callback(values, form, button)
}
}
}
</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;
@@ -121,7 +144,10 @@ export default {
font-size: 12px;
line-height: 18px;
}
.el-form ::v-deep .help-block a {
color: #1c84c6;
.el-form ::v-deep .help-block a {
color: var(--color-primary);
}
.form-buttons {
padding-top: 10px;
}
</style>

View File

@@ -8,7 +8,40 @@ export const RequiredChange = {
required: true, message: i18n.t('common.fieldRequiredError'), trigger: 'change'
}
export const EmailCheck = {
type: 'email',
message: i18n.t('common.InputEmailAddress'),
trigger: ['blur', 'change']
}
export const specialEmojiCheck = {
validator: (rule, value, callback) => {
value = value.trim()
if (/[\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/.test(value)) {
callback(new Error(i18n.t('common.NotSpecialEmoji')))
} else {
callback()
}
},
trigger: ['blur', 'change']
}
export default {
Required,
RequiredChange
RequiredChange,
EmailCheck,
specialEmojiCheck
}
export const JsonRequired = {
required: true,
trigger: 'change',
validator: (rule, value, callback) => {
try {
JSON.parse(value)
callback()
} catch (e) {
callback(new Error(i18n.t('common.InvalidJson')))
}
}
}

View File

@@ -11,6 +11,7 @@
v-bind="tableAttrs"
:data="data"
:row-class-name="rowClassName"
v-on="$listeners"
@selection-change="selectStrategy.onSelectionChange"
@select="selectStrategy.onSelect"
@select-all="selectStrategy.onSelectAll($event, canSelect)"
@@ -95,6 +96,9 @@
v-for="col in columns"
:key="col.prop"
:formatter="typeof col.formatter === 'function' ? col.formatter : null"
:filters="col.filters || null"
:filter-multiple="false"
:filter-method="typeof col.filterMethod === 'function' ? col.filterMethod : null"
v-bind="{align: columnsAlign, ...col}"
>
<template v-if="col.formatter && typeof col.formatter !== 'function'" v-slot:default="{row, column, index}">
@@ -163,7 +167,7 @@ import getLocatedSlotKeys from './utils/extract-keys'
import transformSearchImmediatelyItem from './utils/search-immediately-item'
import isFalsey from './utils/is-falsey'
import merge from 'deepmerge'
const defaultFirstPage = 0
const defaultFirstPage = 1
const noPaginationDataPath = 'payload'
export default {
@@ -422,7 +426,6 @@ export default {
onEdit: {
type: Function,
default(row) {
// console.log('On delete row')
}
},
/**
@@ -719,6 +722,10 @@ export default {
default(row, index) {
return true
}
},
totalData: {
type: Array,
default: null
}
},
data() {
@@ -806,6 +813,13 @@ export default {
},
_searchForm() {
return transformSearchImmediatelyItem(this.collapseForm, this)
},
lastPageNum() {
// page
const pageOffset = this.firstPage - defaultFirstPage
const pageCount = Math.ceil(this.total / this.size)
const lastPageNum = pageCount + pageOffset
return lastPageNum
}
},
watch: {
@@ -824,6 +838,13 @@ export default {
* @property {array} rows - 已选中的行数据的数组
*/
this.$emit('selection-change', val)
},
totalData(val) {
if (val && val.length !== this.total) {
this.page = defaultFirstPage
this.total = val.length
this.getList()
}
}
},
mounted() {
@@ -840,6 +861,9 @@ export default {
}
}
}
if (this.totalData) {
this.getList()
}
},
methods: {
getQuery() {
@@ -873,12 +897,58 @@ export default {
}
return query
},
getPageData() {
return this.data
},
async gotoNextPage() {
if (!this.hasNextPage()) {
return false
}
this.page += 1
await this.getList({ loading: true })
},
hasNextPage() {
return this.page < this.lastPageNum
},
getList({ loading = true } = {}) {
const { url } = this
if (url) {
return this.getListFromRemote({ loading: loading })
}
if (this.totalData) {
return this.getListFromStaticData({ loading: true })
}
// this.$log.debug("last page is: ", this.lastPageNum)
},
getListFromStaticData({ loading = true } = {}) {
if (loading) {
this.loading = true
}
if (!this.hasPagination) {
this.data = this.totalData
this.loading = false
if (this.isTree) {
this.data = this.tree2Array(this.data, this.expandAll)
}
return this.data
}
// page
const pageOffset = this.firstPage - defaultFirstPage
const page = this.page === 0 ? 1 : this.page
const start = (page + pageOffset - 1) * this.size
const end = (page + pageOffset) * this.size
this.$log.debug(`page: ${page}, size: ${this.size}, start: ${start}, end: ${end}`)
this.data = this.totalData.slice(start, end)
this.loading = false
this.data = this.tree2Array(this.data, this.expandAll)
return this.data
},
/**
* 手动刷新列表数据,选项的默认值为: { loading: true }
* @public
* @param {object} options 方法选项
*/
getList({ loading = true } = {}) {
getListFromRemote({ loading = true } = {}) {
const { url } = this
if (!url) {
return
@@ -1006,7 +1076,7 @@ export default {
},
handleSizeChange(val) {
if (this.size === val) return
this.$emit('sizeChange', val)
this.page = defaultFirstPage
this.size = val
this.getList()

View File

@@ -1,9 +1,17 @@
<template>
<ElDatableTable ref="table" class="el-table" v-bind="tableConfig" @update="onUpdate" v-on="iListeners" />
<ElDatableTable
ref="table"
class="el-table"
v-bind="tableConfig"
@update="onUpdate"
v-on="iListeners"
@sizeChange="handleSizeChange"
/>
</template>
<script>
import { default as ElDatableTable } from './compenents/el-data-table'
import { mapGetters } from 'vuex'
export default {
name: 'DataTable',
@@ -58,7 +66,6 @@ export default {
pageCount: 5,
paginationLayout: 'total, sizes, prev, pager, next',
paginationSizes: [15, 30, 50, 100],
paginationSize: 15,
paginationBackground: true,
transformQuery: query => {
if (query.page && query.size) {
@@ -85,12 +92,25 @@ export default {
},
computed: {
tableConfig() {
const config = Object.assign(this.defaultConfig, this.config)
const tableDefaultConfig = this.defaultConfig
tableDefaultConfig.paginationSize = _.get(this.globalTableConfig, 'paginationSize', 15)
let tableAttrs = tableDefaultConfig.tableAttrs
if (this.config.tableAttrs) {
tableAttrs = Object.assign(tableAttrs, this.config.tableAttrs)
}
const config = Object.assign(tableDefaultConfig, this.config)
config.tableAttrs = tableAttrs
return config
},
iListeners() {
return Object.assign({}, this.$listeners, this.tableConfig.listeners)
}
},
dataTable() {
return this.$refs.table
},
...mapGetters({
'globalTableConfig': 'tableConfig'
})
},
watch: {
config: {
@@ -131,6 +151,14 @@ export default {
this.toggleRowSelection(row, true)
}
}
},
handleSizeChange(val) {
this.$store.commit('table/SET_TABLE_CONFIG',
{
key: 'paginationSize',
value: val
}
)
}
}
}

View File

@@ -1,14 +1,50 @@
<template>
<div>
<ul v-show="loading" class="ztree">
{{ this.$t('common.tree.Loading') }}...
</ul>
<div v-show="!loading" class="treebox">
<ul :id="iZTreeID" class="ztree">
<div
v-if="treeSetting.customTreeHeader"
class="tree-header treebox"
>
<div class="content">
<span class="title">
{{ treeSetting.customTreeHeaderName }}
</span>
<span class="tree-banner-icon-zone">
<a id="searchIcon" class="tree-search special">
<i
class="fa fa-search tree-banner-icon"
@click.stop="treeSearch"
/>
<input
id="searchInput"
v-model="treeSearchValue"
type="text"
autocomplete="off"
class="tree-input"
>
</a>
<i
class="fa fa-refresh tree-banner-icon"
style="margin-right: 2px;"
@click.stop="refresh"
/>
</span>
</div>
<ul v-show="loading" class="ztree">
{{ this.$t('common.tree.Loading') }}...
</ul>
<div v-if="treeSetting.treeUrl===''">
{{ this.$t('common.tree.Empty') }}<a id="tree-refresh"><i class="fa fa-refresh" /></a>
<ul v-show="!loading" :id="iZTreeID" class="ztree" />
<div v-if="treeSetting.treeUrl===''" class="tree-empty">
{{ this.$t('common.tree.Empty') }}
</div>
</div>
<div v-else class="treebox">
<ul v-show="loading" class="ztree">
{{ this.$t('common.tree.Loading') }}...
</ul>
<ul v-show="!loading" :id="iZTreeID" class="ztree" />
<div v-if="treeSetting.treeUrl===''" class="tree-empty">
{{ this.$t('common.tree.Empty') }}
<a id="tree-refresh"><i class="fa fa-refresh" /></a>
</div>
</div>
<div :id="iRMenuID" class="rMenu">
@@ -24,6 +60,7 @@
// eslint-disable-next-line no-unused-vars
import $ from '@/utils/jquery-vendor.js'
import '@ztree/ztree_v3/js/jquery.ztree.all.min.js'
import '@ztree/ztree_v3/js/jquery.ztree.exhide.min.js'
import '@/styles/ztree.css'
import axiosRetry from 'axios-retry'
@@ -45,7 +82,8 @@ export default {
zTree: '',
rMenu: '',
init: false,
loading: false
loading: false,
treeSearchValue: ''
}
},
computed: {
@@ -54,8 +92,9 @@ export default {
}
},
mounted() {
window.refresh = this.refresh
window.treeSearch = this.treeSearch
this.initTree()
// $('.treebox').css('height', window.innerHeight - 60)
},
beforeDestroy() {
$.fn.zTree.destroy(this.iZTreeID)
@@ -82,9 +121,7 @@ export default {
retryDelay: () => { return 5000 }
}
}).then(res => {
if (!res) {
res = []
}
if (!res) res = []
if (res.length === 0) {
res.push({
name: this.$t('common.tree.Empty')
@@ -94,13 +131,13 @@ export default {
if (this.init) {
vm.zTree.destroy()
}
this.zTree = $.fn.zTree.init($(`#${this.iZTreeID}`), this.treeSetting, res)
if (this.treeSetting.showRefresh) {
this.rootNodeAddDom(
this.zTree,
this.treeSetting.callback.refresh
)
if (!this.treeSetting.customTreeHeader) {
this.rootNodeAddDom(this.zTree)
}
// 手动上报事件, Tree加载完成
this.$emit('TreeInitFinish', this.zTree)
if (this.treeSetting.showMenu) {
this.rMenu = $(`#${this.iRMenuID}`)
@@ -113,43 +150,196 @@ export default {
vm.init = true
})
},
rootNodeAddDom: function(ztree, callback) {
const vm = this
const refreshIcon = "<a id='tree-refresh'><i class='fa fa-refresh'></i></a>"
rootNodeAddDom(ztree) {
const { showSearch, showRefresh } = this.treeSetting
const searchIcon = `<a class="tree-search" id="searchIcon">
<i class='fa fa-search tree-banner-icon' onclick="treeSearch()" /></i>
<input type="text" autocomplete="off" id="searchInput" class="tree-input" />
</a>`
const refreshIcon = "<a id='tree-refresh' onclick='refresh()'><i class='fa fa-refresh'></i></a>"
const treeActions = `${showSearch ? searchIcon : ''}${showRefresh ? refreshIcon : ''}`
const icons = `<span class="">${treeActions}</span>`
const rootNode = ztree.getNodes()[0]
let $rootNodeRef
if (rootNode) {
$rootNodeRef = $('#' + rootNode.tId + '_a')
$rootNodeRef.after(refreshIcon)
} else {
$rootNodeRef = $('#' + ztree.setting.treeId)
$rootNodeRef.html(refreshIcon)
const $rootNodeRef = $('#' + rootNode.tId + '_a')
$rootNodeRef.after(icons)
}
const refreshIconRef = $('#tree-refresh')
refreshIconRef.bind('click', function() {
const result = callback()
if (result && result.then) {
result.finally(() => {
vm.initTree()
})
} else {
vm.initTree()
}
})
},
refresh: function() {
const refreshIconRef = $('#tree-refresh')
refreshIconRef.click()
refresh() {
this.treeSearchValue = ''
const result = this.treeSetting?.callback?.refresh()
if (result && result.then) {
result.finally(() => {
this.initTree()
})
} else {
this.initTree()
}
},
treeSearch() {
const searchIcon = document.getElementById(`searchIcon`)
const searchInput = document.getElementById(`searchInput`)
searchIcon.classList.toggle('active')
searchInput.focus()
searchInput.onclick = (e) => {
e.stopPropagation()
}
searchInput.onblur = (e) => {
e.stopPropagation()
if (!(e.target.value)) {
searchIcon.classList.toggle('active')
}
}
searchInput.oninput = _.debounce((e) => {
e.stopPropagation()
const value = e.target.value || ''
if (this.treeSetting.async.enable) {
this.filterAssetsServer(value)
} else {
this.filterTree(value)
}
}, 600)
},
getCheckedNodes: function() {
return this.zTree.getCheckedNodes(true)
},
recurseParent(node) {
const parentNode = node.getParentNode()
if (parentNode && parentNode.pId) {
return [parentNode, ...this.recurseParent(parentNode)]
} else if (parentNode) {
return [parentNode]
} else {
return []
}
},
recurseChildren(node) {
if (!node.isParent) {
return []
}
const children = node.children
if (!children) {
return []
}
let allChildren = []
children.forEach((n) => {
allChildren = [...children, ...this.recurseChildren(n)]
})
return allChildren
},
groupBy(array, filter) {
const groups = {}
array.forEach(function(o) {
const group = JSON.stringify(filter(o))
groups[group] = groups[group] || []
groups[group].push(o)
})
return Object.keys(groups).map(function(group) {
return groups[group]
})
},
filterTree(keyword, tree = this.zTree) {
if (!this.zTree) return
const searchNode = tree.getNodesByFilter((node) => node.id === 'search')
if (searchNode) tree.removeNode(searchNode[0])
const nodes = tree.transformToArray(tree.getNodes())
if (!keyword) {
tree.showNodes(nodes)
return
}
if (!keyword) {
if (tree.hiddenNodes) {
tree.showNodes(tree.hiddenNodes)
tree.hiddenNodes = null
}
if (tree.expandNodes) {
tree.expandNodes.forEach((node) => {
if (node.id !== nodes[0].id) {
tree.expandNode(node, false)
}
})
tree.expandNodes = null
}
return null
}
let shouldShow = []
const matchedNodes = tree.getNodesByFilter((node) => {
return node.name.toLowerCase().indexOf(keyword.toLowerCase()) > -1
})
if (matchedNodes.length < 1) {
let name = this.$t('common.Search')
const assetsAmount = matchedNodes.length
name = `${name} (${assetsAmount})`
const newNode = { id: 'search', name: name, isParent: false, open: false }
tree.addNodes(null, newNode)
}
matchedNodes.forEach((node) => {
const parents = this.recurseParent(node)
const children = this.recurseChildren(node)
shouldShow = [...shouldShow, ...parents, ...children, node]
})
tree.hiddenNodes = nodes
tree.expandNodes = shouldShow
tree.hideNodes(nodes)
tree.showNodes(shouldShow)
for (const node of shouldShow) {
if (node.isParent) {
tree.expandNode(node, true)
}
}
},
filterAssetsServer(keyword) {
if (!this.zTree) return
let searchNode = this.zTree.getNodesByFilter((node) => node.id === 'search')
if (searchNode) {
this.zTree.removeChildNodes(searchNode[0])
this.zTree.removeNode(searchNode[0])
}
const treeNodes = this.zTree.getNodes()
if (!keyword) {
if (treeNodes.length !== 0) {
this.zTree.showNodes(treeNodes)
}
return
}
if (treeNodes.length !== 0) {
this.zTree.hideNodes(treeNodes)
}
let treeUrl = this.treeSetting.treeUrl
const filterField = treeUrl.includes('?') ? `&search=${keyword}` : `?search=${keyword}`
if (treeUrl.indexOf('assets/nodes/children/tree') > -1) {
treeUrl = treeUrl + '&all=all'
}
const searchUrl = `${treeUrl}${filterField}`
this.$axios.get(searchUrl).then(nodes => {
let name = this.$t('common.Search')
const assetsAmount = nodes.length
name = `${name} (${assetsAmount})`
const newNode = { id: 'search', name: name, isParent: true, open: true, zAsync: true }
searchNode = this.zTree.addNodes(null, newNode)[0]
searchNode.zAsync = true
const nodesGroupByOrg = this.groupBy(nodes, (node) => {
return node.meta.data.org_name
})
for (const item of nodesGroupByOrg) {
this.zTree.addNodes(searchNode, item)
}
searchNode.open = true
})
return
}
}
}
</script>
<style lang='less' scoped>
<style lang='scss' scoped>
div.rMenu {
position: absolute;
visibility: hidden;
@@ -189,7 +379,7 @@ export default {
top: 100%;
z-index: 1000;
}
.ztree ::v-deep .fa-refresh {
.ztree ::v-deep .fa {
font: normal normal normal 14px/1 FontAwesome !important;
}
.dropdown a:hover {
@@ -216,4 +406,106 @@ export default {
height: 80vh;
overflow: auto;
}
::v-deep #tree-refresh {
margin-left: 3px;
}
::v-deep .tree-banner-icon-zone {
position: absolute;
right: 7px;
height: 30px;
overflow: hidden;
.fa {
color: #838385!important;;
&:hover {
color: #606266!important;;
}
}
}
::v-deep .tree-search {
position: relative;
top: -2px;
width: 20px;
height: 20px;
display: inline-block;
border-radius: 12px;
vertical-align: sub;
transition: .25s;
overflow: hidden;
.fa {
width: 13px!important;
}
.fa-search {
padding-top: 1px;
}
}
::v-deep .tree-search .tree-banner-icon {
position: absolute;
top: 1px;
left: 6px;
width: 6px;
height: 6px;
border-radius: 12px;
padding: 10px 6px;
overflow: hidden;
background-color: transparent!important;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
}
::v-deep .tree-search.active {
width: 160px;
background-color: #ffffff!important;
}
::v-deep .tree-search.active:hover {
border-radius: 12px;
}
::v-deep .tree-search input {
position: relative;
left: 20px;
width: 133px;
height: 100%;
background-color: #ffffff!important;
color: #606266;
display: flex;
justify-content: center;
align-items: center;
border: none;
outline: none;
}
.tree-header {
position: relative;
.title {
font-weight: 500;
}
.content {
height: 30px;
line-height: 30px;
border-bottom: 1px solid #e0e0e0;
border-radius: 3px;
padding: 0 5px;
box-sizing: border-box;
overflow: hidden;
cursor: pointer;
background-color: #D7D8DC;
.rotate {
transition: all .1.8s;
transform: rotate(-90deg);
}
.fa-caret-down {
font-size: 16px;
}
.special {
top: 1px!important;
}
}
}
.tree-empty {
margin-left: 4px;
}
</style>

View File

@@ -1,5 +1,5 @@
<template>
<ZTree ref="ztree" :setting="treeSetting">
<ZTree ref="ztree" :setting="treeSetting" v-on="$listeners">
<!--Slot透传-->
<div slot="rMenu" slot-scope="{data}">
<slot name="rMenu" :data="data" />
@@ -72,7 +72,7 @@ export default {
},
methods: {
defaultCallback: function(action) {
// console.log(action)
// debug(action)
}
}
}

View File

@@ -28,13 +28,30 @@ export default {
return this.formatter(this.item, this.value)
}
if (typeof this.value === 'boolean') {
return <span>{this.toChoicesDisplay(this.value)}</span>
return (
<span class='item-value'>{this.toChoicesDisplay(this.value)}</span>
)
}
return <span>{this.value}</span>
if (this.value instanceof Array) {
const newArr = this.value || []
return (
<span class='item-value'>
{
newArr.map((item, index) => <div key={index}>{item.key}{item.value} </div>)
}
</span>
)
}
return (
<span class='item-value'>{this.value}</span>
)
}
}
</script>
<style scoped>
.item-value {
word-break: break-word;
}
</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
@@ -55,7 +62,11 @@ export default {
},
data() {
return {
}
},
computed: {
iWidth() {
return this.$store.getters.isMobile ? '80%' : this.width
}
},
methods: {
@@ -74,4 +85,8 @@ export default {
/*padding-top: 10px;*/
}
.dialog-footer {
padding-right: 20px;
}
</style>

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;
height: 32x;
}
/*.el-date-editor ::v-deep .el-input__icon{*/
/* line-height: 28px;*/
/*}*/
.el-date-editor ::v-deep .el-range-separator{
line-height: 28px;
}

View File

@@ -0,0 +1,74 @@
<template>
<div class="json-editor">
<JsonEditor
v-model="resultInfo"
:show-btns="false"
:mode="'code'"
@json-change="onJsonChange"
@json-save="onJsonSave"
@has-error="onError"
/>
</div>
</template>
<script>
import JsonEditor from 'vue-json-editor'
export default {
components: { JsonEditor },
props: {
value: {
type: String,
default: () => ''
}
},
data() {
return {
hasJsonFlag: true, // json是否验证通过
resultInfo: {}
}
},
created() {
this.resultInfo = JSON.parse(this.value)
},
methods: {
// 数据改变
onJsonChange(value) {
this.onJsonSave(value)
},
// 保存
onJsonSave(value) {
this.resultInfo = value
this.hasJsonFlag = true
setTimeout(() => {
this.$emit('change', JSON.stringify(this.resultInfo))
}, 500)
},
onError: _.debounce(function(value) {
this.$message.error(this.$t('common.FormatError'))
}, 1100)
}
}
</script>
<style lang="scss" scoped>
@import "~@/styles/variables.scss";
.json-editor {
&>>> .jsoneditor {
border: 1px solid #e5e6e7;
}
&>>> .jsoneditor-compact {
display: none;
}
&>>> .jsoneditor-modes {
display: none;
}
&>>> .jsoneditor-poweredBy {
display: none;
}
&>>> .jsoneditor-menu {
background: var(--color-primary);
border-bottom: 1px solid var(--color-primary);
}
}
</style>

View File

@@ -0,0 +1,34 @@
<template>
<el-link :disabled="disabled" @click="onClick">
{{ title }}
</el-link>
</template>
<script>
export default {
name: 'Link',
props: {
href: {
type: String,
default: ''
},
title: {
type: String,
default: ''
},
disabled: {
type: Boolean,
default: false
}
},
methods: {
onClick() {
window.open(this.href)
}
}
}
</script>
<style scoped>
</style>

View File

@@ -1,5 +1,5 @@
<template>
<password
<Password
:value="value"
v-bind="iAttrs"
class="el-input password-input"
@@ -32,7 +32,8 @@ export default {
const defaultAttrs = {
secureLength: 7,
defaultClass: 'el-input__inner',
toggle: true
toggle: true,
showStrengthMeter: false
}
return Object.assign(defaultAttrs, this.attrs)
}
@@ -46,17 +47,16 @@ export default {
</script>
<style lang="scss" scoped>
@import "~@/styles/element-variables.scss";
.password-input >>> .Password__badge--error {
background-color: $--color-danger;
background-color: var(--color-danger);
}
.password-input >>> .Password__strength-meter--fill[data-score="4"] {
background: $--color-primary;
background: var(--color-success);
width: 100%;
}
.password-input >>> .Password__badge--success {
background: $--color-primary;
background: var(--color-success);
}
.password-input >>> .Password__strength-meter {

View File

@@ -2,15 +2,17 @@
<el-select
ref="select"
v-model="iValue"
v-loading="!initialized"
v-loadmore="loadMore"
:options="iOptions"
:remote="remote"
:remote-method="filterOptions"
:multiple="multiple"
filterable
:clearable="clearable"
filterable
popper-append-to-body
class="select2"
:disabled="selectDisabled"
v-bind="$attrs"
@change="onChange"
@visible-change="onVisibleChange"
@@ -84,9 +86,14 @@ export default {
disabledValues: {
type: Array,
default: () => []
},
disabled: {
type: Boolean,
default: false
}
},
data() {
const vm = this
const defaultPageSize = 10
const defaultParams = {
search: '',
@@ -94,10 +101,22 @@ 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,
iValue: this.value ? this.value : [],
defaultParams: _.cloneDeep(defaultParams),
params: _.cloneDeep(defaultParams),
iOptions: this.options || [],
@@ -112,6 +131,18 @@ export default {
optionsValues() {
return this.iOptions.map((v) => v.value)
},
iValue: {
set(val) {
const noValue = !this.value || this.value.length === 0
if (noValue && !this.initialized) {
return
}
this.$emit('input', val)
},
get() {
return this.value
}
},
iAjax() {
const defaultPageSize = 10
const defaultMakeParams = (params) => {
@@ -131,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 = {
@@ -142,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 } : {})
}
@@ -161,11 +202,14 @@ export default {
this.iValue = iNew
}
},
mounted() {
async mounted() {
// this.$log.debug('Select2 url is: ', this.iAjax.url)
if (!this.initialized) {
this.initialSelect()
this.initialized = true
await this.initialSelect()
setTimeout(() => {
this.iValue = this.value
this.initialized = true
})
}
this.$nextTick(() => {
// elform
@@ -207,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) {
@@ -227,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
}
@@ -243,9 +295,13 @@ export default {
// this.$log.debug('Select ajax config', this.iAjax)
if (this.iAjax.url) {
if (this.value && this.value.length !== 0) {
this.$log.debug('Start init select2 value')
const data = await createSourceIdCache(this.value)
this.params.spm = data.spm
this.$log.debug('Start init select2 value, ', this.value)
let value = this.value
if (!Array.isArray(value)) {
value = [value]
}
const data = await createSourceIdCache(value)
this.params.spm = data['spm']
await this.getInitialOptions()
}
await this.getOptions()
@@ -301,4 +357,8 @@ export default {
.select2 {
width: 100%;
}
.select2 >>> .el-tag.el-tag--info {
height: auto;
white-space: normal;
}
</style>

View File

@@ -1,8 +1,8 @@
<template>
<el-switch
v-model="iValue"
:active-color="activeColor"
inactive-color="#dcdfe6"
:class="type"
v-bind="$attrs"
v-on="$listeners"
/>
@@ -26,21 +26,6 @@ export default {
}
},
computed: {
activeColor() {
// $--color-primary: #1ab394;
// $--color-success: #1c84c6;
// $--color-info: #23c6c8;
// $--color-warning: #f8ac59;
// $--color-danger: #ed5565;
switch (this.type) {
case 'primary':
return '#1ab394'
case 'danger':
return '#ed5565'
default:
return '#1ab394'
}
},
iValue: {
set: function(newValue) {
this.$emit('input', newValue)

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

@@ -0,0 +1,60 @@
<template>
<div>
<el-button v-show="!isShow" type="text" icon="el-icon-edit" @click="isShow=true">
{{ text }}
</el-button>
<el-input
v-show="isShow"
v-model.trim="curValue"
show-password
:type="type"
autocomplete="new-password"
:placeholder="placeholder"
@change="onChange"
/>
</div>
</template>
<script>
export default {
props: {
value: {
type: String,
default: () => ''
},
type: {
type: String,
default: () => 'input'
},
text: {
type: String,
default() {
return this.$t('common.Update')
}
},
placeholder: {
type: String,
default: () => ''
}
},
data() {
return {
isShow: false,
curValue: this.value
}
},
created() {
if (this.$route.path.indexOf('/create') !== -1) {
this.isShow = true
}
},
methods: {
onChange(e) {
this.$emit('input', this.curValue)
}
}
}
</script>
<style scoped>
</style>

View File

@@ -1,6 +1,10 @@
<template>
<div>
<input type="file" @change="Onchange">
<input ref="upLoadFile" type="file" style="display: none" @change="Onchange">
<el-button size="mini" @click.native.stop="onUpLoad">
{{ this.$t('common.SelectFile') }}
</el-button>
<span>{{ fileName }}</span>
<div v-if="tip !== ''">{{ tip }}</div>
<input v-model="value" type="text" hidden v-on="$listeners">
<div>
@@ -23,6 +27,7 @@ export default {
},
data() {
return {
fileName: '',
initial: this.value,
preview: this.value
}
@@ -34,16 +39,21 @@ export default {
}
},
methods: {
onUpLoad() {
this.$refs.upLoadFile.click()
},
onInput(val) {
this.$emit('input', val)
},
Onchange(e) {
if (e.target.files[0] === undefined) {
const upLoadFile = e.target.files[0]
if (upLoadFile === undefined) {
this.$emit('input', this.initial)
return
}
this.$emit('fileChange', e.target.files[0])
this.$emit('input', this.getObjectURL(e.target.files[0]))
this.fileName = upLoadFile?.name || ''
this.$emit('fileChange', upLoadFile)
this.$emit('input', this.getObjectURL(upLoadFile))
},
getObjectURL(file) {
let url = null

View File

@@ -0,0 +1,70 @@
<template>
<div class="upload-key">
<input ref="upLoadFile" type="file" style="display: none" @change="onChange">
<el-button v-if="!fingerprint" size="mini" @click.native.stop="onUpLoad">
{{ this.$t('common.SelectFile') }}
</el-button>
<span v-else>
<el-button type="text" icon="el-icon-edit" @click.native.stop="onUpLoad">
{{ this.$t('common.Update') }}
</el-button>
<span v-if="!fileName" class="fingerprint">{{ fingerprint }}</span>
</span>
<span>{{ fileName }}</span>
<div v-if="tip !== ''">{{ tip }}</div>
</div>
</template>
<script>
export default {
props: {
tip: {
type: String,
default: () => ''
},
toFormat: {
type: String,
default: () => 'string'
},
fingerprint: {
type: String,
default: ''
}
},
data() {
return {
fileName: ''
}
},
methods: {
onUpLoad() {
this.$refs.upLoadFile.click()
},
onChange(e) {
const upLoadFile = e.target.files
if (upLoadFile.length === 0) {
return
}
const vm = this
this.fileName = upLoadFile[0].name || ''
const reader = new FileReader()
reader.onload = function() {
let result = this.result
if (vm.toFormat === 'object' && vm.fileName.endsWith('.json')) {
result = JSON.parse(result)
}
vm.$emit('input', result)
}
reader.readAsText(
upLoadFile[0]
)
}
}
}
</script>
<style scoped>
.fingerprint {
font-size: 12px
}
</style>

View File

@@ -7,7 +7,7 @@
</template>
<script>
import PasswordInput from '../PasswordInput'
import PasswordInput from './PasswordInput'
import { mapGetters } from 'vuex'
import store from '@/store'
import i18n from '@/i18n/i18n'
@@ -22,22 +22,26 @@ export default {
}
},
rules(item) {
let userIsOrgAdmin = item.el.userIsOrgAdmin
// undefined 使使
userIsOrgAdmin = userIsOrgAdmin === undefined ? store.getters.currentUserIsAdmin : userIsOrgAdmin
const passwordRule = store.getters.publicSettings.PASSWORD_RULE
const validatePassword = (rule, value, callback) => {
const validatePassword = function(rule, value, callback) {
if (!value) {
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')])
}
@@ -46,7 +50,10 @@ export default {
return callback(new Error(msg))
}
}
const 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
}
if (value.length < secureLength) {
return callback(new Error(i18n.t('common.password.MIN_LENGTH_ERROR', [secureLength])))
}
@@ -59,17 +66,13 @@ export default {
data() {
return {
attrs: {
secureLength: 7
showStrengthMeter: true
}
}
},
computed: {
...mapGetters(['publicSettings'])
},
created() {
const passwordRule = this.publicSettings.PASSWORD_RULE || {}
this.attrs.secureLength = passwordRule ? passwordRule.SECURITY_PASSWORD_MIN_LENGTH : 7
},
methods: {
handleInput(value) {
this.$emit('input', value)

View File

@@ -0,0 +1,409 @@
<template>
<div class="c-weektime">
<div class="c-schedue" />
<div :class="{'c-schedue': true, 'c-schedue-notransi': mode}" :style="styleValue" />
<table class="c-weektime-table" :class="{'c-min-table': colspan < 2}">
<thead class="c-weektime-head">
<tr>
<th rowspan="8" class="week-td">{{ this.$t('common.WeekCronSelect.WeekOrTime') }}</th>
<th :colspan="12 * colspan">00:00 - 12:00</th>
<th :colspan="12 * colspan">12:00 - 24:00</th>
</tr>
<tr>
<td v-for="t in theadArr" :key="t" :colspan="colspan">{{ t }}</td>
</tr>
</thead>
<tbody class="c-weektime-body">
<tr v-for="t in weektimeData" :key="t.row">
<td>{{ t.value }}</td>
<td
v-for="n in t.child"
:key="`${n.row}-${n.col}`"
:data-week="n.row"
:data-time="n.col"
:class="selectClasses(n)"
class="weektime-atom-item"
@mouseenter="cellEnter(n)"
@mousedown="cellDown(n)"
@mouseup="cellUp(n)"
/>
</tr>
<tr>
<td colspan="49" class="c-weektime-preview">
<div class="g-clearfix c-weektime-con">
<span class="g-pull-left">{{ this.$t('common.WeekCronSelect.CanDragSelect') }}</span>
<a class="g-pull-right" @click.prevent="clearWeektime">{{ this.$t('common.WeekCronSelect.ClearSelection') }}</a>
<a class="g-pull-right g-pull-margin" @click.prevent="selectAll">{{ this.$t('common.WeekCronSelect.SelectAll') }}</a>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</template>
<script>
const createArr = len => {
return Array.from(Array(len)).map((ret, id) => id)
}
function splicing(list) {
let same
let i = -1
const len = list.length
const arr = []
if (!len) return
while (++i < len) {
const item = list[i]
if (item.check) {
if (item.check !== Boolean(same)) {
arr.push(...['、', item.begin, '~', item.end])
} else if (arr.length) {
arr.pop()
arr.push(item.end)
}
}
same = Boolean(item.check)
}
arr.shift()
return arr.join('')
}
export default {
name: 'WeekCronSelect',
props: {
value: {
type: Array,
default: () => []
},
colspan: {
type: Number,
default() {
return 2
}
}
},
data() {
return {
width: 0,
height: 0,
left: 0,
top: 0,
mode: 0,
row: 0,
col: 0,
theadArr: [],
weekArr: [
this.$t('common.WeekCronSelect.Monday'),
this.$t('common.WeekCronSelect.Tuesday'),
this.$t('common.WeekCronSelect.Wednesday'),
this.$t('common.WeekCronSelect.Thursday'),
this.$t('common.WeekCronSelect.Friday'),
this.$t('common.WeekCronSelect.Saturday'),
this.$t('common.WeekCronSelect.Sunday')
],
weektimeData: [],
timeRange: [] // 格式化之后数据
}
},
computed: {
styleValue() {
return {
width: `${this.width}px`,
height: `${this.height}px`,
left: `${this.left}px`,
top: `${this.top}px`
}
},
selectClasses() {
return n => n.check ? 'ui-selected' : ''
}
},
created() {
this.init()
if (this.value.length > 0) this.nextValue()
},
methods: {
// 初始化数据结构
init() {
this.theadArr = createArr(24)
const isData = this.weekArr.map((ret, index) => {
const children = (ret, row, max) => {
return createArr(max).map((t, col) => {
const curValue = this.formatWeektime(col)
return {
week: ret,
value: curValue,
begin: curValue.split('~')[0],
end: curValue.split('~')[1],
row: row,
col: col
}
})
}
return {
value: ret,
row: index,
child: children(ret, index, 48)
}
})
this.weektimeData = isData
},
// 反解析传递过来的默认值
nextValue() {
const deepValue = _.cloneDeep(this.value)
for (let i = 0, len = deepValue.length; i < len; i++) {
const cur = deepValue[i]
const curValue = cur?.value
if (curValue.length > 0) {
const childValue = curValue.split('、')
for (let j = 0; j < childValue.length; j++) {
const curJ = childValue[j]
this.renderWeekRange(curJ, cur.id)
}
}
}
},
// 渲染时间区间
renderWeekRange(val, id) {
const idNum = id === 0 ? 6 : id - 1
const [start, end] = val.split('~')
const startVal = this.countIndex(start)
const endVal = this.countIndex(end)
for (let i = startVal; i < (endVal === 0 ? 48 : endVal); i++) {
const curWeek = this.weektimeData[idNum]
curWeek.child[i].check = true
}
},
// 计算索引
countIndex(val) {
const one = val.substr(0, 2)
const a1 = one.startsWith('0') ? one.substr(1, 2) : one
var reg = RegExp(/30/)
const a2 = val.match(reg) ? 1 : 0
const curIndex = (a1 * 2) + a2
return curIndex
},
formatDate(date, fmt) {
const o = {
'M+': date.getMonth() + 1,
'd+': date.getDate(),
'h+': date.getHours(),
'm+': date.getMinutes(),
's+': date.getSeconds(),
'q+': Math.floor((date.getMonth() + 3) / 3),
'S': date.getMilliseconds()
}
if (/(y+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
}
for (var k in o) {
if (new RegExp('(' + k + ')').test(fmt)) {
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
}
}
return fmt
},
formatWeektime(col) {
const timeStamp = 1542384000000 // '2018-11-17 00:00:00'
const beginStamp = timeStamp + col * 1800000 // col * 30 * 60 * 1000
const endStamp = beginStamp + 1800000
const begin = this.formatDate(new Date(beginStamp), 'hh:mm')
const end = this.formatDate(new Date(endStamp), 'hh:mm')
return `${begin}~${end}`
},
// 清空时间段
clearWeektime() {
this.weektimeData.forEach(item => {
item.child.forEach(t => {
this.$set(t, 'check', false)
})
})
this.timeRange = []
this.$emit('change', this.timeRange)
},
// 全选
selectAll() {
this.weektimeData.forEach(item => {
item.child.forEach(t => {
this.$set(t, 'check', true)
})
})
this.setTimeRange()
},
setTimeRange() {
this.timeRange = this.weektimeData.map(item => {
return {
id: item.row === 6 ? 0 : item.row + 1,
value: splicing(item.child)
}
})
this.$emit('change', this.timeRange)
},
cellEnter(item) {
const ele = document.querySelector(`td[data-week='${item.row}'][data-time='${item.col}']`)
if (ele && !this.mode) {
this.left = ele.offsetLeft
this.top = ele.offsetTop
} else {
if (item.col <= this.col && item.row <= this.row) {
this.width = (this.col - item.col + 1) * ele.offsetWidth
this.height = (this.row - item.row + 1) * ele.offsetHeight
this.left = ele.offsetLeft
this.top = ele.offsetTop
} else if (item.col >= this.col && item.row >= this.row) {
this.width = (item.col - this.col + 1) * ele.offsetWidth
this.height = (item.row - this.row + 1) * ele.offsetHeight
if (item.col > this.col && item.row === this.row) this.top = ele.offsetTop
if (item.col === this.col && item.row > this.row) this.left = ele.offsetLeft
} else if (item.col > this.col && item.row < this.row) {
this.width = (item.col - this.col + 1) * ele.offsetWidth
this.height = (this.row - item.row + 1) * ele.offsetHeight
this.top = ele.offsetTop
} else if (item.col < this.col && item.row > this.row) {
this.width = (this.col - item.col + 1) * ele.offsetWidth
this.height = (item.row - this.row + 1) * ele.offsetHeight
this.left = ele.offsetLeft
}
}
},
cellDown(item) {
const ele = document.querySelector(`td[data-week='${item.row}'][data-time='${item.col}']`)
this.check = Boolean(item.check)
this.mode = 1
if (ele) {
this.width = ele.offsetWidth
this.height = ele.offsetHeight
}
this.row = item.row
this.col = item.col
},
cellUp(item) {
if (item.col <= this.col && item.row <= this.row) {
this.selectWeek([item.row, this.row], [item.col, this.col], !this.check)
} else if (item.col >= this.col && item.row >= this.row) {
this.selectWeek([this.row, item.row], [this.col, item.col], !this.check)
} else if (item.col > this.col && item.row < this.row) {
this.selectWeek([item.row, this.row], [this.col, item.col], !this.check)
} else if (item.col < this.col && item.row > this.row) {
this.selectWeek([this.row, item.row], [item.col, this.col], !this.check)
}
this.width = 0
this.height = 0
this.mode = 0
this.setTimeRange()
},
selectWeek(row, col, check) {
const [minRow, maxRow] = row
const [minCol, maxCol] = col
this.weektimeData.forEach(item => {
item.child.forEach(t => {
if (t.row >= minRow && t.row <= maxRow && t.col >= minCol && t.col <= maxCol) {
this.$set(t, 'check', check)
}
})
})
}
}
}
</script>
<style lang="scss" scoped>
.c-weektime {
min-width: 640px;
position: relative;
display: inline-block;
}
.c-schedue {
background: #598fe6;
position: absolute;
width: 0;
height: 0;
opacity: .6;
pointer-events: none;
}
.c-schedue-notransi {
transition: width .12s ease, height .12s ease, top .12s ease, left .12s ease;
}
.c-weektime-table {
border-collapse: collapse;
th {
vertical-align: inherit;
font-weight: bold;
}
tr {
height: 30px;
}
tr, td, th {
user-select: none;
border: 1px solid #dee4f5;
text-align: center;
min-width: 12px;
line-height: 1.6em;
transition: background .16s ease;
}
.c-weektime-head {
font-size: 12px;
.week-td {
width: 72px;
}
}
.c-weektime-body {
font-size: 12px;
td {
&.weektime-atom-item {
user-select: unset;
background-color: #f5f5f5;
}
&.ui-selected {
background-color: #598fe6;
}
}
}
.c-weektime-preview {
line-height: 2.4em;
padding: 0 10px;
font-size: 13px;
.c-weektime-con {
line-height: 42px;
user-select: none;
}
.c-weektime-time {
text-align: left;
line-height: 2.4em;
p {
max-width: 625px;
line-height: 1.4em;
word-break: break-all;
margin-bottom: 8px;
}
}
}
}
.c-min-table {
tr, td, th {
min-width: 24px;
}
}
.g-clearfix {
&:after, &:before {
clear: both;
content: " ";
display: table;
}
}
.g-pull-left {
float: left;
}
.g-pull-right {
float: right;
color: #409eff!important;
}
.g-pull-margin {
margin-right: 12px;
}
.g-tip-text {
color: #999;
}
</style>

View File

@@ -0,0 +1,42 @@
import DatetimeRangePicker from './DatetimeRangePicker'
import Link from './Link'
import PasswordInput from './PasswordInput'
import Select2 from './Select2'
import Swicher from './Swicher'
import UploadField from './UploadField'
import UploadKey from './UploadKey'
import UserPassword from './UserPassword'
import WeekCronSelect from './WeekCronSelect'
import UpdateToken from './UpdateToken'
import JsonEditor from './JsonEditor'
import Text from './Text'
export default {
DatetimeRangePicker,
Link,
PasswordInput,
Select2,
Swicher,
UploadKey,
UploadField,
UserPassword,
WeekCronSelect,
UpdateToken,
JsonEditor,
Text
}
export {
DatetimeRangePicker,
Link,
PasswordInput,
Select2,
Swicher,
UploadKey,
UploadField,
UserPassword,
WeekCronSelect,
UpdateToken,
JsonEditor,
Text
}

View File

@@ -1,20 +1,24 @@
<template>
<div class="form-group-header">
<div v-if="line" class="hr-line-dashed" />
<h3>{{ title }}</h3>
<h3>{{ group.title }}</h3>
</div>
</template>
<script>
export default {
props: {
title: {
type: String,
default: 'Title'
},
line: {
type: Boolean,
default: true
},
index: {
type: Number,
default: 1
},
group: {
type: Object,
default: () => ({})
}
}
}

View File

@@ -3,7 +3,7 @@
</template>
<script type="text/jsx">
import { DetailFormatter, SystemUserFormatter } from '@/components/ListTable/formatters'
import { DetailFormatter, SystemUserFormatter } from '@/components/TableFormatters'
import TreeTable from '../TreeTable'
export default {
@@ -27,7 +27,7 @@ export default {
vm.tableConfig.initialUrl = vm.tableConfig.url
}
const initialUrl = vm.tableConfig.initialUrl
const nodeId = node.meta.node.id
const nodeId = node.meta.data.id
const url = initialUrl.replace('/assets/', `/nodes/${nodeId}/assets/`)
vm.tableConfig.url = url
}

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>
@@ -23,13 +21,15 @@ export default {
}
</script>
<style scoped>
<style lang="scss" scoped>
@import "~@/styles/variables.scss";
.hamburger {
padding: 7px 12px;
display: inline-block;
vertical-align: middle;
font-size: 20px;
color: $menuText;
}
.hamburger.is-active {
transform: rotate(180deg);
}
</style>

View File

@@ -1,6 +1,6 @@
<template>
<IBox v-bind="$attrs">
<div class="ibox-heading">
<div v-if="contentHeading" class="ibox-heading">
<slot name="content-heading">
<h3 v-if="contentHeading.title"><i v-if="contentHeading.fa" :class="'fa ' + contentHeading.fa" /> {{ contentHeading.title }}</h3>
<small v-if="contentHeading.content"><i class="fa fa-tim" /> {{ contentHeading.content }}</small>
@@ -18,7 +18,7 @@ export default {
props: {
contentHeading: {
type: Object,
default: () => ({})
default: null
}
}
}

View File

@@ -1,24 +1,46 @@
<template>
<Dialog v-if="showExportDialog" :title="$t('common.Export')" :visible.sync="showExportDialog" :destroy-on-close="true" @confirm="handleExportConfirm()" @cancel="handleExportCancel()">
<el-form label-position="left" style="padding-left: 50px">
<el-form-item class="export-form" :label="this.$t('common.imExport.ExportRange')" :label-width="'100px'">
<el-radio-group v-model="exportOption">
<el-radio v-for="option of exportOptions" :key="option.value" class="export-item" :label="option.value" :disabled="!option.can">{{ option.label }}</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
</Dialog>
<div>
<UserConfirmDialog
v-if="mfaDialogShow"
:url="url"
@UserConfirmDone="showExportDialog"
@UserConfirmCancel="handleExportCancel"
/>
<Dialog
v-if="exportDialogShow"
:title="$t('common.Export')"
:visible.sync="exportDialogShow"
:destroy-on-close="true"
@confirm="handleExportConfirm()"
@cancel="handleExportCancel()"
>
<el-form label-position="left" style="padding-left: 50px">
<el-form-item :label="$t('common.fileType' )" :label-width="'100px'">
<el-radio-group v-model="exportTypeOption">
<el-radio v-for="option of exportTypeOptions" :key="option.value" style="padding: 10px 20px;" :label="option.value" :disabled="!option.can">{{ option.label }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item class="export-form" :label="this.$t('common.imExport.ExportRange')" :label-width="'100px'">
<el-radio-group v-model="exportOption">
<el-radio v-for="option of exportOptions" :key="option.value" class="export-item" :label="option.value" :disabled="!option.can">{{ option.label }}</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
</Dialog>
</div>
</template>
<script>
import Dialog from '@/components/Dialog'
import UserConfirmDialog from '@/components/UserConfirmDialog'
import { createSourceIdCache } from '@/api/common'
import * as queryUtil from '@/components/DataTable/compenents/el-data-table/utils/query'
export default {
name: 'ExportDialog',
components: {
Dialog
Dialog,
UserConfirmDialog
},
props: {
selectedRows: {
@@ -27,12 +49,20 @@ export default {
},
url: {
type: String,
default: () => ''
default: ''
},
beforeExport: {
type: Function,
default: () => {}
},
mfaVerifyRequired: {
type: Boolean,
default: false
},
performExport: {
type: Function,
default(selectedRows, exportOptions, query) {
return this.defaultPerformExport(selectedRows, exportOptions, query)
default(selectedRows, exportOptions, query, exportType) {
return this.defaultPerformExport(selectedRows, exportOptions, query, exportType)
}
},
canExportAll: {
@@ -50,9 +80,12 @@ export default {
},
data() {
return {
showExportDialog: false,
exportDialogShow: false,
exportOption: 'all',
meta: {}
exportTypeOption: 'csv',
meta: {},
mfaVerified: false,
mfaDialogShow: false
}
},
computed: {
@@ -60,11 +93,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']
@@ -92,21 +125,50 @@ export default {
can: this.tableHasQuery && this.canExportFiltered
}
]
},
exportTypeOptions() {
return [
{
label: 'CSV',
value: 'csv',
can: true
},
{
label: 'Excel',
value: 'xlsx',
can: true
}
]
}
},
mounted() {
this.$eventBus.$on('showExportDialog', (row) => {
this.showExportDialog = true
this.$eventBus.$on('showExportDialog', ({ selectedRows, url, name }) => {
// Todo: 没有时间了,只能先这么处理了
if (url === this.url || url.indexOf(this.url) > -1 || url.indexOf('account') > -1) {
this.showExportDialog()
}
})
},
methods: {
showExportDialog() {
if (!this.mfaVerifyRequired) {
this.exportDialogShow = true
return
}
// 这是需要校验 MFA 的
if (!this.mfaDialogShow) {
this.mfaDialogShow = true
} else {
this.exportDialogShow = true
}
},
downloadCsv(url) {
const a = document.createElement('a')
a.href = url
a.click()
window.URL.revokeObjectURL(url)
},
async defaultPerformExport(selectRows, exportOption, q) {
async defaultPerformExport(selectRows, exportOption, q, exportTypeOption) {
const url = (process.env.VUE_APP_ENV === 'production') ? (`${this.url}`) : (`${process.env.VUE_APP_BASE_API}${this.url}`)
const query = Object.assign({}, q)
if (exportOption === 'selected') {
@@ -117,13 +179,8 @@ export default {
}
const spm = await createSourceIdCache(resources)
query['spm'] = spm.spm
} else if (exportOption === 'filtered') {
// console.log(listTableRef)
// console.log(listTableRef.dataTable)
// delete query['limit']
// delete query['offset']
}
query['format'] = 'csv'
query['format'] = exportTypeOption
const queryStr =
(url.indexOf('?') > -1 ? '&' : '?') +
queryUtil.stringify(query, '=', '&')
@@ -131,17 +188,23 @@ export default {
},
async handleExport() {
const listTableRef = this.$parent.$parent.$parent.$parent
const query = listTableRef.dataTable.getQuery()
const query = listTableRef['dataTable'].getQuery()
delete query['limit']
delete query['offset']
return this.performExport(this.selectedRows, this.exportOption, query)
await this.beforeExport()
return this.performExport(this.selectedRows, this.exportOption, query, this.exportTypeOption)
},
async handleExportConfirm() {
await this.handleExport()
this.showExportDialog = false
this.exportDialogShow = false
this.mfaDialogShow = false
},
handleExportCancel() {
this.showExportDialog = false
const vm = this
setTimeout(() => {
vm.exportDialogShow = false
vm.mfaDialogShow = false
}, 100)
}
}
}

View File

@@ -1,7 +1,7 @@
<template>
<div>
<ExportDialog :selected-rows="selectedRows" :url="url" v-bind="$attrs" v-on="$listeners" />
<ImportDialog :selected-rows="selectedRows" :url="url" v-bind="$attrs" v-on="$listeners" />
<ExportDialog :selected-rows="selectedRows" v-bind="exportOptions" v-on="$listeners" />
<ImportDialog :selected-rows="selectedRows" v-bind="importOptions" v-on="$listeners" />
</div>
</template>
@@ -10,7 +10,7 @@ import ExportDialog from './ExportDialog'
import ImportDialog from './ImportDialog'
export default {
name: 'DialogAction',
name: 'ImExportDialog',
components: {
ExportDialog,
ImportDialog
@@ -20,9 +20,13 @@ export default {
type: Array,
default: () => []
},
url: {
type: String,
default: () => ''
exportOptions: {
type: Object,
default: () => ({})
},
importOptions: {
type: Object,
default: () => ({})
}
},
data() {

View File

@@ -1,59 +1,77 @@
<template>
<Dialog
:title="$t('common.Import')"
:title="importTitle"
:visible.sync="showImportDialog"
:destroy-on-close="true"
:close-on-click-modal="false"
:loading-status="loadStatus"
@confirm="handleImportConfirm"
@cancel="handleImportCancel()"
width="80%"
class="importDialog"
:show-cancel="false"
:show-confirm="false"
@close="handleImportCancel"
>
<el-form label-position="left" style="padding-left: 50px">
<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="1">{{ this.$t('common.Create') }}</el-radio>
<el-radio v-model="importOption" class="export-item" label="2">{{ 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 v-if="importOption==='1'" class="el-upload__tip">
{{ this.$t('common.imExport.downloadImportTemplateMsg') }}
<el-link type="success" :underline="false" :href="downloadImportTempUrl">{{ this.$t('common.Download') }}</el-link>
</span>
<span v-else class="el-upload__tip">
{{ this.$t('common.imExport.downloadUpdateTemplateMsg') }}
<el-link type="success" :underline="false" @click="downloadUpdateTempUrl">{{ this.$t('common.Download') }}</el-link>
<span class="el-upload__tip">
{{ downloadTemplateTitle }}
<el-link type="success" :underline="false" style="padding-left: 10px" @click="downloadTemplateFile('csv')"> CSV </el-link>
<el-link type="success" :underline="false" style="padding-left: 10px" @click="downloadTemplateFile('xlsx')"> XLSX </el-link>
</span>
</div>
</el-form-item>
<el-form-item :label="$t('common.Upload' )" :label-width="'100px'">
<el-form-item :label="$t('common.Upload' )" :label-width="'100px'" class="file-uploader">
<el-upload
ref="upload"
drag
action="string"
list-type="text/csv"
:http-request="handleImport"
:limit="1"
:auto-upload="false"
:on-change="onFileChange"
:before-upload="beforeUpload"
accept=".csv,.xlsx"
>
<el-button size="mini" type="default">{{ this.$t('common.SelectFile') }}</el-button>
<div slot="tip" :class="uploadHelpTextClass" style="line-height: 1.5">{{ this.$t('common.imExport.onlyCSVFilesTips') }}</div>
<i class="el-icon-upload" />
<div class="el-upload__text">{{ $t('common.imExport.dragUploadFileInfo') }}</div>
<div slot="tip" class="el-upload__tip">
<span :class="{'hasError': hasFileFormatOrSizeError }">{{ $t('common.imExport.uploadCsvLth10MHelpText') }}</span>
<div v-if="renderError" class="hasError">{{ renderError }}</div>
</div>
</el-upload>
</el-form-item>
</el-form>
<div v-if="errorMsg" class="error-msg error-results">
<ul v-if="typeof errorMsg === 'object'">
<li v-for="(item, index) in errorMsg" :key="item + '-' + index"> {{ item }}</li>
</ul>
<span v-else>{{ errorMsg }}</span>
<div v-else class="importTableZone">
<ImportTable
ref="importTable"
:json-data="jsonData"
:import-option="importOption"
:url="url"
@cancel="cancelUpload"
@finish="closeDialog"
/>
</div>
</Dialog>
</template>
<script>
import Dialog from '@/components/Dialog'
import ImportTable from '@/components/ListTable/TableAction/ImportTable'
import { getErrorResponseMsg } from '@/utils/common'
import { createSourceIdCache } from '@/api/common'
export default {
name: 'ImportDialog',
components: {
Dialog
Dialog,
ImportTable
},
props: {
selectedRows: {
@@ -63,92 +81,133 @@ export default {
url: {
type: String,
default: () => ''
},
canImportCreate: {
type: [Boolean, Function],
default: false
},
canImportUpdate: {
type: Boolean,
default: false
}
},
data() {
return {
showImportDialog: false,
importOption: '1',
isCsv: true,
importOption: this.canImportCreate && this.canImportUpdate ? 'create' : this.canImportCreate ? 'create' : 'update',
errorMsg: '',
loadStatus: false
loadStatus: false,
importTypeOption: 'csv',
importTypeIsCsv: true,
showTable: false,
renderError: '',
hasFileFormatOrSizeError: false,
jsonData: {}
}
},
computed: {
hasSelected() {
return this.selectedRows.length > 0
},
upLoadUrl() {
return this.url
},
downloadImportTempUrl() {
const url = (this.url.indexOf('?') === -1) ? `${this.url}?format=csv&template=import&limit=1` : `${this.url}&format=csv&template=import&limit=1`
return url
},
uploadHelpTextClass() {
const cls = ['el-upload__tip']
if (!this.isCsv) {
cls.push('error-msg')
}
return cls
},
downloadTemplateTitle() {
if (this.importOption === 'create') {
return this.$t('common.imExport.downloadImportTemplateMsg')
} else {
return this.$t('common.imExport.downloadUpdateTemplateMsg')
}
},
importTitle() {
if (this.importOption === 'create') {
return this.$t('common.Import') + this.$t('common.Create')
} else {
return this.$t('common.Import') + this.$t('common.Update')
}
}
},
watch: {
importOption(val) {
this.showTable = false
}
},
mounted() {
this.$eventBus.$on('showImportDialog', (row) => {
this.showImportDialog = true
this.$eventBus.$on('showImportDialog', ({ url }) => {
if (url === this.url) {
this.showImportDialog = true
}
})
},
methods: {
performUpdate(item) {
this.$axios.put(
this.upLoadUrl,
item.file,
{ headers: { 'Content-Type': 'text/csv' }, disableFlashErrorMsg: true }
).then((data) => {
const msg = this.$t('common.imExport.updateSuccessMsg', { count: data.length })
this.onSuccess(msg)
}).catch(error => {
this.catchError(error)
}).finally(() => {
this.loadStatus = false
})
closeDialog() {
this.showImportDialog = false
},
performCreate(item) {
this.$axios.post(
this.upLoadUrl,
item.file,
{ headers: { 'Content-Type': 'text/csv' }, disableFlashErrorMsg: true }
).then((data) => {
const msg = this.$t('common.imExport.createSuccessMsg', { count: data.length })
this.onSuccess(msg)
}).catch(error => {
this.catchError(error)
}).finally(() => {
this.loadStatus = false
})
cancelUpload() {
this.showTable = false
this.renderError = ''
this.jsonData = {}
},
catchError(error) {
this.$refs.upload.clearFiles()
if (error.response && error.response.status === 400) {
const errorData = error.response.data
const totalErrorMsg = []
errorData.forEach((value, index) => {
if (typeof value === 'string') {
totalErrorMsg.push(`line ${index}. ${value}`)
} else {
const errorMsg = [`line ${index}. `]
for (const [k, v] of Object.entries(value)) {
if (v) {
errorMsg.push(`${k}: ${v}`)
}
}
if (errorMsg.length > 1) {
totalErrorMsg.push(errorMsg.join(' '))
}
}
})
this.errorMsg = totalErrorMsg
onFileChange(file, fileList) {
fileList.splice(0, fileList.length)
if (file.status !== 'ready') {
return
}
// const isCsv = file.raw.type = 'text/csv'
if (!this.beforeUpload(file)) {
return
}
const isCsv = file.name.indexOf('csv') > -1
const url = new URL(this.url, 'http://localhost')
url.pathname += 'render-to-json/'
const renderToJsonUrl = url.toString().replace('http://localhost', '')
this.$axios.post(
renderToJsonUrl,
file.raw,
{ headers: { 'Content-Type': isCsv ? 'text/csv' : 'text/xlsx' }, disableFlashErrorMsg: true }
).then(data => {
this.jsonData = data
this.showTable = true
}).catch(error => {
fileList.splice(0, fileList.length)
this.renderError = getErrorResponseMsg(error)
}).finally(() => {
this.loadStatus = false
})
},
beforeUpload(file) {
const isLt30M = file.size / 1024 / 1024 < 30
if (!isLt30M) {
this.hasFileFormatOrSizeError = true
}
return isLt30M
},
async downloadTemplateFile(tp) {
const downloadUrl = await this.getDownloadTemplateUrl(tp)
window.open(downloadUrl)
},
async getDownloadTemplateUrl(tp) {
const template = this.importOption === 'create' ? 'import' : 'update'
let query = `format=${tp}&template=${template}`
if (this.importOption === 'update' && this.selectedRows.length > 0) {
const resources = []
for (const item of this.selectedRows) {
resources.push(item.id)
}
const resp = await createSourceIdCache(resources)
query += `&spm=${resp.spm}`
} else {
query += '&limit=1'
}
return this.url.indexOf('?') === -1 ? `${this.url}?${query}` : `${this.url}&${query}`
},
// eslint-disable-next-line handle-callback-err
catchError(error) {
// debug(error)
},
onSuccess(msg) {
this.errorMsg = ''
@@ -160,41 +219,21 @@ export default {
a.click()
window.URL.revokeObjectURL(url)
},
handleImport(item) {
this.loadStatus = true
if (this.importOption === '1') {
this.performCreate(item)
} else {
this.performUpdate(item)
}
},
async downloadUpdateTempUrl() {
var resources = []
const data = this.selectedRows
for (let index = 0; index < data.length; index++) {
resources.push(data[index].id)
}
const spm = await createSourceIdCache(resources)
const baseUrl = (process.env.VUE_APP_ENV === 'production') ? (`${this.url}`) : (`${process.env.VUE_APP_BASE_API}${this.url}`)
const url = `${baseUrl}?format=csv&template=update&spm=` + spm.spm
return this.downloadCsv(url)
},
async handleImportConfirm() {
this.$refs.upload.submit()
this.$refs['importTable'].performUpload()
},
handleImportCancel() {
this.showImportDialog = false
},
beforeUpload(file) {
this.isCsv = _.endsWith(file.name, 'csv')
return this.isCsv
this.showTable = false
this.renderError = ''
this.jsonData = {}
}
}
}
</script>
<style lang='scss' scoped>
@import "~@/styles/element-variables.scss";
@import "~@/styles/variables.scss";
.error-msg {
color: $--color-danger;
}
@@ -204,4 +243,49 @@ export default {
overflow: auto
}
.importDialog >>> .el-form-item.file-uploader {
padding-right: 150px;
}
.file-uploader >>> .el-upload {
width: 100%;
//padding-right: 150px;
}
.file-uploader >>> .el-upload-dragger {
width: 100%;
}
.importTableZone {
padding: 0 20px;
.importTable {
overflow: auto;
}
.tableFilter {
padding-bottom: 10px;
}
}
.importTable >>> .el-dialog__body {
padding-bottom: 20px;
}
.export-item {
margin-left: 80px;
}
.export-item:first-child {
margin-left: 0;
}
.hasError {
color: $--color-danger;
}
.el-upload__tip {
line-height: 1.5;
padding-top: 0;
}
</style>

View File

@@ -0,0 +1,430 @@
<template>
<div>
<el-row>
<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>
<el-radio-button label="ok">{{ $t('common.Success') }}</el-radio-button>
<el-radio-button label="error">{{ $t('common.Failed') }}</el-radio-button>
<el-radio-button label="pending">{{ $t('common.Pending') }}</el-radio-button>
</el-radio-group>
</div>
</el-col>
<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>
<span class="summary-item summary-pending"> {{ $t('common.Pending') }}: {{ pendingCount }}</span>
</el-col>
</el-row>
<div class="row">
<el-progress :percentage="processedPercent" />
</div>
<DataTable v-if="tableGenDone" id="importTable" ref="dataTable" :config="tableConfig" class="importTable" />
<div class="row" style="padding-top: 20px">
<div style="float: right">
<el-button size="small" @click="performCancel">{{ $t('common.Cancel') }}</el-button>
<el-button size="small" type="primary" @click="performImportAction">{{ importActionTitle }}</el-button>
</div>
</div>
</div>
</template>
<script>
import DataTable from '@/components/DataTable'
import { sleep, getUpdateObjURL } from '@/utils/common'
import { EditableInputFormatter, StatusFormatter } from '@/components/TableFormatters'
export default {
name: 'ImportTable',
components: {
DataTable
},
props: {
jsonData: {
type: Object,
default: () => ({})
},
url: {
type: String,
required: true
},
importOption: {
type: String,
required: true
}
},
data() {
return {
columns: [],
importStatusFilter: 'all',
iTotalData: [],
tableConfig: {
hasSelection: false,
// hasPagination: false,
columns: [],
totalData: [],
paginationSize: 10,
paginationSizes: [10],
tableAttrs: {
stripe: true, // 斑马纹表格
border: true, // 表格边框
fit: true, // 宽度自适应,
tooltipEffect: 'dark'
}
},
tableGenDone: false,
importTaskStatus: 'pending', // pending, started, stopped, done
importTaskResult: '', // success, hasError
hasImport: false,
hasContinueButton: false,
importActions: {
import: this.$t('common.Import'),
continue: this.$t('common.Continue'),
stop: this.$t('common.Stop'),
finished: this.$t('common.Finished')
}
}
},
computed: {
tableColumnNameMapper() {
const mapper = {}
for (const column of this.tableConfig.columns) {
mapper[column['prop']] = column['label']
}
return mapper
},
importAction() {
switch (this.importTaskStatus) {
case 'pending':
return 'import'
case 'started':
return 'stop'
}
if (this.totalCount === this.successCount) {
return 'finished'
} else {
return 'continue'
}
},
importActionTitle() {
return this.importActions[this.importAction]
},
successData() {
return this.iTotalData.filter((item) => {
return item['@status'] === 'ok'
})
},
failedData() {
return this.iTotalData.filter((item) => {
return typeof item['@status'] === 'object' && item['@status'].name === 'error'
})
},
pendingData() {
return this.iTotalData.filter((item) => {
return item['@status'] === 'pending'
})
},
totalCount() {
return this.iTotalData.length
},
successCount() {
return this.successData.length
},
failedCount() {
return this.failedData.length
},
pendingCount() {
return this.pendingData.length
},
processedCount() {
return this.totalCount - this.pendingCount
},
processedPercent() {
if (this.totalCount === 0) {
return 0
}
return Math.round(this.processedCount / this.totalCount * 100)
},
elDataTable() {
return this.$refs['dataTable'].dataTable
}
},
watch: {
importStatusFilter(val) {
if (val === 'all') {
this.tableConfig.totalData = this.iTotalData
} else if (val === 'error') {
this.tableConfig.totalData = this.failedData
} else {
this.tableConfig.totalData = this.iTotalData.filter((item) => {
return item['@status'] === val
})
}
}
},
mounted() {
this.generateTable()
},
methods: {
generateTableColumns(tableTitles, tableData) {
const vm = this
const columns = [{
prop: '@status',
label: vm.$t('common.Status'),
width: '80px',
align: 'center',
formatter: StatusFormatter,
formatterArgs: {
iconChoices: {
ok: 'fa-check text-primary',
error: 'fa-times text-danger',
pending: 'fa-clock-o'
},
getChoicesKey(val) {
if (val === 'ok' || val === 'pending') {
return val
}
return 'error'
},
getTip(val) {
if (val === 'ok') {
return vm.$t('common.Success')
} else if (val === 'pending') {
return vm.$t('common.Pending')
} else if (val && val.name === 'error') {
return val.error
}
return ''
},
hasTips: true
}
}]
for (const item of tableTitles) {
const dataItemLens = tableData.map(d => {
if (!d) {
return 0
}
const prop = item[1]
const itemColData = d[prop]
if (typeof itemColData === 'boolean') {
return 5 // boolean is 5 characters long 并且 boolean.length 是 undefined
}
if (typeof itemColData !== 'number' && (!itemColData || !itemColData.length)) {
return 0
}
return itemColData.length
})
let colMaxWidth = Math.max(...dataItemLens) * 10
if (colMaxWidth === 0) {
continue
}
colMaxWidth = Math.min(180, colMaxWidth)
colMaxWidth = Math.max(colMaxWidth, 100)
columns.push({
prop: item[1],
label: item[0],
minWidth: colMaxWidth + 'px',
showOverflowTooltip: true,
formatter: EditableInputFormatter,
formatterArgs: {
onEnter: ({ row, col, oldValue, newValue }) => {
const prop = col.prop
row['@status'] = 'pending'
this.$log.debug(`Set value ${oldValue} => ${newValue}`)
this.$set(row, prop, newValue)
}
}
})
}
return columns
},
generateTableData(tableTitles, tableData) {
const totalData = []
tableData.forEach(item => {
this.$set(item, '@status', 'pending')
totalData.push(item)
})
return totalData
},
generateTable() {
const tableTitles = this.jsonData['title']
const tableData = this.jsonData['data']
const columns = this.generateTableColumns(tableTitles, tableData)
const totalData = this.generateTableData(tableTitles, tableData)
this.tableConfig.columns = columns
this.tableGenDone = true
setTimeout(() => {
this.iTotalData = totalData
this.tableConfig.totalData = totalData
}, 200)
},
beautifyErrorData(errorData) {
if (typeof errorData === 'string') {
return errorData
} else if (Array.isArray(errorData)) {
return errorData
} else if (typeof errorData !== 'object') {
return errorData
}
const data = []
// eslint-disable-next-line prefer-const
for (let [key, value] of Object.entries(errorData)) {
if (typeof value === 'object') {
value = this.beautifyErrorData(value)
}
let label = this.tableColumnNameMapper[key]
if (!label) {
label = key
}
data.push(`${label}: ${value}`)
}
return data
},
performCancel() {
this.performStop()
this.$emit('cancel')
},
performFinish() {
this.performStop()
this.$emit('finish')
},
taskIsStopped() {
return this.importTaskStatus === 'stopped'
},
performImportAction() {
switch (this.importAction) {
case 'continue':
return this.performContinue()
case 'import':
return this.performUpload()
case 'stop':
return this.performStop()
case 'finished':
return this.performFinish()
}
},
performContinue() {
if (this.importTaskStatus === 'done') {
for (const item of this.failedData) {
item['@status'] = 'pending'
}
this.tableConfig.totalData = this.pendingData
}
this.importTaskStatus = 'started'
setTimeout(() => {
this.performUpload()
}, 100)
},
performStop() {
this.importTaskStatus = 'stopped'
},
async performUploadCurrentPageData() {
const currentData = this.elDataTable.getPageData()
for (const item of currentData) {
if (item['@status'] !== 'pending') {
continue
}
if (this.taskIsStopped()) {
return
}
await this.performUploadObject(item)
await sleep(100)
}
},
async performUpload() {
this.importTaskStatus = 'started'
this.importStatusFilter = 'pending'
while (!this.taskIsStopped()) {
await this.performUploadCurrentPageData()
const hasNextPage = this.elDataTable.hasNextPage()
if (hasNextPage && !this.taskIsStopped()) {
await this.elDataTable.gotoNextPage()
await sleep(100)
} else {
break
}
}
if (this.pendingCount === 0) {
this.importTaskStatus = 'done'
}
if (this.failedCount > 0) {
this.$message.error(this.$t('common.imExport.hasImportErrorItemMsg') + '')
}
},
async performUpdateObject(item) {
const updateUrl = getUpdateObjURL(this.url, item.id)
return this.$axios.put(
updateUrl,
item,
{ disableFlashErrorMsg: true }
)
},
async performUploadObject(item) {
let handler = this.performCreateObject
if (this.importOption === 'update') {
handler = this.performUpdateObject
}
try {
await handler.bind(this)(item)
item['@status'] = 'ok'
} catch (error) {
const errorData = error?.response?.data
const _error = this.beautifyErrorData(errorData)
item['@status'] = {
name: 'error',
error: _error
}
}
},
async performCreateObject(item) {
return this.$axios.post(
this.url,
item,
{ disableFlashErrorMsg: true }
)
},
keepElementInViewport() {
const tableRef = document.getElementById('importTable')
const pendingRef = tableRef?.getElementsByClassName('pendingStatus')[0]
if (!pendingRef) {
return
}
const parentTdRef = pendingRef.parentElement.parentElement.parentElement.parentElement
const rect = parentTdRef.getBoundingClientRect()
let windowInnerHeight = window.innerHeight || document.documentElement.clientHeight
windowInnerHeight = windowInnerHeight * 0.97 - 150
const inViewport = (
rect.top >= 0 &&
rect.left >= 0 &&
rect.bottom <= windowInnerHeight
)
if (!inViewport) {
parentTdRef.scrollIntoView({ behavior: 'auto', block: 'start', inline: 'start' })
}
}
}
}
</script>
<style lang="scss" scoped>
@import "~@/styles/variables.scss";
.summary-item {
padding: 0 10px
}
.summary-success {
color: $--color-primary;
}
.summary-failed {
color: $--color-danger;
}
.importTable >>> .cell {
min-height: 20px;
height: 100%;
overflow: auto;
}
</style>

View File

@@ -1,34 +1,48 @@
<template>
<ActionsGroup v-if="hasLeftActions" :actions="actions" :more-actions="moreActions" :more-actions-title="moreActionsTitle" v-bind="$attrs" class="header-action" />
<DataActions
v-if="hasLeftActions"
:actions="iActions"
v-bind="$attrs"
class="header-action"
/>
</template>
<script>
import ActionsGroup from '@/components/ActionsGroup'
import i18n from '@/i18n/i18n'
import DataActions from '@/components/DataActions'
import { createSourceIdCache } from '@/api/common'
import { cleanActions } from './utils'
const defaultTrue = { type: Boolean, default: true }
const defaultFalse = { type: Boolean, default: false }
const defaultTrue = { type: [Boolean, Function], default: true }
const defaultFalse = { type: [Boolean, Function], default: false }
export default {
name: 'LeftSide',
components: {
ActionsGroup
DataActions
},
props: {
hasCreate: defaultTrue,
hasBulkDelete: defaultTrue,
hasBulkUpdate: defaultFalse,
hasLeftActions: defaultTrue,
hasCreate: defaultTrue,
canCreate: defaultTrue,
createRoute: {
type: [String, Object, Function],
default: function() {
return this.$route.name?.replace('List', 'Create')
}
},
createInNewPage: {
type: Boolean,
default: false
},
hasBulkDelete: defaultTrue,
canBulkDelete: defaultTrue,
hasBulkUpdate: defaultFalse,
canBulkUpdate: defaultTrue,
hasMoreActions: defaultTrue,
tableUrl: {
type: String,
default: ''
},
createRoute: {
type: [String, Object],
default: function() {
return this.$route.name.replace('List', 'Create')
}
},
reloadTable: {
type: Function,
default: () => {}
@@ -53,23 +67,42 @@ export default {
type: String,
default: null
},
moreActionsButton: {
moreCreates: {
type: Object,
default: () => ({})
default: null
},
createTitle: {
type: String,
default: () => i18n.t('common.Create')
}
},
data() {
const defaultActions = [
{
name: 'actionCreate',
title: this.createTitle,
type: 'primary',
has: this.hasCreate && !this.moreCreates,
can: this.canCreate,
callback: this.handleCreate
}
]
if (this.moreCreates) {
const defaultMoreCreate = {
name: 'actionMoreCreate',
title: this.createTitle,
type: 'primary',
has: true,
can: this.canCreate,
dropdown: [],
callback: this.handleCreate
}
const createCreateAction = Object.assign(defaultMoreCreate, this.moreCreates)
defaultActions.push(createCreateAction)
}
const vm = this
return {
defaultActions: [
{
name: 'actionCreate',
title: this.$t('common.Create'),
type: 'primary',
has: this.hasCreate,
can: true,
callback: this.handleCreate
}
],
defaultActions: defaultActions,
defaultMoreActions: [
{
title: this.$t('common.deleteSelected'),
@@ -77,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
},
@@ -85,13 +118,18 @@ 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
}
]
}
},
computed: {
iActions() {
return [...this.actions, this.moreAction]
},
actions() {
const actions = [...this.defaultActions, ...this.extraActions]
return cleanActions(actions, true, {
@@ -99,12 +137,20 @@ export default {
reloadTable: this.reloadTable
})
},
moreActions() {
const actions = [...this.defaultMoreActions, ...this.extraMoreActions]
return cleanActions(actions, true, {
moreAction() {
if (!this.hasMoreActions) {
return
}
let dropdown = _.uniqBy([...this.extraMoreActions, ...this.defaultMoreActions], 'name')
dropdown = cleanActions(dropdown, true, {
selectedRows: this.selectedRows,
reloadTable: this.reloadTable
})
return {
name: 'moreActions',
title: this.moreActionsTitle || this.$t('common.MoreActions'),
dropdown: dropdown
}
},
hasSelectedRows() {
return this.selectedRows.length > 0
@@ -112,14 +158,22 @@ export default {
},
methods: {
handleCreate() {
let route = {}
let route
if (typeof this.createRoute === 'string') {
route = { name: this.createRoute }
route.name = this.createRoute
} else {
} else if (typeof this.createRoute === 'function') {
route = this.createRoute()
} else if (typeof this.createRoute === 'object') {
route = this.createRoute
}
this.$router.push(route)
this.$log.debug('handle create')
if (this.createInNewPage) {
const { href } = this.$router.resolve(route)
window.open(href, '_blank')
} else {
this.$router.push(route)
}
},
defaultBulkDeleteCallback({ selectedRows, reloadTable }) {
const msg = this.$t('common.deleteWarningMsg') + ' ' + selectedRows.length + ' ' + this.$t('common.rows') + ' ?'

View File

@@ -1,7 +1,12 @@
<template>
<div>
<ActionsGroup :is-fa="true" :actions="rightSideActions" class="right-side-actions right-side-item" />
<ImExportDialog :selected-rows="selectedRows" :url="tableUrl" v-bind="$attrs" />
<ImExportDialog
:selected-rows="selectedRows"
:export-options="iExportOptions"
:import-options="iImportOptions"
v-bind="$attrs"
/>
</div>
</template>
@@ -9,6 +14,7 @@
import ActionsGroup from '@/components/ActionsGroup'
import ImExportDialog from './ImExportDialog'
import { cleanActions } from './utils'
import { assignIfNot } from '@/utils/common'
const defaultTrue = { type: Boolean, default: true }
@@ -24,20 +30,41 @@ export default {
default: ''
},
hasExport: defaultTrue,
handleExport: {
exportOptions: {
type: Object,
default: () => ({})
},
handleExportClick: {
type: Function,
default: function({ selectedRows }) {
this.$eventBus.$emit('showExportDialog', { selectedRows })
this.$eventBus.$emit('showExportDialog', { selectedRows, url: this.tableUrl, name: this.name })
}
},
hasImport: defaultTrue,
handleImport: {
importOptions: {
type: Object,
default: () => ({})
},
handleImportClick: {
type: Function,
default: function({ selectedRows }) {
this.$eventBus.$emit('showImportDialog', { selectedRows })
this.$eventBus.$emit('showImportDialog', { selectedRows, url: this.tableUrl, name: this.name })
}
},
hasColumnSetting: defaultTrue,
handleTableSettingClick: {
type: Function,
default: function({ selectedRows }) {
this.$eventBus.$emit('showColumnSettingPopover', { url: this.tableUrl, row: selectedRows, name: this.name })
}
},
hasRefresh: defaultTrue,
handleRefreshClick: {
type: Function,
default: function() {
this.reloadTable()
}
},
selectedRows: {
type: Array,
default: () => []
@@ -49,17 +76,25 @@ export default {
extraRightSideActions: {
type: Array,
default: () => []
},
canCreate: {
type: [Boolean, Function],
default: false
},
canBulkUpdate: {
type: Boolean,
default: false
}
},
data() {
return {
defaultRightSideActions: [
{ name: 'actionExport', fa: 'fa-download', tip: this.$t('common.Export'), has: this.hasExport, callback: this.handleExport.bind(this) },
{ name: 'actionImport', fa: 'fa-upload', tip: this.$t('common.Import'), has: this.hasImport, callback: this.handleImport.bind(this) },
{ name: 'actionRefresh', fa: 'fa-refresh', tip: this.$t('common.Refresh'), has: this.hasRefresh, callback: this.handleRefresh }
{ name: 'actionColumnSetting', fa: 'fa-cog', tip: this.$t('common.CustomCol'), has: this.hasColumnSetting, callback: this.handleTableSettingClick.bind(this) },
{ name: 'actionImport', fa: 'fa-upload', tip: this.$t('common.Import'), has: this.hasImport, callback: this.handleImportClick.bind(this) },
{ name: 'actionExport', fa: 'fa-download', tip: this.$t('common.Export'), has: this.hasExport, callback: this.handleExportClick.bind(this) },
{ name: 'actionRefresh', fa: 'fa-refresh', tip: this.$t('common.Refresh'), has: this.hasRefresh, callback: this.handleRefreshClick.bind(this) }
],
dialogExportVisible: false,
exportValue: 2
dialogExportVisible: false
}
},
computed: {
@@ -73,20 +108,22 @@ export default {
},
hasSelectedRows() {
return this.selectedRows.length > 0
},
iImportOptions() {
return assignIfNot(this.importOptions, {
url: this.tableUrl,
canImportCreate: this.canCreate,
canImportUpdate: this.canBulkUpdate
})
},
iExportOptions() {
const options = assignIfNot(this.exportOptions, { url: this.tableUrl })
return options
}
},
methods: {
handleTagSearch(val) {
this.searchTable(val)
},
// handleExport({ selectedRows }) {
// this.$eventBus.$emit('showExportDialog', { selectedRows })
// },
// handleImport({ selectedRows }) {
// this.$eventBus.$emit('showImportDialog', { selectedRows })
// },
handleRefresh() {
this.reloadTable()
}
}
}
@@ -139,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>
@@ -20,7 +14,7 @@
<script>
import AutoDataSearch from '@/components/AutoDataSearch'
import LeftSide from './LeftSide'
import DatetimeRangePicker from '@/components/DatetimeRangePicker'
import DatetimeRangePicker from '@/components/FormFields/DatetimeRangePicker'
import RightSide from './RightSide'
const defaultTrue = { type: Boolean, default: true }
@@ -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 {
@@ -124,6 +127,10 @@ export default {
color: #888;
}
.action-search >>> .el-cascader {
line-height: 32px !important;
}
.right-side-actions {
display: flex;
padding-left: 10px;
@@ -143,5 +150,43 @@ export default {
.datepicker{
margin-left: 10px;
}
.table-header {
line-height: 32px;
}
.left-side {
float: left;
display: block;
}
.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: none;
}
.mobile .search.right .action-search {
width: 100%;
}
.mobile .right-side {
padding-top: 5px;
}
.filter-field.right-side-item.action-search {
height: 34px;
}
</style>

View File

@@ -1,11 +1,13 @@
export function cleanActions(actions, canDefaults, { selectedRows, reloadTable }) {
// console.log('Start clean actions: ', selectedRows.length, reloadTable)
// debug('Start clean actions: ', selectedRows.length, reloadTable)
const cleanedActions = []
const cloneActions = _.cloneDeep(actions)
cloneActions.forEach((action) => {
action.has = cleanBoolean(action, 'has', true, { selectedRows, reloadTable })
action.can = cleanBoolean(action, 'can', true, { selectedRows, reloadTable })
action.callback = cleanCallback(action, { selectedRows, reloadTable })
if (!action.dropdown) {
action.callback = cleanCallback(action, { selectedRows, reloadTable })
}
cleanedActions.push(action)
})
return cleanedActions

View File

@@ -1,78 +0,0 @@
<template>
<ActionsGroup :size="'mini'" :actions="cleanedActions" :more-actions="cleanMoreActions" v-bind="$attrs" />
</template>
<script>
import ActionsGroup from '@/components/ActionsGroup/index'
import BaseFormatter from './base'
export default {
name: 'CustomActionsFormatterVue',
components: {
ActionsGroup
},
extends: BaseFormatter,
computed: {
cleanedActions() {
if (this.col.actions.actions instanceof Array) {
const copy = _.cloneDeep(this.col.actions.actions)
let actions = [...copy]
actions = actions.map((v) => {
v.has = this.checkBool(v, 'has')
v.can = this.checkBool(v, 'can')
v.callback = this.cleanCallback(v)
return v
})
return actions
}
return []
},
cleanMoreActions() {
if (this.col.actions.extraActions instanceof Array) {
const copy = _.cloneDeep(this.col.actions.extraActions)
let actions = [...copy]
actions = actions.map((v) => {
v.has = this.checkBool(v, 'has')
v.can = this.checkBool(v, 'can')
v.callback = this.cleanCallback(v)
return v
})
return actions
}
return []
}
},
mounted() {
// console.log(this.col)
},
methods: {
checkBool(item, attr, defaults) {
if (!item) {
return false
}
let ok = item[attr]
if (ok && typeof ok === 'function') {
ok = ok(this.row, this.cellValue)
} else if (ok == null) {
ok = defaults === undefined ? true : defaults
}
return ok
},
cleanCallback(item) {
const callback = item.callback
const attrs = {
reload: this.reload,
row: this.row,
col: this.col,
cellValue: this.cellValue,
tableData: this.tableData
}
return () => { return callback.bind(this)(attrs) }
}
}
}
</script>
<style scoped>
</style>

View File

@@ -1,116 +0,0 @@
<template>
<ActionsGroup v-loading="loadStatus" :size="'mini'" :actions="actions" :more-actions="moreActions" />
</template>
<script>
import ActionsGroup from '@/components/ActionsGroup/index'
import BaseFormatter from './base'
export default {
name: 'LoadingActionsFormatter',
components: { ActionsGroup },
extends: BaseFormatter,
props: {
formatterArgsDefault: {
type: Object,
default: function() {
return {
hasUpdate: true, // can set function(row, value)
canUpdate: true, // can set function(row, value)
hasDelete: true, // can set function(row, value)
canDelete: true,
updateRoute: this.$route.name.replace('List', 'Update'),
extraActions: [] // format see defaultActions
}
}
}
},
data() {
const colActions = Object.assign(this.formatterArgsDefault, this.col.formatterArgs)
const defaultActions = [
{
name: 'update',
title: this.$t('common.Update'),
type: 'primary',
has: colActions.hasUpdate,
can: colActions.canUpdate,
callback: colActions.onUpdate
},
{
name: 'delete',
title: this.$t('common.Delete'),
type: 'danger',
has: colActions.hasDelete,
can: colActions.canDelete,
callback: colActions.onDelete
}
]
return {
colActions: colActions,
defaultActions: defaultActions,
extraActions: colActions.extraActions
}
},
computed: {
cleanedActions() {
let actions = [...this.defaultActions, ...this.extraActions]
actions = _.cloneDeep(actions)
actions = actions.map((v) => {
v.has = this.cleanBoolean(v, 'has')
v.can = this.cleanBoolean(v, 'can')
v.fa = this.cleanFa(v, 'fa')
v.callback = this.cleanCallback(v)
return v
})
actions = actions.filter((v) => v.has)
return actions
},
actions() {
if (this.cleanedActions.length <= 2) {
return this.cleanedActions
}
return this.cleanedActions.slice(0, 1)
},
moreActions() {
if (this.cleanedActions.length <= 2) {
return []
}
return this.cleanedActions.slice(1, this.cleanedActions.length)
},
loadStatus() {
return this.col.formatterArgs.loading
}
},
methods: {
cleanBoolean(item, attr) {
const ok = item[attr]
if (typeof ok !== 'function') {
return ok === undefined ? true : ok
}
return ok(this.row, this.cellValue)
},
cleanCallback(item) {
const callback = item.callback
const attrs = {
reload: this.reload,
row: this.row,
col: this.col,
cellValue: this.cellValue,
tableData: this.tableData
}
return () => { return callback.bind(this)(attrs) }
},
cleanFa(item, attr) {
const ok = item[attr]
if (typeof ok !== 'function') {
return ok === undefined ? false : ok
}
return ok(this.row, this.cellValue)
}
}
}
</script>
<style scoped>
</style>

View File

@@ -1,8 +1,21 @@
<template>
<div>
<TableAction :table-url="iTableConfig.url" :search-table="search" :date-pick="handleDateChange" v-bind="headerActions" :selected-rows="selectedRows" :reload-table="reloadTable" />
<TableAction
:table-url="tableUrl"
:search-table="search"
:date-pick="handleDateChange"
:selected-rows="selectedRows"
:reload-table="reloadTable"
v-bind="iHeaderActions"
/>
<IBox class="table-content">
<AutoDataTable ref="dataTable" :config="iTableConfig" @selection-change="handleSelectionChange" v-on="$listeners" />
<AutoDataTable
ref="dataTable"
:filter-table="filter"
:config="iTableConfig"
@selection-change="handleSelectionChange"
v-on="$listeners"
/>
</IBox>
</div>
</template>
@@ -12,7 +25,10 @@ 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',
components: {
@@ -41,16 +57,72 @@ 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 })
let hasClone = _.get(config, 'columnsMeta.actions.formatterArgs.hasClone', null)
hasClone = !!(this.headerActions.hasCreate && hasClone == null)
_.set(config, 'columnsMeta.actions.formatterArgs.hasClone', hasClone)
const config = deepmerge(this.tableConfig, {
extraQuery: this.extraQuery
})
const formatterArgs = {
'columnsMeta.actions.formatterArgs.canUpdate': () => {
return this.hasActionPerm('change') && !this.currentOrgIsRoot
},
'columnsMeta.actions.formatterArgs.canDelete': 'delete',
'columnsMeta.actions.formatterArgs.canClone': () => {
return this.hasActionPerm('add') && !this.currentOrgIsRoot
},
'columnsMeta.name.formatterArgs.can': 'view'
}
for (const [arg, action] of Object.entries(formatterArgs)) {
const notSet = _.get(config, arg) === undefined
const isFunction = typeof action === 'function'
if (notSet) {
const hasActionPerm = isFunction ? action() : this.hasActionPerm(action)
_.set(config, arg, hasActionPerm)
}
}
this.$log.debug('Header actions', this.headerActions)
this.$log.debug('ListTable: iTableConfig change', config)
return config
},
tableUrl() {
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: {
@@ -59,12 +131,14 @@ export default {
this.$log.debug('ListTable: found extraQuery change')
},
deep: true
},
tableColConfig: {
handler() {
this.$log.debug('ListTable: found colConfig change')
},
deep: true
}
},
mounted() {
this.$log.debug(this.headerActions)
this.$log.debug(this.iTableConfig)
},
methods: {
handleSelectionChange(val) {
this.selectedRows = val
@@ -73,19 +147,39 @@ export default {
this.dataTable.getList()
},
search(attrs) {
return this.dataTable.search(attrs, true)
this.$emit('TagSearch', attrs)
return this.dataTable?.search(attrs, true)
},
filter(attrs) {
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) {
this.$set(this.extraQuery, 'date_from', attrs[0].toISOString())
this.$set(this.extraQuery, 'date_to', attrs[1].toISOString())
// this.extraQuery = {
// date_from: attrs[0].toISOString(),
// date_to: attrs[1].toISOString()
// }
const query = {
date_from: attrs[0].toISOString(),
date_to: attrs[1].toISOString()
let dateFrom = ''
let dateTo = ''
try {
dateFrom = attrs[0].toISOString()
dateTo = attrs[1].toISOString()
} catch (e) {
this.$log.error('Handle date change error: ', attrs)
dateFrom = new Date()
dateFrom.setDate(dateFrom.getDate() - 5)
dateFrom = dateFrom.toISOString()
dateTo = new Date()
dateTo.setDate(dateTo.getDate() + 1)
dateTo = dateTo.toISOString()
}
this.$set(this.extraQuery, 'date_from', dateFrom)
this.$set(this.extraQuery, 'date_to', dateTo)
const query = {
date_from: dateFrom,
date_to: dateTo
}
this.$emit('TagDateChange', attrs)
return this.dataTable.searchDate(query)
},
toggleRowSelection(row, isSelected) {
@@ -97,28 +191,28 @@ export default {
<style lang="scss" scoped>
.table-content {
margin-top: 10px;
.table-content {
margin-top: 10px;
& >>> .el-card__body {
padding: 0;
}
& >>> .el-table__header thead > tr > th {
background-color: white;
}
/*& >>> .el-table--striped .el-table__body tr.el-table__row--striped td {*/
/*background: white;*/
/*}*/
/*& >>> .el-table th, .el-table tr {*/
/*background-color: red;*/
/*!*background-color: #FAFAFA;*!*/
/*}*/
& >>> .el-card__body {
padding: 0;
}
& >>> .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;
}
}
//修改颜色
// .el-button--text{
// color: #409EFF;
// }
//修改颜色
// .el-button--text{
// color: #409EFF;
// }
</style>

View File

@@ -10,7 +10,7 @@
</template>
<script>
import Switcher from '../Swicher'
import Switcher from '../FormFields/Swicher'
export default {
name: 'ActionItem',
components: {

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