modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/agent/install/RemoteAgentInstallView.java | 115 ++++------ modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties | 2 modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties | 2 modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties | 2 modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties | 1 modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties | 2 modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties | 2 7 files changed, 63 insertions(+), 63 deletions(-)
New commits: commit 56b6e3c7eafd82d0f25625ae00c85aa4e38ee8ab Author: Jirka Kremser jkremser@redhat.com Date: Thu Mar 28 14:25:23 2013 +0100
[BZ 876132] - Remote agent install form requires the ins. path to be non-empty, but the tooltip says it can be empty - Tooltip has been changed. Also the whole view for this use case was improved.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/agent/install/RemoteAgentInstallView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/agent/install/RemoteAgentInstallView.java index b48ff7d..c92114f 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/agent/install/RemoteAgentInstallView.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/agent/install/RemoteAgentInstallView.java @@ -27,19 +27,21 @@ import java.util.ArrayList; import com.google.gwt.user.client.rpc.AsyncCallback; import com.smartgwt.client.types.ExpansionMode; import com.smartgwt.client.widgets.Canvas; +import com.smartgwt.client.widgets.HTMLFlow; +import com.smartgwt.client.widgets.events.ClickEvent; +import com.smartgwt.client.widgets.events.ClickHandler; import com.smartgwt.client.widgets.form.DynamicForm; import com.smartgwt.client.widgets.form.fields.ButtonItem; import com.smartgwt.client.widgets.form.fields.CanvasItem; import com.smartgwt.client.widgets.form.fields.HeaderItem; import com.smartgwt.client.widgets.form.fields.PasswordItem; -import com.smartgwt.client.widgets.form.fields.SpacerItem; import com.smartgwt.client.widgets.form.fields.StaticTextItem; import com.smartgwt.client.widgets.form.fields.TextItem; -import com.smartgwt.client.widgets.form.fields.events.ClickEvent; -import com.smartgwt.client.widgets.form.fields.events.ClickHandler; import com.smartgwt.client.widgets.grid.ListGrid; import com.smartgwt.client.widgets.grid.ListGridField; import com.smartgwt.client.widgets.grid.ListGridRecord; +import com.smartgwt.client.widgets.layout.HLayout; +import com.smartgwt.client.widgets.layout.Layout; import com.smartgwt.client.widgets.layout.VLayout;
import org.rhq.core.domain.install.remote.AgentInstallInfo; @@ -52,8 +54,9 @@ import org.rhq.enterprise.gui.coregui.client.components.view.ViewName; import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup; import org.rhq.enterprise.gui.coregui.client.gwt.RemoteInstallGWTServiceAsync; import org.rhq.enterprise.gui.coregui.client.util.MeasurementConverterClient; -import org.rhq.enterprise.gui.coregui.client.util.message.Message; +import org.rhq.enterprise.gui.coregui.client.util.enhanced.EnhancedIButton; import org.rhq.enterprise.gui.coregui.client.util.enhanced.EnhancedVLayout; +import org.rhq.enterprise.gui.coregui.client.util.message.Message;
/** * @author Greg Hinkle @@ -65,10 +68,10 @@ public class RemoteAgentInstallView extends EnhancedVLayout { private RemoteInstallGWTServiceAsync remoteInstallService = GWTServiceLookup.getRemoteInstallService(600000);
private DynamicForm connectionForm; - private DynamicForm buttonsForm; - private ButtonItem installButton; - private ButtonItem startButton; - private ButtonItem stopButton; + private Layout buttonsForm; + private EnhancedIButton installButton; + private EnhancedIButton startButton; + private EnhancedIButton stopButton; private VLayout agentInfoLayout;
public RemoteAgentInstallView() { @@ -81,60 +84,65 @@ public class RemoteAgentInstallView extends EnhancedVLayout { @Override protected void onInit() { super.onInit(); - - addMember(getConnectionForm()); - addMember(getButtons()); + Layout layout = new VLayout(); + layout.setPadding(10); + HTMLFlow header = new HTMLFlow(MSG.view_remoteAgentInstall_connInfo()); + header.setStyleName("headerItem"); + header.setExtraSpace(5); + layout.addMember(header); + layout.addMember(getConnectionForm()); + header = new HTMLFlow(MSG.common_title_operations()); + header.setStyleName("headerItem"); + header.setExtraSpace(5); + layout.addMember(header); + layout.addMember(getButtons());
agentInfoLayout = new VLayout(); agentInfoLayout.setWidth100(); agentInfoLayout.setHeight100(); agentInfoLayout.setMembersMargin(1); - addMember(agentInfoLayout); + layout.addMember(agentInfoLayout); + addMember(layout);
}
private DynamicForm getConnectionForm() { connectionForm = new DynamicForm(); - connectionForm.setWidth100(); - connectionForm.setNumCols(3); + connectionForm.setNumCols(4); connectionForm.setWrapItemTitles(false); - connectionForm.setColWidths("25%", "50%", "25%"); - connectionForm.setMargin(10); - - HeaderItem connectionHeader = new HeaderItem(); - connectionHeader.setDefaultValue(MSG.view_remoteAgentInstall_connInfo()); + connectionForm.setColWidths("130", "250", "110");
TextItem host = new TextItem("host", MSG.common_title_host()); host.setRequired(true); - host.setWidth("100%"); + host.setWidth("240"); host.setPrompt(MSG.view_remoteAgentInstall_promptHost()); host.setHoverWidth(300); - host.setColSpan(2); + host.setEndRow(true);
TextItem port = new TextItem("port", MSG.common_title_port()); port.setRequired(false); - port.setWidth("90"); + port.setWidth("240"); port.setPrompt(MSG.view_remoteAgentInstall_promptPort()); port.setHoverWidth(300); - port.setColSpan(1); + port.setEndRow(true);
TextItem username = new TextItem("username", MSG.common_title_user()); username.setRequired(true); - username.setWidth("100%"); + username.setWidth("240"); username.setPrompt(MSG.view_remoteAgentInstall_promptUser()); username.setHoverWidth(300); - username.setColSpan(2); + username.setEndRow(true);
PasswordItem password = new PasswordItem("password", MSG.common_title_password()); password.setRequired(false); - password.setWidth("100%"); + password.setWidth("240"); password.setPrompt(MSG.view_remoteAgentInstall_promptPassword()); password.setHoverWidth(300); - password.setColSpan(2); + password.setEndRow(true);
TextItem agentInstallPath = new TextItem("agentInstallPath", MSG.view_remoteAgentInstall_installPath()); agentInstallPath.setRequired(true); - agentInstallPath.setWidth("100%"); + agentInstallPath.setWidth("240"); agentInstallPath.setPrompt(MSG.view_remoteAgentInstall_promptInstallPath()); agentInstallPath.setHoverWidth(300); agentInstallPath.setStartRow(true); @@ -144,8 +152,11 @@ public class RemoteAgentInstallView extends EnhancedVLayout { MSG.view_remoteAgentInstall_buttonFindAgent()); findAgentInstallPathButton.setStartRow(false); findAgentInstallPathButton.setEndRow(true); - findAgentInstallPathButton.addClickHandler(new ClickHandler() { - public void onClick(ClickEvent clickEvent) { + if (findAgentInstallPathButton.getTitle().length() < 15) { //i18n may prolong the title + findAgentInstallPathButton.setWidth(100); + } + findAgentInstallPathButton.addClickHandler(new com.smartgwt.client.widgets.form.fields.events.ClickHandler() { + public void onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent clickEvent) { if (connectionForm.validate()) { findAgentInstallPath(); } @@ -156,45 +167,35 @@ public class RemoteAgentInstallView extends EnhancedVLayout { agentStatus.setDefaultValue(MSG.view_remoteAgentInstall_agentStatusDefault()); agentStatus.setRedrawOnChange(true); agentStatus.setRedrawOnChange(true); - agentStatus.setWidth("100%"); agentStatus.setStartRow(true); agentStatus.setEndRow(false);
ButtonItem statusCheckButton = new ButtonItem("updateStatus", MSG.view_remoteAgentInstall_updateStatus()); statusCheckButton.setStartRow(false); statusCheckButton.setEndRow(true); - statusCheckButton.addClickHandler(new ClickHandler() { - public void onClick(ClickEvent clickEvent) { + if (findAgentInstallPathButton.getTitle().length() < 15) { //i18n may prolong the title + statusCheckButton.setWidth(100); + } + statusCheckButton.addClickHandler(new com.smartgwt.client.widgets.form.fields.events.ClickHandler() { + public void onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent clickEvent) { if (connectionForm.validate()) { agentStatusCheck(); } } });
- connectionForm.setFields(connectionHeader, host, port, username, password, agentInstallPath, + connectionForm.setFields(host, port, username, password, agentInstallPath, findAgentInstallPathButton, agentStatus, statusCheckButton); + connectionForm.setExtraSpace(15);
return connectionForm; }
- private DynamicForm getButtons() { - buttonsForm = new DynamicForm(); - buttonsForm.setWidth("75%"); - buttonsForm.setNumCols(4); - buttonsForm.setMargin(10); - buttonsForm.setColWidths("10%", "30%", "30%", "30%"); - - HeaderItem buttonsHeader = new HeaderItem(); - buttonsHeader.setDefaultValue(MSG.common_title_operations()); - - SpacerItem spacerItem = new SpacerItem(); - spacerItem.setStartRow(true); - spacerItem.setEndRow(false); + private Layout getButtons() { + buttonsForm = new HLayout();
- installButton = new ButtonItem("install", MSG.view_remoteAgentInstall_installAgent()); - installButton.setStartRow(false); - installButton.setEndRow(false); - installButton.setRedrawOnChange(true); + installButton = new EnhancedIButton(MSG.view_remoteAgentInstall_installAgent()); + installButton.setExtraSpace(10); installButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent clickEvent) { if (connectionForm.validate()) { @@ -203,14 +204,13 @@ public class RemoteAgentInstallView extends EnhancedVLayout { } });
- startButton = new ButtonItem("start", MSG.view_remoteAgentInstall_startAgent()); - startButton.setStartRow(false); - startButton.setEndRow(false); + startButton = new EnhancedIButton(MSG.view_remoteAgentInstall_startAgent()); // startButton.setShowIfCondition(new FormItemIfFunction() { // public boolean execute(FormItem formItem, Object o, DynamicForm dynamicForm) { // return form.getValue("agentStatus") != null && !"Agent Not Installed".equals(form.getValue("agentStatus")); // } // }); + startButton.setExtraSpace(10); startButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent clickEvent) { if (connectionForm.validate()) { @@ -219,9 +219,8 @@ public class RemoteAgentInstallView extends EnhancedVLayout { } });
- stopButton = new ButtonItem("stop", MSG.view_remoteAgentInstall_stopAgent()); - stopButton.setStartRow(false); - stopButton.setEndRow(true); + stopButton = new EnhancedIButton(MSG.view_remoteAgentInstall_stopAgent()); + stopButton.setExtraSpace(10); stopButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent clickEvent) { if (connectionForm.validate()) { @@ -230,7 +229,7 @@ public class RemoteAgentInstallView extends EnhancedVLayout { } });
- buttonsForm.setFields(buttonsHeader, spacerItem, installButton, startButton, stopButton); + buttonsForm.setMembers(installButton, startButton, stopButton); return buttonsForm; }
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties index 0d731ab..66fc511 100644 --- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties +++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties @@ -1865,7 +1865,7 @@ view_remoteAgentInstall_installInfo = Agent Installation Information view_remoteAgentInstall_installPath = Agent Install Path view_remoteAgentInstall_owner = Owner view_remoteAgentInstall_promptHost = The host where the agent is or will be installed -view_remoteAgentInstall_promptInstallPath = Where the agent is or will be installed. If you aren''t sure where an agent is installed, enter a parent directory and click the ''Find Agent'' button to scan that directory and below. If you enter an empty path, common locations are searched on the host for an agent install. +view_remoteAgentInstall_promptInstallPath = Where the agent is or will be installed. If you aren''t sure where an agent is installed, enter a parent directory and click the ''Find Agent'' button to scan that directory and below. You may try to use the Find Agent button to find the existing rhq agent directories. view_remoteAgentInstall_promptPassword = The credentials that are used to authenticate the user on the host via SSH view_remoteAgentInstall_promptPort = The port the SSH server is listening to. If not specified, the default is 22 view_remoteAgentInstall_promptUser = The name of the user whose credentials are passed to the host via SSH diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties index b4ba1e4..6c41b06 100644 --- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties +++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties @@ -1878,7 +1878,7 @@ view_remoteAgentInstall_installInfo = Informace o instalaci agenta view_remoteAgentInstall_installPath = Instalační cesta k agentovi view_remoteAgentInstall_owner = Vlastník view_remoteAgentInstall_promptHost = Hostitel, kde je, nebo kam bude, agent nainstalován -##view_remoteAgentInstall_promptInstallPath = Where the agent is or will be installed. If you aren''t sure where an agent is installed, enter a parent directory and click the ''Find Agent'' button to scan that directory and below. If you enter an empty path, common locations are searched on the host for an agent install. +##view_remoteAgentInstall_promptInstallPath = Where the agent is or will be installed. If you aren''t sure where an agent is installed, enter a parent directory and click the ''Find Agent'' button to scan that directory and below. You may try to use the Find Agent button to find the existing rhq agent directories. view_remoteAgentInstall_promptPassword = Přihlašovací údaje použité pro autentizaci uživatele přes SSH view_remoteAgentInstall_promptPort = Port na němž naslouchá SSH. Pokud není specifikováno použije se 22 view_remoteAgentInstall_promptUser = Jméno uživatele jehož přihlašovací údaje jsou předány hostiteli přes SSH diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties index 016b160..7094d93 100644 --- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties +++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties @@ -1680,7 +1680,7 @@ view_remoteAgentInstall_installInfo = Informationen zur Agent-Installation view_remoteAgentInstall_installPath = Pfad der Agent-Installation view_remoteAgentInstall_owner = Eigentümer ##view_remoteAgentInstall_promptHost = The host where the agent is or will be installed -##view_remoteAgentInstall_promptInstallPath = Where the agent is or will be installed. If you aren''t sure where an agent is installed, enter a parent directory and click the ''Find Agent'' button to scan that directory and below. If you enter an empty path, common locations are searched on the host for an agent install. +##view_remoteAgentInstall_promptInstallPath = Where the agent is or will be installed. If you aren''t sure where an agent is installed, enter a parent directory and click the ''Find Agent'' button to scan that directory and below. You may try to use the Find Agent button to find the existing rhq agent directories. ##view_remoteAgentInstall_promptPassword = The credentials that are used to authenticate the user on the host via SSH ##view_remoteAgentInstall_promptPort = The port the SSH server is listening to. If not specified, the default is 22 ##view_remoteAgentInstall_promptUser = The name of the user whose credentials are passed to the host via SSH diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties index f832c7d..07cebd4 100644 --- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties +++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties @@ -1534,6 +1534,7 @@ view_remoteAgentInstall_installInfo = 에이전트 설치 정보 view_remoteAgentInstall_installPath = 에이전트 설치 경로 view_remoteAgentInstall_owner = 소유자 view_remoteAgentInstall_promptHost = 에이전트가 설치되어 있거나 앞으로 설치되는 호스트 +##view_remoteAgentInstall_promptInstallPath = Where the agent is or will be installed. If you aren''t sure where an agent is installed, enter a parent directory and click the ''Find Agent'' button to scan that directory and below. You may try to use the Find Agent button to find the existing rhq agent directories. view_remoteAgentInstall_promptPassword = SSH를 통해 호스트의 사용자를 인증하는데 사용되는 인증 view_remoteAgentInstall_promptUser = SSH를 통해 호스트로 전달되는 인증을 가진 사용자의 이름 view_remoteAgentInstall_result = 결과 diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties index f354bd8..929f1ef 100644 --- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties +++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties @@ -1816,7 +1816,7 @@ #view_remoteAgentInstall_installPath = Agent Install Path #view_remoteAgentInstall_owner = Owner #view_remoteAgentInstall_promptHost = The host where the agent is or will be installed -#view_remoteAgentInstall_promptInstallPath = Where the agent is or will be installed. If you aren''t sure where an agent is installed, enter a parent directory and click the ''Find Agent'' button to scan that directory and below. If you enter an empty path, common locations are searched on the host for an agent install. +#view_remoteAgentInstall_promptInstallPath = Where the agent is or will be installed. If you aren''t sure where an agent is installed, enter a parent directory and click the ''Find Agent'' button to scan that directory and below. You may try to use the Find Agent button to find the existing rhq agent directories. #view_remoteAgentInstall_promptPassword = The credentials that are used to authenticate the user on the host via SSH #view_remoteAgentInstall_promptPort = The port the SSH server is listening to. If not specified, the default is 22 #view_remoteAgentInstall_promptUser = The name of the user whose credentials are passed to the host via SSH diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties index e19f5f2..e9bd625 100644 --- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties +++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties @@ -1850,7 +1850,7 @@ view_remoteAgentInstall_installInfo = \u4ee3\u7406\u5b89\u88c5\u4fe1\u606f view_remoteAgentInstall_installPath = \u4ee3\u7406\u5b89\u88c5\u8def\u5f84 view_remoteAgentInstall_owner = \u6240\u6709\u8005 view_remoteAgentInstall_promptHost = The host where the agent is or will be installed -view_remoteAgentInstall_promptInstallPath = Where the agent is or will be installed. If you aren''t sure where an agent is installed, enter a parent directory and click the ''Find Agent'' button to scan that directory and below. If you enter an empty path, common locations are searched on the host for an agent install. +view_remoteAgentInstall_promptInstallPath = Where the agent is or will be installed. If you aren''t sure where an agent is installed, enter a parent directory and click the ''Find Agent'' button to scan that directory and below. You may try to use the Find Agent button to find the existing rhq agent directories. view_remoteAgentInstall_promptPassword = The credentials that are used to authenticate the user on the host via SSH view_remoteAgentInstall_promptPort = The port the SSH server is listening to. If not specified, the default is 22 view_remoteAgentInstall_promptUser = The name of the user whose credentials are passed to the host via SSH
rhq-commits@lists.fedorahosted.org