##// END OF EJS Templates
git: use force fetch and update for target ref. This solves a case...
git: use force fetch and update for target ref. This solves a case when in PRs a target is force updated and is out of sync. Before we used a pull which --ff-only fails obviosly because two are out of sync. This change uses new logic that resets the target branch according to the source target branch allowing smooth merge simulation.

File last commit:

r2541:65f452f4 default
r2784:e8c62649 default
Show More
settings_process_management.mako
145 lines | 4.1 KiB | application/x-mako | MakoHtmlLexer
/ rhodecode / templates / admin / settings / settings_process_management.mako
process-managemet: added simple page to monitor worker processes of RhodeCode.
r1885
<div id="update_notice" style="display: none; margin: -40px 0px 20px 0px">
<div>${_('Checking for updates...')}</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">${_('Gunicorn process management')}</h3>
process-management: enable auto-refresh to track usage live.
r2500 <div class="pull-right">
<a id="autoRefreshEnable" href="#autoRefreshEnable" onclick="enableAutoRefresh(); return false">${_('start auto refresh')}</a>
<a id="autoRefreshDisable" href="#autoRefreshDisable" onclick="disableAutoRefresh(); return false" style="display: none">${_('stop auto refresh')}</a>
</div>
process-managemet: added simple page to monitor worker processes of RhodeCode.
r1885 </div>
<div class="panel-body" id="app">
<h3>List of Gunicorn processes on this machine</h3>
processes: use better naming detection of running processes
r2165 <%
processes: use better naming detection of running children processes
r2166 def get_name(proc):
cmd = ' '.join(proc.cmdline())
processes: use better naming detection of running processes
r2165 if 'vcsserver.ini' in cmd:
return 'VCSServer'
elif 'rhodecode.ini' in cmd:
return 'RhodeCode'
return proc.name()
%>
process-management: enable auto-refresh to track usage live.
r2500 <%include file='settings_process_management_data.mako'/>
process-managemet: added simple page to monitor worker processes of RhodeCode.
r1885 </div>
</div>
<script>
restart = function(elem, pid) {
if ($(elem).hasClass('disabled')){
return;
}
$(elem).addClass('disabled');
$(elem).html('processing...');
$.ajax({
url: pyroutes.url('admin_settings_process_management_signal'),
headers: {
"X-CSRF-Token": CSRF_TOKEN,
},
data: JSON.stringify({'pids': [pid]}),
dataType: 'json',
type: 'POST',
contentType: "application/json; charset=utf-8",
success: function (data) {
$(elem).html(data.result);
$(elem).removeClass('disabled');
},
failure: function (data) {
$(elem).text('FAILED TO LOAD RESULT');
$(elem).removeClass('disabled');
},
error: function (data) {
$(elem).text('FAILED TO LOAD RESULT');
$(elem).removeClass('disabled');
}
})
process-management: enable auto-refresh to track usage live.
r2500 };
var intervalID = null;
var currentRequest = null;
autoRefresh = function(value) {
var url = pyroutes.url('admin_settings_process_management_data');
var loadData = function() {
currentRequest = $.get(url)
.done(function(data) {
process-management: prevent from inject login page on session expiration.
r2541
if(data.indexOf('id="processTimeStamp"') === -1){
clearInterval(intervalID);
$('#procList').html('ERROR LOADING DATA. PLEASE REFRESH THE PAGE');
return
}
process-management: enable auto-refresh to track usage live.
r2500 currentRequest = null;
$('#procList').html(data);
timeagoActivate();
var beat = function(doCallback) {
var callback = function () {};
if (doCallback){
var callback = function () {beat(false)};
}
$('#processTimeStamp').animate({
opacity: $('#processTimeStamp').css('opacity') == '1' ? '0.3' : '1'
}, 500, callback);
};
beat(true)
});
};
if (value) {
intervalID = setInterval(loadData, 5000);
} else {
clearInterval(intervalID);
}
};
enableAutoRefresh = function() {
$('#autoRefreshEnable').hide();
$('#autoRefreshDisable').show();
autoRefresh(true)
};
disableAutoRefresh = function() {
$('#autoRefreshEnable').show();
$('#autoRefreshDisable').hide();
autoRefresh(false)
};
process-managemet: added simple page to monitor worker processes of RhodeCode.
r1885
processes: add a way to control processes via gunicorn control....
r2503 masterAction = function(pid, action) {
$.ajax({
url: pyroutes.url('admin_settings_process_management_master_signal'),
headers: {
"X-CSRF-Token": CSRF_TOKEN,
},
data: JSON.stringify({'pid_data': {'pid': pid, 'action': action}}),
dataType: 'json',
type: 'POST',
contentType: "application/json; charset=utf-8",
success: function (data) {
},
failure: function (data) {
},
error: function (data) {
}
})
};
addWorker = function(pid) {
masterAction(pid, '+');
};
removeWorker = function(pid) {
masterAction(pid, '-');
};
process-managemet: added simple page to monitor worker processes of RhodeCode.
r1885
</script>