summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1013d99)
raw | patch | inline | side by side (parent: 1013d99)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 20 Apr 2011 14:15:40 +0000 (14:15 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 20 Apr 2011 14:15:40 +0000 (14:15 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20759 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 b16916f93d1532208a1af70851c343b5c50609bc..7c38705c922227f6268a0b9d3bcc4eafe59d1f0d 100644 (file)
// Load distributions
$rpc = $this->config->getRpcHandle();
$res = $rpc->getDistributions();
+ print_a($res);
if(!$rpc->success()){
$this->errorMessage = sprintf(_("Failed to load distributions: %s"), $rpc->get_error());
return(FALSE);
// We've to create a new distribution
if($type == 'Distribution'){
+
+ // Distributions cannot be renamed!
+ if(isset($item['name']) && $item['name'] != $values['name']){
+ msg_dialog::displayChecks(array("Distributions cannot be renamed!"));
+ return;
+ }
$name = $values['name'];
$itype = $values['installation_type'];
$imethod = $values['installation_method'];
// Initiate the rpc request.
$rpc = $this->config->getRpcHandle();
$res = $rpc->createDistribution($name, $itype, array('mirror'=>$origin, 'install_method' => $imethod));
+ print_a(array($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);
}else{
+ // Set mirror properties
+ $data = array();
+ $data['distribution'] = $name;
+ $data['arch'] = $values['architectures'];
+ $data['component'] = $values['components'];
+ $data['mirror_sources'] = $values['mirror_sources'];
+ $rpc->addMirrorProperty($data);
+ if(!$rpc->success()){
+ msg_dialog::display(_("Error"), sprintf(_("Failed to save distributions: %s"),
+ $rpc->get_error()),ERROR_DIALOG);
+ return(NULL);
+ }
+
// We've successfully added the item, now add it to the tree.
- $this->dataModel->addItem($type, $this->selectedContainer, $values['name'],array(), '-' );
+ $this->dataModel->addItem($type, $this->selectedContainer, $values['name'],$values, '-' );
// Finally - close the dialog.
$this->listing->clearDialogObject();
$dist = $this->getDistributionPath($this->selectedContainer);
$dist = preg_replace("#^/root/#", "", $dist);
+ if(isset($item['name']) && $item['name'] != $values['name']){
+ echo "Implement rename for releases";
+ return;
+ }
+
// Initiate the rpc request.
$rpc = $this->config->getRpcHandle();
$res = $rpc->createRelease($dist, $newPath);
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 0e0db6f4bd9c2ce6be93d25353f9df50e4c9251f..839a4c69b22e4bc489c222e023519db6e6ab522a 100644 (file)
{if $type == 'Distribution'}
-<table>
+<table width="100%">
<tr>
<td style='width: 50%'>
<table>
<td>{$nameName}</td>
<td>{$name}</td>
</tr>
+ <tr>
+ <td>{$originName}</td>
+ <td>{$origin}</td>
+ </tr>
<tr>
<td>{$installation_typeName}</td>
<td>{$installation_type}</td>
<td>{$installation_method}</td>
</tr>
<tr>
- <td>{$originName}</td>
- <td>{$origin}</td>
+ <td>{$mirror_sourcesName}</td>
+ <td>{$mirror_sources}</td>
</tr>
</table>
</td>
- <td>
+ <td class="left-border">
+ </td><td>
<table>
<tr>
<td>{$architecturesName}</td>
<td>{$componentsName}</td>
<td>{$components}</td>
</tr>
- <tr>
- <td>{$mirror_sourcesName}</td>
- <td>{$mirror_sources}</td>
- </tr>
</table>
</td>
</tr>