Skip to content

Commit

Permalink
Merge 20802b5 into a59fd36
Browse files Browse the repository at this point in the history
  • Loading branch information
bio-boris committed Oct 14, 2020
2 parents a59fd36 + 20802b5 commit 0306b92
Show file tree
Hide file tree
Showing 15 changed files with 486 additions and 104 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ branches:
- develop
- master
- py3-update
- truss

before_install:
- gem install coveralls-lcov
Expand Down
3 changes: 2 additions & 1 deletion docs/deploy_narrative.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ The [next](https://next.kbase.us), [appdev](https://appdev.kbase.us), and [prod]

### Deploying Narrative-Refactor

The [narrative-refactor](https://narrative-refactor.kbase.us) image is built against the "truss" branch of the repo and is called narrative-truss:pr### when still in a PR state or narrative-truss:latest after merge
The [narrative-refactor](https://narrative-refactor.kbase.us) image is automatically built against the "truss" branch of the repo and is called narrative-truss:pr### when still in a PR state or narrative-truss:latest after merge. The images can be found here: https://github.com/orgs/kbase/packages


#### Create Release Image

Expand Down
88 changes: 66 additions & 22 deletions kbase-extension/static/kbase/css/kbaseNarrative.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,82 @@
font-weight: bold;
}

.kb-data-staging-decompress {
border: 1px solid #cccccc;
border-radius : 1px;
}

.kb-data-staging-table-name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.kb-data-staging-folder:hover {
cursor: pointer;
text-decoration: underline;
}

.kb-data-breadcrumb .kb-pointer a {
cursor: pointer;
}

.kb-data-staging-footer {
font-family : Oxygen, Arial, sans-serif;
font-family: Oxygen, Arial, sans-serif;
font-weight: bold;
font-size : 105%;
text-align : center;
background-color : #EEEEEE;
height : 32px;
padding : 8px;
font-size: 105%;
text-align: center;
background-color: #EEEEEE;
height: 32px;
padding: 8px;
}

.kb-data-staging-metadata-list {
font-family : Oxygen;
font-weight: bold;
width : 115px;
display : inline-block;
font-size : 90%;
font-family: Oxygen, Arial, sans-serif;
font-weight: bold;
width: 115px;
display: inline-block;
font-size: 90%;
}

.kb-data-staging-metadata-file-lines {
white-space : pre;
overflow : scroll;
font-family : monospace;
font-size : 90%;
background-color : #DDDDDD;
max-height : 200px;
white-space: pre;
overflow: scroll;
font-family: monospace;
font-size: 90%;
background-color: #DDDDDD;
max-height: 200px;
}

/* https://www.figma.com/file/T30UN3QhWhhV5SpXiqY1ij/KBase-component-library?node-id=1%3A4 */
.kb-data-staging-button {
background: none;
border: none;
cursor: pointer;
font-family: Oxygen, Arial, sans-serif;
font-style: normal;
font-weight: bold;
font-size: 14px;
line-height: 18px;
text-align: center;
text-transform: uppercase;
color: #4379B1;
height: 25px;
margin: 5px;
position: relative;
top: -3px;
}

.kb-data-stagingarea {
font-family: Oxygen, Arial, sans-serif;
font-style: normal;
font-weight: bold;
font-size: 24px;
line-height: 30px;
}

.kb-data-staging-spacer {
margin-top: 10px;
}

.kb-dropzone {
Expand Down Expand Up @@ -2437,7 +2482,7 @@ button.kb-data-obj {
.kb-data-list-add-data-button {

cursor:pointer;
background-color: #F44336;
background-color: #4379B1;
color: #fff;
border: none;
box-shadow: 1px 1px 3px #aaa;
Expand All @@ -2448,7 +2493,6 @@ button.kb-data-obj {
width: 30pt;
height: 30pt;
border-radius: 50%;
padding-top: 5pt;
}
/* specialize buttons that hover over narrative */
#kb-add-code-cell, #kb-add-md-cell {
Expand All @@ -2463,11 +2507,11 @@ button.kb-data-obj {

.kb-data-list-add-data-button:hover {
cursor:pointer;
background-color: #DC3C31;
background-color: #36618E;
}

.kb-data-list-add-data-text-button {
background-color: #F44336;
background-color: #4379B1;
border-radius: 1px;
color: #fff;
border: none;
Expand All @@ -2481,7 +2525,7 @@ button.kb-data-obj {
moz-box-shadow: 1px 1px 3px #aaa;
}
.kb-data-list-add-data-text-button:hover {
background-color: #DC3C31;
background-color: #36618E;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ define([
}
});

this.$addDataButton = $('<span>').addClass('kb-data-list-add-data-button fa fa-plus fa-2x')
this.$addDataButton = $('<button>').addClass('kb-data-list-add-data-button fa fa-plus fa-2x')
.attr('aria-label', 'add data')
.css({ 'position': 'absolute', bottom: '15px', right: '25px', 'z-index': '5' })
.click(function () {
_this.trigger('hideGalleryPanelOverlay.Narrative');
Expand Down Expand Up @@ -383,7 +384,7 @@ define([
console.error('ws: ' + this.ws);
return;
}
Promise.resolve(this.ws.get_workspace_info({
return Promise.resolve(this.ws.get_workspace_info({
workspace: this.ws_name
}))
.then(function (wsInfo) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ define([

options: {
refreshIntervalDuration: 30000,
path: '/'
},

init: function (options) {
Expand Down Expand Up @@ -272,7 +273,7 @@ define([
if (isFolder) {
disp = '<button data-name="' + full[1] + '" class="btn btn-xs btn-default">' + disp + '</button>';
} else {
disp = "<i class='fa fa-caret-right' data-caret='" + full[1] + "' style='cursor : pointer'></i> " + disp;
disp = '<i class="fa fa-caret-right kb-pointer" data-caret="' + full[1] + '"></i> ' + disp;
}
return disp;
} else {
Expand All @@ -284,11 +285,14 @@ define([
sClass: 'staging-name',
mRender: function (data, type, full) {
if (type === 'display') {

var decompressButton = '';
let decompressButton = '';

if (data.match(/\.(zip|tar\.gz|tgz|tar\.bz|tar\.bz2|tar|gz|bz2)$/)) {
decompressButton = "<button class='btn btn-default btn-xs' style='border : 1px solid #cccccc; border-radius : 1px' data-decompress='" + data + "'><i class='fa fa-expand'></i></button> ";
decompressButton = '<button class="btn btn-default btn-xs kb-data-staging-decompress" data-decompress="' + data + '><i class="fa fa-expand"></i></button> ';
}

if (full[0] === 'true') {
data = '<span class="kb-data-staging-folder" data-name="' + data + '">' + data + '</span>';
}

return '<div class="kb-data-staging-table-name">' + decompressButton +
Expand Down Expand Up @@ -333,6 +337,10 @@ define([
hide: Config.get('tooltip').hideDelay
}
});
$('td:eq(1)', nRow).find('span.kb-data-staging-folder').off('click').on('click', e => {
$(e.currentTarget).off('click');
this.updatePathFn(this.path += '/' + $(e.currentTarget).data().name);
});
$('td:eq(4)', nRow).find('select').select2({
placeholder: 'Select format'
});
Expand Down Expand Up @@ -367,6 +375,7 @@ define([


$('td:eq(0)', nRow).find('button[data-name]').off('click').on('click', e => {
$(e.currentTarget).off('click');
this.updatePathFn(this.path += '/' + $(e.currentTarget).data().name);
});

Expand Down
12 changes: 10 additions & 2 deletions kbase-extension/static/kbase/templates/data_staging/file_path.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<button id="refresh" class="btn btn-xs btn-default">
<span class="kb-data-stagingarea">Staging Area</span>

<button id="refresh" class="kb-data-staging-button">
<span><i class="fa fa-refresh fa-lg"></i></span>
REFRESH
</button>
{{#each path}}/ {{#if @last}}{{term}}{{else}}<a style="cursor:pointer" data-element="{{subpath}}">{{term}}</a>{{/if}} {{/each}}

<div class="kb-data-breadcrumb">
{{#each path}}/ {{#if @last}}{{ term }}{{ else }}<a data-element="{{ subpath }}">{{ term }}</a>{{/if}} {{/each}}
</div>

<div class="kb-data-staging-spacer"></div>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<td>{{mtime}}</td>
<td>
{{#if imported }}
<div class="pull-right">
<div class="pull-right" style="margin-left: -5px">
<select id="import-type" style="width: 118px;">
<option></option>
{{#each ../uploaders}}
Expand Down
2 changes: 1 addition & 1 deletion nbextensions/appCell2/widgets/appCellWidget-fsm.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ define([], function() {
},
actionButton: {
name: 'cancel',
disabled: true
disabled: false
},
elements: {
show: ['parameters-display-group', 'exec-group', 'output-group'],
Expand Down
2 changes: 0 additions & 2 deletions nbextensions/appCell2/widgets/appCellWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -1593,8 +1593,6 @@ define([
// the fact that the user may have opened and closed the tab...
userSelectedTab = false;



cell.execute();
}

Expand Down
4 changes: 2 additions & 2 deletions src/config.json.templ
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@
"google_ad_conversion": "kR9OCLas4JgBEOy2pucC"
},
"narrative-dev": {
"KBaseSearchEngine": "https://narrative-dev.kbase.us/services/searchapi2/legacy",
"auth": "https://narrative-dev.kbase.us/services/auth",
"awe": "https://narrative-dev.kbase.us/services/awe-api",
"catalog": "https://narrative-dev.kbase.us/services/catalog",
Expand All @@ -288,6 +287,7 @@
"genomeCmp": "https://narrative-dev.kbase.us/services/genome_comparison/jsonrpc",
"groups": "https://narrative-dev.kbase.us/services/groups",
"job_service": "https://narrative-dev.kbase.us/services/njs_wrapper",
"KBaseSearchEngine": "https://narrative-dev.kbase.us/services/searchapi2/legacy",
"landing_pages": "/#dataview/",
"log_host": "https://elasticsearch2.chicago.kbase.us",
"log_port": 9000,
Expand Down Expand Up @@ -322,8 +322,8 @@
"google_analytics_id": "UA-131054609-1"
},
"narrative-refactor": {
"KBaseSearchEngine": "https://narrative-refactor.kbase.us/services/searchapi2/legacy",
"auth": "https://narrative-refactor.kbase.us/services/auth",
"KBaseSearchEngine": "https://narrative-refactor.kbase.us/services/searchapi2/legacy",
"awe": "https://narrative-refactor.kbase.us/services/awe-api",
"catalog": "https://narrative-refactor.kbase.us/services/catalog",
"cdn": "https://narrative-refactor.kbase.us/cdn/files",
Expand Down
2 changes: 1 addition & 1 deletion test/unit/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = function (config) {
failFast: false,
DEFAULT_TIMEOUT_INTERVAL: 20000
},
requireJsShowNoTimestampsError: '^(?!.*(^/narrative/static/))',
requireJsShowNoTimestampsError: '^(?!.*(^/narrative/))',
clearContext: false
},
plugins: [
Expand Down
14 changes: 0 additions & 14 deletions test/unit/spec/narrative_core/kbaseNarrativeAppCell-spec.js

This file was deleted.

Loading

0 comments on commit 0306b92

Please sign in to comment.