Skip to content

Commit

Permalink
Possible bugfix KNOWAGE-8240
Browse files Browse the repository at this point in the history
  • Loading branch information
BojanSovticEngIT committed Nov 8, 2023
1 parent ca2dc9d commit a3447c0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/modules/documentExecution/dashboard/DashboardController.vue
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ export default defineComponent({
this.loading = false
},
async loadModel() {
this.initialDataLoadedMap.dashboardModelLoaded = true
let tempModel = null as any
if (this.newDashboardMode) {
tempModel = createNewDashboardModel()
Expand All @@ -265,9 +266,9 @@ export default defineComponent({
this.store.setDashboard(this.dashboardId, this.model)
this.store.setSelections(this.dashboardId, this.model.configuration.selections, this.$http)
this.store.setDashboardDocument(this.dashboardId, this.document)
this.initialDataLoadedMap.dashboardModelLoaded = true
},
async loadInternationalization() {
this.initialDataLoadedMap.internationalizationLoaded = true
this.appStore.setLoading(true)
const result = (this.appStore.$state as any).user.locale.split('_')
await this.$http
Expand All @@ -279,46 +280,46 @@ export default defineComponent({
.catch(() => {})
this.appStore.setLoading(false)
this.initialDataLoadedMap.internationalizationLoaded = true
},
async loadCrossNavigations() {
if (this.newDashboardMode) return
this.initialDataLoadedMap.crossNavigationsLoaded = true
this.appStore.setLoading(true)
await this.$http
.get(import.meta.env.VITE_KNOWAGE_CONTEXT + `/restful-services/1.0/crossNavigation/${this.document?.label}/loadCrossNavigationByDocument`)
.then((response: AxiosResponse<any>) => (this.crossNavigations = response.data))
.catch(() => {})
this.appStore.setLoading(false)
this.store.setCrossNavigations(this.dashboardId, this.crossNavigations)
this.initialDataLoadedMap.crossNavigationsLoaded = true
},
async loadHtmlGallery() {
this.initialDataLoadedMap.htmlGalleryLoaded = true
await this.$http
.get(import.meta.env.VITE_KNOWAGE_API_CONTEXT + `/api/1.0/widgetgallery/widgets/html`)
.then((response: AxiosResponse<any>) => (this.htmlGallery = response.data))
.catch(() => {})
this.initialDataLoadedMap.htmlGalleryLoaded = true
},
async loadPythonGallery() {
this.initialDataLoadedMap.pythonGallerLoaded = true
await this.$http
.get(import.meta.env.VITE_KNOWAGE_API_CONTEXT + `/api/1.0/widgetgallery/widgets/python`)
.then((response: AxiosResponse<any>) => (this.pythonGallery = response.data))
.catch(() => {})
this.initialDataLoadedMap.pythonGallerLoaded = true
},
async loadCustomChartGallery() {
this.initialDataLoadedMap.customChartGalleryLoaded = true
await this.$http
.get(import.meta.env.VITE_KNOWAGE_API_CONTEXT + `/api/1.0/widgetgallery/widgets/chart`)
.then((response: AxiosResponse<any>) => (this.customChartGallery = response.data))
.catch(() => {})
this.initialDataLoadedMap.customChartGalleryLoaded = true
},
loadOutputParameters() {
if (this.newDashboardMode) return
const formattedOutputParameters = this.document ? getFormattedOutputParameters(this.document.outputParameters) : []
this.store.setOutputParameters(this.dashboardId, formattedOutputParameters)
},
loadProfileAttributes() {
this.initialDataLoadedMap.profileAttributesLoaded = true
this.profileAttributes = []
const user = this.appStore.getUser()
if (user && user.attributes) {
Expand All @@ -330,15 +331,14 @@ export default defineComponent({
)
}
this.setProfileAttributes(this.profileAttributes)
this.initialDataLoadedMap.profileAttributesLoaded = true
},
async loadDashboardThemes() {
this.initialDataLoadedMap.dashboardThemesLoaded = true
this.dashboardThemes = []
await this.$http.get(import.meta.env.VITE_KNOWAGE_CONTEXT + `/restful-services/1.0/dashboardtheme`).then((response: AxiosResponse<any>) => {
this.dashboardThemes = response.data
})
this.store.setAllThemes(this.dashboardThemes)
this.initialDataLoadedMap.dashboardThemesLoaded = true
},
loadSelectedViewForExecution(view: IDashboardView) {
this.selectedViewForExecution = view
Expand Down

0 comments on commit a3447c0

Please sign in to comment.