mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Remove unused tool_dependency_status_updates
This commit is contained in:
@@ -258,62 +258,6 @@
|
||||
%endif
|
||||
</%def>
|
||||
|
||||
<%def name="dependency_status_updater()">
|
||||
<script type="text/javascript">
|
||||
config.addInitialization(function() {
|
||||
console.log("common.mako, dependency_status_updater");
|
||||
|
||||
// Tool dependency status updater - used to update the installation status on the Tool Dependencies Grid.
|
||||
// Looks for changes in tool dependency installation status using an async request. Keeps calling itself
|
||||
// (via setTimeout) until dependency installation status is neither 'Installing' nor 'Building'.
|
||||
window.tool_dependency_status_updater = function( dependency_status_list ) {
|
||||
// See if there are any items left to track
|
||||
var empty = true;
|
||||
for ( var item in dependency_status_list ) {
|
||||
//alert( "item" + item.toSource() );
|
||||
//alert( "dependency_status_list[item] " + dependency_status_list[item].toSource() );
|
||||
//alert( "dependency_status_list[item]['status']" + dependency_status_list[item]['status'] );
|
||||
if ( dependency_status_list[item]['status'] != 'Installed' ) {
|
||||
empty = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( ! empty ) {
|
||||
setTimeout( function() {
|
||||
tool_dependency_status_updater_callback( dependency_status_list )
|
||||
}, 3000 );
|
||||
}
|
||||
};
|
||||
|
||||
var tool_dependency_status_updater_callback = function( dependency_status_list ) {
|
||||
var ids = [];
|
||||
var status_list = [];
|
||||
$.each( dependency_status_list, function( index, dependency_status ) {
|
||||
ids.push( dependency_status[ 'id' ] );
|
||||
status_list.push( dependency_status[ 'status' ] );
|
||||
});
|
||||
// Make ajax call
|
||||
$.ajax( {
|
||||
type: "POST",
|
||||
url: "${h.url_for( controller='admin_toolshed', action='tool_dependency_status_updates' )}",
|
||||
dataType: "json",
|
||||
data: { ids: ids.join( "," ), status_list: status_list.join( "," ) },
|
||||
success : function( data ) {
|
||||
$.each( data, function( index, val ) {
|
||||
// Replace HTML
|
||||
var cell1 = $( "#ToolDependencyStatus-" + val[ 'id' ] );
|
||||
cell1.html( val[ 'html_status' ] );
|
||||
dependency_status_list[ index ] = val;
|
||||
});
|
||||
tool_dependency_status_updater( dependency_status_list );
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
});
|
||||
</script>
|
||||
</%def>
|
||||
|
||||
<%def name="repository_installation_status_updater()">
|
||||
<script type="text/javascript">
|
||||
config.addInitialization(function() {
|
||||
|
||||
@@ -258,62 +258,6 @@
|
||||
%endif
|
||||
</%def>
|
||||
|
||||
<%def name="dependency_status_updater()">
|
||||
<script type="text/javascript">
|
||||
config.addInitialization(function() {
|
||||
console.log("common.mako, dependency_status_updater");
|
||||
|
||||
// Tool dependency status updater - used to update the installation status on the Tool Dependencies Grid.
|
||||
// Looks for changes in tool dependency installation status using an async request. Keeps calling itself
|
||||
// (via setTimeout) until dependency installation status is neither 'Installing' nor 'Building'.
|
||||
window.tool_dependency_status_updater = function( dependency_status_list ) {
|
||||
// See if there are any items left to track
|
||||
var empty = true;
|
||||
for ( var item in dependency_status_list ) {
|
||||
//alert( "item" + item.toSource() );
|
||||
//alert( "dependency_status_list[item] " + dependency_status_list[item].toSource() );
|
||||
//alert( "dependency_status_list[item]['status']" + dependency_status_list[item]['status'] );
|
||||
if ( dependency_status_list[item]['status'] != 'Installed' ) {
|
||||
empty = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( ! empty ) {
|
||||
setTimeout( function() {
|
||||
tool_dependency_status_updater_callback( dependency_status_list )
|
||||
}, 3000 );
|
||||
}
|
||||
};
|
||||
|
||||
var tool_dependency_status_updater_callback = function( dependency_status_list ) {
|
||||
var ids = [];
|
||||
var status_list = [];
|
||||
$.each( dependency_status_list, function( index, dependency_status ) {
|
||||
ids.push( dependency_status[ 'id' ] );
|
||||
status_list.push( dependency_status[ 'status' ] );
|
||||
});
|
||||
// Make ajax call
|
||||
$.ajax( {
|
||||
type: "POST",
|
||||
url: "${h.url_for( controller='admin_toolshed', action='tool_dependency_status_updates' )}",
|
||||
dataType: "json",
|
||||
data: { ids: ids.join( "," ), status_list: status_list.join( "," ) },
|
||||
success : function( data ) {
|
||||
$.each( data, function( index, val ) {
|
||||
// Replace HTML
|
||||
var cell1 = $( "#ToolDependencyStatus-" + val[ 'id' ] );
|
||||
cell1.html( val[ 'html_status' ] );
|
||||
dependency_status_list[ index ] = val;
|
||||
});
|
||||
tool_dependency_status_updater( dependency_status_list );
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
});
|
||||
</script>
|
||||
</%def>
|
||||
|
||||
<%def name="repository_installation_status_updater()">
|
||||
<script type="text/javascript">
|
||||
config.addInitialization(function() {
|
||||
|
||||
Reference in New Issue
Block a user