summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 02f89a4)
raw | patch | inline | side by side (parent: 02f89a4)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 20 Apr 2011 09:06:42 +0000 (09:06 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 20 Apr 2011 09:06:42 +0000 (09:06 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20752 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc | patch | blob | history | |
gosa-plugins/goto-ng/admin/newConfigManagement/goto/Config/root.tpl | patch | blob | history |
diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc
index 530e9a2c3861493f48c68cbb97ecf1d0386ce874..910cc8a1eef72a036997a9a3386ec3ba5538d7f6 100644 (file)
$items['Distribution']['name'] = 'Distribution';
$items['Distribution']['description'] = _('Distribution');
$items['Distribution']['options']['name'] = $dOpt1;
- $items['Distribution']['options']['mirror'] = $dOpt3;
+ $items['Distribution']['options']['origin'] = $dOpt3;
$items['Distribution']['options']['installation_type'] = $dOpt2;
$items['Distribution']['options']['installation_method'] = $dOpt4;
return(FALSE);
}else{
foreach($res as $dist){
- $this->dataModel->addItem('Distribution','/root', $dist['name'], $dist);
+
+ // Simple strings
+ $values = array();
+ foreach(array('origin','installation_method', 'installation_method','debian_security',
+ 'debian_volatile', 'name', 'mirror_sources', 'managed', 'path') as $attr){
+ $values[$attr] = $dist[$attr];
+ }
+
+ // Boxed strings
+ foreach(array('type') as $attr){
+ $values[$attr] = $dist[$attr]['name'];
+ }
+
+ // Arrays
+ foreach(array('releases', 'architectures', 'components', 'sections') as $attr){
+ $values[$attr] = array();
+ if(is_array($dist[$attr])){
+ foreach($dist[$attr] as $aEntry){
+ $values[$attr][] = $aEntry['name'];
+ }
+ }
+ }
+
+ $this->dataModel->addItem('Distribution','/root', $dist['name'], $values);
if(isset($dist['releases'])){
$name = $values['name'];
$itype = $values['installation_type'];
$imethod = $values['installation_method'];
- $mirror = $values['mirror'];
+ $origin = $values['origin'];
// Initiate the rpc request.
$rpc = $this->config->getRpcHandle();
- $res = $rpc->createDistribution($name, $itype, array('mirror'=>$mirror, 'install_method' => $imethod));
+ $res = $rpc->createDistribution($name, $itype, array('mirror'=>$origin, 'install_method' => $imethod));
if(!$rpc->success()){
msg_dialog::display(_("Error"), sprintf(_("Failed to save distributions: %s"), $rpc->get_error()),ERROR_DIALOG);
return(NULL);
diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/goto/Config/root.tpl b/gosa-plugins/goto-ng/admin/newConfigManagement/goto/Config/root.tpl
index de539865be6876ab21b7d2522e3d9aada31ef6e6..399e8095b28b295e589786b5e407580fdc12ce56 100644 (file)
<td>{$installation_method}</td>
</tr>
<tr>
- <td>{$mirrorName}</td>
- <td>{$mirror}</td>
+ <td>{$originName}</td>
+ <td>{$origin}</td>
</tr>
</table>
{else if $type == 'Release'}