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
a1e48f5f
Commit
a1e48f5f
authored
Nov 11, 2016
by
Juorder Gonzalez
Committed by
GitHub
Nov 11, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #285 from ZBoxApp/manager_performance
create watcher for review if account is not remove yet
parents
891fe9ab
412da2f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
edit_mailbox.jsx
src/components/mailbox/edit_mailbox.jsx
+19
-0
No files found.
src/components/mailbox/edit_mailbox.jsx
View file @
a1e48f5f
...
@@ -38,6 +38,9 @@ export default class EditMailBox extends React.Component {
...
@@ -38,6 +38,9 @@ export default class EditMailBox extends React.Component {
this
.
handleRenameAccount
=
this
.
handleRenameAccount
.
bind
(
this
);
this
.
handleRenameAccount
=
this
.
handleRenameAccount
.
bind
(
this
);
this
.
addBlurListeneronInput
=
this
.
addBlurListeneronInput
.
bind
(
this
);
this
.
addBlurListeneronInput
=
this
.
addBlurListeneronInput
.
bind
(
this
);
this
.
getEnableAccountsFromDomain
=
this
.
getEnableAccountsFromDomain
.
bind
(
this
);
this
.
getEnableAccountsFromDomain
=
this
.
getEnableAccountsFromDomain
.
bind
(
this
);
this
.
watcherRemoveAccount
=
this
.
watcherRemoveAccount
.
bind
(
this
);
this
.
isRemove
=
false
;
this
.
cos
=
Utils
.
getEnabledPlansByCos
(
ZimbraStore
.
getAllCos
());
this
.
cos
=
Utils
.
getEnabledPlansByCos
(
ZimbraStore
.
getAllCos
());
this
.
editUrlFromParams
=
this
.
props
.
params
.
domain_id
?
`/domains/
${
this
.
props
.
params
.
domain_id
}
/mailboxes/`
:
'/mailboxes/'
;
this
.
editUrlFromParams
=
this
.
props
.
params
.
domain_id
?
`/domains/
${
this
.
props
.
params
.
domain_id
}
/mailboxes/`
:
'/mailboxes/'
;
...
@@ -217,6 +220,18 @@ export default class EditMailBox extends React.Component {
...
@@ -217,6 +220,18 @@ export default class EditMailBox extends React.Component {
},
options
);
},
options
);
}
}
watcherRemoveAccount
(
id
,
resolve
)
{
setTimeout
(()
=>
{
Client
.
getAccount
(
id
,
()
=>
{
if
(
!
this
.
isRemove
)
{
this
.
watcherRemoveAccount
(
id
,
resolve
);
}
},
()
=>
{
return
resolve
(
true
);
});
},
5000
);
}
removeAccount
()
{
removeAccount
()
{
const
account
=
this
.
state
.
data
;
const
account
=
this
.
state
.
data
;
const
response
=
{
const
response
=
{
...
@@ -240,16 +255,20 @@ export default class EditMailBox extends React.Component {
...
@@ -240,16 +255,20 @@ export default class EditMailBox extends React.Component {
new
Promise
((
resolve
,
reject
)
=>
{
new
Promise
((
resolve
,
reject
)
=>
{
// start loading
// start loading
GlobalActions
.
emitStartLoading
();
GlobalActions
.
emitStartLoading
();
this
.
isRemove
=
false
;
Client
.
removeAccount
(
Client
.
removeAccount
(
account
.
id
,
account
.
id
,
()
=>
{
()
=>
{
this
.
isRemove
=
true
;
return
resolve
(
true
);
return
resolve
(
true
);
},
},
(
error
)
=>
{
(
error
)
=>
{
this
.
isRemove
=
true
;
return
reject
(
error
);
return
reject
(
error
);
}
}
);
);
this
.
watcherRemoveAccount
(
account
.
id
,
resolve
);
}).
then
(()
=>
{
}).
then
(()
=>
{
if
(
this
.
isStoreEnabled
)
{
if
(
this
.
isStoreEnabled
)
{
MailboxStore
.
removeAccount
(
account
);
MailboxStore
.
removeAccount
(
account
);
...
...
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