Compare commits

...

64 Commits

Author SHA1 Message Date
fit2bot
ec1dfd3f5c feat: Update v3.0.3 2023-03-02 17:06:58 +08:00
“huailei000”
e83afb02fb perf: 调整账号详情ssh指纹显示 2023-03-02 16:32:02 +08:00
“huailei000”
fadc3f8cb0 perf: 优化移动端模式下菜单样式 2023-03-02 11:08:24 +08:00
Aaron3S
fb4a940d2d fix: 修改权限依赖 2023-03-01 18:39:48 +08:00
“huailei000”
2d3d1396ce perf: 优化通告组件链接样式 2023-03-01 13:56:02 +08:00
“huailei000”
a231623e77 perf: 优化选择平台弹窗样式 2023-02-28 19:09:19 +08:00
Aaron3S
cdf46e6369 feat: 增加按钮提示 2023-02-28 18:46:22 +08:00
Aaron3S
e58cbb33ca fix: 增加运行用户为空时的提示 2023-02-28 18:30:27 +08:00
Aaron3S
26fcbb5bc7 fix: 修复作业无法执行的问题 2023-02-28 18:10:19 +08:00
“huailei000”
f8cad13091 perf: 优化移动端下切换组织组件样式 2023-02-28 17:33:22 +08:00
老广
62b1555922 Merge pull request #2832 from jumpserver/pr@v3.0@fix_version
fix: 修正版本获取不正确
2023-02-28 17:01:12 +08:00
“huailei000”
6ff32568bc perf: 优化移动端样式 2023-02-28 16:45:25 +08:00
吴小白
d0460c62df fix: 修正版本获取不正确 2023-02-28 16:38:43 +08:00
老广
d14957545a Merge pull request #2829 from jumpserver/pr@v3.0@perf_ztree_height
perf: 优化 tree 高度
2023-02-28 16:30:21 +08:00
ibuler
15b561a81e perf: 优化 tree 高度 2023-02-28 08:09:22 +00:00
“huailei000”
fd47bf0484 perf: about dialog 2023-02-28 14:06:11 +08:00
feng626
543dc1d31b Merge pull request #2823 from jumpserver/pr@v3.0@push_account_community
perf: 推送账号 社区版定时任务关闭
2023-02-28 13:37:09 +08:00
ibuler
980ffb14d1 perf: 优化 关于页面 2023-02-28 13:35:12 +08:00
feng
be9cef64af perf: 推送账号 社区版定时任务关闭 2023-02-28 12:46:53 +08:00
Aaron3S
c2706bbafa fix: 修复 term 组件上的按钮被覆盖的问题 2023-02-27 18:35:22 +08:00
老广
d65f5326ae Merge pull request #2816 from jumpserver/pr@v3.0@fix_platform_create
perf: 修改 assetMeta 调用
2023-02-27 17:56:09 +08:00
ibuler
5e048b5537 perf: 修改 assetMeta 调用 2023-02-27 09:46:31 +00:00
老广
5199bfb144 Merge pull request #2814 from jumpserver/pr@v3.0@fix_platform_create
fix: 修复平台创建
2023-02-27 17:44:10 +08:00
ibuler
415e01984a fix: 修复平台创建 2023-02-27 09:40:18 +00:00
feng
bca21fb11e perf: lina 提示优化 2023-02-27 16:27:54 +08:00
Aaron3S
f1d4bbe23c fix: 暂时隐藏参数设置字段 2023-02-27 16:11:51 +08:00
feng626
c425d3842a Merge pull request #2807 from jumpserver/revert-2799-pr@v3.0@lina_point_out
Revert "perf: lina 提示优化"
2023-02-27 16:01:45 +08:00
feng626
86147dc48e Revert "perf: lina 提示优化" 2023-02-27 16:00:03 +08:00
ibuler
656a76dae9 perf: 平台允许修改 2023-02-27 15:51:11 +08:00
ibuler
bad88b1543 perf: 添加accounts 搜索建议 2023-02-27 15:21:00 +08:00
feng626
71c58dcf8f Merge pull request #2799 from jumpserver/pr@v3.0@lina_point_out
perf: lina 提示优化
2023-02-27 13:28:55 +08:00
feng
7e953296c5 perf: lina 提示优化 2023-02-27 13:25:07 +08:00
Bai
e381a32954 perf: 优化 applet host 请求引起的 error 2023-02-26 12:37:50 +08:00
feng626
a4c239a79f Merge pull request #2793 from jumpserver/pr@v3.0@add_account_asset_required
perf: add account asset required
2023-02-24 16:26:41 +08:00
feng
645b3d96c4 perf: add account asset required 2023-02-24 16:25:31 +08:00
Jiangjie.Bai
36aea652d6 Merge pull request #2788 from jumpserver/dev
v3.0.0
2023-02-23 20:16:41 +08:00
Jiangjie.Bai
1a42ce90ab Merge pull request #2760 from jumpserver/dev
v3.0.0-rc-latest
2023-02-22 22:21:54 +08:00
Jiangjie.Bai
31a401b55d Merge pull request #2463 from jumpserver/dev
v3.0.0-rc4
2023-01-31 18:55:34 +08:00
Jiangjie.Bai
582a84178d Merge pull request #2187 from jumpserver/dev
v2.28.0
2022-11-17 17:44:19 +08:00
Jiangjie.Bai
9b9f7c936c Merge pull request #2184 from jumpserver/dev
v2.28.0-rc5
2022-11-17 14:18:15 +08:00
Jiangjie.Bai
2a6100957f Merge pull request #2182 from jumpserver/dev
v2.28.0-rc4
2022-11-16 21:08:55 +08:00
Jiangjie.Bai
16606d6a27 Merge pull request #2176 from jumpserver/dev
v2.28.0-rc2
2022-11-14 10:01:05 +08:00
Jiangjie.Bai
0a612f50e6 Merge pull request #2164 from jumpserver/dev
v2.28.0-rc1
2022-11-10 17:45:47 +08:00
Jiangjie.Bai
fe36fa9390 Merge pull request #2117 from jumpserver/dev
v2.27.0-rc4
2022-10-18 21:02:10 +08:00
Jiangjie.Bai
ba109900ec Merge pull request #2113 from jumpserver/dev
v2.27.0-rc3
2022-10-18 11:20:57 +08:00
Jiangjie.Bai
ec7768267f Merge pull request #2105 from jumpserver/dev
v2.27.0-rc2
2022-10-14 11:01:32 +08:00
Jiangjie.Bai
cc58b374ab Merge pull request #2101 from jumpserver/dev
v2.27.0-rc1
2022-10-13 17:44:53 +08:00
Jiangjie.Bai
04ffbb8fd6 Merge pull request #2097 from jumpserver/dev
v2.27.0-rc1
2022-10-13 15:14:40 +08:00
Jiangjie.Bai
49880f6739 Merge pull request #2059 from jumpserver/dev
v2.26.0
2022-09-15 17:49:44 +08:00
Jiangjie.Bai
e6f98d58c4 Merge pull request #2057 from jumpserver/dev
v2.26.0-rc4
2022-09-15 16:18:03 +08:00
Jiangjie.Bai
fd1f16d43c Merge pull request #2050 from jumpserver/dev
v2.26.0-rc2
2022-09-13 17:41:39 +08:00
Jiangjie.Bai
968b2415b1 Merge pull request #2043 from jumpserver/dev
v2.26.0-rc1
2022-09-08 15:46:44 +08:00
Jiangjie.Bai
776090d6ba Merge pull request #2001 from jumpserver/dev
v2.25.0
2022-08-18 16:12:45 +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
62b8fc0e3b Merge pull request #1994 from jumpserver/dev
v2.25.0-rc3
2022-08-16 19:08:23 +08:00
Jiangjie.Bai
b2028869cb Merge pull request #1986 from jumpserver/dev
v2.25.0-rc2
2022-08-12 18:06:56 +08:00
Jiangjie.Bai
5277a725f8 Merge pull request #1973 from jumpserver/dev
v2.25.0-rc1
2022-08-11 14:11:59 +08:00
Jiangjie.Bai
f137788c1a Merge pull request #1957 from jumpserver/dev
v2.24.0-rc5
2022-07-20 19:06:03 +08:00
Jiangjie.Bai
f7d17c8de7 Merge pull request #1954 from jumpserver/dev
v2.24.0-rc4
2022-07-19 16:18:13 +08:00
Jiangjie.Bai
feea70b0be Merge pull request #1944 from jumpserver/dev
v2.24.0-rc3
2022-07-18 12:05:42 +08:00
Jiangjie.Bai
04696ef3d6 Merge pull request #1940 from jumpserver/dev
v2.24.0-rc2
2022-07-15 18:07:37 +08:00
Jiangjie.Bai
1731f4f788 Merge pull request #1934 from jumpserver/dev
v2.24.0-rc1
2022-07-14 18:27:51 +08:00
Jiangjie.Bai
6f25d93909 Merge pull request #1931 from jumpserver/dev
v2.24.0-rc1
2022-07-14 17:51:58 +08:00
Jiangjie.Bai
46461ec324 Merge pull request #1925 from jumpserver/dev
v2.24.0-rc1
2022-07-14 15:12:15 +08:00
34 changed files with 281 additions and 109 deletions

