Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
EOLE
Zéphir
WebUI
Commits
243be386
Commit
243be386
authored
May 09, 2018
by
Emmanuel Garette
Browse files
a
parent
3c188aea
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/actions/server.actions.js
View file @
243be386
...
...
@@ -98,7 +98,7 @@ function update({ serverid, servername, serverdescription }) {
return
Zephir
.
v1
.
server
.
update
({
servername
,
serverdescription
,
serverid
:
serverid
.
toString
()
,
serverid
:
serverid
,
})
.
then
(({
response
})
=>
{
dispatch
(
success
(
response
));
...
...
src/components/ActionApp/ActionApp.js
View file @
243be386
...
...
@@ -26,13 +26,17 @@ class ActionApp extends React.Component {
}
componentDidUpdate
()
{
const
{
instance
}
=
this
.
props
;
const
{
server
}
=
instance
.
opts
;
const
{
jobsOutdated
,
isLoading
}
=
this
.
state
;
if
(
jobsOutdated
&&
!
isLoading
)
this
.
refreshJobs
();
if
(
jobsOutdated
&&
!
isLoading
)
this
.
refreshJobs
(
server
.
serverid
);
}
componentDidMount
()
{
const
{
instance
}
=
this
.
props
;
const
{
server
}
=
instance
.
opts
;
const
{
jobsOutdated
,
isLoading
}
=
this
.
state
;
if
(
jobsOutdated
&&
!
isLoading
)
this
.
refreshJobs
();
if
(
jobsOutdated
&&
!
isLoading
)
this
.
refreshJobs
(
server
.
serverid
);
}
render
()
{
...
...
@@ -72,9 +76,9 @@ class ActionApp extends React.Component {
);
}
refreshJobs
()
{
refreshJobs
(
serverId
)
{
this
.
setState
({
isLoading
:
true
},
()
=>
{
this
.
props
.
dispatch
(
execActions
.
listJobs
())
this
.
props
.
dispatch
(
execActions
.
listJobs
(
serverId
))
.
then
(
result
=>
{
const
filteredJobs
=
this
.
filterJobs
(
result
.
jobs
);
this
.
setState
({
jobs
:
filteredJobs
});
...
...
@@ -88,7 +92,9 @@ class ActionApp extends React.Component {
}
onRefreshClick
()
{
this
.
refreshJobs
();
const
{
instance
}
=
this
.
props
;
const
{
server
}
=
instance
.
opts
;
this
.
refreshJobs
(
server
.
serverid
);
}
filterJobs
(
jobs
)
{
...
...
@@ -147,4 +153,4 @@ const mapStateToProps = () => {
const
styledActionApp
=
withStyles
(
styles
)(
ActionApp
);
const
connectedActionApp
=
connect
(
mapStateToProps
)(
styledActionApp
);
export
{
connectedActionApp
as
ActionApp
};
\ No newline at end of file
export
{
connectedActionApp
as
ActionApp
};
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