Project

General

Profile

« Previous | Next » 

Revision 5613fbe9

Added by Justin Sherrill almost 10 years ago

fixes #4989,6734,6735 - adapting sync management page to use dynflow

Note that some columns in the sync management table
have changed to reflect difficulty of fetching some data.

View differences:

app/assets/javascripts/katello/sync_management/sync_management.js
$("#sync_toggle_cont").find("img").remove();
});
$('.info-tipsy').tipsy({
html: true,
gravity: 's',
className: 'error-tipsy',
title: function() {
return $(this).find('.hidden-text').html();
}
});
});
KT.content_actions = (function(){
......
// Only stop when we reach 100% and the finish_time is done sometimes they are not both complete
if (!repo.is_running && (repo.raw_state !== 'waiting')) {
removeSyncing(repo.id);
KT.content.finishRepo(repo.id, repo.state, repo.duration, repo.raw_state, repo.error_details);
KT.content.updateRepo(repo.id, repo.start_time, repo.duration, repo.progress.progress, repo.display_size, repo.packages, repo.size);
KT.content.updateRepo(repo.id, repo.start_time, repo.duration, repo.progress.progress, repo.display_size, repo.packages, repo.size, repo.sync_id);
KT.content.finishRepo(repo.id, repo.state, repo.duration, repo.raw_state, repo.error_details, repo.sync_id);
KT.content.updateProduct(repo.product_id, false, false, true);
notices.checkNotices();
}
......
repo.duration,
repo.progress.progress,
repo.display_size,
repo.packages);
repo.packages,
repo.sync_id);
}
});
KT.content.reset_products(data);
......
element.find('.result-info').append(cancelButton);
}
},
updateRepo = function(repo_id, starttime, duration, progress, display_size, packages, size){
updateRepo = function(repo_id, starttime, duration, progress, display_size, packages, size, task_id){
var repo = $("#repo-" + repo_id);
update_item(repo, starttime, duration, progress, display_size, packages, size );
update_item(repo, starttime, duration, progress, display_size, packages, size, task_id);
},
finishRepo = function(repo_id, state, duration, raw_state, error_details){
finishRepo = function(repo_id, state, duration, raw_state, error_details, task_id){
var element = $("#repo-" + repo_id);
var messages = [];
state = '<a href="/foreman_tasks/tasks/' + task_id + '">' + state + '</a>';
element.find(".result .result-info").html(state);
fadeUpdate(element.find(".duration"), duration);
......
element.find('.result .info-tipsy ul').html(messages.join(''));
}
},
update_item = function(element, starttime, duration, progress, display_size, packages, size) {
update_item = function(element, starttime, duration, progress, display_size, packages, size, task_id) {
var pg = element.find(".progress"),
value = pg.find(".ui-progressbar-value");
......
fadeUpdate(element.find(".start_time"), starttime);
// clear duration during active sync
fadeUpdate(element.find(".duration"), '');
fadeUpdate(element.find(".size"), display_size + ' (' + packages + ')');
fadeUpdate(element.find(".size"), display_size);
element.find('.size').data('size', size);
element.find('.info-tipsy').attr('href', '/foreman_tasks/tasks/' + task_id);
progress = progress === 100 ? 99 : progress;
value.animate({'width': progress },{ queue:false,
duration:"slow", easing:"easeInSine" });

Also available in: Unified diff