mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: Advanced orchestration, adding applications, filtering oneself
This commit is contained in:
parent
f7623dcfdc
commit
7dba06ed82
|
|
@ -165,6 +165,7 @@
|
|||
border-radius: var(--el-border-radius-base) !important;
|
||||
padding: 5px 8px;
|
||||
font-weight: 400;
|
||||
color: var(--el-text-color-primary) !important;
|
||||
}
|
||||
.el-radio-button__original-radio:checked + .el-radio-button__inner {
|
||||
color: var(--el-color-primary) !important;
|
||||
|
|
|
|||
|
|
@ -157,9 +157,6 @@ const apiType = computed(() => {
|
|||
const permissionPrecise = computed(() => {
|
||||
return permissionMap['tool'][apiType.value]
|
||||
})
|
||||
const isShared = computed(() => {
|
||||
return folder.currentFolder.id === 'share'
|
||||
})
|
||||
|
||||
const loading = ref(false)
|
||||
const activeName = ref('base')
|
||||
|
|
@ -278,7 +275,9 @@ async function getApplicationList() {
|
|||
}).getAllApplication({
|
||||
folder_id: folder.currentFolder?.id || user.getWorkspaceId(),
|
||||
})
|
||||
applicationList.value = res.data.filter((item: any) => item.resource_type === 'application')
|
||||
applicationList.value = res.data.filter(
|
||||
(item: any) => item.resource_type === 'application' && item.id !== props.id,
|
||||
)
|
||||
}
|
||||
|
||||
function folderClickHandle(row: any) {
|
||||
|
|
|
|||
|
|
@ -9,10 +9,7 @@
|
|||
label-position="top"
|
||||
require-asterisk-position="right"
|
||||
>
|
||||
<el-form-item
|
||||
:label="$t('views.system.authentication.cas.ldpUri')"
|
||||
prop="config.ldpUri"
|
||||
>
|
||||
<el-form-item :label="$t('views.system.authentication.cas.ldpUri')" prop="config.ldpUri">
|
||||
<el-input
|
||||
v-model="form.config.ldpUri"
|
||||
:placeholder="$t('views.system.authentication.cas.ldpUriPlaceholder')"
|
||||
|
|
@ -38,18 +35,24 @@
|
|||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-checkbox v-model="form.is_active"
|
||||
>{{ $t('views.system.authentication.cas.enableAuthentication') }}
|
||||
>{{ $t('views.system.authentication.cas.enableAuthentication') }}
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div class="text-right">
|
||||
<el-button @click="submit(authFormRef)" type="primary" :disabled="loading"
|
||||
v-hasPermission="
|
||||
new ComplexPermission(
|
||||
[RoleConst.ADMIN],
|
||||
[PermissionConst.CHAT_USER_AUTH_EDIT],
|
||||
[],'OR',)"
|
||||
<div>
|
||||
<el-button
|
||||
@click="submit(authFormRef)"
|
||||
type="primary"
|
||||
:disabled="loading"
|
||||
v-hasPermission="
|
||||
new ComplexPermission(
|
||||
[RoleConst.ADMIN],
|
||||
[PermissionConst.CHAT_USER_AUTH_EDIT],
|
||||
[],
|
||||
'OR',
|
||||
)
|
||||
"
|
||||
>
|
||||
{{ $t('common.save') }}
|
||||
</el-button>
|
||||
|
|
@ -59,13 +62,13 @@
|
|||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {reactive, ref, watch, onMounted} from 'vue'
|
||||
import { reactive, ref, watch, onMounted } from 'vue'
|
||||
import authApi from '@/api/chat-user/auth-setting'
|
||||
import type {FormInstance, FormRules} from 'element-plus'
|
||||
import {t} from '@/locales'
|
||||
import {MsgSuccess} from '@/utils/message'
|
||||
import {PermissionConst, RoleConst} from '@/utils/permission/data'
|
||||
import {ComplexPermission} from '@/utils/permission/type'
|
||||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
import { t } from '@/locales'
|
||||
import { MsgSuccess } from '@/utils/message'
|
||||
import { PermissionConst, RoleConst } from '@/utils/permission/data'
|
||||
import { ComplexPermission } from '@/utils/permission/type'
|
||||
|
||||
const form = ref<any>({
|
||||
id: '',
|
||||
|
|
@ -73,9 +76,9 @@ const form = ref<any>({
|
|||
config: {
|
||||
ldpUri: '',
|
||||
validateUrl: '',
|
||||
redirectUrl: ''
|
||||
redirectUrl: '',
|
||||
},
|
||||
is_active: true
|
||||
is_active: true,
|
||||
})
|
||||
|
||||
const authFormRef = ref()
|
||||
|
|
@ -87,23 +90,23 @@ const rules = reactive<FormRules<any>>({
|
|||
{
|
||||
required: true,
|
||||
message: t('views.system.authentication.cas.ldpUriPlaceholder'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
'config.validateUrl': [
|
||||
{
|
||||
required: true,
|
||||
message: t('views.system.authentication.cas.validateUrlPlaceholder'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
'config.redirectUrl': [
|
||||
{
|
||||
required: true,
|
||||
message: t('views.system.authentication.cas.redirectUrlPlaceholder'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
const submit = async (formEl: FormInstance | undefined) => {
|
||||
|
|
@ -126,7 +129,8 @@ function getDetail() {
|
|||
form.value = res.data
|
||||
}
|
||||
if (!form.value.config.redirectUrl) {
|
||||
form.value.config.redirectUrl = window.location.origin + window.MaxKB.chatPrefix + '/api/auth/cas'
|
||||
form.value.config.redirectUrl =
|
||||
window.location.origin + window.MaxKB.chatPrefix + '/api/auth/cas'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div class="text-right">
|
||||
<div>
|
||||
<el-button @click="submit(authFormRef, 'test')" :disabled="loading">
|
||||
{{ $t('views.system.test') }}</el-button
|
||||
>
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div class="text-right">
|
||||
<div>
|
||||
<el-button @click="submit(authFormRef)" type="primary" :disabled="loading"
|
||||
v-hasPermission="
|
||||
new ComplexPermission(
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div class="text-right">
|
||||
<div>
|
||||
<el-button @click="submit(authFormRef)" type="primary" :disabled="loading"
|
||||
v-hasPermission="
|
||||
new ComplexPermission(
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
<div v-if="item.isValid" class="border-t mt-16">
|
||||
<el-row :gutter="12" class="mt-16">
|
||||
<el-col v-for="(value, key) in item.config" :key="key" :span="12">
|
||||
<el-text type="info">{{ formatFieldName(key, item) }}</el-text>
|
||||
<el-text type="info" class="lighter">{{ formatFieldName(key, item) }}</el-text>
|
||||
<div class="mt-4 mb-16 flex align-center">
|
||||
<span
|
||||
v-if="key !== 'app_secret'"
|
||||
|
|
|
|||
Loading…
Reference in New Issue