Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible bugfix KNOWAGE-8543 #922

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
e1487f8
Bugfix KNOWAGE-8373
BojanSovticEngIT Jan 22, 2024
1897300
Reverted changes for KNOWAGE-8374
BojanSovticEngIT Jan 22, 2024
dce9031
Merge remote-tracking branch 'upstream/knowage-server-8.1' into dashb…
BojanSovticEngIT Jan 22, 2024
0e987b6
Bugfix KNOWAGE-8374
BojanSovticEngIT Jan 22, 2024
2374ccf
Merge remote-tracking branch 'upstream/knowage-server-8.1' into dashb…
BojanSovticEngIT Apr 19, 2024
fb50f34
Possible bugfix KNOWAGE-8460
BojanSovticEngIT Apr 19, 2024
b6a77de
Merge branch 'knowage-server-8.1' of https://github.com/KnowageLabs/K…
BojanSovticEngIT Jul 19, 2024
6b8cfa1
Possible bugfix KNOWAGE-8571
BojanSovticEngIT Jul 19, 2024
b5b9d74
Possible Bugfix KNOWAGE-8586
BojanSovticEngIT Jul 26, 2024
f3e682c
Merge branch 'knowage-server-8.1' into dashboard-sprint-15-bugfix-8.1
Redjaw Jul 26, 2024
449ffec
Bugfix KNOWAGE-8560
BojanSovticEngIT Jul 26, 2024
8f1ceb6
Possible bugfix KNOWAGE-8571
BojanSovticEngIT Aug 1, 2024
6df16c7
Merge branch 'knowage-server-8.1' into dashboard-sprint-15-bugfix-8.1
Redjaw Aug 1, 2024
d68687c
Bugfix KNOWAGE-8571
BojanSovticEngIT Aug 6, 2024
1c2f340
Merge branch 'dashboard-sprint-15-bugfix-8.1' of https://github.com/v…
BojanSovticEngIT Aug 6, 2024
5e73985
Merge branch 'knowage-server-8.1' into dashboard-sprint-15-bugfix-8.1
Redjaw Aug 6, 2024
07db227
Possible bugfix KNOWAGE-8543
BojanSovticEngIT Aug 6, 2024
8179c0c
Merge branch 'dashboard-sprint-15-bugfix-8.1' of https://github.com/v…
BojanSovticEngIT Aug 6, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ function checkIfMultivalueDriverContainsCrossNavigationValue(tempParam: any, cro
export function getValidDate(value: string, serverDateFormat: string) {
const extractedDateValue = extractDatePart(value)
let momentDate = moment(deepcopy(extractedDateValue))
const tempServerDateFormat = serverDateFormat.replaceAll('y', 'Y')
const tempServerDateFormat = convertToMomentFormat(serverDateFormat)
const validFormats = [tempServerDateFormat, 'DD/MM/YYYY', 'DD/MM/YYYY HH:mm:ss.SSS']
let tempDateFormatFromTheDateValue = extractDateFormatPart(value)
if (tempDateFormatFromTheDateValue) {
tempDateFormatFromTheDateValue = tempDateFormatFromTheDateValue === 'yyyy-MM-dd' ? 'YYYY-MM-DD' : tempDateFormatFromTheDateValue
tempDateFormatFromTheDateValue = convertToMomentFormat(tempDateFormatFromTheDateValue)
validFormats.unshift(tempDateFormatFromTheDateValue)
}
for (let i = 0; i < validFormats.length; i++) {
Expand All @@ -58,6 +58,10 @@ export function getValidDate(value: string, serverDateFormat: string) {
return ''
}

function convertToMomentFormat(format: string) {
return format.replace(/yyyy/g, 'YYYY').replace(/dd/g, 'DD').replace(/mm/g, 'MM')
}

function extractDatePart(dateString: string) {
if (dateString.includes('#')) {
return dateString.split('#')[0]
Expand Down
28 changes: 20 additions & 8 deletions knowage-vue/src/modules/documentExecution/olap/Olap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -543,10 +543,7 @@ export default defineComponent({
.post(process.env.VUE_APP_OLAP_PATH + `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.commit('setError', { title: this.$t('common.toast.error'), msg: this.$t('documentExecution.olap.filterToolbar.putFilterOnAxisError') }))
this.formatOlapTable()
Expand All @@ -556,7 +553,10 @@ export default defineComponent({
this.loading = true
await this.$http
.post(process.env.VUE_APP_OLAP_PATH + `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.commit('setError', { title: this.$t('common.toast.error'), msg: this.$t('documentExecution.olap.filterToolbar.swapAxisError') }))
this.formatOlapTable()
this.loading = false
Expand All @@ -568,6 +568,7 @@ export default defineComponent({
.post(process.env.VUE_APP_OLAP_PATH + `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.commit('setError', { title: this.$t('common.toast.error'), msg: this.$t('documentExecution.olap.filterToolbar.hierarchyMoveError') }))
this.formatOlapTable()
Expand All @@ -589,7 +590,10 @@ export default defineComponent({
this.loading = true
await this.$http
.post(process.env.VUE_APP_OLAP_PATH + `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.commit('setError', { title: this.$t('common.toast.error'), msg: this.$t('documentExecution.olap.filterToolbar.hierarchyUpdateError') }))
.finally(() => {
this.formatOlapTable()
Expand Down Expand Up @@ -618,7 +622,10 @@ export default defineComponent({
this.olap.modelConfig.crossNavigation.buttonClicked = crossNavigation
await this.$http
.get(process.env.VUE_APP_OLAP_PATH + `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 @@ -867,6 +874,7 @@ export default defineComponent({
await this.drillThrough(event)
break
}
if (this.olapDesigner && this.olapDesigner.template) this.updateOlapDesignerWithMDXFromOlap()
}
},
openFilterDialog(filter: any) {
Expand Down Expand Up @@ -1072,7 +1080,7 @@ export default defineComponent({
group = ''

// separators
parts_local.forEach(function(i) {
parts_local.forEach(function (i) {
switch (i.type) {
case 'group':
group = i.value
Expand Down Expand Up @@ -1138,6 +1146,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
Loading