echo "<tr>\n\t\t\t\t\t\t<td>{$spaces}{$tmp_keys[$ii]}{$spaces}</td>\n\t\t\t\t\t\t<td>{$spaces}{$lv->translate_volume_type($tmp[$tmp_keys[$ii]]['type'])}{$spaces}</td>\n\t\t\t\t\t\t<td>{$spaces}{$lv->format_size($tmp[$tmp_keys[$ii]]['capacity'], 2)}{$spaces}</td>\n\t\t\t\t\t\t<td>{$spaces}{$lv->format_size($tmp[$tmp_keys[$ii]]['allocation'], 2)}{$spaces}</td>\n\t\t\t\t\t\t<td>{$spaces}{$tmp[$tmp_keys[$ii]]['path']}{$spaces}</td>\n\t\t\t\t\t\t<td>{$spaces}<a href=\"?action=storage-pools&amp;path={$path}&amp;subaction=volume-delete\">Delete volume</a>{$spaces}</td>\n\t\t\t\t\t      </tr>";
            }
            echo "</table></td>\n\t\t\t\t\t</tr>";
        }
    }
    echo "</table>";
    echo strpos($msg, '<form') ? $msg : '<pre>' . $msg . '</pre>';
} else {
    if ($action == 'node-devices') {
        echo "<h2>Node devices</h2>";
        echo "Here's the list of node devices available on the host machine. You can dump the information about the node devices there so you have simple way " . "to check presence of the devices using this page.<br /><br />";
        $ret = false;
        if (array_key_exists('subaction', $_GET)) {
            $name = $_GET['name'];
            if ($_GET['subaction'] == 'dumpxml') {
                $ret = 'XML dump of node device <i>' . $name . '</i>:<br /><br />' . htmlentities($lv->get_node_device_xml($name, false));
            }
        }
        echo "Host node devices capability list: ";
        $tmp = $lv->get_node_device_cap_options();
        for ($i = 0; $i < sizeof($tmp); $i++) {
            echo "<a href=\"?action={$_GET['action']}&amp;cap={$tmp[$i]}\">{$tmp[$i]}</a>";
            if ($i < sizeof($tmp) - 1) {
                echo ', ';
            }
        }
        echo "<br /><br />";
        $tmp = $lv->get_node_devices(array_key_exists('cap', $_GET) ? $_GET['cap'] : false);
        echo "<table>\n\t\t\t<tr>\n\t\t\t <th>Device name {$spaces}</th>\n\t\t\t <th>{$spaces} Identification {$spaces}</th>\n\t\t\t <th>{$spaces} Driver name {$spaces}</th>\n\t\t\t <th>{$spaces} Vendor {$spaces}</th>\n\t\t\t <th>{$spaces} Product {$spaces}</th>\n\t\t\t <th>{$spaces} Action {$spaces}</th>\n\t\t\t</tr>";
        for ($i = 0; $i < sizeof($tmp); $i++) {
            $tmp2 = $lv->get_node_device_information($tmp[$i]);