Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zimbra-admin-api-js
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Public
zimbra-admin-api-js
Commits
bedfce6f
Commit
bedfce6f
authored
May 26, 2016
by
Patricio Bruna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Domain Cos Limit for Domain Admin
parent
c91a1da8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
6 deletions
+29
-6
.jshintrc
.jshintrc
+5
-0
path.json
path.json
+0
-1
client.jsx
src/utils/client.jsx
+24
-5
No files found.
.jshintrc
0 → 100644
View file @
bedfce6f
{
"esnext": true,
"node": true,
"predef": [ "describe", "it", "beforeEach", "afterEach" ]
}
path.json
deleted
100644 → 0
View file @
c91a1da8
module.exports
=
{
"main"
:{
"js"
:
"/228419bundle.js"
}}
\ No newline at end of file
src/utils/client.jsx
View file @
bedfce6f
...
...
@@ -8,6 +8,7 @@ import ZimbraAdminApi from 'zimbra-admin-api-js';
import
Powerdns
from
'js-powerdns'
;
import
ZimbraStore
from
'../stores/zimbra_store.jsx'
;
import
ResetStores
from
'../stores/reset_stores.jsx'
;
import
UserStore
from
'../stores/user_store.jsx'
;
import
*
as
GlobalActions
from
'../action_creators/global_actions.jsx'
;
import
*
as
Utils
from
'./utils.jsx'
;
...
...
@@ -588,16 +589,34 @@ export function batchRequest(requestArray, success, error) {
export
function
getAllCos
(
success
,
error
)
{
initZimbra
().
then
(
(
zimbra
)
=>
{
zimbra
.
getAllCos
((
err
,
data
)
=>
{
if
(
UserStore
.
isGlobalAdmin
())
{
zimbra
.
getAllCos
((
err
,
data
)
=>
{
if
(
err
)
{
const
e
=
handleError
(
'getAllCos'
,
err
);
if
(
error
)
{
return
error
(
e
);
}
}
return
success
(
data
);
});
}
else
{
const
batchRequests
=
[];
const
plans_names
=
Object
.
keys
(
window
.
manager_config
.
plans
);
plans_names
.
forEach
((
plan
)
=>
{
batchRequests
.
push
(
zimbra
.
getCos
(
plan
));
});
zimbra
.
makeBatchRequest
(
batchRequests
,
(
err
,
data
)
=>
{
if
(
err
)
{
const
e
=
handleError
(
'get
All
Cos'
,
err
);
const
e
=
handleError
(
'getCos'
,
err
);
if
(
error
)
{
return
error
(
e
);
}
}
return
success
(
data
);
}
);
return
success
(
data
.
GetCosResponse
.
map
((
r
)
=>
{
return
r
.
cos
[
0
];}));
}
);
}
},
(
err
)
=>
{
const
e
=
handleError
(
'getAllCos'
,
err
);
...
...
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