| @@ -0,0 +1,49 @@ | |||||
| package de.uniluebeck.mi.projmi6.controller; | |||||
| import de.uniluebeck.mi.projmi6.model.HL7LogEntry; | |||||
| import javafx.fxml.FXML; | |||||
| import javafx.scene.control.TableColumn; | |||||
| import javafx.scene.control.TableView; | |||||
| import javafx.scene.control.cell.PropertyValueFactory; | |||||
| import java.time.LocalDateTime; | |||||
| /** | |||||
| * Created by 631806 on 19.11.15. | |||||
| */ | |||||
| public class LogController { | |||||
| final MainController mainController; | |||||
| @FXML | |||||
| TableView<HL7LogEntry> tblLog; | |||||
| @FXML | |||||
| TableColumn<HL7LogEntry, String> colLogIp, colLogMessage; | |||||
| @FXML | |||||
| TableColumn<HL7LogEntry, LocalDateTime> colLogTime; | |||||
| public LogController(MainController mainController) { | |||||
| this.mainController = mainController; | |||||
| //TODO Set DB entrys | |||||
| } | |||||
| @FXML | |||||
| private void initialize(){ | |||||
| initColumns(); | |||||
| } | |||||
| private void initColumns(){ | |||||
| colLogIp.setCellValueFactory(new PropertyValueFactory<HL7LogEntry, String>("source")); | |||||
| colLogTime.setCellValueFactory(new PropertyValueFactory<HL7LogEntry, LocalDateTime>("timestamp")); | |||||
| colLogIp.setCellValueFactory(new PropertyValueFactory<HL7LogEntry, String>("message")); | |||||
| } | |||||
| public void refreshLogFromDb(){ | |||||
| //TODO | |||||
| } | |||||
| } | |||||
| @@ -29,7 +29,7 @@ public class MainController { | |||||
| private SettingsController settingsController; | private SettingsController settingsController; | ||||
| private StationsHistorieController stationsHistorieController; | private StationsHistorieController stationsHistorieController; | ||||
| private UntersuchungenController untersuchungenController; | private UntersuchungenController untersuchungenController; | ||||
| private LogController logController; | |||||
| private int parallelTaskCount = 0; | private int parallelTaskCount = 0; | ||||
| @@ -73,6 +73,8 @@ public class MainController { | |||||
| return untersuchungenController; | return untersuchungenController; | ||||
| } else if (clazz.equals(StationsHistorieController.class)) { | } else if (clazz.equals(StationsHistorieController.class)) { | ||||
| return stationsHistorieController; | return stationsHistorieController; | ||||
| } else if (clazz.equals(LogController.class)){ | |||||
| return logController; | |||||
| } else { | } else { | ||||
| System.err.println("Keine Controller-Klasse des Typs " + clazz + " gefunden!!!"); | System.err.println("Keine Controller-Klasse des Typs " + clazz + " gefunden!!!"); | ||||
| return null; | return null; | ||||
| @@ -87,6 +89,7 @@ public class MainController { | |||||
| settingsController = new SettingsController(this); | settingsController = new SettingsController(this); | ||||
| untersuchungenController = new UntersuchungenController(this); | untersuchungenController = new UntersuchungenController(this); | ||||
| stationsHistorieController = new StationsHistorieController(this); | stationsHistorieController = new StationsHistorieController(this); | ||||
| logController = new LogController(this); | |||||
| } | } | ||||
| @@ -6,7 +6,7 @@ | |||||
| <?import javafx.scene.layout.*?> | <?import javafx.scene.layout.*?> | ||||
| <?import java.net.URL?> | <?import java.net.URL?> | ||||
| <VBox minHeight="-Infinity" minWidth="-Infinity" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"> | |||||
| <VBox minHeight="-Infinity" minWidth="-Infinity" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.uniluebeck.mi.projmi6.controller.LogController"> | |||||
| <children> | <children> | ||||
| <TableView fx:id="tblLog" VBox.vgrow="ALWAYS"> | <TableView fx:id="tblLog" VBox.vgrow="ALWAYS"> | ||||
| <columns> | <columns> | ||||