diff --git a/horizon/static/framework/widgets/load-edit/load-edit.directive.spec.js b/horizon/static/framework/widgets/load-edit/load-edit.directive.spec.js index a602026947..c4f45047f6 100644 --- a/horizon/static/framework/widgets/load-edit/load-edit.directive.spec.js +++ b/horizon/static/framework/widgets/load-edit/load-edit.directive.spec.js @@ -84,7 +84,7 @@ }; var fileInput = element.find('input[type="file"]'); - var e = jQuery.Event( "change", {originalEvent: {target: {files: [['hi']]}}}); + var e = jQuery.Event("change", {originalEvent: {target: {files: [['hi']]}}}); fileInput.trigger(e); contentPromise.promise.then(function() { @@ -97,7 +97,7 @@ it('should handle when no file is passed in', function() { var fileInput = element.find('input[type="file"]'); - var e = jQuery.Event( "change", {originalEvent: {target: {files: []}}}); + var e = jQuery.Event("change", {originalEvent: {target: {files: []}}}); fileInput.trigger(e); diff --git a/horizon/static/framework/widgets/table/hz-resource-table.controller.js b/horizon/static/framework/widgets/table/hz-resource-table.controller.js index 107e913daf..b93209f16f 100644 --- a/horizon/static/framework/widgets/table/hz-resource-table.controller.js +++ b/horizon/static/framework/widgets/table/hz-resource-table.controller.js @@ -92,7 +92,7 @@ // the items page (like create "volume" from image). var deletedIds, updatedIds, createdIds, failedIds; - if ( result ) { + if (result) { // Reduce the results to just item ids ignoring other types the action // may have produced deletedIds = actionResultService.getIdsOfType(result.deleted, ctrl.resourceType.type); @@ -106,7 +106,7 @@ } // Handle updated and created items - if ( updatedIds.length || createdIds.length ) { + if (updatedIds.length || createdIds.length) { // Ideally, get each created item individually, but // this is simple and robust for the common use case. // TODO: If we want more detailed updates, we could do so here. diff --git a/horizon/static/framework/widgets/wizard/wizard.spec.js b/horizon/static/framework/widgets/wizard/wizard.spec.js index b69b571ce5..a38e1e2954 100644 --- a/horizon/static/framework/widgets/wizard/wizard.spec.js +++ b/horizon/static/framework/widgets/wizard/wizard.spec.js @@ -251,7 +251,7 @@ launchContext = { my: 'data' }; ctrl = $controller('ModalContainerController', { $scope: scope, $modalInstance: modalInstance, - launchContext: launchContext } ); + launchContext: launchContext }); })); it('is defined', function() { diff --git a/horizon/static/horizon/js/horizon.d3linechart.js b/horizon/static/horizon/js/horizon.d3linechart.js index d2648bc332..804da8e24e 100644 --- a/horizon/static/horizon/js/horizon.d3linechart.js +++ b/horizon/static/horizon/js/horizon.d3linechart.js @@ -164,10 +164,10 @@ */ Rickshaw.namespace('Rickshaw.Graph.Renderer.StaticAxes'); -Rickshaw.Graph.Renderer.StaticAxes = Rickshaw.Class.create( Rickshaw.Graph.Renderer.Line, { +Rickshaw.Graph.Renderer.StaticAxes = Rickshaw.Class.create(Rickshaw.Graph.Renderer.Line, { name: 'StaticAxes', defaults: function($super) { - return Rickshaw.extend( $super(), { + return Rickshaw.extend($super(), { xMin: undefined, xMax: undefined, yMin: undefined, diff --git a/horizon/static/horizon/js/horizon.d3piechart.js b/horizon/static/horizon/js/horizon.d3piechart.js index 16fd82b587..a7b539b54d 100644 --- a/horizon/static/horizon/js/horizon.d3piechart.js +++ b/horizon/static/horizon/js/horizon.d3piechart.js @@ -24,7 +24,7 @@ var RADIUS = 45; function create_vis(chart) { return d3.select(chart).append("svg:svg") .attr("class", "chart legacy-pie-chart") - .attr("viewBox", "0 0 " + WIDTH + " " + HEIGHT ) + .attr("viewBox", "0 0 " + WIDTH + " " + HEIGHT) .append("g") .attr("transform", "translate(" + (WIDTH / 2) + "," + (HEIGHT / 2) + ")"); diff --git a/horizon/static/horizon/js/horizon.firewalls.js b/horizon/static/horizon/js/horizon.firewalls.js index 2de2c19435..99e6b05fad 100644 --- a/horizon/static/horizon/js/horizon.firewalls.js +++ b/horizon/static/horizon/js/horizon.firewalls.js @@ -94,8 +94,8 @@ horizon.firewalls = { }); $("#ruleListId ul").html( lists.sort(function(a,b){ - if( $(a).data("index") < $(b).data("index")) { return -1; } - if( $(a).data("index") > $(b).data("index")) { return 1; } + if($(a).data("index") < $(b).data("index")) { return -1; } + if($(a).data("index") > $(b).data("index")) { return 1; } return 0; }) ); @@ -201,8 +201,8 @@ horizon.firewalls = { }); $("#routerListId ul").html( lists.sort(function(a,b){ - if( $(a).data("index") < $(b).data("index")) { return -1; } - if( $(a).data("index") > $(b).data("index")) { return 1; } + if($(a).data("index") < $(b).data("index")) { return -1; } + if($(a).data("index") > $(b).data("index")) { return 1; } return 0; }) ); diff --git a/horizon/static/horizon/js/horizon.instances.js b/horizon/static/horizon/js/horizon.instances.js index 73eaba92b1..028680ee6f 100644 --- a/horizon/static/horizon/js/horizon.instances.js +++ b/horizon/static/horizon/js/horizon.instances.js @@ -98,8 +98,8 @@ horizon.instances = { }); networkListId.find("ul").html( lists.sort(function(a,b){ - if( $(a).data("index") < $(b).data("index")) { return -1; } - if( $(a).data("index") > $(b).data("index")) { return 1; } + if($(a).data("index") < $(b).data("index")) { return -1; } + if($(a).data("index") > $(b).data("index")) { return 1; } return 0; }) ); diff --git a/horizon/static/horizon/js/horizon.membership.js b/horizon/static/horizon/js/horizon.membership.js index 71518af6bb..1e90f65d8c 100644 --- a/horizon/static/horizon/js/horizon.membership.js +++ b/horizon/static/horizon/js/horizon.membership.js @@ -283,7 +283,7 @@ horizon.membership = { * displays a message to the user. **/ detect_no_results: function (step_slug) { - $('.' + step_slug + '_filterable').each( function () { + $('.' + step_slug + '_filterable').each(function () { var css_class = $(this).find('ul').attr('class'); // Example value: members step_slug_members // Pick the class name that contains the step_slug @@ -369,7 +369,7 @@ horizon.membership = { * Fixes the striping of the fake table upon modification of the lists. **/ fix_stripes: function(step_slug) { - $('.fake_' + step_slug + '_table').each( function () { + $('.fake_' + step_slug + '_table').each(function () { var filter = "." + $(this).attr('id'); var visible = " .btn-group:visible"; var even = " .btn-group:visible:even"; @@ -437,7 +437,7 @@ horizon.membership = { * Calls set-up functions upon loading the workflow. **/ workflow_init: function(modal, step_slug, step_id) { - $(modal).find('form').each( function () { + $(modal).find('form').each(function () { var $form = $(this); // Do nothing if this isn't a membership modal @@ -480,7 +480,7 @@ horizon.membership = { horizon.membership.detect_no_results(step_slug); // fix initial striping of rows - $form.find('.fake_' + step_slug + '_table').each( function () { + $form.find('.fake_' + step_slug + '_table').each(function () { var filter = "." + $(this).attr('id'); $(filter + ' .btn-group:even').addClass('dark_stripe'); $(filter + ' .btn-group:last').addClass('last_stripe'); diff --git a/horizon/static/horizon/js/horizon.modals.js b/horizon/static/horizon/js/horizon.modals.js index a56289a7be..558bb0ed3e 100644 --- a/horizon/static/horizon/js/horizon.modals.js +++ b/horizon/static/horizon/js/horizon.modals.js @@ -399,9 +399,9 @@ horizon.addInitFunction(horizon.modals.init = function() { $(document).on('click', '.openstack-spin', function(ev) { // NOTE(tsufiev): prevent infinite 'Loading' spinner when opening link // in the other browser tab with mouse wheel or mouse lbutton + modifier - if ( ev.which !== MOUSE_WHEEL_CODE_NORMALIZED && - !( ev.which === MOUSE_LBUTTON_CODE_NORMALIZED && - ( ev.shiftKey || ev.ctrlKey || ev.metaKey ) ) ) { + if (ev.which !== MOUSE_WHEEL_CODE_NORMALIZED && + !(ev.which === MOUSE_LBUTTON_CODE_NORMALIZED && + (ev.shiftKey || ev.ctrlKey || ev.metaKey))) { horizon.modals.modal_spinner(gettext("Loading")); } }); diff --git a/horizon/static/horizon/js/horizon.networktopology.js b/horizon/static/horizon/js/horizon.networktopology.js index 8f4396660f..fdd9b39445 100644 --- a/horizon/static/horizon/js/horizon.networktopology.js +++ b/horizon/static/horizon/js/horizon.networktopology.js @@ -286,7 +286,7 @@ horizon.network_topology = { var k = 0; var offset = 40; - while ( k < nodes.length) { + while (k < nodes.length) { var n = nodes[k]; if (n.data !== undefined) { if (n.data instanceof Server) { @@ -433,7 +433,7 @@ horizon.network_topology = { .style('stroke', 'black') .style('stroke-width', 3); - switch ( data.data.iconType ) { + switch (data.data.iconType) { case 'text': nodeEnter.append('text') .style('fill', 'black') diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/flavor/flavor.controller.js b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/flavor/flavor.controller.js index 0545235c84..35b5373f71 100644 --- a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/flavor/flavor.controller.js +++ b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/flavor/flavor.controller.js @@ -329,7 +329,7 @@ // Check source minimum requirements against this flavor var sourceType = launchInstanceModel.newInstanceSpec.source_type; if (source && sourceType && - (sourceType.type === 'image' || sourceType.type === 'snapshot') ) { + (sourceType.type === 'image' || sourceType.type === 'snapshot')) { if (source.min_disk > 0 && source.min_disk > flavor.disk) { /*eslint-disable max-len */ var srcMinDiskMsg = gettext('The selected %(sourceType)s source requires a flavor with at least %(minDisk)s GB of root disk. Select a flavor with a larger root disk or use a different %(sourceType)s source.'); diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/flavor/flavor.spec.js b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/flavor/flavor.spec.js index a1434d4b59..c388fb032d 100644 --- a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/flavor/flavor.spec.js +++ b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/flavor/flavor.spec.js @@ -77,7 +77,7 @@ describe("watches", function () { - beforeEach( function() { + beforeEach(function() { // Mock out calls made by the watch listeners to minimize // the amount of mock data needed to successfully trigger // a watch listener diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.js b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.js index 1b98f75976..141ac87c6e 100644 --- a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.js +++ b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.js @@ -331,7 +331,7 @@ } function setFinalSpecFlavor(finalSpec) { - if ( finalSpec.flavor ) { + if (finalSpec.flavor) { finalSpec.flavor_id = finalSpec.flavor.id; } else { delete finalSpec.flavor_id; diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.spec.js b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.spec.js index b1238bb2ef..95b6b93c0c 100644 --- a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.spec.js +++ b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.spec.js @@ -473,7 +473,7 @@ model.initialize(true); scope.$apply(); expect(model.newInstanceSpec.key_pair.length).toBe(1); - expect(model.newInstanceSpec.key_pair).toEqual( [ keypair.keypair ] ); + expect(model.newInstanceSpec.key_pair).toEqual([ keypair.keypair ]); }); it('should set a security group by default if one named "default" is available', diff --git a/openstack_dashboard/static/app/core/openstack-service-api/nova.service.js b/openstack_dashboard/static/app/core/openstack-service-api/nova.service.js index 3f4e935aff..7820b48046 100644 --- a/openstack_dashboard/static/app/core/openstack-service-api/nova.service.js +++ b/openstack_dashboard/static/app/core/openstack-service-api/nova.service.js @@ -326,15 +326,15 @@ // in Angular $parse() statements. Since these values are used as keys // to lookup data (and may end up in a $parse()) provide "user-friendly" // attributes - if ( data && data.items ) { + if (data && data.items) { data.items.map(function(item) { - if ( item.hasOwnProperty('OS-FLV-EXT-DATA:ephemeral')) { + if (item.hasOwnProperty('OS-FLV-EXT-DATA:ephemeral')) { item.ephemeral = item['OS-FLV-EXT-DATA:ephemeral']; } - if ( item.hasOwnProperty('OS-FLV-DISABLED:disabled')) { + if (item.hasOwnProperty('OS-FLV-DISABLED:disabled')) { item.disabled = item['OS-FLV-DISABLED:disabled']; } - if ( item.hasOwnProperty('os-flavor-access:is_public')) { + if (item.hasOwnProperty('os-flavor-access:is_public')) { item.is_public = item['os-flavor-access:is_public']; } });