Browse Source

er faehrt!

Martin Kunz 4 years ago
parent
commit
73d60972f6

+ 20 - 2
src/main/java/uraxis/MyDaemonInstallationNodeContribution.java

@@ -43,7 +43,7 @@ public class MyDaemonInstallationNodeContribution implements InstallationNodeCon
 	private InputButton enableDaemonButton;
 
 	@Input(id = "btnRef")
-	private InputButton refButton;
+	private InputButton refButtonRef;
 
 	@Input(id = "textIP")
 	private InputTextField refTextIP;
@@ -54,6 +54,12 @@ public class MyDaemonInstallationNodeContribution implements InstallationNodeCon
 	@Label(id = "lblStatus")
 	private LabelComponent refLblStatus;
 
+	@Input(id = "numberPos")
+	private InputTextField refNumberPos;
+
+	@Input(id = "btnPos")
+	private InputButton refButtonPos;
+
 	@Input(id = "btnDisableDaemon")
 	private InputButton disableDaemonButton;
 
@@ -77,6 +83,18 @@ public class MyDaemonInstallationNodeContribution implements InstallationNodeCon
 		}
 	}
 
+	@Input(id = "btnPos")
+	public void onBtnPos(InputEvent event) {
+		if (event.getEventType() == InputEvent.EventType.ON_CHANGE) {
+			try {
+				String pos=refNumberPos.getText();
+				getDaemonInterface().client.execute("pos", new String[]{pos});
+			} catch (XmlRpcException e) {
+				e.printStackTrace();
+			}
+		}
+	}
+
 
 	@Input(id = "btnEnableDaemon")
 	public void onStartClick(InputEvent event) {
@@ -123,7 +141,7 @@ public class MyDaemonInstallationNodeContribution implements InstallationNodeCon
 					public void run() {
 						try {
 							Object res = getDaemonInterface().client.execute("status", new String[]{});
-							refLblStatus.setText(res.toString());
+							refLblStatus.setText("<html>"+res.toString()+"</html>");
 							System.out.println(res);
 						} catch (XmlRpcException e) {
 							e.printStackTrace();

+ 8 - 3
src/main/resources/uraxis/installation.html

@@ -26,14 +26,19 @@
 			<input id="btnEnableDaemon" type="button" style="font-size: 18px;" />
 			<input id="btnDisableDaemon" type="button" style="font-size: 18px;" />
 			<br>
-			<input id="btnRef" type="button" style="font-size: 18px;" />
+			<label  id="lblStatus" style="width: 400px;height: 200px;vertical-align: top"></label>
+			<label id="lblDaemonStatus" style="width: 200px">Status of daemon</label>
 			<br>
 			<input id="textIP" type="text" style="font-size: 18px;" />
 			<input id="textPort" type="text" style="font-size: 18px;" />
 			<br>
-			<label  id="lblStatus" style="width: 400px;height: 200px;vertical-align: top"></label>
+			<input id="btnRef" type="button" style="font-size: 18px;" value="ref"/>
+			<br>
+			<input id="numberPos" type="number"  style="font-size: 18px;"/>
+			<input id="btnPos" type="button" style="font-size: 18px;" value="pos"/>
+
+
 			<br>
-			<label id="lblDaemonStatus" style="width: 200px">Status of daemon</label>
 		</form>
 	</body>
 </html>