View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 925 | RackTables | default | public | 2013-07-09 12:03 | 2013-07-20 20:13 |
| Reporter | blaza-pl | Assigned To | adoom42 | ||
| Priority | low | Severity | tweak | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 0.20.5 | ||||
| Target Version | 0.20.6 | Fixed in Version | 0.20.6 | ||
| Summary | 925: On Rackspace page for Object show location parents | ||||
| Description | Currently on Objects -> Rackspace tab only the first parent Location for Row is shown. Having in mind that Locations can build a tree this patch changes the display to show Location parents and their parents up to the top level. | ||||
| Tags | No tags attached. | ||||
| Attached Files | object_rackspace_parent-interface.php.patch (1,090 bytes)
--- inc/interface.php 2013-07-03 10:31:43.000000000 +0200
+++ inc/interface.php 2013-07-09 11:51:07.597131147 +0200
@@ -1567,11 +1567,31 @@
function renderRackMultiSelect ($sname, $racks, $selected)
{
+
+ $loc_tree = listCells('location');
+ $loc_name_tbl = array();
+ $loc_parents = array();
+ foreach($loc_tree as $loc)
+ {
+ $loc_parents[$loc['id']] = $loc['parent_id'];
+ $loc_name_tbl[$loc['id']] = $loc['name'];
+ }
+
+
+
// Transform the given flat list into a list of groups, each representing a rack row.
$rdata = array();
foreach ($racks as $rack)
{
- $row_name = ($rack['location_id']) ? $rack['location_name'] . '/' . $rack['row_name'] : $rack['row_name'];
+ $name = "";
+ $id=$rack['location_id'];
+ while(isset($id))
+ {
+ $name = $loc_name_tbl[$id] . " / " . $name;
+ $id = $loc_parents[$id];
+ }
+
+ $row_name = $name . $rack['row_name'];
$rdata[$row_name][$rack['id']] = $rack['name'];
}
echo "<select name=${sname} multiple size=" . getConfigVar ('MAXSELSIZE') . " onchange='getElementsByName(\"updateObjectAllocation\")[0].submit()'>\n";
| ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2013-07-09 12:03 | blaza-pl | New Issue | |
| 2013-07-09 12:03 | blaza-pl | File Added: object_rackspace_parent-interface.php.patch | |
| 2013-07-20 20:13 | adoom42 | Assigned To | => adoom42 |
| 2013-07-20 20:13 | adoom42 | Status | new => closed |
| 2013-07-20 20:13 | adoom42 | Resolution | open => fixed |
| 2013-07-20 20:13 | adoom42 | Fixed in Version | => 0.20.6 |
| 2013-07-20 20:13 | adoom42 | Target Version | => 0.20.6 |