this.$scope = $scope;
var controller = this;
this.APIEndPoint
- .getOptionControlFile('dcdFilePrint')
+ .getOptionControlFile('mrcImageNoiseAdd')
.$promise
.then(function (result) {
controller.options = result.info;
;
Execution.prototype.add = function () {
this.$scope.$broadcast('close');
- this.commandInfoList.push(new app.declares.CommandInfo('dcdFilePrint'));
+ this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd'));
};
Execution.prototype.open = function () {
var result = this.MyModal.open('SelectCommand');
this.$scope = $scope;
var controller = this;
this.APIEndPoint
- .getOptionControlFile('dcdFilePrint')
+ .getOptionControlFile('mrcImageNoiseAdd')
.$promise
.then(function (result) {
controller.options = result.info;
;
Execution.prototype.add = function () {
this.$scope.$broadcast('close');
- this.commandInfoList.push(new app.declares.CommandInfo('dcdFilePrint'));
+ this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd'));
};
Execution.prototype.open = function () {
var result = this.MyModal.open('SelectCommand');
this.$scope = $scope;
var controller = this;
this.APIEndPoint
- .getOptionControlFile('dcdFilePrint')
+ .getOptionControlFile('mrcImageNoiseAdd')
.$promise
.then(function (result) {
controller.options = result.info;
;
Execution.prototype.add = function () {
this.$scope.$broadcast('close');
- this.commandInfoList.push(new app.declares.CommandInfo('dcdFilePrint'));
+ this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd'));
};
Execution.prototype.open = function () {
var result = this.MyModal.open('SelectCommand');
this.$scope = $scope;
var controller = this;
this.APIEndPoint
- .getOptionControlFile('dcdFilePrint')
+ .getOptionControlFile('mrcImageNoiseAdd')
.$promise
.then(function (result) {
controller.options = result.info;
;
Execution.prototype.add = function () {
this.$scope.$broadcast('close');
- this.commandInfoList.push(new app.declares.CommandInfo('dcdFilePrint'));
+ this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd'));
};
Execution.prototype.open = function () {
var result = this.MyModal.open('SelectCommand');
this.$scope = $scope;
var controller = this;
this.APIEndPoint
- .getOptionControlFile('dcdFilePrint')
+ .getOptionControlFile('mrcImageNoiseAdd')
.$promise
.then(function (result) {
controller.options = result.info;
;
Execution.prototype.add = function () {
this.$scope.$broadcast('close');
- this.commandInfoList.push(new app.declares.CommandInfo('dcdFilePrint'));
+ this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd'));
};
Execution.prototype.open = function () {
var result = this.MyModal.open('SelectCommand');
this.$scope = $scope;
var controller = this;
this.APIEndPoint
- .getOptionControlFile('dcdFilePrint')
+ .getOptionControlFile('mrcImageNoiseAdd')
.$promise
.then(function (result) {
controller.options = result.info;
;
Execution.prototype.add = function () {
this.$scope.$broadcast('close');
- this.commandInfoList.push(new app.declares.CommandInfo('dcdFilePrint'));
+ this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd'));
};
Execution.prototype.open = function () {
var result = this.MyModal.open('SelectCommand');
this.$scope = $scope;
var controller = this;
this.APIEndPoint
- .getOptionControlFile('dcdFilePrint')
+ .getOptionControlFile('mrcImageNoiseAdd')
.$promise
.then(function (result) {
controller.options = result.info;
;
Execution.prototype.add = function () {
this.$scope.$broadcast('close');
- this.commandInfoList.push(new app.declares.CommandInfo('dcdFilePrint'));
+ this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd'));
};
Execution.prototype.open = function () {
var result = this.MyModal.open('SelectCommand');
this.$scope = $scope;
var controller = this;
this.APIEndPoint
- .getOptionControlFile('dcdFilePrint')
+ .getOptionControlFile('mrcImageNoiseAdd')
.$promise
.then(function (result) {
controller.options = result.info;
;
Execution.prototype.add = function () {
this.$scope.$broadcast('close');
- this.commandInfoList.push(new app.declares.CommandInfo('dcdFilePrint'));
+ this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd'));
};
Execution.prototype.open = function () {
var result = this.MyModal.open('SelectCommand');
this.$scope = $scope;
var controller = this;
this.APIEndPoint
- .getOptionControlFile('dcdFilePrint')
+ .getOptionControlFile('mrcImageNoiseAdd')
.$promise
.then(function (result) {
controller.options = result.info;
;
Execution.prototype.add = function () {
this.$scope.$broadcast('close');
- this.commandInfoList.push(new app.declares.CommandInfo('dcdFilePrint'));
+ this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd'));
};
Execution.prototype.open = function () {
var result = this.MyModal.open('SelectCommand');
this.$scope = $scope;
var controller = this;
this.APIEndPoint
- .getOptionControlFile('dcdFilePrint')
+ .getOptionControlFile('mrcImageNoiseAdd')
.$promise
.then(function (result) {
controller.options = result.info;
;
Execution.prototype.add = function () {
this.$scope.$broadcast('close');
- this.commandInfoList.push(new app.declares.CommandInfo('dcdFilePrint'));
+ this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd'));
};
Execution.prototype.open = function () {
var result = this.MyModal.open('SelectCommand');
this.$scope = $scope;
var controller = this;
this.APIEndPoint
- .getOptionControlFile('dcdFilePrint')
+ .getOptionControlFile('mrcImageNoiseAdd')
.$promise
.then(function (result) {
controller.options = result.info;
;
Execution.prototype.add = function () {
this.$scope.$broadcast('close');
- this.commandInfoList.push(new app.declares.CommandInfo('dcdFilePrint'));
+ this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd'));
};
Execution.prototype.open = function () {
var result = this.MyModal.open('SelectCommand');
router.post('/', function(req, res) {
var form = new formidable.IncomingForm();
var root;
+ var result;
+
+ var command;
+ var options;
+ var workspace;
+
+ var optionsArray;
+
if(process.env.NODE_ENV === 'debug') {
root = __dirname + '/../../../../user-specific-files/workspace.debug/';
} else {
root = __dirname + '/../../../../user-specific-files/workspace/';
}
+
form.parse(req, function(err, fields, files) {
var data = JSON.parse(fields.data);
- var command = data.command;
- var options = data.options;
- var workspace = data.workspace;
+ command = data.command;
+ options = data.options;
+ workspace = data.workspace;
+ });
- eos.validate(command,options, workspace)
- .catch(function(r) {
+ form.on('end', function() {
+ Promise.all([eos.validate(command,options, workspace), eos.toExecArray(command, options, workspace)])
+ .catch(function(r) {
var info = {
status: 'error',
message: r.message
console.log(r.message);
res.send(info);
})
- .then(function() {
- return eos.execute(command, options, workspace);
- .then(function(result) {
- console.log(execStr);
+ .then(function(r) {
+ var optionsArray = r[1];
+ return eos.execute(command, optionsArray);
+ }).then(function(r) {
var info = {
status: 'success',
};
- res.send(info);
- })
+ res.send(r);
+ });
});
});