Skip to content

Commit

Permalink
Fix "Sub-directory Support" in small steps (#12910)
Browse files Browse the repository at this point in the history
* Fix "Sub-directory Support" in small steps

This fixes small parts from #12205 part 3
fixes #12205

Even someone knows a better way, for example to fix js with the url() function. In my case it works.

* Update oxidized.inc.php

* Update oxidized.inc.php

* Update oxidized.inc.php

* Update oxidized.inc.php

* Update oxidized.inc.php

* Update oxidized.inc.php

* Update oxidized.inc.php
  • Loading branch information
mpikzink committed Jun 15, 2021
1 parent bd3da05 commit 0489382
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/html/pages/oxidized.inc.php
Expand Up @@ -82,7 +82,7 @@
formatters: {
"hostname": function(column, row) {
if (row.id) {
return '<a href="/device/device=' + row.id + '">' + row.hostname + '</a>';
return '<a href="<?= url('device') ?>/' + row.id + '">' + row.hostname + '</a>';
} else {
return row.hostname;
}
Expand All @@ -92,7 +92,7 @@
return '<button class="btn btn-default btn-sm" name="btn-refresh-node-devId' + row.id +
'" id="btn-refresh-node-devId' + row.id + '" onclick="refresh_oxidized_node(\'' + row.hostname + '\');" title="Refetch config">' +
'<i class="fa fa-refresh"></i></button> ' +
'<a href="device/device=' + row.id + '/tab=showconfig/" title="View config"><i class="fa fa-align-justify fa-lg icon-theme"></i></a>';
'<a href="<?= url('device') ?>/' + row.id + '/tab=showconfig/" title="View config"><i class="fa fa-align-justify fa-lg icon-theme"></i></a>';
}
},
"status": function(column, row) {
Expand Down Expand Up @@ -121,7 +121,7 @@
$('#search-output').append('<p>Config appears on the following device(s):</p>');
$.each(data.output, function (row, value) {
if (value['dev_id']) {
$('#search-output').append('<p><a href="device/device=' + value['dev_id'] + '/tab=showconfig/">' + value['full_name'] + '</p>');
$('#search-output').append('<p><a href="<?= url('device') ?>/' + value['dev_id'] + '/tab=showconfig/">' + value['full_name'] + '</p>');
} else {
$('#search-output').append('<p>' + value['full_name'] + '</p>');
}
Expand Down

0 comments on commit 0489382

Please sign in to comment.