Skip to content

Commit

Permalink
webui: adjust http requests in dashboard module views
Browse files Browse the repository at this point in the history
  • Loading branch information
fbergkemper committed Apr 17, 2023
1 parent 3e82d85 commit 43bf518
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions webui/module/Dashboard/view/dashboard/dashboard/index.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ $this->headTitle($title);

function getJobsPast24h() {
$.ajax({
url : '<?php echo $this->url('dashboard', array('action' => 'getData'), null) . '?data=jobspast24h'; ?>',
url : '<?php echo $this->url('api/job', array(), array()) . '?filter=last24h'; ?>',
dataType: 'json',
timeout: function() {
console.log('jobpast24h: timeout');
console.log('getJobsPast24h(): timeout');
},
success: function(data) {
$('.waiting-jobs-field').empty();
Expand All @@ -104,18 +104,18 @@ $this->headTitle($title);
);
},
error: function() {
console.log('jobspast24h: error');
console.log('getJobsPast24h(): error');
},
parseerror: function() {
console.log('jobspast24h: parse error');
console.log('getJobsPast24h(): parse error');
}
});
}

function getJobTotals() {
table_job_totals = $('#job-totals').bootstrapTable({
locale: '<?php echo str_replace('_','-', $_SESSION['bareos']['locale']); ?>',
url: '<?php echo $this->url('dashboard', array('action' => 'getData'), null) . '?data=jobtotals'; ?>',
url: '<?php echo $this->url('api/jobtotals', array(), array()); ?>',
method: 'get',
dataType: 'json',
columns: [
Expand Down Expand Up @@ -157,7 +157,7 @@ $this->headTitle($title);
locale: '<?php echo str_replace('_','-', $_SESSION['bareos']['locale']); ?>',
cookie: <?php echo $_SESSION['bareos']['dt_statesave']; ?>,
cookieIdTable: 'dashboard_table_jobs_last_status',
url: '<?php echo $this->url('dashboard', array('action' => 'getData'), null) . '?data=jobslaststatus'; ?>',
url: '<?php echo $this->url('api/job', array(), array()) . '?filter=lastrun'; ?>',
method: 'get',
dataType: 'json',
pagination : true,
Expand Down Expand Up @@ -243,7 +243,7 @@ $this->headTitle($title);

function getRunningJobs() {
$.ajax({
url: '<?php echo $this->url('dashboard', array('action' => 'getData'), null) . '?data=runningjobs'; ?>',
url: '<?php echo $this->url('api/job', array(), array()) . '?filter=running'; ?>',
dataType: 'json',
timeout: 10000,
success: function(data) {
Expand Down

0 comments on commit 43bf518

Please sign in to comment.