public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup 1/5] tape/inventory: fix missing parameter in error message
@ 2021-02-05 14:26 Dominik Csapak
  2021-02-05 14:26 ` [pbs-devel] [PATCH proxmox-backup 2/5] ui: tape/ChangerStatus: remove unnecessary buttons Dominik Csapak
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Dominik Csapak @ 2021-02-05 14:26 UTC (permalink / raw)
  To: pbs-devel

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/tape/inventory.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tape/inventory.rs b/src/tape/inventory.rs
index f890e42b..963eac58 100644
--- a/src/tape/inventory.rs
+++ b/src/tape/inventory.rs
@@ -346,7 +346,7 @@ impl Inventory {
 
         match last_pool {
             Some(pool) => Ok(pool.to_string()),
-            None => bail!("media set {} is incomplete - unable to lookup pool"),
+            None => bail!("media set {} is incomplete - unable to lookup pool", media_set_uuid),
         }
     }
 
-- 
2.20.1





^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pbs-devel] [PATCH proxmox-backup 2/5] ui: tape/ChangerStatus: remove unnecessary buttons
  2021-02-05 14:26 [pbs-devel] [PATCH proxmox-backup 1/5] tape/inventory: fix missing parameter in error message Dominik Csapak
@ 2021-02-05 14:26 ` Dominik Csapak
  2021-02-05 14:26 ` [pbs-devel] [PATCH proxmox-backup 3/5] ui: tape/ChangerStatus: add inventory button Dominik Csapak
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Dominik Csapak @ 2021-02-05 14:26 UTC (permalink / raw)
  To: pbs-devel

they exist in the changer config pane, and are unnecessary here

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/tape/ChangerStatus.js | 58 ---------------------------------------
 1 file changed, 58 deletions(-)

diff --git a/www/tape/ChangerStatus.js b/www/tape/ChangerStatus.js
index 97294b72..abe652b9 100644
--- a/www/tape/ChangerStatus.js
+++ b/www/tape/ChangerStatus.js
@@ -25,30 +25,6 @@ Ext.define('PBS.TapeManagement.ChangerStatus', {
 	    }
 	},
 
-	onAdd: function() {
-	    let me = this;
-	    Ext.create('PBS.TapeManagement.ChangerEditWindow', {
-		listeners: {
-		    destroy: function() {
-			me.reloadList();
-		    },
-		},
-	    }).show();
-	},
-
-	onEdit: function() {
-	    let me = this;
-	    let vm = me.getViewModel();
-	    let changerid = vm.get('changer');
-	    Ext.create('PBS.TapeManagement.ChangerEditWindow', {
-		changerid,
-		autoLoad: true,
-		listeners: {
-		    destroy: () => me.reload(),
-		},
-	    }).show();
-	},
-
 	importTape: function(view, rI, cI, button, el, record) {
 	    let me = this;
 	    let vm = me.getViewModel();
@@ -455,40 +431,6 @@ Ext.define('PBS.TapeManagement.ChangerStatus', {
 	    selModel: false,
 	},
 	'-',
-	{
-	    text: gettext('Add'),
-	    xtype: 'proxmoxButton',
-	    handler: 'onAdd',
-	    selModel: false,
-	},
-	{
-	    text: gettext('Edit'),
-	    xtype: 'proxmoxButton',
-	    handler: 'onEdit',
-	    bind: {
-		disabled: '{!changerSelected}',
-	    },
-	},
-	{
-	    xtype: 'proxmoxStdRemoveButton',
-	    baseurl: '/api2/extjs/config/changer',
-	    callback: 'reloadList',
-	    selModel: false,
-	    getRecordName: function() {
-		let me = this;
-		let vm = me.up('panel').getViewModel();
-		return vm.get('changer');
-	    },
-	    getUrl: function() {
-		let me = this;
-		let vm = me.up('panel').getViewModel();
-		return `/api2/extjs/config/changer/${vm.get('changer')}`;
-	    },
-	    bind: {
-		disabled: '{!changerSelected}',
-	    },
-	},
-	'-',
 	{
 	    text: gettext('Barcode Label'),
 	    xtype: 'proxmoxButton',
-- 
2.20.1





^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pbs-devel] [PATCH proxmox-backup 3/5] ui: tape/ChangerStatus: add inventory button
  2021-02-05 14:26 [pbs-devel] [PATCH proxmox-backup 1/5] tape/inventory: fix missing parameter in error message Dominik Csapak
  2021-02-05 14:26 ` [pbs-devel] [PATCH proxmox-backup 2/5] ui: tape/ChangerStatus: remove unnecessary buttons Dominik Csapak
