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
3061904d
Commit
3061904d
authored
Apr 11, 2016
by
Elias Nahum
Committed by
Juorder Antonio
May 25, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed filter mailboxes, fixed sum to domain, fixed mx, fixed mailbox limits
parent
d36467ce
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
131 additions
and
98 deletions
+131
-98
action_set_name
.vagrant/machines/default/virtualbox/action_set_name
+1
-1
path.json
path.json
+1
-1
companies.jsx
src/components/companies/companies.jsx
+23
-7
domain_general_info.jsx
src/components/domain/domain_general_info.jsx
+10
-12
domain_mailbox_plans.jsx
src/components/domain/domain_mailbox_plans.jsx
+4
-5
mailbox.jsx
src/components/mailbox/mailbox.jsx
+85
-68
stats_mailbox.jsx
src/components/mailbox/stats_mailbox.jsx
+1
-1
config.json
src/config/config.json
+6
-3
No files found.
.vagrant/machines/default/virtualbox/action_set_name
View file @
3061904d
1464106868
1464204428
\ No newline at end of file
\ No newline at end of file
path.json
View file @
3061904d
module.exports
=
{
"main"
:{
"js"
:
"/699779bundle.js"
}}
module.exports
=
{
"main"
:{
"js"
:
"/896467bundle.js"
}}
\ No newline at end of file
\ No newline at end of file
src/components/companies/companies.jsx
View file @
3061904d
...
@@ -35,7 +35,8 @@ export default class Companies extends React.Component {
...
@@ -35,7 +35,8 @@ export default class Companies extends React.Component {
this
.
state
=
{
this
.
state
=
{
page
,
page
,
offset
:
((
page
-
1
)
*
Constants
.
QueryOptions
.
DEFAULT_LIMIT
)
offset
:
((
page
-
1
)
*
Constants
.
QueryOptions
.
DEFAULT_LIMIT
),
loading
:
true
};
};
this
.
isGlobalAdmin
=
UserStore
.
isGlobalAdmin
();
this
.
isGlobalAdmin
=
UserStore
.
isGlobalAdmin
();
...
@@ -68,13 +69,15 @@ export default class Companies extends React.Component {
...
@@ -68,13 +69,15 @@ export default class Companies extends React.Component {
CompaniesStore
.
setCompanies
(
comps
);
CompaniesStore
.
setCompanies
(
comps
);
self
.
setState
({
self
.
setState
({
companies
:
comps
companies
:
comps
,
loading
:
false
});
});
}).
}).
catch
((
error
)
=>
{
catch
((
error
)
=>
{
self
.
setState
({
error
:
{
self
.
setState
({
error
:
{
message
:
error
,
message
:
error
,
type
:
messageTypes
.
ERROR
type
:
messageTypes
.
ERROR
,
loading
:
false
}});
}});
});
});
}).
catch
((
error
)
=>
{
}).
catch
((
error
)
=>
{
...
@@ -91,7 +94,8 @@ export default class Companies extends React.Component {
...
@@ -91,7 +94,8 @@ export default class Companies extends React.Component {
},
(
error
)
=>
{
},
(
error
)
=>
{
self
.
setState
({
error
:
{
self
.
setState
({
error
:
{
message
:
error
,
message
:
error
,
type
:
messageTypes
.
ERROR
type
:
messageTypes
.
ERROR
,
loading
:
false
}});
}});
});
});
}
else
{
}
else
{
...
@@ -103,13 +107,15 @@ export default class Companies extends React.Component {
...
@@ -103,13 +107,15 @@ export default class Companies extends React.Component {
},
(
error
)
=>
{
},
(
error
)
=>
{
self
.
setState
({
error
:
{
self
.
setState
({
error
:
{
message
:
error
,
message
:
error
,
type
:
messageTypes
.
ERROR
type
:
messageTypes
.
ERROR
,
loading
:
false
}});
}});
});
});
},
(
error
)
=>
{
},
(
error
)
=>
{
self
.
setState
({
self
.
setState
({
error
,
error
,
type
:
messageTypes
.
ERROR
type
:
messageTypes
.
ERROR
,
loading
:
false
});
});
});
});
}
}
...
@@ -194,6 +200,16 @@ export default class Companies extends React.Component {
...
@@ -194,6 +200,16 @@ export default class Companies extends React.Component {
let
panelBody
;
let
panelBody
;
let
noLimitError
;
let
noLimitError
;
let
pagination
=
null
;
let
pagination
=
null
;
const
textLoading
=
this
.
isGlobalAdmin
?
'Cargando Empresas...'
:
'Cargando Mi Empresa...'
;
if
(
this
.
state
.
loading
)
{
panelBody
=
(
<
div
className=
'text-center'
>
<
i
className=
'fa fa-spinner fa-spin fa-4x fa-fw'
></
i
>
<
p
>
{
textLoading
}
</
p
>
</
div
>
);
}
if
(
this
.
state
.
companies
.
length
===
0
)
{
if
(
this
.
state
.
companies
.
length
===
0
)
{
panelBody
=
(
panelBody
=
(
...
@@ -213,7 +229,7 @@ export default class Companies extends React.Component {
...
@@ -213,7 +229,7 @@ export default class Companies extends React.Component {
const
totalPages
=
Math
.
ceil
(
data
.
length
/
Constants
.
QueryOptions
.
DEFAULT_LIMIT
);
const
totalPages
=
Math
.
ceil
(
data
.
length
/
Constants
.
QueryOptions
.
DEFAULT_LIMIT
);
pagination
=
(
pagination
=
(
<
Pagination
<
Pagination
key=
'pa
nelPaginationCompanies
'
key=
'pa
ginationCompany
'
url=
'companies'
url=
'companies'
currentPage=
{
this
.
state
.
page
}
currentPage=
{
this
.
state
.
page
}
totalPages=
{
totalPages
}
totalPages=
{
totalPages
}
...
...
src/components/domain/domain_general_info.jsx
View file @
3061904d
...
@@ -29,25 +29,23 @@ export default class DomainGeneralInfo extends React.Component {
...
@@ -29,25 +29,23 @@ export default class DomainGeneralInfo extends React.Component {
}
}
componentWillMount
()
{
componentWillMount
()
{
const
domain
=
this
.
props
.
domain
;
const
domain
=
this
.
props
.
domain
;
this
.
getMXRecord
(
domain
.
name
);
this
.
getMXRecord
(
domain
);
this
.
getCompany
(
domain
.
attrs
.
businessCategory
);
this
.
getCompany
(
domain
.
attrs
.
businessCategory
);
}
}
getMXRecord
(
name
)
{
getMXRecord
(
domain
)
{
const
self
=
this
;
const
self
=
this
;
Client
.
getDnsInfo
(
domain
.
checkMxRecord
((
err
,
data
)
=>
{
name
,
if
(
err
)
{
(
data
)
=>
{
return
self
.
setState
({
self
.
setState
({
mx
:
data
.
mx
});
},
(
err
)
=>
{
self
.
setState
({
mx
:
err
mx
:
err
});
});
}
}
);
return
self
.
setState
({
mx
:
data
.
entry
});
});
}
}
getCompany
(
id
)
{
getCompany
(
id
)
{
const
company
=
CompanyStore
.
getCompanyById
(
id
);
const
company
=
CompanyStore
.
getCompanyById
(
id
);
...
...
src/components/domain/domain_mailbox_plans.jsx
View file @
3061904d
...
@@ -30,13 +30,13 @@ export default class DomainMailboxPlans extends React.Component {
...
@@ -30,13 +30,13 @@ export default class DomainMailboxPlans extends React.Component {
plans
plans
});
});
}
}
return
this
.
props
.
domain
.
countAccounts
(
return
this
.
props
.
domain
.
countAccounts
(
(
err
,
data
)
=>
{
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
return
this
.
setState
({
plans
:
{}});
return
this
.
setState
({
plans
:
{}});
}
}
this
.
props
.
domain
.
plans
=
data
;
return
this
.
setState
({
plans
:
data
});
return
this
.
setState
({
plans
:
data
});
}
}
);
);
...
@@ -94,12 +94,12 @@ export default class DomainMailboxPlans extends React.Component {
...
@@ -94,12 +94,12 @@ export default class DomainMailboxPlans extends React.Component {
});
});
}
}
for
(
const
key
in
plans
)
{
for
(
const
key
in
this
.
state
.
plans
)
{
if
(
plans
.
hasOwnProperty
(
key
))
{
if
(
plans
.
hasOwnProperty
(
key
))
{
const
plan
=
plans
[
key
];
const
plan
=
plans
[
key
];
totalUsed
+=
plan
.
used
;
totalUsed
+=
(
parseInt
(
plan
.
used
,
10
))
?
parseInt
(
plan
.
used
,
10
)
:
0
;
if
(
plan
.
limit
===
0
)
{
if
(
plan
.
limit
===
0
)
{
totalLimit
=
'
\
u221e'
;
//
totalLimit = '\u221e';
if
(
!
noLimitError
)
{
if
(
!
noLimitError
)
{
noLimitError
=
(
noLimitError
=
(
...
@@ -111,7 +111,6 @@ export default class DomainMailboxPlans extends React.Component {
...
@@ -111,7 +111,6 @@ export default class DomainMailboxPlans extends React.Component {
);
);
}
}
}
else
{
}
else
{
console
.
log
(
totalLimit
);
//eslint-disable-line no-console
totalLimit
+=
plan
.
limit
;
totalLimit
+=
plan
.
limit
;
}
}
...
...
src/components/mailbox/mailbox.jsx
View file @
3061904d
This diff is collapsed.
Click to expand it.
src/components/mailbox/stats_mailbox.jsx
View file @
3061904d
...
@@ -107,7 +107,7 @@ export default class BlockGeneralInfoMailbox extends React.Component {
...
@@ -107,7 +107,7 @@ export default class BlockGeneralInfoMailbox extends React.Component {
<
div
className=
'col-xs-6'
>
<
div
className=
'col-xs-6'
>
{
sizeEnaled
&&
(
{
sizeEnaled
&&
(
<
p
>
<
p
>
<
span
className=
'center-block'
>
Espacio
Disponible
</
span
>
<
span
className=
'center-block'
>
Espacio
Total
</
span
>
<
strong
>
{
sizeEnaled
}
</
strong
>
<
strong
>
{
sizeEnaled
}
</
strong
>
</
p
>
</
p
>
)
}
)
}
...
...
src/config/config.json
View file @
3061904d
...
@@ -12,13 +12,16 @@
...
@@ -12,13 +12,16 @@
"autoincrementOnFailRequestZimbra"
:
500
,
"autoincrementOnFailRequestZimbra"
:
500
,
"plans"
:
{
"plans"
:
{
"basic"
:
{
"basic"
:
{
"statusCos"
:
"btn-success"
"statusCos"
:
"btn-success"
,
"label"
:
"Básica"
},
},
"premium"
:
{
"premium"
:
{
"statusCos"
:
"btn-primary2"
"statusCos"
:
"btn-primary2"
,
"label"
:
"Premium"
},
},
"professional"
:
{
"professional"
:
{
"statusCos"
:
"btn-primary"
"statusCos"
:
"btn-primary"
,
"label"
:
"Profesional"
},
},
"default"
:
false
"default"
:
false
},
},
...
...
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