Skip to content

Commit

Permalink
Merge and resolve conflicts.
Browse files Browse the repository at this point in the history
  • Loading branch information
VJalili committed Oct 10, 2018
2 parents 5f8c0df + caec182 commit 1babfdf
Show file tree
Hide file tree
Showing 192 changed files with 4,386 additions and 2,600 deletions.
7 changes: 2 additions & 5 deletions client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,8 @@ for inspection of live javascript to facilitate debugging, use:

make client-production-maps

Important Note: The development branch of Galaxy does not include client script
artifacts, and these should not be committed. When issuing a PR to a stable
branch, please run "make client-production-maps", and include those artifacts.
Or, if you'd rather, include only the /client source changes and build
artifacts can be added by maintainers on merge.
Important Note: The Galaxy repository does not include client script artifacts,
and these should not be committed.


Automatic Rebuilding (Watch Mode)
Expand Down
57 changes: 7 additions & 50 deletions client/galaxy/scripts/components/DisplayStructured.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,16 @@ export default {
.bold {
font-weight: bold;
}
.light {
font-weight: lighter;
color: grey;
}
.right-aligned {
text-align: right;
}
.clickable {
cursor: pointer;
}
.workflow {
border: solid gray 1px;
margin-bottom: 1%;
Expand All @@ -120,64 +117,39 @@ export default {
.workflow > .body {
border-top: solid gray 1px;
}
.workflow > .body > .toolForm {
.workflow > .body > .tool {
border: 0px;
margin: 0;
}
div.toolForm {
border-width: 1px;
border-radius: 0px;
margin-bottom: 1%;
div.tool {
margin-bottom: 5px;
border: 1px solid gray;
}
.toolForm > .header {
background-color: #ebd9b2;
.tool > .header {
padding: 5px 10px;
}
.workflow div.toolForm:not(:first-child) .header {
border-top: 1px solid #d6b161;
}
div.toolFormTitle {
padding: 0px 0px 4px 0px;
margin: 0px 0px 4px 0px;
border: 0px;
background-color: transparent;
border-bottom: 1px solid #d6b161;
}
/* down from EBD9B2 --> 90743A */
.toolFormTitle > .light {
color: #90743a;
}
.toolForm em {
color: #90743a;
}
.job-inputs {
margin: 0px 6px 0px 6px;
text-align: left;
}
.job-inputs td:nth-child(1) {
text-align: right;
font-weight: lighter;
color: #90743a;
color: gray;
}
.job-inputs td:nth-child(1):after {
content: ":";
}
.job-inputs td:nth-child(2) {
padding-left: 4px;
}
.job-inputs em {
}
.job-inputs-show {
float: right;
}
.copied-from {
border: 1px solid lightgrey;
border-width: 1px 1px 0px 1px;
margin-bottom: 1%;
margin-bottom: 5px;
}
.copied-from .header {
border-bottom: 1px solid lightgrey;
Expand All @@ -187,19 +159,4 @@ div.toolFormTitle {
.copied-from .header a {
color: #888;
}
.dataset.hda {
min-height: 37px;
border-width: 0px 0px 1px 0px;
}
.toolFormBody > .dataset.hda:last-child {
border-bottom-width: 0px;
}
.dataset.hda:first-child {
border-top: 1px solid #d6b161;
}
.dataset.hda .dataset-title-bar {
padding-top: 8px;
padding-left: 10px;
}
</style>
39 changes: 33 additions & 6 deletions client/galaxy/scripts/components/Sharing.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div v-if="ready">
<h2>Share or Publish {{model_class}} `{{item.title}}`</h2>
<b-alert variant="danger" :show="err_msg">
<b-alert :show="show_danger" variant="danger" dismissible>
{{ err_msg }}
</b-alert>
</br>
Expand Down Expand Up @@ -53,9 +53,17 @@
<div v-else>
<p>This {{model_class_lc}} is currently restricted so that only you and the users listed below can access it. You can:</p>
<b-button @click="setSharing('make_accessible_via_link')">Make {{model_class}} Accessible via Link</b-button>
<span v-if="has_possible_members" class="chkk">
Also make all objects within the {{model_class}} accessible.
<input type="checkbox" v-model="make_members_public" id="chk_make_members_public">
</span>
<div class="toolParamHelp">Generates a web link that you can share with other people so that they can view and import the {{model_class_lc}}.</div>
<br/>
<b-button id="make_accessible_and_publish" @click="setSharing('make_accessible_and_publish')">Make {{model_class}} Accessible and Publish</b-button>
<span v-if="has_possible_members" class="chkk">
Also make all objects within the {{model_class}} accessible.
<input type="checkbox" v-model="make_members_public" id="chk_make_members_public">
</span>
<div class="toolParamHelp">Makes the {{model_class_lc}} accessible via link (see above) and publishes the {{model_class_lc}} to Galaxy's <a :href="published_url" target="_top">Published {{plural_name}}</a> section, where it is publicly listed and searchable.</div>
</div>
<br/><br/>
Expand Down Expand Up @@ -131,6 +139,12 @@ export default {
},
slug_url() {
return `${Galaxy.root}${this.model_class_lc}/set_slug_async/?id=${this.id}`;
},
has_possible_members() {
return ["history"].indexOf(this.model_class_lc) > -1;
},
show_danger() {
return this.err_msg !== null;
}
},
data() {
Expand All @@ -147,7 +161,8 @@ export default {
published: false,
users_shared_with: []
},
share_fields: ["email", { key: "id", label: "" }]
share_fields: ["email", { key: "id", label: "" }],
make_members_public: false
};
},
created: function() {
Expand Down Expand Up @@ -180,13 +195,20 @@ export default {
.catch(error => (this.err_msg = error.response.data.err_msg));
},
setSharing: function(action, user_id) {
let data = {
action: action,
user_id: user_id
};
if (this.has_possible_members) {
data.make_members_public = this.make_members_public;
}
axios
.post(`${Galaxy.root}api/${this.plural_name_lc}/${this.id}/sharing`, {
action: action,
user_id: user_id
})
.post(`${Galaxy.root}api/${this.plural_name_lc}/${this.id}/sharing`, data)
.then(response => {
Object.assign(this.item, response.data);
if (response.data.skipped) {
this.err_msg = "Some of the items within this object were not published due to an error.";
}
})
.catch(error => (this.err_msg = error.response.data.err_msg));
},
Expand Down Expand Up @@ -233,3 +255,8 @@ export default {
}
};
</script>
<style>
.chkk {
display: inline-block;
}
</style>
11 changes: 8 additions & 3 deletions client/galaxy/scripts/components/admin/BaseGrid.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<div class="toolForm">
<div class="toolFormTitle">
<div class="card">
<div class="card-header">
<slot name="title">{{ title }}</slot>
</div>
<div class="toolFormBody">
<div class="card-body">
<table class="manage-table colored" border="0" cellspacing="0" cellpadding="0" width="100%">
<slot name="columns">
<th v-for="column in columns" bgcolor="#D8D8D8">{{ column.text }}</th>
Expand Down Expand Up @@ -41,3 +41,8 @@ export default {
}
};
</script>
<style>
.card-body {
overflow: auto;
}
</style>
52 changes: 26 additions & 26 deletions client/galaxy/scripts/layout/scratchbook.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,28 @@ import _l from "utils/localization";

export default Backbone.View.extend({
initialize: function(options) {
var self = this;
options = options || {};
this.frames = new Frames.View({ visible: false });
this.setElement(this.frames.$el);
this.active = false;
this.buttonActive = options.collection.add({
id: "enable-scratchbook",
icon: "fa-th",
tooltip: _l("Enable/Disable Scratchbook"),
onclick: function() {
self.active = !self.active;
self.buttonActive.set({
toggle: self.active,
show_note: self.active,
note_cls: self.active && "fa fa-check"
onclick: () => {
this.active = !this.active;
this.buttonActive.set({
toggle: this.active,
show_note: this.active,
note_cls: this.active && "fa fa-check"
});
if (!self.active) {
self.frames.hide();
if (!this.active) {
this.frames.hide();
}
},
onbeforeunload: function() {
if (self.frames.length() > 0) {
return `You opened ${self.frames.length()} frame(s) which will be lost.`;
onbeforeunload: () => {
if (this.frames.length() > 0) {
return `You opened ${this.frames.length()} frame(s) which will be lost.`;
}
}
});
Expand All @@ -43,28 +43,28 @@ export default Backbone.View.extend({
tooltip: _l("Show/Hide Scratchbook"),
show_note: true,
visible: false,
onclick: function(e) {
if (self.frames.visible) {
self.frames.hide();
onclick: e => {
if (this.frames.visible) {
this.frames.hide();
} else {
self.frames.show();
this.frames.show();
}
}
});
this.frames
.on("add remove", function() {
if (this.visible && this.length() === 0) {
this.hide();
.on("add remove", () => {
if (this.frames.visible && this.frames.length() === 0) {
this.frames.hide();
}
self.buttonLoad.set({
note: this.length(),
visible: this.length() > 0
this.buttonLoad.set({
note: this.frames.length(),
visible: this.frames.length() > 0
});
})
.on("show hide ", function() {
self.buttonLoad.set({
toggle: this.visible,
icon: (this.visible && "fa-eye") || "fa-eye-slash"
.on("show hide ", () => {
this.buttonLoad.set({
toggle: this.frames.visible,
icon: (this.frames.visible && "fa-eye") || "fa-eye-slash"
});
});
this.history_cache = {};
Expand Down
51 changes: 26 additions & 25 deletions client/galaxy/scripts/mvc/dataset/dataset-li-edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import ANNOTATIONS from "mvc/annotation";
import faIconButton from "ui/fa-icon-button";
import BASE_MVC from "mvc/base-mvc";
import _l from "utils/localization";
import * as _ from "underscore";

/* global Galaxy */
/* global $ */

//==============================================================================
var _super = DATASET_LI.DatasetListItemView;
Expand Down Expand Up @@ -100,7 +104,7 @@ var DatasetListItemEdit = _super.extend(
faIcon: "fa-times",
classes: "delete-btn",
onclick: function() {
self.$el.find(".icon-btn.delete-btn").tooltip('dispose');
self.$el.find(".icon-btn.delete-btn").tooltip("dispose");
self.model["delete"]();
}
});
Expand Down Expand Up @@ -260,32 +264,29 @@ var DatasetListItemEdit = _super.extend(
}

if (visualizations.length >= 1) {
var url = Galaxy.root + "visualizations?dataset_id=" + this.model.get("id");
return $("<a/>")
.addClass("visualization-link icon-btn")
.attr("href", url)
.append($("<span/>").addClass("fa fa-bar-chart-o"))
.on("click", function(e) {
Galaxy.frame.add({ url: url, title: "Visualization" });
e.preventDefault();
});
let dsid = this.model.get("id");
let url = Galaxy.root + "visualizations?dataset_id=" + dsid;
return faIconButton({
title: _l("Visualize this data"),
href: url,
classes: "visualization-link",
faIcon: "fa-bar-chart-o",
onclick: ev => {
if (Galaxy.frame && Galaxy.frame.active) {
ev.preventDefault();
Galaxy.frame.add({ url: url, title: "Visualization" });
} else if (Galaxy.router) {
ev.preventDefault();
Galaxy.router.push("visualizations", {
dataset_id: dsid
});
Galaxy.trigger("activate-hda", dsid);
}
}
});
}
},

/** add scratchbook functionality to visualization links */
_addScratchBookFn: function($links) {
$links.click(ev => {
if (Galaxy.frame && Galaxy.frame.active) {
Galaxy.frame.add({
title: _l("Visualization"),
url: $(this).attr("href")
});
ev.preventDefault();
ev.stopPropagation();
}
});
},

//TODO: if possible move these to readonly view - but display the owner's tags/annotation (no edit)
/** Render the tags list/control */
_renderTags: function($where) {
Expand Down Expand Up @@ -392,7 +393,7 @@ var DatasetListItemEdit = _super.extend(

/** listener for item purge (in the messages section) */
_clickPurgeLink: function(ev) {
if (confirm(_l("This will permanently remove the data in your dataset. Are you sure?"))) {
if (window.confirm(_l("This will permanently remove the data in your dataset. Are you sure?"))) {
this.model.purge();
}
return false;
Expand Down

0 comments on commit 1babfdf

Please sign in to comment.