@ 2021-02-05 14:26 ` Dominik Csapak
  2021-02-05 14:27   ` Dominik Csapak
  2021-02-05 14:26 ` [pbs-devel] [PATCH proxmox-backup 4/5] ui: tape/DriveConfig: add Catalog button Dominik Csapak
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 7+ messages in thread
From: Dominik Csapak @ 2021-02-05 14:26 UTC (permalink / raw)
  To: pbs-devel

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/tape/ChangerStatus.js | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/www/tape/ChangerStatus.js b/www/tape/ChangerStatus.js
index abe652b9..c80c63cd 100644
--- a/www/tape/ChangerStatus.js
+++ b/www/tape/ChangerStatus.js
@@ -341,6 +341,36 @@ Ext.define('PBS.TapeManagement.ChangerStatus', {
 	    }).show();
 	},
 
+	inventory: function() {
+	    let me = this;
+	    let vm = me.getViewModel();
+	    let changer = vm.get('changer');
+	    if (changer === '') {
+		return;
+	    }
+
+	    Ext.create('Proxmox.window.Edit', {
+		title: gettext('Barcode Label'),
+		showTaskViewer: true,
+		method: 'PUT',
+		url: '/api2/extjs/tape/drive',
+		submitUrl: function(url, values) {
+		    let drive = values.drive;
+		    delete values.drive;
+		    return `${url}/${encodeURIComponent(drive)}/inventory`;
+		},
+
+		items: [
+		    {
+			xtype: 'pbsDriveSelector',
+			fieldLabel: gettext('Drive'),
+			name: 'drive',
+			changer: changer,
+		    },
+		],
+	    }).show();
+	},
+
 	reload: async function() {
 	    let me = this;
 	    let view = me.getView();
@@ -440,6 +470,15 @@ Ext.define('PBS.TapeManagement.ChangerStatus', {
 		disabled: '{!changerSelected}',
 	    },
 	},
+	{
+	    text: gettext('Inventory'),
+	    xtype: 'proxmoxButton',
+	    handler: 'inventory',
+	    iconCls: 'fa fa-book',
+	    bind: {
+		disabled: '{!changerSelected}',
+	    },
+	},
     ],
 
     layout: 'auto',
-- 
2.20.1





^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pbs-devel] [PATCH proxmox-backup 4/5] ui: tape/DriveConfig: add Catalog button
  2021-02-05 14:26 [pbs-devel] [PATCH proxmox-backup 1/5] tape/inventory: fix missing parameter in error message Dominik Csapak
  2021-02-05 14:26 ` [pbs-devel] [PATCH proxmox-backup 2/5] ui: tape/ChangerStatus: remove unnecessary buttons Dominik Csapak
  2021-02-05 14:26 ` [pbs-devel] [PATCH proxmox-backup 3/5] ui: tape/ChangerStatus: add inventory button Dominik Csapak
@ 2021-02-05 14:26 ` Dominik Csapak
  2021-02-05 14:26 ` [pbs-devel] [PATCH proxmox-backup 5/5] ui: tape/DriveConfig: add missing tooltips Dominik Csapak
  2021-02-05 15:13 ` [pbs-devel] applied: [PATCH proxmox-backup 1/5] tape/inventory: fix missing parameter in error message Dietmar Maurer
  4 siblings, 0 replies; 7+ messages in thread
From: Dominik Csapak @ 2021-02-05 14:26 UTC (permalink / raw)
  To: pbs-devel

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/tape/DriveConfig.js | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/www/tape/DriveConfig.js b/www/tape/DriveConfig.js
index 8eb40da3..0d28eb87 100644
--- a/www/tape/DriveConfig.js
+++ b/www/tape/DriveConfig.js
@@ -57,6 +57,16 @@ Ext.define('PBS.TapeManagement.DrivePanel', {
 	    });
 	},
 
