Skip to content

Commit

Permalink
Possible bugfix KNOWAGE-8543
Browse files Browse the repository at this point in the history
  • Loading branch information
BojanSovticEngIT committed Aug 6, 2024
1 parent b1ed0f0 commit 38053bf
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions src/modules/documentExecution/olap/Olap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -567,10 +567,7 @@ export default defineComponent({
.post(import.meta.env.VITE_KNOWAGEWHATIF_CONTEXT + `/restful-services/1.0/axis/moveDimensionToOtherAxis?SBI_EXECUTION_ID=${this.id}`, toSend, { headers: { Accept: 'application/json, text/plain, */*', 'Content-Type': 'application/json;charset=UTF-8' } })
.then((response: AxiosResponse<any>) => {
this.olap = response.data
if (this.olapDesigner && this.olapDesigner.template) {
this.olapDesigner.template.wrappedObject.olap.MDXMondrianQuery.XML_TAG_TEXT_CONTENT = this.olap.MDXWITHOUTCF
this.olapDesigner.template.wrappedObject.olap.MDXQUERY.XML_TAG_TEXT_CONTENT = this.olap.MDXWITHOUTCF
}
if (this.olapDesigner && this.olapDesigner.template) this.updateOlapDesignerWithMDXFromOlap()
})
.catch(() => this.store.setError({ title: this.$t('common.toast.error'), msg: this.$t('documentExecution.olap.filterToolbar.putFilterOnAxisError') }))
this.formatOlapTable()
Expand All @@ -580,7 +577,10 @@ export default defineComponent({
this.loading = true
await this.$http
.post(import.meta.env.VITE_KNOWAGEWHATIF_CONTEXT + `/restful-services/1.0/axis/swap?SBI_EXECUTION_ID=${this.id}`, null, { headers: { Accept: 'application/json, text/plain, */*', 'Content-Type': 'application/json;charset=UTF-8' } })
.then((response: AxiosResponse<any>) => (this.olap = response.data))
.then((response: AxiosResponse<any>) => {
this.olap = response.data
if (this.olapDesigner && this.olapDesigner.template) this.updateOlapDesignerWithMDXFromOlap()
})
.catch(() => this.store.setError({ title: this.$t('common.toast.error'), msg: this.$t('documentExecution.olap.filterToolbar.swapAxisError') }))
this.formatOlapTable()
this.loading = false
Expand All @@ -592,6 +592,7 @@ export default defineComponent({
.post(import.meta.env.VITE_KNOWAGEWHATIF_CONTEXT + `/restful-services/1.0/axis/moveHierarchy?SBI_EXECUTION_ID=${this.id}`, toSend, { headers: { Accept: 'application/json, text/plain, */*', 'Content-Type': 'application/json;charset=UTF-8' } })
.then((response: AxiosResponse<any>) => {
this.olap = response.data
if (this.olapDesigner && this.olapDesigner.template) this.updateOlapDesignerWithMDXFromOlap()
})
.catch(() => this.store.setError({ title: this.$t('common.toast.error'), msg: this.$t('documentExecution.olap.filterToolbar.hierarchyMoveError') }))
this.formatOlapTable()
Expand All @@ -613,7 +614,10 @@ export default defineComponent({
this.loading = true
await this.$http
.post(import.meta.env.VITE_KNOWAGEWHATIF_CONTEXT + `/restful-services/1.0/axis/updateHierarchyOnDimension?SBI_EXECUTION_ID=${this.id}`, toSend, { headers: { Accept: 'application/json, text/plain, */*', 'Content-Type': 'application/json;charset=UTF-8' } })
.then((response: AxiosResponse<any>) => (this.olap = response.data))
.then((response: AxiosResponse<any>) => {
this.olap = response.data
if (this.olapDesigner && this.olapDesigner.template) this.updateOlapDesignerWithMDXFromOlap()
})
.catch(() => this.store.setError({ title: this.$t('common.toast.error'), msg: this.$t('documentExecution.olap.filterToolbar.hierarchyUpdateError') }))
.finally(() => {
this.formatOlapTable()
Expand Down Expand Up @@ -642,7 +646,10 @@ export default defineComponent({
this.olap.modelConfig.crossNavigation.buttonClicked = crossNavigation
await this.$http
.get(import.meta.env.VITE_KNOWAGEWHATIF_CONTEXT + `/restful-services/1.0/crossnavigation/initialize/?SBI_EXECUTION_ID=${this.id}`, { headers: { Accept: 'application/json, text/plain, */*', 'Content-Type': 'application/json;charset=UTF-8' } })
.then((response: AxiosResponse<any>) => (this.olap = response.data))
.then((response: AxiosResponse<any>) => {
this.olap = response.data
if (this.olapDesigner && this.olapDesigner.template) this.updateOlapDesignerWithMDXFromOlap()
})
.catch(() => {})
this.formatOlapTable()
this.loading = false
Expand Down Expand Up @@ -892,6 +899,7 @@ export default defineComponent({
await this.drillThrough(event)
break
}
if (this.olapDesigner && this.olapDesigner.template) this.updateOlapDesignerWithMDXFromOlap()
}
},
openFilterDialog(filter: any) {
Expand Down Expand Up @@ -1164,6 +1172,10 @@ export default defineComponent({
this.formatOlapTable()
this.loadVersions()
this.saveVersionDialogVisible = false
},
updateOlapDesignerWithMDXFromOlap() {
this.olapDesigner.template.wrappedObject.olap.MDXMondrianQuery.XML_TAG_TEXT_CONTENT = this.olap.MDXWITHOUTCF
this.olapDesigner.template.wrappedObject.olap.MDXQUERY.XML_TAG_TEXT_CONTENT = this.olap.MDXWITHOUTCF
}
}
})
Expand Down

0 comments on commit 38053bf

Please sign in to comment.