diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-05 02:17:25 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-05 02:17:25 +0200 |
| commit | 2d68eebcc1cfdcbf0a0b4fc64d13036157f4468e (patch) | |
| tree | 5b4f23991b917ec4fb58c99d28933916e4c751b0 /public/bundle.js | |
| parent | ed7f7bffe3ba56f41c9473d4eaeb6826983ae5b7 (diff) | |
woop seems to be working
Diffstat (limited to 'public/bundle.js')
| -rw-r--r-- | public/bundle.js | 64 |
1 files changed, 13 insertions, 51 deletions
diff --git a/public/bundle.js b/public/bundle.js index c89c342..78232aa 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -6279,62 +6279,14 @@ var SampleRNNResults = function (_Component) { var _this = _possibleConstructorReturn(this, (SampleRNNResults.__proto__ || Object.getPrototypeOf(SampleRNNResults)).call(this)); - _this.fileOptions = _this.fileOptions.bind(_this); - _this.pickFile = _this.pickFile.bind(_this); - var id = props.match.params.id || localStorage.getItem('samplernn.last_id'); if (!props.samplernn.data) props.actions.load_directories(); return _this; } _createClass(SampleRNNResults, [{ - key: 'pickFile', - value: function pickFile(file) { - console.log('pick', file); - } - }, { - key: 'fileOptions', - value: function fileOptions(file) { - var _this2 = this; - - if (file.activity === 'url' && !file.dataset) { - if (this.props.runner.cpu.status !== 'IDLE') { - return (0, _preact.h)( - 'div', - { className: 'gray' }, - 'fetching...' - ); - } else { - return (0, _preact.h)( - 'div', - { className: 'link', onClick: function onClick() { - return _this2.fetchURL(file.url); - } }, - 'fetch' - ); - } - } - return (0, _preact.h)( - 'div', - null, - (0, _preact.h)( - 'div', - { className: 'link', onClick: function onClick() { - return _this2.train(file); - } }, - 'train' - ), - file.epoch == 0 && (0, _preact.h)( - 'div', - { className: 'epochs' }, - file.epochs, - ' ep.' - ) - ); - } - }, { key: 'render', value: function render() { - var _this3 = this; + var _this2 = this; if (this.props.samplernn.loading) return (0, _preact.h)(_loading2.default, { progress: this.props.samplernn.progress }); var _props$samplernn$data = this.props.samplernn.data, @@ -6386,7 +6338,7 @@ var SampleRNNResults = function (_Component) { e.preventDefault(); e.stopPropagation(); console.log('picked a file', file); - _this3.handlePick(file); + _this2.handlePick(file); } }) ); @@ -6695,7 +6647,7 @@ exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)( Object.defineProperty(exports, "__esModule", { value: true }); -exports.clear_cache_task = exports.fetch_task = exports.train_task = undefined; +exports.clear_cache_task = exports.log_task = exports.fetch_task = exports.train_task = undefined; var _v = __webpack_require__(/*! uuid/v1 */ "./node_modules/uuid/v1.js"); @@ -6742,6 +6694,16 @@ var fetch_task = exports.fetch_task = function fetch_task(dataset) { return _actions2.default.queue.add_task(task); }; }; +var log_task = exports.log_task = function log_task(dataset) { + return function (dispatch) { + var task = { + module: 'samplernn', + activity: 'log', + dataset: dataset + }; + return _actions2.default.queue.add_task(task); + }; +}; var clear_cache_task = exports.clear_cache_task = function clear_cache_task(dataset) { return function (dispatch) { var task = { |