+	catalog: function(view, rI, cI, button, el, record) {
+	    let me = this;
+	    let drive = record.data.name;
+	    me.driveCommand(drive, 'catalog', function(response) {
+		Ext.create('Proxmox.window.TaskViewer', {
+		    upid: response.result.data,
+		}).show();
+	    }, {}, 'POST');
+	},
+
 	readLabel: function(view, rI, cI, button, el, record) {
 	    let me = this;
 	    let drive = record.data.name;
@@ -286,7 +296,7 @@ Ext.define('PBS.TapeManagement.DrivePanel', {
 	},
 	{
 	    text: gettext('Actions'),
-	    width: 120,
+	    width: 140,
 	    xtype: 'actioncolumn',
 	    items: [
 		{
@@ -301,6 +311,11 @@ Ext.define('PBS.TapeManagement.DrivePanel', {
 		    iconCls: 'fa fa-tag',
 		    handler: 'readLabel',
 		},
+		{
+		    iconCls: 'fa fa-book',
+		    handler: 'catalog',
+		    tooltip: gettext('Catalog'),
+		},
 		{
 		    iconCls: 'fa fa-info-circle',
 		    handler: 'status',
-- 
2.20.1





^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pbs-devel] [PATCH proxmox-backup 5/5] ui: tape/DriveConfig: add missing tooltips
  2021-02-05 14:26 [pbs-devel] [PATCH proxmox-backup 1/5] tape/inventory: fix missing parameter in error message Dominik Csapak
                   ` (2 preceding siblings ...)
  2021-02-05 14:26 ` [pbs-devel] [PATCH proxmox-backup 4/5] ui: tape/DriveConfig: add Catalog button Dominik Csapak
@ 2021-02-05 14:26 ` Dominik Csapak
  2021-02-05 15:13 ` [pbs-devel] applied: [PATCH proxmox-backup 1/5] tape/inventory: fix missing parameter in error message Dietmar Maurer
  4 siblings, 0 replies; 7+ messages in thread
From: Dominik Csapak @ 2021-02-05 14:26 UTC (permalink / raw)
  To: pbs-devel

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/tape/DriveConfig.js | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/www/tape/DriveConfig.js b/www/tape/DriveConfig.js
index 0d28eb87..bb25f58b 100644
--- a/www/tape/DriveConfig.js
+++ b/www/tape/DriveConfig.js
@@ -302,14 +302,17 @@ Ext.define('PBS.TapeManagement.DrivePanel', {
 		{
 		    iconCls: 'fa fa-hdd-o',
 		    handler: 'cartridgeMemory',
+		    tooltip: gettext('Cartridge Memory'),
 		},
 		{
 		    iconCls: 'fa fa-line-chart',
 		    handler: 'volumeStatistics',
+		    tooltip: gettext('Volume Statistics'),
 		},
 		{
 		    iconCls: 'fa fa-tag',
 		    handler: 'readLabel',
+		    tooltip: gettext('Read Label'),
 		},
 		{
 		    iconCls: 'fa fa-book',
@@ -319,10 +322,12 @@ Ext.define('PBS.TapeManagement.DrivePanel', {
 		{
 		    iconCls: 'fa fa-info-circle',
 		    handler: 'status',
+		    tooltip: gettext('Status'),
 		},
 		{
 		    iconCls: 'fa fa-pencil-square-o',
 		    handler: 'labelMedia',
+		    tooltip: gettext('Label Media'),
 		},
 	    ],
 	},
-- 
2.20.1





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [pbs-devel] [PATCH proxmox-backup 3/5] ui: tape/ChangerStatus: add inventory button
  2021-02-05 14:26 ` [pbs-devel] [PATCH proxmox-backup 3/5] ui: tape/ChangerStatus: add inventory button Dominik Csapak
@ 2021-02-05 14:27   ` Dominik Csapak
  0 siblings, 0 replies; 7+ messages in thread
From: Dominik Csapak @ 2021-02-05 14:27 UTC (permalink / raw)
  To: pbs-devel

On 2/5/21 15:26, Dominik Csapak wrote:
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>   www/tape/ChangerStatus.js | 39 +++++++++++++++++++++++++++++++++++++++
>   1 file changed, 39 insertions(+)
> 
> diff --git a/www/tape/ChangerStatus.js b/www/tape/ChangerStatus.js
> index abe652b9..c80c63cd 100644
> --- a/www/tape/ChangerStatus.js
> +++ b/www/tape/ChangerStatus.js
> @@ -341,6 +341,36 @@ Ext.define('PBS.TapeManagement.ChangerStatus', {
>   	    }).show();
>   	},
>   
> +	inventory: function() {
> +	    let me = this;
> +	    let vm = me.getViewModel();
> +	    let changer = vm.get('changer');
> +	    if (changer === '') {
> +		return;
> +	    }
> +
> +	    Ext.create('Proxmox.window.Edit', {
> +		title: gettext('Barcode Label'),

that should ofc be 'Inventory' instead ...
i can send a v2 or a fixup...

> +		showTaskViewer: true,
> +		method: 'PUT',
> +		url: '/api2/extjs/tape/drive',
> +		submitUrl: function(url, values) {
> +		    let drive = values.drive;
> +		    delete values.drive;
> +		    return `${url}/${encodeURIComponent(drive)}/inventory`;
> +		},
> +
> +		items: [
> +		    {
> +			xtype: 'pbsDriveSelector',
> +			fieldLabel: gettext('Drive'),
> +			name: 'drive',
> +			changer: changer,
> +		    },
> +		],
> +	    }).show();
> +	},
> +
>   	reload: async function() {
>   	    let me = this;
>   	    let view = me.getView();
> @@ -440,6 +470,15 @@ Ext.define('PBS.TapeManagement.ChangerStatus', {
>   		disabled: '{!changerSelected}',
>   	    },
>   	},
> +	{
> +	    text: gettext('Inventory'),
> +	    xtype: 'proxmoxButton',
> +	    handler: 'inventory',
> +	    iconCls: 'fa fa-book',
> +	    bind: {
> +		disabled: '{!changerSelected}',
> +	    },
> +	},
>       ],
>   
>       layout: 'auto',
> 





^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pbs-devel] applied: [PATCH proxmox-backup 1/5] tape/inventory: fix missing parameter in error message
  2021-02-05 14:26 [pbs-devel] [PATCH proxmox-backup 1/5] tape/inventory: fix missing parameter in error message Dominik Csapak
                   ` (3 preceding siblings ...)
  2021-02-05 14:26 ` [pbs-devel] [PATCH proxmox-backup 5/5] ui: tape/DriveConfig: add missing tooltips Dominik Csapak
@ 2021-02-05 15:13 ` Dietmar Maurer
  4 siblings, 0 replies; 7+ messages in thread
From: Dietmar Maurer @ 2021-02-05 15:13 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Dominik Csapak

applied all 5 patches (with window name fix)




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-02-05 15:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-05 14:26 [pbs-devel] [PATCH proxmox-backup 1/5] tape/inventory: fix missing parameter in error message Dominik Csapak
2021-02-05 14:26 ` [pbs-devel] [PATCH proxmox-backup 2/5] ui: tape/ChangerStatus: remove unnecessary buttons Dominik Csapak
2021-02-05 14:26 ` [pbs-devel] [PATCH proxmox-backup 3/5] ui: tape/ChangerStatus: add inventory button Dominik Csapak
2021-02-05 14:27   ` Dominik Csapak
2021-02-05 14:26 ` [pbs-devel] [PATCH proxmox-backup 4/5] ui: tape/DriveConfig: add Catalog button Dominik Csapak
2021-02-05 14:26 ` [pbs-devel] [PATCH proxmox-backup 5/5] ui: tape/DriveConfig: add missing tooltips Dominik Csapak
2021-02-05 15:13 ` [pbs-devel] applied: [PATCH proxmox-backup 1/5] tape/inventory: fix missing parameter in error message Dietmar Maurer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal