Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions qiita_db/support_files/patches/python_patches/62.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,29 @@
# Adding a new command into Qiita/Alpha: delete_analysis

from qiita_db.software import Software, Command
from qiita_db.sql_connection import TRN

# Create the delete study command
Command.create(Software.from_name_and_version('Qiita', 'alpha'),
'delete_analysis', 'Deletes a full analysis',
{'analysis_id': ['integer', None]})

# Make sure that all validate commands have the "analysis" parameter
with TRN:
# Get all validate commands that are missing the analysis parameter
sql = """SELECT command_id
FROM qiita.software_command sc
WHERE name = 'Validate' AND NOT (
SELECT EXISTS(SELECT *
FROM qiita.command_parameter
WHERE parameter_name = 'analysis'
AND command_id = sc.command_id));"""
TRN.add(sql)
sql = """INSERT INTO qiita.command_parameter
(command_id, parameter_name, parameter_type,
required, default_value, name_order, check_biom_merge)
VALUES (6, 'analysis', 'analysis', false, NULL, NULL, false)"""
sql_params = [[cmd_id, 'analysis', 'analysis', False, None, None, False]
for cmd_id in TRN.execute_fetchflatten()]
TRN.add(sql, sql_params, many=True)
TRN.execute()
3 changes: 2 additions & 1 deletion qiita_pet/handlers/api_proxy/artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ def artifact_post_req(user_id, filepaths, artifact_type, name,
'template': prep_template_id,
'files': dumps(cleaned_filepaths),
'artifact_type': artifact_type,
'name': name
'name': name,
'analysis': None,
}), True)

