summaryrefslogtreecommitdiff
path: root/public/bundle.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/bundle.js')
-rw-r--r--public/bundle.js41
1 files changed, 34 insertions, 7 deletions
diff --git a/public/bundle.js b/public/bundle.js
index a34ede8..2eb1b60 100644
--- a/public/bundle.js
+++ b/public/bundle.js
@@ -2431,14 +2431,14 @@ var Dashboard = function (_Component) {
_group2.default,
{ title: 'Completed Tasks' },
(0, _preact.h)(_tasklist2.default, { tasks: queue.completed.map(function (id) {
- return task.id;
+ return tasks[id];
}) })
),
!!queue.queue.length && (0, _preact.h)(
_group2.default,
{ title: 'Upcoming Tasks' },
(0, _preact.h)(_tasklist2.default, { tasks: queue.queue.map(function (id) {
- return task.id;
+ return tasks[id];
}) })
)
)
@@ -2710,6 +2710,7 @@ var TaskList = function (_Component) {
var time = 0;
var taskList = tasks.map(function (task) {
+ console.log(task);
var eta = time + task.epochs * 180 / 60 + " min.";
time += task.epochs * 180 / 60;
var dataset_type = void 0,
@@ -2744,7 +2745,7 @@ var TaskList = function (_Component) {
(0, _preact.h)(
'div',
{ 'class': 'epochs' },
- task.epochs,
+ task.epoch,
' ep.'
),
(0, _preact.h)(
@@ -6666,7 +6667,7 @@ var stop_task = exports.stop_task = function stop_task(task) {
var add_task = exports.add_task = function add_task(new_task) {
return function (dispatch) {
_actions2.default.task.create(new_task).then(function (task) {
- _socket2.default.task.add_task(task, opt);
+ _socket2.default.task.add_task(task);
});
};
};
@@ -6724,12 +6725,12 @@ var queueReducer = function queueReducer() {
switch (action.type) {
case _types2.default.task.create:
+ console.log(action.data);
return _extends({}, state, {
tasks: _extends({}, state.tasks, _defineProperty({}, action.data.id, action.data)),
- queue: state.queue.concat([action.data])
+ queue: state.queue.concat([action.data.id])
});
case _types2.default.task.index:
- console.log(action.data);
return _extends({}, state, {
tasks: action.data.reduce(function (a, b) {
return a[b.id] = b, a;
@@ -7354,7 +7355,7 @@ var dispatch = exports.dispatch = store.dispatch;
Object.defineProperty(exports, "__esModule", {
value: true
});
-exports.changeTool = exports.listDirectory = exports.run = undefined;
+exports.enqueue_test_task = exports.changeTool = exports.listDirectory = exports.run = undefined;
var _socket = __webpack_require__(/*! ../socket */ "./app/client/socket/index.js");
@@ -7364,6 +7365,10 @@ var _types = __webpack_require__(/*! ../types */ "./app/client/types.js");
var _types2 = _interopRequireDefault(_types);
+var _actions = __webpack_require__(/*! ../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var run = exports.run = function run(cmd) {
@@ -7394,6 +7399,17 @@ var changeTool = exports.changeTool = function changeTool(tool) {
return { type: _types2.default.app.change_tool, tool: tool };
};
+var enqueue_test_task = exports.enqueue_test_task = function enqueue_test_task(dataset) {
+ return function (dispatch) {
+ var task = {
+ module: 'test',
+ activity: 'test',
+ dataset: dataset
+ };
+ return _actions2.default.queue.add_task(task);
+ };
+};
+
/***/ }),
/***/ "./app/client/system/system.component.js":
@@ -7678,6 +7694,17 @@ var System = function (_Component) {
} },
'Set'
)
+ ),
+ (0, _preact.h)(
+ _param2.default,
+ { title: 'Queue' },
+ (0, _preact.h)(
+ 'button',
+ { onClick: function onClick() {
+ return actions.system.enqueue_test_task(choice(fruits));
+ } },
+ '+ Add'
+ )
)
)
),