Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
erp5
Commits
bf12d291
Commit
bf12d291
authored
Dec 17, 2018
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_only_office] use url array in cube functions for failover mirrors
parent
7e77a7e7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
20 deletions
+38
-20
bt5/erp5_only_office/SkinTemplateItem/portal_skins/erp5_only_office/onlyoffice/sdkjs/cell/model/FormulaObjects/cubeFunctions.xmla.js.js
.../sdkjs/cell/model/FormulaObjects/cubeFunctions.xmla.js.js
+36
-18
bt5/erp5_only_office/SkinTemplateItem/portal_skins/erp5_only_office/onlyoffice/xmla_connection.json.json
...ins/erp5_only_office/onlyoffice/xmla_connection.json.json
+2
-2
No files found.
bt5/erp5_only_office/SkinTemplateItem/portal_skins/erp5_only_office/onlyoffice/sdkjs/cell/model/FormulaObjects/cubeFunctions.xmla.js.js
View file @
bf12d291
...
...
@@ -83,8 +83,15 @@ function (window, RSVP, Xmla, console) {
});
}
function
xmla_request_retry
(
func
,
prop
)
{
return
xmla_request
(
func
,
prop
)
function
xmla_request_retry
(
func
,
settings
)
{
var
queue
,
urls
=
settings
.
urls
,
i
;
function
make_request
(
url
)
{
return
function
(
error
)
{
settings
.
prop
.
url
=
url
;
return
xmla_request
(
func
,
settings
.
prop
)
.
push
(
undefined
,
function
(
response
)
{
// fix mondrian Internal and Sql errors
if
(
response
)
{
...
...
@@ -92,11 +99,19 @@ function (window, RSVP, Xmla, console) {
case
"
SOAP-ENV:Server.00HSBE02
"
:
case
"
SOAP-ENV:00UE001.Internal Error
"
:
// rarely server error, so try again
return
xmla_request
(
func
,
prop
);
return
xmla_request
(
func
,
settings
.
prop
);
}
}
throw
response
;
});
};
}
queue
=
make_request
(
urls
[
0
])();
for
(
i
=
1
;
i
<
settings
.
urls
.
length
;
i
+=
1
)
{
queue
.
push
(
undefined
,
make_request
(
urls
[
i
]));
}
return
queue
;
}
function
discover_hierarchies
(
connection
)
{
...
...
@@ -109,7 +124,7 @@ function (window, RSVP, Xmla, console) {
// 'HIERARCHY_UNIQUE_NAME': hierarchy_name,
'
CUBE_NAME
'
:
settings
[
"
cube
"
]
};
return
xmla_request_retry
(
"
discoverMDHierarchies
"
,
prop
);
return
xmla_request_retry
(
"
discoverMDHierarchies
"
,
settings
);
})
.
push
(
function
(
response
)
{
var
hierarchies
=
{},
...
...
@@ -168,9 +183,12 @@ function (window, RSVP, Xmla, console) {
throw
"
connection not exist
"
;
}
c
=
value
[
connection
];
if
(
!
c
.
hasOwnProperty
(
'
properties
'
))
{
c
.
properties
=
{};
}
return
{
urls
:
c
.
urls
,
prop
:
{
url
:
c
.
url
,
properties
:
{
DataSourceInfo
:
c
.
properties
.
DataSourceInfo
,
Catalog
:
c
.
properties
.
Catalog
...
...
@@ -332,7 +350,7 @@ function (window, RSVP, Xmla, console) {
}
prop
.
statement
=
"
SELECT
"
+
mdx
.
join
(
"
*
"
)
+
"
ON 0 FROM [
"
+
settings
[
"
cube
"
]
+
"
]
"
;
return
xmla_request_retry
(
"
execute
"
,
prop
);
return
xmla_request_retry
(
"
execute
"
,
settings
);
})
.
push
(
function
(
dataset
)
{
var
cellset
=
dataset
.
getCellset
(),
...
...
@@ -420,7 +438,7 @@ function (window, RSVP, Xmla, console) {
if
(
cached_member
)
{
return
[
cached_member
];
}
else
{
return
xmla_request_retry
(
"
discoverMDMembers
"
,
prop
)
return
xmla_request_retry
(
"
discoverMDMembers
"
,
settings
)
.
push
(
function
(
r
)
{
var
ret
=
[],
uname
,
...
...
bt5/erp5_only_office/SkinTemplateItem/portal_skins/erp5_only_office/onlyoffice/xmla_connection.json.json
View file @
bf12d291
...
...
@@ -3,7 +3,7 @@
"title"
:
"XMLA connection"
,
"type"
:
"object"
,
"properties"
:
{
"url"
:
{
"url
s
"
:
{
"uniqueItems"
:
true
,
"items"
:
{
"format"
:
"uri"
,
...
...
@@ -31,7 +31,7 @@
}
},
"required"
:
[
"url"
"url
s
"
],
"additionalProperties"
:
false
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment