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
Hide 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,20 +83,35 @@ function (window, RSVP, Xmla, console) {
...
@@ -83,20 +83,35 @@ function (window, RSVP, Xmla, console) {
});
});
}
}
function
xmla_request_retry
(
func
,
prop
)
{
function
xmla_request_retry
(
func
,
settings
)
{
return
xmla_request
(
func
,
prop
)
var
queue
,
.
push
(
undefined
,
function
(
response
)
{
urls
=
settings
.
urls
,
// fix mondrian Internal and Sql errors
i
;
if
(
response
)
{
switch
(
response
[
"
code
"
])
{
function
make_request
(
url
)
{
case
"
SOAP-ENV:Server.00HSBE02
"
:
return
function
(
error
)
{
case
"
SOAP-ENV:00UE001.Internal Error
"
:
settings
.
prop
.
url
=
url
;
// rarely server error, so try again
return
xmla_request
(
func
,
settings
.
prop
)
return
xmla_request
(
func
,
prop
);
.
push
(
undefined
,
function
(
response
)
{
}
// fix mondrian Internal and Sql errors
}
if
(
response
)
{
throw
response
;
switch
(
response
[
"
code
"
])
{
});
case
"
SOAP-ENV:Server.00HSBE02
"
:
case
"
SOAP-ENV:00UE001.Internal Error
"
:
// rarely server error, so try again
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
)
{
function
discover_hierarchies
(
connection
)
{
...
@@ -109,7 +124,7 @@ function (window, RSVP, Xmla, console) {
...
@@ -109,7 +124,7 @@ function (window, RSVP, Xmla, console) {
// 'HIERARCHY_UNIQUE_NAME': hierarchy_name,
// 'HIERARCHY_UNIQUE_NAME': hierarchy_name,
'
CUBE_NAME
'
:
settings
[
"
cube
"
]
'
CUBE_NAME
'
:
settings
[
"
cube
"
]
};
};
return
xmla_request_retry
(
"
discoverMDHierarchies
"
,
prop
);
return
xmla_request_retry
(
"
discoverMDHierarchies
"
,
settings
);
})
})
.
push
(
function
(
response
)
{
.
push
(
function
(
response
)
{
var
hierarchies
=
{},
var
hierarchies
=
{},
...
@@ -168,9 +183,12 @@ function (window, RSVP, Xmla, console) {
...
@@ -168,9 +183,12 @@ function (window, RSVP, Xmla, console) {
throw
"
connection not exist
"
;
throw
"
connection not exist
"
;
}
}
c
=
value
[
connection
];
c
=
value
[
connection
];
if
(
!
c
.
hasOwnProperty
(
'
properties
'
))
{
c
.
properties
=
{};
}
return
{
return
{
urls
:
c
.
urls
,
prop
:
{
prop
:
{
url
:
c
.
url
,
properties
:
{
properties
:
{
DataSourceInfo
:
c
.
properties
.
DataSourceInfo
,
DataSourceInfo
:
c
.
properties
.
DataSourceInfo
,
Catalog
:
c
.
properties
.
Catalog
Catalog
:
c
.
properties
.
Catalog
...
@@ -332,7 +350,7 @@ function (window, RSVP, Xmla, console) {
...
@@ -332,7 +350,7 @@ function (window, RSVP, Xmla, console) {
}
}
prop
.
statement
=
"
SELECT
"
+
mdx
.
join
(
"
*
"
)
+
prop
.
statement
=
"
SELECT
"
+
mdx
.
join
(
"
*
"
)
+
"
ON 0 FROM [
"
+
settings
[
"
cube
"
]
+
"
]
"
;
"
ON 0 FROM [
"
+
settings
[
"
cube
"
]
+
"
]
"
;
return
xmla_request_retry
(
"
execute
"
,
prop
);
return
xmla_request_retry
(
"
execute
"
,
settings
);
})
})
.
push
(
function
(
dataset
)
{
.
push
(
function
(
dataset
)
{
var
cellset
=
dataset
.
getCellset
(),
var
cellset
=
dataset
.
getCellset
(),
...
@@ -420,7 +438,7 @@ function (window, RSVP, Xmla, console) {
...
@@ -420,7 +438,7 @@ function (window, RSVP, Xmla, console) {
if
(
cached_member
)
{
if
(
cached_member
)
{
return
[
cached_member
];
return
[
cached_member
];
}
else
{
}
else
{
return
xmla_request_retry
(
"
discoverMDMembers
"
,
prop
)
return
xmla_request_retry
(
"
discoverMDMembers
"
,
settings
)
.
push
(
function
(
r
)
{
.
push
(
function
(
r
)
{
var
ret
=
[],
var
ret
=
[],
uname
,
uname
,
...
...
bt5/erp5_only_office/SkinTemplateItem/portal_skins/erp5_only_office/onlyoffice/xmla_connection.json.json
View file @
bf12d291
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
"title"
:
"XMLA connection"
,
"title"
:
"XMLA connection"
,
"type"
:
"object"
,
"type"
:
"object"
,
"properties"
:
{
"properties"
:
{
"url"
:
{
"url
s
"
:
{
"uniqueItems"
:
true
,
"uniqueItems"
:
true
,
"items"
:
{
"items"
:
{
"format"
:
"uri"
,
"format"
:
"uri"
,
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
}
}
},
},
"required"
:
[
"required"
:
[
"url"
"url
s
"
],
],
"additionalProperties"
:
false
"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