Merge "Fix npm test"

This commit is contained in:
Jenkins 2017-06-29 13:52:35 +00:00 committed by Gerrit Code Review
commit 789e7cea2d
8 changed files with 58 additions and 56 deletions

View File

@ -57,11 +57,13 @@ module.exports = function (config) {
toxPath + 'xstatic/pkg/angular/data/angular-cookies.js',
toxPath + 'xstatic/pkg/angular_bootstrap/data/angular-bootstrap.js',
toxPath + 'xstatic/pkg/angular_gettext/data/angular-gettext.js',
toxPath + 'xstatic/pkg/angular_fileupload/data/ng-file-upload-all.js',
toxPath + 'xstatic/pkg/angular/data/angular-sanitize.js',
toxPath + 'xstatic/pkg/d3/data/d3.js',
toxPath + 'xstatic/pkg/rickshaw/data/rickshaw.js',
toxPath + 'xstatic/pkg/angular_smart_table/data/smart-table.js',
toxPath + 'xstatic/pkg/angular_lrdragndrop/data/lrdragndrop.js',
toxPath + 'xstatic/pkg/angular_schema_form/data/schema-form.js',
toxPath + 'xstatic/pkg/spin/data/spin.js',
toxPath + 'xstatic/pkg/spin/data/spin.jquery.js',

View File

@ -37,16 +37,16 @@
var tests = [
{
"func": "getCertificates",
"method": "get",
"path": "/api/barbican/certificates/",
"error": "Unable to retrieve SSL certificates."
func: "getCertificates",
method: "get",
path: "/api/barbican/certificates/",
error: "Unable to retrieve SSL certificates."
},
{
"func": "getSecrets",
"method": "get",
"path": "/api/barbican/secrets/",
"error": "Unable to retrieve secrets."
func: "getSecrets",
method: "get",
path: "/api/barbican/secrets/",
error: "Unable to retrieve secrets."
}
];

View File

@ -164,7 +164,7 @@
*/
function getListeners(id) {
var params = id ? {'params': {'loadbalancerId': id}} : {};
var params = id ? {params: {loadbalancerId: id}} : {};
return apiService.get('/api/lbaas/listeners/', params)
.error(function () {
toastService.add('error', gettext('Unable to retrieve listeners.'));
@ -183,7 +183,7 @@
function getListener(id, includeChildResources) {
var params = includeChildResources
? {'params': {'includeChildResources': includeChildResources}}
? {params: {includeChildResources: includeChildResources}}
: {};
return apiService.get('/api/lbaas/listeners/' + id + '/', params)
.error(function () {
@ -253,7 +253,7 @@
function getPool(id, includeChildResources) {
var params = includeChildResources
? {'params': {'includeChildResources': includeChildResources}}
? {params: {includeChildResources: includeChildResources}}
: {};
return apiService.get('/api/lbaas/pools/' + id + '/', params)
.error(function () {

View File

@ -38,18 +38,18 @@
function loadBalancersService($q, api, gettext) {
var operatingStatus = {
'ONLINE': gettext('Online'),
'OFFLINE': gettext('Offline'),
'DEGRADED': gettext('Degraded'),
'ERROR': gettext('Error')
ONLINE: gettext('Online'),
OFFLINE: gettext('Offline'),
DEGRADED: gettext('Degraded'),
ERROR: gettext('Error')
};
var provisioningStatus = {
'ACTIVE': gettext('Active'),
'PENDING_CREATE': gettext('Pending Create'),
'PENDING_UPDATE': gettext('Pending Update'),
'PENDING_DELETE': gettext('Pending Delete'),
'ERROR': gettext('Error')
ACTIVE: gettext('Active'),
PENDING_CREATE: gettext('Pending Create'),
PENDING_UPDATE: gettext('Pending Update'),
PENDING_DELETE: gettext('Pending Delete'),
ERROR: gettext('Error')
};
var service = {

View File

@ -49,9 +49,9 @@
var ctrl = this;
ctrl.loadBalancerAlgorithm = {
'ROUND_ROBIN': gettext('Round Robin'),
'LEAST_CONNECTIONS': gettext('Least Connections'),
'SOURCE_IP': gettext('Source IP')
ROUND_ROBIN: gettext('Round Robin'),
LEAST_CONNECTIONS: gettext('Least Connections'),
SOURCE_IP: gettext('Source IP')
};
ctrl.actions = rowActions.init($routeParams.loadbalancerId, $routeParams.listenerId).actions;
ctrl.membersTabActive = $window.membersTabActive;

View File

@ -184,15 +184,15 @@
}
var promise = {
'createloadbalancer': initCreateLoadBalancer,
'createlistener': initCreateListener,
'createpool': initCreatePool,
'createmonitor': initCreateMonitor,
'createmembers': initUpdateMemberList,
'editloadbalancer': initEditLoadBalancer,
'editlistener': initEditListener,
'editpool': initEditPool,
'editmonitor': initEditMonitor
createloadbalancer: initCreateLoadBalancer,
createlistener: initCreateListener,
createpool: initCreatePool,
createmonitor: initCreateMonitor,
createmembers: initUpdateMemberList,
editloadbalancer: initEditLoadBalancer,
editlistener: initEditListener,
editpool: initEditPool,
editmonitor: initEditMonitor
}[type](keymanagerPromise);
return promise.then(onInitSuccess, onInitFail);
@ -529,7 +529,7 @@
member.address = member.addresses[0];
if (model.spec.pool.protocol) {
member.port = {'HTTP': 80}[model.spec.pool.protocol];
member.port = {HTTP: 80}[model.spec.pool.protocol];
}
});
}

View File

@ -87,19 +87,19 @@
return deferred.promise;
},
getLoadBalancer: function() {
var loadbalancer = {
id: '1234',
name: 'Load Balancer 1',
vip_address: '1.2.3.4',
vip_subnet_id: 'subnet-1',
description: ''
};
var loadbalancer = {
id: '1234',
name: 'Load Balancer 1',
vip_address: '1.2.3.4',
vip_subnet_id: 'subnet-1',
description: ''
};
var deferred = $q.defer();
deferred.resolve({ data: loadbalancer });
var deferred = $q.defer();
deferred.resolve({ data: loadbalancer });
return deferred.promise;
},
return deferred.promise;
},
getListeners: function() {
var listeners = [
{ id: '1234', name: 'Listener 1', protocol_port: 80 },

View File

@ -6,19 +6,19 @@
"repository": "none",
"license": "Apache 2.0",
"devDependencies": {
"eslint": "1.2.1",
"eslint-config-openstack": "1.2.3",
"eslint-plugin-angular": "0.15.0",
"jasmine-core": "2.2.0",
"karma": "0.12.31",
"karma-chrome-launcher": "0.1.8",
"karma-cli": "0.0.4",
"karma-coverage": "0.3.1",
"karma-jasmine": "0.3.5",
"karma-ng-html2js-preprocessor": "0.1.2",
"karma-phantomjs-launcher": "0.2.0",
"eslint": "1.10.3",
"eslint-config-openstack": "1.2.4",
"eslint-plugin-angular": "1.0.1",
"jasmine-core": "2.4.1",
"karma": "1.1.2",
"karma-chrome-launcher": "1.0.1",
"karma-cli": "1.0.1",
"karma-coverage": "1.1.1",
"karma-jasmine": "1.0.2",
"karma-ng-html2js-preprocessor": "1.0.0",
"karma-phantomjs-launcher": "1.0.4",
"karma-threshold-reporter": "0.1.15",
"phantomjs": "1.9.17"
"phantomjs-prebuilt": "2.1.14"
},
"scripts": {
"postinstall": "neutron_lbaas_dashboard/post_install.sh",