[Engine-devel] Frontend questions.
Vojtech Szocs
vszocs at redhat.com
Tue Oct 2 16:01:04 UTC 2012
Hi guys,
> this should be easy enough to launch another window with the requested url.
Indeed, but you might also want to override UI logic for handling "open console" functionality for VNC protocol in WebAdmin:
[in MainTabVirtualMachineView, around line 223 that adds ConsoleModel-bound action button]
getTable().addActionButton(... {
@Override
protected UICommand resolveCommand() {
ConsoleModel defaultConsoleModel = getMainModel().getDefaultConsoleModel();
final UICommand defaultConnectCommand = defaultConsoleModel != null ? defaultConsoleModel.getConnectCommand() : null;
if (defaultConnectCommand != null && defaultConsoleModel instanceof VncConsoleModel) {
// Replace default VncConsoleModel's Connect command with custom functionality
return new UICommand("Connect", null) {
@Override
public boolean getIsAvailable() {
return defaultConnectCommand.getIsAvailable();
}
@Override
public boolean getIsExecutionAllowed() {
return defaultConnectCommand.getIsExecutionAllowed();
}
@Override
public void Execute(Object... parameters) {
if (!getIsAvailable() || !getIsExecutionAllowed()) {
return;
}
WebUtils.openUrlInNewWindow("Custom popup window title", "url from novnc-server");
}
};
} else {
return defaultConnectCommand;
}
});
Regards,
Vojtech
----- Original Message -----
From: "Itamar Heim" <iheim at redhat.com>
To: snmishra at linux.vnet.ibm.com
Cc: "Ohad Levy" <ohadlevy at redhat.com>, "Vojtech Szocs" <vszocs at redhat.com>, engine-devel at ovirt.org, "Adam Young" <ayoung at redhat.com>
Sent: Thursday, September 20, 2012 8:44:05 PM
Subject: Re: [Engine-devel] Frontend questions.
On 09/19/2012 06:51 PM, snmishra at linux.vnet.ibm.com wrote:
>
> Hi,
>
>
> I am looking at adding support for novnc in ovirt. I have not
> worked on the frontend and thought of asking some questions to the list
> to save time.
>
> Currently, when a user selects to open console on a VM with VNC.
> They get a popup window with IP, port and password for VNC session. I
> plan to take this info to host and run the command -
>
> novnc_server --vnc IP:(port-5900)
>
> This command returns a URL, use this url to open a new browser window
> which will be a vnc session to the VM.
>
> My questions are -
>
> 1. How to run the novnc-server command on the host?
i can't say i like the idea of launching these on the engine, but we can
start with making this work first with these limitations. hopefully
these aren't too resource intensive.
ohad - how do you deal with this in foreman?
adam - i saw you pushed these rpms to fedora - can you share how this is
launched in openstack?
on the technical side, you can launch an external process with the
relevant parameters.
though we probably need to consider how we could do this not via shell
locally, rather via a remote call to allow setting this up on another
server than the engine.
>
> 2. How to open a new URL for VNC session?
this should be easy enough to launch another window with the requested url.
vojtech?
>
> Thanks
> Sharad Mishra
>
> _______________________________________________
> Engine-devel mailing list
> Engine-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/engine-devel
More information about the Engine-devel
mailing list