r46728 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46727‎ | r46728 | r46729 >
Date:19:56, 2 February 2009
Author:tparscal
Status:deferred
Tags:
Comment:
Added positional information to rack and object lists in plans.
Modified paths:
  • /trunk/extensions/DataCenter/DataCenter.ui.php (modified) (history)
  • /trunk/extensions/DataCenter/Views/Plans/Plan.php (modified) (history)
  • /trunk/extensions/DataCenter/Views/Plans/Rack.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DataCenter/DataCenter.ui.php
@@ -976,7 +976,7 @@
977977 return self::message( 'category', $value );
978978 break;
979979 case 'side':
980 - return self::message( 'option', $value ? 'front' : 'back' );
 980+ return self::message( 'option', $value ? 'back' : 'front' );
981981 break;
982982 case 'angle':
983983 return self::message( 'label', 'degrees-value', $value * 90 );
Index: trunk/extensions/DataCenter/Views/Plans/Plan.php
@@ -44,8 +44,10 @@
4545 $model = $asset->getModel();
4646 $tables['rack'][$key]->set(
4747 array(
48 - 'model' => $model->get( 'name' ),
49 - 'manufacturer' => $model->get( 'manufacturer' )
 48+ 'model' => implode(
 49+ ' / ',
 50+ $model->get( array( 'manufacturer', 'name' ) )
 51+ ),
5052 )
5153 );
5254 }
@@ -81,8 +83,11 @@
8284 'rows' => $tables['rack'],
8385 'fields' => array(
8486 'name',
85 - 'manufacturer',
8687 'model',
 88+ 'position' => array(
 89+ 'fields' => array( 'x', 'y' ),
 90+ 'glue' => ' x ',
 91+ ),
8792 ),
8893 'link' => array(
8994 'page' => 'plans',
Index: trunk/extensions/DataCenter/Views/Plans/Rack.php
@@ -45,9 +45,19 @@
4646 $objectLinks[$key]->set(
4747 array(
4848 'rack' => $object->getId(),
49 - 'model' => $objectModel->get( 'name' ),
50 - 'manufacturer' => $objectModel->get( 'manufacturer' ),
51 - 'position' => $objectLink->get( 'z' ),
 49+ 'model' => implode(
 50+ ' / ',
 51+ $objectModel->get( array( 'manufacturer', 'name' ) )
 52+ ),
 53+ 'position' => implode(
 54+ ': ',
 55+ array(
 56+ DataCenterUI::format(
 57+ $objectLink->get( 'orientation' ), 'side'
 58+ ),
 59+ $objectLink->get( 'z' ),
 60+ )
 61+ ),
5262 )
5363 );
5464 }
@@ -87,7 +97,7 @@
8898 array(
8999 'rows' => $objectLinks,
90100 'fields' => array(
91 - 'name', 'manufacturer', 'model',
 101+ 'name', 'model', 'position',
92102 ),
93103 'link' => array(
94104 'page' => 'plans',

Status & tagging log