Index: trunk/extensions/DataCenter/Views/Plans/Rack.php |
— | — | @@ -203,18 +203,41 @@ |
204 | 204 | $racks = array( |
205 | 205 | 'local' => DataCenterDB::getAssets( |
206 | 206 | 'rack', |
207 | | - DataCenterDB::buildCondition( |
208 | | - 'asset', 'rack', 'location', $space->get( 'location' ) |
| 207 | + array_merge_recursive( |
| 208 | + DataCenterDB::buildCondition( |
| 209 | + 'asset', |
| 210 | + 'rack', |
| 211 | + 'location', |
| 212 | + $space->get( 'location' ) |
| 213 | + ), |
| 214 | + DataCenterDB::buildJoin( |
| 215 | + 'facility', 'location', 'id', |
| 216 | + 'asset', 'rack', 'location', |
| 217 | + array( |
| 218 | + 'name' => 'location_name', |
| 219 | + 'region' => 'location_region', |
| 220 | + ) |
| 221 | + ) |
209 | 222 | ) |
210 | 223 | ), |
211 | 224 | 'remote' => DataCenterDB::getAssets( |
212 | 225 | 'rack', |
213 | | - DataCenterDB::buildCondition( |
214 | | - 'asset', |
215 | | - 'rack', |
216 | | - 'location', |
217 | | - $space->get( 'location' ), |
218 | | - '!=' |
| 226 | + array_merge_recursive( |
| 227 | + DataCenterDB::buildCondition( |
| 228 | + 'asset', |
| 229 | + 'rack', |
| 230 | + 'location', |
| 231 | + $space->get( 'location' ), |
| 232 | + '!=' |
| 233 | + ), |
| 234 | + DataCenterDB::buildJoin( |
| 235 | + 'facility', 'location', 'id', |
| 236 | + 'asset', 'rack', 'location', |
| 237 | + array( |
| 238 | + 'name' => 'location_name', |
| 239 | + 'region' => 'location_region', |
| 240 | + ) |
| 241 | + ) |
219 | 242 | ) |
220 | 243 | ) |
221 | 244 | ); |
— | — | @@ -242,7 +265,13 @@ |
243 | 266 | 'manufacturer', |
244 | 267 | 'model' => array( 'field' => 'name' ), |
245 | 268 | 'serial', |
246 | | - 'asset' |
| 269 | + 'asset', |
| 270 | + 'location' => array( |
| 271 | + 'fields' => array( |
| 272 | + 'location_name', 'location_region' |
| 273 | + ), |
| 274 | + 'glue' => ' / ', |
| 275 | + ), |
247 | 276 | ), |
248 | 277 | 'link' => array( |
249 | 278 | 'page' => 'plans', |
Index: trunk/extensions/DataCenter/Views/Plans/Object.php |
— | — | @@ -165,6 +165,14 @@ |
166 | 166 | 'model', 'object', 'id', |
167 | 167 | 'asset', 'object', 'model', |
168 | 168 | array( 'name', 'manufacturer' ) |
| 169 | + ), |
| 170 | + DataCenterDB::buildJoin( |
| 171 | + 'facility', 'location', 'id', |
| 172 | + 'asset', 'object', 'location', |
| 173 | + array( |
| 174 | + 'name' => 'location_name', |
| 175 | + 'region' => 'location_region', |
| 176 | + ) |
169 | 177 | ) |
170 | 178 | ) |
171 | 179 | ), |
— | — | @@ -183,6 +191,14 @@ |
184 | 192 | 'model', 'object', 'id', |
185 | 193 | 'asset', 'object', 'model', |
186 | 194 | array( 'name', 'manufacturer' ) |
| 195 | + ), |
| 196 | + DataCenterDB::buildJoin( |
| 197 | + 'facility', 'location', 'id', |
| 198 | + 'asset', 'object', 'location', |
| 199 | + array( |
| 200 | + 'name' => 'location_name', |
| 201 | + 'region' => 'location_region', |
| 202 | + ) |
187 | 203 | ) |
188 | 204 | ) |
189 | 205 | ), |
— | — | @@ -206,7 +222,13 @@ |
207 | 223 | 'manufacturer', |
208 | 224 | 'model' => array( 'field' => 'name' ), |
209 | 225 | 'serial', |
210 | | - 'asset' |
| 226 | + 'asset', |
| 227 | + 'location' => array( |
| 228 | + 'fields' => array( |
| 229 | + 'location_name', 'location_region' |
| 230 | + ), |
| 231 | + 'glue' => ' / ', |
| 232 | + ), |
211 | 233 | ), |
212 | 234 | 'link' => array( |
213 | 235 | 'page' => 'plans', |