Skip to content

Commit

Permalink
ui fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sureshanaparti committed Nov 5, 2024
1 parent cee2af6 commit 89c335f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 4 additions & 0 deletions ui/src/store/modules/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import {
DOMAIN_STORE,
DARK_MODE,
CUSTOM_COLUMNS,
MS_ID,
OAUTH_DOMAIN,
OAUTH_PROVIDER,
LATEST_CS_VERSION
Expand Down Expand Up @@ -151,6 +152,7 @@ const user = {
},
SET_MS_ID: (state, msId) => {
state.msId = msId
vueProps.$localStorage.set(MS_ID, msId)
},
SET_MAINTENANCE_INITIATED: (state, maintenanceInitiated) => {
state.maintenanceInitiated = maintenanceInitiated
Expand Down Expand Up @@ -311,6 +313,7 @@ const user = {
const domainStore = vueProps.$localStorage.get(DOMAIN_STORE, {})
const cachedShowSecurityGroups = vueProps.$localStorage.get(SHOW_SECURTIY_GROUPS, false)
const darkMode = vueProps.$localStorage.get(DARK_MODE, false)
const msId = vueProps.$localStorage.get(MS_ID, false)
const latestVersion = vueProps.$localStorage.get(LATEST_CS_VERSION, { version: '', fetchedTs: 0 })
const hasAuth = Object.keys(cachedApis).length > 0

Expand All @@ -325,6 +328,7 @@ const user = {
commit('SET_TIMEZONE_OFFSET', cachedTimezoneOffset)
commit('SET_USE_BROWSER_TIMEZONE', cachedUseBrowserTimezone)
commit('SET_CUSTOM_COLUMNS', cachedCustomColumns)
commit('SET_MS_ID', msId)

// Ensuring we get the user info so that store.getters.user is never empty when the page is freshly loaded
api('listUsers', { username: Cookies.get('username'), listall: true }).then(response => {
Expand Down
1 change: 1 addition & 0 deletions ui/src/store/mutation-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const LATEST_CS_VERSION = 'LATEST_CS_VERSION'
export const VUE_VERSION = 'VUE_VERSION'
export const CUSTOM_COLUMNS = 'CUSTOM_COLUMNS'
export const RELOAD_ALL_PROJECTS = 'RELOAD_ALL_PROJECTS'
export const MS_ID = 'MS_ID'
export const OAUTH_DOMAIN = 'OAUTH_DOMAIN'
export const OAUTH_PROVIDER = 'OAUTH_PROVIDER'

Expand Down
12 changes: 7 additions & 5 deletions ui/src/views/infra/Confirmation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
:rules="rules"
@finish="handleSubmit"
>
<a-alert type="error">
<template #message>
<span v-html="$t(action.currentAction.message)" />
</template>
</a-alert>
<a-form-item
ref="algorithm"
name="algorithm"
Expand All @@ -37,6 +32,7 @@
<tooltip-label :title="$t('label.algorithm')" :tooltip="prepareForMaintenanceApiParams.algorithm.description"/>
</template>
<a-select
style="width: 500px"
showSearch
optionFilterProp="value"
:filterOption="(input, option) => {
Expand All @@ -49,6 +45,12 @@
</a-select-option>
</a-select>
</a-form-item>
<a-divider/>
<a-alert type="error">
<template #message>
<span v-html="$t(action.currentAction.message)" />
</template>
</a-alert>
<a-alert type="warning" style="margin-top: 10px">
<template #message>
<span>{{ $t('message.confirm.type') }} "{{ action.currentAction.confirmationText }}"</span>
Expand Down

0 comments on commit 89c335f

Please sign in to comment.