Remove automatic transfer reporting
This commit is contained in:
parent
474af9c568
commit
76cd62449e
|
@ -3,7 +3,7 @@ var capture = {},
|
||||||
fs = require('fs'),
|
fs = require('fs'),
|
||||||
exec = require('child_process').exec;
|
exec = require('child_process').exec;
|
||||||
|
|
||||||
capture.active = true;
|
capture.active = false;
|
||||||
capture.store = {
|
capture.store = {
|
||||||
events : [],
|
events : [],
|
||||||
start : 0
|
start : 0
|
||||||
|
@ -12,12 +12,18 @@ capture.store = {
|
||||||
capture.start = function (first) {
|
capture.start = function (first) {
|
||||||
'use strict';
|
'use strict';
|
||||||
//reset storage
|
//reset storage
|
||||||
capture.store.events = [];
|
if (capture.active) {
|
||||||
capture.store.start = +new Date();
|
capture.store.events = [];
|
||||||
|
capture.store.start = +new Date();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
capture.end = function () {
|
capture.end = function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
return capture.save();
|
if (capture.active) {
|
||||||
|
return capture.save();
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
};
|
};
|
||||||
capture.proj_start = function () {
|
capture.proj_start = function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
|
@ -1,13 +1,18 @@
|
||||||
var seq = {};
|
var seq = {},
|
||||||
|
capture = {};
|
||||||
|
|
||||||
/******
|
/******
|
||||||
Sequence Object
|
Sequence Object
|
||||||
*******/
|
*******/
|
||||||
seq.i = 0;
|
seq.i = 0;
|
||||||
mcopy.loop = 1;
|
|
||||||
mcopy.loopCount = 0;
|
|
||||||
seq.time = 0;
|
seq.time = 0;
|
||||||
seq.stopState = false;
|
seq.stopState = false;
|
||||||
|
|
||||||
|
mcopy.loop = 1;
|
||||||
|
mcopy.loopCount = 0;
|
||||||
|
capture.active = false;
|
||||||
|
capture.report = '';
|
||||||
|
|
||||||
seq.run = function () {
|
seq.run = function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
var c = mcopy.state.sequence.arr[seq.i],
|
var c = mcopy.state.sequence.arr[seq.i],
|
||||||
|
@ -65,7 +70,10 @@ seq.run = function () {
|
||||||
log.info('Sequence completed in ' + humanizeDuration(timeEnd), 'SEQUENCE', true);
|
log.info('Sequence completed in ' + humanizeDuration(timeEnd), 'SEQUENCE', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
alert(ipcRenderer.sendSync('transfer', { action: 'end'}));
|
capture.report = ipcRenderer.sendSync('transfer', { action: 'end'});
|
||||||
|
if (capture.active) {
|
||||||
|
alert(capture.report);
|
||||||
|
}
|
||||||
gui.notify('Sequence done!', (mcopy.state.sequence.arr.length * mcopy.loop) + ' actions completed in ' + humanizeDuration(timeEnd));
|
gui.notify('Sequence done!', (mcopy.state.sequence.arr.length * mcopy.loop) + ' actions completed in ' + humanizeDuration(timeEnd));
|
||||||
//clear gui
|
//clear gui
|
||||||
$('.row input').removeClass('h');
|
$('.row input').removeClass('h');
|
||||||
|
|
|
@ -467,7 +467,13 @@ transfer.listen = function () {
|
||||||
ipcMain.on('transfer', function (event, arg) {
|
ipcMain.on('transfer', function (event, arg) {
|
||||||
var res = '';
|
var res = '';
|
||||||
//also turn on and off
|
//also turn on and off
|
||||||
if (arg.action === 'start') {
|
if (arg.action === 'enable') {
|
||||||
|
capture.active = true;
|
||||||
|
res = capture.active;
|
||||||
|
} else if (arg.action === 'disable') {
|
||||||
|
capture.active = false;
|
||||||
|
res = capture.active;
|
||||||
|
} else if (arg.action === 'start') {
|
||||||
capture.start();
|
capture.start();
|
||||||
} else if (arg.action === 'end') {
|
} else if (arg.action === 'end') {
|
||||||
res = capture.end();
|
res = capture.end();
|
||||||
|
|
Loading…
Reference in New Issue