diff --git a/app/scripts/controllers/preview.js b/app/scripts/controllers/preview.js index 9ef6d72..09cec89 100644 --- a/app/scripts/controllers/preview.js +++ b/app/scripts/controllers/preview.js @@ -31,8 +31,6 @@ angular.module('grafterizerApp') if(toParams.distributionId ){ $scope.$parent.showPreview = $rootScope.previewmode; - console.log( $scope.$parent.showPreview); - console.log($rootScope.upwizardMode); } else { $scope.$parent.showPreview = false; $rootScope.previewmode = false; diff --git a/app/scripts/pipelineDirectives/addcolumnsfunction.js b/app/scripts/pipelineDirectives/addcolumnsfunction.js index f6893e6..0a7aaa9 100644 --- a/app/scripts/pipelineDirectives/addcolumnsfunction.js +++ b/app/scripts/pipelineDirectives/addcolumnsfunction.js @@ -23,6 +23,17 @@ angular.module('grafterizerApp') scope.function = newFunction; } + if (scope.function) { + scope.addcolumnsmode = []; + for (var i=0; i< scope.function.columnsArray.length; ++i) + { + if (scope.function.columnsArray[i].colValue) + scope.addcolumnsmode.splice(i,0,'value'); + else + scope.addcolumnsmode.splice(i,0,'expression'); + } + } + scope.newColumnValues = ['Dataset filename', 'Current date', 'Row number', 'custom expression']; scope.$parent.generateCurrFunction = function() { return new transformationDataModel.AddColumnsFunction( diff --git a/app/scripts/pipelineDirectives/mapc.js b/app/scripts/pipelineDirectives/mapc.js index cc8e3c3..c07dc82 100644 --- a/app/scripts/pipelineDirectives/mapc.js +++ b/app/scripts/pipelineDirectives/mapc.js @@ -12,16 +12,20 @@ angular.module('grafterizerApp') templateUrl: 'views/pipelineFunctions/mapcFunction.html', restrict: 'E', link: function postLink(scope, element, attrs) { + scope.showArgs=[]; if (!scope.function) { var keyfuncpair = new transformationDataModel.KeyFunctionPair( '', scope.$parent.transformation.findPrefixerOrCustomFunctionByName('string-literal'), []); scope.function = new transformationDataModel.MapcFunction([keyfuncpair], null); scope.function.docstring = null; + scope.showArgs.push(true); } else { for (var i = 0; i < scope.function.keyFunctionPairs.length; ++i) { var currFunc = scope.function.keyFunctionPairs[i].func; if (!currFunc.hasOwnProperty('name')) scope.function.keyFunctionPairs[i].func = scope.$parent.transformation.findPrefixerOrCustomFunctionByName(currFunc); + scope.showArgs.push(false); } + } if (!(scope.function instanceof transformationDataModel.MapcFunction)) { @@ -41,6 +45,7 @@ angular.module('grafterizerApp') return new transformationDataModel.MapcFunction(scope.function.keyFunctionPairs, scope.function.docstring); }; + scope.getCustomFunctionsAndPrefixers = function() { var customFunctionsAndPrefixers = []; @@ -63,10 +68,14 @@ angular.module('grafterizerApp') }; scope.addKeyFunctionPair = function() { + for (var i = 0; i < scope.function.keyFunctionPairs.length; ++i) { + scope.showArgs[i]=false; + } var newKeyFunctionPair = new transformationDataModel.KeyFunctionPair('',{name:'string-literal', group:'CONVERT_DATATYPE', id:0},[]); this.function.keyFunctionPairs.push(newKeyFunctionPair); + scope.showArgs[scope.function.keyFunctionPairs.length-1]=true; }; scope.removeKeyFunctionPair = function(kfPair) { scope.function.removeKeyFunctionPair(kfPair); diff --git a/app/scripts/pipelineDirectives/renamecolumnsfunction.js b/app/scripts/pipelineDirectives/renamecolumnsfunction.js index acb3330..9c88af3 100644 --- a/app/scripts/pipelineDirectives/renamecolumnsfunction.js +++ b/app/scripts/pipelineDirectives/renamecolumnsfunction.js @@ -27,6 +27,13 @@ angular.module('grafterizerApp') }; }; + if (scope.function) { + if (scope.function.functionsToRenameWith[0]) + scope.renamecolumnsmode = 'function'; + else + scope.renamecolumnsmode = 'map'; + + } scope.$parent.generateCurrFunction = function() { var functArray = []; var newrenfunc; diff --git a/app/views/pipelineFunctions/addColumnsFunction.html b/app/views/pipelineFunctions/addColumnsFunction.html index b0127b8..17ad610 100644 --- a/app/views/pipelineFunctions/addColumnsFunction.html +++ b/app/views/pipelineFunctions/addColumnsFunction.html @@ -12,27 +12,34 @@

Parameters

Columns to add

+
- + +
+ + Text value + Expression + + + -
-
+
{{val}} - + - +
diff --git a/app/views/pipelineFunctions/grepFunction.html b/app/views/pipelineFunctions/grepFunction.html index 00e19bd..1e35006 100644 --- a/app/views/pipelineFunctions/grepFunction.html +++ b/app/views/pipelineFunctions/grepFunction.html @@ -57,7 +57,7 @@

Parameters

-
+

The most simple regular expressions are just literal characters. Example: to narrow dataset just to rows containing text fragment abc you should use abc regular expression.
diff --git a/app/views/pipelineFunctions/mapcFunction.html b/app/views/pipelineFunctions/mapcFunction.html index c57813a..0c7a01a 100644 --- a/app/views/pipelineFunctions/mapcFunction.html +++ b/app/views/pipelineFunctions/mapcFunction.html @@ -32,7 +32,7 @@

Parameters

Add mapping
-
+
@@ -47,11 +47,20 @@

Parameters

- + + + Arguments + + + Arguments + + +
+ - +
diff --git a/app/views/pipelineFunctions/renameColumnsFunction.html b/app/views/pipelineFunctions/renameColumnsFunction.html index be6d4a3..0530614 100644 --- a/app/views/pipelineFunctions/renameColumnsFunction.html +++ b/app/views/pipelineFunctions/renameColumnsFunction.html @@ -9,9 +9,13 @@

Parameters

-
-
- + + + Transform with function + Map values + + +

Transform current column names

@@ -27,12 +31,10 @@

Parameters

- Compose with - -
- -
- + + Compose with +
+

Map values

@@ -50,12 +52,13 @@

Parameters

-
+
Add mapping pair -
-
+ + +