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
8b6f65ae
Commit
8b6f65ae
authored
Jul 15, 2016
by
Juorder Gonzalez
Committed by
Juorder Antonio
Jul 18, 2016
Browse files
Options
Browse Files
Download
Plain Diff
add custom error page for manager
parents
0e4bc133
ec69a7bc
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
471 additions
and
124 deletions
+471
-124
path.json
path.json
+1
-1
404.jsx
src/components/404/404.jsx
+251
-28
domain_mailbox_plans.jsx
src/components/domain/domain_mailbox_plans.jsx
+109
-93
config.json
src/config/config.json
+31
-1
index.jsx
src/index.jsx
+3
-1
_various.scss
src/sass/components/_various.scss
+57
-0
client.jsx
src/utils/client.jsx
+19
-0
No files found.
path.json
View file @
8b6f65ae
module.exports
=
{
"main"
:{
"js"
:
"/584076bundle.js"
}}
module.exports
=
{
"main"
:{
"js"
:
"/975145bundle.js"
}}
\ No newline at end of file
\ No newline at end of file
src/components/404/404.jsx
View file @
8b6f65ae
...
@@ -2,39 +2,262 @@ import React from 'react';
...
@@ -2,39 +2,262 @@ import React from 'react';
import
*
as
Utils
from
'../../utils/utils.jsx'
;
import
*
as
Utils
from
'../../utils/utils.jsx'
;
let
canvas
=
null
;
let
ctx
=
null
;
let
gradient
=
null
;
let
isPressed
=
[];
let
ship
=
null
;
let
clouds
=
[];
let
keys
=
{
LEFT
:
37
,
UP
:
38
,
RIGHT
:
39
,
DOWN
:
40
,
SPACE
:
32
};
export
default
class
NotFound404
extends
React
.
Component
{
export
default
class
NotFound404
extends
React
.
Component
{
render
()
{
constructor
(
props
)
{
const
clouds
=
[];
super
(
props
);
const
totalClouds
=
Utils
.
randomRange
(
30
,
20
);
const
screenHeight
=
window
.
innerHeight
;
this
.
goBack
=
this
.
goBack
.
bind
(
this
);
const
screenWidth
=
window
.
innerWidth
;
}
for
(
let
i
=
0
;
i
<
totalClouds
;
i
++
)
{
goBack
(
e
,
path
)
{
const
topStyle
=
Utils
.
randomRange
(
screenHeight
,
80
);
const
pathName
=
path
||
'/'
;
const
sizeCloud
=
Utils
.
randomRange
(
1
,
5
);
Utils
.
handleLink
(
e
,
pathName
);
const
leftStyle
=
Utils
.
randomRange
(
screenWidth
+
300
,
screenWidth
);
}
//const scale = Utils.randomRange(1, 0.1);
componentDidMount
()
{
clouds
.
push
(
init
();
(
}
<
i
key=
{
`cloud-${i}`
}
style=
{
{
top
:
topStyle
+
'px'
,
left
:
leftStyle
+
'px'
}
}
className=
{
`fa fa-cloud fa-${sizeCloud}x`
}
></
i
>
)
);
}
render
()
{
const
{
title
}
=
this
.
props
.
location
.
query
;
const
{
message
}
=
this
.
props
.
location
.
query
;
const
{
linkMessage
}
=
this
.
props
.
location
.
query
;
let
{
link
}
=
this
.
props
.
location
.
query
;
return
(
return
(
<
div
className=
'wrapper-error'
>
<
div
className=
'container-error'
>
<
div
className=
'zboxPlain'
>
<
div
className=
'dialog-notify'
>
<
i
className=
'fa fa-paper-plane'
></
i
>
<
h2
>
404
</
h2
>
<
i
className=
'fa fa-paper-plane-o underPlain'
></
i
>
<
span
className=
'page-not-found'
>
{
title
||
'Página no encontrada'
}
</
span
>
<
span
className=
'error-message'
>
{
message
}
</
span
>
<
a
className=
'back-link-error pointer'
onClick=
{
(
e
)
=>
{
this
.
goBack
(
e
,
link
);
}
}
>
{
linkMessage
||
'Regresar a Manager'
}
</
a
>
</
div
>
</
div
>
<
canvas
id=
'canvas'
></
canvas
>
{
clouds
}
</
div
>
</
div
>
);
);
}
}
}
}
NotFound404
.
propTypes
=
{
location
:
React
.
PropTypes
.
object
};
class
ZBoxShip
{
constructor
(
x
,
y
,
size
)
{
this
.
x
=
x
||
(
window
.
innerWidth
/
2
);
this
.
y
=
y
||
(
window
.
innerHeight
/
2
);
this
.
w
=
10
;
this
.
h
=
this
.
w
;
this
.
color
=
'#E2E2E2'
;
this
.
icon
=
'
\
uf1d8'
;
this
.
speed
=
5
;
this
.
size
=
size
||
50
;
this
.
frames
=
0
;
this
.
_jump
=
4.6
;
this
.
velocity
=
0
;
}
render
(
ctx
)
{
this
.
gravity
=
0.25
;
if
(
!
ctx
)
{
return
null
;
}
ctx
.
save
();
ctx
.
font
=
this
.
size
+
'px Fontawesome'
;
var
sizeOfShip
=
ctx
.
measureText
(
this
.
icon
);
this
.
w
=
this
.
h
=
sizeOfShip
.
width
;
ctx
.
translate
(
this
.
x
+
this
.
w
/
2
,
this
.
y
+
this
.
h
/
2
);
ctx
.
rotate
(
45
*
Math
.
PI
/
180
);
ctx
.
translate
(
-
this
.
x
-
(
this
.
w
/
2
),
-
this
.
y
+
(
this
.
h
/
2
));
ctx
.
fillStyle
=
'#A8A8A8'
;
ctx
.
fillText
(
'
\
uf1d9'
,
this
.
x
,
this
.
y
);
ctx
.
fillStyle
=
this
.
color
;
ctx
.
fillText
(
this
.
icon
,
this
.
x
,
this
.
y
);
ctx
.
restore
();
this
.
frames
++
;
}
setPosition
(
x
,
y
)
{
this
.
x
+=
x
||
0
;
this
.
y
+=
y
||
0
;
}
moveWave
()
{
const
cos
=
Math
.
cos
(
this
.
y
/
100
)
*
10
;
this
.
y
+=
cos
;
}
jump
()
{
this
.
velocity
=
-
this
.
_jump
;
}
applyGravity
()
{
this
.
velocity
+=
this
.
gravity
;
this
.
y
+=
this
.
velocity
;
}
}
class
Cloud
{
constructor
(
x
,
y
,
opacity
,
size
)
{
this
.
x
=
x
||
0
;
this
.
y
=
y
||
0
;
this
.
opacity
=
opacity
||
1
;
this
.
color
=
'rgba(255, 255, 255, '
+
this
.
opacity
+
')'
;
this
.
w
=
40
;
this
.
icon
=
'
\
uf0c2'
;
this
.
size
=
size
||
10
;
this
.
speed
=
{
x
:
-
0.9
,
y
:
0
};
}
render
(
ctx
)
{
ctx
.
save
();
ctx
.
fillStyle
=
this
.
color
;
ctx
.
font
=
this
.
size
+
'px Fontawesome'
;
var
sizeOfText
=
ctx
.
measureText
(
this
.
icon
);
this
.
w
=
sizeOfText
.
width
;
ctx
.
fillText
(
this
.
icon
,
this
.
x
,
this
.
y
);
ctx
.
restore
();
}
move
()
{
this
.
x
+=
this
.
speed
.
x
;
this
.
y
+=
this
.
speed
.
y
;
}
recycleClouds
()
{
if
((
this
.
x
+
this
.
w
)
<
0
)
{
var
posX
=
randomize
(
canvas
.
width
+
250
,
canvas
.
width
);
this
.
x
=
posX
;
}
}
setSpeed
(
speed
)
{
this
.
speed
.
x
=
speed
.
x
||
this
.
speed
.
x
;
this
.
speed
.
y
=
speed
.
y
||
this
.
speed
.
y
;
}
}
function
init
()
{
canvas
=
document
.
getElementById
(
'canvas'
);
canvas
.
width
=
window
.
innerWidth
;
canvas
.
height
=
window
.
innerHeight
;
ctx
=
canvas
.
getContext
(
'2d'
);
gradient
=
ctx
.
createLinearGradient
(
0
,
0
,
0
,
canvas
.
width
);
gradient
.
addColorStop
(
0
,
'#90dffe'
);
gradient
.
addColorStop
(
0.5
,
'#fff'
);
gradient
.
addColorStop
(
1
,
'#fff'
);
ship
=
new
ZBoxShip
(
null
,
null
,
55
);
initClouds
();
gameloop
();
listeners
();
}
function
listeners
()
{
document
.
addEventListener
(
'keydown'
,
(
e
)
=>
{
var
key
=
e
.
keyCode
||
e
.
which
;
isPressed
[
key
]
=
true
;
},
false
);
document
.
addEventListener
(
'keyup'
,
(
e
)
=>
{
var
key
=
e
.
keyCode
||
e
.
which
;
isPressed
[
key
]
=
false
;
},
false
);
}
function
gameloop
()
{
requestAnimationFrame
(
gameloop
);
renderer
();
actions
();
}
function
renderer
()
{
ctx
.
clearRect
(
0
,
0
,
canvas
.
width
,
canvas
.
height
);
ctx
.
fillStyle
=
gradient
;
ctx
.
fillRect
(
0
,
0
,
canvas
.
width
,
canvas
.
height
);
clouds
.
forEach
((
cloud
)
=>
{
cloud
.
render
(
ctx
);
});
ship
.
render
(
ctx
);
}
function
actions
()
{
if
(
isPressed
[
keys
.
LEFT
])
{
ship
.
setPosition
(
-
ship
.
speed
);
}
if
(
isPressed
[
keys
.
UP
])
{
ship
.
setPosition
(
null
,
-
ship
.
speed
);
}
if
(
isPressed
[
keys
.
RIGHT
])
{
ship
.
setPosition
(
ship
.
speed
);
}
if
(
isPressed
[
keys
.
DOWN
])
{
ship
.
setPosition
(
null
,
ship
.
speed
);
}
if
(
isPressed
[
keys
.
SPACE
])
{
ship
.
jump
();
}
clouds
.
forEach
((
cloud
)
=>
{
cloud
.
move
();
cloud
.
recycleClouds
();
});
}
function
initClouds
()
{
for
(
var
i
=
0
;
i
<
40
;
i
++
)
{
var
posX
=
randomize
(
canvas
.
width
,
canvas
.
width
/
2
);
var
posY
=
randomize
(
canvas
.
height
,
0
);
var
opacity
=
randomize
(
1
,
0.4
,
true
);
var
speedX
=
randomize
(
1.1
,
0.5
,
true
);
var
size
=
randomize
(
100
,
45
);
var
zboxCloud
=
new
Cloud
(
posX
,
posY
,
opacity
,
size
);
zboxCloud
.
setSpeed
({
x
:
-
speedX
});
clouds
.
push
(
zboxCloud
);
}
}
function
randomize
(
max
,
min
,
isFloat
)
{
var
random
=
Math
.
random
()
*
(
max
-
min
)
+
min
;
if
(
!
isFloat
)
{
random
=
Math
.
floor
(
random
);
}
return
random
;
}
window
.
requestAnimationFrame
=
(
function
requestAnimationFrame
()
{
return
window
.
requestAnimationFrame
||
window
.
webkitRequestAnimationFrame
||
window
.
mozRequestAnimationFrame
||
function
fallback
(
callback
)
{
window
.
setTimeout
(
callback
,
1000
/
60
);
};
}());
src/components/domain/domain_mailbox_plans.jsx
View file @
8b6f65ae
...
@@ -42,6 +42,7 @@ export default class DomainMailboxPlans extends React.Component {
...
@@ -42,6 +42,7 @@ export default class DomainMailboxPlans extends React.Component {
);
);
}
}
render
()
{
render
()
{
const
countAccounts
=
this
.
state
.
plans
;
if
(
!
this
.
state
.
plans
)
{
if
(
!
this
.
state
.
plans
)
{
return
<
div
/>;
return
<
div
/>;
}
}
...
@@ -72,127 +73,142 @@ export default class DomainMailboxPlans extends React.Component {
...
@@ -72,127 +73,142 @@ export default class DomainMailboxPlans extends React.Component {
const
mailboxPlans
=
[];
const
mailboxPlans
=
[];
let
panelBody
=
null
;
let
panelBody
=
null
;
const
cos
=
Utils
.
getEnabledPlansByCosId
(
ZimbraStore
.
getAllCos
());
const
planKeys
=
Object
.
keys
(
cos
).
map
((
c
)
=>
{
return
cos
[
c
];
});
const
domain
=
this
.
props
.
domain
;
const
domainCos
=
domain
.
maxAccountsByCos
();
const
domainPlans
=
Utils
.
getPlansFromDomain
(
domain
);
const
plans
=
{};
let
noLimitError
;
let
noLimitError
;
let
totalUsed
=
0
;
const
isNotMigrating
=
!
countAccounts
.
migracion
;
let
totalLimit
=
0
;
if
(
isNotMigrating
)
{
planKeys
.
forEach
((
key
)
=>
{
const
cos
=
Utils
.
getEnabledPlansByCosId
(
ZimbraStore
.
getAllCos
());
plans
[
key
]
=
{
const
planKeys
=
Object
.
keys
(
cos
).
map
((
c
)
=>
{
limit
:
0
,
return
cos
[
c
];
used
:
0
};
});
let
used
=
0
;
if
(
domainCos
)
{
Object
.
keys
(
domainCos
).
forEach
((
id
)
=>
{
const
limit
=
domainCos
[
id
];
used
=
domainPlans
[
cos
[
id
]].
used
;
plans
[
cos
[
id
]].
limit
+=
limit
;
plans
[
cos
[
id
]].
used
+=
used
;
});
});
}
for
(
const
key
in
plans
)
{
const
domain
=
this
.
props
.
domain
;
if
(
plans
.
hasOwnProperty
(
key
)
&&
plans
[
key
].
limit
!==
0
)
{
const
domainCos
=
domain
.
maxAccountsByCos
();
const
plan
=
plans
[
key
];
const
domainPlans
=
Utils
.
getPlansFromDomain
(
domain
);
totalUsed
+=
(
parseInt
(
plan
.
used
,
10
))
?
parseInt
(
plan
.
used
,
10
)
:
0
;
const
plans
=
{};
if
(
plan
.
limit
===
0
)
{
let
totalUsed
=
0
;
//totalLimit = '\u221e';
let
totalLimit
=
0
;
if
(
!
noLimitError
)
{
planKeys
.
forEach
((
key
)
=>
{
noLimitError
=
(
plans
[
key
]
=
{
<
MessageBar
limit
:
0
,
message=
'Existen dominios sin límites asignados'
used
:
0
type=
'WARNING'
};
autoclose=
{
true
}
});
/>
);
let
used
=
0
;
if
(
domainCos
)
{
Object
.
keys
(
domainCos
).
forEach
((
id
)
=>
{
const
limit
=
domainCos
[
id
];
used
=
domainPlans
[
cos
[
id
]].
used
;
plans
[
cos
[
id
]].
limit
+=
limit
;
plans
[
cos
[
id
]].
used
+=
used
;
});
}
for
(
const
key
in
plans
)
{
if
(
plans
.
hasOwnProperty
(
key
)
&&
plans
[
key
].
limit
!==
0
)
{
const
plan
=
plans
[
key
];
totalUsed
+=
(
parseInt
(
plan
.
used
,
10
))
?
parseInt
(
plan
.
used
,
10
)
:
0
;
if
(
plan
.
limit
===
0
)
{
//totalLimit = '\u221e';
if
(
!
noLimitError
)
{
noLimitError
=
(
<
MessageBar
message=
'Existen dominios sin límites asignados'
type=
'WARNING'
autoclose=
{
true
}
/>
);
}
}
else
{
totalLimit
+=
plan
.
limit
;
}
}
}
else
{
totalLimit
+=
plan
.
limit
;
mailboxPlans
.
push
(
<
tr
key=
{
`plan-${key}`
}
>
<
td
className=
'mbx-plan'
style=
{
{
borderTop
:
0
}
}
>
{
key
}
</
td
>
<
td
className=
'text-center'
style=
{
{
borderTop
:
0
}
}
>
{
plan
.
limit
||
'
\
u221e'
}
</
td
>
<
td
className=
'text-center'
style=
{
{
borderTop
:
0
}
}
>
{
plan
.
used
}
</
td
>
</
tr
>
);
}
}
}
if
(
mailboxPlans
.
length
>
0
)
{
mailboxPlans
.
push
(
mailboxPlans
.
push
(
<
tr
key=
{
`plan-${key}`
}
>
<
tr
key=
'totalizacion-planes'
>
<
td
className=
'mbx-plan'
<
td
className=
'mbx-plan'
style=
{
{
borderTop
:
0
}
}
style=
{
{
borderTop
:
0
}
}
>
>
{
key
}
<
strong
>
{
'Total'
}
</
strong
>
</
td
>
</
td
>
<
td
<
td
className=
'text-center'
className=
'text-center'
style=
{
{
borderTop
:
0
}
}
style=
{
{
borderTop
:
0
}
}
>
>
{
plan
.
limit
||
'
\
u221e'
}
<
strong
>
{
totalLimit
}
</
strong
>
</
td
>
</
td
>
<
td
<
td
className=
'text-center'
className=
'text-center'
style=
{
{
borderTop
:
0
}
}
style=
{
{
borderTop
:
0
}
}
>
>
{
plan
.
used
}
<
strong
>
{
totalUsed
}
</
strong
>
</
td
>
</
td
>
</
tr
>
</
tr
>
);
);
}
}
if
(
mailboxPlans
.
length
>
0
)
{
panelBody
=
(
mailboxPlans
.
push
(
<
table
<
tr
key=
'totalizacion-planes'
>
id=
'domain-mbxs'
<
td
className=
'mbx-plan'
cellPadding=
'1'
style=
{
{
borderTop
:
0
}
}
cellSpacing=
'1'
className=
'table'
style=
{
{
marginBottom
:
'0px'
}
}
>
>
<
strong
>
{
'Total'
}
</
strong
>
<
thead
>
</
td
>
<
tr
>
<
td
<
th
style=
{
{
width
:
'50%'
}
}
></
th
>
className=
'text-center'
<
th
className=
'text-center'
>
{
'Límite'
}
</
th
>
style=
{
{
borderTop
:
0
}
}
<
th
className=
'text-center'
>
{
'Usadas'
}
</
th
>
>
</
tr
>
<
strong
>
{
totalLimit
}
</
strong
>
</
thead
>
</
td
>
<
tbody
>
<
td
{
mailboxPlans
}
className=
'text-center'
</
tbody
>
style=
{
{
borderTop
:
0
}
}
</
table
>
>
);
<
strong
>
{
totalUsed
}
</
strong
>
}
else
{
</
td
>
panelBody
=
(
</
tr
>
<
div
className=
'text-center'
>
);
<
h4
className=
'text-danger'
>
{
'No se han asignado límites de casillas.'
}
</
h4
>
</
div
>
panelBody
=
(
);
<
table
}
id=
'domain-mbxs'
cellPadding=
'1'
cellSpacing=
'1'
className=
'table'
style=
{
{
marginBottom
:
'0px'
}
}
>
<
thead
>
<
tr
>
<
th
style=
{
{
width
:
'50%'
}
}
></
th
>
<
th
className=
'text-center'
>
{
'Límite'
}
</
th
>
<
th
className=
'text-center'
>
{
'Usadas'
}
</
th
>
</
tr
>
</
thead
>
<
tbody
>
{
mailboxPlans
}
</
tbody
>
</
table
>
);
}
else
{
}
else
{
panelBody
=
(
panelBody
=
(
<
div
className=
'text-center'
>
<
div
className=
'text-center'
>
<
h4
className=
'text-danger'
>
{
'No se han asignado límites de casillas.'
}
</
h4
>
<
h4
className=
'text-danger'
>
{
'Se esta realizando una migracion.'
}
</
h4
>
<
blockquote
>
{
`Limite : ${countAccounts.migracion.limit || 'No definido'}`
}
<
br
/>
{
`Usadas : ${countAccounts.migracion.used || 'No definido'}`
}
</
blockquote
>
</
div
>
</
div
>
);
);
}
}
...
...
src/config/config.json
View file @
8b6f65ae
...
@@ -20,7 +20,37 @@
...
@@ -20,7 +20,37 @@
"dns"
:
{
"dns"
:
{
"url"
:
"http://zimbra.zboxapp.dev:9081/powerdns_proxy"
,
"url"
:
"http://zimbra.zboxapp.dev:9081/powerdns_proxy"
,
"token"
:
"otto"
,
"token"
:
"otto"
,
"inmutable"
:
[
"mx"
,
"soa"
,
"ns"
,
"spf"
]
"inmutable"
:
[
"mx"
,
"soa"
,
"ns"
,
"spf"
],
"template"
:
{
"zone_data"
:
{
"kind"
:
"Master"
,
"nameservers"
:
[
"ns.zboxapp.com"
,
"ns2.zboxapp.com"
],
"soa_edit"
:
"DEFAULT"
,
"soa_edit_api"
:
"DEFAULT"
,
"masters"
:
[]
},
"zone_records"
:
[
{
"name"
:
"{{=zone.name}}"
,
"type"
:
"SOA"
,
"content"
:
"ns.zboxapp.com. dns.zboxapp.com. 0 10800 3600 604800 3600"
,
"disabled"
:
false
,
"ttl"
:
900
,
"priority"
:
0
},
{
"name"
:
"{{=zone.name}}"
,
"type"
:
"NS"
,
"content"
:
"ns.zboxapp.com."
,
"disabled"
:
false
,
"ttl"
:
900
,
"priority"
:
0
},
{
"name"
:
"{{=zone.name}}"
,
"type"
:
"NS"
,
"content"
:
"ns2.zboxapp.com."
,
"disabled"
:
false
,
"ttl"
:
900
,
"priority"
:
0
},
{
"name"
:
"{{=zone.name}}"
,
"type"
:
"MX"
,
"content"
:
"5 mailcleaner.zboxapp.com."
,
"disabled"
:
false
,
"ttl"
:
900
,
"priority"
:
5
},
{
"name"
:
"{{=zone.name}}"
,
"type"
:
"TXT"
,
"content"
:
"
\"
v=spf1 include:_spf.zboxapp.com -all
\"
"
,
"disabled"
:
false
,
"ttl"
:
900
,
"priority"
:
0
},
{
"name"
:
"mail.{{=zone.name}}"
,
"type"
:
"CNAME"
,
"content"
:
"mail.zboxapp.com."
,
"disabled"
:
false
,
"ttl"
:
900
,
"priority"
:
0
}
]
}
},
},
"maxAttachmentLimit"
:
{
"maxAttachmentLimit"
:
{
"max"
:
52428800
,
"max"
:
52428800
,
...
...
src/index.jsx
View file @
8b6f65ae
...
@@ -24,6 +24,8 @@ import DistributionLists from './components/distribution/distribution_lists.jsx'
...
@@ -24,6 +24,8 @@ import DistributionLists from './components/distribution/distribution_lists.jsx'
import
EditDistributionList
from
'./components/distribution/edit_distribution_lists.jsx'
;
import
EditDistributionList
from
'./components/distribution/edit_distribution_lists.jsx'
;
import
SearchView
from
'./components/search/search.jsx'
;
import
SearchView
from
'./components/search/search.jsx'
;
import
SalesForm
from
'./components/sales/sales.jsx'
;
import
SalesForm
from
'./components/sales/sales.jsx'
;
import
TemplateError
from
'./components/404/404.jsx'
;
import
*
as
Client
from
'./utils/client.jsx'
;
import
*
as
Client
from
'./utils/client.jsx'
;
import
*
as
Utils
from
'./utils/utils.jsx'
;
import
*
as
Utils
from
'./utils/utils.jsx'
;
import
Constants
from
'./utils/constants.jsx'
;
import
Constants
from
'./utils/constants.jsx'
;
...
@@ -120,7 +122,7 @@ function renderRootComponent() {
...
@@ -120,7 +122,7 @@ function renderRootComponent() {
>
>
<
Route
<
Route
path=
'error'
path=
'error'
component=
{
ErrorPage
}
component=
{
TemplateError
||
ErrorPage
}
/>
/>
<
Route
<
Route
component=
{
LoggedIn
}
component=
{
LoggedIn
}
...
...
src/sass/components/_various.scss
View file @
8b6f65ae
...
@@ -1800,4 +1800,61 @@ label {
...
@@ -1800,4 +1800,61 @@ label {
}
}
}
}
// Error Page
.container-error
{
overflow
:
hidden
;
.dialog-notify
{
background
:
rgba
(
198
,
198
,
198
,
.3
);
box-shadow
:
0
5px
20px
-1px
black
;
color
:
#fff
;
position
:
absolute
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
margin
:
auto
;
max-width
:
500px
;
height
:
300px
;
text-align
:
center
;
h2
{
display
:
inline-block
;
font-size
:
16rem
;
margin
:
0
;
padding
:
0
;
line-height
:
15rem
;
text-shadow
:
0px
2px
4px
black
,
4px
4px
4px
black
;
}
.page-not-found
{
display
:
block
;
margin
:
35px
auto
5px
;
font-size
:
2rem
;
text-shadow
:
0
2px
2px
black
,
2px
2px
2px
black
;
}
.back-link-error
{
position
:
absolute
;
bottom
:
0%
;
width
:
100%
;
color
:
#FFF
;
background
:
#FFF
;
display
:
block
;
text-decoration
:
none
;
text-transform
:
uppercase
;
padding
:
5px
0
;
text-shadow
:
0px
0px
4px
black
,
0px
0px
6px
black
;
font-size
:
20px
;
}
.error-message
{
color
:
#000
;
}
}
}
// Error Page
// scss-lint:enable all
// scss-lint:enable all
src/utils/client.jsx
View file @
8b6f65ae
...
@@ -90,6 +90,25 @@ export function getClientConfig(success, error) {
...
@@ -90,6 +90,25 @@ export function getClientConfig(success, error) {
});
});
}
}
export
function
clearCacheZimbra
(
flushData
,
success
,
error
)
{
// flushData parameter example would be like this {type: 'domain', allServers: 1, entry: 'zboxapp.dev'}
initZimbra
().
then
(
(
zimbra
)
=>
{
zimbra
.
flushCache
(
flushData
,
(
err
,
cleared
)
=>
{
if
(
err
)
{
return
error
(
err
);
}
return
success
(
cleared
);
});
},
(
err
)
=>
{
const
e
=
handleError
(
'clearCacheZimbra'
,
err
);
return
error
(
e
);
}
);
}
export
function
getMe
(
success
,
error
)
{
export
function
getMe
(
success
,
error
)
{
initZimbra
().
then
(
initZimbra
().
then
(
(
zimbra
)
=>
{
(
zimbra
)
=>
{
...
...
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