Commit 891fe9ab authored by Juorder Gonzalez's avatar Juorder Gonzalez Committed by GitHub

Merge pull request #284 from ZBoxApp/manager_performance

enable all status for domain list to know what state means when users…
parents 2e16cbba 56cfdf1d
1468357419 1478881770
\ No newline at end of file \ No newline at end of file
module.exports = {"main":{"js":"/018497bundle.js"}} module.exports = {"main":{"js":"/209210bundle.js"}}
\ No newline at end of file \ No newline at end of file
...@@ -216,14 +216,26 @@ export default class Domains extends React.Component { ...@@ -216,14 +216,26 @@ export default class Domains extends React.Component {
status = 'Activo'; status = 'Activo';
statusClass += 'btn-info'; statusClass += 'btn-info';
break; break;
case 'inactive': case 'closed':
status = 'Inactivo'; status = 'Cerrado';
statusClass += 'btn-default'; statusClass += 'btn-primary';
break; break;
default: case 'locked':
status = 'Migrando'; status = 'Bloqueado';
statusClass += 'btn-danger';
break;
case 'suspended':
status = 'Suspendido';
statusClass += 'btn-primary';
break;
case 'maintenance':
status = 'En Mantención';
statusClass += 'btn-warning2'; statusClass += 'btn-warning2';
break; break;
default:
status = 'Desconocido';
statusClass += 'btn-danger';
break;
} }
let mailboxes; let mailboxes;
......
...@@ -76,8 +76,10 @@ function initZimbra() { ...@@ -76,8 +76,10 @@ function initZimbra() {
export function getClientConfig(success, error) { export function getClientConfig(success, error) {
return $.ajax({ return $.ajax({
url: 'https://manager-api.zboxapp.com/parse/functions/getConfigManager', url: 'https://manager-api.zboxapp.com/parse/functions/getConfigManager',
//url: './config/config.json',
dataType: 'json', dataType: 'json',
method: 'POST', method: 'POST',
//method: 'GET',
headers: { headers: {
'X-Parse-Application-Id': 'salesZboxManagerApp' 'X-Parse-Application-Id': 'salesZboxManagerApp'
}, },
...@@ -644,7 +646,10 @@ export function getAllCos(success, error) { ...@@ -644,7 +646,10 @@ export function getAllCos(success, error) {
if (UserStore.isGlobalAdmin()) { if (UserStore.isGlobalAdmin()) {
zimbra.getAllCos((err, data) => { zimbra.getAllCos((err, data) => {
if (err) { if (err) {
return error(handleError('getAllCos', err)); if (error && typeof error === 'function') {
error(handleError('getAllCos', err));
}
return;
} }
return success(data); return success(data);
}); });
...@@ -657,7 +662,10 @@ export function getAllCos(success, error) { ...@@ -657,7 +662,10 @@ export function getAllCos(success, error) {
zimbra.makeBatchRequest(batchRequests, (err, data) => { zimbra.makeBatchRequest(batchRequests, (err, data) => {
if (err) { if (err) {
return error(handleError('getCos', err)); if (error && typeof error === 'function') {
error(handleError('getCos', err));
}
return;
} }
const allCos = data.GetCosResponse.map((r) => { const allCos = data.GetCosResponse.map((r) => {
return r.cos[0]; return r.cos[0];
...@@ -667,7 +675,10 @@ export function getAllCos(success, error) { ...@@ -667,7 +675,10 @@ export function getAllCos(success, error) {
} }
}, },
(err) => { (err) => {
return error(handleError('getAllCos', err)); if (error && typeof error === 'function') {
error(handleError('getAllCos', err));
}
return;
} }
); );
} }
......
...@@ -40,7 +40,7 @@ var config = { ...@@ -40,7 +40,7 @@ var config = {
loaders: [ loaders: [
{ {
test: /\.jsx?$/, test: /\.jsx?$/,
loader: 'babel', loader: 'babel-loader',
exclude: /(node_modules)/, exclude: /(node_modules)/,
query: { query: {
presets: ['react', 'es2015', 'stage-0'], presets: ['react', 'es2015', 'stage-0'],
...@@ -88,12 +88,12 @@ var config = { ...@@ -88,12 +88,12 @@ var config = {
}), }),
htmlExtract, htmlExtract,
new webpack.LoaderOptionsPlugin({ new webpack.LoaderOptionsPlugin({
minimize: !DEV, minimize: true,
debug: false debug: false
}), }),
new webpack.optimize.UglifyJsPlugin({ /*new webpack.optimize.UglifyJsPlugin({
compress: { warnings: false } compress: { warnings: false }
}) })*/
], ],
resolve: { resolve: {
alias: { alias: {
...@@ -112,15 +112,15 @@ var config = { ...@@ -112,15 +112,15 @@ var config = {
// Development mode configuration // Development mode configuration
if (DEV) { if (DEV) {
if (FULLMAP) { if (FULLMAP) {
config.devtool = 'source-map'; //config.devtool = 'source-map';
} else { } else {
config.devtool = 'eval-cheap-module-source-map'; //config.devtool = 'eval-cheap-module-source-map';
} }
} }
// Production mode configuration // Production mode configuration
if (!DEV) { if (!DEV) {
config.devtool = 'source-map'; //config.devtool = 'source-map';
config.plugins.push( config.plugins.push(
new webpack.optimize.UglifyJsPlugin({ new webpack.optimize.UglifyJsPlugin({
'screw-ie8': true, 'screw-ie8': true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment