Commit aac3fc1d authored by Matt Strum's avatar Matt Strum Committed by Gary Wong

Fixed cloning nodes with services and making apply button available when changing services

parent 35b395d1
......@@ -497,25 +497,31 @@ IN THE WORK.
private function addInstallService(installService:InstallService = null):void
{
var newInstallComponent:InstallServiceComponent = new InstallServiceComponent();
newInstallComponent.onChange = onChange;
if(installService != null)
{
newInstallComponent.url = installService.url;
newInstallComponent.path = installService.installPath;
}
installVgroup.addElement(newInstallComponent);
if(!okButton.enabled)
okButton.enabled = true;
onChange();
}
private function addExecuteService(executeService:ExecuteService = null):void
{
var newExecuteComponent:ExecuteServiceComponent = new ExecuteServiceComponent();
newExecuteComponent.onChange = onChange;
if(executeService != null)
{
newExecuteComponent.cmd = executeService.command;
newExecuteComponent.shell = executeService.shell;
}
executeVgroup.addElement(newExecuteComponent);
onChange();
}
private function onChange():void
{
if(!okButton.enabled)
okButton.enabled = true;
}
......
......@@ -45,6 +45,8 @@ IN THE WORK.
import spark.components.Group;
public var onChange:Function;
[Bindable]
public var cmd:String = "";
[Bindable]
......@@ -64,12 +66,14 @@ IN THE WORK.
<s:TextInput id="executeCommandText"
width="90%"
text="@{cmd}"
prompt="Command" />
prompt="Command"
change="if(onChange != null) onChange();" />
<s:Label text="using" />
<s:TextInput id="executeShellText"
width="10%"
text="@{shell}"
prompt="Shell? (sh, bash, etc.)" />
prompt="Shell? (sh, bash, etc.)"
change="if(onChange != null) onChange();" />
<components:ImageButton icon="{ImageUtil.deleteIcon}"
click="(parent as Group).removeElement(this)" />
click="if(onChange != null) onChange(); (parent as Group).removeElement(this)" />
</s:HGroup>
......@@ -45,6 +45,8 @@ IN THE WORK.
import spark.components.Group;
public var onChange:Function;
[Bindable]
public var url:String = "";
[Bindable]
......@@ -64,12 +66,14 @@ IN THE WORK.
<s:TextInput id="installUrlText"
width="50%"
text="@{url}"
prompt="Archive URL" />
prompt="Archive URL"
change="if(onChange != null) onChange();" />
<s:Label text="in" />
<s:TextInput id="installPathText"
width="50%"
text="@{path}"
prompt="Install path" />
prompt="Install path"
change="if(onChange != null) onChange();" />
<components:ImageButton icon="{ImageUtil.deleteIcon}"
click="(parent as Group).removeElement(this)" />
click="if(onChange != null) onChange(); (parent as Group).removeElement(this)" />
</s:HGroup>
......@@ -317,18 +317,27 @@ package com.flack.geni.resources.virtual
newClone.hardwareType.name = hardwareType.name;
newClone.hardwareType.slots = hardwareType.slots;
}
for each(var executeService:ExecuteService in services.executeServices)
if(services.executeServices != null)
{
var newExecute:ExecuteService = new ExecuteService(executeService.command, executeService.shell);
newExecute.extensions = executeService.extensions.Clone;
newClone.services.executeServices.push(newExecute);
newClone.services.executeServices = new Vector.<ExecuteService>();
for each(var executeService:ExecuteService in services.executeServices)
{
var newExecute:ExecuteService = new ExecuteService(executeService.command, executeService.shell);
newExecute.extensions = executeService.extensions.Clone;
newClone.services.executeServices.push(newExecute);
}
}
for each(var installService:InstallService in services.installServices)
if(services.installServices != null)
{
var newInstall:InstallService = new InstallService(installService.url, installService.installPath, installService.fileType);
newInstall.extensions = installService.extensions.Clone;
newClone.services.installServices.push(newInstall);
newClone.services.installServices = new Vector.<InstallService>();
for each(var installService:InstallService in services.installServices)
{
var newInstall:InstallService = new InstallService(installService.url, installService.installPath, installService.fileType);
newInstall.extensions = installService.extensions.Clone;
newClone.services.installServices.push(newInstall);
}
}
newClone.extensions = extensions.Clone;
// Remove the emulab extensions, it's just manifest stuff
if(newClone.extensions.spaces != null)
......
......@@ -51,7 +51,7 @@ package com.flack.shared
/**
* Flack version
*/
public static const version:String = "v14.40";
public static const version:String = "v14.41";
public static const MODE_GENI:int = 0;
public static const MODE_EMULAB:int = 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment