]> git.proxmox.com Git - pve-manager.git/commitdiff
add/display storage option
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 14 Nov 2011 08:33:02 +0000 (09:33 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 14 Nov 2011 08:33:02 +0000 (09:33 +0100)
PVE/API2/OpenVZ.pm
www/manager/openvz/Options.js

index 03240bb5eb736881997c7f46b4073dad9cd92f05..cce2a618cd0090115c962e415a115776e0692e0a 100644 (file)
@@ -609,6 +609,15 @@ __PACKAGE__->register_method({
            $conf->{ostemplate} = $veconf->{ostemplate}->{value};
        }
 
+       my $stcfg = cfs_read_file("storage.cfg");
+
+       if ($veconf->{ve_private} && $veconf->{ve_private}->{value}) {
+           my $path = $veconf->{ve_private}->{value};
+           my ($vtype, $volid) = PVE::Storage::path_to_volume_id($stcfg, $path);
+           my ($sid, $volname) = PVE::Storage::parse_volume_id($volid, 1) if $volid;
+           $conf->{storage} = $sid || $path;
+       }
+
        my $properties = PVE::OpenVZ::json_config_properties();
 
        foreach my $k (keys %$properties) {
index fe2f6fed78fd7f427d4b14a3c0e966297ba4c9de..9cd3431037e53e1c19450447daa063703166f5e8 100644 (file)
@@ -38,6 +38,10 @@ Ext.define('PVE.openvz.Options', {
                header: 'Template',
                defaultValue: 'no set'
            },
+           storage: {
+               header: 'Storage',
+               defaultValue: 'no set'
+           },
            cpuunits: {
                header: 'CPU units',
                defaultValue: '1000',