Vojtech Szocs has posted comments on this change. Change subject: Introducing ShellBox UI plugin ......................................................................
Patch Set 1: Looks good to me, approved (2 inline comments) Great plugin, nice and simple. Thanks for contributing this UI plugin! .................................................... File shellbox-plugin/shellbox-files/start.html Line 11: Line 12: // Add 'Shell Box' button (+ context menu) to 'Hosts' main-tab Line 13: api.addMainTabActionButton('Host', 'Shell Box', { Line 14: onClick : function() { Line 15: window.open(getShellBoxUrl(arguments), '_blank'); You can also use showDialog API, which currently uses window.open, but will eventually get improved to integrate with WebAdmin dialog UI: api.showDialog( 'Shell Box' /*title*/, getShellBoxUrl(arguments) /*contentUrl*/, 640 /*width*/, 480 /*height*/); Note: title (first argument) is currently not used with window.open implementation, but will eventually be used in new WebAdmin dialog UI implementation. Line 16: }, Line 17: isEnabled : function() { Line 18: // The button is enabled only when a single host is selected Line 19: return arguments.length == 1; Line 19: return arguments.length == 1; Line 20: }, Line 21: isAccessible : function() { Line 22: // The button is always visible Line 23: return true; You can also remove isAccessible function entirely, since "true" is the default value when not specified. Note: from API perspective, all functions (onClick, isEnabled, isAccessible) are optional and have reasonable defaults when not specified. Line 24: } Line 25: }); Line 26: }, Line 27: HostSelectionChange : function() { -- To view, visit http://gerrit.ovirt.org/11166 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I96c234e095e12b276ea6811274e17751de1f0b88 Gerrit-PatchSet: 1 Gerrit-Project: samples-uiplugins Gerrit-Branch: master Gerrit-Owner: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Ayal Baron <aba...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Einav Cohen <eco...@redhat.com> Gerrit-Reviewer: Itamar Heim <ih...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches