mirror of
https://github.com/jumpserver/lina.git
synced 2025-11-07 18:08:50 +00:00
Compare commits
40 Commits
pr@dev@ass
...
v2.28.15
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f0f8cc0456 | ||
|
|
4e904add32 | ||
|
|
b85ed8405e | ||
|
|
e827deef35 | ||
|
|
3c2c2ca302 | ||
|
|
453ca578b5 | ||
|
|
aa622ff812 | ||
|
|
171ceeef3a | ||
|
|
754e861294 | ||
|
|
e7b37d43f2 | ||
|
|
fd749ef211 | ||
|
|
5667c39bcb | ||
|
|
982ce90a9a | ||
|
|
86ce758adb | ||
|
|
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 |
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@node10
|
||||
uses: jumpserver/action-build-upload-assets@node14.16
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
"vue-echarts": "^5.0.0-beta.0",
|
||||
"vue-i18n": "^8.15.5",
|
||||
"vue-json-editor": "^1.4.3",
|
||||
"vue-markdown": "^2.2.4",
|
||||
"vue-moment": "^4.1.0",
|
||||
"vue-password-strength-meter": "^1.7.2",
|
||||
"vue-router": "3.0.6",
|
||||
@@ -92,6 +93,7 @@
|
||||
"eslint": "^5.15.3",
|
||||
"eslint-plugin-vue": "5.2.2",
|
||||
"eslint-plugin-vue-i18n": "^0.3.0",
|
||||
"github-markdown-css": "^5.2.0",
|
||||
"html-webpack-plugin": "3.2.0",
|
||||
"husky": "^4.2.3",
|
||||
"less-loader": "^5.0.0",
|
||||
|
||||
37
src/components/MarkDown/index.vue
Normal file
37
src/components/MarkDown/index.vue
Normal file
@@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<div class="markdown-body">
|
||||
<VueMarkdown :source="value" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import VueMarkdown from 'vue-markdown'
|
||||
import 'github-markdown-css/github-markdown-light.css'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
VueMarkdown
|
||||
},
|
||||
props: {
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
.markdown-body * {
|
||||
padding: 10px;
|
||||
background-color: #f3f3f3;
|
||||
color: #1a1a1a;
|
||||
font-size: 13px;
|
||||
//& >>> .table * {
|
||||
// background-color: #f3f3f3;
|
||||
//}
|
||||
}
|
||||
</style>
|
||||
@@ -28,3 +28,4 @@ export { default as AssetRelationCard } from './AssetRelationCard'
|
||||
export { default as UserConfirmDialog } from './UserConfirmDialog'
|
||||
export { default as Announcement } from './Announcement'
|
||||
export { default as CronTab } from './CronTab'
|
||||
export { default as MarkDown } from './MarkDown'
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
},
|
||||
"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",
|
||||
|
||||
@@ -14,7 +14,7 @@ import { DEFAULT_ORG_ID } from '@/utils/org'
|
||||
const service = axios.create({
|
||||
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
|
||||
// withCredentials: true, // send cookies when cross-domain requests
|
||||
timeout: 60 * 1000 // request timeout
|
||||
timeout: 2 * 60 * 1000 // request timeout
|
||||
})
|
||||
|
||||
function beforeRequestAddToken(config) {
|
||||
|
||||
@@ -54,51 +54,54 @@ export const REDIS = 'redis'
|
||||
export const MONGODB = 'mongodb'
|
||||
export const CLICKHOUSE = 'clickhouse'
|
||||
|
||||
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
|
||||
},
|
||||
{
|
||||
name: CLICKHOUSE,
|
||||
title: i18n.t(`applications.applicationsType.${CLICKHOUSE}`),
|
||||
type: 'primary',
|
||||
category: DATABASE_CATEGORY,
|
||||
has: hasLicence
|
||||
}
|
||||
]
|
||||
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
|
||||
}
|
||||
|
||||
const MONGODB_ITEM = {
|
||||
name: MONGODB,
|
||||
@@ -116,11 +119,15 @@ 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 = [...DATABASE, MONGODB_ITEM]
|
||||
export const AppPlanDatabase = [MYSQL_ITEM, MARIADB_ITEM, ORACLE_ITEM, POSTGRESQL_ITEM, SQLSERVER_ITEM, MONGODB_ITEM]
|
||||
|
||||
export const KUBERNETES = 'k8s'
|
||||
export const CLOUD_CATEGORY = 'cloud'
|
||||
|
||||
@@ -74,7 +74,7 @@ export default {
|
||||
el: {
|
||||
value: [],
|
||||
ajax: {
|
||||
url: `/api/v1/assets/system-users/?protocol__in=ssh,telnet,mysql,postgresql,mariadb,oracle,sqlserver,k8s`,
|
||||
url: `/api/v1/assets/system-users/?protocol__in=ssh,telnet,mysql,postgresql,mariadb,oracle,sqlserver,k8s,redis,mongodb,clickhouse`,
|
||||
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`,
|
||||
url: `/api/v1/assets/system-users/?protocol__in=ssh,telnet,mysql,postgresql,mariadb,oracle,sqlserver,k8s,redis,mongodb,clickhouse`,
|
||||
transformOption: (item) => defaultTransformOption(item, 'username')
|
||||
},
|
||||
hasObjectsId: this.object.system_users,
|
||||
|
||||
@@ -23,14 +23,14 @@ export default {
|
||||
url: '/api/v1/assets/system-users/?type=common',
|
||||
columns: [
|
||||
'name', 'username', 'username_same_with_user', 'protocol', 'login_mode',
|
||||
'assets_amount', 'applications_amount', 'priority',
|
||||
'priority',
|
||||
'created_by', 'date_created', 'date_updated', 'comment', 'org_name', 'actions'
|
||||
],
|
||||
columnsShow: {
|
||||
min: ['name', 'actions'],
|
||||
default: [
|
||||
'name', 'username', 'protocol', 'login_mode', 'assets_amount',
|
||||
'applications_amount', 'comment', 'actions'
|
||||
'name', 'username', 'protocol', 'login_mode',
|
||||
'comment', 'actions'
|
||||
]
|
||||
},
|
||||
columnsMeta: {
|
||||
@@ -49,12 +49,6 @@ export default {
|
||||
login_mode: {
|
||||
width: '120px'
|
||||
},
|
||||
assets_amount: {
|
||||
width: '80px'
|
||||
},
|
||||
applications_amount: {
|
||||
width: '80px'
|
||||
},
|
||||
actions: {
|
||||
formatterArgs: {
|
||||
onUpdate: ({ row }) => {
|
||||
|
||||
@@ -25,17 +25,6 @@ export default {
|
||||
]
|
||||
]
|
||||
],
|
||||
fieldsMeta: {
|
||||
FORGOT_PASSWORD_URL: {
|
||||
on: {
|
||||
change([value], updateForm) {
|
||||
if (value && !value.startsWith('http')) {
|
||||
updateForm({ FORGOT_PASSWORD_URL: 'http://' + value })
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
submitMethod() {
|
||||
return 'patch'
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ export default {
|
||||
[
|
||||
this.$t('common.BasicInfo'),
|
||||
[
|
||||
'AUTH_FEISHU', 'FEISHU_APP_ID', 'FEISHU_APP_SECRET'
|
||||
'AUTH_FEISHU', 'FEISHU_APP_ID', 'FEISHU_APP_SECRET', 'FEISHU_VERSION'
|
||||
]
|
||||
]
|
||||
],
|
||||
|
||||
@@ -32,6 +32,7 @@ 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'
|
||||
@@ -87,6 +88,12 @@ 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,6 +115,14 @@ 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 || ''
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
<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>
|
||||
<br>
|
||||
<small class="text-muted">{{ toSafeLocalDateStr(item.date_created) }}</small>
|
||||
<div style="padding-top: 10px;" v-html="item.body" />
|
||||
<MarkDown :value="item.body" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -68,9 +68,11 @@
|
||||
import IBox from '@/components/IBox'
|
||||
import { formatTime, getDateTimeStamp } from '@/utils'
|
||||
import { toSafeLocalDateStr } from '@/utils/common'
|
||||
import MarkDown from '@/components/MarkDown'
|
||||
|
||||
export default {
|
||||
name: 'Comments',
|
||||
components: { IBox },
|
||||
components: { IBox, MarkDown },
|
||||
props: {
|
||||
object: {
|
||||
type: Object,
|
||||
@@ -105,7 +107,15 @@ export default {
|
||||
return this.object.process_map[this.object.approval_step - 1].assignees.indexOf(this.$store.state.users.profile.id) !== -1
|
||||
},
|
||||
isSelfTicket() {
|
||||
return this.object.applicant === this.$store.state.users.profile.id
|
||||
let applicant
|
||||
if (this.object.applicant.indexOf('(') > -1) {
|
||||
const applicantName = this.object.applicant.split('(')[1]
|
||||
applicant = applicantName.substring(0, applicantName.length - 1)
|
||||
} else {
|
||||
applicant = this.object.applicant
|
||||
}
|
||||
const userName = this.$store.state.users.profile?.username
|
||||
return applicant === userName
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
Reference in New Issue
Block a user