Merge "No more space-in-parens eslint errors"
This commit is contained in:
commit
a27854d5b2
@ -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);
|
||||
|
||||
|
@ -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.
|
||||
|
@ -251,7 +251,7 @@
|
||||
launchContext = { my: 'data' };
|
||||
ctrl = $controller('ModalContainerController',
|
||||
{ $scope: scope, $modalInstance: modalInstance,
|
||||
launchContext: launchContext } );
|
||||
launchContext: launchContext });
|
||||
}));
|
||||
|
||||
it('is defined', function() {
|
||||
|
@ -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,
|
||||
|
@ -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) + ")");
|
||||
|
@ -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;
|
||||
})
|
||||
);
|
||||
|
@ -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;
|
||||
})
|
||||
);
|
||||
|
@ -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');
|
||||
|
@ -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"));
|
||||
}
|
||||
});
|
||||
|
@ -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')
|
||||
|
@ -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.');
|
||||
|
@ -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
|
||||
|
@ -331,7 +331,7 @@
|
||||
}
|
||||
|
||||
function setFinalSpecFlavor(finalSpec) {
|
||||
if ( finalSpec.flavor ) {
|
||||
if (finalSpec.flavor) {
|
||||
finalSpec.flavor_id = finalSpec.flavor.id;
|
||||
} else {
|
||||
delete finalSpec.flavor_id;
|
||||
|
@ -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',
|
||||
|
@ -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'];
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user