mirror of
https://github.com/jumpserver/lina.git
synced 2026-02-21 22:28:53 +00:00
Compare commits
87 Commits
pr@dev@per
...
v3.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e7fa6713b6 | ||
|
|
4198f3fb77 | ||
|
|
e0889a810c | ||
|
|
3ae48d18ec | ||
|
|
3578bcc21b | ||
|
|
3d2535762f | ||
|
|
eec46b22e2 | ||
|
|
4facbeb81d | ||
|
|
8f49680377 | ||
|
|
b5df32e635 | ||
|
|
3e497d52ef | ||
|
|
0dd1570b38 | ||
|
|
82e7620f1d | ||
|
|
189a524948 | ||
|
|
ad52b028de | ||
|
|
56ac0ff825 | ||
|
|
f0b4bbdb63 | ||
|
|
cf9da2353c | ||
|
|
3993b508bf | ||
|
|
73ee639542 | ||
|
|
71726cedd9 | ||
|
|
bd959224d9 | ||
|
|
2877e5e6ac | ||
|
|
b112a9c518 | ||
|
|
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 |
3
.github/workflows/release-drafter.yml
vendored
3
.github/workflows/release-drafter.yml
vendored
@@ -31,6 +31,9 @@ jobs:
|
|||||||
config-name: release-config.yml
|
config-name: release-config.yml
|
||||||
version: ${{ steps.get_version.outputs.TAG }}
|
version: ${{ steps.get_version.outputs.TAG }}
|
||||||
tag: ${{ steps.get_version.outputs.TAG }}
|
tag: ${{ steps.get_version.outputs.TAG }}
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '14.16'
|
||||||
|
|
||||||
build-and-release:
|
build-and-release:
|
||||||
needs: create-realese
|
needs: create-realese
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ ARG VERSION
|
|||||||
ENV VERSION=$VERSION
|
ENV VERSION=$VERSION
|
||||||
ADD . /data
|
ADD . /data
|
||||||
RUN --mount=type=cache,target=/usr/local/share/.cache/yarn,sharing=locked,id=lina \
|
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
|
&& yarn build
|
||||||
|
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { UpdateToken } from '@/components/FormFields'
|
|||||||
import Select2 from '@/components/FormFields/Select2'
|
import Select2 from '@/components/FormFields/Select2'
|
||||||
import AssetSelect from '@/components/AssetSelect'
|
import AssetSelect from '@/components/AssetSelect'
|
||||||
import { encryptPassword } from '@/utils/crypto'
|
import { encryptPassword } from '@/utils/crypto'
|
||||||
import { RequiredChange } from '@/components/DataForm/rules'
|
import { RequiredChange, Required } from '@/components/DataForm/rules'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AccountCreateForm',
|
name: 'AccountCreateForm',
|
||||||
@@ -67,6 +67,7 @@ export default {
|
|||||||
],
|
],
|
||||||
fieldsMeta: {
|
fieldsMeta: {
|
||||||
assets: {
|
assets: {
|
||||||
|
rules: [Required],
|
||||||
component: AssetSelect,
|
component: AssetSelect,
|
||||||
label: this.$t('assets.Asset'),
|
label: this.$t('assets.Asset'),
|
||||||
el: {
|
el: {
|
||||||
@@ -236,7 +237,6 @@ export default {
|
|||||||
const secretType = form.secret_type || ''
|
const secretType = form.secret_type || ''
|
||||||
if (secretType !== 'password') {
|
if (secretType !== 'password') {
|
||||||
form.secret = form[secretType]
|
form.secret = form[secretType]
|
||||||
delete form[secretType]
|
|
||||||
}
|
}
|
||||||
form.secret = this.encryptPassword ? encryptPassword(form.secret) : form.secret
|
form.secret = this.encryptPassword ? encryptPassword(form.secret) : form.secret
|
||||||
if (!form.secret) {
|
if (!form.secret) {
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ export default {
|
|||||||
secretInfo: {},
|
secretInfo: {},
|
||||||
versions: '-',
|
versions: '-',
|
||||||
showSecret: false,
|
showSecret: false,
|
||||||
sshKeyFingerprint: '',
|
sshKeyFingerprint: '-',
|
||||||
historyCount: 0,
|
historyCount: 0,
|
||||||
showPasswordHistoryDialog: false
|
showPasswordHistoryDialog: false
|
||||||
}
|
}
|
||||||
@@ -128,7 +128,7 @@ export default {
|
|||||||
getAuthInfo() {
|
getAuthInfo() {
|
||||||
this.$axios.get(this.url, { disableFlashErrorMsg: true }).then(resp => {
|
this.$axios.get(this.url, { disableFlashErrorMsg: true }).then(resp => {
|
||||||
this.secretInfo = resp
|
this.secretInfo = resp
|
||||||
this.sshKeyFingerprint = resp?.spec_info
|
this.sshKeyFingerprint = resp?.spec_info?.ssh_key_fingerprint || '-'
|
||||||
this.showSecret = true
|
this.showSecret = true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -9,10 +9,10 @@
|
|||||||
>
|
>
|
||||||
<span class="announcement-main">{{ announcement.content }}</span>
|
<span class="announcement-main">{{ announcement.content }}</span>
|
||||||
<span v-if="announcement.link">
|
<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') }}
|
{{ $t('common.ViewMore') }}
|
||||||
</el-link>
|
</el-link>
|
||||||
<i class="fa fa-external-link" />
|
<i class="fa fa-external-link icon" />
|
||||||
</span>
|
</span>
|
||||||
</el-alert>
|
</el-alert>
|
||||||
</template>
|
</template>
|
||||||
@@ -67,5 +67,7 @@ export default {
|
|||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
border-bottom: solid 1px;
|
border-bottom: solid 1px;
|
||||||
}
|
}
|
||||||
|
.icon {
|
||||||
|
vertical-align: text-bottom;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -5,20 +5,20 @@
|
|||||||
top="1vh"
|
top="1vh"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
width="80vw"
|
width="80vw"
|
||||||
@close="handleClose"
|
|
||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
|
@close="handleClose"
|
||||||
@confirm="handleConfirm"
|
@confirm="handleConfirm"
|
||||||
v-on="$listeners"
|
v-on="$listeners"
|
||||||
>
|
>
|
||||||
<AssetTreeTable
|
<AssetTreeTable
|
||||||
ref="ListPage"
|
ref="ListPage"
|
||||||
v-bind="$attrs"
|
|
||||||
:header-actions="headerActions"
|
:header-actions="headerActions"
|
||||||
:table-config="tableConfig"
|
|
||||||
:url="baseUrl"
|
|
||||||
:node-url="baseNodeUrl"
|
:node-url="baseNodeUrl"
|
||||||
|
:table-config="tableConfig"
|
||||||
:tree-url="`${baseNodeUrl}children/tree/`"
|
:tree-url="`${baseNodeUrl}children/tree/`"
|
||||||
|
:url="baseUrl"
|
||||||
class="tree-table"
|
class="tree-table"
|
||||||
|
v-bind="$attrs"
|
||||||
/>
|
/>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
@@ -172,10 +172,11 @@ export default {
|
|||||||
|
|
||||||
.left {
|
.left {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.treebox {
|
.right {
|
||||||
height: 70vh;
|
height: calc(100vh - 200px);
|
||||||
}
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mini {
|
.mini {
|
||||||
@@ -188,8 +189,8 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.page ::v-deep .treebox {
|
.page ::v-deep .treebox .ztree {
|
||||||
height: inherit !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.asset-select-dialog ::v-deep .el-icon-circle-check {
|
.asset-select-dialog ::v-deep .el-icon-circle-check {
|
||||||
|
|||||||
@@ -11,12 +11,12 @@
|
|||||||
<AssetSelectDialog
|
<AssetSelectDialog
|
||||||
v-if="dialogVisible"
|
v-if="dialogVisible"
|
||||||
ref="dialog"
|
ref="dialog"
|
||||||
|
:base-node-url="baseNodeUrl"
|
||||||
|
:base-url="baseUrl"
|
||||||
|
:tree-url-query="treeUrlQuery"
|
||||||
:value="value"
|
:value="value"
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
:tree-url-query="treeUrlQuery"
|
|
||||||
:base-url="baseUrl"
|
|
||||||
:base-node-url="baseNodeUrl"
|
|
||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
@confirm="handleConfirm"
|
@confirm="handleConfirm"
|
||||||
v-on="$listeners"
|
v-on="$listeners"
|
||||||
@@ -143,8 +143,8 @@ export default {
|
|||||||
.left {
|
.left {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
|
|
||||||
.treebox {
|
.ztree {
|
||||||
height: 70vh;
|
height: calc(100vh - 250px) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ export const IpCheck = {
|
|||||||
required: true,
|
required: true,
|
||||||
validator: (rule, value, callback) => {
|
validator: (rule, value, callback) => {
|
||||||
value = value?.trim()
|
value = value?.trim()
|
||||||
if (/^[\w://.?-]+$/.test(value)) {
|
const urlRegExp = /^[\w://.?=&#-]+$/
|
||||||
|
if (urlRegExp.test(value)) {
|
||||||
callback()
|
callback()
|
||||||
} else {
|
} else {
|
||||||
callback(new Error(i18n.t('common.FormatError')))
|
callback(new Error(i18n.t('common.FormatError')))
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export default {
|
|||||||
buttonSize: 'mini',
|
buttonSize: 'mini',
|
||||||
tableAttrs: {
|
tableAttrs: {
|
||||||
stripe: false, // 斑马纹表格
|
stripe: false, // 斑马纹表格
|
||||||
border: false, // 表格边框
|
border: true, // 表格边框
|
||||||
fit: true, // 宽度自适应,
|
fit: true, // 宽度自适应,
|
||||||
tooltipEffect: 'dark',
|
tooltipEffect: 'dark',
|
||||||
rowClassName: ({ row }) => {
|
rowClassName: ({ row }) => {
|
||||||
@@ -182,7 +182,7 @@ export default {
|
|||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
padding: 6px 0;
|
padding: 6px 0;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
border-right: none;
|
||||||
* {
|
* {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
@@ -204,11 +204,14 @@ export default {
|
|||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
|
border-right: none;
|
||||||
.cell {
|
.cell {
|
||||||
white-space: nowrap !important;
|
white-space: nowrap !important;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
&:hover {
|
||||||
|
border-right: 2px solid #EBEEF5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -408,13 +408,13 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.treebox {
|
.treebox {
|
||||||
height: 70vh;
|
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
|
||||||
> > > .ztree {
|
>>> .ztree {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
height: calc(100% - 50px);
|
max-height: calc(100vh - 220px);
|
||||||
|
min-height: 500px;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
|
|||||||
@@ -12,14 +12,17 @@
|
|||||||
>
|
>
|
||||||
{{ v }}
|
{{ v }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-input
|
<component
|
||||||
|
:is="component"
|
||||||
ref="SearchInput"
|
ref="SearchInput"
|
||||||
v-model.trim="filterValue"
|
v-model.trim="filterValue"
|
||||||
|
:fetch-suggestions="autocomplete"
|
||||||
:placeholder="this.$t('common.EnterToContinue')"
|
:placeholder="this.$t('common.EnterToContinue')"
|
||||||
class="search-input"
|
class="search-input"
|
||||||
@blur="focus = false"
|
@blur="focus = false"
|
||||||
@change="handleConfirm"
|
@change="handleConfirm"
|
||||||
@focus="focus = true"
|
@focus="focus = true"
|
||||||
|
@select="handleSelect"
|
||||||
@keyup.enter.native="handleConfirm"
|
@keyup.enter.native="handleConfirm"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -41,13 +44,18 @@ export default {
|
|||||||
placeholder: {
|
placeholder: {
|
||||||
type: String,
|
type: String,
|
||||||
default: () => i18n.t('perms.Input')
|
default: () => i18n.t('perms.Input')
|
||||||
|
},
|
||||||
|
autocomplete: {
|
||||||
|
type: Function,
|
||||||
|
default: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
filterTags: this.value,
|
filterTags: this.value,
|
||||||
focus: false,
|
focus: false,
|
||||||
filterValue: ''
|
filterValue: '',
|
||||||
|
component: this.autocomplete ? 'el-autocomplete' : 'el-input'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -55,6 +63,10 @@ export default {
|
|||||||
this.filterTags.splice(this.filterTags.indexOf(tag), 1)
|
this.filterTags.splice(this.filterTags.indexOf(tag), 1)
|
||||||
this.$emit('change', this.filterTags)
|
this.$emit('change', this.filterTags)
|
||||||
},
|
},
|
||||||
|
handleSelect(item) {
|
||||||
|
this.filterValue = item.value
|
||||||
|
this.handleConfirm()
|
||||||
|
},
|
||||||
handleConfirm() {
|
handleConfirm() {
|
||||||
if (this.filterValue === '') return
|
if (this.filterValue === '') return
|
||||||
if (!this.filterTags.includes(this.filterValue)) {
|
if (!this.filterTags.includes(this.filterValue)) {
|
||||||
|
|||||||
@@ -158,8 +158,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$eventBus.$on('showExportDialog', ({ selectedRows, url, name }) => {
|
this.$eventBus.$on('showExportDialog', ({ selectedRows, url, name }) => {
|
||||||
// Todo: 没有时间了,只能先这么处理了
|
if (url === this.url || url.indexOf(this.url) > -1) {
|
||||||
if (url === this.url || url.indexOf(this.url) > -1 || url.indexOf('account') > -1) {
|
|
||||||
this.showExportDialog()
|
this.showExportDialog()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -37,7 +37,9 @@ export default {
|
|||||||
handleExportClick: {
|
handleExportClick: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: function({ selectedRows }) {
|
default: function({ selectedRows }) {
|
||||||
this.$eventBus.$emit('showExportDialog', { selectedRows, url: this.tableUrl, name: this.name })
|
const { exportOptions, tableUrl } = this
|
||||||
|
const url = exportOptions?.url ? exportOptions.url : tableUrl
|
||||||
|
this.$eventBus.$emit('showExportDialog', { selectedRows, url, name: this.name })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
hasImport: defaultTrue,
|
hasImport: defaultTrue,
|
||||||
|
|||||||
@@ -55,14 +55,14 @@ export default {
|
|||||||
toolbar: [
|
toolbar: [
|
||||||
{
|
{
|
||||||
tip: this.$tc('ops.ScrollToTop'),
|
tip: this.$tc('ops.ScrollToTop'),
|
||||||
icon: 'fa fa-upload',
|
icon: 'fa fa-arrow-up',
|
||||||
callback: () => {
|
callback: () => {
|
||||||
this.xterm.scrollToTop()
|
this.xterm.scrollToTop()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
tip: this.$tc('ops.ScrollToBottom'),
|
tip: this.$tc('ops.ScrollToBottom'),
|
||||||
icon: 'fa fa-download',
|
icon: 'fa fa-arrow-down',
|
||||||
callback: () => {
|
callback: () => {
|
||||||
this.xterm.scrollToBottom()
|
this.xterm.scrollToBottom()
|
||||||
}
|
}
|
||||||
@@ -108,10 +108,10 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.actions {
|
.actions {
|
||||||
position: absolute;
|
text-align: right;
|
||||||
right: 4px;
|
background-color: #FFF;
|
||||||
z-index: 2;
|
padding-right: 5px;
|
||||||
margin-top: 4px;
|
padding-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-button {
|
.el-button {
|
||||||
|
|||||||
@@ -290,6 +290,7 @@
|
|||||||
"Domain": "Domain",
|
"Domain": "Domain",
|
||||||
"DomainDetail": "Domain detail",
|
"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",
|
"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",
|
"FullName": "Full name",
|
||||||
"Gateway": "Gateway",
|
"Gateway": "Gateway",
|
||||||
"GatewayList": "Gateway",
|
"GatewayList": "Gateway",
|
||||||
@@ -437,10 +438,12 @@
|
|||||||
"ReLoginErr": "Login time has exceeded 5 minutes, please login again"
|
"ReLoginErr": "Login time has exceeded 5 minutes, please login again"
|
||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"DownloadCenter": "Download center",
|
"CommunityEdition": "Community Edition",
|
||||||
"RestoreDefault": "Restore default",
|
"EnterpriseEdition": "Enterprise Edition",
|
||||||
"ImportOrg": "Import organization",
|
"Product": "Product",
|
||||||
"About": "About",
|
"About": "About",
|
||||||
|
"DownloadCenter": "Download center",
|
||||||
|
"ImportOrg": "Import organization",
|
||||||
"PermissionCompany": "Permission company",
|
"PermissionCompany": "Permission company",
|
||||||
"ApproverNumbers": "Approver numbers",
|
"ApproverNumbers": "Approver numbers",
|
||||||
"ConvenientOperate": "Convenient operate",
|
"ConvenientOperate": "Convenient operate",
|
||||||
@@ -841,6 +844,8 @@
|
|||||||
"TotalJobLog": "Total job log"
|
"TotalJobLog": "Total job log"
|
||||||
},
|
},
|
||||||
"ops": {
|
"ops": {
|
||||||
|
"Save": "Save",
|
||||||
|
"Reset": "Reset",
|
||||||
"SystemError": "System Error",
|
"SystemError": "System Error",
|
||||||
"RunasHelpText": "Fill in the user name to run the script",
|
"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",
|
"RunasPolicyHelpText": "Indicates the account selection strategy when there is no running user on the current asset",
|
||||||
@@ -969,6 +974,7 @@
|
|||||||
"FailedAsset": "Failed asset",
|
"FailedAsset": "Failed asset",
|
||||||
"AdhocDetail": "Adhoc detail",
|
"AdhocDetail": "Adhoc detail",
|
||||||
"RequiredContent": "Please input the command",
|
"RequiredContent": "Please input the command",
|
||||||
|
"RequiredRunas": "Please input the run user",
|
||||||
"DateFinished": "Date finished",
|
"DateFinished": "Date finished",
|
||||||
"DeleteFile": "Delete file",
|
"DeleteFile": "Delete file",
|
||||||
"AssetAmount": "Assets amount",
|
"AssetAmount": "Assets amount",
|
||||||
@@ -999,7 +1005,7 @@
|
|||||||
"ManualInput": "Manual input",
|
"ManualInput": "Manual input",
|
||||||
"SameAccount": "Same account",
|
"SameAccount": "Same account",
|
||||||
"SpecifyAccounts": "Specify accounts",
|
"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",
|
"Input": "Input",
|
||||||
"permAccount": "Accounts",
|
"permAccount": "Accounts",
|
||||||
"Actions": "Actions",
|
"Actions": "Actions",
|
||||||
|
|||||||
@@ -283,6 +283,7 @@
|
|||||||
"Domain": "ドメイン",
|
"Domain": "ドメイン",
|
||||||
"DomainDetail": "ドメインの詳細",
|
"DomainDetail": "ドメインの詳細",
|
||||||
"DomainHelpMessage": "ドメイン機能は、一部の環境 (ハイブリッドクラウドなど) が直接接続できないことを解決するために追加された機能で、ゲートウェイサーバを介してジャンプ登録を行うのが原理です。JMS => ドメインゲートウェイ => ターゲット資産",
|
"DomainHelpMessage": "ドメイン機能は、一部の環境 (ハイブリッドクラウドなど) が直接接続できないことを解決するために追加された機能で、ゲートウェイサーバを介してジャンプ登録を行うのが原理です。JMS => ドメインゲートウェイ => ターゲット資産",
|
||||||
|
"WebHelpMessage": "Web タイプ資産はリモートアプリケーションに依存しており、システム設定のリモートアプリケーションでパブリッシャを構成してください。",
|
||||||
"FullName": "フルネーム",
|
"FullName": "フルネーム",
|
||||||
"Gateway": "ゲートウェイ",
|
"Gateway": "ゲートウェイ",
|
||||||
"GatewayProtocolHelpText": "SSHゲートウェイ、プロキシSSH、RDP、VNCをサポート",
|
"GatewayProtocolHelpText": "SSHゲートウェイ、プロキシSSH、RDP、VNCをサポート",
|
||||||
@@ -839,6 +840,8 @@
|
|||||||
"Weekly": "週ごと"
|
"Weekly": "週ごと"
|
||||||
},
|
},
|
||||||
"ops": {
|
"ops": {
|
||||||
|
"Save": "保存#ホゾン#",
|
||||||
|
"Reset": "リストア",
|
||||||
"SystemError": "システムエラー",
|
"SystemError": "システムエラー",
|
||||||
"RunasHelpText": "スクリプトを実行するユーザー名を入力",
|
"RunasHelpText": "スクリプトを実行するユーザー名を入力",
|
||||||
"RunasPolicyHelpText": "現在の資産にこの実行ユーザーが存在しない場合にアカウント選択ポリシーを実行することを示します",
|
"RunasPolicyHelpText": "現在の資産にこの実行ユーザーが存在しない場合にアカウント選択ポリシーを実行することを示します",
|
||||||
@@ -965,6 +968,7 @@
|
|||||||
"FailedAsset": "失敗したアセット",
|
"FailedAsset": "失敗したアセット",
|
||||||
"AdhocDetail": "コマンド詳細",
|
"AdhocDetail": "コマンド詳細",
|
||||||
"RequiredContent": "コマンドを入力してください",
|
"RequiredContent": "コマンドを入力してください",
|
||||||
|
"RequiredRunas": "実行ユーザーを入力してください",
|
||||||
"DateFinished": "完了時間",
|
"DateFinished": "完了時間",
|
||||||
"DeleteFile": "ファイルの削除",
|
"DeleteFile": "ファイルの削除",
|
||||||
"AssetAmount": "資産",
|
"AssetAmount": "資産",
|
||||||
@@ -997,7 +1001,7 @@
|
|||||||
"ManualInput": "手動入力",
|
"ManualInput": "手動入力",
|
||||||
"SameAccount": "同じ名前のアカウント",
|
"SameAccount": "同じ名前のアカウント",
|
||||||
"SpecifyAccounts": "入力の指定",
|
"SpecifyAccounts": "入力の指定",
|
||||||
"AccountsHelp": "すべてのアカウント: アカウントはアセットに存在します。 アカウントの指定: ユーザー名でアカウントを指定します。手入力: ユーザー名/パスワード; 同一アカウント:ログインユーザーと同じアカウントのユーザー名",
|
"AccountsHelp": "すべてのアカウント: アカウントはアセットに存在します。 アカウントの指定: 資産の下のアカウントのユーザー名を指定します。手入力: ユーザー名/パスワード; 同一アカウント:ログインユーザーと同じアカウントのユーザー名",
|
||||||
"Input": "入力",
|
"Input": "入力",
|
||||||
"permAccount": "認定アカウント",
|
"permAccount": "認定アカウント",
|
||||||
"Actions": "アクション",
|
"Actions": "アクション",
|
||||||
|
|||||||
@@ -297,6 +297,7 @@
|
|||||||
"Domain": "网域",
|
"Domain": "网域",
|
||||||
"DomainDetail": "网域详情",
|
"DomainDetail": "网域详情",
|
||||||
"DomainHelpMessage": "网域功能是为了解决部分环境(如:混合云)无法直接连接而新增的功能,原理是通过网关服务器进行跳转登录。JMS => 网域网关 => 目标资产",
|
"DomainHelpMessage": "网域功能是为了解决部分环境(如:混合云)无法直接连接而新增的功能,原理是通过网关服务器进行跳转登录。JMS => 网域网关 => 目标资产",
|
||||||
|
"WebHelpMessage": "Web 类型资产依赖于远程应用,请前往系统设置在远程应用中配置发布机。",
|
||||||
"FullName": "全称",
|
"FullName": "全称",
|
||||||
"Gateway": "网关",
|
"Gateway": "网关",
|
||||||
"GatewayProtocolHelpText": "SSH网关,支持代理SSH,RDP和VNC",
|
"GatewayProtocolHelpText": "SSH网关,支持代理SSH,RDP和VNC",
|
||||||
@@ -433,6 +434,9 @@
|
|||||||
"ReLoginErr": "登录时长已超过 5 分钟,请重新登录"
|
"ReLoginErr": "登录时长已超过 5 分钟,请重新登录"
|
||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
|
"CommunityEdition": "社区版",
|
||||||
|
"EnterpriseEdition": "企业版",
|
||||||
|
"Product": "产品",
|
||||||
"RestoreDefault": "恢复默认",
|
"RestoreDefault": "恢复默认",
|
||||||
"DownloadCenter": "下载中心",
|
"DownloadCenter": "下载中心",
|
||||||
"ImportOrg": "导入组织",
|
"ImportOrg": "导入组织",
|
||||||
@@ -835,6 +839,8 @@
|
|||||||
"Weekly": "按周"
|
"Weekly": "按周"
|
||||||
},
|
},
|
||||||
"ops": {
|
"ops": {
|
||||||
|
"Save": "保存",
|
||||||
|
"Reset": "还原",
|
||||||
"SystemError": "系统错误",
|
"SystemError": "系统错误",
|
||||||
"RunasHelpText": "填写运行脚本的用户名",
|
"RunasHelpText": "填写运行脚本的用户名",
|
||||||
"RunasPolicyHelpText": "表示当前资产上没此运行用户时,采取什么账号选择策略",
|
"RunasPolicyHelpText": "表示当前资产上没此运行用户时,采取什么账号选择策略",
|
||||||
@@ -864,6 +870,7 @@
|
|||||||
"UploadPlaybook": "上传 Playbook",
|
"UploadPlaybook": "上传 Playbook",
|
||||||
"RequiredAssetOrNode": "请至少选择一个资产或节点",
|
"RequiredAssetOrNode": "请至少选择一个资产或节点",
|
||||||
"RequiredContent": "请输入命令",
|
"RequiredContent": "请输入命令",
|
||||||
|
"RequiredRunas": "请输入运行用户",
|
||||||
"RequiredEntryFile": "此文件作为运行的入口文件,必须存在",
|
"RequiredEntryFile": "此文件作为运行的入口文件,必须存在",
|
||||||
"ScrollToTop": "滚动到顶部",
|
"ScrollToTop": "滚动到顶部",
|
||||||
"ScrollToBottom": "滚动到底部",
|
"ScrollToBottom": "滚动到底部",
|
||||||
@@ -989,7 +996,7 @@
|
|||||||
},
|
},
|
||||||
"perms": {
|
"perms": {
|
||||||
"": "",
|
"": "",
|
||||||
"AccountsHelp": "所有账号: 资产上添加的账号; 指定账号:指定账号的用户名;手动输入: 用户名/密码 手动输入; 同名账号: 与被授权人用户名相同的账号;",
|
"AccountsHelp": "所有账号: 资产上添加的账号; 指定账号:指定资产下账号的用户名;手动输入: 用户名/密码 手动输入; 同名账号: 与被授权人用户名相同的账号;",
|
||||||
"AllAccounts": "所有账号",
|
"AllAccounts": "所有账号",
|
||||||
"ManualInput": "手动输入",
|
"ManualInput": "手动输入",
|
||||||
"SameAccount": "同名账号",
|
"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"
|
v-if="iVisible"
|
||||||
:show-cancel="false"
|
:show-cancel="false"
|
||||||
:show-confirm="false"
|
:show-confirm="false"
|
||||||
:title="''"
|
:title="$tc('common.About')"
|
||||||
:visible.sync="iVisible"
|
:visible.sync="iVisible"
|
||||||
class="about-dialog"
|
class="about-dialog"
|
||||||
top="10%"
|
top="10%"
|
||||||
@@ -11,10 +11,12 @@
|
|||||||
>
|
>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="head">
|
<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>
|
||||||
<div class="text">{{ $tc('ops.version') }}:<strong> version-dev </strong> <span v-if="!publicSettings.XPACK_LICENSE_IS_VALID"> GPLv3. </span></div>
|
<tr v-for="item of items" v-show="item.has || item.has === undefined" :key="item.label" class="text">
|
||||||
<div class="text">{{ $tc('common.PermissionCompany') }}:{{ corporation }}</div>
|
<td class="title">{{ item.label }}: </td>
|
||||||
|
<td class="value">{{ item.value }}</td>
|
||||||
|
</tr>
|
||||||
<el-divider class="divider" />
|
<el-divider class="divider" />
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<span v-for="(i, index) in actions" :key="index" class="text-link" @click="onClick(i.name)">
|
<span v-for="(i, index) in actions" :key="index" class="text-link" @click="onClick(i.name)">
|
||||||
@@ -42,7 +44,6 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
logoTextSrc: require('@/assets/img/logo_text_green.png'),
|
|
||||||
actions: [
|
actions: [
|
||||||
{
|
{
|
||||||
name: 'github',
|
name: 'github',
|
||||||
@@ -69,8 +70,46 @@ export default {
|
|||||||
return this.visible
|
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() {
|
corporation() {
|
||||||
return this.publicSettings.XPACK_LICENSE_INFO.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: {
|
methods: {
|
||||||
@@ -90,29 +129,36 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.about-dialog {
|
.about-dialog {
|
||||||
&>>> .el-dialog__header {
|
&.dialog >>> .el-dialog__body {
|
||||||
background-color: #FAFBFD;
|
padding: 20px 30px;
|
||||||
border-bottom: none;
|
|
||||||
}
|
}
|
||||||
&>>> .el-dialog__body {
|
&.dialog >>> .el-dialog__footer {
|
||||||
background-color: #FAFBFD;
|
border-top: none;
|
||||||
padding: 10px 40px 20px;
|
display: none;
|
||||||
}
|
|
||||||
&>>> .el-dialog__footer {
|
|
||||||
padding: 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.head {
|
.head {
|
||||||
text-align: center;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box {
|
.box {
|
||||||
.text {
|
.text {
|
||||||
margin-bottom: 10px;
|
line-height: 2;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #666;
|
color: #666;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.value {
|
||||||
|
padding-left: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
:value="currentOrgId"
|
:value="currentOrgId"
|
||||||
class="org-select organization"
|
class="org-select organization"
|
||||||
filterable
|
filterable
|
||||||
|
popper-class="switch-org"
|
||||||
@change="changeOrg"
|
@change="changeOrg"
|
||||||
>
|
>
|
||||||
<template slot="prefix">
|
<template slot="prefix">
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
<Logo v-if="showLogo" :collapse="false" />
|
<Logo v-if="showLogo" :collapse="false" />
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li v-if="showOrganize()" class="left-item" style="margin-left: 21px">
|
<li v-if="showOrganize()" class="left-item" style="margin-left: 21px; vertical-align: middle;">
|
||||||
<Organization class="organization" />
|
<Organization class="organization" />
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -109,7 +109,7 @@ export default {
|
|||||||
.left-item {
|
.left-item {
|
||||||
line-height: $header-height;
|
line-height: $header-height;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: middle;
|
vertical-align: top;
|
||||||
|
|
||||||
& > > > .el-submenu__title {
|
& > > > .el-submenu__title {
|
||||||
font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export default {
|
|||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
line-height: 50px;
|
line-height: 48px;
|
||||||
// background: #2b2f3a;
|
// background: #2b2f3a;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
@@ -3,19 +3,17 @@
|
|||||||
<div class="nav-header">
|
<div class="nav-header">
|
||||||
<div class="active-mobile">
|
<div class="active-mobile">
|
||||||
<Organization v-if="$hasLicense()" class="organization" />
|
<Organization v-if="$hasLicense()" class="organization" />
|
||||||
<ViewSwitcher class="mobile-view-switch" mode="vertical" />
|
|
||||||
</div>
|
</div>
|
||||||
<div class="nav-title">
|
<div class="nav-title">
|
||||||
<span
|
<span
|
||||||
v-show="!isCollapse"
|
v-show="!isCollapse"
|
||||||
style="margin-left: 5px;"
|
style="margin-left: 5px;"
|
||||||
@click="viewShown = !viewShown"
|
|
||||||
>
|
>
|
||||||
{{ isRouteMeta.title || '' }}
|
{{ isRouteMeta.title || '' }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="switch-view active-switch-view">
|
<span class="switch-view active-switch-view">
|
||||||
<el-popover
|
<el-popover
|
||||||
v-model="viewShown"
|
|
||||||
placement="right-start"
|
placement="right-start"
|
||||||
trigger="hover"
|
trigger="hover"
|
||||||
width="160"
|
width="160"
|
||||||
@@ -24,6 +22,9 @@
|
|||||||
<svg-icon slot="reference" class="icon" icon-class="switch" />
|
<svg-icon slot="reference" class="icon" icon-class="switch" />
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</span>
|
</span>
|
||||||
|
<span class="switch-view show-switch-view">
|
||||||
|
<svg-icon class="icon" icon-class="switch" @click="toggleSwitch" />
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-scrollbar class="menu-wrap" wrap-class="scrollbar-wrapper">
|
<el-scrollbar class="menu-wrap" wrap-class="scrollbar-wrapper">
|
||||||
@@ -53,6 +54,9 @@
|
|||||||
<Hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
<Hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="mobile-menu" :class="{'is-show': viewShown}" @click="viewShown = false">
|
||||||
|
<ViewSwitcher :mode="'vertical'" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -124,6 +128,9 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
toggleSideBar() {
|
toggleSideBar() {
|
||||||
this.$store.dispatch('app/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 {
|
.active-mobile {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
& > > > .organization {
|
& > > > .organization {
|
||||||
|
height: 48px;
|
||||||
|
line-height: 48px;
|
||||||
padding-left: 8px;
|
padding-left: 8px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-bottom: 1px solid rgba(31, 35, 41, .15);
|
border-bottom: 1px solid rgba(31, 35, 41, .15);
|
||||||
}
|
.el-input--prefix .el-input__inner {
|
||||||
|
height: 48px!important;
|
||||||
& > > > .menu-main {
|
line-height: 48px!important;
|
||||||
margin-left: -10px;
|
}
|
||||||
|
.svg-icon {
|
||||||
|
color: #FFF!important;
|
||||||
|
margin-right:0px!important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
& > > > .title-label {
|
& > > > .title-label {
|
||||||
color: white !important;
|
color: white !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobile-view-switch > > > .el-menu-item.is-active {
|
.mobile-view-switch {
|
||||||
color: #ffffff;
|
&>>> .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;
|
display: block;
|
||||||
}
|
}
|
||||||
.active-switch-view {
|
.active-switch-view {
|
||||||
display: none !important;;
|
display: none!important;
|
||||||
|
}
|
||||||
|
.show-switch-view {
|
||||||
|
display: block!important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import VueLogger from 'vuejs-logger'
|
|||||||
import loggerOptions from './utils/logger'
|
import loggerOptions from './utils/logger'
|
||||||
import ECharts from 'vue-echarts'
|
import ECharts from 'vue-echarts'
|
||||||
import service from '@/utils/request'
|
import service from '@/utils/request'
|
||||||
import { Message } from '@/utils/Message'
|
import { message } from '@/utils/message'
|
||||||
import xss from '@/utils/xss'
|
import xss from '@/utils/xss'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -60,7 +60,7 @@ Vue.prototype.$axios = service
|
|||||||
window._ = require('lodash')
|
window._ = require('lodash')
|
||||||
// Vue.set(Vue.prototype, '_', _)
|
// Vue.set(Vue.prototype, '_', _)
|
||||||
|
|
||||||
Vue.prototype.$message = Message
|
Vue.prototype.$message = message
|
||||||
|
|
||||||
Vue.prototype.$xss = xss
|
Vue.prototype.$xss = xss
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export default [
|
|||||||
component: empty,
|
component: empty,
|
||||||
meta: {
|
meta: {
|
||||||
title: i18n.t('route.TaskList'),
|
title: i18n.t('route.TaskList'),
|
||||||
permissions: ['ops.view_celerytask | ops.view_taskmonitor']
|
permissions: ['ops.view_celerytask']
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -207,3 +207,10 @@ input[type=file] {
|
|||||||
.el-table .el-table__row .show-full-content > .cell {
|
.el-table .el-table__row .show-full-content > .cell {
|
||||||
white-space: normal!important;
|
white-space: normal!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 992px) {
|
||||||
|
.el-select-dropdown.switch-org {
|
||||||
|
left: 0!important;
|
||||||
|
width: 100vw!important;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
import { Message as elMessage } from 'element-ui'
|
import { Message as elMessage } from 'element-ui'
|
||||||
|
|
||||||
let messageDom = null
|
let messageDom = null
|
||||||
const Message = (options) => {
|
const message = (options) => {
|
||||||
// 判断弹窗是否已存在, 若存在则关闭
|
// 判断弹窗是否已存在, 若存在则关闭
|
||||||
if (messageDom) messageDom.close()
|
if (messageDom) messageDom.close()
|
||||||
messageDom = elMessage(options)
|
messageDom = elMessage(options)
|
||||||
@@ -10,11 +10,11 @@ const Message = (options) => {
|
|||||||
|
|
||||||
const typeArray = ['success', 'error', 'warning', 'info']
|
const typeArray = ['success', 'error', 'warning', 'info']
|
||||||
typeArray.forEach(type => {
|
typeArray.forEach(type => {
|
||||||
Message[type] = options => {
|
message[type] = options => {
|
||||||
if (typeof options === 'string') options = { message: options }
|
if (typeof options === 'string') options = { message: options }
|
||||||
options.type = type
|
options.type = type
|
||||||
return Message(options)
|
return message(options)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
export { Message }
|
export { message }
|
||||||
@@ -10,7 +10,7 @@ function getPropOrg() {
|
|||||||
if (defaultOrg) {
|
if (defaultOrg) {
|
||||||
return 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() {
|
async function change2PropOrg() {
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import { getTokenFromCookie } from '@/utils/auth'
|
|||||||
import { getErrorResponseMsg } from '@/utils/common'
|
import { getErrorResponseMsg } from '@/utils/common'
|
||||||
import { refreshSessionIdAge } from '@/api/users'
|
import { refreshSessionIdAge } from '@/api/users'
|
||||||
import { MessageBox } from 'element-ui'
|
import { MessageBox } from 'element-ui'
|
||||||
import { Message } from '@/utils/Message'
|
import { message } from '@/utils/message'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import axiosRetry from 'axios-retry'
|
import axiosRetry from 'axios-retry'
|
||||||
import router from '@/router'
|
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
|
// create an axios instance
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
@@ -25,7 +25,7 @@ function beforeRequestAddToken(config) {
|
|||||||
const queryOrgId = router.currentRoute.query?.oid
|
const queryOrgId = router.currentRoute.query?.oid
|
||||||
const storeOrgId = store.getters.currentOrg?.id
|
const storeOrgId = store.getters.currentOrg?.id
|
||||||
let orgId = queryOrgId || storeOrgId
|
let orgId = queryOrgId || storeOrgId
|
||||||
if (!store.getters.publicSettings?.XPACK_ENABLED) {
|
if (!store.getters.publicSettings?.XPACK_ENABLED && orgId !== SYSTEM_ORG_ID) {
|
||||||
orgId = DEFAULT_ORG_ID
|
orgId = DEFAULT_ORG_ID
|
||||||
}
|
}
|
||||||
if (orgId) {
|
if (orgId) {
|
||||||
@@ -93,7 +93,7 @@ export function flashErrorMsg({ response, error }) {
|
|||||||
if (!response.config.disableFlashErrorMsg) {
|
if (!response.config.disableFlashErrorMsg) {
|
||||||
const responseErrorMsg = getErrorResponseMsg(error)
|
const responseErrorMsg = getErrorResponseMsg(error)
|
||||||
const msg = responseErrorMsg || error.message
|
const msg = responseErrorMsg || error.message
|
||||||
Message({
|
message({
|
||||||
message: msg,
|
message: msg,
|
||||||
type: 'error',
|
type: 'error',
|
||||||
duration: 5 * 1000
|
duration: 5 * 1000
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import store from '@/store'
|
|||||||
import router, { resetRouter } from '@/router'
|
import router, { resetRouter } from '@/router'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import VueCookie from 'vue-cookie'
|
import VueCookie from 'vue-cookie'
|
||||||
import { Message } from '@/utils/Message'
|
import { message } from '@/utils/message'
|
||||||
import orgUtil from '@/utils/org'
|
import orgUtil from '@/utils/org'
|
||||||
import orgs from '@/api/orgs'
|
import orgs from '@/api/orgs'
|
||||||
import { getPropView, isViewHasOrgs } from '@/utils/jms'
|
import { getPropView, isViewHasOrgs } from '@/utils/jms'
|
||||||
@@ -114,7 +114,7 @@ export async function generatePageRoutes({ to, from, next }) {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
// remove token and go to login page to re-login
|
// remove token and go to login page to re-login
|
||||||
// await store.dispatch('user/resetToken')
|
// await store.dispatch('user/resetToken')
|
||||||
Message.error(error || 'Has Error')
|
message.error(error || 'Has Error')
|
||||||
Vue.$log.error('Error occur: ', error)
|
Vue.$log.error('Error occur: ', error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
initial: {
|
initial: {
|
||||||
is_periodic: true,
|
is_periodic: this.$store.getters.hasValidLicense,
|
||||||
password_rules: {
|
password_rules: {
|
||||||
length: 30
|
length: 30
|
||||||
},
|
},
|
||||||
@@ -64,6 +64,10 @@ export default {
|
|||||||
el: {
|
el: {
|
||||||
readonly: true
|
readonly: true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
is_periodic: {
|
||||||
|
type: 'switch',
|
||||||
|
disabled: !this.$store.getters.hasValidLicense
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
createSuccessNextRoute: { name: 'AccountPushList' },
|
createSuccessNextRoute: { name: 'AccountPushList' },
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ export default {
|
|||||||
width: '100px'
|
width: '100px'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
helpMessage: this.$t('assets.DomainHelpMessage')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<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" />
|
<ListTable ref="ListTable" :header-actions="iHeaderActions" :table-config="iTableConfig" />
|
||||||
<PlatformDialog :category="category" :visible.sync="showPlatform" />
|
<PlatformDialog :category="category" :visible.sync="showPlatform" />
|
||||||
<AssetBulkUpdateDialog
|
<AssetBulkUpdateDialog
|
||||||
@@ -52,6 +55,10 @@ export default {
|
|||||||
addExtraMoreActions: {
|
addExtraMoreActions: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => []
|
||||||
|
},
|
||||||
|
helpMessage: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
@@ -185,8 +185,13 @@ export default {
|
|||||||
}
|
}
|
||||||
>>> .el-collapse {
|
>>> .el-collapse {
|
||||||
border: none;
|
border: none;
|
||||||
.el-collapse-item:last-child .el-collapse-item__header {
|
.el-collapse-item:last-child {
|
||||||
border: none;
|
.el-collapse-item__header {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
.el-collapse-item__wrap {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -3,9 +3,8 @@ import rules from '@/components/DataForm/rules'
|
|||||||
import { JsonEditor } from '@/components/FormFields'
|
import { JsonEditor } from '@/components/FormFields'
|
||||||
import { assetFieldsMeta } from '@/views/assets/const'
|
import { assetFieldsMeta } from '@/views/assets/const'
|
||||||
|
|
||||||
const assetMeta = assetFieldsMeta()
|
|
||||||
|
|
||||||
export const platformFieldsMeta = (vm) => {
|
export const platformFieldsMeta = (vm) => {
|
||||||
|
const assetMeta = assetFieldsMeta(vm)
|
||||||
return {
|
return {
|
||||||
automation: {
|
automation: {
|
||||||
initial: {
|
initial: {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import ProtocolSelector from '@/components/FormFields/ProtocolSelector'
|
|||||||
import AssetAccounts from '@/views/assets/Asset/AssetCreateUpdate/components/AssetAccounts'
|
import AssetAccounts from '@/views/assets/Asset/AssetCreateUpdate/components/AssetAccounts'
|
||||||
import rules from '@/components/DataForm/rules'
|
import rules from '@/components/DataForm/rules'
|
||||||
import { Select2 } from '@/components/FormFields'
|
import { Select2 } from '@/components/FormFields'
|
||||||
import { Message } from '@/utils/Message'
|
import { message } from '@/utils/message'
|
||||||
|
|
||||||
export const filterSelectValues = (values) => {
|
export const filterSelectValues = (values) => {
|
||||||
if (!values) return
|
if (!values) return
|
||||||
@@ -19,7 +19,7 @@ export const filterSelectValues = (values) => {
|
|||||||
const inputValue = { name, value }
|
const inputValue = { name, value }
|
||||||
selects.push(inputValue)
|
selects.push(inputValue)
|
||||||
} else {
|
} else {
|
||||||
Message.error(i18n.t('assets.LabelInputFormatValidation'))
|
message.error(i18n.t('assets.LabelInputFormatValidation'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -29,9 +29,10 @@ export const filterSelectValues = (values) => {
|
|||||||
export const assetFieldsMeta = (vm) => {
|
export const assetFieldsMeta = (vm) => {
|
||||||
const platformProtocols = []
|
const platformProtocols = []
|
||||||
const secretTypes = []
|
const secretTypes = []
|
||||||
|
const platformType = vm?.$route.query.platform_type
|
||||||
return {
|
return {
|
||||||
address: {
|
address: {
|
||||||
rules: [rules.IpCheck, rules.specialEmojiCheck]
|
rules: [rules.specialEmojiCheck]
|
||||||
},
|
},
|
||||||
protocols: {
|
protocols: {
|
||||||
component: ProtocolSelector,
|
component: ProtocolSelector,
|
||||||
@@ -58,9 +59,8 @@ export const assetFieldsMeta = (vm) => {
|
|||||||
platform: {
|
platform: {
|
||||||
el: {
|
el: {
|
||||||
multiple: false,
|
multiple: false,
|
||||||
disabled: true,
|
|
||||||
ajax: {
|
ajax: {
|
||||||
url: '/api/v1/assets/platforms/',
|
url: `/api/v1/assets/platforms/?type=${platformType}`,
|
||||||
transformOption: (item) => {
|
transformOption: (item) => {
|
||||||
return { label: item.name, value: item.id }
|
return { label: item.name, value: item.id }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,13 +41,13 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
days: localStorage.getItem('auditDays') || '7'
|
days: localStorage.getItem('dashboardDays') || '7'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onChange(val) {
|
onChange(val) {
|
||||||
this.days = val
|
this.days = val
|
||||||
localStorage.setItem('auditDays', val)
|
localStorage.setItem('dashboardDays', val)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,8 +9,10 @@
|
|||||||
<div class="num">{{ config.total }}</div>
|
<div class="num">{{ config.total }}</div>
|
||||||
<div class="add">
|
<div class="add">
|
||||||
<span class="add-num">
|
<span class="add-num">
|
||||||
{{ $tc('dashboard.WeekAdd') }}:{{ config.weekAdd }}
|
{{ $tc('dashboard.WeekAdd') }}:
|
||||||
<svg-icon v-if="config.subIcon" :icon-class="config.subIcon" class="font" />
|
<span style="font-size: 14px;" :class="{'increase': config.weekAdd > 0}">
|
||||||
|
{{ config.weekAdd }}
|
||||||
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<span class="add-icon">
|
<span class="add-icon">
|
||||||
<svg-icon v-if="config.icon" :icon-class="config.icon" class="font" />
|
<svg-icon v-if="config.icon" :icon-class="config.icon" class="font" />
|
||||||
@@ -91,5 +93,8 @@ export default {
|
|||||||
.font {
|
.font {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
.increase {
|
||||||
|
color: var(--color-primary);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -44,9 +44,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
const days = localStorage.getItem('dashboardDays') || '7'
|
||||||
return {
|
return {
|
||||||
tableData: [],
|
tableData: [],
|
||||||
tableUrl: this.config.url + `&days=7`
|
tableUrl: this.config.url + `&days=${days}`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -61,6 +62,7 @@ export default {
|
|||||||
onChange(val) {
|
onChange(val) {
|
||||||
this.tableUrl = this.config.url + `&days=${val}`
|
this.tableUrl = this.config.url + `&days=${val}`
|
||||||
this.getList()
|
this.getList()
|
||||||
|
localStorage.setItem('dashboardDays', val)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,12 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
|
days: {
|
||||||
|
type: String,
|
||||||
|
default: () => {
|
||||||
|
return localStorage.getItem('dashboardDays') || '7'
|
||||||
|
}
|
||||||
|
},
|
||||||
options: {
|
options: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => []
|
||||||
@@ -37,7 +43,7 @@ export default {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
return {
|
return {
|
||||||
select: localStorage.getItem('auditDays') || '7',
|
select: this.days,
|
||||||
iOptions: this.options.length > 0 ? this.options : defaultOptions
|
iOptions: this.options.length > 0 ? this.options : defaultOptions
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { GenericCreateUpdatePage } from '@/layout/components'
|
import { GenericCreateUpdatePage } from '@/layout/components'
|
||||||
import AssetSelect from '@/components/AssetSelect'
|
import AssetSelect from '@/components/AssetSelect'
|
||||||
import { JsonEditor } from '@/components/FormFields'
|
|
||||||
import CodeEditor from '@/components/FormFields/CodeEditor'
|
import CodeEditor from '@/components/FormFields/CodeEditor'
|
||||||
import { CronTab } from '@/components'
|
import { CronTab } from '@/components'
|
||||||
import i18n from '@/i18n/i18n'
|
import i18n from '@/i18n/i18n'
|
||||||
@@ -30,7 +29,6 @@ export default {
|
|||||||
[this.$t('common.Basic'), ['name', 'type', 'instant']],
|
[this.$t('common.Basic'), ['name', 'type', 'instant']],
|
||||||
[this.$t('common.Task'), ['module', 'args', 'playbook', 'chdir', 'timeout']],
|
[this.$t('common.Task'), ['module', 'args', 'playbook', 'chdir', 'timeout']],
|
||||||
[this.$t('ops.Asset'), ['assets', 'runas', 'runas_policy']],
|
[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('ops.Plan'), ['run_after_save', 'is_periodic', 'crontab']],
|
||||||
[this.$t('common.Other'), ['comment']]
|
[this.$t('common.Other'), ['comment']]
|
||||||
],
|
],
|
||||||
@@ -134,13 +132,6 @@ export default {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
parameters_define: {
|
|
||||||
label: '',
|
|
||||||
component: JsonEditor,
|
|
||||||
hidden: (formValue) => {
|
|
||||||
return !formValue.use_parameter_define
|
|
||||||
}
|
|
||||||
},
|
|
||||||
chdir: {
|
chdir: {
|
||||||
helpText: i18n.t('ops.ChdirHelpText'),
|
helpText: i18n.t('ops.ChdirHelpText'),
|
||||||
hidden: (formValue) => {
|
hidden: (formValue) => {
|
||||||
@@ -153,13 +144,6 @@ export default {
|
|||||||
return this.instantTask
|
return this.instantTask
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
use_parameter_define: {
|
|
||||||
label: this.$t('ops.UseParameterDefine'),
|
|
||||||
type: 'switch',
|
|
||||||
hidden: () => {
|
|
||||||
return this.instantTask
|
|
||||||
}
|
|
||||||
},
|
|
||||||
is_periodic: {
|
is_periodic: {
|
||||||
type: 'switch',
|
type: 'switch',
|
||||||
hidden: () => {
|
hidden: () => {
|
||||||
|
|||||||
@@ -368,6 +368,10 @@ export default {
|
|||||||
this.$message.error(this.$tc('ops.RequiredContent'))
|
this.$message.error(this.$tc('ops.RequiredContent'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (!this.runas) {
|
||||||
|
this.$message.error(this.$tc('ops.RequiredRunas'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
assets: hosts,
|
assets: hosts,
|
||||||
|
|||||||
@@ -90,10 +90,12 @@ export default {
|
|||||||
name: 'run',
|
name: 'run',
|
||||||
can: this.$hasPerm('ops.add_jobexecution') && !this.$store.getters.currentOrgIsRoot,
|
can: this.$hasPerm('ops.add_jobexecution') && !this.$store.getters.currentOrgIsRoot,
|
||||||
callback: ({ row }) => {
|
callback: ({ row }) => {
|
||||||
const params = JSON.parse(row.parameters_define)
|
if (row?.use_parameter_define && row?.parameters_define) {
|
||||||
if (Object.keys(params).length > 0) {
|
const params = JSON.parse(row.parameters_define)
|
||||||
this.item = row
|
if (Object.keys(params).length > 0) {
|
||||||
this.showJobRunDialog = true
|
this.item = row
|
||||||
|
this.showJobRunDialog = true
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.runJob(row)
|
this.runJob(row)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ export default {
|
|||||||
type: 'button',
|
type: 'button',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
icon: 'fa fa-save',
|
icon: 'fa fa-save',
|
||||||
|
tip: this.$tc('ops.Save'),
|
||||||
el: {
|
el: {
|
||||||
type: 'primary'
|
type: 'primary'
|
||||||
},
|
},
|
||||||
@@ -88,7 +89,8 @@ export default {
|
|||||||
reset: {
|
reset: {
|
||||||
type: 'button',
|
type: 'button',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
icon: 'fa fa-refresh',
|
icon: 'fa fa-undo',
|
||||||
|
tip: this.$tc('ops.Reset'),
|
||||||
el: {
|
el: {
|
||||||
type: 'primary'
|
type: 'primary'
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -91,7 +91,15 @@ export default {
|
|||||||
type: 'input',
|
type: 'input',
|
||||||
label: this.$t('perms.Account'),
|
label: this.$t('perms.Account'),
|
||||||
component: AccountFormatter,
|
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: {
|
actions: {
|
||||||
label: this.$t('perms.Actions'),
|
label: this.$t('perms.Actions'),
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
<TagInput
|
<TagInput
|
||||||
v-if="showSpecAccounts"
|
v-if="showSpecAccounts"
|
||||||
|
:autocomplete="autocomplete"
|
||||||
:value="specAccountsInput"
|
:value="specAccountsInput"
|
||||||
@change="handleTagChange"
|
@change="handleTagChange"
|
||||||
/>
|
/>
|
||||||
@@ -20,13 +21,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { TagInput } from '@/components/FormFields'
|
import { TagInput } from '@/components/FormFields'
|
||||||
import {
|
import { AccountLabelMapper, AllAccount, ManualINPUT, SameUSER, SPECAccount } from '@/views/perms/const'
|
||||||
AllAccount,
|
|
||||||
SPECAccount,
|
|
||||||
SameUSER,
|
|
||||||
ManualINPUT,
|
|
||||||
AccountLabelMapper
|
|
||||||
} from '@/views/perms/const'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -36,9 +31,18 @@ export default {
|
|||||||
value: {
|
value: {
|
||||||
type: [Array],
|
type: [Array],
|
||||||
default: () => []
|
default: () => []
|
||||||
|
},
|
||||||
|
assets: {
|
||||||
|
type: [Array],
|
||||||
|
default: () => []
|
||||||
|
},
|
||||||
|
nodes: {
|
||||||
|
type: [Array],
|
||||||
|
default: () => []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
const vm = this
|
||||||
const choices = [
|
const choices = [
|
||||||
{
|
{
|
||||||
label: AccountLabelMapper[AllAccount],
|
label: AccountLabelMapper[AllAccount],
|
||||||
@@ -64,7 +68,27 @@ export default {
|
|||||||
choicesSelected: [],
|
choicesSelected: [],
|
||||||
defaultChoices: [this.ALL],
|
defaultChoices: [this.ALL],
|
||||||
specAccountsInput: [],
|
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() {
|
mounted() {
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ export default {
|
|||||||
[
|
[
|
||||||
this.$t('common.BasicInfo'),
|
this.$t('common.BasicInfo'),
|
||||||
[
|
[
|
||||||
'AUTH_FEISHU', 'FEISHU_APP_ID', 'FEISHU_APP_SECRET'
|
'AUTH_FEISHU', 'FEISHU_APP_ID', 'FEISHU_APP_SECRET', 'FEISHU_VERSION'
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -116,6 +116,14 @@ export default {
|
|||||||
{
|
{
|
||||||
key: this.$t('setting.Edition'),
|
key: this.$t('setting.Edition'),
|
||||||
value: this.licenseData.edition
|
value: this.licenseData.edition
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: this.$t('assets.SerialNumber'),
|
||||||
|
value: this.licenseData?.serial_no || ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: this.$t('common.Comment'),
|
||||||
|
value: this.licenseData?.remark || ''
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,12 +37,6 @@ export default {
|
|||||||
'OTP_ISSUER_NAME', 'OTP_VALID_WINDOW'
|
'OTP_ISSUER_NAME', 'OTP_VALID_WINDOW'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
[
|
|
||||||
this.$t('setting.Ops'),
|
|
||||||
[
|
|
||||||
'WINDOWS_SSH_DEFAULT_SHELL'
|
|
||||||
]
|
|
||||||
],
|
|
||||||
[
|
[
|
||||||
this.$t('setting.Perm'),
|
this.$t('setting.Perm'),
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ export default {
|
|||||||
'ops.view_job': ['assets.view_asset', 'assets.view_node', 'ops.view_adhoc', 'ops.view_playbook'],
|
'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.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_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': [
|
'xpack.add_syncinstancetask': [
|
||||||
'assets.view_asset', 'assets.view_node', 'assets.view_systemuser',
|
'assets.view_asset', 'assets.view_node', 'assets.view_systemuser',
|
||||||
'xpack.view_account'
|
'xpack.view_account'
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ export default {
|
|||||||
width: '100px',
|
width: '100px',
|
||||||
label: this.$t('users.OrgRoles'),
|
label: this.$t('users.OrgRoles'),
|
||||||
formatter: (row) => {
|
formatter: (row) => {
|
||||||
return row['system_roles'].map(item => item['display_name']).join(', ') || '-'
|
return row['org_roles'].map(item => item['display_name']).join(', ') || '-'
|
||||||
},
|
},
|
||||||
filters: [],
|
filters: [],
|
||||||
columnKey: 'org_roles',
|
columnKey: 'org_roles',
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
function change_version() {
|
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() {
|
function install_deps() {
|
||||||
|
|||||||
Reference in New Issue
Block a user