From 2824f5a23c446bc2306751a890cbeca41dd0c2e4 Mon Sep 17 00:00:00 2001 From: Scott Aslan Date: Tue, 3 May 2016 15:01:10 -0400 Subject: [PATCH] NIFI-1782 cleanup whitespace and code styles This closes #411 --- .../src/main/resources/META-INF/LICENSE | 1 - .../src/main/resources/META-INF/NOTICE | 1 - .../nf-ng-breadcrumbs-controller.js | 10 +++---- .../nf-ng-canvas-app-controller.js | 2 +- .../nf-ng-canvas-graph-controls-controller.js | 4 +-- .../nf-ng-canvas-navigate-controller.js | 28 +++++++++++++------ .../components/nf-ng-output-port-component.js | 2 +- .../components/nf-ng-processor-component.js | 4 +-- .../nf-ng-remote-process-group-component.js | 2 +- .../components/nf-ng-template-component.js | 2 +- .../js/nf/canvas/nf-ng-canvas-app-config.js | 20 ++++++------- .../src/main/webapp/js/nf/nf-ng-bridge.js | 16 +++++------ .../webapp/js/nf/nf-ng-service-provider.js | 8 ++++-- 13 files changed, 56 insertions(+), 44 deletions(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/META-INF/LICENSE b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/META-INF/LICENSE index 5fa073f357..a2592fedda 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/META-INF/LICENSE +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/META-INF/LICENSE @@ -646,4 +646,3 @@ This product bundles 'Fontello' which is available under an MIT license. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/META-INF/NOTICE b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/META-INF/NOTICE index f777afc6ee..d9218e2fb9 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/META-INF/NOTICE +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/META-INF/NOTICE @@ -9,4 +9,3 @@ SIL OFL 1.1 The following binary components are provided under the SIL Open Font License 1.1 (SIL OFL 1.1) FontAwesome (4.6.1 - http://fortawesome.github.io/Font-Awesome/license/) - diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-breadcrumbs-controller.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-breadcrumbs-controller.js index 8cb96d7c91..54a75c47db 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-breadcrumbs-controller.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-breadcrumbs-controller.js @@ -66,17 +66,17 @@ nf.ng.BreadcrumbsCtrl = (function () { /** * Update the breadcrumbs css. - * + * * @param {object} style The style to be applied. */ - updateBreadcrumbsCss: function(style){ + updateBreadcrumbsCss: function (style) { $('#breadcrumbs').css(style); }, /** * Reset initial scroll position. */ - resetScrollPosition: function(){ + resetScrollPosition: function () { var title = $('#data-flow-title-container'); var titlePosition = title.position(); var titleWidth = title.outerWidth(); @@ -98,10 +98,10 @@ nf.ng.BreadcrumbsCtrl = (function () { /** * Registers a scroll event on the `element` - * + * * @param {object} element The element event listener will be registered upon. */ - registerMouseWheelEvent: function(element){ + registerMouseWheelEvent: function (element) { // mousewheel -> IE, Chrome // DOMMouseScroll -> FF // wheel -> FF, IE diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-app-controller.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-app-controller.js index a1f7acac79..e44c13af47 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-app-controller.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-app-controller.js @@ -37,7 +37,7 @@ nf.ng.Canvas.AppCtrl = (function () { nf.ng.Bridge.setRootScope($scope); } - AppCtrl.$inject=['$scope', 'serviceProvider', 'headerCtrl', 'graphControlsCtrl']; + AppCtrl.$inject = ['$scope', 'serviceProvider', 'headerCtrl', 'graphControlsCtrl']; return AppCtrl; }()); \ No newline at end of file diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-graph-controls-controller.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-graph-controls-controller.js index 812055124e..5170a05916 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-graph-controls-controller.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-graph-controls-controller.js @@ -157,7 +157,7 @@ nf.ng.Canvas.GraphControlsCtrl = (function () { * Undock the graph control. * @param {jQuery} $event */ - undock: function($event){ + undock: function ($event) { openGraphControl($($event.target).parent().parent()); }, @@ -165,7 +165,7 @@ nf.ng.Canvas.GraphControlsCtrl = (function () { * Expand the graph control. * @param {jQuery} $event */ - expand: function($event){ + expand: function ($event) { var icon = $($event.target); if (icon.hasClass('fa-plus-square-o')) { openGraphControl(icon.closest('div.graph-control')); diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-navigate-controller.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-navigate-controller.js index 37089b0b38..a1f903c7f8 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-navigate-controller.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-navigate-controller.js @@ -26,8 +26,11 @@ nf.ng.Canvas.NavigateCtrl = (function () { }; NavigateCtrl.prototype = { constructor: NavigateCtrl, - - zoomIn: function(){ + + /** + * Zoom in on the canvas. + */ + zoomIn: function () { nf.Canvas.View.zoomIn(); // hide the context menu @@ -38,8 +41,11 @@ nf.ng.Canvas.NavigateCtrl = (function () { transition: true }); }, - - zoomOut: function(){ + + /** + * Zoom out on the canvas. + */ + zoomOut: function () { nf.Canvas.View.zoomOut(); // hide the context menu @@ -50,8 +56,11 @@ nf.ng.Canvas.NavigateCtrl = (function () { transition: true }); }, - - zoomFit: function(){ + + /** + * Zoom fit on the canvas. + */ + zoomFit: function () { nf.Canvas.View.fit(); // hide the context menu @@ -62,8 +71,11 @@ nf.ng.Canvas.NavigateCtrl = (function () { transition: true }); }, - - zoomActualSize: function(){ + + /** + * Zoom actual size on the canvas. + */ + zoomActualSize: function () { nf.Canvas.View.actualSize(); // hide the context menu diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-output-port-component.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-output-port-component.js index 5a27d48103..11700e2a8d 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-output-port-component.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-output-port-component.js @@ -74,7 +74,7 @@ nf.ng.OutputPortComponent = (function () { * The output port component's modal. */ modal: { - + /** * Gets the modal element. * diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-processor-component.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-processor-component.js index 7451c7509d..96e2d9247e 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-processor-component.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-processor-component.js @@ -249,12 +249,12 @@ nf.ng.ProcessorComponent = (function () { * The processor component's modal. */ modal: { - + /** * The processor component modal's filter. */ filter: { - + /** * Initialize the filter. */ diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-remote-process-group-component.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-remote-process-group-component.js index 3588e85841..bda0f78a8d 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-remote-process-group-component.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-remote-process-group-component.js @@ -74,7 +74,7 @@ nf.ng.RemoteProcessGroupComponent = (function () { * The remote group component's modal. */ modal: { - + /** * Gets the modal element. * diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-template-component.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-template-component.js index 96523df45a..4f0b4331f0 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-template-component.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-template-component.js @@ -66,7 +66,7 @@ nf.ng.TemplateComponent = (function () { * The template component's modal. */ modal: { - + /** * Gets the modal element. * diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-ng-canvas-app-config.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-ng-canvas-app-config.js index 5c8f3d7ba4..ad32e3e640 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-ng-canvas-app-config.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-ng-canvas-app-config.js @@ -27,14 +27,14 @@ nf.ng.Canvas.AppConfig = (function () { $mdThemingProvider.definePalette('basePalette', { '50': '728E9B', '100': '728E9B', - '200': '004849',/* link-color */ - '300': '775351',/* value-color */ + '200': '004849', /* link-color */ + '300': '775351', /* value-color */ '400': '728E9B', - '500': '728E9B',/* base-color */ + '500': '728E9B', /* base-color */ '600': '728E9B', '700': '728E9B', '800': '728E9B', - '900': 'rgba(249,250,251,0.97)',/* tint base-color 96% */ + '900': 'rgba(249,250,251,0.97)', /* tint base-color 96% */ 'A100': '728E9B', 'A200': '728E9B', 'A400': '728E9B', @@ -46,13 +46,13 @@ nf.ng.Canvas.AppConfig = (function () { $mdThemingProvider.definePalette('tintPalette', { '50': '728E9B', '100': '728E9B', - '200': 'CCDADB',/* tint link-color 20% */ + '200': 'CCDADB', /* tint link-color 20% */ '300': '728E9B', - '400': 'AABBC3',/* tint base-color 40% */ + '400': 'AABBC3', /* tint base-color 40% */ '500': '728E9B', - '600': 'C7D2D7',/* tint base-color 60% */ + '600': 'C7D2D7', /* tint base-color 60% */ '700': '728E9B', - '800': 'E3E8EB',/* tint base-color 80% */ + '800': 'E3E8EB', /* tint base-color 80% */ '900': '728E9B', 'A100': '728E9B', 'A200': '728E9B', @@ -68,7 +68,7 @@ nf.ng.Canvas.AppConfig = (function () { '200': 'BA554A', '300': 'BA554A', '400': 'BA554A', - '500': 'BA554A',/* warn-color */ + '500': 'BA554A', /* warn-color */ '600': 'BA554A', '700': 'BA554A', '800': 'BA554A', @@ -96,7 +96,7 @@ nf.ng.Canvas.AppConfig = (function () { }); } - AppConfig.$inject=['$mdThemingProvider', '$compileProvider']; + AppConfig.$inject = ['$mdThemingProvider', '$compileProvider']; return AppConfig; }()); \ No newline at end of file diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-ng-bridge.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-ng-bridge.js index f890a4e3eb..81603cce10 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-ng-bridge.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-ng-bridge.js @@ -24,16 +24,16 @@ nf.ng.Bridge = (function () { }; AngularBridge.prototype = { constructor: AngularBridge, - + /** * Sets the root scope for the angular application being bridged. * * @param {object} scope An object that refers to the application model. */ - setRootScope: function(scope){ + setRootScope: function (scope) { this.rootScope = scope; }, - + /** * Inspects the root scope of the bridged angular application to look up * objects (to be provided as the `this` context) and invoke methods. @@ -63,19 +63,19 @@ nf.ng.Bridge = (function () { var args = Array.prototype.slice.call(arguments, 2); var result = fun.apply(obj, args); this.rootScope.$apply(); - if(result){ + if (result) { return result; } }, /** * Inspects the root scope of the bridged angular application to look up - * and return object. - * + * and return object. + * * @param {string} name The name of the object to lookup. * @returns {Object|*} */ - get: function(name){ + get: function (name) { var objArray = name.split("."); var obj = this.rootScope; angular.forEach(objArray, function (value) { @@ -84,7 +84,7 @@ nf.ng.Bridge = (function () { return obj; }, - digest: function(){ + digest: function () { this.rootScope.$digest(); } }; diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-ng-service-provider.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-ng-service-provider.js index 1ad6f0df89..dfb19354ac 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-ng-service-provider.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-ng-service-provider.js @@ -24,21 +24,23 @@ nf.ng.ServiceProvider = (function () { }; ServiceProvider.prototype = { constructor: ServiceProvider, + /** * Registers the given `object` by `name`. * * @param {string} name The lookup name of the object being registered * @param {object} object The object to register */ - register: function(name, object) { + register: function (name, object) { serviceProvider[name] = object; }, + /** * Removes the given object from the registry. * * @param {string objectName The lookup name of the object to remove from the registry */ - remove: function(objectName) { + remove: function (objectName) { delete serviceProvider[objectName]; } }; @@ -46,7 +48,7 @@ nf.ng.ServiceProvider = (function () { return serviceProvider; } - ServiceProvider.$inject=[]; + ServiceProvider.$inject = []; return ServiceProvider; }()); \ No newline at end of file