Skip to content

Commit

Permalink
#15 Stub for the new cluster health pane
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Geisselmeier committed Mar 30, 2015
1 parent 102a361 commit 83d5668
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ public class ConverterClientApplication extends Application {
private final Pane conversionPane;

private final Pane serverlogPane;

private final Pane clusterHealthPane;

private final Pane jmxPane;

Expand All @@ -66,6 +68,7 @@ public ConverterClientApplication() throws IOException {
conversionPane = FXMLLoader.load(getClass().getResource("/fxml/ConversionPane.fxml"), getUiResources());
jmxPane = FXMLLoader.load(getClass().getResource("/fxml/JmxPane.fxml"), getUiResources());
serverlogPane = FXMLLoader.load(getClass().getResource("/fxml/LogPane.fxml"), getUiResources());
clusterHealthPane = FXMLLoader.load(getClass().getResource("/fxml/ClusterHealthPane.fxml"), getUiResources());
optionsPane = FXMLLoader.load(getClass().getResource("/fxml/OptionsPane.fxml"), getUiResources());

final FXMLLoader menuLoader = new FXMLLoader();
Expand Down Expand Up @@ -152,6 +155,11 @@ public void openServerLog() {
displayPanel(serverlogPane);
}

public void openClusterHealth() {
displayPanel(clusterHealthPane);
}


public void openInspector() {
displayPanel(inspectorPane);
}
Expand Down Expand Up @@ -206,4 +214,5 @@ private void displayPanel(Pane newPanel) {
public static void main(String[] args) {
launch(args);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ public class MetroMenuPaneController {
@FXML
Button serverLog;

@FXML
Button clusterHealth;

@FXML
Button jmx;

Expand Down Expand Up @@ -71,6 +74,7 @@ protected void initialize() {
initIconButton(conversion, FontAwesomeIcons.GEARS, evt -> ConverterClientApplication.getInstance().openConversion());
initIconButton(serverLog, FontAwesomeIcons.SERVER, evt -> ConverterClientApplication.getInstance().openServerLog());
initIconButton(jmx, FontAwesomeIcons.AREA_CHART, evt -> ConverterClientApplication.getInstance().openJMX());
initIconButton(clusterHealth, FontAwesomeIcons.HEARTBEAT, evt -> ConverterClientApplication.getInstance().openClusterHealth());
initIconButton(inspector, FontAwesomeIcons.SEARCH, evt -> ConverterClientApplication.getInstance().openInspector());
initSmallIconButton(options, FontAwesomeIcons.SLIDERS, evt -> ConverterClientApplication.getInstance().openOptions());
initSmallIconButton(about, FontAwesomeIcons.INFO, evt -> ConverterClientApplication.getInstance().openAbout());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package org.levigo.jadice.server.converterclient.gui.clusterhealth;

import javafx.fxml.FXML;
import javafx.scene.control.Button;

import org.levigo.jadice.server.converterclient.util.UiUtil;


public class ClusterHealthPaneController {

@FXML
private Button home;

@FXML
protected void initialize() {
UiUtil.configureHomeButton(home);
}

}
27 changes: 27 additions & 0 deletions src/main/resources/fxml/ClusterHealthPane.fxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import java.lang.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.web.*?>

<BorderPane prefHeight="493.0" prefWidth="775.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.levigo.jadice.server.converterclient.gui.clusterhealth.ClusterHealthPaneController">
<top>
<FlowPane styleClass="label-top">
<children>
<Button fx:id="home" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false"
prefHeight="30.0" prefWidth="30.0" styleClass="home" text="%app.home">
<FlowPane.margin>
<Insets right="10.0" />
</FlowPane.margin>
</Button>
<Label styleClass="label-top" text="%cluster-health.title" />
</children>
<padding>
<Insets left="10.0" top="5.0" />
</padding>
</FlowPane>
</top>

<center></center></BorderPane>
2 changes: 2 additions & 0 deletions src/main/resources/fxml/MetroMenuPane.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<columnConstraints>
<ColumnConstraints fillWidth="false" halignment="LEFT" hgrow="NEVER" maxWidth="-Infinity" minWidth="-Infinity" />
<ColumnConstraints fillWidth="false" halignment="LEFT" hgrow="NEVER" maxWidth="-Infinity" minWidth="-Infinity" />
<ColumnConstraints fillWidth="false" halignment="LEFT" hgrow="NEVER" maxWidth="-Infinity" minWidth="-Infinity" />
</columnConstraints>
<rowConstraints>
<RowConstraints fillHeight="false" maxHeight="-Infinity" minHeight="-Infinity" valignment="TOP" vgrow="NEVER" />
Expand All @@ -18,6 +19,7 @@
<children>
<Button fx:id="conversion" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="250.0" prefWidth="250.0" styleClass="button-navigation" text="%menu.conversion" AnchorPane.leftAnchor="10.0" GridPane.halignment="CENTER" GridPane.hgrow="ALWAYS" GridPane.valignment="CENTER" GridPane.vgrow="ALWAYS" />
<Button fx:id="serverLog" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="250.0" prefWidth="250.0" styleClass="button-navigation" text="%menu.server-log" AnchorPane.leftAnchor="280.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.hgrow="ALWAYS" GridPane.valignment="CENTER" GridPane.vgrow="ALWAYS" />
<Button fx:id="clusterHealth" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="250.0" prefWidth="250.0" styleClass="button-navigation" text="%menu.cluster-health" AnchorPane.leftAnchor="550.0" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.hgrow="ALWAYS" GridPane.valignment="CENTER" GridPane.vgrow="ALWAYS" />
<Button fx:id="jmx" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="250.0" prefWidth="250.0" styleClass="button-navigation" text="%menu.jmx" AnchorPane.leftAnchor="280.0" AnchorPane.topAnchor="270.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.hgrow="ALWAYS" GridPane.rowIndex="1" GridPane.valignment="CENTER" GridPane.vgrow="ALWAYS" />
<Button fx:id="inspector" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="250.0" prefWidth="250.0" styleClass="button-navigation" text="%menu.inspector" AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="270.0" GridPane.halignment="CENTER" GridPane.hgrow="ALWAYS" GridPane.rowIndex="1" GridPane.valignment="CENTER" GridPane.vgrow="ALWAYS" />
</children>
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/i18n/ui-strings.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ app.home=home
menu.title=jadice server :: Converter Client
menu.conversion=Conversion
menu.server-log=Server Log
menu.cluster-health=Cluster Health
menu.jmx=JMX
menu.inspector=Inspector
menu.update-available=Update Available
Expand Down Expand Up @@ -76,6 +77,9 @@ server-log.table.logger=Logger
server-log.table.message=Message
server-log.table.stacktrace=Stacktrace

cluster-health.title=Cluster Health


jmx.title=JMX
jmx.url=JMX URL
jmx.clear=Clear View
Expand Down

0 comments on commit 83d5668

Please sign in to comment.