Merge branch 'dev' into fix_search_icons

This commit is contained in:
guerler
2019-07-08 12:08:54 +02:00
477 changed files with 6759 additions and 3887 deletions
-1
View File
@@ -89,7 +89,6 @@ Disabled
</div>
</div>
</div>
</div>
```
```vue
@@ -16,7 +16,7 @@
<table v-if="match(plugin)">
<tr class="ui-thumbnails-item" @click="select(plugin)">
<td>
<img v-if="plugin.logo" class="ui-thumbnails-image" :src="plugin.logo" />
<img v-if="plugin.logo" alt="ui thumbnails" class="ui-thumbnails-image" :src="plugin.logo" />
<div v-else class="ui-thumbnails-icon fa fa-eye" />
</td>
<td>
@@ -50,8 +50,8 @@ function TagModel(props = {}) {
enumerable: false,
get: function() {
if (!this.text.length) return false;
if (this.text == "name:") return false;
return true;
return this.text != "name:";
}
});
}
@@ -0,0 +1,53 @@
<template>
<b-card>
<h4 slot="header" class="mb-0">
References
</h4>
<table>
<tr v-for="(xref, index) in xrefs" v-bind:key="index">
<th> - {{xref.reftype}}: </th>
<td>
<template v-if="xref.reftype == 'bio.tools'">
<a :href="`https://bio.tools/${xref.value}`" target="_blank">{{xref.value}}</a>
</template>
<template v-else>
{{ xref.value }}
</template>
</td>
</tr>
</table>
</b-card>
</template>
<script>
import { getAppRoot } from "onload/loadConfig";
import axios from "axios";
export default {
props: {
source: {
type: String,
required: true
},
id: {
type: String,
required: true
}
},
data() {
return {
xrefs: [],
errors: []
};
},
created: function() {
axios
.get(`${getAppRoot()}api/${this.source}/${this.id}/xrefs`)
.then(response => {
this.xrefs = response.data;
})
.catch(e => {
console.error(e);
});
}
};
</script>
@@ -88,8 +88,7 @@ export const getAnalysisRouter = Galaxy =>
const instance = Vue.extend(component);
const container = document.createElement("div");
this.page.display(container);
const vm = new instance(props).$mount(container);
return vm;
return new instance(props).$mount(container);
},
show_tours: function(tour_id) {
@@ -92,13 +92,12 @@ export const CommunicationServerView = Backbone.View.extend({
/**renders the chat icon as a nav item*/
render: function() {
const navItem = {
return {
id: "show-chat-online",
icon: "fa-comment-o",
tooltip: _l("Chat online"),
visible: false,
onclick: this.makeModalIframe
};
return navItem;
}
});
+1 -1
View File
@@ -99,7 +99,7 @@ const View = Backbone.View.extend({
return `
<nav id="masthead" class="navbar navbar-expand justify-content-center navbar-dark">
<a class="navbar-brand">
<img class="navbar-brand-image"/>
<img alt="navigation brand image" class="navbar-brand-image"/>
<span class="navbar-brand-title"/>
</a>
<ul class="navbar-nav"/>
@@ -134,8 +134,7 @@ var DatasetDCE = DATASET_MODEL.DatasetAssociation.extend(
return `${getAppRoot()}api/datasets`;
}
const datasetId = this._getDatasetId();
const url = `${getAppRoot()}api/histories/${this.get("history_id")}/contents/${datasetId}`;
return url;
return `${getAppRoot()}api/histories/${this.get("history_id")}/contents/${datasetId}`;
},
_getDatasetId: function() {
@@ -1491,8 +1491,7 @@ var PairedCollectionCreator = Backbone.View.extend(baseMVC.LoggableMixin)
//this.debug( '_pairDragstart', ev, pair )
// auto select the pair causing the event and move all selected
pair.$el.addClass("selected");
var $selected = this.$(".paired-columns .dataset.selected");
this.$dragging = $selected;
this.$dragging = this.$(".paired-columns .dataset.selected");
},
/** drag communication with pair sub-views: dragend - remove the placeholder */
_pairDragend: function(ev, pair) {
@@ -78,8 +78,7 @@ export var HistoryContents = _super.extend(BASE_MVC.LoggableMixin).extend({
history_id: this.history_id,
collection_id: historyContent.attributes.id
});
var jobStatesSummary = this.jobStateSummariesCollection.get(jobSourceId);
historyContent.jobStatesSummary = jobStatesSummary;
historyContent.jobStatesSummary = this.jobStateSummariesCollection.get(jobSourceId);
}
}
});
@@ -50,8 +50,7 @@ var HistoryGridView = GridView.extend({
$(`.delayed-value-datasets_by_state[data-id='${historyId}']`).html(stateHtml);
$(`.delayed-value-disk_size[data-id='${historyId}']`).html(req.nice_size);
};
var xhr = $.ajax(options);
return xhr;
return $.ajax(options);
};
})
);
@@ -469,8 +469,7 @@ var HistoryView = _super.extend(
// if sent two strings (and possibly details as 'options'), use those as message and title
if (_.isString(model) && _.isString(xhr)) {
var message = model;
var title = xhr;
return ERROR_MODAL.errorModal(message, title, options);
return ERROR_MODAL.errorModal(message, xhr, options);
}
// bad gateway
// TODO: possibly to global handler
@@ -94,10 +94,8 @@ var HistoryViewColumn = Backbone.View.extend(baseMVC.LoggableMixin).extend({
if (columnRight < viewLeft) {
return false;
}
if (columnLeft > viewRight) {
return false;
}
return true;
return columnLeft <= viewRight;
},
/** shortcut to the panel */
@@ -438,8 +436,7 @@ var MultiPanelColumns = Backbone.View.extend(baseMVC.LoggableMixin).extend({
// if sent two strings (and possibly details as 'options'), use those as message and title
if (_.isString(model) && _.isString(xhr)) {
var message = model;
var title = xhr;
return ERROR_MODAL.errorModal(message, title, options);
return ERROR_MODAL.errorModal(message, xhr, options);
}
// bad gateway
// TODO: possibly to global handler
@@ -600,15 +597,13 @@ var MultiPanelColumns = Backbone.View.extend(baseMVC.LoggableMixin).extend({
return this.sortedColumns();
}
return this.sortedColumns().filter((column, index) => {
var filtered = column.currentHistory || _.every(filters.map(filter => filter.call(column)));
return filtered;
return column.currentHistory || _.every(filters.map(filter => filter.call(column)));
});
},
/** return array of Columns sorted to match the collection */
sortedColumns: function() {
var sorted = this.collection.map((history, index) => this.columnMap[history.id]);
return sorted;
return this.collection.map((history, index) => this.columnMap[history.id]);
},
// ------------------------------------------------------------------------ render
+3 -4
View File
@@ -107,8 +107,7 @@ var JobListItemView = _super.extend(
return undefined;
}
var subMatch = _.find(partialMatch.inputs, i => name.indexOf(i.name) !== -1);
return subMatch;
return _.find(partialMatch.inputs, i => name.indexOf(i.name) !== -1);
},
// ........................................................................ misc
@@ -154,7 +153,7 @@ JobListItemView.prototype.templates = (() => {
'<span class="name"><%- view.tool.name %></span>',
"</div>",
'<div class="subtitle">',
'<span class="description"><%- view.tool.description %></span',
'<span class="description"><%- view.tool.description %></span>',
'<span class="create-time">',
" ",
_l("Created"),
@@ -169,7 +168,7 @@ JobListItemView.prototype.templates = (() => {
var subtitleTemplate = BASE_MVC.wrapTemplate(
[
'<div class="subtitle">',
'<span class="description"><%- view.tool.description %></span',
'<span class="description"><%- view.tool.description %></span>',
//'<span class="create-time">',
// ' ', _l( 'Created' ), ': <%= new Date( job.create_time ).toString() %>, ',
//'</span',
@@ -55,8 +55,7 @@ export default Backbone.View.extend({
// TODO: View is unused here.
//var view = this.content_list[model.id];
if (!this.content_list[model.id]) {
var content = this.new_content(model);
this.content_list[model.id] = content;
this.content_list[model.id] = this.new_content(model);
if (this._done()) {
break;
}
@@ -741,7 +741,7 @@ var LibraryDatasetView = Backbone.View.extend({
<% } %>
<% if (item.get("message")) { %>
<tr>
<th scope="row">Message</th>
<th scope="row">Description</th>
<td scope="row"><%= _.escape(item.get("message")) %></td>
</tr>
<% } %>
@@ -25,7 +25,9 @@ var FolderListView = Backbone.View.extend({
"click .folder_row": "selectClickedRow",
"click .sort-folder-name": "sortColumnClicked",
"click .sort-folder-file_ext": "sortColumnClicked",
"click .sort-folder-description": "sortColumnClicked",
"click .sort-folder-message": "sortColumnClicked",
"click .sort-folder-update_time": "sortColumnClicked",
"click .sort-folder-raw_size": "sortColumnClicked",
"click .sort-folder-state": "sortColumnClicked"
},
@@ -275,6 +277,21 @@ var FolderListView = Backbone.View.extend({
this.renderSortIcon();
},
/**
* In case the search_term is not empty perform the search and render
* the result. Render all visible folder items otherwise.
* @param {string} search_term string to search for
*/
searchFolder: function(search_term) {
const trimmed_term = $.trim(search_term);
if (trimmed_term !== "") {
const result_collection = this.folder_container.search(search_term);
this.collection.reset(result_collection);
} else {
this.paginate();
}
},
/**
* User clicked the checkbox in the table heading
* @param {context} event
@@ -337,10 +354,11 @@ var FolderListView = Backbone.View.extend({
},
renderSortIcon: function() {
$('[class*="sort-icon"]')
.removeClass("fa-sort-alpha-desc")
.removeClass("fa-sort-alpha-asc");
if (this.current_sort_order === "asc") {
$('[class*="sort-icon"]')
.removeClass("fa-sort-alpha-desc")
.removeClass("fa-sort-alpha-asc");
$(`.sort-icon-${this.current_sort_key}`).addClass("fa-sort-alpha-asc");
} else {
$(`.sort-icon-${this.current_sort_key}`).addClass("fa-sort-alpha-desc");
@@ -463,7 +481,7 @@ var FolderListView = Backbone.View.extend({
<a title="Return to this folder" href="#/folders/<%- path_item[0] %>">
<%- path_item[1] %>
</a>
</li>
</li>
<% } else { %>
<li class="breadcrumb-item active">
<span title="You are in this folder">
@@ -484,24 +502,29 @@ var FolderListView = Backbone.View.extend({
</th>
<th>
<a class="sort-folder-name" title="Click to reverse order" href="#">Name</a>
<span title="Sorted alphabetically"
class="sort-icon-name fa fa-sort-alpha-<%- order %>"></span>
<span title="Sorted by Name" class="sort-icon-name fa fa-sort-alpha-<%- order %>"></span>
</th>
<th style="width:20%;">
<a class="sort-folder-description" title="Click to reverse order" href="#">Description</a>
<span title="Sorted alphabetically" class="sort-icon-description fa"></span>
<a class="sort-folder-message" title="Click to reverse order" href="#">Description</a>
<span title="Sorted by Desc." class="sort-icon-message fa"></span>
</th>
<th style="width:5%;">
<a class="sort-folder-file_ext" title="Click to reverse order" href="#">Data Type</a>
<span title="Sorted alphabetically" class="sort-icon-file_ext fa"></span>
<span title="Sorted by Type" class="sort-icon-file_ext fa"></span>
</th>
<th style="width:10%;">
<a class="sort-folder-raw_size" title="Click to reverse order" href='#'>Size</a>
<span title="Sorted by Size" class="sort-icon-raw_size fa"></span>
</th>
<th style="width:160px;">
<a class="sort-folder-update_time" title="Click to reverse order" href='#'>Time Updated (UTC)</a>
<span title="Sorted by Date" class="sort-icon-update_time fa"></span>
</th>
<th style="width:10%;">Size</th>
<th style="width:160px;">Time Updated (UTC)</th>
<th style="width:5%;">
<a class="sort-folder-state" title="Click to reverse order" href="#">State</a>
<span title="Sorted alphabetically" class="sort-icon-state fa"></span>
<span title="Sorted by State" class="sort-icon-state fa"></span>
</th>
<th style="width:160px;"></th>
<th style="width:160px;"></th>
</thead>
<tbody id="folder_list_body">
<tr id="first_folder_item">
@@ -25,7 +25,8 @@ var FolderToolbarView = Backbone.View.extend({
"click .toolbtn-show-locinfo": "showLocInfo",
"keydown .page_size": "changePageSize",
"blur .page_size": "changePageSize",
"click .toolbtn-collection-import": "showCollectionSelect"
"click .toolbtn-collection-import": "showCollectionSelect",
"keyup .folder-search-input": "searchFolder"
},
defaults: {
@@ -210,10 +211,12 @@ var FolderToolbarView = Backbone.View.extend({
}
},
/**
* This function returns a promise
*/
fetchUserHistories: function() {
this.histories = new mod_library_model.GalaxyHistories();
var promise = this.histories.fetch();
return promise;
return this.histories.fetch();
},
importAllIntoHistory: function() {
@@ -238,9 +241,11 @@ var FolderToolbarView = Backbone.View.extend({
}
},
/**
* This function returns a promise
*/
createNewHistory: function(new_history_name) {
var promise = $.post(`${getAppRoot()}api/histories`, { name: new_history_name });
return promise;
return $.post(`${getAppRoot()}api/histories`, { name: new_history_name });
},
processImportToHistory: function(history_id, history_name) {
@@ -1416,6 +1421,17 @@ var FolderToolbarView = Backbone.View.extend({
return hdca.save(options);
},
/**
* Take the contents of the search field and send it to the list view
* to query the collection of folder items.
*/
searchFolder: function(event) {
const Galaxy = getGalaxyInstance();
const search_term = $(".folder-search-input").val();
this.options.search_term = search_term;
Galaxy.libraries.folderListView.searchFolder(search_term);
},
templateToolBar: function() {
return _.template(
`<div class="library_style_container">
@@ -1425,6 +1441,7 @@ var FolderToolbarView = Backbone.View.extend({
</a>
<div>
<form class="form-inline">
<input type="text" id="folder-filter" class="form-control folder-search-input mr-1" placeholder="Search" size="15">
<button style="display:none;" title="Create new folder"
class="btn btn-secondary toolbtn-create-folder add-library-items add-library-items-folder mr-1"
type="button">
@@ -51,13 +51,11 @@ var Libraries = Backbone.Collection.extend({
*/
getVisible: function(show_deleted, filters) {
filters = filters || [];
var filteredLibraries = new Libraries(this.filter(item => item.isVisible(show_deleted)));
return filteredLibraries;
return new Libraries(this.filter(item => item.isVisible(show_deleted)));
},
sortLibraries: function(sort_key, sort_order) {
this.comparator = mod_util.generateLibraryComparator(sort_key, sort_order);
this.comparator = mod_util.generateComparator(sort_key, sort_order);
this.sort();
}
});
@@ -79,7 +77,7 @@ var Folder = Backbone.Collection.extend({
model: LibraryItem,
sortFolder: function(sort_key, sort_order) {
this.comparator = mod_util.generateFolderComparator(sort_key, sort_order);
this.comparator = mod_util.generateComparator(sort_key, sort_order);
this.sort();
}
});
@@ -90,6 +88,22 @@ var FolderContainer = Backbone.Model.extend({
urlRoot: `${getAppRoot()}api/folders/`,
id: "unknown"
},
/**
* Search the folder and return only the models that have
* the search term in their names.
* [the term to search]
* @type {string}
*/
search: function(search_term) {
if (search_term == "") return this;
const lowercase_term = search_term.toLowerCase();
return this.get("folder").filter(data => {
const lowercase_name = data.get("name").toLowerCase();
return lowercase_name.indexOf(lowercase_term) !== -1;
});
},
parse: function(obj) {
const Galaxy = getGalaxyInstance();
// empty the collection
@@ -6,7 +6,7 @@
* @param {str} sort_order order to sort by (asc, desc)
* @return {function} two-argument comparator function
*/
var generateFolderComparator = (sort_key, sort_order) => (itemA, itemB) => {
var generateComparator = (sort_key, sort_order) => (itemA, itemB) => {
if (itemA.get("type") === itemB.get("type")) {
if (!itemA.has(sort_key) && !itemB.has(sort_key)) {
return 0;
@@ -15,12 +15,24 @@ var generateFolderComparator = (sort_key, sort_order) => (itemA, itemB) => {
} else if (!itemB.has(sort_key)) {
return -1;
}
if (itemA.get(sort_key).toLowerCase() > itemB.get(sort_key).toLowerCase()) {
var comparable_itemA_key;
var comparable_itemB_key;
if (typeof itemA.get(sort_key) === "number") {
comparable_itemA_key = itemA.get(sort_key);
comparable_itemB_key = itemB.get(sort_key);
}
else
{
comparable_itemA_key = itemA.get(sort_key).toLowerCase();
comparable_itemB_key = itemB.get(sort_key).toLowerCase();
}
if ( comparable_itemA_key > comparable_itemB_key) {
return sort_order === "asc" ? 1 : -1;
}
if (itemB.get(sort_key).toLowerCase() > itemA.get(sort_key).toLowerCase()) {
if (comparable_itemB_key > comparable_itemA_key) {
return sort_order === "asc" ? -1 : 1;
}
return 0; // equal
} else {
if (itemA.get("type") === "folder") {
@@ -29,22 +41,6 @@ var generateFolderComparator = (sort_key, sort_order) => (itemA, itemB) => {
return 1;
}
};
/**
* Create alphabetical based two-argument comparator
* @param {str} sort_key key to sort by
* @param {str} sort_order order to sort by (asc, desc)
* @return {function} two-argument comparator function
*/
var generateLibraryComparator = (sort_key, sort_order) => (libraryA, libraryB) => {
if (libraryA.get(sort_key).toLowerCase() > libraryB.get(sort_key).toLowerCase()) {
return sort_order === "asc" ? 1 : -1;
}
if (libraryB.get(sort_key).toLowerCase() > libraryA.get(sort_key).toLowerCase()) {
return sort_order === "asc" ? -1 : 1;
}
return 0; // equal
};
export default {
generateFolderComparator: generateFolderComparator,
generateLibraryComparator: generateLibraryComparator
generateComparator: generateComparator
};
+1 -3
View File
@@ -421,13 +421,11 @@ export var FoldoutListItemView = ListItemView.extend({
var FoldoutClass = this._getFoldoutPanelClass(model);
var options = this._getFoldoutPanelOptions(model);
var foldout = new FoldoutClass(
return new FoldoutClass(
_.extend(options, {
model: model
})
);
return foldout;
},
/** Stub to return proper foldout panel class */
+1 -2
View File
@@ -367,8 +367,7 @@ var ListPanel = Backbone.View.extend(BASE_MVC.LoggableMixin).extend(
// console.log( 'models filtered:', shownModels );
panel.views = shownModels.map(itemModel => {
var view = panel._createItemView(itemModel);
return view;
return panel._createItemView(itemModel);
});
$list.empty();
@@ -865,8 +865,7 @@ const applyRules = function(data, sources, columns, rules, headersPerRule = [])
const colHeadersPerRule = Array.from(headersPerRule);
let hasRuleError = false;
for (var ruleIndex in rules) {
const ruleHeaders = colHeadersFor(data, columns);
colHeadersPerRule[ruleIndex] = ruleHeaders;
colHeadersPerRule[ruleIndex] = colHeadersFor(data, columns);
const rule = rules[ruleIndex];
rule.error = null;
rule.warn = null;
+1 -1
View File
@@ -117,7 +117,7 @@ var TagsEditor = Backbone.View.extend(baseMVC.LoggableMixin)
});
if (renderedArray.length === 0) {
// If there are no tags to render we just show the add-tag-button
renderedArray.push(`<img src=${addButton} class="add-tag-button" title="Add tags"/>`);
renderedArray.push(`<img alt="add tag button" src=${addButton} class="add-tag-button" title="Add tags"/>`);
}
return renderedArray.join(" ");
},
@@ -12,6 +12,7 @@ import Ui from "mvc/ui/ui-misc";
import FormBase from "mvc/form/form-view";
import Webhooks from "mvc/webhooks";
import Citations from "components/Citations.vue";
import xrefs from "components/xrefs.vue";
import Vue from "vue";
import axios from "axios";
@@ -279,6 +280,17 @@ export default FormBase.extend({
}
}).$mount(vm);
}
if (options.xrefs) {
var xrefInstance = Vue.extend(xrefs);
vm = document.createElement("div");
$el.append(vm);
new xrefInstance({
propsData: {
id: options.id,
source: "tools"
}
}).$mount(vm);
}
return $el;
},
@@ -320,10 +320,9 @@ var ToolShedRepositoryView = Backbone.View.extend({
},
selectedChangeset: function() {
var changeset = $("#changeset")
return $("#changeset")
.find("option:selected")
.val();
return changeset;
},
showToolTPSCreate: function(guid, changeset) {
+1 -2
View File
@@ -40,8 +40,7 @@ var addToQueue = metadata => {
var queueLength = () => {
if (window.localStorage.hasOwnProperty("repositories")) {
var repo_queue = JSON.parse(window.localStorage.repositories);
var queue_length = Object.keys(repo_queue).length;
return queue_length;
return Object.keys(repo_queue).length;
} else {
return 0;
}
@@ -28,7 +28,7 @@ export default Backbone.View.extend({
<table>
<tr>
<td class="charts-description-image-td">
<img class="charts-description-image"/>
<img alt="charts description" class="charts-description-image"/>
</td>
<td>
<div class="charts-description-title"/>
@@ -317,8 +317,7 @@ var Node = Backbone.Model.extend({
var new_body = nodeView.newInputsDiv();
var newTerminalViews = {};
_.each(data.inputs, input => {
var terminalView = node.nodeView.addDataInput(input, new_body);
newTerminalViews[input.name] = terminalView;
newTerminalViews[input.name] = node.nodeView.addDataInput(input, new_body);
});
// Cleanup any leftover terminals
_.each(_.difference(_.values(nodeView.terminalViews), _.values(newTerminalViews)), unusedView => {
@@ -292,13 +292,9 @@ var BaseInputTerminal = Terminal.extend({
inputFilled = false;
} else {
if (this.multiple) {
if (this._collectionAttached()) {
// Can only attach one collection to multiple input
// data parameter.
inputFilled = true;
} else {
inputFilled = false;
}
// Can only attach one collection to multiple input
// data parameter.
inputFilled = !!this._collectionAttached();
} else {
inputFilled = true;
}
@@ -91,21 +91,19 @@ export default Backbone.View.extend({
} else if (output.parameter) {
terminalViewClass = TerminalViews.OutputParameterTerminalView;
}
const terminalView = new terminalViewClass({
return new terminalViewClass({
node: this.node,
output: output
});
return terminalView;
},
outputViewforOutput: function(output, terminalView) {
const outputViewClass = output.parameter ? DataViews.ParameterOutputView : DataViews.DataOutputView;
const outputView = new outputViewClass({
return new outputViewClass({
output: output,
terminalElement: terminalView.el,
nodeView: this
});
return outputView;
},
addDataOutput: function(output) {
@@ -289,12 +289,11 @@ var OutputTerminalView = BaseOutputTerminalView.extend({
terminalMappingViewClass: TerminalMappingView,
terminalForOutput: function(output) {
var type = output.extensions;
var terminal = new Terminals.OutputTerminal({
return new Terminals.OutputTerminal({
element: this.el,
datatypes: type,
force_datatype: output.force_datatype
});
return terminal;
}
});
@@ -304,14 +303,13 @@ var OutputCollectionTerminalView = BaseOutputTerminalView.extend({
terminalForOutput: function(output) {
var collection_type = output.collection_type;
var collection_type_source = output.collection_type_source;
var terminal = new Terminals.OutputCollectionTerminal({
return new Terminals.OutputCollectionTerminal({
element: this.el,
collection_type: collection_type,
collection_type_source: collection_type_source,
datatypes: output.extensions,
force_datatype: output.force_datatype
});
return terminal;
}
});
@@ -319,11 +317,10 @@ var OutputParameterTerminalView = BaseOutputTerminalView.extend({
terminalMappingClass: Terminals.TerminalMapping,
terminalMappingViewClass: TerminalMappingView,
terminalForOutput: function(output) {
var terminal = new Terminals.OutputCollectionTerminal({
return new Terminals.OutputCollectionTerminal({
element: this.el,
type: output.type
});
return terminal;
}
});
@@ -771,7 +771,7 @@ export default Backbone.View.extend({
var node = new Node(this, { element: $f });
node.type = type;
node.content_id = content_id;
var tmp = `<div><img height='16' align='middle' src='${getAppRoot()}static/images/loading_small_white_bg.gif'/> loading tool info...</div>`;
var tmp = `<div><img alt="loading" height='16' align='middle' src='${getAppRoot()}static/images/loading_small_white_bg.gif'/> loading tool info...</div>`;
$f.find(".toolFormBody").append(tmp);
// Fix width to computed width
// Now add floats
@@ -54,8 +54,7 @@ QUnit.module("Input terminal model test", {
test_connector: function() {
var outputTerminal = new Terminals.OutputTerminal({ datatypes: ["input"] });
var inputTerminal = this.input_terminal;
var connector = new Connector(outputTerminal, inputTerminal);
return connector;
return new Connector(outputTerminal, inputTerminal);
},
with_test_connector: function(f) {
this.test_connector();
@@ -557,9 +556,7 @@ QUnit.module("Node view ", {
disableMapOver: function() {},
mapOver: Terminals.NULL_COLLECTION_TYPE_DESCRIPTION
};
var c = new Connector(outputTerminal, terminal);
return c;
return new Connector(outputTerminal, terminal);
},
connectAttachedMultiInputTerminal: function(inputType, outputType) {
this.view.addDataInput({ name: "TestName", extensions: [inputType], multiple: true });
@@ -580,9 +577,7 @@ QUnit.module("Node view ", {
disableMapOver: function() {},
mapOver: new Terminals.CollectionTypeDescription("list")
};
var c = new Connector(outputTerminal, terminal);
return c;
return new Connector(outputTerminal, terminal);
},
connectAttachedMappedOutput: function() {
this.view.addDataInput({ name: "TestName", extensions: ["txt"], input_type: "dataset_collection" });
@@ -603,9 +598,7 @@ QUnit.module("Node view ", {
disableMapOver: function() {},
mapOver: new Terminals.CollectionTypeDescription("list")
};
var c = new Connector(outputTerminal, terminal);
return c;
return new Connector(outputTerminal, terminal);
}
});
@@ -917,8 +910,7 @@ QUnit.module("terminal mapping logic", {
},
newNode: function() {
var nodeEl = $("<div>")[0];
var node = new Node(create_app(), { element: nodeEl });
return node;
return new Node(create_app(), { element: nodeEl });
},
_addExistingOutput: function(terminal, output, connected) {
var self = this;
+4 -12
View File
@@ -178,9 +178,7 @@ export function create_chart(inp_data, name, time, title) {
var m_x = margin.left;
var m_y = margin.top + height;
var l_x = m_x + width;
var l_y = m_y;
return `M${m_x} ${m_y} L ${l_x} ${l_y}`;
return `M${m_x} ${m_y} L ${l_x} ${m_y}`;
});
// Declare how high the y axis goes
@@ -212,9 +210,7 @@ export function create_chart(inp_data, name, time, title) {
var axis = d3.select(`#y_${name}`).node();
var left_pad = margin.left - axis.getBoundingClientRect().width - 5;
var top_pad = margin.top + axis.getBoundingClientRect().height / 2 - 30;
var trans = `translate(${left_pad},${top_pad})rotate(-90)`;
return trans;
return `translate(${left_pad},${top_pad})rotate(-90)`;
})
.text("Number of Jobs");
@@ -625,9 +621,7 @@ export function create_histogram(inp_data, name, title) {
var axis = d3.select(`#x_${name}`).node();
var left_pad = margin.left + axis.getBoundingClientRect().width / 2 + 30;
var top_pad = margin.top + height + axis.getBoundingClientRect().height + 10;
var trans = `translate(${left_pad},${top_pad})`;
return trans;
return `translate(${left_pad},${top_pad})`;
})
.text("ETA - hrs:mins");
@@ -654,9 +648,7 @@ export function create_histogram(inp_data, name, title) {
var axis = d3.select(`#y_${name}`).node();
var left_pad = margin.left - axis.getBoundingClientRect().width - 5;
var top_pad = margin.top + axis.getBoundingClientRect().height / 2 - 30;
var trans = `translate(${left_pad},${top_pad})rotate(-90)`;
return trans;
return `translate(${left_pad},${top_pad})rotate(-90)`;
})
.text("Number of Jobs");
@@ -175,8 +175,7 @@ function buildSingleSelectCell(control, columnIndex) {
var eventData = {};
var key = $cell.parent().attr("id");
var val = $cell.data(COLUMN_INDEX_DATA_KEY);
eventData[key] = val;
eventData[key] = $cell.data(COLUMN_INDEX_DATA_KEY);
$cell.parents(".peek").trigger(CHANGE_EVENT, eventData);
}
});
@@ -209,8 +208,7 @@ function buildMultiSelectCell(control, columnIndex) {
var eventData = {};
var key = $cell.parent().attr("id");
var val = $.makeArray(selectedColumnIndeces);
eventData[key] = val;
eventData[key] = $.makeArray(selectedColumnIndeces);
$cell.parents(".peek").trigger(CHANGE_EVENT, eventData);
});
}
+1 -1
View File
@@ -54,7 +54,7 @@ export function make_popupmenu(button_element, initial_options) {
);
}
});
var wrapper = $("<div class='popmenu-wrapper' style='position: absolute;left: 0; top: -1000;'></div>")
var wrapper = $("<div class='popmenu-wrapper' style='position: absolute;left: 0;'></div>")
.append(menu_element)
.appendTo("body");
@@ -102,8 +102,7 @@ export function showMonitorToggles() {
// retrieve toggle list from the session storage
function getToggles() {
const json = sessionStorage.getItem("global_monitors");
const existinglist = json ? JSON.parse(json) : {};
return existinglist;
return json ? JSON.parse(json) : {};
}
// put the toggle list back in session storage
@@ -322,10 +322,8 @@ _.extend(NumberFilter.prototype, {
* Returns true if filter can be applied to element.
*/
applies_to: function(element) {
if (element.length > this.index) {
return true;
}
return false;
return element.length > this.index;
},
/**
* Helper function: returns true if value in in filter's [low, high] range.
@@ -85,7 +85,6 @@
.toggle-link {
font-weight: normal;
padding: 0.3em;
margin-bottom: 1em;
width: 100%;
padding: 0.2em 0em 0.2em 0em;
-2
View File
@@ -1299,8 +1299,6 @@ div.permissionContainer {
.text-content {
hr {
display: block;
background: black;
color: black;
width: 100%;
height: 1px;
border: none;
-2
View File
@@ -147,8 +147,6 @@ $frame-default-border: $border-default-color;
width: 16px;
height: 16px;
color: $brand-dark;
right: 0px;
bottom: 0px;
text-align: center;
line-height: 16px;
border: 0px;
-1
View File
@@ -499,7 +499,6 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-height: 22px;
}
&.control-column-right {
text-align: right;
-1
View File
@@ -33,7 +33,6 @@ pre {
}
.dropdown-menu {
max-width: auto;
.dropdown-item {
text-decoration: none;
}
-1
View File
@@ -26,7 +26,6 @@ $separator-color: #888;
padding: 0 0;
color: #333;
font-weight: bold;
background: #cccccc;
display: inline-block;
top: -2em;
background: transparent;
-1
View File
@@ -154,7 +154,6 @@ $ui-margin-horizontal-large: $margin-v * 2;
font-style: italic;
}
.ui-form-backdrop {
display: none;
z-index: 10;
position: absolute;
top: 0px;