mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-14 11:55:34 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c599a6aa21 | ||
|
|
7f34195ae4 | ||
|
|
b23950aefd |
2
.github/workflows/release-drafter.yml
vendored
2
.github/workflows/release-drafter.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build it and upload
|
||||
uses: jumpserver/action-build-upload-assets@node14.16
|
||||
uses: jumpserver/action-build-upload-assets@node10
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
|
||||
25
Dockerfile
25
Dockerfile
@@ -1,26 +1,23 @@
|
||||
FROM node:14.16 as stage-build
|
||||
ARG TARGETARCH
|
||||
FROM node:10 as stage-build
|
||||
ARG NPM_REGISTRY="https://registry.npmmirror.com"
|
||||
ENV NPM_REGISTY=$NPM_REGISTRY
|
||||
ARG SASS_BINARY_SITE="https://npmmirror.com/mirrors/node-sass"
|
||||
ENV SASS_BINARY_SITE=$SASS_BINARY_SITE
|
||||
|
||||
WORKDIR /data
|
||||
|
||||
RUN set -ex \
|
||||
&& npm config set registry ${NPM_REGISTRY} \
|
||||
&& yarn config set registry ${NPM_REGISTRY} \
|
||||
&& yarn config set cache-folder /root/.cache/yarn/lina
|
||||
|
||||
ADD package.json yarn.lock /data
|
||||
RUN --mount=type=cache,target=/root/.cache/yarn \
|
||||
yarn install
|
||||
RUN npm config set sass_binary_site=${SASS_BINARY_SITE}
|
||||
RUN npm config set registry ${NPM_REGISTRY}
|
||||
RUN yarn config set registry ${NPM_REGISTRY}
|
||||
COPY package.json yarn.lock /data/
|
||||
RUN yarn install
|
||||
RUN npm rebuild node-sass
|
||||
|
||||
ARG VERSION
|
||||
ENV VERSION=$VERSION
|
||||
ADD . /data
|
||||
RUN --mount=type=cache,target=/root/.cache/yarn \
|
||||
sed -i "s@Version <strong>.*</strong>@Version <strong>${VERSION}</strong>@g" src/layout/components/Footer/index.vue \
|
||||
&& yarn build
|
||||
RUN cd utils && bash -xieu build.sh build
|
||||
|
||||
FROM nginx:alpine
|
||||
COPY --from=stage-build /data/lina /opt/lina
|
||||
COPY --from=stage-build /data/release/lina /opt/lina
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"build:prod": "vue-cli-service build",
|
||||
"build:stage": "vue-cli-service build --mode staging",
|
||||
"preview": "node build/index.js --preview",
|
||||
@@ -33,7 +32,7 @@
|
||||
"element-ui": "2.13.2",
|
||||
"eslint-plugin-html": "^6.0.0",
|
||||
"install": "^0.13.0",
|
||||
"jquery": "^3.6.1",
|
||||
"jquery": "^3.5.0",
|
||||
"js-cookie": "2.2.0",
|
||||
"jsencrypt": "^3.2.1",
|
||||
"krry-transfer": "^1.7.3",
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
<template>
|
||||
<el-row :gutter="10">
|
||||
<div v-if="isAllEmpty()" style="text-align: center">
|
||||
{{ this.$t('common.NoContent') }}
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-col :span="rightEmpty() ? 24 : 12">
|
||||
<div v-if="!leftEmpty()">
|
||||
<el-tag type="primary" effect="dark" :closable="false" style="width: 100%;">{{ row.leftTitle }}</el-tag>
|
||||
<div v-for="(value, key, index) in row.left" :key="index">
|
||||
<el-tag type="primary"><strong>{{ key }}: </strong>{{ value }}</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="leftEmpty() ? 24 : 12">
|
||||
<div v-if="!rightEmpty()">
|
||||
<el-tag type="primary" effect="dark" :closable="false" style="width: 100%;">{{ row.rightTitle }}</el-tag>
|
||||
<div v-for="(value, key, index) in row.right" :key="index">
|
||||
<el-tag type="primary"><strong>{{ key }}: </strong>{{ value }}</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</div>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'TwoTabFormatter',
|
||||
props: {
|
||||
row: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
isEmpty(content) {
|
||||
return !content || JSON.stringify(content) === '{}'
|
||||
},
|
||||
leftEmpty() {
|
||||
return this.isEmpty(this.row.left)
|
||||
},
|
||||
rightEmpty() {
|
||||
return this.isEmpty(this.row.right)
|
||||
},
|
||||
isAllEmpty() {
|
||||
return this.leftEmpty() && this.rightEmpty()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-tag{
|
||||
width: 100%;
|
||||
white-space: normal;
|
||||
height:auto;
|
||||
}
|
||||
</style>
|
||||
@@ -12,7 +12,6 @@ import DialogDetailFormatter from './DialogDetailFormatter'
|
||||
import EditableInputFormatter from './EditableInputFormatter'
|
||||
import StatusFormatter from './StatusFormatter'
|
||||
import TagsFormatter from './TagsFormatter'
|
||||
import TwoTabFormatter from './TwoTabFormatter'
|
||||
|
||||
export default {
|
||||
DetailFormatter,
|
||||
@@ -28,8 +27,7 @@ export default {
|
||||
ArrayFormatter,
|
||||
EditableInputFormatter,
|
||||
StatusFormatter,
|
||||
TagsFormatter,
|
||||
TwoTabFormatter
|
||||
TagsFormatter
|
||||
}
|
||||
|
||||
export {
|
||||
@@ -46,6 +44,5 @@ export {
|
||||
ArrayFormatter,
|
||||
EditableInputFormatter,
|
||||
StatusFormatter,
|
||||
TagsFormatter,
|
||||
TwoTabFormatter
|
||||
TagsFormatter
|
||||
}
|
||||
|
||||
@@ -55,19 +55,19 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24" style="margin: 0 auto;">
|
||||
<el-col :md="24" :sm="24" style="display: flex; margin-bottom: 20px;">
|
||||
<el-input v-model="SecretKey" :show-password="showPassword" :placeholder="HelpText" />
|
||||
<span v-if="Select === 'sms'" style="margin: -1px 0 0 20px;">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
style="line-height:20px; float: right;"
|
||||
:disabled="smsBtndisabled"
|
||||
@click="sendChallengeCode"
|
||||
>
|
||||
{{ smsBtnText }}
|
||||
</el-button>
|
||||
</span>
|
||||
<el-col :md="24 - smsWidth" :sm="24">
|
||||
<el-input v-model="SecretKey" :show-password="showPassword" :placeholder="HelpText" style="margin-bottom: 20px;" />
|
||||
</el-col>
|
||||
<el-col v-if="Select === 'sms'" :md="smsWidth" :sm="24">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
style="line-height:20px; float: right;"
|
||||
:disabled="smsBtndisabled"
|
||||
@click="sendChallengeCode"
|
||||
>
|
||||
{{ smsBtnText }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24" style="margin: 0 auto;">
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
},
|
||||
"acl": {
|
||||
"name": "Name",
|
||||
"ip_group_help_text": "The format is a comma-separated string, * means match all. Example: 192.168.10.1, 192.168.1.0/24, 10.1.1.1-10.1.1.20, 2001:db8:2de::e13, 2001:db8:1a:1110::/64",
|
||||
"username": "Username",
|
||||
"ip_group": "IP group",
|
||||
"action": "Action",
|
||||
@@ -48,7 +47,6 @@
|
||||
"sqlserver": "SQLServer",
|
||||
"redis": "Redis",
|
||||
"mongodb": "MongoDB",
|
||||
"clickhouse": "ClickHouse",
|
||||
"k8s": "kubernetes"
|
||||
},
|
||||
"applicationsCategory": {
|
||||
@@ -246,9 +244,7 @@
|
||||
"View": "View",
|
||||
"LoginIP": "Login IP",
|
||||
"LoginCity": "Login city",
|
||||
"LoginDate": "Login date",
|
||||
"BeforeChange": "Before change",
|
||||
"AfterChange": "After change"
|
||||
"LoginDate": "Login date"
|
||||
},
|
||||
"auth": {
|
||||
"LoginRequiredMsg": "You account has logout, Please login again",
|
||||
@@ -258,7 +254,6 @@
|
||||
"ReLoginErr": "Login time has exceeded 5 minutes, please login again"
|
||||
},
|
||||
"common": {
|
||||
"NoContent": "No content",
|
||||
"NeedAddAppsOrSystemUserErrMsg": "Please add apps or system user",
|
||||
"VerificationCodeSent": "The verification code has been sent",
|
||||
"SendVerificationCode": "Send verification code",
|
||||
@@ -1440,7 +1435,6 @@
|
||||
"HuaweiCloud": "Huawei Cloud",
|
||||
"BaiduCloud": "Baidu Cloud",
|
||||
"JDCloud": "JD Cloud",
|
||||
"KingSoftCloud": "KingSoft Cloud",
|
||||
"Azure":"Azure(China)",
|
||||
"Azure_Int": "Azure(International)",
|
||||
"HostnameStrategy": "Used to produce the asset hostname. For example, 1. Instance name (instanceDemo);2. Instance name and Partial IP (instanceDemo-250.1)",
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
"sqlserver": "SQLServer",
|
||||
"redis": "Redis",
|
||||
"mongodb": "MongoDB",
|
||||
"clickhouse": "ClickHouse",
|
||||
"k8s": "Kubernetes"
|
||||
},
|
||||
"applicationsCategory": {
|
||||
@@ -250,9 +249,7 @@
|
||||
"SystemUserName": "システムユーザー名",
|
||||
"LoginIP": "ログインIP",
|
||||
"LoginCity": "ログイン都市",
|
||||
"LoginDate": "ログイン日",
|
||||
"BeforeChange": "変更前",
|
||||
"AfterChange": "変更後"
|
||||
"LoginDate": "ログイン日"
|
||||
},
|
||||
"auth": {
|
||||
"LoginRequiredMsg": "アカウントが終了しました。ログインし直してください",
|
||||
@@ -262,7 +259,6 @@
|
||||
"ReLoginErr": "ログイン時間が 5 分を超えました。もう一度ログインしてください"
|
||||
},
|
||||
"common": {
|
||||
"NoContent": "まだ内容がない",
|
||||
"NeedAddAppsOrSystemUserErrMsg": "アプリケーションまたはシステムユーザーを追加してください",
|
||||
"VerificationCodeSent": "検証コードが送信されました",
|
||||
"SendVerificationCode": "認証コードの送信",
|
||||
@@ -1259,7 +1255,7 @@
|
||||
"DatePasswordLastUpdated": "パスワード最終更新日",
|
||||
"DatePasswordUpdated": "パスワード更新日",
|
||||
"DescribeOfGuide": "詳細については、をクリックしてください。",
|
||||
"Email": "ポスト",
|
||||
"Email": "メール",
|
||||
"Phone": "携帯番号",
|
||||
"WeCom": "企業wechat",
|
||||
"DingTalk": "ホッチキス",
|
||||
@@ -1482,7 +1478,6 @@
|
||||
"HuaweiCloud": "ファーウェイ雲",
|
||||
"BaiduCloud": "百度雲",
|
||||
"JDCloud": "京東雲",
|
||||
"KingSoftCloud": "金山雲",
|
||||
"Azure": "Azure(中国)",
|
||||
"Azure_Int": "Azure (国際)",
|
||||
"HostnameStrategy": "資産を生成するためにホスト名。例: 1. インスタンス名 (instanceDemo) 2.インスタンス名と一部IP (下位2桁) (instanceDemo-250.1)",
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
"sqlserver": "SQLServer",
|
||||
"redis": "Redis",
|
||||
"mongodb": "MongoDB",
|
||||
"clickhouse": "ClickHouse",
|
||||
"k8s": "Kubernetes"
|
||||
},
|
||||
"applicationsCategory": {
|
||||
@@ -250,9 +249,7 @@
|
||||
"SystemUserName": "系统用户名",
|
||||
"LoginIP": "登录IP",
|
||||
"LoginCity": "登录城市",
|
||||
"LoginDate": "登录日期",
|
||||
"BeforeChange": "变更前",
|
||||
"AfterChange": "变更后"
|
||||
"LoginDate": "登录日期"
|
||||
},
|
||||
"auth": {
|
||||
"LoginRequiredMsg": "账号已退出,请重新登录",
|
||||
@@ -262,7 +259,6 @@
|
||||
"ReLoginErr": "登录时长已超过 5 分钟,请重新登录"
|
||||
},
|
||||
"common": {
|
||||
"NoContent": "暂无内容",
|
||||
"NeedAddAppsOrSystemUserErrMsg": "需要添加应用或系统用户",
|
||||
"VerificationCodeSent": "验证码已发送",
|
||||
"SendVerificationCode": "发送验证码",
|
||||
@@ -1260,7 +1256,7 @@
|
||||
"DatePasswordLastUpdated": "最后更新密码日期",
|
||||
"DatePasswordUpdated": "密码更新日期",
|
||||
"DescribeOfGuide": "欢迎使用JumpServer堡垒机系统,获取更多信息请点击",
|
||||
"Email": "邮箱",
|
||||
"Email": "邮件",
|
||||
"Phone": "手机号",
|
||||
"WeCom": "企业微信",
|
||||
"DingTalk": "钉钉",
|
||||
@@ -1483,7 +1479,6 @@
|
||||
"HuaweiCloud": "华为云",
|
||||
"BaiduCloud": "百度云",
|
||||
"JDCloud": "京东云",
|
||||
"KingSoftCloud": "金山云",
|
||||
"Azure":"Azure(中国)",
|
||||
"Azure_Int": "Azure(国际)",
|
||||
"HostnameStrategy": "用于生成资产主机名。例如:1. 实例名称 (instanceDemo);2. 实例名称和部分IP(后两位) (instanceDemo-250.1)",
|
||||
|
||||
@@ -326,9 +326,9 @@ export default {
|
||||
const url = `${curUrl}${cloneFrom}/${query ? ('?' + query) : ''}`
|
||||
object = await this.getObjectDetail(url)
|
||||
if (object['name']) {
|
||||
object.name = this.$t('common.cloneFrom') + object.name
|
||||
object.name = this.$t('common.cloneFrom') + ' ' + object.name
|
||||
} else if (object['hostname']) {
|
||||
object.hostname = this.$t('common.cloneFrom') + object.hostname
|
||||
object.hostname = this.$t('common.cloneFrom') + ' ' + object.hostname
|
||||
}
|
||||
} else {
|
||||
object = await this.getObjectDetail(this.iUrl)
|
||||
|
||||
@@ -177,7 +177,7 @@ export default {
|
||||
}
|
||||
|
||||
&>>> .el-input__icon {
|
||||
color: #606266!important;
|
||||
color: #606266;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ export default {
|
||||
|
||||
<style scoped>
|
||||
.wrapper-content {
|
||||
padding: 20px 25px 10px;
|
||||
padding: 20px 25px 40px;
|
||||
}
|
||||
|
||||
.wrapper-content >>> .el-alert {
|
||||
|
||||
@@ -43,10 +43,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.page {
|
||||
height: calc(100vh - 55px - 41px);
|
||||
overflow: auto;
|
||||
}
|
||||
@media print {
|
||||
.disabled-when-print{
|
||||
display: none;
|
||||
|
||||
@@ -46,6 +46,7 @@ Vue.use(require('vue-moment'), {
|
||||
moment
|
||||
})
|
||||
|
||||
// logger
|
||||
import VueLogger from 'vuejs-logger'
|
||||
import loggerOptions from './utils/logger'
|
||||
Vue.use(VueLogger, loggerOptions)
|
||||
@@ -54,14 +55,14 @@ import ECharts from 'vue-echarts'
|
||||
Vue.component('echarts', ECharts)
|
||||
|
||||
import service from '@/utils/request'
|
||||
Vue.prototype.$axios = service
|
||||
|
||||
// lodash
|
||||
// import _ from 'lodash'
|
||||
window._ = require('lodash')
|
||||
// Vue.set(Vue.prototype, '_', _)
|
||||
|
||||
import { Message } from '@/utils/Message'
|
||||
Vue.prototype.$message = Message
|
||||
|
||||
// if the table component cannot access `this.$axios`, it cannot send request
|
||||
Vue.prototype.$axios = service
|
||||
// 注册全局事件总线
|
||||
Vue.prototype.$eventBus = new Vue()
|
||||
new Vue({
|
||||
|
||||
@@ -15,16 +15,6 @@ export default [
|
||||
permissions: []
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/ops/ansible/task/:id/log/',
|
||||
component: () => import('@/views/ops/CeleryTaskLog'),
|
||||
name: 'AnsibleTaskLog',
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('route.CeleryTaskLog'),
|
||||
permissions: []
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/ops/task/task/:id/log/',
|
||||
component: () => import('@/views/ops/CeleryTaskLog'),
|
||||
|
||||
@@ -182,9 +182,6 @@ input[type=file] {
|
||||
|
||||
.el-col.el-col-sm-24 .ibox {
|
||||
margin-bottom: 10px;
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.el-pagination {
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
// 重置message,防止重复点击重复弹出message弹框
|
||||
import { Message as elMessage } from 'element-ui'
|
||||
|
||||
let messageDom = null
|
||||
const Message = (options) => {
|
||||
// 判断弹窗是否已存在, 若存在则关闭
|
||||
if (messageDom) messageDom.close()
|
||||
messageDom = elMessage(options)
|
||||
}
|
||||
|
||||
const typeArray = ['success', 'error', 'warning', 'info']
|
||||
typeArray.forEach(type => {
|
||||
Message[type] = options => {
|
||||
if (typeof options === 'string') options = { message: options }
|
||||
options.type = type
|
||||
return Message(options)
|
||||
}
|
||||
})
|
||||
|
||||
export { Message }
|
||||
@@ -302,8 +302,3 @@ export function groupedDropdownToCascader(group) {
|
||||
|
||||
export { BASE_URL }
|
||||
|
||||
export function openWindow(url, name = '', iWidth = 900, iHeight = 600) {
|
||||
var iTop = (window.screen.height - 30 - iHeight) / 2
|
||||
var iLeft = (window.screen.width - 10 - iWidth) / 2
|
||||
window.open(url, name, 'height=' + iHeight + ',width=' + iWidth + ',top=' + iTop + ',left=' + iLeft)
|
||||
}
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import store from '@/store'
|
||||
import { constantRoutes } from '@/router'
|
||||
import { openWindow } from './common'
|
||||
|
||||
export function openTaskPage(taskId, taskType) {
|
||||
taskType = taskType || 'celery'
|
||||
openWindow(`/#/ops/${taskType}/task/${taskId}/log/?type=${taskType}`)
|
||||
export function openTaskPage(taskId) {
|
||||
window.open(`/#/ops/celery/task/${taskId}/log/`, '', 'width=900,height=600')
|
||||
}
|
||||
|
||||
export function checkPermission(permsRequired, permsAll) {
|
||||
|
||||
2
src/utils/jquery-vendor.js
vendored
2
src/utils/jquery-vendor.js
vendored
@@ -1,4 +1,4 @@
|
||||
import $ from 'jquery/dist/jquery.min.js'
|
||||
import $ from 'jquery'
|
||||
window.$ = $
|
||||
window.jQuery = $
|
||||
export default $
|
||||
|
||||
@@ -3,8 +3,7 @@ import i18n from '@/i18n/i18n'
|
||||
import { getTokenFromCookie } from '@/utils/auth'
|
||||
import { getErrorResponseMsg } from '@/utils/common'
|
||||
import { refreshSessionIdAge } from '@/api/users'
|
||||
import { MessageBox } from 'element-ui'
|
||||
import { Message } from '@/utils/Message'
|
||||
import { Message, MessageBox } from 'element-ui'
|
||||
import store from '@/store'
|
||||
import axiosRetry from 'axios-retry'
|
||||
import router from '@/router'
|
||||
|
||||
@@ -3,7 +3,7 @@ import store from '@/store'
|
||||
import router, { resetRouter } from '@/router'
|
||||
import Vue from 'vue'
|
||||
import VueCookie from 'vue-cookie'
|
||||
import { Message } from '@/utils/Message'
|
||||
import { Message } from 'element-ui'
|
||||
import orgUtil from '@/utils/org'
|
||||
import orgs from '@/api/orgs'
|
||||
import { getPropView, isViewHasOrgs } from '@/utils/jms'
|
||||
|
||||
@@ -39,9 +39,6 @@ export function changeElementColor(themeColors) {
|
||||
.el-link.el-link--${key}:after {
|
||||
border-color: ${value}!important;
|
||||
}
|
||||
.el-tag--dark.el-tag--${key} {
|
||||
background-color: ${value} !important;
|
||||
}
|
||||
`
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,6 +78,7 @@ export default {
|
||||
hasRefresh: true,
|
||||
hasExport: false,
|
||||
hasImport: false,
|
||||
hasMoreActions: false,
|
||||
createRoute: () => {
|
||||
return {
|
||||
name: 'AccountBackupPlanCreate'
|
||||
|
||||
@@ -123,6 +123,7 @@ export default {
|
||||
hasRefresh: true,
|
||||
hasExport: false,
|
||||
hasImport: false,
|
||||
hasMoreActions: false,
|
||||
searchConfig: {
|
||||
getUrlQuery: false
|
||||
},
|
||||
|
||||
@@ -74,9 +74,6 @@ export default {
|
||||
hasExport: false,
|
||||
hasImport: false,
|
||||
hasCreate: false,
|
||||
searchConfig: {
|
||||
getUrlQuery: false
|
||||
},
|
||||
hasMoreActions: false
|
||||
},
|
||||
assetRelationConfig: {
|
||||
|
||||
@@ -107,6 +107,7 @@ export default {
|
||||
hasRefresh: true,
|
||||
hasExport: false,
|
||||
hasImport: false,
|
||||
hasMoreActions: false,
|
||||
createRoute: () => {
|
||||
return {
|
||||
name: 'AssetChangeAuthPlanCreate'
|
||||
|
||||
@@ -84,7 +84,8 @@ export default {
|
||||
createRoute: 'AssetAclCreate',
|
||||
hasRefresh: true,
|
||||
hasExport: false,
|
||||
hasImport: false
|
||||
hasImport: false,
|
||||
hasMoreActions: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import { MONGODB, REDIS } from '../const'
|
||||
import { ORACLE, MONGODB, REDIS } from '../const'
|
||||
|
||||
export function getDatabaseTypeFieldsMap(type) {
|
||||
const baseParams = ['host', 'port', 'database']
|
||||
const tlsParams = ['use_ssl', 'ca_cert']
|
||||
switch (type) {
|
||||
case ORACLE:
|
||||
return baseParams.concat(['version'])
|
||||
case REDIS:
|
||||
return baseParams.concat(tlsParams.concat(['client_cert', 'cert_key']))
|
||||
case MONGODB:
|
||||
|
||||
@@ -52,56 +52,45 @@ export const DATABASE_CATEGORY = 'db'
|
||||
export const SQLSERVER = 'sqlserver'
|
||||
export const REDIS = 'redis'
|
||||
export const MONGODB = 'mongodb'
|
||||
export const CLICKHOUSE = 'clickhouse'
|
||||
|
||||
const MYSQL_ITEM = {
|
||||
name: MYSQL,
|
||||
title: i18n.t(`applications.applicationsType.${MYSQL}`),
|
||||
type: 'primary',
|
||||
category: DATABASE_CATEGORY,
|
||||
has: true,
|
||||
group: i18n.t('applications.RDBProtocol')
|
||||
}
|
||||
|
||||
const MARIADB_ITEM = {
|
||||
name: MARIADB,
|
||||
title: i18n.t(`applications.applicationsType.${MARIADB}`),
|
||||
type: 'primary',
|
||||
category: DATABASE_CATEGORY,
|
||||
has: true
|
||||
}
|
||||
|
||||
const ORACLE_ITEM = {
|
||||
name: ORACLE,
|
||||
title: i18n.t(`applications.applicationsType.${ORACLE}`),
|
||||
type: 'primary',
|
||||
category: DATABASE_CATEGORY,
|
||||
has: hasLicence
|
||||
}
|
||||
|
||||
const POSTGRESQL_ITEM = {
|
||||
name: POSTGRESQL,
|
||||
title: i18n.t(`applications.applicationsType.${POSTGRESQL}`),
|
||||
type: 'primary',
|
||||
category: DATABASE_CATEGORY,
|
||||
has: hasLicence
|
||||
}
|
||||
|
||||
const SQLSERVER_ITEM = {
|
||||
name: SQLSERVER,
|
||||
title: i18n.t(`applications.applicationsType.${SQLSERVER}`),
|
||||
type: 'primary',
|
||||
category: DATABASE_CATEGORY,
|
||||
has: hasLicence
|
||||
}
|
||||
|
||||
const CLICKHOUSE_ITEM = {
|
||||
name: CLICKHOUSE,
|
||||
title: i18n.t(`applications.applicationsType.${CLICKHOUSE}`),
|
||||
type: 'primary',
|
||||
category: DATABASE_CATEGORY,
|
||||
has: hasLicence
|
||||
}
|
||||
export const DATABASE = [
|
||||
{
|
||||
name: MYSQL,
|
||||
title: i18n.t(`applications.applicationsType.${MYSQL}`),
|
||||
type: 'primary',
|
||||
category: DATABASE_CATEGORY,
|
||||
has: true,
|
||||
group: i18n.t('applications.RDBProtocol')
|
||||
},
|
||||
{
|
||||
name: MARIADB,
|
||||
title: i18n.t(`applications.applicationsType.${MARIADB}`),
|
||||
type: 'primary',
|
||||
category: DATABASE_CATEGORY,
|
||||
has: true
|
||||
},
|
||||
{
|
||||
name: ORACLE,
|
||||
title: i18n.t(`applications.applicationsType.${ORACLE}`),
|
||||
type: 'primary',
|
||||
category: DATABASE_CATEGORY,
|
||||
has: hasLicence
|
||||
},
|
||||
{
|
||||
name: POSTGRESQL,
|
||||
title: i18n.t(`applications.applicationsType.${POSTGRESQL}`),
|
||||
type: 'primary',
|
||||
category: DATABASE_CATEGORY,
|
||||
has: hasLicence
|
||||
},
|
||||
{
|
||||
name: SQLSERVER,
|
||||
title: i18n.t(`applications.applicationsType.${SQLSERVER}`),
|
||||
type: 'primary',
|
||||
category: DATABASE_CATEGORY,
|
||||
has: hasLicence
|
||||
}
|
||||
]
|
||||
|
||||
const MONGODB_ITEM = {
|
||||
name: MONGODB,
|
||||
@@ -119,15 +108,11 @@ const REDIS_ITEM = {
|
||||
has: true
|
||||
}
|
||||
|
||||
export const DATABASE = [
|
||||
MYSQL_ITEM, MARIADB_ITEM, ORACLE_ITEM, POSTGRESQL_ITEM, SQLSERVER_ITEM, CLICKHOUSE_ITEM
|
||||
]
|
||||
|
||||
export const KV_DATABASE = [
|
||||
MONGODB_ITEM, REDIS_ITEM
|
||||
]
|
||||
|
||||
export const AppPlanDatabase = [MYSQL_ITEM, MARIADB_ITEM, ORACLE_ITEM, POSTGRESQL_ITEM, SQLSERVER_ITEM, MONGODB_ITEM]
|
||||
export const AppPlanDatabase = [...DATABASE, MONGODB_ITEM]
|
||||
|
||||
export const KUBERNETES = 'k8s'
|
||||
export const CLOUD_CATEGORY = 'cloud'
|
||||
|
||||
@@ -88,10 +88,7 @@ export default {
|
||||
},
|
||||
headerActions: {
|
||||
hasLeftActions: false,
|
||||
hasRightActions: false,
|
||||
searchConfig: {
|
||||
getUrlQuery: false
|
||||
}
|
||||
hasRightActions: false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<script type="text/jsx">
|
||||
import GenericListTable from '@/layout/components/GenericListTable'
|
||||
import { ACCOUNT_PROVIDER_ATTRS_MAP, aliyun, aws_china, aws_international, huaweicloud, qcloud, qcloud_lighthouse, azure, azure_international, vmware, nutanix, qingcloud_private, huaweicloud_private, ctyun_private, openstack, gcp, baiducloud, jdcloud, kingsoftcloud, fc, lan } from '../const'
|
||||
import { ACCOUNT_PROVIDER_ATTRS_MAP, aliyun, aws_china, aws_international, huaweicloud, qcloud, qcloud_lighthouse, azure, azure_international, vmware, nutanix, qingcloud_private, huaweicloud_private, ctyun_private, openstack, gcp, baiducloud, jdcloud, fc, lan } from '../const'
|
||||
|
||||
export default {
|
||||
name: 'AccountList',
|
||||
@@ -98,10 +98,6 @@ export default {
|
||||
name: jdcloud,
|
||||
title: ACCOUNT_PROVIDER_ATTRS_MAP[jdcloud].title
|
||||
},
|
||||
{
|
||||
name: kingsoftcloud,
|
||||
title: ACCOUNT_PROVIDER_ATTRS_MAP[kingsoftcloud].title
|
||||
},
|
||||
{
|
||||
name: aws_china,
|
||||
title: ACCOUNT_PROVIDER_ATTRS_MAP[aws_china].title
|
||||
|
||||
@@ -24,7 +24,7 @@ export default {
|
||||
fields: [
|
||||
[this.$t('common.Basic'), ['name']],
|
||||
[this.$t('xpack.Cloud.CloudSource'), ['account', 'regions']],
|
||||
[this.$t('xpack.Cloud.SaveSetting'), ['hostname_strategy', 'node', 'unix_admin_user', 'windows_admin_user', 'protocols', 'ip_network_segment_group', 'sync_ip_type', 'is_always_update']],
|
||||
[this.$t('xpack.Cloud.SaveSetting'), ['hostname_strategy', 'node', 'unix_admin_user', 'windows_admin_user', 'protocols', 'ip_network_segment_group', 'is_always_update']],
|
||||
[this.$t('xpack.Timer'), ['is_periodic', 'crontab', 'interval']],
|
||||
[this.$t('common.Other'), ['comment']]
|
||||
],
|
||||
|
||||
@@ -4,7 +4,6 @@ export const gcp = 'gcp'
|
||||
export const aliyun = 'aliyun'
|
||||
export const baiducloud = 'baiducloud'
|
||||
export const jdcloud = 'jdcloud'
|
||||
export const kingsoftcloud = 'kingsoftcloud'
|
||||
export const aws_international = 'aws_international'
|
||||
export const aws_china = 'aws_china'
|
||||
export const huaweicloud = 'huaweicloud'
|
||||
@@ -53,11 +52,6 @@ export const ACCOUNT_PROVIDER_ATTRS_MAP = {
|
||||
title: i18n.t('xpack.Cloud.JDCloud'),
|
||||
attrs: ['access_key_id', 'access_key_secret']
|
||||
},
|
||||
[kingsoftcloud]: {
|
||||
name: kingsoftcloud,
|
||||
title: i18n.t('xpack.Cloud.KingSoftCloud'),
|
||||
attrs: ['access_key_id', 'access_key_secret']
|
||||
},
|
||||
[qcloud]: {
|
||||
name: qcloud,
|
||||
title: i18n.t('xpack.Cloud.Qcloud'),
|
||||
|
||||
@@ -15,7 +15,7 @@ export default {
|
||||
},
|
||||
fields: [
|
||||
[this.$t('common.Basic'), ['name']],
|
||||
[this.$t('common.Correlation'), ['users', 'user_groups', 'nodes', 'assets', 'applications', 'system_users']],
|
||||
[this.$t('common.Correlation'), ['users', 'user_groups', 'assets', 'applications', 'system_users']],
|
||||
[this.$t('common.Other'), ['is_active', 'comment']]
|
||||
],
|
||||
fieldsMeta: {
|
||||
@@ -36,17 +36,6 @@ export default {
|
||||
url: '/api/v1/users/groups/'
|
||||
}
|
||||
},
|
||||
nodes: {
|
||||
el: {
|
||||
value: [],
|
||||
ajax: {
|
||||
url: '/api/v1/assets/nodes/',
|
||||
transformOption: (item) => {
|
||||
return { label: item.full_value, value: item.id }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
assets: {
|
||||
type: 'assetSelect',
|
||||
component: AssetSelect,
|
||||
@@ -74,7 +63,7 @@ export default {
|
||||
el: {
|
||||
value: [],
|
||||
ajax: {
|
||||
url: `/api/v1/assets/system-users/?protocol__in=ssh,telnet,mysql,postgresql,mariadb,oracle,sqlserver,k8s,redis,mongodb,clickhouse`,
|
||||
url: `/api/v1/assets/system-users/?protocol__in=ssh,telnet,mysql,postgresql,mariadb,oracle,sqlserver,k8s`,
|
||||
transformOption: (item) => {
|
||||
if (this.$route.query.type === 'k8s') {
|
||||
return { label: item.name, value: item.id }
|
||||
|
||||
@@ -75,7 +75,7 @@ export default {
|
||||
icon: 'fa-info-circle',
|
||||
title: this.$t('assets.SystemUser'),
|
||||
objectsAjax: {
|
||||
url: `/api/v1/assets/system-users/?protocol__in=ssh,telnet,mysql,postgresql,mariadb,oracle,sqlserver,k8s,redis,mongodb,clickhouse`,
|
||||
url: `/api/v1/assets/system-users/?protocol__in=ssh,telnet,mysql,postgresql,mariadb,oracle,sqlserver,k8s`,
|
||||
transformOption: (item) => defaultTransformOption(item, 'username')
|
||||
},
|
||||
hasObjectsId: this.object.system_users,
|
||||
|
||||
@@ -80,6 +80,7 @@ export default {
|
||||
hasImport: false,
|
||||
hasRefresh: true,
|
||||
hasSearch: true,
|
||||
hasMoreActions: false,
|
||||
createRoute: 'CommandFilterCreate'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ export default {
|
||||
}
|
||||
},
|
||||
headerActions: {
|
||||
hasMoreActions: false,
|
||||
createRoute: 'DomainCreate'
|
||||
},
|
||||
notice: this.$t('assets.DomainHelpMessage')
|
||||
|
||||
@@ -27,6 +27,7 @@ export default {
|
||||
}
|
||||
},
|
||||
headerActions: {
|
||||
hasMoreActions: false,
|
||||
createRoute: 'LabelCreate'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,6 @@ export default {
|
||||
case 'sqlserver':
|
||||
case 'redis':
|
||||
case 'mongodb':
|
||||
case 'clickhouse':
|
||||
return Database
|
||||
case 'k8s':
|
||||
return K8S
|
||||
|
||||
@@ -23,14 +23,14 @@ export default {
|
||||
url: '/api/v1/assets/system-users/?type=common',
|
||||
columns: [
|
||||
'name', 'username', 'username_same_with_user', 'protocol', 'login_mode',
|
||||
'priority',
|
||||
'assets_amount', 'applications_amount', 'priority',
|
||||
'created_by', 'date_created', 'date_updated', 'comment', 'org_name', 'actions'
|
||||
],
|
||||
columnsShow: {
|
||||
min: ['name', 'actions'],
|
||||
default: [
|
||||
'name', 'username', 'protocol', 'login_mode',
|
||||
'comment', 'actions'
|
||||
'name', 'username', 'protocol', 'login_mode', 'assets_amount',
|
||||
'applications_amount', 'comment', 'actions'
|
||||
]
|
||||
},
|
||||
columnsMeta: {
|
||||
@@ -49,6 +49,12 @@ export default {
|
||||
login_mode: {
|
||||
width: '120px'
|
||||
},
|
||||
assets_amount: {
|
||||
width: '80px'
|
||||
},
|
||||
applications_amount: {
|
||||
width: '80px'
|
||||
},
|
||||
actions: {
|
||||
formatterArgs: {
|
||||
onUpdate: ({ row }) => {
|
||||
|
||||
@@ -1,48 +1,23 @@
|
||||
<template>
|
||||
<div>
|
||||
<GenericListPage
|
||||
v-loading="loading"
|
||||
:table-config="tableConfig"
|
||||
:header-actions="headerActions"
|
||||
/>
|
||||
<el-dialog
|
||||
:title="this.$t('route.OperateLog')"
|
||||
:visible.sync="logDetailVisible"
|
||||
width="70%"
|
||||
>
|
||||
<TwoTabFormatter :row="rowObj" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
<GenericListPage :table-config="tableConfig" :header-actions="headerActions" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import GenericListPage from '@/layout/components/GenericListPage'
|
||||
import { getDaysAgo, getDaysFuture } from '@/utils/common'
|
||||
import TwoTabFormatter from '@/components/TableFormatters/TwoTabFormatter'
|
||||
import { ActionsFormatter } from '@/components/TableFormatters'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
GenericListPage,
|
||||
TwoTabFormatter
|
||||
GenericListPage
|
||||
},
|
||||
data() {
|
||||
const vm = this
|
||||
const now = new Date()
|
||||
const dateFrom = getDaysAgo(7, now).toISOString()
|
||||
const dateTo = getDaysFuture(1, now).toISOString()
|
||||
return {
|
||||
rowObj: {
|
||||
left: '',
|
||||
right: '',
|
||||
leftTitle: vm.$t('audits.BeforeChange'),
|
||||
rightTitle: vm.$t('audits.AfterChange')
|
||||
},
|
||||
logDetailVisible: false,
|
||||
loading: false,
|
||||
tableConfig: {
|
||||
url: '/api/v1/audits/operate-logs/',
|
||||
columns: ['user', 'action_display', 'resource_type_display', 'resource', 'remote_addr', 'datetime', 'actions'],
|
||||
columns: ['user', 'action_display', 'resource_type_display', 'resource', 'remote_addr', 'datetime'],
|
||||
columnsMeta: {
|
||||
user: {
|
||||
showOverflowTooltip: true
|
||||
@@ -61,38 +36,7 @@ export default {
|
||||
width: '140px'
|
||||
},
|
||||
action_display: {
|
||||
width: '70px'
|
||||
},
|
||||
actions: {
|
||||
width: '70px',
|
||||
formatter: ActionsFormatter,
|
||||
formatterArgs: {
|
||||
hasUpdate: false,
|
||||
canUpdate: false,
|
||||
hasDelete: false,
|
||||
canDelete: false,
|
||||
hasClone: false,
|
||||
canClone: false,
|
||||
extraActions: [
|
||||
{
|
||||
name: 'View',
|
||||
title: this.$t('common.View'),
|
||||
type: 'primary',
|
||||
callback: ({ row }) => {
|
||||
vm.loading = true
|
||||
vm.$axios.get(
|
||||
`/api/v1/audits/operate-logs/${row.id}/?type=action_detail`,
|
||||
).then(res => {
|
||||
vm.rowObj.left = res.before
|
||||
vm.rowObj.right = res.after
|
||||
vm.logDetailVisible = true
|
||||
}).finally(() => {
|
||||
vm.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
width: '90px'
|
||||
}
|
||||
},
|
||||
extraQuery: {
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
import ListTable from '@/components/ListTable'
|
||||
import { ActionsFormatter } from '@/components/TableFormatters'
|
||||
import { toSafeLocalDateStr } from '@/utils/common'
|
||||
import { openTaskPage } from '@/utils/jms'
|
||||
|
||||
export default {
|
||||
name: 'AdhocExecutionHistory',
|
||||
@@ -87,14 +86,6 @@ export default {
|
||||
callback: function({ row, tableData }) {
|
||||
return this.$router.push({ name: 'HistoryExecutionDetail', params: { id: row.id }})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'log',
|
||||
title: this.$t('ops.output'),
|
||||
type: 'info',
|
||||
callback: function({ row }) {
|
||||
openTaskPage(row.id, 'ansible')
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import DetailCard from '@/components/DetailCard'
|
||||
import { toSafeLocalDateStr } from '@/utils/common'
|
||||
import RunInfoCard from '../../RunInfoCard'
|
||||
import { toLastFailureDisplay, toLastSucessDisplay } from '../business'
|
||||
import { openTaskPage } from '@/utils/jms'
|
||||
|
||||
export default {
|
||||
name: 'HistoryExecutionDetail',
|
||||
@@ -71,6 +72,17 @@ export default {
|
||||
{
|
||||
key: this.$t('ops.isSuccess'),
|
||||
value: this.object.is_success
|
||||
},
|
||||
{
|
||||
key: this.$t('ops.output'),
|
||||
value: this.object.id,
|
||||
formatter: function(row, value) {
|
||||
const onClick = function() {
|
||||
openTaskPage(value, 'ansible')
|
||||
}
|
||||
const title = this.$t('common.View')
|
||||
return <a onClick={onClick} >{ title }</a>
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ export default {
|
||||
openTaskPage(value, 'ansible')
|
||||
}
|
||||
const title = this.$t('common.View')
|
||||
return <a class='text-link' onClick={onClick} >{ title }</a>
|
||||
return <a onClick={onClick} >{ title }</a>
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
import ListTable from '@/components/ListTable'
|
||||
import { DetailFormatter } from '@/components/TableFormatters'
|
||||
import { toSafeLocalDateStr } from '@/utils/common'
|
||||
import { openTaskPage } from '@/utils/jms'
|
||||
|
||||
export default {
|
||||
name: 'TaskHistory',
|
||||
@@ -96,14 +95,6 @@ export default {
|
||||
callback: function({ row, tableData }) {
|
||||
return this.$router.push({ name: 'HistoryExecutionDetail', params: { id: row.id }})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'log',
|
||||
title: this.$t('ops.output'),
|
||||
type: 'info',
|
||||
callback: function({ row }) {
|
||||
openTaskPage(row.id, 'ansible')
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -37,7 +37,8 @@ import DetailCard from '@/components/DetailCard'
|
||||
import QuickActions from '@/components/QuickActions'
|
||||
import UserConfirmDialog from '@/components/UserConfirmDialog'
|
||||
import { toSafeLocalDateStr } from '@/utils/common'
|
||||
import store from '@/store'
|
||||
import { getProfile } from '@/api/users'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'ProfileInfo',
|
||||
@@ -47,14 +48,9 @@ export default {
|
||||
QuickActions,
|
||||
UserConfirmDialog
|
||||
},
|
||||
props: {
|
||||
object: {
|
||||
type: Object,
|
||||
default: () => store.state.users.profile
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
object: this.userProfile || {},
|
||||
url: `/api/v1/users/profile/`,
|
||||
showPasswordDialog: false,
|
||||
currentEdit: '',
|
||||
@@ -217,6 +213,9 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
userProfile: state => state.users.profile
|
||||
}),
|
||||
detailCardItems() {
|
||||
return [
|
||||
{
|
||||
@@ -299,6 +298,12 @@ export default {
|
||||
return url
|
||||
}
|
||||
},
|
||||
created() {
|
||||
getProfile().then(res => {
|
||||
this.object = res
|
||||
this.$store.commit('users/SET_PROFILE', res)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
updateUserReceiveBackends(val) {
|
||||
this.$axios.patch(
|
||||
@@ -306,7 +311,6 @@ export default {
|
||||
{ 'receive_backends': this.getReceiveBackendList() }
|
||||
).then(res => {
|
||||
this.$message.success(this.$t('common.updateSuccessMsg'))
|
||||
this.$store.dispatch('users/getProfile', true)
|
||||
}).catch(err => {
|
||||
this.$message.error(this.$t('common.updateErrorMsg' + ' ' + err))
|
||||
})
|
||||
|
||||
@@ -44,7 +44,7 @@ export default {
|
||||
[
|
||||
this.$t('common.BasicInfo'),
|
||||
[
|
||||
'AUTH_FEISHU', 'FEISHU_APP_ID', 'FEISHU_APP_SECRET', 'FEISHU_VERSION'
|
||||
'AUTH_FEISHU', 'FEISHU_APP_ID', 'FEISHU_APP_SECRET'
|
||||
]
|
||||
]
|
||||
],
|
||||
|
||||
@@ -32,7 +32,6 @@ export default {
|
||||
'AUTH_OPENID_PROVIDER_TOKEN_ENDPOINT', 'AUTH_OPENID_PROVIDER_JWKS_ENDPOINT',
|
||||
'AUTH_OPENID_PROVIDER_USERINFO_ENDPOINT', 'AUTH_OPENID_PROVIDER_END_SESSION_ENDPOINT',
|
||||
'AUTH_OPENID_PROVIDER_SIGNATURE_ALG', 'AUTH_OPENID_PROVIDER_SIGNATURE_KEY',
|
||||
'AUTH_OPENID_PKCE', 'AUTH_OPENID_CODE_CHALLENGE_METHOD',
|
||||
'AUTH_OPENID_SCOPES', 'AUTH_OPENID_ID_TOKEN_MAX_AGE', 'AUTH_OPENID_ID_TOKEN_INCLUDE_CLAIMS',
|
||||
'AUTH_OPENID_USE_STATE', 'AUTH_OPENID_USE_NONCE', 'AUTH_OPENID_ALWAYS_UPDATE_USER',
|
||||
'AUTH_OPENID_IGNORE_SSL_VERIFICATION', 'AUTH_OPENID_SHARE_SESSION', 'AUTH_OPENID_USER_ATTR_MAP'
|
||||
@@ -88,12 +87,6 @@ export default {
|
||||
AUTH_OPENID_PROVIDER_SIGNATURE_KEY: {
|
||||
hidden: (form) => form['AUTH_OPENID_KEYCLOAK']
|
||||
},
|
||||
AUTH_OPENID_PKCE: {
|
||||
hidden: (form) => form['AUTH_OPENID_KEYCLOAK']
|
||||
},
|
||||
AUTH_OPENID_CODE_CHALLENGE_METHOD: {
|
||||
hidden: (form) => form['AUTH_OPENID_KEYCLOAK'] || !form['AUTH_OPENID_PKCE']
|
||||
},
|
||||
'AUTH_OPENID_SCOPES': {
|
||||
hidden: (form) => form['AUTH_OPENID_KEYCLOAK']
|
||||
},
|
||||
|
||||
@@ -115,14 +115,6 @@ export default {
|
||||
{
|
||||
key: this.$t('setting.Edition'),
|
||||
value: this.licenseData.edition
|
||||
},
|
||||
{
|
||||
key: this.$t('assets.SerialNumber'),
|
||||
value: this.licenseData?.serial_no || ''
|
||||
},
|
||||
{
|
||||
key: this.$t('common.Comment'),
|
||||
value: this.licenseData?.remark || ''
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -47,8 +47,7 @@ export default {
|
||||
this.$t('setting.Perm'),
|
||||
[
|
||||
'PERM_SINGLE_ASSET_TO_UNGROUP_NODE',
|
||||
'TICKET_AUTHORIZE_DEFAULT_TIME',
|
||||
'TICKET_AUTHORIZE_DEFAULT_TIME_UNIT'
|
||||
'TICKET_AUTHORIZE_DEFAULT_TIME'
|
||||
]
|
||||
]
|
||||
],
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
v-on="$listeners"
|
||||
@confirm="onConfirm()"
|
||||
>
|
||||
<GenericCreateUpdateForm ref="form" v-bind="iConfig" @submitSuccess="submitSuccess" />
|
||||
<GenericCreateUpdateForm v-bind="iConfig" @submitSuccess="submitSuccess" />
|
||||
</Dialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -52,16 +52,6 @@ export default {
|
||||
submitSuccess(res) {
|
||||
this.$emit('input', !!res[this.enableField])
|
||||
this.visible = false
|
||||
},
|
||||
testPerformError(error) {
|
||||
const data = error.response.data
|
||||
for (const key of Object.keys(data)) {
|
||||
let value = data[key]
|
||||
if (value instanceof Array) {
|
||||
value = value.join(';')
|
||||
}
|
||||
this.$refs.form.$refs.form.setFieldError(key, value)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<BaseSMS ref="baseSms" :title="$t('setting.CMPP2')" :config="$data" />
|
||||
<BaseSMS :title="$t('setting.CMPP2')" :config="$data" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -28,9 +28,8 @@ export default {
|
||||
value
|
||||
).then(res => {
|
||||
vm.$message.success(res['msg'])
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
vm.$log.error('err occur')
|
||||
vm.$refs.baseSms.testPerformError(error)
|
||||
}).finally(() => { btn.loading = false })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<BaseSMS ref="baseSms" :title="$t('setting.AlibabaCloud')" :config="$data" />
|
||||
<BaseSMS :title="$t('setting.AlibabaCloud')" :config="$data" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -28,9 +28,8 @@ export default {
|
||||
value
|
||||
).then(res => {
|
||||
vm.$message.success(res['msg'])
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
vm.$log.error('err occur')
|
||||
vm.$refs.baseSms.testPerformError(error)
|
||||
}).finally(() => { btn.loading = false })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<BaseSMS ref="baseSms" :title="$t('setting.HuaweiCloud')" :config="$data" />
|
||||
<BaseSMS :title="$t('setting.HuaweiCloud')" :config="$data" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -28,9 +28,8 @@ export default {
|
||||
value
|
||||
).then(res => {
|
||||
vm.$message.success(res['msg'])
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
vm.$log.error('err occur')
|
||||
vm.$refs.baseSms.testPerformError(error)
|
||||
}).finally(() => { btn.loading = false })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<BaseSMS ref="baseSms" :title="$t('setting.TencentCloud')" :config="$data" />
|
||||
<BaseSMS :title="$t('setting.TencentCloud')" :config="$data" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -28,9 +28,8 @@ export default {
|
||||
value
|
||||
).then(res => {
|
||||
vm.$message.success(res['msg'])
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
vm.$log.error('err occur')
|
||||
vm.$refs.baseSms.testPerformError(error)
|
||||
}).finally(() => { btn.loading = false })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,12 +37,6 @@ export default {
|
||||
[
|
||||
'TERMINAL_MAGNUS_ENABLED'
|
||||
]
|
||||
],
|
||||
[
|
||||
`Web ${comp}(Luna)`,
|
||||
[
|
||||
'TERMINAL_GRAPHICAL_RESOLUTION'
|
||||
]
|
||||
]
|
||||
],
|
||||
fieldsMeta: {
|
||||
|
||||
@@ -23,15 +23,13 @@ export default {
|
||||
this.$t('applications.port'),
|
||||
[
|
||||
'http_port', 'https_port', 'ssh_port', 'rdp_port',
|
||||
'magnus_listen_port_range'
|
||||
'mysql_port', 'mariadb_port', 'postgresql_port', 'redis_port',
|
||||
'oracle_11g_port', 'oracle_12c_port'
|
||||
]
|
||||
],
|
||||
[this.$t('common.Other'), ['comment']]
|
||||
],
|
||||
fieldsMeta: {
|
||||
magnus_listen_port_range: {
|
||||
disabled: true
|
||||
}
|
||||
},
|
||||
hasDetailInMsg: false
|
||||
}
|
||||
|
||||
@@ -20,15 +20,17 @@ export default {
|
||||
url: '/api/v1/terminal/endpoints/',
|
||||
columns: [
|
||||
'name', 'host',
|
||||
'http_port', 'https_port', 'ssh_port', 'rdp_port',
|
||||
'magnus_listen_port_range',
|
||||
'http_port', 'https_port', 'ssh_port',
|
||||
'rdp_port', 'mysql_port', 'mariadb_port',
|
||||
'postgresql_port', 'redis_port',
|
||||
'oracle_11g_port', 'oracle_12c_port',
|
||||
'date_created', 'comment', 'actions'
|
||||
],
|
||||
columnsShow: {
|
||||
min: ['name', 'actions'],
|
||||
default: [
|
||||
'name', 'host', 'actions',
|
||||
'http_port', 'https_port', 'ssh_port', 'rdp_port', 'magnus_listen_port_range'
|
||||
'http_port', 'https_port', 'ssh_port', 'rdp_port'
|
||||
]
|
||||
},
|
||||
columnsMeta: {
|
||||
|
||||
@@ -27,8 +27,7 @@ export default {
|
||||
initial: {
|
||||
type: storageType,
|
||||
endpoint_suffix: 'core.chinacloudapi.cn',
|
||||
protocol: 'http',
|
||||
is_default: true
|
||||
protocol: 'http'
|
||||
},
|
||||
getUrl() {
|
||||
const params = this.$route.params
|
||||
|
||||
@@ -25,10 +25,8 @@ export default {
|
||||
data() {
|
||||
const vm = this
|
||||
const now = new Date()
|
||||
const time = store.getters.publicSettings['TICKET_AUTHORIZE_DEFAULT_TIME']
|
||||
const unit = store.getters.publicSettings['TICKET_AUTHORIZE_DEFAULT_TIME_UNIT']
|
||||
const dividend = unit === 'hour' ? 24 : 1
|
||||
const date_expired = getDaysFuture(time / dividend, new Date()).toISOString()
|
||||
const TicketAuthorizeDefaultTime = store.getters.publicSettings['TICKET_AUTHORIZE_DEFAULT_TIME']
|
||||
const date_expired = getDaysFuture(TicketAuthorizeDefaultTime, new Date()).toISOString()
|
||||
const date_start = now.toISOString()
|
||||
let apply_category_type = []
|
||||
|
||||
|
||||
@@ -17,10 +17,8 @@ export default {
|
||||
|
||||
data() {
|
||||
const now = new Date()
|
||||
const time = store.getters.publicSettings['TICKET_AUTHORIZE_DEFAULT_TIME']
|
||||
const unit = store.getters.publicSettings['TICKET_AUTHORIZE_DEFAULT_TIME_UNIT']
|
||||
const dividend = unit === 'hour' ? 24 : 1
|
||||
const date_expired = getDaysFuture(time / dividend, new Date()).toISOString()
|
||||
const TicketAuthorizeDefaultTime = store.getters.publicSettings['TICKET_AUTHORIZE_DEFAULT_TIME']
|
||||
const date_expired = getDaysFuture(TicketAuthorizeDefaultTime, new Date()).toISOString()
|
||||
const date_start = now.toISOString()
|
||||
return {
|
||||
// 工单创建 隐藏提示信息中的跳转连接
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div v-for="item in comments" :key="item.id" class="feed-activity-list">
|
||||
<div class="feed-element">
|
||||
<a href="#" class="pull-left">
|
||||
<el-avatar :src="imageUrl" :size="30" class="header-avatar" />
|
||||
<el-avatar :src="imageUrl" size="30" class="header-avatar" />
|
||||
</a>
|
||||
<div class="media-body ">
|
||||
<strong>{{ item.user_display }}</strong> <small class="text-muted">{{ formatTime(item.date_created) }}</small>
|
||||
@@ -105,9 +105,7 @@ export default {
|
||||
return this.object.process_map[this.object.approval_step - 1].assignees.indexOf(this.$store.state.users.profile.id) !== -1
|
||||
},
|
||||
isSelfTicket() {
|
||||
const applicant = this.object.applicant.indexOf('(') > -1 ? this.object.applicant.split('(')[0] : this.object.applicant
|
||||
const userName = this.$store.state.users.profile?.username
|
||||
return applicant === userName
|
||||
return this.object.applicant === this.$store.state.users.profile.id
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
@@ -14,9 +14,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
initial: {
|
||||
need_update_password: true
|
||||
},
|
||||
initial: {},
|
||||
user: {
|
||||
'can_public_key_auth': false
|
||||
},
|
||||
@@ -171,9 +169,6 @@ export default {
|
||||
if (value.update_password !== undefined) {
|
||||
delete value.update_password
|
||||
}
|
||||
if (value.source !== 'local') {
|
||||
delete value.need_update_password
|
||||
}
|
||||
return value
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user