Skip to content

Commit

Permalink
Merge pull request #621 from kbase/develop
Browse files Browse the repository at this point in the history
Develop -> Master (1.6.7)
  • Loading branch information
eapearson committed Mar 12, 2018
2 parents 8fd3d71 + c65cca5 commit 760de55
Show file tree
Hide file tree
Showing 13 changed files with 128 additions and 38 deletions.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ CI_DOCKER_CONTEXT = $(TOPDIR)/deployment/ci/docker/context
PROD_DOCKER_CONTEXT = $(TOPDIR)/deployment/prod/docker/context
PROXIER_DOCKER_CONTEXT = $(TOPDIR)/tools/proxier/docker/context

# functions
# thanks https://stackoverflow.com/questions/10858261/abort-makefile-if-variable-not-set
check_defined = \
$(strip $(foreach 1,$1, \
$(call __check_defined,$1,$(strip $(value 2)))))
__check_defined = \
$(if $(value $1),, \
$(error Undefined $1$(if $2, ($2))$(if $(value @), \
required by target `$@')))

# Standard 'all' target = just do the standard build
all:
@echo Use "make init && make config=TARGET build"
Expand Down Expand Up @@ -159,6 +169,7 @@ unit-tests:
$(KARMA) start test/unit-tests/karma.conf.js

integration-tests:
@:$(call check_defined, host, first component of hostname)
$(GRUNT) integration-tests --host=$(host)

travis-tests:
Expand Down
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
"jquery": "2.2.4",
"jquery-ui": "1.12.1",
"js-yaml": "3.10.0",
"kbase-common-ts": "0.17.0",
"kbase-common-js": "2.15.1",
"kbase-common-ts": "0.18.0",
"kbase-common-js": "2.15.2",
"kbase-sdk-clients-js": "0.5.1",
"kbase-service-clients-js": "3.3.5",
"kbase-ui-widget": "1.2.1",
Expand Down
6 changes: 3 additions & 3 deletions config/app/dev/plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,14 @@ plugins:
-
name: auth2-client
globalName: kbase-ui-plugin-auth2-client
version: 1.2.17
version: 1.2.18
cwd: src/plugin
source:
bower: {}
-
name: user-profile
globalName: kbase-ui-plugin-user-profile
version: 1.4.1
version: 1.4.2
cwd: src/plugin
source:
bower: {}
Expand Down Expand Up @@ -160,7 +160,7 @@ plugins:
-
name: jgi-search
globalName: kbase-ui-plugin-jgi-search
version: 0.31.8
version: 0.32.0
cwd: src/plugin
source:
bower: {}
Expand Down
6 changes: 3 additions & 3 deletions config/app/prod/plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,14 @@ plugins:
-
name: auth2-client
globalName: kbase-ui-plugin-auth2-client
version: 1.2.17
version: 1.2.18
cwd: src/plugin
source:
bower: {}
-
name: user-profile
globalName: kbase-ui-plugin-user-profile
version: 1.4.1
version: 1.4.2
cwd: src/plugin
source:
bower: {}
Expand Down Expand Up @@ -160,7 +160,7 @@ plugins:
-
name: jgi-search
globalName: kbase-ui-plugin-jgi-search
version: 0.31.8
version: 0.32.0
cwd: src/plugin
source:
bower: {}
Expand Down
2 changes: 1 addition & 1 deletion config/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
---
# Note that this file is merged into the master config in the release namespace.
release:
version: 1.6.6
version: 1.6.7
36 changes: 36 additions & 0 deletions release-notes/RELEASE_NOTES_1.6.7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# KBase kbase-ui 1.6.7 Release Notes

The purpose of this release is to improve search history for jgi-search. An additional nicety is that the fuzzy profile gravatar is finally fixed.


## CHANGES

### NEW

n/a

### REMOVED

n/a

### UNRELEASED

n/a

### IMPROVEMENTS

- jgi-search: feedback button sends user information to pre-fill feedback form
- https://github.com/kbase/kbase-ui-plugin-jgi-search/commit/d2814e49498272ed50ddd36b99e84857b718b6c4
- integration testing: disable tests, test for text by regex
- https://github.com/kbase/kbase-ui/commit/05be27656860a4e44818f1beca592bac59c56583
- user-profile: fixed gravatar fuzziness
- https://github.com/kbase/kbase-ui/commit/c25a91a69c2d7faac41cd1512030d1ff39e44521

### FIXES

- jgi-search: search history behaves better (as expected)
- https://github.com/kbase/kbase-ui-plugin-jgi-search/commit/83269c919f5bfd9a49f193892e71023f47efb737

## Dependency Changes

n/a
1 change: 1 addition & 0 deletions release-notes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
| Version | Date | Notes |
|-----------------------------------|------------|---------------------|
| [1.6.7](RELEASE_NOTES_1.6.7.md) | 2018-03-12 | |
| [1.6.6](RELEASE_NOTES_1.6.6.md) | 2018-03-09 | |
| [1.6.5](RELEASE_NOTES_1.6.5.md) | 2018-03-09 | |
| [1.6.4](RELEASE_NOTES_1.6.4.md) | 2018-02-27 | |
Expand Down
41 changes: 29 additions & 12 deletions src/client/modules/app/services/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,10 @@ define([
authorization: false,
widget: 'notFound'
}
}
// runtime.send('app', 'route-not-found', ex);
// return;
};
} else {
throw ex;
}



// throw new NotFoundException({
// original: req.original,
// path: req.path,
// params: params
// });

}
runtime.send('route', 'routing', handler);
if (handler.route.authorization) {
Expand All @@ -63,6 +52,34 @@ define([
return;
}
}
if (handler.route.rolesRequired) {
var roles = runtime.service('session').getRoles();
if (!roles.some(function (role) {
return handler.route.rolesRequired.some(function (requiredRole) {
return requiredRole === role.id;
});
})) {
handler = {
params: {
title: 'Access Error',
error: 'One or more required roles not available in your account: ' + handler.route.rolesRequired.join(', ')
},
route: {
authorization: false,
widget: 'error'
}
};
// throw new Error('One or more required roles not available in your account: ' + handler.route.requiredRoles.join(', '));
// throw new lang.UIError({
// type: 'ConfiguratonError',
// name: 'RouterConfigurationError',
// source: 'installRoute',
// message: 'invalid route',
// suggestion: 'Fix the plugin which specified this route.',
// data: route
// });
}
}
var route = {
routeHandler: handler
};
Expand Down
10 changes: 6 additions & 4 deletions src/client/modules/app/services/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ define([
function factory(config) {
var runtime = config.runtime;

var cookieName = config.cookie.name;
var cookieMaxAge = config.cookie.maxAge;

var extraCookies = [];
if (config.cookie.backup.enabled) {
extraCookies.push({
Expand Down Expand Up @@ -54,6 +51,10 @@ define([
return auth2Session.getRealname();
}

function getRoles() {
return auth2Session.getRoles();
}

function getTokenInfo() {
return auth2Session.getTokenInfo();
}
Expand Down Expand Up @@ -187,7 +188,7 @@ define([
function stop() {
auth2Session.stop()
.then(function () {
session = null;
// session = null;
});
}

Expand All @@ -211,6 +212,7 @@ define([
getEmail: getEmail,
getUsername: getUsername,
getRealname: getRealname,
getRoles: getRoles,
isLoggedIn: isLoggedIn,
isAuthorized: isAuthorized,
getKbaseSession: getKbaseSession,
Expand Down
4 changes: 3 additions & 1 deletion src/client/modules/lib/knockout-plus.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,9 @@ define([
'<!-- /ko -->'
]);
var node = temp.firstChild;
ko.applyBindings(vm, node);
ko.applyBindings(vm, node, function (context) {
context.runtime = runtime;
});

function start() {
vm.running(true);
Expand Down
1 change: 1 addition & 0 deletions src/plugins/mainwindow/modules/bodyWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ define([
console.error('ERROR mounting widget', err, data);
widgetMount.unmount()
.then(function () {
// Note that 'error' is a globally defined widget dependency.
return widgetMount.mountWidget('error', {
title: 'ERROR',
error: err
Expand Down
5 changes: 4 additions & 1 deletion src/plugins/mainwindow/modules/widgets/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@ define([
error.extended = html.makeObjTable([error.extra], { rotated: true });
}

return div({ class: 'container-fluid', dataWidget: 'error' }, html.makePanel({
return div({
class: 'container-fluid',
dataWidget: 'error'
}, html.makePanel({
title: params.title,
class: 'danger',
content: html.makeObjTable([error], { rotated: true })
Expand Down
39 changes: 28 additions & 11 deletions src/test/integration-tests/specs/runner.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*global describe, it, browser, exports */
/*global describe, it, browser, expect, exports */

var fs = require('fs');

Expand Down Expand Up @@ -33,24 +33,41 @@ function extend(path, elements) {

function runTest(test) {
describe(test.description, function () {
if (test.disabled) {
return;
}
var defaultUrl = test.defaultUrl || '/';
test.specs.forEach(function (spec) {
if (spec.disabled) {
return;
}
it(spec.description, function () {
browser.url('/');
var url = spec.url || defaultUrl;
browser.url(url);
spec.tasks.forEach(function (task) {
if (task.selector) {
var selector = buildSelector(extend(spec.baseSelector, task.selector));
var result;
if (task.wait) {
browser.waitForExist(selector, task.wait);
result = browser.waitForExist(selector, task.wait);
} else if (task.exists) {
browser.isExisting(selector);
result = browser.isExisting(selector);
}
if (task.action) {
switch (task.action) {
case 'click':
browser.click(selector);
break;
default:
throw new Error('Unknown task action ' + task.action);

// only proceed with a further action if succeeded so far.
if (result) {
if (task.text) {
var text = browser.getText(selector);
expect(text).toMatch(new RegExp(task.text));
}
if (task.action) {
switch (task.action) {
case 'click':
browser.click(selector);
break;
default:
throw new Error('Unknown task action ' + task.action);
}
}
}
} else if (task.navigate) {
Expand Down

0 comments on commit 760de55

Please sign in to comment.