Enforce semicolon insertion
Change-Id: Ic249f647fb6daa8740d57be805dc87438495e3ee
This commit is contained in:
parent
98ea103106
commit
0b5f934119
|
@ -119,7 +119,7 @@
|
|||
quote-props: [2, as-needed]
|
||||
quotes: [2, single, avoid-escape]
|
||||
semi-spacing: [2, {before: false, after: true}]
|
||||
semi: [0, always]
|
||||
semi: [2, always]
|
||||
space-after-keywords: [2, always]
|
||||
space-before-blocks: [2, always]
|
||||
space-before-function-paren: [2, never]
|
||||
|
|
|
@ -131,7 +131,7 @@ define(
|
|||
<button
|
||||
className='btn btn-link'
|
||||
disabled={this.props.disabled}
|
||||
onClick={_.bind(function() {this.props.onAdd(this.props.model)}, this)}
|
||||
onClick={_.bind(function() {this.props.onAdd(this.props.model);}, this)}
|
||||
>
|
||||
<i className='glyphicon glyphicon-plus-sign' />
|
||||
</button>
|
||||
|
@ -139,7 +139,7 @@ define(
|
|||
<button
|
||||
className='btn btn-link'
|
||||
disabled={this.props.disabled}
|
||||
onClick={_.bind(function() {this.props.onRemove(this.props.model)}, this)}
|
||||
onClick={_.bind(function() {this.props.onRemove(this.props.model);}, this)}
|
||||
>
|
||||
<i className='glyphicon glyphicon-minus-sign' />
|
||||
</button>
|
||||
|
@ -255,7 +255,7 @@ define(
|
|||
|
||||
({node.get('mac')})
|
||||
</li>
|
||||
)
|
||||
);
|
||||
})
|
||||
}
|
||||
</ul>
|
||||
|
|
|
@ -75,9 +75,10 @@ define([
|
|||
}
|
||||
return matchFound;
|
||||
}
|
||||
)},
|
||||
false
|
||||
);
|
||||
);
|
||||
},
|
||||
false
|
||||
);
|
||||
})
|
||||
.then(function(result) {
|
||||
if (!result) {
|
||||
|
|
|
@ -100,7 +100,8 @@ define([
|
|||
function(name) {
|
||||
return (name === clusterName) || matchFound;
|
||||
}
|
||||
)}, false);
|
||||
);
|
||||
}, false);
|
||||
});
|
||||
},
|
||||
addNodesToCluster: function(nodesAmount, nodesRoles, nodeStatus, nodeNameFilter) {
|
||||
|
|
|
@ -38,7 +38,7 @@ define([
|
|||
.then(function(currentIfcName) {
|
||||
return _.trim(currentIfcName) == ifcName ? ifcElement : result;
|
||||
});
|
||||
})
|
||||
});
|
||||
}, null);
|
||||
});
|
||||
},
|
||||
|
@ -83,7 +83,7 @@ define([
|
|||
.getVisibleText()
|
||||
.then(function(currentNetworkName) {
|
||||
return currentNetworkName == networkName ? networkElement : result;
|
||||
})
|
||||
});
|
||||
}, null);
|
||||
})
|
||||
.then(function(networkElement) {
|
||||
|
@ -126,7 +126,7 @@ define([
|
|||
var self = this;
|
||||
return this.remote
|
||||
.then(function() {
|
||||
return self.findInterfaceElement(bondName)
|
||||
return self.findInterfaceElement(bondName);
|
||||
})
|
||||
.then(function(bondElement) {
|
||||
ifcsNames.push(bondName);
|
||||
|
|
|
@ -59,8 +59,8 @@ define([
|
|||
.clickByCssSelector('.user-popover button.btn-logout')
|
||||
.findByCssSelector('.login-btn')
|
||||
.then(
|
||||
function() {return true},
|
||||
function() {return true}
|
||||
function() {return true;},
|
||||
function() {return true;}
|
||||
);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -30,11 +30,11 @@ define(['../../helpers'], function() {
|
|||
.clickByCssSelector('.welcome-button-box button')
|
||||
.waitForDeletedByCssSelector('.welcome-button-box button', 2000)
|
||||
.then(
|
||||
function() {return true},
|
||||
function() {return !strictCheck}
|
||||
function() {return true;},
|
||||
function() {return !strictCheck;}
|
||||
);
|
||||
},
|
||||
function() {return !strictCheck}
|
||||
function() {return !strictCheck;}
|
||||
);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -58,7 +58,7 @@ define([
|
|||
},
|
||||
'No deployment button when there are no nodes added': function() {
|
||||
return this.remote
|
||||
.assertElementNotExists(dashboardPage.deployButtonSelector, 'No deployment should be possible without nodes added')
|
||||
.assertElementNotExists(dashboardPage.deployButtonSelector, 'No deployment should be possible without nodes added');
|
||||
},
|
||||
'Discard changes': function() {
|
||||
return this.remote
|
||||
|
|
|
@ -138,7 +138,7 @@ define([
|
|||
})
|
||||
.clickByCssSelector(networksPage.applyButtonSelector)
|
||||
.assertElementsAppear('input:not(:disabled)', 2000, 'Inputs are not disabled')
|
||||
.assertElementNotExists('.alert-error', 'Correct settings were saved successfully')
|
||||
.assertElementNotExists('.alert-error', 'Correct settings were saved successfully');
|
||||
},
|
||||
'Testing cluster networks: save settings with group: network': function() {
|
||||
return this.remote
|
||||
|
|
|
@ -132,6 +132,6 @@ define([
|
|||
.assertElementDisabled('.btn-bond', 'Making sure bond button is disabled')
|
||||
.assertElementContainsText('.alert.alert-warning', ' network interface is already bonded with other network inteface.', 'Warning message should appear when intended to bond bonds');
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -34,7 +34,7 @@ define([
|
|||
return this.remote
|
||||
.then(function() {
|
||||
return common.getIn();
|
||||
})
|
||||
});
|
||||
},
|
||||
'Notification Page': function() {
|
||||
return this.remote
|
||||
|
|
|
@ -70,7 +70,7 @@ define([
|
|||
'All steps are available if no changes to restrictions are made')
|
||||
.clickByCssSelector('input[type=checkbox]')
|
||||
.assertElementExists('.wizard-step.available', 1,
|
||||
'Only one step is available after changing hypervisor')
|
||||
'Only one step is available after changing hypervisor');
|
||||
}
|
||||
};
|
||||
});
|
||||
|
|
|
@ -64,7 +64,7 @@ define(function() {
|
|||
},
|
||||
saveMethod = sinon.spy(input, 'saveFile');
|
||||
|
||||
window.FileReader = function() {return readerObject};
|
||||
window.FileReader = function() {return readerObject;};
|
||||
|
||||
sinon.stub(input, 'getInputDOMNode').returns({
|
||||
value: '/dummy/path/to/somefile.ext',
|
||||
|
|
|
@ -49,8 +49,12 @@ function($, _, i18n, Backbone, React, utils, models, dispatcher, componentMixins
|
|||
}),
|
||||
componentMixins.dispatcherMixin('networkConfigurationUpdated', 'removeFinishedNetworkTasks'),
|
||||
componentMixins.dispatcherMixin('deploymentTasksUpdated', 'removeFinishedDeploymentTasks'),
|
||||
componentMixins.dispatcherMixin('deploymentTaskStarted', function() {this.refreshCluster().always(_.bind(this.startPolling, this))}),
|
||||
componentMixins.dispatcherMixin('deploymentTaskFinished', function() {this.refreshCluster().always(_.bind(dispatcher.trigger, dispatcher, 'updateNotifications'))})
|
||||
componentMixins.dispatcherMixin('deploymentTaskStarted', function() {
|
||||
this.refreshCluster().always(this.startPolling);
|
||||
}),
|
||||
componentMixins.dispatcherMixin('deploymentTaskFinished', function() {
|
||||
this.refreshCluster().always(() => dispatcher.trigger('updateNotifications'));
|
||||
})
|
||||
],
|
||||
statics: {
|
||||
navbarActiveElement: 'clusters',
|
||||
|
|
|
@ -101,7 +101,7 @@ function($, _, i18n, Backbone, React, models, utils, componentMixins, controls)
|
|||
return {
|
||||
actionInProgress: false,
|
||||
credentialsVisible: null,
|
||||
credentials: _.transform(this.props.cluster.get('settings').get('access'), function(result, value, key) {result[key] = value.value})
|
||||
credentials: _.transform(this.props.cluster.get('settings').get('access'), function(result, value, key) {result[key] = value.value;})
|
||||
};
|
||||
},
|
||||
isLocked: function() {
|
||||
|
|
|
@ -1060,7 +1060,7 @@ function($, _, i18n, Backbone, React, models, dispatcher, utils, dialogs, compon
|
|||
isInvalid = networksErrors;
|
||||
} else {
|
||||
isInvalid = networksErrors &&
|
||||
!!networksErrors[nodeNetworkGroups.findWhere({name: groupName}).id]
|
||||
!!networksErrors[nodeNetworkGroups.findWhere({name: groupName}).id];
|
||||
}
|
||||
//FIXME(morale): this is a hack until default node network group
|
||||
//name is capitalized on backend
|
||||
|
|
|
@ -238,8 +238,8 @@ function($, _, i18n, Backbone, React, utils, models, ComponentMixins, controls)
|
|||
volumesInfo = this.props.volumesInfo,
|
||||
diskMetaData = this.props.diskMetaData,
|
||||
requiredDiskSize = _.sum(disk.get('volumes').map(function(volume) {
|
||||
return volume.getMinimalSize(this.props.volumes.findWhere({name: volume.get('name')}).get('min_size'))
|
||||
}, this)),
|
||||
return volume.getMinimalSize(this.props.volumes.findWhere({name: volume.get('name')}).get('min_size'));
|
||||
}, this)),
|
||||
diskError = disk.get('size') < requiredDiskSize,
|
||||
sortOrder = ['name', 'model', 'size'],
|
||||
ns = 'cluster_page.nodes_tab.configure_disks.';
|
||||
|
|
|
@ -115,7 +115,7 @@ function($, _, Backbone, React, i18n, utils, models, dispatcher, dialogs, contro
|
|||
if (ifc.isBond()) return null;
|
||||
return firstNodeInterfaces.indexOf(
|
||||
firstNodeInterfaces.findWhere({name: ifc.get('name')})
|
||||
)
|
||||
);
|
||||
})
|
||||
});
|
||||
},
|
||||
|
|
|
@ -106,7 +106,7 @@ function($, _, i18n, Backbone, React, utils, models, dispatcher, controls, dialo
|
|||
return {
|
||||
sorters: [],
|
||||
filters: []
|
||||
}
|
||||
};
|
||||
},
|
||||
getInitialState: function() {
|
||||
var cluster = this.props.cluster,
|
||||
|
|
|
@ -39,7 +39,7 @@ function($, _, React, i18n, utils) {
|
|||
},
|
||||
setModeState: function(mode, state) {
|
||||
mode.state = state;
|
||||
_.each(mode.sub, function(mode) {this.setModeState(mode, state)}, this);
|
||||
_.each(mode.sub, function(mode) {this.setModeState(mode, state);}, this);
|
||||
},
|
||||
checkModes: function(mode, sub) {
|
||||
var changedState = sub.reduce(
|
||||
|
|
|
@ -628,7 +628,7 @@ function($, _, i18n, Backbone, React, utils, models, dispatcher, controls, compo
|
|||
meta = node.get('meta');
|
||||
if (!meta) return <controls.ProgressBar />;
|
||||
var groupOrder = ['system', 'cpu', 'memory', 'disks', 'interfaces'],
|
||||
groups = _.sortBy(_.keys(meta), function(group) {return _.indexOf(groupOrder, group)}),
|
||||
groups = _.sortBy(_.keys(meta), (group) => _.indexOf(groupOrder, group)),
|
||||
sortOrder = {
|
||||
disks: ['name', 'model', 'size'],
|
||||
interfaces: ['name', 'mac', 'state', 'ip', 'netmask', 'current_speed', 'max_speed', 'driver', 'bus_info']
|
||||
|
|
|
@ -72,7 +72,7 @@ function($, _, i18n, React, Backbone, utils, models, componentMixins, dialogs, c
|
|||
_.map(warnings, function(warning) {
|
||||
return (
|
||||
<div key={warning}>{i18n(warning, this.props.wizard.translationParams)}</div>
|
||||
)
|
||||
);
|
||||
}, this)
|
||||
}
|
||||
</div>
|
||||
|
@ -170,7 +170,9 @@ function($, _, i18n, React, Backbone, utils, models, componentMixins, dialogs, c
|
|||
if (!release.get('is_deployable')) {
|
||||
return null;
|
||||
}
|
||||
return <option key={release.id} value={release.id}>{release.get('name')}</option>
|
||||
return (
|
||||
<option key={release.id} value={release.id}>{release.get('name')}</option>
|
||||
);
|
||||
})
|
||||
}
|
||||
</controls.Input>
|
||||
|
@ -420,7 +422,7 @@ function($, _, i18n, React, Backbone, utils, models, componentMixins, dialogs, c
|
|||
this.setState(newState);
|
||||
},
|
||||
getEnabledPanes: function() {
|
||||
return _.filter(this.state.panes, function(pane) {return !pane.hidden});
|
||||
return _.reject(this.state.panes, 'hidden');
|
||||
},
|
||||
getActivePane: function() {
|
||||
var panes = this.getEnabledPanes();
|
||||
|
@ -507,7 +509,7 @@ function($, _, i18n, React, Backbone, utils, models, componentMixins, dialogs, c
|
|||
response: response,
|
||||
title: i18n('dialog.create_cluster_wizard.create_cluster_error.title')
|
||||
});
|
||||
}, this))
|
||||
}, this));
|
||||
}, this))
|
||||
.fail(_.bind(function(response) {
|
||||
this.stopHandlingKeys = false;
|
||||
|
|
Loading…
Reference in New Issue