]> git.proxmox.com Git - proxmox-backup.git/blobdiff - www/DataStorePanel.js
ui: add ACL panel to datastores
[proxmox-backup.git] / www / DataStorePanel.js
diff --git a/www/DataStorePanel.js b/www/DataStorePanel.js
new file mode 100644 (file)
index 0000000..1b15751
--- /dev/null
@@ -0,0 +1,40 @@
+Ext.define('PBS.DataStorePanel', {
+    extend: 'Ext.tab.Panel',
+    alias: 'widget.pbsDataStorePanel',
+    mixins: ['Proxmox.Mixin.CBind'],
+
+    cbindData: function(initalConfig) {
+       let me = this;
+       return {
+           aclPath: `/datastore/${me.datastore}`,
+       };
+    },
+
+    border: false,
+    defaults: {
+       border: false,
+    },
+
+    items: [
+       {
+           xtype: 'pbsDataStoreContent',
+           cbind: {
+               datastore: '{datastore}',
+           },
+       },
+       {
+           itemId: 'acl',
+           xtype: 'pbsACLView',
+           aclExact: true,
+           cbind: {
+               aclPath: '{aclPath}',
+           },
+       },
+    ],
+
+    initComponent: function() {
+       let me = this;
+       me.title = `${gettext("Data Store")}: ${me.datastore}`;
+       me.callParent();
+    },
+});