mirror of
https://github.com/jumpserver/lina.git
synced 2025-11-07 09:58:38 +00:00
Compare commits
64 Commits
pr@v3@fixe
...
v3.0.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec1dfd3f5c | ||
|
|
e83afb02fb | ||
|
|
fadc3f8cb0 | ||
|
|
fb4a940d2d | ||
|
|
2d3d1396ce | ||
|
|
a231623e77 | ||
|
|
cdf46e6369 | ||
|
|
e58cbb33ca | ||
|
|
26fcbb5bc7 | ||
|
|
f8cad13091 | ||
|
|
62b1555922 | ||
|
|
6ff32568bc | ||
|
|
d0460c62df | ||
|
|
d14957545a | ||
|
|
15b561a81e | ||
|
|
fd47bf0484 | ||
|
|
543dc1d31b | ||
|
|
980ffb14d1 | ||
|
|
be9cef64af | ||
|
|
c2706bbafa | ||
|
|
d65f5326ae | ||
|
|
5e048b5537 | ||
|
|
5199bfb144 | ||
|
|
415e01984a | ||
|
|
bca21fb11e | ||
|
|
f1d4bbe23c | ||
|
|
c425d3842a | ||
|
|
86147dc48e | ||
|
|
656a76dae9 | ||
|
|
bad88b1543 | ||
|
|
71c58dcf8f | ||
|
|
7e953296c5 | ||
|
|
e381a32954 | ||
|
|
a4c239a79f | ||
|
|
645b3d96c4 | ||
|
|
36aea652d6 | ||
|
|
1a42ce90ab | ||
|
|
31a401b55d | ||
|
|
582a84178d | ||
|
|
9b9f7c936c | ||
|
|
2a6100957f | ||
|
|
16606d6a27 | ||
|
|
0a612f50e6 | ||
|
|
fe36fa9390 | ||
|
|
ba109900ec | ||
|
|
ec7768267f | ||
|
|
cc58b374ab | ||
|
|
04ffbb8fd6 | ||
|
|
49880f6739 | ||
|
|
e6f98d58c4 | ||
|
|
fd1f16d43c | ||
|
|
968b2415b1 | ||
|
|
776090d6ba | ||
|
|
3a37952288 | ||
|
|
62b8fc0e3b | ||
|
|
b2028869cb | ||
|
|
5277a725f8 | ||
|
|
f137788c1a | ||
|
|
f7d17c8de7 | ||
|
|
feea70b0be | ||
|
|
04696ef3d6 | ||
|
|
1731f4f788 | ||
|
|
6f25d93909 | ||
|
|
46461ec324 |
@@ -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
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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
|
||||
})
|
||||
},
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 username;Manual 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 asset;Manual 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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": "未発表"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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": "同名账号",
|
||||
|
||||
3
src/icons/svg/direction-left.svg
Normal file
3
src/icons/svg/direction-left.svg
Normal 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 |
@@ -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;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
:value="currentOrgId"
|
||||
class="org-select organization"
|
||||
filterable
|
||||
popper-class="switch-org"
|
||||
@change="changeOrg"
|
||||
>
|
||||
<template slot="prefix">
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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() {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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' },
|
||||
|
||||
@@ -27,7 +27,8 @@ export default {
|
||||
width: '100px'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
helpMessage: this.$t('assets.DomainHelpMessage')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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 }
|
||||
}
|
||||
|
||||
@@ -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: () => {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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'
|
||||
},
|
||||
|
||||
@@ -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'),
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user