# Submit the job
Expand Down
92 changes: 27 additions & 65 deletions qiita_pet/static/js/networkVue.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,29 @@ Vue.component('processing-graph', {
template: '<div class="row">' +
'<div class="row" id="network-header-div">' +
'<div class="col-md-12">' +
'<h4><a class="btn btn-info" id="show-hide-network-btn" onclick="toggleNetworkGraph();">Hide</a><i> Processing network </i></h4>' +
'Graph navigation: <a class="btn btn-danger" id="interaction-btn">Disabled</a></br>' +
'<div id="run-btn-div"><a class="btn btn-success" id="run-btn"><span class="glyphicon glyphicon-play"></span> Run workflow</a><span class="blinking-message"> Don\'t forget to hit "Run" once you are done with your workflow!</span></div>' +
'<b>Click circles for more information - This graph will refresh in <span id="countdown-span"></span> seconds or reload <a href="#" id="refresh-now-link">now</a></b>' +
// Processing Network header and Show/hide button
'<div class="row">' +
'<div class="col-md-2">' +
'<h4>Processing network</h4>' +
'</div>' +
'<div class="col-md-1">' +
'<a class="btn btn-info form-control" id="show-hide-network-btn" onclick="toggleNetworkGraph();">Hide</a>' +
'</div>' +
'</div>' +
// Run workflow button
'<div class="row" id="run-btn-div">' +
'<div class="col-md-2">' +
'<h4><span class="blinking-message">Start workflow:</h4></span>' +
'</div>' +
'<div class="col-md-1">' +
'<a class="btn btn-success form-control" id="run-btn"><span class="glyphicon glyphicon-play"></span> Run</a>' +
'</div>' +
'</div>' +
'<div class="row">' +
'<div class="col-md-12">' +
'<b>Click circles for more information - This graph will refresh in <span id="countdown-span"></span> seconds or reload <a href="#" id="refresh-now-link">now</a></b>' +
'</div>' +
'</div>' +
'</div>' +
'</div>' +
'<div class="row">' +
Expand All @@ -45,40 +64,6 @@ Vue.component('processing-graph', {
'</div>',
props: ['portal', 'graph-endpoint', 'jobs-endpoint', 'no-init-jobs-callback', 'is-analysis-pipeline'],
methods: {
/**
*
* Enables the graph interaction
*
**/
enableGraphInteraction: function () {
let vm = this;
$('#interaction-btn').removeClass('btn-danger').addClass('btn-success').html('Enabled');
options = {interaction: { dragNodes: false,
dragView: true,
zoomView: true,
selectConnectedEdges: true,
navigationButtons: true,
keyboard: false}};
vm.network.setOptions(options);
},

/**
*
* Disables the graph interaction
*
**/
disableGraphInteraction: function() {
let vm = this;
$('#interaction-btn').removeClass('btn-success').addClass('btn-danger').html('Disabled');
options = {interaction: { dragNodes: false,
dragView: false,
zoomView: false,
selectConnectedEdges: false,
navigationButtons: false,
keyboard: false}};
vm.network.setOptions(options);
},

/**
*
* Resets the zoom view of the graph
Expand All @@ -90,20 +75,6 @@ Vue.component('processing-graph', {
vm.network.fit();
}
},
/**
*
* Enables/Disables the interaction with the graph
*
**/
toggleGraphInteraction: function () {
let vm = this;
var options;
if ($('#interaction-btn').hasClass('btn-danger')) {
vm.enableGraphInteraction();
} else {
vm.disableGraphInteraction();
}
},

/**
*
Expand Down Expand Up @@ -689,10 +660,10 @@ Vue.component('processing-graph', {
},
interaction: {
dragNodes: false,
dragView: false,
zoomView: false,
selectConnectedEdges: false,
navigationButtons: false,
dragView: true,
zoomView: true,
selectConnectedEdges: true,
navigationButtons: true,
keyboard: false
},
groups: {
Expand Down Expand Up @@ -728,13 +699,6 @@ Vue.component('processing-graph', {
}
}
});

// Make sure that the button and the behavior matches
if ($('#interaction-btn').hasClass('btn-danger')) {
vm.disableGraphInteraction();
} else {
vm.enableGraphInteraction();
}
},

/**
Expand Down Expand Up @@ -1019,8 +983,6 @@ Vue.component('processing-graph', {
$('#run-btn').on('click', function() { vm.runWorkflow(); });
$('#run-btn-div').hide();

$('#interaction-btn').on('click', vm.toggleGraphInteraction);

$('#refresh-now-link').on('click', function () {
vm.countdownPoll = 15;
vm.update_job_status();
Expand Down
4 changes: 2 additions & 2 deletions qiita_pet/static/js/sampleTemplateVue.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,12 @@ Vue.component('sample-template-page', {

// The two "pills"
$ul = $('<ul>').addClass('nav nav-pills').appendTo($col);
$li = $('<li>').appendTo($ul);
$li = $('<li>').css('border', '1px solid #428bca').css('border-radius', '5px').appendTo($ul);
if (vm.rowType == 'column') {
$li.addClass('active');
}
$('<a>').attr('data-toggle', 'tab').attr('href', '#sample-info-tab').appendTo($li).append('Sample Information');
$li = $('<li>').appendTo($ul);
$li = $('<li>').css('border', '1px solid #428bca').css('border-radius', '5px').appendTo($ul);
if (vm.rowType == 'sample') {
$li.addClass('active');
}
Expand Down
28 changes: 28 additions & 0 deletions qiita_pet/static/vendor/css/bootstrap-toggle.min.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*! ========================================================================
* Bootstrap Toggle: bootstrap-toggle.css v2.2.0
* http://www.bootstraptoggle.com
* ========================================================================
* Copyright 2014 Min Hur, The New York Times Company
* Licensed under MIT
* ======================================================================== */
.checkbox label .toggle,.checkbox-inline .toggle{margin-left:-20px;margin-right:5px}
.toggle{position:relative;overflow:hidden}
.toggle input[type=checkbox]{display:none}
.toggle-group{position:absolute;width:200%;top:0;bottom:0;left:0;transition:left .35s;-webkit-transition:left .35s;-moz-user-select:none;-webkit-user-select:none}
.toggle.off .toggle-group{left:-100%}
.toggle-on{position:absolute;top:0;bottom:0;left:0;right:50%;margin:0;border:0;border-radius:0}
.toggle-off{position:absolute;top:0;bottom:0;left:50%;right:0;margin:0;border:0;border-radius:0}
.toggle-handle{position:relative;margin:0 auto;padding-top:0;padding-bottom:0;height:100%;width:0;border-width:0 1px}
.toggle.btn{min-width:59px;min-height:34px}
.toggle-on.btn{padding-right:24px}
.toggle-off.btn{padding-left:24px}
.toggle.btn-lg{min-width:79px;min-height:45px}
.toggle-on.btn-lg{padding-right:31px}
.toggle-off.btn-lg{padding-left:31px}
.toggle-handle.btn-lg{width:40px}
.toggle.btn-sm{min-width:50px;min-height:30px}
.toggle-on.btn-sm{padding-right:20px}
.toggle-off.btn-sm{padding-left:20px}
.toggle.btn-xs{min-width:35px;min-height:22px}
.toggle-on.btn-xs{padding-right:12px}
.toggle-off.btn-xs{padding-left:12px}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qiita_pet/static/vendor/css/img/network/cross.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qiita_pet/static/vendor/css/img/network/minus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qiita_pet/static/vendor/css/img/network/plus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions qiita_pet/static/vendor/js/bootstrap-toggle.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 13 additions & 10 deletions qiita_pet/static/vendor/js/resumable-uploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@
this.resumable.on('fileProgress', function(file){
$this.setFileProgress(file.uniqueIdentifier, file.progress());
$this.setProgress($this.resumable.progress());

// Apply a thumbnail
if(file.chunks.length>0 && file.chunks[0].status()=='success' && file.chunks[file.chunks.length-1].status()=='success'){
$('#uploader_status').append('~~ Upload Finished: <i>' + file.fileName + '</i> ~~<br/>');
var alphaNumFileName = file.fileName.replace(/[^0-9a-z]/gi, '');
$('#file-icon-' + alphaNumFileName).removeClass('blinking-message glyphicon-circle-arrow-up').addClass('glyphicon-ok');
$this.setFileThumbnail(file.uniqueIdentifier, target_prefix + '/api/photo/frame?time=10&study_id='+encodeURIComponent(this.study_id)+'&resumableIdentifier='+encodeURIComponent(file.uniqueIdentifier));
}
});
Expand Down Expand Up @@ -138,16 +138,18 @@
}

var listNode = $(document.createElement('div'));
var alphaNumFileName = fileName.replace(/[^0-9a-z]/gi, '');
var iconClass = resumableFile.uploaded !== undefined ? 'glyphicon-ok' : 'blinking-message glyphicon-circle-arrow-up';
var html = '<div class="row" class="checkbox">' +
'<label>' + fileName + '&nbsp; <input type="checkbox" value="' + dirId + '-' + fileName + '" name="files_to_erase">&nbsp;</label>' +
'<i id="file-icon-' + alphaNumFileName + '" class="glyphicon ' + iconClass + '"></i>';

if (is_admin) {
listNode.html('<div class="row" class="checkbox"><label>' + fileName +
'&nbsp; <input type="checkbox" value="' + dirId + '-' +
fileName + '" name="files_to_erase"></label>' +
'&nbsp;<a href="' + url + fileName + '">download</a></div>');
} else {
listNode.html('<div class="row" class="checkbox"><label>' + fileName +
'&nbsp; <input type="checkbox" value="' + dirId + '-' +
fileName + '" name="files_to_erase"></label></div>');
html = html + '&nbsp;<a href="' + url + fileName + '">download</a>';
}

html = html + '</div>';
listNode.html(html);
this.uploaderList.append(listNode);

var editNode = $(document.createElement('div'));
Expand All @@ -164,6 +166,7 @@
var x = {};
var editStatus = 'editing';
}

var file = {
resumableFile:resumableFile,
listNode:listNode,
Expand Down
42 changes: 42 additions & 0 deletions qiita_pet/static/vendor/js/vis-network.min.js

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions qiita_pet/static/vendor/licences/boostrap-toggle_license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2011-2014 Min Hur, The New York Times Company

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
6 changes: 4 additions & 2 deletions qiita_pet/templates/sitebase.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@
<link rel="stylesheet" href="{% raw qiita_config.portal_dir %}/static/vendor/css/jquery-ui.theme.min.css" type="text/css">
<link rel="stylesheet" href="{% raw qiita_config.portal_dir %}/static/vendor/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="{% raw qiita_config.portal_dir %}/static/vendor/css/bootstrap-theme.min.css" type="text/css">
<link rel="stylesheet" href="{% raw qiita_config.portal_dir %}/static/vendor/css/bootstrap-toggle.min.css" type="text/css">
<link rel="stylesheet" href="{% raw qiita_config.portal_dir %}/static/vendor/css/chosen.css" type="text/css">
<link rel="stylesheet" href="{% raw qiita_config.portal_dir %}/static/vendor/css/jquery.dataTables.min.css" type="text/css">
<link rel="stylesheet" href="{% raw qiita_config.portal_dir %}/static/css/style.css" type="text/css">
<link rel="stylesheet" src="{% raw qiita_config.portal_dir %}/static/vendor/css/vis.min.css" type="text/css">
<link rel="stylesheet" src="{% raw qiita_config.portal_dir %}/static/vendor/css/vis-network.min.css" type="text/css">
<link rel="stylesheet" href="{% raw qiita_config.portal_dir %}/static/vendor/css/vis.min.css" type="text/css">
<link rel="stylesheet" href="{% raw qiita_config.portal_dir %}/static/vendor/css/vis-network.min.css" type="text/css">
{% if portal_styling.custom_css %}
<style type="text/css">
{% raw portal_styling.custom_css %}
Expand All @@ -44,6 +45,7 @@
<script src="{% raw qiita_config.portal_dir %}/static/vendor/js/jquery-2.1.0.min.js"></script>
<script src="{% raw qiita_config.portal_dir %}/static/vendor/js/jquery-ui.min.js"></script>
<script src="{% raw qiita_config.portal_dir %}/static/vendor/js/bootstrap.min.js"></script>
<script src="{% raw qiita_config.portal_dir %}/static/vendor/js/bootstrap-toggle.min.js"></script>
<script src="{% raw qiita_config.portal_dir %}/static/vendor/js/chosen.jquery.min.js"></script>
<script src="{% raw qiita_config.portal_dir %}/static/vendor/js/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="{% raw qiita_config.portal_dir %}/static/vendor/js/vue.min.js"></script>
Expand Down
Loading