]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Add mediaid to volume overview endpoint
authorMarcin Haba <marcin.haba@bacula.pl>
Tue, 18 Apr 2023 06:24:30 +0000 (08:24 +0200)
committerMarcin Haba <marcin.haba@bacula.pl>
Thu, 20 Apr 2023 10:00:26 +0000 (12:00 +0200)
gui/baculum/protected/API/Modules/VolumeManager.php
gui/baculum/protected/API/openapi_baculum.json

index 038f00f28ed96ae60c5199617c7b1ad9f98f3513..5c0a8bd6423d3de46a3500ca12d633ca80204925 100644 (file)
@@ -178,6 +178,7 @@ LEFT JOIN Storage USING (StorageId)
                // get disk volume types (file, dedup and alighed together)
                $vt_disk = $this->getDiskVolTypes();
                $sql = 'SELECT
+                               MediaId         AS mediaid,
                                VolumeName      AS volumename,
                                Pool.Name       AS pool,
                                Storage.Name    AS storage,
@@ -202,6 +203,7 @@ LEFT JOIN Storage USING (StorageId)
                // get tape volume types
                $vt_tape = $this->getTapeVolTypes();
                $sql = 'SELECT
+                               MediaId         AS mediaid,
                                VolumeName      AS volumename,
                                Pool.Name       AS pool,
                                Storage.Name    AS storage,
@@ -226,6 +228,7 @@ LEFT JOIN Storage USING (StorageId)
                // get cloud volume types
                $vt_cloud = $this->getCloudVolTypes();
                $sql = 'SELECT
+                               MediaId         AS mediaid,
                                VolumeName      AS volumename,
                                Pool.Name       AS pool,
                                Storage.Name    AS storage,
index 9aac3ece4fba1fd77d094684e00aec0c75759740..7c0f91876ced36c1af20ecff9d3e8086f1b4381a 100644 (file)
                "VolumeOverview": {
                        "type": "object",
                        "properties": {
+                               "mediaid": {
+                                       "type": "integer",
+                                       "description": "Volume identifier"
+                               },
                                "volumename": {
                                        "type": "string",
                                        "description": "Volume name"