summaryrefslogtreecommitdiff
path: root/public/bundle.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-05-28 10:18:25 +0200
committerJules Laplace <julescarbon@gmail.com>2018-05-28 10:18:25 +0200
commit3a8d99c5e4f64a9426585943c40635eb183b47ae (patch)
treed09bc57d59ec0ff7a6def8af49634c4aab64e493 /public/bundle.js
parented80103ff0c4b87d2726da5ceab8ec566b46e0ee (diff)
start/stop tasks
Diffstat (limited to 'public/bundle.js')
-rw-r--r--public/bundle.js49
1 files changed, 33 insertions, 16 deletions
diff --git a/public/bundle.js b/public/bundle.js
index bddbe82..a394a61 100644
--- a/public/bundle.js
+++ b/public/bundle.js
@@ -245,6 +245,15 @@ function Header(props) {
null,
(0, _preact.h)(
_reactRouterDom.Link,
+ { to: '/system' },
+ 'system'
+ )
+ ),
+ (0, _preact.h)(
+ 'span',
+ null,
+ (0, _preact.h)(
+ _reactRouterDom.Link,
{ to: '/dashboard' },
'dashboard'
)
@@ -267,7 +276,11 @@ function Header(props) {
(0, _preact.h)(
'span',
null,
- 'live'
+ (0, _preact.h)(
+ _reactRouterDom.Link,
+ { to: '/live' },
+ 'live'
+ )
),
(0, _preact.h)(
'span',
@@ -2911,7 +2924,7 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
_socket.socket.on('res', function (data) {
- console.log(data.cmd);
+ console.log('socket:', data.cmd);
switch (data.cmd) {
case 'get_last_frame':
if (data.res !== 'working') {
@@ -3119,16 +3132,14 @@ _socket.socket.on('task_res', function (data) {
case 'start':
// return dispatch({ type: types.system.rpc_connected, runner: data.runner })
break;
- case 'task_begin':
- clearTimeout(finishTimeout);
- return (0, _store.dispatch)({ type: _types2.default.task.task_begin, task: data.task });
- break;
case 'stop':
break;
+ // begin and finish calls often arrive out of order, if the old task was preempted
+ case 'task_begin':
+ (0, _store.dispatch)({ type: _types2.default.task.task_begin, task: data.task });
+ break;
case 'task_finish':
- return finishTimeout = setTimeout(function () {
- return (0, _store.dispatch)({ type: _types2.default.task.task_finish, task: data.task });
- }, 100);
+ (0, _store.dispatch)({ type: _types2.default.task.task_finish, task: data.task });
break;
case 'kill':
break;
@@ -3496,7 +3507,7 @@ var System = function (_Component) {
(0, _preact.h)(
'button',
{ onClick: function onClick() {
- return actions.task.stop_task(runner.cpu);
+ return actions.task.stop_task(runner.cpu.task);
} },
'Stop'
)
@@ -3514,7 +3525,7 @@ var System = function (_Component) {
(0, _preact.h)(
'button',
{ onClick: function onClick() {
- return actions.task.stop_task(runner.gpu);
+ return actions.task.stop_task(runner.gpu.task);
} },
'Stop'
)
@@ -3532,7 +3543,7 @@ var System = function (_Component) {
(0, _preact.h)(
'button',
{ onClick: function onClick() {
- return actions.task.stop_task(runner.cpu);
+ return actions.task.stop_task(runner.cpu.task);
} },
'Stop'
)
@@ -3687,7 +3698,7 @@ var systemInitialState = {
},
rpc: {
connected: false,
- status: "unknown",
+ status: "disconnected",
error: null
},
cmd: {
@@ -3821,6 +3832,11 @@ var systemReducer = function systemReducer() {
return state;
}
return _extends({}, state, {
+ rpc: {
+ connected: false,
+ status: "disconnected",
+ error: null
+ },
runner: _extends({}, state.runner, _defineProperty({}, action.task.processor, { status: 'IDLE', task: {} }))
});
case _types2.default.system.stdout:
@@ -4023,9 +4039,10 @@ exports.default = {
disconnect: 'SOCKET_DISCONNECT',
error: 'SOCKET_ERROR',
- load_params: 'LOAD_PARAMS',
- list_sequences: 'LIST_SEQUENCES',
- list_epochs: 'LIST_EPOCHS'
+ load_params: 'SOCKET_LOAD_PARAMS',
+ list_checkpoints: 'SOCKET_LIST_CHECKPOINTS',
+ list_sequences: 'SOCKET_LIST_SEQUENCES',
+ list_epochs: 'SOCKET_LIST_EPOCHS'
},
player: {
get_params: 'GET_PARAMS',