View File

@@ -16,7 +16,7 @@ ARG VERSION
ENV VERSION=$VERSION
ADD . /data
RUN --mount=type=cache,target=/usr/local/share/.cache/yarn,sharing=locked,id=lina \
sed -i "s@<strong> version-dev </strong>@<strong> ${VERSION} </strong>@g" src/layout/components/NavHeader/About.vue \
sed -i "s@version-dev@${VERSION}@g" src/layout/components/NavHeader/About.vue \
&& yarn build
FROM nginx:alpine

1
GITSHA Normal file
View File

@@ -0,0 +1 @@
e83afb02fb95315f6919678b4b05ad645eb88031

View File

@@ -13,7 +13,7 @@ import { UpdateToken } from '@/components/FormFields'
import Select2 from '@/components/FormFields/Select2'
import AssetSelect from '@/components/AssetSelect'
import { encryptPassword } from '@/utils/crypto'
import { RequiredChange } from '@/components/DataForm/rules'
import { RequiredChange, Required } from '@/components/DataForm/rules'
export default {
name: 'AccountCreateForm',
@@ -67,6 +67,7 @@ export default {
],
fieldsMeta: {
assets: {
rules: [Required],
component: AssetSelect,
label: this.$t('assets.Asset'),
el: {

View File

@@ -103,7 +103,7 @@ export default {
secretInfo: {},
versions: '-',
showSecret: false,
sshKeyFingerprint: '',
sshKeyFingerprint: '-',
historyCount: 0,
showPasswordHistoryDialog: false
}
@@ -128,7 +128,7 @@ export default {
getAuthInfo() {
this.$axios.get(this.url, { disableFlashErrorMsg: true }).then(resp => {
this.secretInfo = resp
this.sshKeyFingerprint = resp?.spec_info
this.sshKeyFingerprint = resp?.spec_info?.ssh_key_fingerprint || '-'
this.showSecret = true
})
},

View File

@@ -9,10 +9,10 @@
>
<span class="announcement-main">{{ announcement.content }}</span>
<span v-if="announcement.link">
<el-link :href="announcement.link" target="_blank" class="link-more">
<el-link :href="announcement.link" target="_blank" type="info" class="link-more">
{{ $t('common.ViewMore') }}
</el-link>
<i class="fa fa-external-link" />
<i class="fa fa-external-link icon" />
</span>
</el-alert>
</template>
@@ -67,5 +67,7 @@ export default {
margin-left: 10px;
border-bottom: solid 1px;
}
.icon {
vertical-align: text-bottom;
}
</style>

View File

@@ -5,20 +5,20 @@
top="1vh"
v-bind="$attrs"
width="80vw"
@close="handleClose"
@cancel="handleCancel"
@close="handleClose"
@confirm="handleConfirm"
v-on="$listeners"
>
<AssetTreeTable
ref="ListPage"
v-bind="$attrs"
:header-actions="headerActions"
:table-config="tableConfig"
:url="baseUrl"
:node-url="baseNodeUrl"
:table-config="tableConfig"
:tree-url="`${baseNodeUrl}children/tree/`"
:url="baseUrl"
class="tree-table"
v-bind="$attrs"
/>
</Dialog>
</template>
@@ -172,10 +172,11 @@ export default {
.left {
padding: 5px;
}
.treebox {
height: 70vh;
}
.right {
height: calc(100vh - 200px);
overflow: auto;
}
.mini {
@@ -188,8 +189,8 @@ export default {
}
}
.page ::v-deep .treebox {
height: inherit !important;
.page ::v-deep .treebox .ztree {
}
.asset-select-dialog ::v-deep .el-icon-circle-check {

View File

@@ -11,12 +11,12 @@
<AssetSelectDialog
v-if="dialogVisible"
ref="dialog"
:base-node-url="baseNodeUrl"
:base-url="baseUrl"
:tree-url-query="treeUrlQuery"
:value="value"
:visible.sync="dialogVisible"
v-bind="$attrs"
:tree-url-query="treeUrlQuery"
:base-url="baseUrl"
:base-node-url="baseNodeUrl"
@cancel="handleCancel"
@confirm="handleConfirm"
v-on="$listeners"
@@ -143,8 +143,8 @@ export default {
.left {
padding: 5px;
.treebox {
height: 70vh;
.ztree {
height: calc(100vh - 250px) !important;
}
}

View File

@@ -408,13 +408,13 @@ export default {
}
.treebox {
height: 70vh;
background-color: transparent;
> > > .ztree {
>>> .ztree {
overflow: auto;
background-color: transparent;
height: calc(100% - 50px);
max-height: calc(100vh - 220px);
min-height: 500px;
li {
background-color: transparent !important;

View File

@@ -12,14 +12,17 @@
>
{{ v }}
</el-tag>
<el-input
<component
:is="component"
ref="SearchInput"
v-model.trim="filterValue"
:fetch-suggestions="autocomplete"
:placeholder="this.$t('common.EnterToContinue')"
class="search-input"
@blur="focus = false"
@change="handleConfirm"
@focus="focus = true"
@select="handleSelect"
@keyup.enter.native="handleConfirm"
/>
</div>
@@ -41,13 +44,18 @@ export default {
placeholder: {
type: String,
default: () => i18n.t('perms.Input')
},
autocomplete: {
type: Function,
default: null
}
},
data() {
return {
filterTags: this.value,
focus: false,
filterValue: ''
filterValue: '',
component: this.autocomplete ? 'el-autocomplete' : 'el-input'
}
},
methods: {
@@ -55,6 +63,10 @@ export default {
this.filterTags.splice(this.filterTags.indexOf(tag), 1)
this.$emit('change', this.filterTags)
},
handleSelect(item) {
this.filterValue = item.value
this.handleConfirm()
},
handleConfirm() {
if (this.filterValue === '') return
if (!this.filterTags.includes(this.filterValue)) {

View File

@@ -55,14 +55,14 @@ export default {
toolbar: [
{
tip: this.$tc('ops.ScrollToTop'),
icon: 'fa fa-upload',
icon: 'fa fa-arrow-up',
callback: () => {
this.xterm.scrollToTop()
}
},
{
tip: this.$tc('ops.ScrollToBottom'),
icon: 'fa fa-download',
icon: 'fa fa-arrow-down',
callback: () => {
this.xterm.scrollToBottom()
}
@@ -108,10 +108,10 @@ export default {
}
.actions {
position: absolute;
right: 4px;
z-index: 2;
margin-top: 4px;
text-align: right;
background-color: #FFF;
padding-right: 5px;
padding-top: 2px;
}
.el-button {

View File

@@ -290,6 +290,7 @@
"Domain": "Domain",
"DomainDetail": "Domain detail",
"DomainHelpMessage": "The domain function is added to address the fact that some environments (such as the hybrid cloud) cannot be connected directly by jumping on the gateway server.\nJMS => Domain gateway => Target assets",
"WebHelpMessage": "Web type assets depend on remote applications. Please go to System Settings to configure the publisher in the remote application.",
"FullName": "Full name",
"Gateway": "Gateway",
"GatewayList": "Gateway",
@@ -437,10 +438,12 @@
"ReLoginErr": "Login time has exceeded 5 minutes, please login again"
},
"common": {
"DownloadCenter": "Download center",
"RestoreDefault": "Restore default",
"ImportOrg": "Import organization",
"CommunityEdition": "Community Edition",
"EnterpriseEdition": "Enterprise Edition",
"Product": "Product",
"About": "About",
"DownloadCenter": "Download center",
"ImportOrg": "Import organization",
"PermissionCompany": "Permission company",
"ApproverNumbers": "Approver numbers",
"ConvenientOperate": "Convenient operate",
@@ -841,6 +844,8 @@
"TotalJobLog": "Total job log"
},
"ops": {
"Save": "Save",
"Reset": "Reset",
"SystemError": "System Error",
"RunasHelpText": "Fill in the user name to run the script",
"RunasPolicyHelpText": "Indicates the account selection strategy when there is no running user on the current asset",
@@ -969,6 +974,7 @@
"FailedAsset": "Failed asset",
"AdhocDetail": "Adhoc detail",
"RequiredContent": "Please input the command",
"RequiredRunas": "Please input the run user",
"DateFinished": "Date finished",
"DeleteFile": "Delete file",
"AssetAmount": "Assets amount",
@@ -999,7 +1005,7 @@
"ManualInput": "Manual input",
"SameAccount": "Same account",
"SpecifyAccounts": "Specify accounts",
"AccountsHelp": "All accounts: accounts exists on the asset; Specify accounts: specify accounts by usernameManual input: username/password; Same account: The account username name same with login user",
"AccountsHelp": "All accounts: accounts exists on the asset; Specify accounts: specify the user name of the account under the assetManual input: username/password; Same account: The account username name same with login user",
"Input": "Input",
"permAccount": "Accounts",
"Actions": "Actions",
@@ -2061,4 +2067,4 @@
"PublishStatus": "Publish status",
"NoPublished": "Unpublished"
}
}
}

View File

@@ -283,6 +283,7 @@
"Domain": "ドメイン",
"DomainDetail": "ドメインの詳細",
"DomainHelpMessage": "ドメイン機能は、一部の環境 (ハイブリッドクラウドなど) が直接接続できないことを解決するために追加された機能で、ゲートウェイサーバを介してジャンプ登録を行うのが原理です。JMS => ドメインゲートウェイ => ターゲット資産",
"WebHelpMessage": "Web タイプ資産はリモートアプリケーションに依存しており、システム設定のリモートアプリケーションでパブリッシャを構成してください。",
"FullName": "フルネーム",
"Gateway": "ゲートウェイ",
"GatewayProtocolHelpText": "SSHゲートウェイ、プロキシSSH、RDP、VNCをサポート",
@@ -839,6 +840,8 @@
"Weekly": "週ごと"
},
"ops": {
"Save": "保存#ホゾン#",
"Reset": "リストア",
"SystemError": "システムエラー",
"RunasHelpText": "スクリプトを実行するユーザー名を入力",
"RunasPolicyHelpText": "現在の資産にこの実行ユーザーが存在しない場合にアカウント選択ポリシーを実行することを示します",
@@ -965,6 +968,7 @@
"FailedAsset": "失敗したアセット",
"AdhocDetail": "コマンド詳細",
"RequiredContent": "コマンドを入力してください",
"RequiredRunas": "実行ユーザーを入力してください",
"DateFinished": "完了時間",
"DeleteFile": "ファイルの削除",
"AssetAmount": "資産",
@@ -997,7 +1001,7 @@
"ManualInput": "手動入力",
"SameAccount": "同じ名前のアカウント",
"SpecifyAccounts": "入力の指定",
"AccountsHelp": "すべてのアカウント: アカウントはアセットに存在します。 アカウントの指定: ユーザー名でアカウントを指定します。手入力: ユーザー名/パスワード; 同一アカウント:ログインユーザーと同じアカウントのユーザー名",
"AccountsHelp": "すべてのアカウント: アカウントはアセットに存在します。 アカウントの指定: 資産の下のアカウントのユーザー名を指定します。手入力: ユーザー名/パスワード; 同一アカウント:ログインユーザーと同じアカウントのユーザー名",
"Input": "入力",
"permAccount": "認定アカウント",
"Actions": "アクション",
@@ -2051,4 +2055,4 @@
"PublishStatus": "投稿ステータス",
"NoPublished": "未発表"
}
}
}

View File

@@ -297,6 +297,7 @@
"Domain": "网域",
"DomainDetail": "网域详情",
"DomainHelpMessage": "网域功能是为了解决部分环境混合云无法直接连接而新增的功能原理是通过网关服务器进行跳转登录。JMS => 网域网关 => 目标资产",
"WebHelpMessage": "Web 类型资产依赖于远程应用,请前往系统设置在远程应用中配置发布机。",
"FullName": "全称",
"Gateway": "网关",
"GatewayProtocolHelpText": "SSH网关支持代理SSH,RDP和VNC",
@@ -433,6 +434,9 @@
"ReLoginErr": "登录时长已超过 5 分钟,请重新登录"
},
"common": {
"CommunityEdition": "社区版",
"EnterpriseEdition": "企业版",
"Product": "产品",
"RestoreDefault": "恢复默认",
"DownloadCenter": "下载中心",
"ImportOrg": "导入组织",
@@ -835,6 +839,8 @@
"Weekly": "按周"
},
"ops": {
"Save": "保存",
"Reset": "还原",
"SystemError": "系统错误",
"RunasHelpText": "填写运行脚本的用户名",
"RunasPolicyHelpText": "表示当前资产上没此运行用户时,采取什么账号选择策略",
@@ -864,6 +870,7 @@
"UploadPlaybook": "上传 Playbook",
"RequiredAssetOrNode": "请至少选择一个资产或节点",
"RequiredContent": "请输入命令",
"RequiredRunas": "请输入运行用户",
"RequiredEntryFile": "此文件作为运行的入口文件,必须存在",
"ScrollToTop": "滚动到顶部",
"ScrollToBottom": "滚动到底部",
@@ -989,7 +996,7 @@
},
"perms": {
"": "",
"AccountsHelp": "所有账号: 资产上添加的账号; 指定账号:指定账号的用户名;手动输入: 用户名/密码 手动输入; 同名账号: 与被授权人用户名相同的账号;",
"AccountsHelp": "所有账号: 资产上添加的账号; 指定账号:指定资产下账号的用户名;手动输入: 用户名/密码 手动输入; 同名账号: 与被授权人用户名相同的账号;",
"AllAccounts": "所有账号",
"ManualInput": "手动输入",
"SameAccount": "同名账号",

View File

@@ -0,0 +1,3 @@
<!-- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#646A73" d="M4.856 11H16.5a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5H4.814l5.025 5.024a.5.5 0 0 1 0 .707l-.707.708a.5.5 0 0 1-.707 0L2.42 13.435l-.006.008L1 12.028l.008-.007L1 12.014 2.414 10.6l.008.007 6.003-6.003a.5.5 0 0 1 .707 0l.707.706a.5.5 0 0 1 0 .708L4.856 11ZM21.5 20a.5.5 0 0 1-.5-.5v-15a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-1Z"/><path fill-opacity=".2" fill="#000" d="M4.856 11H16.5a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5H4.814l5.025 5.024a.5.5 0 0 1 0 .707l-.707.708a.5.5 0 0 1-.707 0L2.42 13.435l-.006.008L1 12.028l.008-.007L1 12.014 2.414 10.6l.008.007 6.003-6.003a.5.5 0 0 1 .707 0l.707.706a.5.5 0 0 1 0 .708L4.856 11ZM21.5 20a.5.5 0 0 1-.5-.5v-15a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-1Z"/></svg> -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#646A73" d="M19.144 13H7.5a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h11.686l-5.024-5.025a.5.5 0 0 1 0-.707l.706-.707a.5.5 0 0 1 .708 0l6.003 6.004.007-.008 1.41 1.41a.005.005 0 0 1 0 .008.005.005 0 0 0 0 .007.005.005 0 0 1 0 .007l-1.41 1.411-.008-.007-6.002 6.003a.5.5 0 0 1-.708 0l-.707-.706a.5.5 0 0 1 0-.708L19.144 13ZM2.5 4a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-15a.5.5 0 0 1 .5-.5h1Z"/><path fill-opacity=".2" fill="#000" d="M19.144 13H7.5a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h11.686l-5.024-5.025a.5.5 0 0 1 0-.707l.706-.707a.5.5 0 0 1 .708 0l6.003 6.004.007-.008 1.41 1.41a.005.005 0 0 1 0 .008.005.005 0 0 0 0 .007.005.005 0 0 1 0 .007l-1.41 1.411-.008-.007-6.002 6.003a.5.5 0 0 1-.708 0l-.707-.706a.5.5 0 0 1 0-.708L19.144 13ZM2.5 4a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-15a.5.5 0 0 1 .5-.5h1Z"/></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -3,7 +3,7 @@
v-if="iVisible"
:show-cancel="false"
:show-confirm="false"
:title="''"
:title="$tc('common.About')"
:visible.sync="iVisible"
class="about-dialog"
top="10%"
@@ -11,10 +11,12 @@
>
<div class="box">
<div class="head">
<img :src="logoTextSrc" alt="logo" class="sidebar-logo-text">
<img :src="logoSrc" alt="logo" class="sidebar-logo-text" height="70">
</div>
<div class="text">{{ $tc('ops.version') }}<strong> version-dev </strong> <span v-if="!publicSettings.XPACK_LICENSE_IS_VALID"> GPLv3. </span></div>
<div class="text">{{ $tc('common.PermissionCompany') }}{{ corporation }}</div>
<tr v-for="item of items" v-show="item.has || item.has === undefined" :key="item.label" class="text">
<td class="title">{{ item.label }}: </td>
<td class="value">{{ item.value }}</td>
</tr>
<el-divider class="divider" />
<div class="text">
<span v-for="(i, index) in actions" :key="index" class="text-link" @click="onClick(i.name)">
@@ -42,7 +44,6 @@ export default {
},
data() {
return {
logoTextSrc: require('@/assets/img/logo_text_green.png'),
actions: [
{
name: 'github',
@@ -69,8 +70,46 @@ export default {
return this.visible
}
},
versionType() {
return this.hasXPack ? this.$t('common.EnterpriseEdition') : this.$tc('common.CommunityEdition') + ' GPLv3'
},
items() {
return [
{
label: this.$t('common.Product'),
value: 'JumpServer ' + this.versionType
},
{
label: this.$t('common.Version'),
value: 'version-dev'
},
{
label: this.$t('common.PermissionCompany'),
value: this.corporation,
has: this.hasXPack
},
{
label: 'Copyright',
value: this.copyright,
has: !this.hasXPack
}
]
},
corporation() {
return this.publicSettings.XPACK_LICENSE_INFO.corporation
},
copyright() {
if (this.corporation.indexOf('FIT2CLOUD 飞致云') > -1) {
return this.corporation
} else {
return ''
}
},
logoSrc() {
return this.publicSettings['INTERFACE']['logo_logout']
},
hasXPack() {
return this.publicSettings.XPACK_LICENSE_IS_VALID
}
},
methods: {
@@ -90,29 +129,36 @@ export default {
<style lang="scss" scoped>
.about-dialog {
&>>> .el-dialog__header {
background-color: #FAFBFD;
border-bottom: none;
&.dialog >>> .el-dialog__body {
padding: 20px 30px;
}
&>>> .el-dialog__body {
background-color: #FAFBFD;
padding: 10px 40px 20px;
}
&>>> .el-dialog__footer {
padding: 0;
&.dialog >>> .el-dialog__footer {
border-top: none;
display: none;
}
}
.head {
text-align: center;
float: right;
}
.box {
.text {
margin-bottom: 10px;
line-height: 2;
font-size: 14px;
color: #666;
.title {
font-weight: 600;
}
.value {
padding-left: 30px;
}
.icon {
margin-right: 4px;
}
span {
cursor: pointer;
}

View File

@@ -4,6 +4,7 @@
:value="currentOrgId"
class="org-select organization"
filterable
popper-class="switch-org"
@change="changeOrg"
>
<template slot="prefix">

View File

@@ -3,19 +3,17 @@
<div class="nav-header">
<div class="active-mobile">
<Organization v-if="$hasLicense()" class="organization" />
<ViewSwitcher class="mobile-view-switch" mode="vertical" />
</div>
<div class="nav-title">
<span
v-show="!isCollapse"
style="margin-left: 5px;"
@click="viewShown = !viewShown"
>
{{ isRouteMeta.title || '' }}
</span>
<span class="switch-view active-switch-view">
<el-popover
v-model="viewShown"
placement="right-start"
trigger="hover"
width="160"
@@ -24,6 +22,9 @@
<svg-icon slot="reference" class="icon" icon-class="switch" />
</el-popover>
</span>
<span class="switch-view show-switch-view">
<svg-icon class="icon" icon-class="switch" @click="toggleSwitch" />
</span>
</div>
</div>
<el-scrollbar class="menu-wrap" wrap-class="scrollbar-wrapper">
@@ -53,6 +54,9 @@
<Hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
</div>
</div>
<div class="mobile-menu" :class="{'is-show': viewShown}" @click="viewShown = false">
<ViewSwitcher :mode="'vertical'" />
</div>
</div>
</template>
@@ -124,6 +128,9 @@ export default {
methods: {
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar')
},
toggleSwitch() {
this.viewShown = true
}
}
}
@@ -217,26 +224,57 @@ export default {
}
}
.is-show {
display: block!important;;
}
.mobile-menu {
display: none;
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
padding-top: 10px;
background: #fff;
z-index: 100;
}
.show-switch-view {
display: none;
}
.active-mobile {
display: none;
& > > > .organization {
height: 48px;
line-height: 48px;
padding-left: 8px;
background: transparent;
color: #fff;
border-bottom: 1px solid rgba(31, 35, 41, .15);
}
& > > > .menu-main {
margin-left: -10px;
.el-input--prefix .el-input__inner {
height: 48px!important;
line-height: 48px!important;
}
.svg-icon {
color: #FFF!important;
margin-right:0px!important;
}
}
& > > > .title-label {
color: white !important;
}
.mobile-view-switch > > > .el-menu-item.is-active {
color: #ffffff;
.mobile-view-switch {
&>>> .el-menu-item.is-active {
color: var(--menu-text-active)!important;
.svg-icon {
color: var(--menu-text-active)!important;
}
}
}
}
@@ -245,7 +283,10 @@ export default {
display: block;
}
.active-switch-view {
display: none !important;;
display: none!important;
}
.show-switch-view {
display: block!important;
}
}
</style>

View File

@@ -207,3 +207,10 @@ input[type=file] {
.el-table .el-table__row .show-full-content > .cell {
white-space: normal!important;
}
@media screen and (max-width: 992px) {
.el-select-dropdown.switch-org {
left: 0!important;
width: 100vw!important;
}
}

View File

@@ -10,7 +10,7 @@ function getPropOrg() {
if (defaultOrg) {
return defaultOrg
}
return orgs.filter(item => !item['is_root'])[0]
return orgs.filter(item => !item['is_root'] && item.id !== SYSTEM_ORG_ID)[0]
}
async function change2PropOrg() {

View File

@@ -8,7 +8,7 @@ import { Message } from '@/utils/Message'
import store from '@/store'
import axiosRetry from 'axios-retry'
import router from '@/router'
import { DEFAULT_ORG_ID } from '@/utils/org'
import { DEFAULT_ORG_ID, SYSTEM_ORG_ID } from '@/utils/org'
// create an axios instance
const service = axios.create({
@@ -25,7 +25,7 @@ function beforeRequestAddToken(config) {
const queryOrgId = router.currentRoute.query?.oid
const storeOrgId = store.getters.currentOrg?.id
let orgId = queryOrgId || storeOrgId
if (!store.getters.publicSettings?.XPACK_ENABLED) {
if (!store.getters.publicSettings?.XPACK_ENABLED && orgId !== SYSTEM_ORG_ID) {
orgId = DEFAULT_ORG_ID
}
if (orgId) {

View File

@@ -16,7 +16,7 @@ export default {
data() {
return {
initial: {
is_periodic: true,
is_periodic: this.$store.getters.hasValidLicense,
password_rules: {
length: 30
},
@@ -64,6 +64,10 @@ export default {
el: {
readonly: true
}
},
is_periodic: {
type: 'switch',
disabled: !this.$store.getters.hasValidLicense
}
},
createSuccessNextRoute: { name: 'AccountPushList' },

View File

@@ -27,7 +27,8 @@ export default {
width: '100px'
}
}
}
},
helpMessage: this.$t('assets.DomainHelpMessage')
}
}
}

View File

@@ -1,5 +1,8 @@
<template>
<div>
<el-alert v-if="helpMessage" type="success">
<span class="announcement-main" v-html="helpMessage" />
</el-alert>
<ListTable ref="ListTable" :header-actions="iHeaderActions" :table-config="iTableConfig" />
<PlatformDialog :category="category" :visible.sync="showPlatform" />
<AssetBulkUpdateDialog
@@ -52,6 +55,10 @@ export default {
addExtraMoreActions: {
type: Array,
default: () => []
},
helpMessage: {
type: String,
default: ''
}
},
data() {

View File

@@ -185,8 +185,13 @@ export default {
}
>>> .el-collapse {
border: none;
.el-collapse-item:last-child .el-collapse-item__header {
border: none;
.el-collapse-item:last-child {
.el-collapse-item__header {
border: none;
}
.el-collapse-item__wrap {
border-bottom: none;
}
}
}
</style>

View File

@@ -3,9 +3,8 @@ import rules from '@/components/DataForm/rules'
import { JsonEditor } from '@/components/FormFields'
import { assetFieldsMeta } from '@/views/assets/const'
const assetMeta = assetFieldsMeta()
export const platformFieldsMeta = (vm) => {
const assetMeta = assetFieldsMeta(vm)
return {
automation: {
initial: {

View File

@@ -29,6 +29,7 @@ export const filterSelectValues = (values) => {
export const assetFieldsMeta = (vm) => {
const platformProtocols = []
const secretTypes = []
const platformType = vm?.$route.query.platform_type
return {
address: {
rules: [rules.IpCheck, rules.specialEmojiCheck]
@@ -58,9 +59,8 @@ export const assetFieldsMeta = (vm) => {
platform: {
el: {
multiple: false,
disabled: true,
ajax: {
url: '/api/v1/assets/platforms/',
url: `/api/v1/assets/platforms/?type=${platformType}`,
transformOption: (item) => {
return { label: item.name, value: item.id }
}

View File

@@ -8,7 +8,6 @@
<script>
import { GenericCreateUpdatePage } from '@/layout/components'
import AssetSelect from '@/components/AssetSelect'
import { JsonEditor } from '@/components/FormFields'
import CodeEditor from '@/components/FormFields/CodeEditor'
import { CronTab } from '@/components'
import i18n from '@/i18n/i18n'
@@ -30,7 +29,6 @@ export default {
[this.$t('common.Basic'), ['name', 'type', 'instant']],
[this.$t('common.Task'), ['module', 'args', 'playbook', 'chdir', 'timeout']],
[this.$t('ops.Asset'), ['assets', 'runas', 'runas_policy']],
[this.$t('ops.Parameter'), ['use_parameter_define', 'parameters_define']],
[this.$t('ops.Plan'), ['run_after_save', 'is_periodic', 'crontab']],
[this.$t('common.Other'), ['comment']]
],
@@ -134,13 +132,6 @@ export default {
return true
}
},
parameters_define: {
label: '',
component: JsonEditor,
hidden: (formValue) => {
return !formValue.use_parameter_define
}
},
chdir: {
helpText: i18n.t('ops.ChdirHelpText'),
hidden: (formValue) => {
@@ -153,13 +144,6 @@ export default {
return this.instantTask
}
},
use_parameter_define: {
label: this.$t('ops.UseParameterDefine'),
type: 'switch',
hidden: () => {
return this.instantTask
}
},
is_periodic: {
type: 'switch',
hidden: () => {

View File

@@ -368,6 +368,10 @@ export default {
this.$message.error(this.$tc('ops.RequiredContent'))
return
}
if (!this.runas) {
this.$message.error(this.$tc('ops.RequiredRunas'))
return
}
const data = {
assets: hosts,

View File

@@ -90,10 +90,12 @@ export default {
name: 'run',
can: this.$hasPerm('ops.add_jobexecution') && !this.$store.getters.currentOrgIsRoot,
callback: ({ row }) => {
const params = JSON.parse(row.parameters_define)
if (Object.keys(params).length > 0) {
this.item = row
this.showJobRunDialog = true
if (row?.use_parameter_define && row?.parameters_define) {
const params = JSON.parse(row.parameters_define)
if (Object.keys(params).length > 0) {
this.item = row
this.showJobRunDialog = true
}
} else {
this.runJob(row)
}

View File

@@ -78,6 +78,7 @@ export default {
type: 'button',
align: 'left',
icon: 'fa fa-save',
tip: this.$tc('ops.Save'),
el: {
type: 'primary'
},
@@ -88,7 +89,8 @@ export default {
reset: {
type: 'button',
align: 'left',
icon: 'fa fa-refresh',
icon: 'fa fa-undo',
tip: this.$tc('ops.Reset'),
el: {
type: 'primary'
},

View File

@@ -91,7 +91,15 @@ export default {
type: 'input',
label: this.$t('perms.Account'),
component: AccountFormatter,
helpText: this.$t('perms.AccountsHelp')
helpText: this.$t('perms.AccountsHelp'),
el: {
assets: [],
nodes: []
},
hidden: (formValue) => {
this.fieldsMeta.accounts.el.assets = formValue.assets
this.fieldsMeta.accounts.el.nodes = formValue.nodes
}
},
actions: {
label: this.$t('perms.Actions'),

View File

@@ -12,6 +12,7 @@
</el-checkbox-group>
<TagInput
v-if="showSpecAccounts"
:autocomplete="autocomplete"
:value="specAccountsInput"
@change="handleTagChange"
/>
@@ -20,13 +21,7 @@
<script>
import { TagInput } from '@/components/FormFields'
import {
AllAccount,
SPECAccount,
SameUSER,
ManualINPUT,
AccountLabelMapper
} from '@/views/perms/const'
import { AccountLabelMapper, AllAccount, ManualINPUT, SameUSER, SPECAccount } from '@/views/perms/const'
export default {
components: {
@@ -36,9 +31,18 @@ export default {
value: {
type: [Array],
default: () => []
},
assets: {
type: [Array],
default: () => []
},
nodes: {
type: [Array],
default: () => []
}
},
data() {
const vm = this
const choices = [
{
label: AccountLabelMapper[AllAccount],
@@ -64,7 +68,27 @@ export default {
choicesSelected: [],
defaultChoices: [this.ALL],
specAccountsInput: [],
showSpecAccounts: false
showSpecAccounts: false,
autocomplete: (query, cb) => {
this.$axios.get('/api/v1/accounts/accounts/username-suggestions/', {
params: {
username: query,
assets: this.assets.slice(0, 20).join(','),
nodes: this.nodes.slice(0, 20).map(item => {
if (typeof item === 'object') {
return item.pk
} else {
return item.pk
}
}).join(',')
}
}).then(res => {
const data = res
.filter(item => vm.value.indexOf(item) === -1)
.map(v => ({ value: v, label: v }))
cb(data)
})
}
}
},
mounted() {

View File

@@ -141,7 +141,7 @@ export default {
'ops.view_job': ['assets.view_asset', 'assets.view_node', 'ops.view_adhoc', 'ops.view_playbook'],
'ops.change_job': ['assets.view_asset', 'assets.view_node', 'ops.view_adhoc', 'ops.view_playbook'],
'ops.add_job': ['assets.view_asset', 'assets.view_node', 'ops.view_adhoc', 'ops.view_playbook'],
'ops.add_jobexecution': ['ops.view_celerytask'],
'ops.add_jobexecution': ['ops.view_celerytaskexecution'],
'xpack.add_syncinstancetask': [
'assets.view_asset', 'assets.view_node', 'assets.view_systemuser',
'xpack.view_account'

View File

@@ -12,7 +12,7 @@ else
fi
function change_version() {
sedi "s@<strong> version-dev </strong>@<strong> ${VERSION} </strong>@g" "${project_dir}/src/layout/components/NavHeader/About.vue" || return 2
sedi "s@version-dev@${VERSION}@g" "${project_dir}/src/layout/components/NavHeader/About.vue" || return 2
}
function install_deps() {