Skip to content

Commit

Permalink
webui: get volume and pool params from query instead of route
Browse files Browse the repository at this point in the history
Fixes #1441: Unable to view the pool details, when the pool name contains an space char
  • Loading branch information
fbergkemper committed Mar 24, 2022
1 parent feba96f commit 90dbf70
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions webui/module/Media/src/Media/Controller/MediaController.php
Expand Up @@ -5,7 +5,7 @@
* bareos-webui - Bareos Web-Frontend
*
* @link https://github.com/bareos/bareos for the canonical source repository
* @copyright Copyright (c) 2013-2019 Bareos GmbH & Co. KG (http://www.bareos.org/)
* @copyright Copyright (c) 2013-2022 Bareos GmbH & Co. KG (http://www.bareos.org/)
* @license GNU Affero General Public License (http://www.gnu.org/licenses/)
*
* This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -130,7 +130,7 @@ public function detailsAction()
);
}

$volumename = $this->params()->fromRoute('id');
$volumename = $this->params()->fromQuery('volume');

return new ViewModel(array(
'volume' => $volumename,
Expand Down
4 changes: 2 additions & 2 deletions webui/module/Pool/src/Pool/Controller/PoolController.php
Expand Up @@ -5,7 +5,7 @@
* bareos-webui - Bareos Web-Frontend
*
* @link https://github.com/bareos/bareos for the canonical source repository
* @copyright Copyright (c) 2013-2019 Bareos GmbH & Co. KG (http://www.bareos.org/)
* @copyright Copyright (c) 2013-2022 Bareos GmbH & Co. KG (http://www.bareos.org/)
* @license GNU Affero General Public License (http://www.gnu.org/licenses/)
*
* This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -130,7 +130,7 @@ public function detailsAction()
);
}

$poolname = $this->params()->fromRoute('id');
$poolname = $this->params()->fromQuery('pool');

try {
$this->bsock = $this->getServiceLocator()->get('director');
Expand Down
6 changes: 3 additions & 3 deletions webui/public/js/bootstrap-table-formatter.js
Expand Up @@ -3,7 +3,7 @@
* bareos-webui - Bareos Web-Frontend
*
* @link https://github.com/bareos/bareos for the canonical source repository
* @copyright Copyright (c) 2020-2021 Bareos GmbH & Co. KG (http://www.bareos.org/)
* @copyright Copyright (c) 2020-2022 Bareos GmbH & Co. KG (http://www.bareos.org/)
* @license GNU Affero General Public License (http://www.gnu.org/licenses/)
*
* This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -488,11 +488,11 @@ function formatAutochangerStatus(value) {
}

function formatPoolName(value, basePath) {
return '<a href="' + basePath + '/pool/details/' + value + '">' + value + '</a>';
return '<a href="' + basePath + '/pool/details/?pool=' + value + '">' + value + '</a>';
}

function formatVolumeName(value, basePath) {
return '<a href="' + basePath + '/media/details/' + value + '">' + value + '</a>';
return '<a href="' + basePath + '/media/details/?volume=' + value + '">' + value + '</a>';
}

function clientsActionButtonsFormatter(value, row, index, basePath) {
Expand Down

0 comments on commit 90dbf70

Please sign in to comment.