Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions 25 ui/src/views/iam/AddUser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@
optionFilterProp="children"
:filterOption="(input, option) => {
return option.componentOptions.propsData.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}" >
}"
@change="val => this.fetchAccount(val)" >
<a-select-option v-for="domain in domainsList" :key="domain.id" :label="domain.path || domain.name || domain.description">
<span>
<resource-icon v-if="domain && domain.icon" :image="domain.icon.base64image" size="1x" style="margin-right: 5px"/>
Expand Down Expand Up @@ -192,7 +193,6 @@ export default {
timeZoneMap: [],
domainLoading: false,
domainsList: [],
selectedDomain: '',
samlEnable: false,
idpLoading: false,
idps: [],
Expand Down Expand Up @@ -220,36 +220,41 @@ export default {
if (!this.domianid) {
this.fetchDomains()
}
if (!this.account) {
this.fetchAccount()
}
this.fetchTimeZone()
if (this.samlAllowed) {
this.fetchIdps()
}
},
fetchDomains () {
this.domainLoading = true
api('listDomains', {
var params = {
listAll: true,
showicon: true,
details: 'min'
}).then(response => {
}
api('listDomains', params).then(response => {
this.domainsList = response.listdomainsresponse.domain || []
this.selectedDomain = this.domainsList[0].id || ''
}).catch(error => {
this.$notification.error({
message: `${this.$t('label.error')} ${error.response.status}`,
description: error.response.data.errorresponse.errortext
})
}).finally(() => {
const domainid = this.domainsList[0].id || ''
this.form.setFieldsValue({ domainid: domainid })
this.fetchAccount(domainid)
this.domainLoading = false
})
},
fetchAccount () {
fetchAccount (domainid) {
this.accountList = []
this.form.setFieldsValue({ account: null })
this.loadingAccount = true
api('listAccounts', { listAll: true, showicon: true }).then(response => {
var params = { listAll: true, showicon: true }
if (domainid) {
params.domainid = domainid
}
api('listAccounts', params).then(response => {
this.accountList = response.listaccountsresponse.account || []
}).catch(error => {
this.$notification.error({
Expand Down
1 change: 1 addition & 0 deletions 1 ui/src/views/iam/ConfigureSamlSsoAuth.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ export default {
userid: this.resource.id,
entityid: values.samlEntity
}).then(response => {
this.$emit('refresh-data')
this.$notification.success({
message: values.samlEnable ? this.$t('label.saml.enable') : this.$t('label.saml.disable'),
description: values.samlEnable ? `${this.$t('message.success.enable.saml.auth')} ${this.$t('label.for')} ${this.resource.username}`
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.