增加websocket,增加定时任务管理

This commit is contained in:
liwen
2021-01-14 16:52:47 +08:00
parent 12fd9dc2cb
commit 9c1db9d032
236 changed files with 6453 additions and 1496 deletions

View File

@@ -1,56 +1,58 @@
Manifest-Version: 1.0
Main-Class: com.epri.fx.client.AppStartup
Class-Path: . libs/javax.inject-1.jar libs/tilesfx-1.6.8.jar libs/netfli
x-statistics-0.1.1.jar libs/jackson-core-2.11.0.jar libs/spring-boot-st
arter-security-2.3.0.RELEASE.jar libs/spring-boot-starter-logging-2.3.0
.RELEASE.jar libs/spring-web-5.2.6.RELEASE.jar libs/jackson-module-para
meter-names-2.11.0.jar libs/datafx-injection-8.0.2-SNAPSHOT.jar libs/pi
nyin4j-2.5.0.jar libs/okhttp-3.14.8.jar libs/spring-context-support-5.2
.6.RELEASE.jar libs/spring-boot-starter-json-2.3.0.RELEASE.jar libs/myb
atis-spring-2.0.5.jar libs/druid-spring-boot-starter-1.1.14.jar libs/Hi
kariCP-3.4.5.jar libs/xml-apis-1.0.b2.jar libs/datafx-core-8.0.2-SNAPSH
OT.jar libs/controlsfx-8.40.17.jar libs/pagehelper-spring-boot-autoconf
igure-1.2.5.jar libs/archaius-core-0.7.6.jar libs/commons-collections-3
.2.1.jar libs/servo-core-0.10.1.jar libs/feign-jackson-10.9.jar libs/ja
karta.annotation-api-1.3.5.jar libs/jsr305-3.0.1.jar libs/ribbon-loadba
lancer-2.3.0.jar libs/tomcat-embed-websocket-9.0.35.jar libs/spring-con
text-5.2.6.RELEASE.jar libs/slf4j-api-1.7.30.jar libs/mybatis-spring-bo
ot-autoconfigure-2.1.3.jar libs/spring-boot-starter-jdbc-2.3.0.RELEASE.
jar libs/okio-1.17.2.jar libs/spring-tx-5.2.6.RELEASE.jar libs/jackson-
datatype-jsr310-2.11.0.jar libs/commons-lang3-3.10.jar libs/spring-boot
-starter-cache-2.3.0.RELEASE.jar libs/jsr311-api-1.1.1.jar libs/hystrix
-core-1.5.18.jar libs/httpcore-4.4.13.jar libs/datafx-flow-8.0.2-SNAPSH
OT.jar libs/ribbon-core-2.3.0.jar libs/log4j-api-2.13.2.jar libs/lucene
-queryparser-7.4.0.jar libs/joda-time-2.10.1.jar libs/servo-internal-0.
10.1.jar libs/pagehelper-5.1.4.jar libs/annotations-2.0.0.jar libs/spri
ng-boot-starter-2.3.0.RELEASE.jar libs/lucene-core-7.4.0.jar libs/dom4j
-1.6.1.jar libs/feign-hystrix-10.9.jar libs/javassist-3.18.1-GA.jar lib
s/logback-classic-1.2.3.jar libs/observable-toogles-0.1.jar libs/DmJdbc
Driver-1.0.0.jar libs/jfoenix-8.0.10.jar libs/tomcat-embed-core-9.0.35.
jar libs/ikonli-javafx-2.4.0.jar libs/spring-security-config-5.3.2.RELE
ASE.jar libs/spring-boot-autoconfigure-2.3.0.RELEASE.jar libs/jakarta.e
l-3.0.3.jar libs/rxjava-1.3.8.jar libs/snakeyaml-1.26.jar libs/spring-s
ecurity-core-5.3.2.RELEASE.jar libs/spring-jdbc-5.2.6.RELEASE.jar libs/
lucene-sandbox-7.4.0.jar libs/pagehelper-spring-boot-starter-1.2.5.jar
libs/log4j-to-slf4j-2.13.2.jar libs/HdrHistogram-2.1.9.jar libs/jjwt-0.
7.0.jar libs/jersey-apache-client4-1.19.1.jar libs/spring-expression-5.
2.6.RELEASE.jar libs/lucene-queries-7.4.0.jar libs/spring-security-web-
5.3.2.RELEASE.jar libs/commons-logging-1.1.1.jar libs/feign-ribbon-10.9
.jar libs/feign-okhttp-10.9.jar libs/ikonli-fontawesome5-pack-2.4.0.jar
libs/feign-core-10.9.jar libs/druid-1.1.14.jar libs/spring-core-5.2.6.
RELEASE.jar libs/commons-configuration-1.8.jar libs/spring-boot-starter
-tomcat-2.3.0.RELEASE.jar libs/logback-core-1.2.3.jar libs/lucene-group
ing-7.4.0.jar libs/spring-beans-5.2.6.RELEASE.jar libs/datafx-eventsyst
em-8.0.2-SNAPSHOT.jar libs/spring-boot-starter-web-2.3.0.RELEASE.jar li
bs/jackson-datatype-jdk8-2.11.0.jar libs/togglz-core-2.0.1.Final.jar li
bs/mysql-connector-java-8.0.20.jar libs/spring-webmvc-5.2.6.RELEASE.jar
libs/jul-to-slf4j-1.7.30.jar libs/spring-jcl-5.2.6.RELEASE.jar libs/ne
tflix-commons-util-0.1.1.jar libs/spring-boot-2.3.0.RELEASE.jar libs/co
mmons-lang-2.6.jar libs/jackson-annotations-2.11.0.jar libs/jackson-dat
abind-2.11.0.jar libs/jersey-client-1.19.1.jar libs/fontawesomefx-8.9.j
ar libs/ribbon-httpclient-2.2.0.jar libs/ikonli-core-2.4.0.jar libs/myb
atis-3.5.5.jar libs/jersey-core-1.19.1.jar libs/guava-16.0.1.jar libs/s
pring-aop-5.2.6.RELEASE.jar libs/commons-codec-1.14.jar libs/mybatis-sp
ring-boot-starter-2.1.3.jar libs/httpclient-4.5.12.jar libs/feign-slf4j
-10.9.jar libs/jsqlparser-1.0.jar
Main-Class: com.fx.client.AppStartup
Class-Path: . libs/annotations-2.0.0.jar libs/feign-slf4j-10.9.jar libs/se
rvo-core-0.10.1.jar libs/jackson-databind-2.10.0.pr3.jar libs/netflix-c
ommons-util-0.1.1.jar libs/ribbon-loadbalancer-2.3.0.jar libs/pagehelpe
r-5.1.4.jar libs/spring-boot-starter-websocket-2.4.1.jar libs/fontaweso
mefx-8.9.jar libs/httpcore-4.2.1.jar libs/HikariCP-3.4.5.jar libs/log4j
-to-slf4j-2.13.3.jar libs/javafx-graphics-11.0.2-mac.jar libs/log4j-api
-2.13.3.jar libs/spring-boot-starter-jdbc-2.4.0.jar libs/feign-okhttp-1
0.9.jar libs/druid-spring-boot-starter-1.1.14.jar libs/spring-web-5.3.2
.jar libs/spring-security-config-5.4.2.jar libs/spring-boot-starter-2.4
.1.jar libs/ribbon-core-2.3.0.jar libs/jackson-datatype-jsr310-2.11.3.j
ar libs/spring-aop-5.3.2.jar libs/junit-4.12.jar libs/spring-boot-start
er-quartz-2.4.1.jar libs/logback-core-1.1.7.jar libs/hamcrest-core-1.3.
jar libs/feign-core-10.9.jar libs/spring-security-core-5.4.2.jar libs/j
ersey-core-1.19.1.jar libs/spring-boot-2.4.1.jar libs/mybatis-spring-bo
ot-autoconfigure-2.1.4.jar libs/feign-jackson-10.9.jar libs/okio-1.17.2
.jar libs/mybatis-spring-2.0.6.jar libs/jakarta.annotation-api-1.3.5.ja
r libs/tomcat-embed-websocket-9.0.41.jar libs/feign-ribbon-10.9.jar lib
s/datafx-flow-8.0.2-SNAPSHOT.jar libs/snakeyaml-1.27.jar libs/javassist
-3.18.1-GA.jar libs/joda-time-2.10.1.jar libs/spring-boot-starter-secur
ity-2.4.1.jar libs/okhttp-3.14.6.jar libs/DmJdbcDriver-1.0.0.jar libs/d
ruid-1.1.14.jar libs/jackson-annotations-2.10.0.pr3.jar libs/ikonli-jav
afx-2.4.0.jar libs/Java-WebSocket-1.5.1.jar libs/jsr305-3.0.1.jar libs/
mybatis-spring-boot-starter-2.1.4.jar libs/commons-lang-2.6.jar libs/sp
ring-context-support-5.3.2.jar libs/spring-context-5.3.2.jar libs/jacks
on-module-parameter-names-2.11.3.jar libs/spring-boot-autoconfigure-1.5
.12.RELEASE.jar libs/javafx-base-11.0.2.jar libs/ikonli-core-2.4.0.jar
libs/feign-hystrix-10.9.jar libs/spring-security-web-5.4.2.jar libs/spr
ing-expression-5.2.11.RELEASE.jar libs/rxjava-1.2.0.jar libs/slf4j-api-
1.7.21.jar libs/spring-boot-starter-json-2.4.1.jar libs/lombok-1.18.16.
jar libs/javafx-media-11.0.2.jar libs/c3p0-0.9.5.4.jar libs/datafx-inje
ction-8.0.2-SNAPSHOT.jar libs/jul-to-slf4j-1.7.30.jar libs/jersey-apach
e-client4-1.19.1.jar libs/jfoenix-8.0.10.jar libs/jjwt-0.7.0.jar libs/c
ommons-lang3-3.4.jar libs/tomcat-embed-core-9.0.41.jar libs/netflix-sta
tistics-0.1.1.jar libs/controlsfx-11.0.3.jar libs/spring-messaging-5.3.
2.jar libs/spring-tx-5.3.2.jar libs/spring-boot-starter-web-2.4.1.jar l
ibs/spring-boot-starter-tomcat-2.4.1.jar libs/spring-jcl-5.3.2.jar libs
/HikariCP-java7-2.4.13.jar libs/spring-beans-5.3.2.jar libs/HdrHistogra
m-2.1.9.jar libs/guava-16.0.1.jar libs/pinyin4j-2.5.0.jar libs/spring-w
ebsocket-5.3.2.jar libs/commons-collections-3.2.1.jar libs/datafx-event
system-8.0.2-SNAPSHOT.jar libs/httpclient-4.2.1.jar libs/mchange-common
s-java-0.2.15.jar libs/jakarta.el-3.0.3.jar libs/pagehelper-spring-boot
-autoconfigure-1.2.5.jar libs/javafx-base-11.0.2-mac.jar libs/jackson-c
ore-2.10.0.pr3.jar libs/ribbon-httpclient-2.2.0.jar libs/spring-boot-st
arter-cache-2.4.1.jar libs/commons-logging-1.1.1.jar libs/javafx-media-
11.0.2-mac.jar libs/jsqlparser-1.0.jar libs/javafx-controls-11.0.2-mac.
jar libs/archaius-core-0.7.6.jar libs/spring-boot-starter-logging-2.4.1
.jar libs/mysql-connector-java-8.0.20.jar libs/javafx-graphics-11.0.2.j
ar libs/javafx-controls-11.0.2.jar libs/javax.inject-1.jar libs/datafx-
core-8.0.2-SNAPSHOT.jar libs/quartz-2.3.2.jar libs/logback-classic-1.1.
7.jar libs/spring-jdbc-5.3.1.jar libs/ikonli-fontawesome5-pack-2.4.0.ja
r libs/hystrix-core-1.5.18.jar libs/jersey-client-1.19.1.jar libs/commo
ns-configuration-1.8.jar libs/jsr311-api-1.1.1.jar libs/mybatis-3.5.6.j
ar libs/spring-webmvc-5.3.2.jar libs/servo-internal-0.10.1.jar libs/spr
ing-core-5.3.2.jar libs/jackson-datatype-jdk8-2.11.3.jar libs/pagehelpe
r-spring-boot-starter-1.2.5.jar libs/commons-codec-1.6.jar

View File

@@ -1,24 +0,0 @@
package com.epri.fx.client.websocket;
import io.datafx.controller.injection.scopes.ApplicationScoped;
import io.datafx.controller.injection.scopes.FlowScoped;
/**
* @description:
* @className: Session
* @author: liwen
* @date: 2020/6/24 16:17
*/
@ApplicationScoped
public class Session {
private int counter = 0;
public Session() {
}
public void print(String from) {
System.out.println(from + ": counter = " + counter++);
}
}

View File

@@ -1,8 +1,9 @@
package com.epri.fx.client;
package com.fx.client;
import com.epri.fx.client.gui.uicomponents.control.LFXDecorator;
import com.epri.fx.client.gui.uicomponents.login.LoginController;
import com.epri.fx.client.store.ApplicatonStore;
import com.fx.client.gui.uicomponents.control.LFXDecorator;
import com.fx.client.gui.uicomponents.login.LoginController;
import com.fx.client.store.ApplicatonStore;
import com.fx.client.websocket.WSClient;
import com.jfoenix.assets.JFoenixResources;
import com.jfoenix.svg.SVGGlyph;
import com.jfoenix.svg.SVGGlyphLoader;
@@ -12,9 +13,10 @@ import io.datafx.controller.flow.Flow;
import io.datafx.controller.flow.FlowHandler;
import io.datafx.controller.flow.container.AnimatedFlowContainer;
import io.datafx.controller.flow.container.ContainerAnimations;
import io.datafx.controller.flow.context.FXMLViewFlowContext;
import io.datafx.controller.flow.context.ViewFlowContext;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.StackPane;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;
import javafx.stage.Stage;
@@ -32,7 +34,10 @@ import java.io.InputStream;
*/
public class AppStartup extends Application {
@FXMLViewFlowContext
private ViewFlowContext flowContext;
private ApplicationContext applicationContext = ApplicationContext.getInstance();
@Override
public void init() throws Exception {
@@ -40,7 +45,7 @@ public class AppStartup extends Application {
InputStream in = AppStartup.class.getClassLoader().getResourceAsStream("fonts/msyh.ttf");
Font font1 = Font.loadFont(in, 12);
System.err.println(font1.getName()+"\t"+font1.getFamily());
System.err.println(font1.getName() + "\t" + font1.getFamily());
ConfigurationManager.loadPropertiesFromResources("sample-client.properties");
//
@@ -66,20 +71,20 @@ public class AppStartup extends Application {
}
}).start();
Flow contentFlow = new Flow(LoginController.class);
AnimatedFlowContainer container = new AnimatedFlowContainer(Duration.millis(320), ContainerAnimations.SWIPE_LEFT);
flowContext = new ViewFlowContext();
final FlowHandler contentFlowHandler = contentFlow.createHandler(flowContext);
applicationContext.register(stage, Stage.class);
applicationContext.register("ContentFlowHandler", contentFlowHandler);
contentFlowHandler.start(container);
ApplicationContext.getInstance().register(stage, Stage.class);
Flow flow = new Flow(LoginController.class);
FlowHandler flowHandler = flow.createHandler();
StackPane rootPane = flowHandler.start(new AnimatedFlowContainer(Duration.millis(320), ContainerAnimations.SWIPE_LEFT));
ApplicationContext.getInstance().register("mainFlowHandler", flowHandler);
ApplicationContext.getInstance().register(rootPane, StackPane.class);
LFXDecorator wfxDecorator = new LFXDecorator(stage, rootPane, false, true, true);
LFXDecorator wfxDecorator = new LFXDecorator(stage, container.getView(), false, true, true);
wfxDecorator.setCustomMaximize(true);
wfxDecorator.setGraphic(new SVGGlyph(""));
Scene scene = new Scene(wfxDecorator, 1000, 750);
stage.setTitle("JavaFX Welcome");
scene.setFill(Color.TRANSPARENT);
@@ -87,13 +92,13 @@ public class AppStartup extends Application {
stage.show();
scene.getStylesheets().addAll(JFoenixResources.load("/css/app-fonts.css").toExternalForm(),AppStartup.class.getResource("/css/login.css").toExternalForm(),AppStartup.class.getResource("/css/app-light.css").toExternalForm());
scene.getStylesheets().addAll(JFoenixResources.load("/css/app-fonts.css").toExternalForm(), AppStartup.class.getResource("/css/login.css").toExternalForm(), AppStartup.class.getResource("/css/app-light.css").toExternalForm());
}
@Override
public void stop() throws Exception {
WSClient.getInstance().close();
}
}

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.epri.fx.client.bean;
package com.fx.client.bean;
import javafx.scene.control.Tooltip;
import javafx.scene.shape.SVGPath;

View File

@@ -1,8 +1,6 @@
package com.epri.fx.client.bean;
package com.fx.client.bean;
import com.epri.fx.server.entity.Menu;
import com.epri.fx.server.vo.MenuVO;
import javafx.beans.property.ListProperty;
import com.fx.server.vo.MenuVO;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleListProperty;
import javafx.beans.property.SimpleObjectProperty;

View File

@@ -1,4 +1,4 @@
package com.epri.fx.client.exception;
package com.fx.client.exception;
import javafx.application.Platform;

View File

@@ -1,4 +1,4 @@
package com.epri.fx.client.gui.feature;
package com.fx.client.gui.feature;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;

View File

@@ -1,6 +1,6 @@
package com.epri.fx.client.gui.feature;
package com.fx.client.gui.feature;
import com.epri.fx.client.store.ApplicatonStore;
import com.fx.client.store.ApplicatonStore;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.scene.Node;

View File

@@ -1,4 +1,4 @@
package com.epri.fx.client.gui.feature;
package com.fx.client.gui.feature;
import io.datafx.controller.ViewNode;
import io.datafx.controller.injection.scopes.ApplicationScoped;

View File

@@ -1,4 +1,4 @@
package com.epri.fx.client.gui.feature;
package com.fx.client.gui.feature;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;

View File

@@ -1,10 +1,10 @@
package com.epri.fx.client.gui.uicomponents.admin.group;
package com.fx.client.gui.uicomponents.admin.group;
import com.epri.fx.client.gui.uicomponents.admin.group.components.GroupDetailController;
import com.epri.fx.client.model.GroupDataModel;
import com.epri.fx.client.request.Request;
import com.epri.fx.client.request.feign.admin.GroupTypeFeign;
import com.epri.fx.server.vo.GroupTypeVO;
import com.fx.client.gui.uicomponents.admin.group.components.GroupDetailController;
import com.fx.client.model.GroupDataModel;
import com.fx.client.request.Request;
import com.fx.client.request.feign.admin.GroupTypeFeign;
import com.fx.server.vo.GroupTypeVO;
import com.jfoenix.controls.JFXSpinner;
import com.jfoenix.controls.JFXTabPane;
import io.datafx.controller.ViewController;

View File

@@ -1,18 +1,17 @@
package com.epri.fx.client.gui.uicomponents.admin.group.components;
package com.fx.client.gui.uicomponents.admin.group.components;
import com.epri.fx.client.gui.uicomponents.control.FilterableCheckBoxTreeItem;
import com.epri.fx.client.gui.uicomponents.control.FilterableTreeItem;
import com.epri.fx.client.gui.uicomponents.control.TreeItemPredicate;
import com.epri.fx.client.model.GroupDataModel;
import com.epri.fx.client.request.Request;
import com.epri.fx.client.request.feign.admin.GroupFeign;
import com.epri.fx.client.request.feign.admin.MenuFeign;
import com.epri.fx.client.store.ApplicatonStore;
import com.epri.fx.client.utils.Pinyin4jUtil;
import com.epri.fx.server.entity.User;
import com.epri.fx.server.vo.ElementVO;
import com.epri.fx.server.vo.GroupVO;
import com.epri.fx.server.vo.MenuVO;
import com.fx.client.gui.uicomponents.control.TreeItemPredicate;
import com.fx.client.gui.uicomponents.control.FilterableCheckBoxTreeItem;
import com.fx.client.gui.uicomponents.control.FilterableTreeItem;
import com.fx.client.model.GroupDataModel;
import com.fx.client.request.Request;
import com.fx.client.request.feign.admin.GroupFeign;
import com.fx.client.store.ApplicatonStore;
import com.fx.client.utils.Pinyin4jUtil;
import com.fx.server.entity.User;
import com.fx.server.vo.ElementVO;
import com.fx.server.vo.GroupVO;
import com.fx.server.vo.MenuVO;
import com.jfoenix.controls.*;
import com.jfoenix.svg.SVGGlyphLoader;
import io.datafx.controller.ViewController;

View File

@@ -1,12 +1,11 @@
package com.epri.fx.client.gui.uicomponents.admin.grouptype;
package com.fx.client.gui.uicomponents.admin.grouptype;
import com.epri.fx.client.model.GroupTypeDataModel;
import com.epri.fx.client.request.Request;
import com.epri.fx.client.request.feign.admin.GroupTypeFeign;
import com.epri.fx.client.request.feign.admin.UserFeign;
import com.epri.fx.client.store.ApplicatonStore;
import com.epri.fx.client.utils.Pinyin4jUtil;
import com.epri.fx.server.vo.GroupTypeVO;
import com.fx.client.model.GroupTypeDataModel;
import com.fx.client.request.Request;
import com.fx.client.request.feign.admin.GroupTypeFeign;
import com.fx.client.store.ApplicatonStore;
import com.fx.client.utils.Pinyin4jUtil;
import com.fx.server.vo.GroupTypeVO;
import com.jfoenix.controls.*;
import com.jfoenix.svg.SVGGlyphLoader;
import io.datafx.controller.ViewController;

View File

@@ -0,0 +1,229 @@
package com.fx.client.gui.uicomponents.admin.logManagement;
import com.fx.client.model.LoginLogDataModel;
import com.fx.client.request.Request;
import com.fx.client.request.feign.admin.LoginLogFeign;
import com.fx.client.utils.Pinyin4jUtil;
import com.fx.server.entity.log.SysLoginInfor;
import com.fx.server.util.DateUtils;
import com.jfoenix.controls.JFXDatePicker;
import com.jfoenix.controls.JFXSpinner;
import io.datafx.controller.ViewController;
import io.datafx.controller.flow.action.ActionMethod;
import io.datafx.controller.flow.action.ActionTrigger;
import io.datafx.core.concurrent.ProcessChain;
import javafx.collections.transformation.FilteredList;
import javafx.fxml.FXML;
import javafx.scene.Node;
import javafx.scene.control.*;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.layout.VBox;
import javafx.util.Callback;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @description:
* @className: LoginLogController
* @author: liwen
* @date: 2021/1/4 14:06
*/
@ViewController("/fxml/admin/logManagement/login_log.fxml")
public class LoginLogController {
@FXML
private VBox contentPane;
@FXML
private TextField loginNameTextfield;
@FXML
private TextField addrTextfield;
@FXML
private ComboBox statusComboBox;
@FXML
private TableView<SysLoginInfor> tableView;
@FXML
private Pagination pagination;
@FXML
private JFXSpinner spinner;
@FXML
@ActionTrigger("rest")
private Button restButton;
@FXML
@ActionTrigger("search")
private Button searchButton;
@FXML
private JFXDatePicker startDatePicker;
@FXML
private JFXDatePicker endDatePicker;
@FXML
private TableColumn<SysLoginInfor, String> infoIdColumn;
@FXML
private TableColumn<SysLoginInfor, String> loginNameColumn;
@FXML
private TableColumn<SysLoginInfor, String> ipaddrColumn;
@FXML
private TableColumn<SysLoginInfor, String> statusColumn;
@FXML
private TableColumn<SysLoginInfor, String> msgColumn;
@FXML
private TableColumn<SysLoginInfor, Date> loginTimeColumn;
@Inject
private LoginLogDataModel loginLogDataModel;
@PostConstruct
private void init() {
spinner.setVisible(false);
statusComboBox.getSelectionModel().select(0);
infoIdColumn.setCellValueFactory(new PropertyValueFactory<>("infoId"));
loginNameColumn.setCellValueFactory(new PropertyValueFactory<>("loginName"));
ipaddrColumn.setCellValueFactory(new PropertyValueFactory<>("ipaddr"));
statusColumn.setCellValueFactory(new PropertyValueFactory<>("status"));
statusColumn.setCellFactory(col -> {
TableCell<SysLoginInfor, String> cell = new TableCell<SysLoginInfor, String>() {
private Label label = new Label("");
@Override
protected void updateItem(String item, boolean empty) {
super.updateItem(item, empty);
this.setText(null);
this.setGraphic(null);
if (!empty) {
if (item.equals("0")) {
label.setId("status-success-label");
label.setText("成功");
} else {
label.setId("status-error-label");
label.setText("失败");
}
setGraphic(label);
}
}
};
return cell;
});
msgColumn.setCellValueFactory(new PropertyValueFactory<>("msg"));
loginTimeColumn.setCellValueFactory(new PropertyValueFactory<>("loginTime"));
loginTimeColumn.setCellFactory(col -> {
TableCell<SysLoginInfor, Date> cell = new TableCell<SysLoginInfor, Date>() {
@Override
protected void updateItem(Date item, boolean empty) {
super.updateItem(item, empty);
this.setText(null);
this.setGraphic(null);
if (!empty && item != null) {
setText(DateUtils.formatDate(item, DateUtils.DATETIME_FORMAT));
}
}
};
return cell;
});
FilteredList<SysLoginInfor> filteredData = new FilteredList<>(loginLogDataModel.getSysLoginInfors(), p -> true);
tableView.setItems(filteredData);
loginNameTextfield.textProperty().addListener((o, oldVal, newVal) -> {
filteredData.setPredicate(elementProp -> {
if (newVal == null || newVal.isEmpty()) {
return true;
}
String val = Pinyin4jUtil.toPinYinLowercase(newVal);
return Pinyin4jUtil.toPinYinLowercase(elementProp.getLoginName()).contains(val);
});
});
loginLogDataModel.selectedPersonIndexProperty().bind(tableView.getSelectionModel().selectedIndexProperty());
pagination.pageCountProperty().bind(loginLogDataModel.pageCountProperty());
pagination.setPageFactory(new Callback<Integer, Node>() {
@Override
public Node call(Integer param) {
showPage(param + 1);
return tableView;
}
});
}
private void showPage(Integer page) {
Map<String, Object> queryMap = getQueryMap();
queryMap.put("page", page);
queryMap.put("limit", 20);
query(queryMap);
}
private Map<String, Object> getQueryMap() {
String loginName = loginNameTextfield.getText();
String ipaddr = addrTextfield.getText();
String status = statusComboBox.getSelectionModel().selectedIndexProperty().getValue() == 0 ? null : (statusComboBox.getSelectionModel().selectedIndexProperty().getValue() == 1 ? "0" : "1");
LocalDate beginDate = startDatePicker.getValue();
LocalDate endDate = endDatePicker.getValue();
Map<String, Object> queryMap = new HashMap<>();
queryMap.put("page", 0);
queryMap.put("limit", 20);
queryMap.put("loginName", loginName);
queryMap.put("ipaddr", ipaddr);
queryMap.put("status", status);
queryMap.put("startTime", beginDate != null ? beginDate.format(DateTimeFormatter.ofPattern("yyyyMMdd")) : null);
queryMap.put("endTime", endDate != null ? endDate.format(DateTimeFormatter.ofPattern("yyyyMMdd")) : null);
return queryMap;
}
private void query(Map<String, Object> queryMap) {
ProcessChain.create()
.addRunnableInPlatformThread(() -> {
loginLogDataModel.getSysLoginInfors().clear();
spinner.setVisible(true);
contentPane.setDisable(true);
})
.addSupplierInExecutor(
() -> Request.connector(LoginLogFeign.class).getSysLoginInfor(queryMap)
)
.addConsumerInPlatformThread(result -> {
List<SysLoginInfor> gateLogs = result.getDatas();
loginLogDataModel.setPageCount((int) result.getTotal());
loginLogDataModel.getSysLoginInfors().addAll(gateLogs);
})
.withFinal(() -> {
spinner.setVisible(false);
contentPane.setDisable(false);
})
.onException(e -> e.printStackTrace())
.run();
}
@ActionMethod("search")
private void search() {
pagination.currentPageIndexProperty().setValue(0);
query(getQueryMap());
}
@ActionMethod("rest")
private void rest() {
loginNameTextfield.setText("");
addrTextfield.setText("");
statusComboBox.getSelectionModel().select(0);
startDatePicker.valueProperty().set(null);
endDatePicker.valueProperty().set(null);
searchButton.fire();
}
}

View File

@@ -1,43 +1,28 @@
package com.epri.fx.client.gui.uicomponents.admin.log;
package com.fx.client.gui.uicomponents.admin.logManagement;
import com.epri.fx.client.gui.feature.FeatureResourceConsumer;
import com.epri.fx.client.gui.feature.HideByFeature;
import com.epri.fx.client.gui.uicomponents.admin.user.components.UserAddController;
import com.epri.fx.client.gui.uicomponents.admin.user.components.UserEditController;
import com.epri.fx.client.model.LogDataModel;
import com.epri.fx.client.model.UserDataModel;
import com.epri.fx.client.request.Request;
import com.epri.fx.client.request.feign.admin.LogFeign;
import com.epri.fx.client.request.feign.admin.UserFeign;
import com.epri.fx.client.request.feign.login.LoginFeign;
import com.epri.fx.client.store.ApplicatonStore;
import com.epri.fx.client.utils.Pinyin4jUtil;
import com.epri.fx.server.entity.User;
import com.epri.fx.server.entity.log.GateLog;
import com.epri.fx.server.entity.log.LogInfo;
import com.epri.fx.server.util.DateUtils;
import com.epri.fx.server.vo.UserVO;
import com.fx.client.gui.feature.FeatureResourceConsumer;
import com.fx.client.model.LogDataModel;
import com.fx.client.request.Request;
import com.fx.client.request.feign.admin.LogFeign;
import com.fx.client.request.feign.admin.UserFeign;
import com.fx.client.utils.Pinyin4jUtil;
import com.fx.server.entity.log.GateLog;
import com.jfoenix.controls.JFXAlert;
import com.jfoenix.controls.JFXButton;
import com.jfoenix.controls.JFXDialogLayout;
import com.jfoenix.svg.SVGGlyphLoader;
import io.datafx.controller.ViewController;
import io.datafx.controller.flow.FlowException;
import io.datafx.controller.flow.action.ActionMethod;
import io.datafx.controller.flow.action.ActionTrigger;
import io.datafx.controller.flow.context.ActionHandler;
import io.datafx.controller.flow.context.FlowActionHandler;
import io.datafx.controller.util.VetoException;
import io.datafx.core.concurrent.ProcessChain;
import io.datafx.eventsystem.Event;
import io.datafx.eventsystem.OnEvent;
import javafx.collections.transformation.FilteredList;
import javafx.fxml.FXML;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.control.*;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.layout.HBox;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.stage.Modality;
@@ -57,8 +42,8 @@ import java.util.Map;
* @author: liwen
* @date: 2020/3/4 21:05
*/
@ViewController(value = "/fxml/admin/log/log_management.fxml", title = "操作日志")
public class LogManagementController {
@ViewController(value = "/fxml/admin/logManagement/operation_log.fxml", title = "操作日志")
public class OperationLogController {
public static final String CONTENT_PANE = "ContentPane";
@@ -220,6 +205,7 @@ public class LogManagementController {
@ActionMethod("search")
private void search() {
pagination.currentPageIndexProperty().setValue(0);
Map<String, Object> queryMap = new HashMap<>();
queryMap.put("keyId", searchField.getText());
query(queryMap);

View File

@@ -1,18 +1,17 @@
package com.epri.fx.client.gui.uicomponents.admin.menu;
package com.fx.client.gui.uicomponents.admin.menu;
import com.epri.fx.client.gui.uicomponents.control.FilterableTreeItem;
import com.epri.fx.client.gui.uicomponents.control.TreeItemPredicate;
import com.epri.fx.client.model.MenuDataModel;
import com.epri.fx.client.request.Request;
import com.epri.fx.client.request.feign.admin.ElementFeign;
import com.epri.fx.client.request.feign.admin.MenuFeign;
import com.epri.fx.client.request.feign.admin.UserFeign;
import com.epri.fx.client.store.ApplicatonStore;
import com.epri.fx.client.utils.Pinyin4jUtil;
import com.epri.fx.server.entity.Element;
import com.epri.fx.server.msg.TableResultResponse;
import com.epri.fx.server.vo.ElementVO;
import com.epri.fx.server.vo.MenuVO;
import com.fx.client.gui.uicomponents.control.TreeItemPredicate;
import com.fx.client.gui.uicomponents.control.FilterableTreeItem;
import com.fx.client.model.MenuDataModel;
import com.fx.client.request.Request;
import com.fx.client.request.feign.admin.ElementFeign;
import com.fx.client.request.feign.admin.MenuFeign;
import com.fx.client.store.ApplicatonStore;
import com.fx.client.utils.Pinyin4jUtil;
import com.fx.server.entity.Element;
import com.fx.server.msg.TableResultResponse;
import com.fx.server.vo.ElementVO;
import com.fx.server.vo.MenuVO;
import com.jfoenix.controls.*;
import com.jfoenix.svg.SVGGlyphLoader;
import io.datafx.controller.ViewController;
@@ -170,6 +169,7 @@ public class MenuManagementController {
@PostConstruct
private void init() {
final ToggleGroup group = new ToggleGroup();
addButton.setToggleGroup(group);
editButton.setToggleGroup(group);

View File

@@ -1,21 +1,20 @@
package com.epri.fx.client.gui.uicomponents.admin.user;
package com.fx.client.gui.uicomponents.admin.user;
import com.epri.fx.client.gui.feature.FeatureResourceConsumer;
import com.epri.fx.client.gui.feature.HideByFeature;
import com.epri.fx.client.gui.uicomponents.admin.user.components.UserAddController;
import com.epri.fx.client.gui.uicomponents.admin.user.components.UserEditController;
import com.epri.fx.client.model.UserDataModel;
import com.epri.fx.client.request.Request;
import com.epri.fx.client.request.feign.admin.UserFeign;
import com.epri.fx.client.store.ApplicatonStore;
import com.epri.fx.client.utils.Pinyin4jUtil;
import com.epri.fx.server.entity.User;
import com.epri.fx.server.util.DateUtils;
import com.epri.fx.server.vo.UserVO;
import com.fx.client.gui.feature.FeatureResourceConsumer;
import com.fx.client.gui.feature.HideByFeature;
import com.fx.client.gui.uicomponents.admin.user.components.UserAddController;
import com.fx.client.gui.uicomponents.admin.user.components.UserEditController;
import com.fx.client.model.UserDataModel;
import com.fx.client.request.Request;
import com.fx.client.request.feign.admin.UserFeign;
import com.fx.client.store.ApplicatonStore;
import com.fx.client.utils.Pinyin4jUtil;
import com.fx.server.entity.User;
import com.fx.server.util.DateUtils;
import com.fx.server.vo.UserVO;
import com.jfoenix.controls.JFXAlert;
import com.jfoenix.controls.JFXButton;
import com.jfoenix.controls.JFXDialogLayout;
import com.jfoenix.svg.SVGGlyph;
import com.jfoenix.svg.SVGGlyphLoader;
import io.datafx.controller.ViewController;
import io.datafx.controller.flow.FlowException;
@@ -336,6 +335,8 @@ public class UserManagementController {
@ActionMethod("search")
private void search() {
pagination.currentPageIndexProperty().setValue(0);
Map<String, Object> queryMap = new HashMap<>();
queryMap.put("keyId", searchField.getText());
query(queryMap);
@@ -357,7 +358,7 @@ public class UserManagementController {
dataModel.setPageCount((int) result.getTotal());
for (User user : userList) {
dataModel.getUsers().add(new UserVO(user.getId(), user.getName(), user.getUsername(), DateUtils.format(user.getUpdTime(), DateUtils.DATE_TIME_PATTERN), user.getUpdUser(), user.getSex(), user.getDescription()));
dataModel.getUsers().add(new UserVO(user.getId(), user.getName(), user.getUsername(), DateUtils.formatDate(user.getUpdTime(), DateUtils.DATETIME_FORMAT), user.getUpdUser(), user.getSex(), user.getDescription()));
}
})
.withFinal(() -> {

View File

@@ -1,10 +1,10 @@
package com.epri.fx.client.gui.uicomponents.admin.user.components;
package com.fx.client.gui.uicomponents.admin.user.components;
import com.epri.fx.client.gui.uicomponents.admin.user.UserManagementController;
import com.epri.fx.client.model.UserDataModel;
import com.epri.fx.client.request.Request;
import com.epri.fx.client.request.feign.admin.UserFeign;
import com.epri.fx.server.entity.User;
import com.fx.client.gui.uicomponents.admin.user.UserManagementController;
import com.fx.client.model.UserDataModel;
import com.fx.client.request.Request;
import com.fx.client.request.feign.admin.UserFeign;
import com.fx.server.entity.User;
import com.jfoenix.controls.*;
import io.datafx.controller.ViewController;
import io.datafx.controller.flow.FlowException;

View File

@@ -1,11 +1,11 @@
package com.epri.fx.client.gui.uicomponents.admin.user.components;
package com.fx.client.gui.uicomponents.admin.user.components;
import com.epri.fx.client.gui.uicomponents.admin.user.UserManagementController;
import com.epri.fx.client.model.UserDataModel;
import com.epri.fx.client.request.Request;
import com.epri.fx.client.request.feign.admin.UserFeign;
import com.epri.fx.server.entity.User;
import com.epri.fx.server.vo.UserVO;
import com.fx.client.gui.uicomponents.admin.user.UserManagementController;
import com.fx.client.model.UserDataModel;
import com.fx.client.request.Request;
import com.fx.client.request.feign.admin.UserFeign;
import com.fx.server.entity.User;
import com.fx.server.vo.UserVO;
import com.jfoenix.controls.*;
import io.datafx.controller.ViewController;
import io.datafx.controller.flow.FlowException;

View File

@@ -1,4 +1,4 @@
package com.epri.fx.client.gui.uicomponents.basicInfo;
package com.fx.client.gui.uicomponents.basicInfo;
import io.datafx.controller.ViewController;

View File

@@ -1,4 +1,4 @@
package com.epri.fx.client.gui.uicomponents.basicInfo;
package com.fx.client.gui.uicomponents.basicInfo;
import io.datafx.controller.ViewController;

View File

@@ -1,4 +1,4 @@
package com.epri.fx.client.gui.uicomponents.basicInfo;
package com.fx.client.gui.uicomponents.basicInfo;
import io.datafx.controller.ViewController;

View File

@@ -1,4 +1,4 @@
package com.epri.fx.client.gui.uicomponents.basicInfo;
package com.fx.client.gui.uicomponents.basicInfo;
import io.datafx.controller.ViewController;

View File

@@ -1,4 +1,4 @@
package com.epri.fx.client.gui.uicomponents.basicInfo;
package com.fx.client.gui.uicomponents.basicInfo;
import io.datafx.controller.ViewController;

View File

@@ -1,4 +1,4 @@
package com.epri.fx.client.gui.uicomponents.container;
package com.fx.client.gui.uicomponents.container;
import com.jfoenix.controls.JFXTabPane;
import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon;

View File

@@ -1,4 +1,4 @@
package com.epri.fx.client.gui.uicomponents.control;
package com.fx.client.gui.uicomponents.control;
import javafx.beans.binding.Bindings;
import javafx.beans.property.ObjectProperty;

View File

@@ -1,4 +1,4 @@
package com.epri.fx.client.gui.uicomponents.control;
package com.fx.client.gui.uicomponents.control;
import javafx.beans.binding.Bindings;
import javafx.beans.property.ObjectProperty;

View File

@@ -1,4 +1,4 @@
package com.epri.fx.client.gui.uicomponents.control;
package com.fx.client.gui.uicomponents.control;
import com.jfoenix.controls.JFXButton;
import com.jfoenix.svg.SVGGlyph;
@@ -21,8 +21,6 @@ import javafx.geometry.Rectangle2D;
import javafx.scene.Cursor;
import javafx.scene.Node;
import javafx.scene.control.Tooltip;
import javafx.scene.effect.DropShadow;
import javafx.scene.effect.Shadow;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.Background;
import javafx.scene.layout.BackgroundFill;

View File

@@ -1,4 +1,4 @@
package com.epri.fx.client.gui.uicomponents.control;
package com.fx.client.gui.uicomponents.control;
import javafx.scene.control.TreeItem;

View File

@@ -1,7 +1,7 @@
package com.epri.fx.client.gui.uicomponents.home;
package com.fx.client.gui.uicomponents.home;
import com.epri.fx.client.bean.CountryPath;
import com.epri.fx.client.store.ApplicatonStore;
import com.fx.client.bean.CountryPath;
import com.fx.client.store.ApplicatonStore;
import eu.hansolo.tilesfx.Tile;
import eu.hansolo.tilesfx.TileBuilder;
import eu.hansolo.tilesfx.TimeSection;
@@ -10,13 +10,9 @@ import eu.hansolo.tilesfx.addons.Indicator;
import eu.hansolo.tilesfx.chart.ChartData;
import eu.hansolo.tilesfx.chart.RadarChart;
import eu.hansolo.tilesfx.chart.TilesFXSeries;
import eu.hansolo.tilesfx.colors.Bright;
import eu.hansolo.tilesfx.colors.Dark;
import eu.hansolo.tilesfx.skins.BarChartItem;
import eu.hansolo.tilesfx.skins.LeaderBoardItem;
import eu.hansolo.tilesfx.tools.Country;
import eu.hansolo.tilesfx.tools.FlowGridPane;
import eu.hansolo.tilesfx.tools.Helper;
import eu.hansolo.tilesfx.tools.Location;
import eu.hansolo.tilesfx.weather.DarkSky;
import io.datafx.controller.ViewController;
@@ -27,28 +23,23 @@ import javafx.beans.property.DoubleProperty;
import javafx.beans.property.SimpleDoubleProperty;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.chart.XYChart;
import javafx.scene.layout.*;
import javafx.scene.layout.GridPane;
import javafx.scene.paint.Color;
import javafx.scene.paint.CycleMethod;
import javafx.scene.paint.LinearGradient;
import javafx.scene.paint.Stop;
import javafx.scene.text.TextAlignment;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import java.time.LocalTime;
import java.time.ZonedDateTime;
import java.util.*;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.concurrent.ConcurrentHashMap;
import static javafx.scene.layout.Region.USE_COMPUTED_SIZE;
import static javafx.scene.layout.Region.USE_PREF_SIZE;
/**
* @description:
* @className: HomeController

View File

@@ -1,4 +1,4 @@
package com.epri.fx.client.gui.uicomponents.login;
package com.fx.client.gui.uicomponents.login;
import io.datafx.controller.ViewController;

View File

@@ -1,18 +1,19 @@
package com.epri.fx.client.gui.uicomponents.login;
package com.fx.client.gui.uicomponents.login;
import com.epri.fx.client.bean.MenuVoCell;
import com.epri.fx.client.gui.uicomponents.main.MainController;
import com.epri.fx.client.request.Request;
import com.epri.fx.client.request.feign.admin.MenuFeign;
import com.epri.fx.client.request.feign.login.LoginFeign;
import com.epri.fx.client.store.ApplicatonStore;
import com.epri.fx.client.utils.AlertUtil;
import com.epri.fx.client.websocket.Session;
import com.epri.fx.server.util.EncryptUtil;
import com.epri.fx.server.util.user.JwtAuthenticationRequest;
import com.epri.fx.server.vo.FrontUser;
import com.epri.fx.server.vo.MenuVO;
import com.epri.fx.server.vo.PermissionInfo;
import com.fx.client.bean.MenuVoCell;
import com.fx.client.gui.uicomponents.main.MainController;
import com.fx.client.request.Request;
import com.fx.client.request.feign.admin.MenuFeign;
import com.fx.client.request.feign.login.LoginFeign;
import com.fx.client.store.ApplicatonStore;
import com.fx.client.utils.AlertUtil;
import com.fx.client.websocket.WSClient;
import com.fx.server.msg.ObjectRestResponse;
import com.fx.server.util.EncryptUtil;
import com.fx.server.util.user.JwtAuthenticationRequest;
import com.fx.server.vo.FrontUser;
import com.fx.server.vo.MenuVO;
import com.fx.server.vo.PermissionInfo;
import com.jfoenix.controls.JFXButton;
import com.jfoenix.controls.JFXPasswordField;
import com.jfoenix.controls.JFXProgressBar;
@@ -21,14 +22,10 @@ import com.jfoenix.svg.SVGGlyph;
import com.jfoenix.svg.SVGGlyphLoader;
import com.jfoenix.validation.RegexValidator;
import io.datafx.controller.ViewController;
import io.datafx.controller.flow.FlowException;
import io.datafx.controller.flow.action.ActionMethod;
import io.datafx.controller.flow.action.ActionTrigger;
import io.datafx.controller.flow.context.ActionHandler;
import io.datafx.controller.flow.context.FXMLViewFlowContext;
import io.datafx.controller.flow.context.FlowActionHandler;
import io.datafx.controller.flow.context.ViewFlowContext;
import io.datafx.controller.util.VetoException;
import io.datafx.core.concurrent.ProcessChain;
import javafx.animation.*;
import javafx.beans.binding.Bindings;
@@ -49,10 +46,10 @@ import javafx.scene.layout.HBox;
import javafx.scene.layout.Pane;
import javafx.scene.layout.StackPane;
import javafx.util.Duration;
import lombok.SneakyThrows;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.inject.Inject;
import java.io.File;
import java.util.Arrays;
import java.util.Comparator;
@@ -69,6 +66,9 @@ import java.util.stream.Collectors;
@ViewController("/fxml/login/login.fxml")
public class LoginController {
@ActionHandler
private FlowActionHandler actionHandler;
@FXML
private StackPane rootPane;
@FXML
@@ -122,17 +122,14 @@ public class LoginController {
private Timeline frontTimeLine = new Timeline();
private Timeline backTimeLine = new Timeline();
@ActionHandler
private FlowActionHandler actionHandler;
private SequentialTransition sequentialTransition = new SequentialTransition();
private DoubleProperty imageWidth = new SimpleDoubleProperty();
private DoubleProperty imageHeiht = new SimpleDoubleProperty();
@Inject
private Session session;
// @Inject
// private WebSocketManagement webSocketManagement;
@FXML
@ActionTrigger("login")
@@ -140,8 +137,6 @@ public class LoginController {
@FXML
private JFXButton registeredBut;
@FXMLViewFlowContext
private ViewFlowContext flowContext;
@PostConstruct
public void init() {
@@ -209,6 +204,9 @@ public class LoginController {
translateTransition
);
parallelTransition.setCycleCount(1);
parallelTransition.setOnFinished(event -> {
userNameTextField.requestFocus();
});
parallelTransition.play();
@@ -255,6 +253,7 @@ public class LoginController {
pt.setLly(height + Math.cos(t) * back);
}
@SneakyThrows
private void loadingImage() {
ImageView logBack = new ImageView("/images/login.jpg");
@@ -262,7 +261,9 @@ public class LoginController {
logBack.fitWidthProperty().bind(imageWidth);
imagePane.getChildren().add(new Label("", logBack));
List<File> files = Arrays.asList(new File(this.getClass().getResource("/images/login/").getPath()).listFiles());
String imgUrl=this.getClass().getClassLoader().getResource("").toURI().getPath()+"images/login";
System.err.println(imgUrl);
List<File> files = Arrays.asList(new File(imgUrl).listFiles());
sequentialTransition.setAutoReverse(true);
sequentialTransition.setCycleCount(Timeline.INDEFINITE);
@@ -403,7 +404,16 @@ public class LoginController {
centerPane.setDisable(true);
loginBut.setText("正在登录...");
})
.addSupplierInExecutor(() -> Request.connector(LoginFeign.class).login(jwtAuthenticationRequest))
.addSupplierInExecutor(() -> {
ObjectRestResponse<String> rel = Request.connector(LoginFeign.class).login(jwtAuthenticationRequest);
if (rel.getStatus() == 200) {
WSClient.getInstance().addHeader("Authorization", rel.getData());
WSClient.getInstance().addHeader("userName",userNameTextField.getText());
WSClient.getInstance().connect();
}
return rel;
})
.addConsumerInPlatformThread(rel -> {
if (rel.getStatus() == 200) {
@@ -432,10 +442,12 @@ public class LoginController {
public void loadApplicatonStore() {
ProcessChain.create()
.addRunnableInPlatformThread(() -> {
try {
actionHandler.navigate(LoadingController.class);
} catch (Exception e) {
throw new RuntimeException(e);
e.printStackTrace();
}
ApplicatonStore.setName("");
ApplicatonStore.getAllMenu().clear();
@@ -473,6 +485,7 @@ public class LoginController {
.addConsumerInPlatformThread(rel -> {
ApplicatonStore.getPermissionMenus().addAll(rel);
})
.addSupplierInExecutor(() -> {
@@ -507,6 +520,7 @@ public class LoginController {
try {
actionHandler.navigate(MainController.class);
} catch (Exception e) {
throw new RuntimeException(e);
}
@@ -515,9 +529,7 @@ public class LoginController {
e.printStackTrace();
try {
actionHandler.navigate(LoginController.class);
} catch (VetoException vetoException) {
vetoException.printStackTrace();
} catch (FlowException flowException) {
} catch (Exception flowException) {
flowException.printStackTrace();
}
})

View File

@@ -1,19 +1,18 @@
package com.epri.fx.client.gui.uicomponents.main;
package com.fx.client.gui.uicomponents.main;
import com.epri.fx.client.AppStartup;
import com.epri.fx.client.bean.MenuVoCell;
import com.epri.fx.client.gui.feature.FeatureResourceConsumer;
import com.epri.fx.client.gui.uicomponents.home.HomeController;
import com.epri.fx.client.gui.uicomponents.login.LoginController;
import com.epri.fx.client.gui.uicomponents.main.components.UserInfoController;
import com.epri.fx.client.store.ApplicatonStore;
import com.epri.fx.server.vo.MenuVO;
import com.jfoenix.assets.JFoenixResources;
import com.fx.client.AppStartup;
import com.fx.client.bean.MenuVoCell;
import com.fx.client.gui.feature.FeatureResourceConsumer;
import com.fx.client.gui.uicomponents.home.HomeController;
import com.fx.client.gui.uicomponents.login.LoginController;
import com.fx.client.gui.uicomponents.main.components.UserInfoController;
import com.fx.client.store.ApplicatonStore;
import com.fx.client.websocket.WSClient;
import com.fx.server.vo.MenuVO;
import com.jfoenix.controls.*;
import com.jfoenix.svg.SVGGlyphLoader;
import io.datafx.controller.ViewController;
import io.datafx.controller.context.ApplicationContext;
import io.datafx.controller.context.FXMLApplicationContext;
import io.datafx.controller.flow.Flow;
import io.datafx.controller.flow.FlowException;
import io.datafx.controller.flow.FlowHandler;
@@ -31,6 +30,8 @@ import io.datafx.eventsystem.EventTrigger;
import io.datafx.eventsystem.OnEvent;
import javafx.animation.Transition;
import javafx.beans.property.ListProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.geometry.Insets;
@@ -61,13 +62,10 @@ import java.util.HashMap;
@ViewController("/fxml/main/main.fxml")
public class MainController {
@FXMLApplicationContext
private ApplicationContext context;
private ObjectProperty<MenuVO> selectItemProperty = new SimpleObjectProperty<>();
@ActionHandler
private FlowActionHandler actionHandler;
@FXML
private StackPane rootPane;
@FXML
@@ -87,7 +85,7 @@ public class MainController {
private JFXButton homeButton;
@FXML
@ActionTrigger("showSkinPane")
private JFXToggleButton styleBut;
private JFXToggleNode styleNode;
//刷新按钮
@FXML
@EventTrigger("refresh")
@@ -104,7 +102,7 @@ public class MainController {
@ActionTrigger("userInfo")
private JFXButton userButton;
@FXML
private JFXButton rolesBut;
private JFXButton bellButton;
@FXML
@@ -131,6 +129,8 @@ public class MainController {
@PostConstruct
public void init() throws FlowException {
ApplicationContext.getInstance().register(this, MainController.class);
rootPane.getChildren().removeAll(navigationList);
rootPane.getChildren().removeAll(leftDrawer);
rootPane.getChildren().removeAll(tabPane);
@@ -140,13 +140,15 @@ public class MainController {
try {
homeButton.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".home-outline"));
refreshButton.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".shuaxin1"));
rolesBut.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".admin"));
bellButton.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".cc-bell-o"));
userButton.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".ChevronDownCircle"));
styleNode.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".moon-fill"));
} catch (Exception e) {
e.printStackTrace();
}
datePicker.setEditable(false);
datePicker.valueProperty().addListener((observable, oldValue, newValue) ->{
datePicker.valueProperty().addListener((observable, oldValue, newValue) -> {
refreshButton.fire();
});
leftDrawer.setSidePane(navigationList);
@@ -172,15 +174,35 @@ public class MainController {
});
tabPane.setTabClosingPolicy(TabPane.TabClosingPolicy.ALL_TABS);
tabPane.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
Object value = newValue.getUserData();
for (Object item : navigationList.getItems()) {
if (item instanceof MenuVO) {
if (item == value) {
navigationList.getSelectionModel().select(value);
break;
}
} else if (item instanceof JFXListView) {
JFXListView<MenuVO> jfxListView = (JFXListView<MenuVO>) item;
for (MenuVO menuVO : jfxListView.getItems()) {
if (menuVO == value) {
navigationList.getSelectionModel().select(2);
jfxListView.getSelectionModel().select(menuVO);
break;
}
}
}
}
});
drawersStack.setContent(tabPane);
drawersStack.toggle(leftDrawer);
drawersStack.setEffect(null);
try {
addTab("主页", SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".home-outline"), HomeController.class);
} catch (Exception e) {
e.printStackTrace();
}
styleBut.selectedProperty().bindBidirectional(ApplicatonStore.styleProperty());
styleNode.selectedProperty().bindBidirectional(ApplicatonStore.styleProperty());
featureResourceConsumer.consumeResource(this);
navigationList.setCellFactory(listView -> new JFXListCell<Object>() {
@@ -206,13 +228,14 @@ public class MainController {
navigationList.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
if (newValue instanceof MenuVO) {
try {
addTab(((MenuVO) newValue).getTitle(), SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + "." + ((MenuVO) newValue).getIcon()), Class.forName(((MenuVO) newValue).getHref()));
addTab(((MenuVO) newValue).getTitle(), SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + "." + ((MenuVO) newValue).getIcon()), Class.forName(((MenuVO) newValue).getHref()), newValue);
} catch (Exception e) {
e.printStackTrace();
}
}
});
navigationList.depthProperty().setValue(0);
navigationList.expandedProperty().set(true);
initData();
@@ -220,6 +243,7 @@ public class MainController {
private JFXPopup getPopOver() {
if (popOver == null) {
try {
popOver = new JFXPopup(new Flow(UserInfoController.class).start());
} catch (FlowException e) {
@@ -235,7 +259,6 @@ public class MainController {
}
private void initData() {
ListProperty<MenuVoCell> listProperty = ApplicatonStore.getMenuVoCells();
@@ -260,7 +283,7 @@ public class MainController {
listView.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
if (newValue instanceof MenuVO) {
try {
addTab(newValue.getTitle(), SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + "." + newValue.getIcon()), Class.forName(newValue.getHref()));
addTab(newValue.getTitle(), SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + "." + newValue.getIcon()), Class.forName(newValue.getHref()), newValue);
} catch (Exception e) {
e.printStackTrace();
}
@@ -298,7 +321,7 @@ public class MainController {
}
}
navigationList.getSelectionModel().select(0);
}
@@ -309,8 +332,8 @@ public class MainController {
* @auther: liwen
* @date: 2020/6/28 9:57 上午
*/
private <T> void addTab(String title, Node icon, Class<T> controllerClass) {
addTab(title, icon, new Flow(controllerClass));
public <T> void addTab(String title, Node icon, Class<T> controllerClass, Object userData) {
addTab(title, icon, new Flow(controllerClass), userData);
}
/**
@@ -320,13 +343,14 @@ public class MainController {
* @auther: liwen
* @date: 2020/6/28 9:57 上午
*/
private <T> void addTab(String title, Node icon, Flow flow) {
public <T> void addTab(String title, Node icon, Flow flow, Object userData) {
FlowHandler flowHandler = flow.createHandler();
Tab tab = tabsMap.get(title);
if (tab == null) {
tab = new Tab(title);
tab.setUserData(userData);
tab.setGraphic(icon);
try {
@@ -363,7 +387,7 @@ public class MainController {
@ActionMethod("goHome")
private void goHome() {
try {
addTab("主页", SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".home-outline"), HomeController.class);
addTab("主页", SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".home-outline"), HomeController.class, null);
} catch (Exception e) {
e.printStackTrace();
}
@@ -372,6 +396,8 @@ public class MainController {
@ActionMethod("userInfo")
private void userInfo() throws VetoException, FlowException {
getPopOver().show(userButton, JFXPopup.PopupVPosition.TOP, JFXPopup.PopupHPosition.RIGHT, 0, userButton.getHeight());
}
@@ -380,14 +406,24 @@ public class MainController {
ProcessChain.create().addRunnableInPlatformThread(() -> {
String style1 = AppStartup.class.getResource("/css/app-light.css").toExternalForm();
String style2 = AppStartup.class.getResource("/css/app-dark.css").toExternalForm();
if (styleBut.isSelected()) {
styleBut.setText("明亮");
styleBut.getScene().getStylesheets().removeAll(style1);
styleBut.getScene().getStylesheets().addAll(style2);
if (styleNode.isSelected()) {
try {
styleNode.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".taiyang"));
} catch (Exception e) {
e.printStackTrace();
}
styleNode.getScene().getStylesheets().removeAll(style1);
styleNode.getScene().getStylesheets().addAll(style2);
} else {
styleBut.setText("黑暗");
styleBut.getScene().getStylesheets().removeAll(style2);
styleBut.getScene().getStylesheets().addAll(style1);
try {
styleNode.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".moon-fill"));
} catch (Exception e) {
e.printStackTrace();
}
styleNode.getScene().getStylesheets().removeAll(style2);
styleNode.getScene().getStylesheets().addAll(style1);
}
}).run();
@@ -396,7 +432,6 @@ public class MainController {
@PreDestroy
public void destroy() {
}
/**
@@ -417,6 +452,7 @@ public class MainController {
} catch (FlowException e) {
e.printStackTrace();
}
WSClient.getInstance().close();
}

View File

@@ -1,4 +1,4 @@
package com.epri.fx.client.gui.uicomponents.main.components;
package com.fx.client.gui.uicomponents.main.components;
import io.datafx.controller.ViewController;

View File

@@ -1,6 +1,6 @@
package com.epri.fx.client.gui.uicomponents.main.components;
package com.fx.client.gui.uicomponents.main.components;
import com.epri.fx.client.store.ApplicatonStore;
import com.fx.client.store.ApplicatonStore;
import com.jfoenix.controls.JFXListView;
import io.datafx.controller.ViewController;
import io.datafx.eventsystem.EventProducer;

View File

@@ -0,0 +1,284 @@
package com.fx.client.gui.uicomponents.monitor.onlineuser;
import com.fx.client.model.OnlineUserDataModel;
import com.fx.client.request.Request;
import com.fx.client.request.feign.admin.UserFeign;
import com.fx.client.store.ApplicatonStore;
import com.fx.client.utils.Pinyin4jUtil;
import com.fx.server.entity.log.SysLoginInfor;
import com.fx.server.util.DateUtils;
import com.jfoenix.controls.JFXButton;
import com.jfoenix.controls.JFXSnackbar;
import com.jfoenix.controls.JFXSnackbarLayout;
import com.jfoenix.controls.JFXSpinner;
import com.jfoenix.svg.SVGGlyphLoader;
import io.datafx.controller.ViewController;
import io.datafx.controller.flow.action.ActionMethod;
import io.datafx.controller.flow.action.ActionTrigger;
import io.datafx.core.concurrent.ProcessChain;
import javafx.collections.transformation.FilteredList;
import javafx.fxml.FXML;
import javafx.scene.control.*;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.util.Callback;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import java.util.Date;
/**
* @description:
* @className: OnlineUserController
* @author: liwen
* @date: 2021/1/1 13:24
*/
@ViewController(value = "/fxml/monitor/onlineuser/online_user.fxml", title = "在线用户")
public class OnlineUserController {
@FXML
private StackPane rootPane;
@FXML
private VBox contentPane;
@FXML
private TextField userNameTextField;
@FXML
private TextField ipTextfiled;
@FXML
private TableView<SysLoginInfor> tableView;
@FXML
private JFXSpinner spinner;
@FXML
@ActionTrigger("rest")
private Button restButton;
@FXML
@ActionTrigger("search")
private Button searchButton;
@FXML
private TableColumn<SysLoginInfor, String> numberColumn;
@FXML
private TableColumn<SysLoginInfor, String> sessionNumberColumn;
@FXML
private TableColumn<SysLoginInfor, String> loginNameColumn;
@FXML
private TableColumn<SysLoginInfor, String> ipaddrColumn;
@FXML
private TableColumn<SysLoginInfor, String> sessionStatusColumn;
@FXML
private TableColumn<SysLoginInfor, Date> loginTimeColumn;
@FXML
private TableColumn<SysLoginInfor, String> optColumn;
@Inject
private OnlineUserDataModel onlineUserDataModel;
private JFXSnackbar snackbar;
@PostConstruct
private void init() {
spinner.setVisible(false);
snackbar = new JFXSnackbar(rootPane);
snackbar.setPrefWidth(500);
numberColumn.setCellFactory((col) -> {
TableCell<SysLoginInfor, String> cell = new TableCell<SysLoginInfor, String>() {
@Override
public void updateItem(String item, boolean empty) {
super.updateItem(item, empty);
this.setText(null);
this.setGraphic(null);
if (!empty) {
int rowIndex = this.getIndex() + 1;
this.setText(String.valueOf(rowIndex));
}
}
};
return cell;
});
sessionNumberColumn.setCellValueFactory(new PropertyValueFactory<>("infoId"));
loginNameColumn.setCellValueFactory(new PropertyValueFactory<>("loginName"));
ipaddrColumn.setCellValueFactory(new PropertyValueFactory<>("ipaddr"));
sessionStatusColumn.setCellValueFactory(new PropertyValueFactory<>("status"));
sessionStatusColumn.setCellFactory(col -> {
TableCell<SysLoginInfor, String> cell = new TableCell<SysLoginInfor, String>() {
private Label label = new Label("");
@Override
protected void updateItem(String item, boolean empty) {
super.updateItem(item, empty);
this.setText(null);
this.setGraphic(null);
if (!empty) {
if (item.equals("0")) {
label.setId("status-success-label");
label.setText("在线");
} else {
label.setId("status-error-label");
label.setText("离线");
}
setGraphic(label);
}
}
};
return cell;
});
loginTimeColumn.setCellValueFactory(new PropertyValueFactory<>("loginTime"));
loginTimeColumn.setCellFactory(col -> {
TableCell<SysLoginInfor, Date> cell = new TableCell<SysLoginInfor, Date>() {
@Override
protected void updateItem(Date item, boolean empty) {
super.updateItem(item, empty);
this.setText(null);
this.setGraphic(null);
if (!empty && item != null) {
setText(DateUtils.formatDate(item, DateUtils.DATETIME_FORMAT));
}
}
};
return cell;
});
Callback<TableColumn<SysLoginInfor, String>, TableCell<SysLoginInfor, String>> cellFactory = new Callback<TableColumn<SysLoginInfor, String>, TableCell<SysLoginInfor, String>>() {
@Override
public TableCell<SysLoginInfor, String> call(TableColumn param) {
final TableCell<SysLoginInfor, String> cell = new TableCell<SysLoginInfor, String>() {
private final JFXButton retreatBut = new JFXButton("强退");
{
retreatBut.setStyle("-fx-background-color: #e63c53");
try {
retreatBut.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".tuichu"));
} catch (Exception e) {
e.printStackTrace();
}
retreatBut.setOnAction(event -> {
tableView.getSelectionModel().select(getIndex());
retreat();
});
}
@Override
protected void updateItem(String item, boolean empty) {
super.updateItem(item, empty);
if (empty) {
setGraphic(null);
} else {
setGraphic(retreatBut);
}
}
};
return cell;
}
};
optColumn.setCellFactory(cellFactory);
FilteredList<SysLoginInfor> filteredData = new FilteredList<>(onlineUserDataModel.getOnlineUsers(), p -> true);
tableView.setItems(filteredData);
userNameTextField.textProperty().addListener((o, oldVal, newVal) -> {
filteredData.setPredicate(elementProp -> {
if (newVal == null || newVal.isEmpty()) {
return true;
}
String val = Pinyin4jUtil.toPinYinLowercase(newVal);
return Pinyin4jUtil.toPinYinLowercase(elementProp.getLoginName()).contains(val);
});
});
ipTextfiled.textProperty().addListener((o, oldVal, newVal) -> {
filteredData.setPredicate(elementProp -> {
if (newVal == null || newVal.isEmpty()) {
return true;
}
String val = Pinyin4jUtil.toPinYinLowercase(newVal);
return Pinyin4jUtil.toPinYinLowercase(elementProp.getIpaddr()).contains(val);
});
});
onlineUserDataModel.selectedIndexProperty().bind(tableView.getSelectionModel().selectedIndexProperty());
query();
}
private void query() {
ProcessChain.create()
.addRunnableInPlatformThread(() -> {
onlineUserDataModel.getOnlineUsers().clear();
spinner.setVisible(true);
contentPane.setDisable(true);
})
.addSupplierInExecutor(
() -> Request.connector(UserFeign.class).getOnlineUsers()
)
.addConsumerInPlatformThread(result -> {
onlineUserDataModel.getOnlineUsers().addAll(result);
})
.withFinal(() -> {
spinner.setVisible(false);
contentPane.setDisable(false);
})
.onException(e -> e.printStackTrace())
.run();
}
@ActionMethod("search")
private void search() {
query();
}
@ActionMethod("rest")
private void rest() {
userNameTextField.setText("");
ipTextfiled.setText("");
searchButton.fire();
}
/**
* @Description:强退
* @param: []
* @return: void
* @auther: liwen
* @date: 2021/1/4 4:38 下午
*/
private void retreat() {
ProcessChain.create()
.addSupplierInExecutor(
() -> Request.connector(UserFeign.class).retreat(onlineUserDataModel.getOnlineUsers().get(onlineUserDataModel.getSelectedIndex()).getLoginName())
)
.addConsumerInPlatformThread(result -> {
if (result.isRel() == true) {
snackbar.fireEvent(new JFXSnackbar.SnackbarEvent(new JFXSnackbarLayout("强退成功! ")));
query();
}
})
.withFinal(() -> {
spinner.setVisible(false);
contentPane.setDisable(false);
})
.onException(e -> {
e.printStackTrace();
snackbar.fireEvent(new JFXSnackbar.SnackbarEvent(new JFXSnackbarLayout("强退失败! ")));
})
.run();
}
}

View File

@@ -0,0 +1,494 @@
package com.fx.client.gui.uicomponents.monitor.quartz;
import com.fx.client.gui.uicomponents.main.MainController;
import com.fx.client.model.SysJobDataModel;
import com.fx.client.request.Request;
import com.fx.client.request.feign.admin.SysJobFeign;
import com.fx.client.store.ApplicatonStore;
import com.fx.client.utils.Pinyin4jUtil;
import com.fx.server.entity.SysJob;
import com.jfoenix.controls.*;
import com.jfoenix.svg.SVGGlyphLoader;
import io.datafx.controller.ViewController;
import io.datafx.controller.context.ApplicationContext;
import io.datafx.controller.flow.action.ActionMethod;
import io.datafx.controller.flow.action.ActionTrigger;
import io.datafx.core.concurrent.ProcessChain;
import javafx.collections.transformation.FilteredList;
import javafx.fxml.FXML;
import javafx.geometry.Pos;
import javafx.scene.control.*;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.StackPane;
import javafx.stage.Modality;
import javafx.stage.Stage;
import org.apache.commons.lang3.StringUtils;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import java.util.*;
/**
* @description:
* @className: JobController
* @author: liwen
* @date: 2020/12/25 09:28
*/
@ViewController(value = "/fxml/monitor/quartz/job.fxml", title = "定时任务")
public class SysJobController {
@FXML
private JFXDialog dialog;
@FXML
private Label dialogTitle;
@FXML
private JFXTextField jobNameTextField;
@FXML
private JFXComboBox jobGroupNameComboBox;
@FXML
private JFXTextField jobClassTextField;
@FXML
private JFXTextField jobTimeTextField;
@FXML
private JFXTextField searchField;
@FXML
private JFXTextField parameterTextField;
@FXML
private JFXTextArea detailedTextArea;
@FXML
private JFXComboBox jobGroupComboBox;
@FXML
private JFXComboBox jobStatusCommboBox;
@FXML
@ActionTrigger("updateJob")
private JFXButton updateButton;
@FXML
@ActionTrigger("showJobLog")
private JFXButton jobLogButton;
@FXML
@ActionTrigger("saveJob")
private JFXButton saveButton;
@FXML
@ActionTrigger("closeDialog")
private JFXButton cancelButton;
@FXML
private StackPane rootPane;
@FXML
private GridPane jobDetailPane;
@FXML
private HBox operatButPane;
@FXML
@ActionTrigger("showAddJobDialog")
private JFXButton addJobButton;
@FXML
@ActionTrigger("restSearch")
private JFXButton resetButton;
@FXML
@ActionTrigger("search")
private JFXButton searchButton;
@FXML
private TableView tableView;
@FXML
private TableColumn<SysJob, Integer> jobIdColumn;
@FXML
private TableColumn<SysJob, String> jobNameColumn;
@FXML
private TableColumn<SysJob, String> jobGroupNameColumn;
@FXML
private TableColumn<SysJob, Class> jobClassColumn;
@FXML
private TableColumn<SysJob, String> jobTimeColumn;
@FXML
private TableColumn<SysJob, Map> jobDataColumn;
@FXML
private TableColumn<SysJob, String> jobStatusColumn;
@FXML
private TableColumn<SysJob, String> operatingColumn;
private JFXSnackbar snackbar;
@Inject
private SysJobDataModel sysJobDataModel;
private FilteredList<SysJob> filteredData;
@PostConstruct
private void init() {
updateButton.visibleProperty().bind(saveButton.visibleProperty().not());
updateButton.managedProperty().bind(updateButton.visibleProperty());
saveButton.managedProperty().bind(saveButton.visibleProperty());
snackbar = new JFXSnackbar(rootPane);
snackbar.setPrefWidth(500);
operatingColumn.setCellFactory(col -> {
TableCell<SysJob, String> cell = new TableCell<SysJob, String>() {
private final ToggleButton editBut = new ToggleButton();
private final ToggleButton detailsBut = new ToggleButton();
private final ToggleButton playBut = new ToggleButton();
private final ToggleButton logBut = new ToggleButton();
private final ToggleButton delBut = new ToggleButton();
private HBox hBox = new HBox(editBut, detailsBut, playBut, logBut, delBut);
{
editBut.setTooltip(new Tooltip("编辑"));
detailsBut.setTooltip(new Tooltip("查看详细"));
playBut.setTooltip(new Tooltip("立即执行一次"));
logBut.setTooltip(new Tooltip("调度日志"));
delBut.setTooltip(new Tooltip("删除"));
editBut.getStyleClass().add("left-pill");
detailsBut.getStyleClass().add("center-pill");
playBut.getStyleClass().add("center-pill");
logBut.getStyleClass().add("center-pill");
delBut.getStyleClass().add("right-pill");
try {
editBut.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".create-outline"));
detailsBut.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".chakan-copy"));
playBut.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".zhihing"));
logBut.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".diaodurizhi-copy"));
delBut.setGraphic(SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".trash-outline"));
} catch (Exception e) {
e.printStackTrace();
}
editBut.setOnAction(event -> {
tableView.getSelectionModel().select(getIndex());
showEditJobDialog();
});
delBut.setOnAction(event -> {
tableView.getSelectionModel().select(getIndex());
deleteJob();
});
detailsBut.setOnAction(event -> {
tableView.getSelectionModel().select(getIndex());
showJobDialog();
});
playBut.setOnAction(event -> {
tableView.getSelectionModel().select(getIndex());
runJob();
});
}
@Override
protected void updateItem(String item, boolean empty) {
super.updateItem(item, empty);
if (empty) {
setGraphic(null);
} else {
hBox.setSpacing(0);
hBox.setAlignment(Pos.CENTER);
setGraphic(hBox);
}
}
};
return cell;
});
jobIdColumn.setCellFactory(col -> {
TableCell<SysJob, Integer> cell = new TableCell<SysJob, Integer>() {
@Override
protected void updateItem(Integer item, boolean empty) {
super.updateItem(item, empty);
this.setText(null);
this.setGraphic(null);
if (!empty) {
setText((getIndex() + 1) + "");
}
}
};
return cell;
});
jobNameColumn.setCellValueFactory(new PropertyValueFactory<>("jobName"));
jobGroupNameColumn.setCellValueFactory(new PropertyValueFactory<>("jobGroupName"));
jobClassColumn.setCellValueFactory(new PropertyValueFactory<>("jobClass"));
jobTimeColumn.setCellValueFactory(new PropertyValueFactory<>("jobTime"));
jobDataColumn.setCellValueFactory(new PropertyValueFactory<>("parames"));
jobStatusColumn.setCellValueFactory(new PropertyValueFactory<>("jobStatus"));
jobStatusColumn.setCellFactory(col -> {
TableCell<SysJob, String> cell = new TableCell<SysJob, String>() {
private final JFXToggleButton statusButton = new JFXToggleButton();
{
statusButton.setOnAction(event -> {
tableView.getSelectionModel().select(getIndex());
if (statusButton.isSelected()) {
resumeJob();
} else {
pauseJob();
}
});
}
@Override
protected void updateItem(String item, boolean empty) {
super.updateItem(item, empty);
if (empty) {
setGraphic(null);
} else {
statusButton.setSelected(item.equals("NORMAL") ? true : false);
setGraphic(statusButton);
}
}
};
return cell;
});
sysJobDataModel.selectedPersonIndexProperty().bind(tableView.getSelectionModel().selectedIndexProperty());
filteredData = new FilteredList<>(sysJobDataModel.getSysJobs(), p -> true);
tableView.setItems(filteredData);
searchField.textProperty().addListener((o, oldVal, newVal) -> {
filteredData();
});
jobGroupComboBox.getSelectionModel().select(0);
jobGroupComboBox.getSelectionModel().selectedIndexProperty().addListener((observable, oldValue, newValue) -> {
filteredData();
});
jobStatusCommboBox.getSelectionModel().select(0);
jobStatusCommboBox.getSelectionModel().selectedIndexProperty().addListener((observable, oldValue, newValue) -> {
filteredData();
});
query();
}
private void filteredData() {
String jobName = searchField.getText();
String jobGroup = jobGroupComboBox.getSelectionModel().selectedIndexProperty().getValue() == 0 ? null : (jobGroupComboBox.getSelectionModel().selectedIndexProperty().getValue() == 1 ? "默认" : "系统");
String jobStatus = jobStatusCommboBox.getSelectionModel().selectedIndexProperty().getValue() == 0 ? null : (jobStatusCommboBox.getSelectionModel().selectedIndexProperty().getValue() == 1 ? "NORMAL" : "PAUSED");
filteredData.setPredicate(elementProp -> {
boolean a = false;
boolean b = false;
boolean c = false;
if (StringUtils.isBlank(jobName)) {
a = true;
} else {
a = Pinyin4jUtil.toPinYinLowercase(elementProp.getJobName()).contains(Pinyin4jUtil.toPinYinLowercase(jobName));
}
if (StringUtils.isBlank(jobGroup)) {
b = true;
} else {
b = elementProp.getJobGroupName().toLowerCase().equalsIgnoreCase(jobGroup);
}
if (StringUtils.isBlank(jobStatus)) {
c = true;
} else {
c = elementProp.getJobStatus().toLowerCase().equalsIgnoreCase(jobStatus);
}
return a && b && c;
});
}
@ActionMethod("search")
private void query() {
String jobName = searchField.getText();
String jobGroup = jobGroupComboBox.getSelectionModel().selectedIndexProperty().getValue() == 0 ? null : (jobGroupComboBox.getSelectionModel().selectedIndexProperty().getValue() == 1 ? "默认" : "系统");
String jobStatus = jobStatusCommboBox.getSelectionModel().selectedIndexProperty().getValue() == 0 ? null : (jobStatusCommboBox.getSelectionModel().selectedIndexProperty().getValue() == 1 ? "NORMAL" : "PAUSED");
Map<String, String> map = new HashMap();
map.put("jobName", jobName);
map.put("jobGroup", jobGroup);
map.put("jobStatus", jobStatus);
ProcessChain.create().addRunnableInPlatformThread(() -> {
sysJobDataModel.getSysJobs().clear();
}).addSupplierInExecutor(
() -> Request.connector(SysJobFeign.class).getSysJobAll(map)
).addConsumerInPlatformThread(
rel -> sysJobDataModel.getSysJobs().addAll(rel)
).run();
}
@ActionMethod("showAddJobDialog")
private void showAddJobDialog() {
saveButton.setVisible(true);
dialogTitle.setText("新增定时任务");
dialog.setTransitionType(JFXDialog.DialogTransition.TOP);
operatButPane.setVisible(true);
dialog.show(rootPane);
}
private void showEditJobDialog() {
SysJob sysJob = sysJobDataModel.selectSysJob();
jobNameTextField.setText(sysJob.getJobName());
jobGroupNameComboBox.getSelectionModel().select(sysJob.getJobGroupName());
jobTimeTextField.setText(sysJob.getJobTime());
jobClassTextField.setText(sysJob.getJobClass());
detailedTextArea.setText(sysJob.getDescription());
parameterTextField.setText(sysJob.getParames());
operatButPane.setVisible(true);
saveButton.setVisible(false);
dialogTitle.setText("编辑定时任务");
dialog.setTransitionType(JFXDialog.DialogTransition.TOP);
dialog.show(rootPane);
}
private void showJobDialog() {
SysJob sysJob = sysJobDataModel.selectSysJob();
jobNameTextField.setText(sysJob.getJobName());
jobGroupNameComboBox.getSelectionModel().select(sysJob.getJobGroupName());
jobTimeTextField.setText(sysJob.getJobTime());
jobClassTextField.setText(sysJob.getJobClass());
detailedTextArea.setText(sysJob.getDescription());
parameterTextField.setText(sysJob.getParames());
operatButPane.setVisible(false);
dialogTitle.setText("任务详情");
dialog.setTransitionType(JFXDialog.DialogTransition.TOP);
dialog.show(rootPane);
}
@ActionMethod("closeDialog")
private void closeDialog() {
dialog.close();
}
@ActionMethod("saveJob")
private void saveJob() {
SysJob sysJob = new SysJob();
sysJob.setJobName(jobNameTextField.getText());
sysJob.setJobGroupName(jobGroupNameComboBox.getSelectionModel().getSelectedIndex() == 0 ? "默认" : "系统");
sysJob.setJobTime(jobTimeTextField.getText());
sysJob.setJobClass(jobClassTextField.getText());
String parames = parameterTextField.getText();
sysJob.setParames(parames);
ProcessChain.create().addSupplierInExecutor(
() -> Request.connector(SysJobFeign.class).addJob(sysJob)
).addConsumerInPlatformThread(rel -> {
if (rel == 0) {
snackbar.fireEvent(new JFXSnackbar.SnackbarEvent(new JFXSnackbarLayout("添加成功! ")));
}
query();
}).withFinal(() -> dialog.close()).run();
}
@ActionMethod("updateJob")
private void updateJob() {
SysJob sysJob = new SysJob();
sysJob.setJobName(jobNameTextField.getText());
sysJob.setJobGroupName(jobGroupNameComboBox.getSelectionModel().getSelectedIndex() == 0 ? "默认" : "系统");
sysJob.setJobTime(jobTimeTextField.getText());
sysJob.setJobClass(jobClassTextField.getText());
sysJob.setDescription(detailedTextArea.getText());
sysJob.setParames(parameterTextField.getText());
ProcessChain.create().addSupplierInExecutor(
() -> Request.connector(SysJobFeign.class).updateJob(sysJob)
).addConsumerInPlatformThread(rel -> {
if (rel == 0) {
snackbar.fireEvent(new JFXSnackbar.SnackbarEvent(new JFXSnackbarLayout("更新成功! ")));
}
}).withFinal(() -> dialog.close()).run();
}
@ActionMethod("showJobLog")
private void showJobLog() {
MainController mainController = ApplicationContext.getInstance().getRegisteredObject(MainController.class);
try {
mainController.addTab("调度日志", SVGGlyphLoader.getIcoMoonGlyph(ApplicatonStore.ICON_FONT_KEY + ".diaodurizhi-copy"), SysJobLogController.class,null);
} catch (Exception e) {
e.printStackTrace();
}
}
@ActionMethod("restSearch")
private void restSearch() {
searchField.setText("");
jobStatusCommboBox.getSelectionModel().select(0);
jobGroupComboBox.getSelectionModel().select(0);
query();
}
private void runJob() {
ProcessChain.create()
.addSupplierInExecutor(() -> Request.connector(SysJobFeign.class).runJob(sysJobDataModel.selectSysJob().getJobName(), sysJobDataModel.selectSysJob().getJobGroupName()))
.addConsumerInPlatformThread(rel -> {
if (rel == 0) {
snackbar.fireEvent(new JFXSnackbar.SnackbarEvent(new JFXSnackbarLayout("执行成功! ")));
}
}).withFinal(() -> {
}).onException(e -> e.printStackTrace())
.run();
}
private void pauseJob() {
ProcessChain.create()
.addSupplierInExecutor(() -> Request.connector(SysJobFeign.class).pauseJob(sysJobDataModel.selectSysJob().getJobName(), sysJobDataModel.selectSysJob().getJobGroupName()))
.addConsumerInPlatformThread(rel -> {
if (rel == 0) {
snackbar.fireEvent(new JFXSnackbar.SnackbarEvent(new JFXSnackbarLayout("执行成功! ")));
}
}).withFinal(() -> {
}).onException(e -> e.printStackTrace())
.run();
}
private void resumeJob() {
ProcessChain.create()
.addSupplierInExecutor(() -> Request.connector(SysJobFeign.class).resumeJob(sysJobDataModel.selectSysJob().getJobName(), sysJobDataModel.selectSysJob().getJobGroupName()))
.addConsumerInPlatformThread(rel -> {
if (rel == 0) {
snackbar.fireEvent(new JFXSnackbar.SnackbarEvent(new JFXSnackbarLayout("执行成功! ")));
}
}).withFinal(() -> {
}).onException(e -> e.printStackTrace())
.run();
}
private void deleteJob() {
JFXAlert alert = new JFXAlert((Stage) rootPane.getScene().getWindow());
alert.initModality(Modality.APPLICATION_MODAL);
alert.setOverlayClose(false);
JFXDialogLayout layout = new JFXDialogLayout();
layout.setHeading(new Label("消息提示"));
layout.setBody(new Label("确实删除【" + sysJobDataModel.selectSysJob().getJobName() + "】吗?"));
JFXButton closeButton = new JFXButton("取消");
closeButton.setOnAction(event -> alert.hideWithAnimation());
JFXButton determineButton = new JFXButton("确定");
determineButton.setOnAction(event -> {
alert.hideWithAnimation();
ProcessChain.create()
.addSupplierInExecutor(() -> Request.connector(SysJobFeign.class).deleteJob(sysJobDataModel.selectSysJob().getJobName(), sysJobDataModel.selectSysJob().getJobGroupName()))
.addConsumerInPlatformThread(rel -> {
if (rel == 0) {
query();
}
}).withFinal(() -> {
}).onException(e -> e.printStackTrace())
.run();
});
layout.setActions(closeButton, determineButton);
alert.setContent(layout);
alert.show();
}
}

View File

@@ -0,0 +1,289 @@
package com.fx.client.gui.uicomponents.monitor.quartz;
import com.fx.client.model.SysJobLogModel;
import com.fx.client.request.Request;
import com.fx.client.request.feign.admin.SysJobFeign;
import com.fx.client.utils.Pinyin4jUtil;
import com.fx.server.entity.log.SysJobLog;
import com.fx.server.util.DateUtils;
import com.jfoenix.controls.JFXButton;
import com.jfoenix.controls.JFXComboBox;
import com.jfoenix.controls.JFXDatePicker;
import com.jfoenix.controls.JFXSpinner;
import io.datafx.controller.ViewController;
import io.datafx.controller.flow.action.ActionMethod;
import io.datafx.controller.flow.action.ActionTrigger;
import io.datafx.core.concurrent.ProcessChain;
import io.datafx.eventsystem.Event;
import io.datafx.eventsystem.OnEvent;
import javafx.collections.transformation.FilteredList;
import javafx.fxml.FXML;
import javafx.scene.Node;
import javafx.scene.control.*;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.util.Callback;
import javafx.util.StringConverter;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.inject.Inject;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @description:
* @className: JobController
* @author: liwen
* @date: 2020/12/25 09:28
*/
@ViewController(value = "/fxml/monitor/quartz/job_log.fxml", title = "调度日志")
public class SysJobLogController {
@FXML
private StackPane root;
@FXML
private VBox centPane;
@FXML
private JFXSpinner spinner;
@FXML
private TextField jobNameField;
@FXML
private JFXComboBox jobGroupComboBox;
@FXML
private JFXComboBox jobStatusComboBox;
@FXML
private JFXDatePicker beginDatePicker;
@FXML
private JFXDatePicker endDatePicker;
@FXML
@ActionTrigger("search")
private Button searchButton;
@FXML
@ActionTrigger("reset")
private Button resetButton;
@FXML
private Pagination pagination;
@FXML
private TableView<SysJobLog> tableView;
@FXML
private TableColumn<SysJobLog, String> sysJobNumberColumn;
@FXML
private TableColumn<SysJobLog, String> jobNameColumn;
@FXML
private TableColumn<SysJobLog, String> jobGroupColumn;
@FXML
private TableColumn<SysJobLog, String> jobClassColumn;
@FXML
private TableColumn<SysJobLog, String> jobInfoColumn;
@FXML
private TableColumn<SysJobLog, String> jobStatusColumn;
@FXML
private TableColumn<SysJobLog, Date> createTimeColumn;
@FXML
private TableColumn<SysJobLog, String> optIpColumn;
@Inject
private SysJobLogModel logModel;
private StringConverter<Date> dateConverter = new StringConverter<Date>() {
@Override
public String toString(Date date) {
if (date == null) {
return "";
}
return DateUtils.formatDate(date, DateUtils.DATETIME_FORMAT);
}
@Override
public Date fromString(String string) {
return DateUtils.parseDate(string);
}
};
@PostConstruct
public void init() {
spinner.setVisible(false);
jobGroupComboBox.getSelectionModel().select(0);
jobStatusComboBox.getSelectionModel().select(0);
sysJobNumberColumn.setCellValueFactory(new PropertyValueFactory<>("jobLogId"));
jobNameColumn.setCellValueFactory(new PropertyValueFactory<>("jobName"));
jobGroupColumn.setCellValueFactory(new PropertyValueFactory<>("jobGroup"));
jobClassColumn.setCellValueFactory(new PropertyValueFactory<>("invokeTarget"));
jobInfoColumn.setCellValueFactory(new PropertyValueFactory<>("jobMessage"));
jobStatusColumn.setCellValueFactory(new PropertyValueFactory<>("status"));
jobStatusColumn.setCellFactory(col -> {
TableCell<SysJobLog, String> cell = new TableCell<SysJobLog, String>() {
private Label label = new Label("");
@Override
protected void updateItem(String item, boolean empty) {
super.updateItem(item, empty);
this.setText(null);
this.setGraphic(null);
if (!empty) {
if (item.equals("0")) {
label.setId("status-success-label");
label.setText("成功");
} else {
label.setId("status-error-label");
label.setText("失败");
}
setGraphic(label);
}
}
};
return cell;
});
createTimeColumn.setCellValueFactory(new PropertyValueFactory<>("createTime"));
createTimeColumn.setCellFactory(col -> {
TableCell<SysJobLog, Date> cell = new TableCell<SysJobLog, Date>() {
@Override
protected void updateItem(Date item, boolean empty) {
super.updateItem(item, empty);
this.setText(null);
this.setGraphic(null);
if (!empty && item != null) {
setText(dateConverter.toString(item));
}
}
};
return cell;
});
optIpColumn.setCellFactory(col -> {
TableCell<SysJobLog, String> cell = new TableCell<SysJobLog, String>() {
private JFXButton button = new JFXButton("详细");
@Override
protected void updateItem(String item, boolean empty) {
super.updateItem(item, empty);
this.setText(null);
this.setGraphic(null);
if (!empty) {
setGraphic(button);
}
}
};
return cell;
});
FilteredList<SysJobLog> filteredData = new FilteredList<>(logModel.getSysJobLogs(), p -> true);
tableView.setItems(filteredData);
jobNameField.textProperty().addListener((o, oldVal, newVal) -> {
filteredData.setPredicate(elementProp -> {
if (newVal == null || newVal.isEmpty()) {
return true;
}
String val = Pinyin4jUtil.toPinYinLowercase(newVal);
return Pinyin4jUtil.toPinYinLowercase(elementProp.getJobName()).contains(val);
});
});
logModel.selectedPersonIndexProperty().bind(tableView.getSelectionModel().selectedIndexProperty());
pagination.pageCountProperty().bindBidirectional(logModel.pageCountProperty());
pagination.setPageFactory(new Callback<Integer, Node>() {
@Override
public Node call(Integer param) {
showPage(param + 1);
return tableView;
}
});
}
private void showPage(Integer page) {
Map<String, Object> queryMap = getQueryMap();
queryMap.put("page", page);
queryMap.put("limit", 20);
query(queryMap);
}
private Map<String, Object> getQueryMap() {
String jobName = jobNameField.getText();
String jobGroup = jobGroupComboBox.getSelectionModel().selectedIndexProperty().getValue() == 0 ? null : (jobGroupComboBox.getSelectionModel().selectedIndexProperty().getValue() == 1 ? "默认" : "系统");
String jobStatus = jobStatusComboBox.getSelectionModel().selectedIndexProperty().getValue() == 0 ? null : (jobStatusComboBox.getSelectionModel().selectedIndexProperty().getValue() == 1 ? "0" : "1");
LocalDate beginDate = beginDatePicker.getValue();
LocalDate endDate = endDatePicker.getValue();
Map<String, Object> queryMap = new HashMap<>();
queryMap.put("page", 0);
queryMap.put("limit", 20);
queryMap.put("jobName", jobName);
queryMap.put("jobName", jobName);
queryMap.put("jobGroup", jobGroup);
queryMap.put("status", jobStatus);
queryMap.put("startTime", beginDate != null ? beginDate.format(DateTimeFormatter.ofPattern("yyyyMMdd")) : null);
queryMap.put("endTime", endDate != null ? endDate.format(DateTimeFormatter.ofPattern("yyyyMMdd")) : null);
return queryMap;
}
@ActionMethod("search")
private void search() {
query(getQueryMap());
}
@ActionMethod("reset")
private void reset() {
jobNameField.setText("");
jobGroupComboBox.getSelectionModel().select(0);
jobStatusComboBox.getSelectionModel().select(0);
beginDatePicker.setValue(null);
endDatePicker.setValue(null);
searchButton.fire();
}
private void query(Map<String, Object> queryMap) {
ProcessChain.create()
.addRunnableInPlatformThread(() -> {
spinner.setVisible(true);
centPane.setDisable(true);
})
.addSupplierInExecutor(() -> Request.connector(SysJobFeign.class).getSysJobLogList(queryMap)
)
.addConsumerInPlatformThread(result -> {
logModel.getSysJobLogs().clear();
List<SysJobLog> gateLogs = result.getDatas();
logModel.setPageCount((int) result.getTotal());
logModel.getSysJobLogs().addAll(gateLogs);
})
.withFinal(() -> {
spinner.setVisible(false);
centPane.setDisable(false);
})
.onException(e -> e.printStackTrace())
.run();
}
@PreDestroy
private void destroy() {
System.err.println("destroy " + this);
}
@OnEvent("refresh")
private void onRefresh(Event<String> e) {
System.err.println(this.getClass() + "\t" + e.getContent());
search();
}
}

View File

@@ -1,8 +1,8 @@
package com.epri.fx.client.model;
package com.fx.client.model;
import com.epri.fx.server.vo.ElementVO;
import com.epri.fx.server.vo.GroupVO;
import com.epri.fx.server.vo.MenuVO;
import com.fx.server.vo.ElementVO;
import com.fx.server.vo.GroupVO;
import com.fx.server.vo.MenuVO;
import io.datafx.controller.FxmlLoadException;
import io.datafx.controller.injection.scopes.ViewScoped;
import javafx.beans.property.ListProperty;

View File

@@ -1,7 +1,8 @@
package com.epri.fx.client.model;
package com.fx.client.model;
import com.epri.fx.server.vo.GroupTypeVO;
import com.fx.server.vo.GroupTypeVO;
import io.datafx.controller.injection.scopes.FlowScoped;
import io.datafx.controller.injection.scopes.ViewScoped;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ListProperty;
import javafx.beans.property.SimpleIntegerProperty;
@@ -9,7 +10,7 @@ import javafx.beans.property.SimpleListProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
@FlowScoped
@ViewScoped
public class GroupTypeDataModel {
private int counter = 0;
private ListProperty<GroupTypeVO> groupTypes;

View File

@@ -1,7 +1,8 @@
package com.epri.fx.client.model;
package com.fx.client.model;
import com.epri.fx.server.entity.log.GateLog;
import com.fx.server.entity.log.GateLog;
import io.datafx.controller.injection.scopes.FlowScoped;
import io.datafx.controller.injection.scopes.ViewScoped;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ListProperty;
import javafx.beans.property.SimpleIntegerProperty;
@@ -9,7 +10,7 @@ import javafx.beans.property.SimpleListProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
@FlowScoped
@ViewScoped
public class LogDataModel {
private int counter = 0;
private ListProperty<GateLog> gateLogs;

View File

@@ -0,0 +1,58 @@
package com.fx.client.model;
import com.fx.server.entity.log.SysLoginInfor;
import io.datafx.controller.injection.scopes.ViewScoped;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ListProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleListProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
@ViewScoped
public class LoginLogDataModel {
private int counter = 0;
private ListProperty<SysLoginInfor> sysLoginInfors;
private IntegerProperty pageCount;
private IntegerProperty selectedPersonIndex;
public ListProperty<SysLoginInfor> getSysLoginInfors() {
if (sysLoginInfors == null) {
ObservableList<SysLoginInfor> innerList = FXCollections.observableArrayList();
sysLoginInfors = new SimpleListProperty<>(innerList);
}
return sysLoginInfors;
}
public int getSelectedPersonIndex() {
return selectedPersonIndexProperty().get();
}
public void setSelectedPersonIndex(int selectedPersonIndex) {
this.selectedPersonIndex.set(selectedPersonIndex);
}
public IntegerProperty selectedPersonIndexProperty() {
if (selectedPersonIndex == null) {
selectedPersonIndex = new SimpleIntegerProperty();
}
return selectedPersonIndex;
}
public int getPageCount() {
return pageCount.get();
}
public IntegerProperty pageCountProperty() {
if (pageCount == null) {
pageCount = new SimpleIntegerProperty();
}
return pageCount;
}
public void setPageCount(int pageCount) {
this.pageCount.set(pageCount);
}
}

View File

@@ -1,7 +1,7 @@
package com.epri.fx.client.model;
package com.fx.client.model;
import com.epri.fx.server.vo.ElementVO;
import com.epri.fx.server.vo.MenuVO;
import com.fx.server.vo.ElementVO;
import com.fx.server.vo.MenuVO;
import io.datafx.controller.injection.scopes.ViewScoped;
import javafx.beans.property.*;
import javafx.collections.FXCollections;

View File

@@ -0,0 +1,41 @@
package com.fx.client.model;
import com.fx.server.entity.log.SysLoginInfor;
import io.datafx.controller.injection.scopes.ViewScoped;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ListProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleListProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
@ViewScoped
public class OnlineUserDataModel {
private ListProperty<SysLoginInfor> onlineUsers;
private IntegerProperty selectedIndex;
public ListProperty<SysLoginInfor> getOnlineUsers() {
if (onlineUsers == null) {
ObservableList<SysLoginInfor> innerList = FXCollections.observableArrayList();
onlineUsers = new SimpleListProperty<>(innerList);
}
return onlineUsers;
}
public int getSelectedIndex() {
return selectedIndexProperty().get();
}
public IntegerProperty selectedIndexProperty() {
if (selectedIndex == null) {
selectedIndex = new SimpleIntegerProperty();
}
return selectedIndex;
}
public void setSelectedIndex(int selectedIndex) {
selectedIndexProperty().set(selectedIndex);
}
}

View File

@@ -0,0 +1,46 @@
package com.fx.client.model;
import com.fx.server.entity.SysJob;
import com.fx.server.vo.UserVO;
import io.datafx.controller.ViewController;
import io.datafx.controller.injection.scopes.FlowScoped;
import io.datafx.controller.injection.scopes.ViewScoped;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ListProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleListProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
@ViewScoped
public class SysJobDataModel {
private int counter = 0;
private ListProperty<SysJob> sysJobs;
private IntegerProperty selectedPersonIndex = new SimpleIntegerProperty(-1);
public ListProperty<SysJob> getSysJobs() {
if (sysJobs == null) {
ObservableList<SysJob> innerList = FXCollections.observableArrayList();
sysJobs = new SimpleListProperty<>(innerList);
}
return sysJobs;
}
public int getSelectedPersonIndex() {
return selectedPersonIndex.get();
}
public IntegerProperty selectedPersonIndexProperty() {
return selectedPersonIndex;
}
public void setSelectedPersonIndex(int selectedPersonIndex) {
this.selectedPersonIndex.set(selectedPersonIndex);
}
public SysJob selectSysJob() {
return getSysJobs().get(selectedPersonIndex.getValue());
}
}

View File

@@ -0,0 +1,58 @@
package com.fx.client.model;
import com.fx.server.entity.log.SysJobLog;
import io.datafx.controller.injection.scopes.ViewScoped;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ListProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleListProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
@ViewScoped
public class SysJobLogModel {
private int counter = 0;
private ListProperty<SysJobLog> sysJobLogs;
private IntegerProperty pageCount;
private IntegerProperty selectedPersonIndex;
public ListProperty<SysJobLog> getSysJobLogs() {
if (sysJobLogs == null) {
ObservableList<SysJobLog> innerList = FXCollections.observableArrayList();
sysJobLogs = new SimpleListProperty<>(innerList);
}
return sysJobLogs;
}
public int getSelectedPersonIndex() {
return selectedPersonIndexProperty().get();
}
public void setSelectedPersonIndex(int selectedPersonIndex) {
this.selectedPersonIndex.set(selectedPersonIndex);
}
public IntegerProperty selectedPersonIndexProperty() {
if (selectedPersonIndex == null) {
selectedPersonIndex = new SimpleIntegerProperty();
}
return selectedPersonIndex;
}
public int getPageCount() {
return pageCount.get();
}
public IntegerProperty pageCountProperty() {
if (pageCount == null) {
pageCount = new SimpleIntegerProperty();
}
return pageCount;
}
public void setPageCount(int pageCount) {
this.pageCount.set(pageCount);
}
}

View File

@@ -1,7 +1,8 @@
package com.epri.fx.client.model;
package com.fx.client.model;
import com.epri.fx.server.vo.UserVO;
import com.fx.server.vo.UserVO;
import io.datafx.controller.injection.scopes.FlowScoped;
import io.datafx.controller.injection.scopes.ViewScoped;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ListProperty;
import javafx.beans.property.SimpleIntegerProperty;
@@ -9,7 +10,7 @@ import javafx.beans.property.SimpleListProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
@FlowScoped
@ViewScoped
public class UserDataModel {
private int counter = 0;
private ListProperty<UserVO> users;

View File

@@ -1,8 +1,8 @@
package com.epri.fx.client.request;
package com.fx.client.request;
import com.epri.fx.client.request.feign.AppRequestErrorDecoder;
import com.epri.fx.client.request.feign.AppRequestInterceptor;
import com.epri.fx.client.request.feign.FeignAPI;
import com.fx.client.request.feign.AppRequestErrorDecoder;
import com.fx.client.request.feign.AppRequestInterceptor;
import com.fx.client.request.feign.FeignAPI;
import com.netflix.client.ClientFactory;
import com.netflix.client.config.IClientConfig;
import com.netflix.loadbalancer.BestAvailableRule;
@@ -16,7 +16,6 @@ import feign.jackson.JacksonEncoder;
import feign.okhttp.OkHttpClient;
import feign.ribbon.LBClient;
import feign.ribbon.LBClientFactory;
import feign.ribbon.LoadBalancingTarget;
import feign.ribbon.RibbonClient;
import feign.slf4j.Slf4jLogger;
import okhttp3.ConnectionPool;

View File

@@ -1,9 +1,9 @@
package com.epri.fx.client.request.feign;
package com.fx.client.request.feign;
import com.epri.fx.client.store.ApplicatonStore;
import com.epri.fx.client.utils.AlertUtil;
import com.fx.client.utils.AlertUtil;
import feign.Response;
import feign.codec.ErrorDecoder;
import io.datafx.core.concurrent.ProcessChain;
/**
* @description:
@@ -14,7 +14,10 @@ import feign.codec.ErrorDecoder;
public class AppRequestErrorDecoder implements ErrorDecoder {
@Override
public Exception decode(String methodKey, Response response) {
AlertUtil.show(response);
ProcessChain.create().addRunnableInPlatformThread(() -> {
AlertUtil.show(response);
}).run();
return null;
}
}

View File

@@ -1,6 +1,6 @@
package com.epri.fx.client.request.feign;
package com.fx.client.request.feign;
import com.epri.fx.client.store.ApplicatonStore;
import com.fx.client.store.ApplicatonStore;
import feign.RequestInterceptor;
import feign.RequestTemplate;

View File

@@ -1,4 +1,4 @@
package com.epri.fx.client.request.feign;
package com.fx.client.request.feign;
import feign.Headers;

View File

@@ -1,8 +1,8 @@
package com.epri.fx.client.request.feign.admin;
package com.fx.client.request.feign.admin;
import com.epri.fx.client.request.feign.FeignAPI;
import com.epri.fx.server.entity.Element;
import com.epri.fx.server.msg.TableResultResponse;
import com.fx.client.request.feign.FeignAPI;
import com.fx.server.entity.Element;
import com.fx.server.msg.TableResultResponse;
import feign.Param;
import feign.RequestLine;

View File

@@ -1,9 +1,9 @@
package com.epri.fx.client.request.feign.admin;
package com.fx.client.request.feign.admin;
import com.epri.fx.client.request.feign.FeignAPI;
import com.epri.fx.server.vo.GroupUsers;
import com.epri.fx.server.vo.GroupVO;
import com.epri.fx.server.vo.MenuVO;
import com.fx.client.request.feign.FeignAPI;
import com.fx.server.vo.GroupUsers;
import com.fx.server.vo.GroupVO;
import com.fx.server.vo.MenuVO;
import feign.Param;
import feign.QueryMap;
import feign.RequestLine;
@@ -41,6 +41,6 @@ public interface GroupFeign extends FeignAPI {
public GroupUsers getUsers(@Param("id") int id);
@RequestLine(value = "PUT /group/{id}/user")
public Integer modifiyUsers(@Param("id") int id, @QueryMap Map<String,String> map);
public Integer modifiyUsers(@Param("id") int id, @QueryMap Map<String, String> map);
}

View File

@@ -1,7 +1,7 @@
package com.epri.fx.client.request.feign.admin;
package com.fx.client.request.feign.admin;
import com.epri.fx.client.request.feign.FeignAPI;
import com.epri.fx.server.vo.GroupTypeVO;
import com.fx.client.request.feign.FeignAPI;
import com.fx.server.vo.GroupTypeVO;
import feign.Param;
import feign.RequestLine;

View File

@@ -1,11 +1,10 @@
package com.epri.fx.client.request.feign.admin;
package com.fx.client.request.feign.admin;
import com.epri.fx.client.request.feign.FeignAPI;
import com.epri.fx.server.entity.User;
import com.epri.fx.server.entity.log.GateLog;
import com.epri.fx.server.entity.log.LogInfo;
import com.epri.fx.server.msg.ObjectRestResponse;
import com.epri.fx.server.msg.TableResultResponse;
import com.fx.client.request.feign.FeignAPI;
import com.fx.server.entity.log.GateLog;
import com.fx.server.msg.ObjectRestResponse;
import com.fx.server.msg.TableResultResponse;
import feign.Headers;
import feign.Param;
import feign.QueryMap;
import feign.RequestLine;
@@ -18,6 +17,7 @@ import java.util.Map;
* @author: liwen
* @date: 2020/4/1 17:31
*/
@Headers("Content-Type: application/json")
public interface LogFeign extends FeignAPI {
@RequestLine("GET /log/page")
TableResultResponse<GateLog> getPageList(@QueryMap Map<String, Object> map);

View File

@@ -0,0 +1,24 @@
package com.fx.client.request.feign.admin;
import com.fx.client.request.feign.FeignAPI;
import com.fx.server.entity.log.SysLoginInfor;
import com.fx.server.msg.TableResultResponse;
import feign.Headers;
import feign.QueryMap;
import feign.RequestLine;
import java.util.Map;
/**
* @description:
* @className: SysJobController
* @author: liwen
* @date: 2020/12/25 09:23
*/
@Headers("Content-Type: application/json")
public interface LoginLogFeign extends FeignAPI {
@RequestLine("GET /log/login/list")
TableResultResponse<SysLoginInfor> getSysLoginInfor(@QueryMap Map<String, Object> map);
}

View File

@@ -1,7 +1,7 @@
package com.epri.fx.client.request.feign.admin;
package com.fx.client.request.feign.admin;
import com.epri.fx.client.request.feign.FeignAPI;
import com.epri.fx.server.vo.MenuVO;
import com.fx.client.request.feign.FeignAPI;
import com.fx.server.vo.MenuVO;
import feign.Headers;
import feign.RequestLine;

View File

@@ -0,0 +1,44 @@
package com.fx.client.request.feign.admin;
import com.fx.client.request.feign.FeignAPI;
import com.fx.server.entity.SysJob;
import com.fx.server.entity.log.SysJobLog;
import com.fx.server.msg.TableResultResponse;
import feign.Param;
import feign.QueryMap;
import feign.RequestLine;
import java.util.List;
import java.util.Map;
/**
* @description:
* @className: SysJobController
* @author: liwen
* @date: 2020/12/25 09:23
*/
public interface SysJobFeign extends FeignAPI {
@RequestLine("GET /job/list")
List<SysJob> getSysJobAll(@QueryMap Map<String,String> map);
@RequestLine("GET /job/log/list")
TableResultResponse<SysJobLog> getSysJobLogList(@QueryMap Map<String,Object> map);
@RequestLine("POST /job")
Integer addJob(SysJob sysJob);
@RequestLine("PUT /job")
Integer updateJob(SysJob sysJob);
@RequestLine("DELETE /job/{jobName}/{jobGroupName}")
Integer deleteJob(@Param("jobName") String jobName,@Param("jobGroupName") String jobGroupName);
@RequestLine("PUT /job/pause/{jobName}/{jobGroupName}")
Integer pauseJob(@Param("jobName") String jobName,@Param("jobGroupName") String jobGroupName);
@RequestLine("PUT /job/resume/{jobName}/{jobGroupName}")
Integer resumeJob(@Param("jobName") String jobName,@Param("jobGroupName") String jobGroupName);
@RequestLine("PUT /job/run/{jobName}/{jobGroupName}")
Integer runJob(@Param("jobName") String jobName,@Param("jobGroupName") String jobGroupName);
}

View File

@@ -1,14 +1,15 @@
package com.epri.fx.client.request.feign.admin;
package com.fx.client.request.feign.admin;
import com.epri.fx.client.request.feign.FeignAPI;
import com.epri.fx.server.entity.User;
import com.epri.fx.server.msg.ObjectRestResponse;
import com.epri.fx.server.msg.TableResultResponse;
import com.epri.fx.server.vo.UserVO;
import com.fx.client.request.feign.FeignAPI;
import com.fx.server.entity.User;
import com.fx.server.entity.log.SysLoginInfor;
import com.fx.server.msg.ObjectRestResponse;
import com.fx.server.msg.TableResultResponse;
import feign.Param;
import feign.QueryMap;
import feign.RequestLine;
import java.util.List;
import java.util.Map;
/**
@@ -21,6 +22,12 @@ public interface UserFeign extends FeignAPI {
@RequestLine("GET /user/page")
TableResultResponse<User> getPageList(@QueryMap Map<String, Object> map);
@RequestLine("GET /user/online/list")
List<SysLoginInfor> getOnlineUsers();
@RequestLine("POST /user/retreat/{userId}")
ObjectRestResponse<Boolean> retreat(@Param("userId") String userId);
@RequestLine("PUT /user/{id}")
ObjectRestResponse<Integer> update(@Param("id") Integer id, User user);
@@ -28,7 +35,7 @@ public interface UserFeign extends FeignAPI {
ObjectRestResponse<Integer> delete(@Param("id") Integer id);
@RequestLine("PUT /user/password/{id}")
ObjectRestResponse<Integer> restPassword(@Param("id")Integer id);
ObjectRestResponse<Integer> restPassword(@Param("id") Integer id);
@RequestLine("POST /user")
ObjectRestResponse<Integer> add(User user);

View File

@@ -1,10 +1,10 @@
package com.epri.fx.client.request.feign.login;
package com.fx.client.request.feign.login;
import com.epri.fx.client.request.feign.FeignAPI;
import com.epri.fx.server.msg.ObjectRestResponse;
import com.epri.fx.server.util.user.JwtAuthenticationRequest;
import com.epri.fx.server.vo.FrontUser;
import com.epri.fx.server.vo.MenuVO;
import com.fx.client.request.feign.FeignAPI;
import com.fx.server.msg.ObjectRestResponse;
import com.fx.server.util.user.JwtAuthenticationRequest;
import com.fx.server.vo.FrontUser;
import com.fx.server.vo.MenuVO;
import feign.Param;
import feign.RequestLine;

View File

@@ -1,16 +1,15 @@
package com.epri.fx.client.store;
package com.fx.client.store;
import com.epri.fx.client.bean.MenuVoCell;
import com.epri.fx.server.vo.GroupVO;
import com.epri.fx.server.vo.MenuVO;
import com.epri.fx.server.vo.PermissionInfo;
import com.fx.client.bean.MenuVoCell;
import com.fx.server.vo.GroupVO;
import com.fx.server.vo.MenuVO;
import com.fx.server.vo.PermissionInfo;
import javafx.beans.property.*;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.collections.ObservableMap;
import java.util.HashMap;
import java.util.Map;
/**
* @description:

View File

@@ -1,6 +1,6 @@
package com.epri.fx.client.utils;
package com.fx.client.utils;
import com.epri.fx.server.msg.BaseResponse;
import com.fx.server.msg.BaseResponse;
import com.jfoenix.controls.JFXAlert;
import com.jfoenix.controls.JFXButton;
import com.jfoenix.controls.JFXDialogLayout;

View File

@@ -1,4 +1,4 @@
package com.epri.fx.client.utils;
package com.fx.client.utils;
/**
* @description:

View File

@@ -1,4 +1,4 @@
package com.epri.fx.client.utils;
package com.fx.client.utils;
import net.sourceforge.pinyin4j.PinyinHelper;
import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;

View File

@@ -0,0 +1,91 @@
package com.fx.client.websocket;
import com.fx.client.gui.uicomponents.login.LoginController;
import com.fx.client.store.ApplicatonStore;
import io.datafx.controller.context.ApplicationContext;
import io.datafx.controller.flow.FlowException;
import io.datafx.controller.flow.FlowHandler;
import io.datafx.controller.injection.scopes.ApplicationScoped;
import io.datafx.controller.util.VetoException;
import io.datafx.core.concurrent.ProcessChain;
import lombok.extern.slf4j.Slf4j;
import org.java_websocket.client.WebSocketClient;
import org.java_websocket.handshake.ServerHandshake;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.Map;
/**
* @description:
* @className: Session
* @author: liwen
* @date: 2020/6/24 16:17
*/
@ApplicationScoped
@Slf4j
public class WSClient extends WebSocketClient {
private static WSClient instance;
public static synchronized WSClient getInstance() {
if (instance == null) {
Map<String, String> httpHeaders = new HashMap<>();
try {
instance = new WSClient(new URI("ws://localhost:8080/websocket/test"));
} catch (URISyntaxException e) {
e.printStackTrace();
}
}
return instance;
}
public WSClient(URI serverUri) {
super(serverUri);
}
@Override
public void onOpen(ServerHandshake handshakedata) {
log.info("[websocket] 连接成功");
System.err.println(instance.isOpen());
}
@Override
public void onMessage(String message) {
log.info("[websocket] 收到消息={}", message);
}
@Override
public void onClose(int code, String reason, boolean remote) {
log.info("[websocket] 退出连接");
instance = null;
ProcessChain.create().addRunnableInPlatformThread(() -> {
ApplicatonStore.clearPermissionInfo();
FlowHandler flowHandler= (FlowHandler) ApplicationContext.getInstance().getRegisteredObject("ContentFlowHandler");
try {
flowHandler.navigateTo(LoginController.class);
} catch (VetoException e) {
e.printStackTrace();
} catch (FlowException e) {
e.printStackTrace();
}
}).run();
}
@Override
public void onError(Exception ex) {
log.info("[websocket] 连接错误={}", ex.getMessage());
instance = null;
}
}

View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<datafx version="8.0">
<features>
<featureEnum>com.epri.fx.client.gui.uicomponents.feature.UserGroupFeatures</featureEnum>
</features>
</datafx>

View File

@@ -26,7 +26,12 @@
-fx-icon-svg-color: rgb(3,115,248)
}
#waring{
-fx-background-color: #06488a;
}
.waringbut{
-fx-background-color: #6e57e5;
}
.backgroundPane {
-fx-background-color: -fx-card-base;
}
@@ -320,6 +325,8 @@
-fx-background-color: TRANSPARENT
}
.tool-bar-button > .jfx-svg-glyph {
-fx-fill: -fx-text-color;
-fx-text-fill: -fx-text-color;
@@ -334,6 +341,22 @@
.tool-bar-button:focused {
-fx-background-color: TRANSPARENT
}
.tool-bar-toggle {
-fx-fill: -fx-text-color;
-fx-text-fill: -fx-text-color;
-fx-pref-height: 32;
-fx-pref-width: 32;
-fx-background-radius: 16;
-fx-background-color: derive(-fx-main-base, 10%)
}
.tool-bar-toggle > .jfx-svg-glyph {
-fx-fill: -fx-text-color;
-fx-text-fill: -fx-text-color;
-fx-prompt-text-fill: -fx-text-color;
-jfx-size: 20px;
}
/*******************************************************************************
* *
@@ -387,7 +410,7 @@
}
.jfx-tab-pane .headers-region .tab .tab-container .tab-close-button:hover {
-fx-background-color: derive(-fx-text-color, -20%)
-fx-background-color: derive(-fx-text-color, -50%)
}
@@ -977,6 +1000,30 @@
}
#status-success-label {
-fx-text-fill: #ffffff;
-fx-background-color: #1ea681;
-fx-background-radius: 10;
-fx-padding: 5 10 5 10;
}
#status-error-label {
-fx-background-color: #e63c53;
-fx-background-radius: 10;
-fx-text-fill: #ffffff;
-fx-padding: 5 10 5 10;
}
.icons-badge .badge-pane {
-fx-background-color: #ff4081;
-fx-background-radius: 20;
-fx-pref-width: 20;
-fx-pref-height: 20;
-fx-alignment: center;
}
.icons-badge Label {
-fx-font-size: 14.0px;
-fx-text-fill: WHITE;
}

View File

@@ -33,7 +33,7 @@
-fx-background-color: -fx-card-base;
}
.tool-pane{
.tool-pane {
-fx-border-color: -fx-border-base;
-fx-border-width: 0 0 0.45 0;
}
@@ -57,12 +57,12 @@
}
.
/*******************************************************************************
* *
* text和label *
* *
*******************************************************************************/
/*******************************************************************************
* *
* text和label *
* *
*******************************************************************************/
.label {
-fx-text-fill: -fx-text-color;
-fx-font-family: "Microsoft YaHei";
@@ -111,9 +111,8 @@
.jfx-button {
-fx-padding: 0.47em 0.47em;
-fx-background-color: -fx-accent-color;
-fx-text-fill: -fx-text-color;
-fx-text-fill: #ffffff;
-jfx-button-type: RAISED;
}
.jfx-button > MaterialDesignIconView, .toggle-button > MaterialDesignIconView {
@@ -338,6 +337,22 @@
-fx-background-color: TRANSPARENT
}
.tool-bar-toggle {
-fx-fill: -fx-text-color;
-fx-text-fill: -fx-text-color;
-fx-pref-height: 32;
-fx-pref-width: 32;
-fx-background-radius: 16;
-fx-background-color: ladder(-fx-main-base, rgba(255, 255, 255, .2) 29%, rgba(0, 0, 0, .2) 30%);
}
.tool-bar-toggle > .jfx-svg-glyph {
-fx-fill: -fx-text-color;
-fx-text-fill: -fx-text-color;
-fx-prompt-text-fill: -fx-text-color;
-jfx-size: 20px;
}
/*******************************************************************************
* *
* JFX TabPane *
@@ -390,7 +405,7 @@
}
.jfx-tab-pane .headers-region .tab .tab-container .tab-close-button:hover {
-fx-background-color: derive(-fx-text-color, 20%)
-fx-background-color: derive(-fx-text-color, 90%)
}
@@ -439,7 +454,7 @@
.jfx-list-cell:filled:hover,
.jfx-list-cell:selected .label {
-fx-text-fill: -fx-text-color;
-fx-text-fill: #ffffff;
}
.jfx-list-cell .jfx-rippler {
@@ -634,9 +649,9 @@
-fx-background-color: transparent;
}
.table-row-cell .text {
-fx-fill: -fx-text-color;
}
/*.table-row-cell .text {*/
/* -fx-fill: -fx-text-color;*/
/*}*/
/*TableView的单元之间去掉没有数据的竖线 */
.table-view .table-row-cell:empty, .table-view .table-row-cell:empty .table-cell {
@@ -980,10 +995,33 @@
-fx-tick-label-fill: #454545;
}
#status-success-label {
-fx-text-fill: #ffffff;
-fx-background-color: #1ea681;
-fx-background-radius: 10;
-fx-padding: 5 10 5 10;
}
#status-error-label {
-fx-background-color: #e63c53;
-fx-background-radius: 10;
-fx-text-fill: #ffffff;
-fx-padding: 5 10 5 10;
}
.icons-badge .badge-pane {
-fx-background-color: #ff4081;
-fx-background-radius: 20;
-fx-pref-width: 20;
-fx-pref-height: 20;
-fx-alignment: center;
}
.icons-badge Label {
-fx-font-size: 14.0px;
-fx-text-fill: WHITE;
}

View File

@@ -20,6 +20,39 @@ Created by iconfont
/>
<missing-glyph />
<glyph glyph-name="moon-fill" unicode="&#59446;" d="M485.546667 809.856a320 320 0 1 1 452.266666-452.266667C924.245333 134.229333 738.816-42.666667 512.042667-42.666667 276.352-42.666667 85.333333 148.352 85.333333 384c0 226.773333 176.896 412.202667 400.213334 425.856z" horiz-adv-x="1024" />
<glyph glyph-name="taiyang" unicode="&#59035;" d="M511.951 74.082c16.284 0 29.529-13.001 29.904-29.18l0.008-0.706v-81.31c0-16.506-13.392-29.886-29.912-29.886-16.283 0-29.528 13-29.903 29.18l-0.008 0.706v81.31c0 16.505 13.392 29.886 29.911 29.886z m-219.283 93.56c11.514-11.505 11.679-30.056 0.493-41.761l-0.493-0.505-57.545-57.495c-11.68-11.67-30.62-11.67-42.301 0-11.515 11.505-11.68 30.055-0.494 41.76l0.494 0.505 57.544 57.495c11.681 11.671 30.62 11.671 42.302 0z m484.965 0.492l0.505-0.493 57.545-57.495c11.681-11.67 11.681-30.593 0-42.265-11.515-11.504-30.08-11.669-41.797-0.493l-0.505 0.493-57.544 57.495c-11.682 11.671-11.682 30.594 0 42.265 11.514 11.505 30.08 11.669 41.796 0.493zM511.951 645.787c143.596 0 260.003-116.306 260.003-259.778 0-143.471-116.407-259.778-260.003-259.778-143.595 0-260.003 116.307-260.003 259.778 0 143.472 116.408 259.778 260.003 259.778z m0-59.772c-110.556 0-200.179-89.545-200.179-200.006 0-110.46 89.623-200.006 200.18-200.006 110.555 0 200.179 89.546 200.179 200.006s-89.624 200.006-200.18 200.006z m-336.694-167.07c16.505 0 29.886-13.391 29.886-29.911 0-16.284-13.001-29.529-29.18-29.904l-0.706-0.008h-81.31c-16.506 0-29.886 13.392-29.886 29.912 0 16.284 13 29.528 29.18 29.904l0.706 0.008h81.31z m747.796 0c16.506 0 29.886-13.391 29.886-29.911 0-16.284-13-29.529-29.18-29.904l-0.706-0.008h-81.31c-16.505 0-29.886 13.392-29.886 29.912 0 16.284 13.001 29.528 29.18 29.904l0.706 0.008h81.31zM234.618 708.382l0.505-0.493 57.545-57.495c11.681-11.671 11.681-30.594 0-42.265-11.515-11.505-30.08-11.67-41.797-0.493l-0.505 0.493-57.544 57.494c-11.682 11.672-11.682 30.594 0 42.265 11.514 11.505 30.08 11.67 41.796 0.494z m596.463-0.493c11.515-11.505 11.679-30.055 0.494-41.76l-0.494-0.506-57.544-57.494c-11.682-11.671-30.62-11.671-42.302 0-11.515 11.504-11.679 30.055-0.494 41.76l0.494 0.505 57.544 57.495c11.682 11.67 30.62 11.67 42.302 0zM511.951 832c16.284 0 29.529-13 29.904-29.18l0.008-0.706v-81.31c0-16.505-13.392-29.886-29.912-29.886-16.283 0-29.528 13.001-29.903 29.18l-0.008 0.706v81.31C482.04 818.62 495.432 832 511.95 832z" horiz-adv-x="1024" />
<glyph glyph-name="cc-bell-o" unicode="&#58900;" d="M876.584 119.244c-57.068 42.888-89.818 108.39-89.818 179.74l0 149.716c0 125.423-84.509 231.472-199.621 264.101l0 35.332c0 41.279-33.581 74.858-74.858 74.858-41.281 0-74.858-33.579-74.858-74.858l0-35.333c-115.093-32.678-199.621-138.678-199.621-264.101l0-149.716c0-71.35-32.726-136.803-89.823-179.74-8.6-6.433-12.085-17.642-8.699-27.828 3.413-10.184 12.94-17.057 23.664-17.057l227.057 0c-1.634-8.187-2.536-16.521-2.536-24.952 0-68.766 55.998-124.765 124.764-124.765s124.765 55.998 124.765 124.765c0 8.382-0.828 16.765-2.486 24.952l227.06 0c10.722 0 20.227 6.874 23.638 17.057 3.413 10.186-0.099 21.395-8.677 27.828l0.048 0 0 0.001zM487.333 748.133c0 13.768 11.183 24.952 24.952 24.952 13.766 0 24.953-11.186 24.953-24.952l0-26.098c-8.238 0.756-16.522 1.146-24.953 1.146-8.433 0-16.72-0.389-24.952-1.146l0 26.098zM587.143 49.456c0-41.279-33.581-74.858-74.858-74.858-41.281 0-74.857 33.579-74.857 74.858 0 8.528 1.484 16.96 4.286 24.952l141.14 0c2.824-7.992 4.29-16.424 4.29-24.952zM224.935 124.313c12.72 15.403 23.81 32.262 32.873 49.955 19.859 38.842 29.901 80.803 29.901 124.714l0 149.718c0 123.814 100.76 224.575 224.575 224.575 123.788 0 224.575-100.761 224.575-224.575l0-149.717c0-43.911 10.087-85.873 29.922-124.714 9.066-17.791 20.128-34.554 32.849-49.955l-574.695-0.001z" horiz-adv-x="1024" />
<glyph glyph-name="tuichu" unicode="&#58885;" d="M768 456.533333l-89.6 89.6c-12.8 12.8-29.866667 12.8-38.4 0-12.8-12.8-12.8-29.866667 0-38.4l89.6-89.6c4.266667-4.266667 4.266667-8.533333 8.533333-12.8h-302.933333c-17.066667 0-25.6-12.8-25.6-25.6s12.8-25.6 25.6-25.6h302.933333c-4.266667-8.533333-8.533333-12.8-12.8-12.8l-89.6-89.6c-12.8-12.8-12.8-29.866667 0-38.4 4.266667-4.266667 12.8-8.533333 21.333334-8.533333s12.8 4.266667 21.333333 8.533333l89.6 85.333334c42.666667 46.933333 42.666667 115.2 0 157.866666zM558.933333 72.533333H358.4c-42.666667 0-76.8 34.133333-76.8 76.8V605.866667c0 42.666667 34.133333 76.8 76.8 76.8h200.533333c17.066667 0 29.866667 12.8 29.866667 25.6s-12.8 25.6-29.866667 25.6H358.4c-34.133333 4.266667-68.266667-8.533333-93.866667-34.133334-25.6-25.6-38.4-55.466667-38.4-93.866666v-456.533334c0-72.533333 59.733333-132.266667 132.266667-132.266666h200.533333c17.066667 0 29.866667 12.8 29.866667 29.866666s-17.066667 25.6-29.866667 25.6z" horiz-adv-x="1024" />
<glyph glyph-name="rizhiguanli" unicode="&#58886;" d="M33.860267 194.491733a33.860267 33.860267 0 1 0 0 67.720534h174.762666a33.860267 33.860267 0 1 0 0-67.720534H33.860267z m0 354.440534a33.860267 33.860267 0 1 0 0 67.720533h174.762666a33.860267 33.860267 0 1 0 0-67.720533H33.860267z m931.703466-62.805334a33.860267 33.860267 0 0 0-33.860266 33.860267V744.448c0 43.144533-34.952533 78.097067-78.097067 78.097067h-615.765333c-43.144533 0-78.097067-34.952533-78.097067-78.097067v-71.816533a33.860267 33.860267 0 1 0-67.720533 0V744.448c0 80.554667 65.536 146.090667 145.8176 146.090667h615.765333c80.554667 0 146.090667-65.536 146.090667-146.090667v-224.187733a33.450667 33.450667 0 0 0-9.8304-24.029867 35.498667 35.498667 0 0 0-24.302934-10.103467z m-839.68-202.069333a33.860267 33.860267 0 0 0-33.860266 33.860267V493.499733a33.860267 33.860267 0 1 0 67.720533 0v-175.581866a34.065067 34.065067 0 0 0-33.860267-33.860267z m111.957334-367.0016c-80.554667 0-145.8176 65.536-145.8176 146.090667v75.912533a33.860267 33.860267 0 1 0 67.720533 0v-75.912533c0-43.144533 34.952533-78.097067 78.097067-78.097067h615.765333c43.144533 0 78.097067 34.952533 78.097067 78.097067V291.4304a33.860267 33.860267 0 1 0 67.720533 0v-228.283733a145.8176 145.8176 0 0 0-145.8176-146.090667h-615.765333zM969.9328 458.274133a54.272 54.272 0 1 1-0.068267-108.544 54.272 54.272 0 0 1 0.068267 108.544z m0-176.674133a122.197333 122.197333 0 0 0 0 244.394667 122.402133 122.402133 0 0 0 86.562133-208.622934c-23.210667-22.9376-53.794133-35.771733-86.562133-35.771733zM378.4704 194.491733a33.860267 33.860267 0 1 0 0 67.720534h356.625067a33.860267 33.860267 0 1 0 0-67.720534H378.4704z m0 177.220267a33.860267 33.860267 0 1 0 0 67.720533h356.625067a33.860267 33.860267 0 1 0 0-67.720533H378.4704z m0 177.220267a33.860267 33.860267 0 1 0 0 67.720533h356.625067a33.860267 33.860267 0 1 0 0-67.720533H378.4704z" horiz-adv-x="1092" />
<glyph glyph-name="ic_user_zx" unicode="&#58894;" d="M362.645333 356.13866700000005a275.584 275.584 0 1 0 155.52-48.042667c-223.488 0-403.370667-163.498667-403.370666-363.392a35.925333 35.925333 0 0 0-71.893334 0c0 191.061333 133.973333 352.554667 319.744 411.434667z m155.52 23.893333a203.690667 203.690667 0 1 1 0 407.338667 203.690667 203.690667 0 0 1 0-407.381334z m153.045334-361.898667l244.736 205.354667a39.936 39.936 0 1 0 51.370666-61.184l-275.370666-231.04a39.936 39.936 0 0 0-56.277334 4.906667l-114.858666 136.96a39.936 39.936 0 1 0 61.184 51.285333l89.173333-106.282667z" horiz-adv-x="1024" />
<glyph glyph-name="jiankong" unicode="&#59311;" d="M815.21 363.093L684.499 190.017l46.79-31.242L862 331.849zM785.306 411.144l0.571-0.279 28.901 43.284-51.026 24.899-453.707 226.207L162 401.877l161.387-78.756 51.72-25.239 188.05-96.568 51.025-24.901 31.528 47.219 2.866 3.819-0.809 0.394 137.539 183.299z m-190.62-162.612L388.901 353.756l-51.72 25.237-99.943 48.771 20.562 42.137 269.669-131.596 24.674 50.563-269.67 131.596 53.461 109.553 396.29-198.186-137.538-183.299zM297.567 198.712h-79.305v79.705H162v-215.672h56.262V142.45H341.629l13.889 56.262 15.223 61.663-51.721 25.238z" horiz-adv-x="1024" />
<glyph glyph-name="denglurizhi" unicode="&#59001;" d="M76.778433 819.221567h776.41112v-328.249368h77.209773v345.071609A59.956192 59.956192 0 0 1 872.599832 896H59.956192A59.956192 59.956192 0 0 1 0 836.043808v-898.048863a59.956192 59.956192 0 0 1 59.956192-59.956192H474.473463v75.915754H76.778433zM209.631003 639.352991h513.294018v-81.091828H209.631003zM209.631003 423.251896h389.068239v-81.091829H209.631003zM209.631003 211.464195h278.213984v-81.091828H209.631003zM914.871104 121.314238a163.046335 163.046335 0 1 1-227.747262 0 180.731255 180.731255 0 0 1-122.069082-180.731256c0-68.582982 102.227464-68.582982 243.706824-68.582982h86.267902c59.956192 0 101.364785 3.450716 125.088458 27.605729a57.799495 57.799495 0 0 1 17.68492 43.133951 172.535805 172.535805 0 0 1-122.93176 178.574558zM733.277169 305.496209a94.894693 94.894693 0 0 0 67.288964 28.037068 92.306655 92.306655 0 1 0-67.288964-26.74305z m122.500422-364.913227h-46.584668a862.679023 862.679023 0 0 0-172.535804 10.352149c5.607414 99.639427 92.737995 121.206403 166.065712 121.206402 144.498736 0 164.771693-70.73968 166.497051-125.951137a480.943555 480.943555 0 0 0-113.442291-5.607414z" horiz-adv-x="1038" />
<glyph glyph-name="time" unicode="&#59133;" d="M664.5 793.6h-305c-10.5 0-19.1 8.5-19.1 19.1s8.5 19.1 19.1 19.1h305.1c10.5 0 19.1-8.5 19.1-19.1s-8.6-19.1-19.2-19.1zM664.5 278.9h-152.5c-10.5 0-19.1 8.5-19.1 19.1v209.7c0 10.5 8.5 19.1 19.1 19.1s19.1-8.5 19.1-19.1v-190.7h133.5c10.5 0 19.1-8.5 19.1-19.1s-8.6-19-19.2-19zM512 697.8c199.5 0 361.8-162.3 361.8-361.8s-162.3-361.8-361.8-361.8-361.8 162.4-361.8 361.9c0 199.4 162.3 361.7 361.8 361.7M512 736c-220.9 0-399.9-179-399.9-399.9s179-399.9 399.9-399.9c220.9 0 399.9 179 399.9 399.9s-179 399.9-399.9 399.9z" horiz-adv-x="1024" />
<glyph glyph-name="zhihing" unicode="&#59414;" d="M221.6 24c-4 0-8 0.8-12 3.2-7.2 4-12 12-12 20.8V720c0 8.8 4.8 16.8 12 20.8s16.8 4 24 0l581.6-336c7.2-4 12-12 12-20.8s-4.8-16.8-12-20.8l-581.6-336c-4-2.4-8-3.2-12-3.2z m24 654.4v-588.8L755.2 384 245.6 678.4z" horiz-adv-x="1024" />
<glyph glyph-name="diaodurizhi-copy" unicode="&#60046;" d="M269.844659 814.5692h44.821057v-166.626082h-44.821057zM677.140966 404.280768c52.335426 0 102.092273-19.937769 140.105639-56.13883 38.126482-36.31053 60.461599-85.284073 62.891788-137.900467 2.5056-54.276658-16.27424-106.280032-52.881549-146.431672-36.60731-40.15164-86.65972-63.643469-140.936379-66.150285-3.180653-0.147174-6.401444-0.221369-9.576016-0.221369-52.341508 0-102.102004 19.936552-140.114153 56.136398-38.126482 36.309314-60.461599 85.284073-62.891789 137.902899-2.5056 54.276658 16.27424 106.280032 52.88155 146.431672 36.60731 40.15164 86.65972 63.643469 140.936379 66.149069a208.122961 208.122961 0 0 0 9.576016 0.221369h0.008514m-0.00973 44.822274c-3.859355 0-7.746684-0.088791-11.642528-0.268805-136.951744-6.3236-242.847422-122.470346-236.525038-259.422091 6.143586-133.0559 115.942406-236.793842 247.779562-236.793842 3.859355 0 7.747901 0.088791 11.642529 0.268804 136.951744 6.322384 242.847422 122.470346 236.525037 259.422091-6.143586 133.057117-115.942406 236.798708-247.779562 236.793843zM490.264524 4.8892660000000205a272.361206 272.361206 0 0 0-32.682275 37.369937H180.453104c-20.912034 0-37.927007 17.013757-37.927007 37.92579v590.263526c0 20.912034 17.013757 37.927007 37.927007 37.927007H732.799354c20.912034 0 37.925791-17.013757 37.925791-37.927007V454.84403a268.605238 268.605238 0 0 0 44.821057-21.463023V670.448519c0 45.70045-37.047614 82.746848-82.746848 82.746849H180.453104c-45.70045 0-82.746848-37.047614-82.746848-82.746849v-590.263526c0-45.70045 37.047614-82.746848 82.746848-82.746848h317.980164a273.587248 273.587248 0 0 0-8.168744 7.451121zM770.725145 406.38377a225.243754 225.243754 0 0 0 44.821057-27.231985v0.21407a225.182938 225.182938 0 0 1-44.821057 27.114003v-0.096088zM812.590566 117.469788H646.820768V319.89433299999996h44.821057v-157.604704h120.948741zM209.55091 515.878511h498.255687v-44.821057H209.55091zM600.682445 814.5692h44.821058v-166.626082h-44.821058zM406.842623 183.82563000000005H209.55091v-44.821057h203.864657a272.351476 272.351476 0 0 0-6.572944 44.821057zM450.941192 349.852071H209.55091v-44.821057h217.435038a268.707408 268.707408 0 0 0 23.955244 44.821057z" horiz-adv-x="1024" />
<glyph glyph-name="chakan-copy" unicode="&#58884;" d="M512.852 119.731c-55.321 0-112.681 11.325-170.487 33.663-45.814 17.703-92.023 42.333-137.344 73.207-76.95 52.421-124.384 104.293-126.366 106.476l-12.49 13.757 12.49 13.758c1.982 2.183 49.416 54.055 126.365 106.476 45.321 30.874 91.53 55.505 137.343 73.208 57.807 22.338 115.167 33.663 170.488 33.663 55.322 0 112.681-11.326 170.487-33.663 45.814-17.703 92.023-42.333 137.344-73.208 76.949-52.421 124.384-104.293 126.365-106.476l12.49-13.757-12.49-13.757c-1.982-2.183-49.416-54.055-126.365-106.476-45.321-30.874-91.53-55.504-137.344-73.207-57.805-22.339-115.165-33.664-170.486-33.664zM122.429 346.836c18.801-18.469 56.324-52.908 106.476-86.975 66.62-45.254 169.961-99.197 283.947-99.197 114.335 0 217.976 54.255 284.786 99.767 49.879 33.979 86.998 68.061 105.646 86.396-18.802 18.471-56.328 52.914-106.485 86.984-66.621 45.254-169.962 99.197-283.947 99.197-113.986 0-217.327-53.944-283.947-99.197-50.149-34.064-87.671-68.503-106.476-86.975zM512.852 198.312c-81.724 0-148.212 66.626-148.212 148.524s66.487 148.524 148.212 148.524c81.724 0 148.212-66.627 148.212-148.524s-66.487-148.524-148.212-148.524zM512.852 454.427c-59.154 0-107.279-48.265-107.279-107.591s48.125-107.591 107.279-107.591 107.279 48.265 107.279 107.591c0 59.326-48.126 107.591-107.279 107.591z" horiz-adv-x="1024" />

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 45 KiB

View File

@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXComboBox?>
<?import com.jfoenix.controls.JFXDatePicker?>
<?import com.jfoenix.controls.JFXSpinner?>
<?import com.jfoenix.controls.JFXTextField?>
<?import javafx.collections.FXCollections?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Pagination?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<StackPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="600.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1">
<children>
<VBox fx:id="contentPane" prefHeight="200.0" prefWidth="100.0">
<children>
<HBox alignment="CENTER_LEFT" prefHeight="54.0" prefWidth="600.0" spacing="7.0">
<children>
<JFXTextField fx:id="loginNameTextfield" promptText="登录名" />
<JFXTextField fx:id="addrTextfield" promptText="登录ip" />
<JFXComboBox fx:id="statusComboBox" promptText="登录状态">
<items>
<FXCollections fx:factory="observableArrayList">
<Label>所有</Label>
<Label>成功</Label>
<Label>失败</Label>
</FXCollections>
</items>
</JFXComboBox>
<HBox alignment="CENTER">
<children>
<Label text="登录时间:" />
<JFXDatePicker fx:id="startDatePicker" maxHeight="-Infinity" maxWidth="-Infinity" minWidth="120.0" prefWidth="120.0" promptText="开始时间">
<padding>
<Insets left="7.0" />
</padding>
</JFXDatePicker>
<Label text="-" />
<JFXDatePicker fx:id="endDatePicker" maxHeight="-Infinity" maxWidth="-Infinity" minWidth="120.0" prefWidth="120.0" promptText="结束时间">
<padding>
<Insets left="7.0" />
</padding>
</JFXDatePicker>
</children>
</HBox>
<JFXButton fx:id="restButton" text="重置" />
<JFXButton fx:id="searchButton" text="搜索" />
</children>
</HBox>
<AnchorPane VBox.vgrow="ALWAYS">
<children>
<TableView fx:id="tableView" prefHeight="200.0" prefWidth="200.0" AnchorPane.bottomAnchor="60.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<columns>
<TableColumn fx:id="infoIdColumn" prefWidth="75.0" text="访问编号" />
<TableColumn fx:id="loginNameColumn" prefWidth="75.0" text="登录名称" />
<TableColumn fx:id="ipaddrColumn" prefWidth="75.0" text="登录地址" />
<TableColumn fx:id="statusColumn" prefWidth="75.0" text="登录状态" />
<TableColumn fx:id="msgColumn" prefWidth="75.0" text="操作信息" />
<TableColumn fx:id="loginTimeColumn" prefWidth="101.0" text="登录时间" />
</columns>
<columnResizePolicy>
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
</columnResizePolicy>
</TableView>
<Pagination fx:id="pagination" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
</children>
</AnchorPane>
</children>
</VBox>
<JFXSpinner fx:id="spinner" radius="16.0" startingAngle="0.0" visible="false" />
</children>
</StackPane>

View File

@@ -1,50 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXComboBox?>
<?import com.jfoenix.controls.JFXTextField?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<VBox minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1">
<children>
<HBox alignment="CENTER_LEFT" prefHeight="50.0" prefWidth="600.0" spacing="5.0">
<children>
<JFXTextField promptText="任务名称" />
<JFXComboBox promptText="任务分组" />
<JFXComboBox promptText="任务状态" />
<JFXButton text="搜索" />
<JFXButton text="重置" />
</children>
</HBox>
<VBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" VBox.vgrow="ALWAYS">
<children>
<HBox alignment="CENTER_LEFT" prefHeight="50.0" prefWidth="600.0" spacing="5.0">
<children>
<JFXButton text="新增" />
<JFXButton text="导出" />
<JFXButton text="日志" />
</children>
</HBox>
<TableView prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS">
<columns>
<TableColumn prefWidth="75.0" text="任务编号" />
<TableColumn prefWidth="75.0" text="任务名称" />
<TableColumn prefWidth="75.0" text="任务分组" />
<TableColumn prefWidth="75.0" text="调用目标字符串" />
<TableColumn prefWidth="75.0" text="执行表达式" />
<TableColumn prefWidth="75.0" text="任务状态" />
<TableColumn prefWidth="75.0" text="创建时间" />
<TableColumn prefWidth="75.0" text="操作" />
</columns>
<columnResizePolicy>
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
</columnResizePolicy>
</TableView>
</children>
</VBox>
</children>
</VBox>

View File

@@ -1,72 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXComboBox?>
<?import com.jfoenix.controls.JFXDatePicker?>
<?import com.jfoenix.controls.JFXTextField?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<VBox minHeight="-Infinity" minWidth="-Infinity" prefHeight="455.0" prefWidth="751.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1">
<children>
<HBox alignment="CENTER_LEFT" prefHeight="50.0" prefWidth="600.0" spacing="10.0">
<children>
<JFXTextField promptText="任务名称" />
<JFXComboBox promptText="任务分组" />
<JFXComboBox promptText="任务状态" />
<HBox alignment="CENTER_RIGHT">
<children>
<JFXDatePicker maxWidth="-Infinity" prefWidth="120.0" promptText="开始时间">
<HBox.margin>
<Insets />
</HBox.margin>
<padding>
<Insets left="6.0" />
</padding>
</JFXDatePicker>
<Label text="-" />
<JFXDatePicker maxWidth="-Infinity" prefWidth="120.0" promptText="结束时间">
<padding>
<Insets left="6.0" />
</padding>
<HBox.margin>
<Insets />
</HBox.margin>
</JFXDatePicker>
</children>
</HBox>
<JFXButton text="重置" />
<JFXButton text="搜索" />
</children>
</HBox>
<VBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" VBox.vgrow="ALWAYS">
<children>
<HBox alignment="CENTER_LEFT" prefHeight="50.0" prefWidth="600.0" spacing="5.0">
<children>
<JFXButton text="清空" />
<JFXButton text="导出" />
</children>
</HBox>
<TableView prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS">
<columns>
<TableColumn prefWidth="75.0" text="日志编号" />
<TableColumn prefWidth="75.0" text="任务名称" />
<TableColumn prefWidth="75.0" text="任务分组" />
<TableColumn prefWidth="75.0" text="调用目标字符串" />
<TableColumn prefWidth="75.0" text="日志信息" />
<TableColumn prefWidth="75.0" text="状态" />
<TableColumn prefWidth="75.0" text="创建时间" />
<TableColumn prefWidth="75.0" text="操作" />
</columns>
<columnResizePolicy>
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
</columnResizePolicy>
</TableView>
</children>
</VBox>
</children>
</VBox>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXBadge?>
<?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXDatePicker?>
<?import com.jfoenix.controls.JFXDrawer?>
@@ -7,7 +8,7 @@
<?import com.jfoenix.controls.JFXHamburger?>
<?import com.jfoenix.controls.JFXListView?>
<?import com.jfoenix.controls.JFXTabPane?>
<?import com.jfoenix.controls.JFXToggleButton?>
<?import com.jfoenix.controls.JFXToggleNode?>
<?import com.jfoenix.transitions.hamburger.HamburgerSlideCloseTransition?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Label?>
@@ -54,12 +55,25 @@
</JFXDatePicker>
<HBox alignment="CENTER_RIGHT" spacing="5.0" HBox.hgrow="ALWAYS">
<JFXToggleButton fx:id="styleBut" text="暗色" />
<JFXButton fx:id="rolesBut" contentDisplay="GRAPHIC_ONLY" maxHeight="40.0" maxWidth="40.0" minHeight="40.0" minWidth="40.0" prefHeight="40.0" prefWidth="40.0" styleClass="tool-bar-button" text="user" textFill="WHITE" />
<HBox alignment="CENTER_RIGHT" HBox.hgrow="ALWAYS">
<JFXToggleNode fx:id="styleNode" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="40.0" prefWidth="40.0" styleClass="tool-bar-toggle" />
<JFXBadge maxHeight="-Infinity" maxWidth="-Infinity" prefHeight="40.0" prefWidth="45.0" styleClass="icons-badge" text="8">
<control>
<StackPane style="-fx-padding: 5;">
<JFXButton fx:id="bellButton" contentDisplay="GRAPHIC_ONLY" maxHeight="-Infinity" maxWidth="-Infinity" prefHeight="40.0" prefWidth="40.0" styleClass="tool-bar-button" text="1">
<StackPane.margin>
<Insets />
</StackPane.margin>
</JFXButton>
</StackPane>
</control>
</JFXBadge>
<VBox alignment="CENTER">
<Label fx:id="userLabel" maxWidth="1.7976931348623157E308" style="-fx-font-size: 16;-fx-font-weight: bold" text="李稳" VBox.vgrow="ALWAYS" />
<Label fx:id="roleLabel" maxWidth="1.7976931348623157E308" style="-fx-font-size: 10;" text="管理员" VBox.vgrow="ALWAYS" />
<padding>
<Insets left="7.0" />
</padding>
</VBox>
<JFXButton fx:id="userButton" contentDisplay="GRAPHIC_ONLY" maxHeight="20.0" maxWidth="20.0" minHeight="20.0" minWidth="20.0" prefHeight="20.0" prefWidth="20.0" styleClass="tool-bar-button" text="user" textFill="WHITE" />
<padding>

View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXSpinner?>
<?import com.jfoenix.controls.JFXTextField?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<StackPane fx:id="rootPane" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1">
<children>
<VBox fx:id="contentPane" prefHeight="200.0" prefWidth="100.0">
<children>
<HBox alignment="CENTER_LEFT" prefHeight="54.0" prefWidth="600.0" spacing="7.0">
<children>
<JFXTextField fx:id="userNameTextField" promptText="用户名" />
<JFXTextField fx:id="ipTextfiled" promptText="登录ip" />
<JFXButton fx:id="restButton" text="重置" />
<JFXButton fx:id="searchButton" text="搜索" />
</children>
</HBox>
<TableView fx:id="tableView" prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS">
<columns>
<TableColumn fx:id="numberColumn" maxWidth="75.0" minWidth="75.0" prefWidth="75.0" text="序号" />
<TableColumn fx:id="sessionNumberColumn" minWidth="80.0" text="会话编号" />
<TableColumn fx:id="loginNameColumn" minWidth="120.0" prefWidth="120.0" text="登录名称" />
<TableColumn fx:id="ipaddrColumn" minWidth="200.0" prefWidth="200.0" text="主机" />
<TableColumn fx:id="sessionStatusColumn" maxWidth="60.0" minWidth="60.0" prefWidth="60.0" text="会话状态" />
<TableColumn fx:id="loginTimeColumn" prefWidth="75.0" text="登录时间" />
<TableColumn fx:id="optColumn" maxWidth="100.0" minWidth="100.0" prefWidth="100.0" text="操作" />
</columns>
<columnResizePolicy>
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
</columnResizePolicy>
</TableView>
</children>
</VBox>
<JFXSpinner fx:id="spinner" radius="16.0" startingAngle="0.0" visible="false" />
</children>
</StackPane>

View File

@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXComboBox?>
<?import com.jfoenix.controls.JFXDialog?>
<?import com.jfoenix.controls.JFXDialogLayout?>
<?import com.jfoenix.controls.JFXProgressBar?>
<?import com.jfoenix.controls.JFXTextField?>
<?import javafx.collections.FXCollections?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<StackPane fx:id="rootPane" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1">
<children>
<VBox minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0">
<children>
<HBox alignment="CENTER_LEFT" prefHeight="50.0" prefWidth="600.0" spacing="5.0">
<children>
<JFXTextField fx:id="searchField" promptText="任务名称" />
<JFXComboBox fx:id="jobGroupComboBox" promptText="任务组">
<items>
<FXCollections fx:factory="observableArrayList">
<Label>所有</Label>
<Label>默认</Label>
<Label>系统</Label>
</FXCollections>
</items>
</JFXComboBox>
<JFXComboBox fx:id="jobStatusCommboBox" promptText="任务状态">
<items>
<FXCollections fx:factory="observableArrayList">
<Label>所有</Label>
<Label>正常</Label>
<Label>暂停</Label>
</FXCollections>
</items>
</JFXComboBox>
<JFXButton fx:id="searchButton" text="搜索" />
<JFXButton fx:id="resetButton" text="重置" />
<JFXButton fx:id="addJobButton" text="新增" />
<JFXButton fx:id="jobLogButton" text="日志" />
</children>
</HBox>
<VBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" VBox.vgrow="ALWAYS">
<children>
<TableView fx:id="tableView" prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS">
<columns>
<TableColumn fx:id="jobIdColumn" maxWidth="45.0" minWidth="40.0" prefWidth="45.0" text="序号" />
<TableColumn fx:id="jobNameColumn" prefWidth="75.0" text="任务名称" />
<TableColumn fx:id="jobGroupNameColumn" prefWidth="75.0" text="任务分组" />
<TableColumn fx:id="jobClassColumn" prefWidth="75.0" text="调用目标字符串" />
<TableColumn fx:id="jobDataColumn" prefWidth="75.0" text="调用参数" />
<TableColumn fx:id="jobTimeColumn" prefWidth="75.0" text="执行表达式" />
<TableColumn fx:id="jobStatusColumn" maxWidth="80.0" minWidth="80.0" text="任务状态" />
<TableColumn fx:id="operatingColumn" maxWidth="200.0" minWidth="200.0" prefWidth="200.0" text="操作" />
</columns>
<columnResizePolicy>
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
</columnResizePolicy>
</TableView>
</children>
</VBox>
</children>
</VBox>
<JFXDialog fx:id="dialog" overlayClose="false">
<JFXDialogLayout>
<heading>
<Label fx:id="dialogTitle">JFoenix Dialog</Label>
</heading>
<body>
<fx:include source="job_detail.fxml" />
</body>
<actions>
<JFXProgressBar fx:id="elementProgressBar" managed="false" maxWidth="1.7976931348623157E308" prefWidth="320" visible="false">
</JFXProgressBar>
<HBox fx:id="operatButPane">
<JFXButton fx:id="updateButton" buttonType="RAISED" text="更新" />
<JFXButton fx:id="saveButton" buttonType="RAISED" text="保存" />
</HBox>
<JFXButton fx:id="cancelButton" buttonType="RAISED" text="取消" />
</actions>
</JFXDialogLayout>
</JFXDialog>
</children>
</StackPane>

View File

@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXComboBox?>
<?import com.jfoenix.controls.JFXTextArea?>
<?import com.jfoenix.controls.JFXTextField?>
<?import javafx.collections.FXCollections?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>
<GridPane fx:id="jobDetailPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="428.0" prefWidth="433.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="62.0" minHeight="10.0" prefHeight="51.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="67.0" minHeight="10.0" prefHeight="42.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="125.0" minHeight="10.0" prefHeight="125.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<JFXTextField fx:id="jobNameTextField" labelFloat="true" promptText="*任务名称" />
<JFXComboBox fx:id="jobGroupNameComboBox" labelFloat="true" maxWidth="1.7976931348623157E308" promptText="任务分组" GridPane.rowIndex="1">
<items>
<FXCollections fx:factory="observableArrayList">
<Label>默认</Label>
<Label>系统</Label>
</FXCollections>
</items>
</JFXComboBox>
<JFXTextField fx:id="jobClassTextField" labelFloat="true" promptText="*调用目标字符串" GridPane.rowIndex="2" />
<VBox maxHeight="100.0" minHeight="100.0" spacing="7.0" GridPane.rowIndex="3" GridPane.rowSpan="2">
<children>
<JFXTextField fx:id="parameterTextField" labelFloat="true" promptText="调用目标参数" VBox.vgrow="ALWAYS" />
<Label disable="true" text="class示例: com.fx.server.job.TestJob" />
<Label disable="true" text="参数示例: abc 2D true 3L 4f 5" />
<Label disable="true" text="参数说明:支持字符串,布尔类型,长整型,浮点型,整型" />
</children>
</VBox>
<JFXTextField fx:id="jobTimeTextField" labelFloat="true" promptText="*cron表达式" GridPane.rowIndex="5" />
<JFXTextArea fx:id="detailedTextArea" labelFloat="true" maxHeight="-Infinity" minHeight="105.0" prefHeight="105.0" prefWidth="429.0" promptText="备注" GridPane.rowIndex="6" />
</children>
<padding>
<Insets left="10.0" right="10.0" />
</padding>
</GridPane>

View File

@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXComboBox?>
<?import com.jfoenix.controls.JFXDatePicker?>
<?import com.jfoenix.controls.JFXSpinner?>
<?import com.jfoenix.controls.JFXTextField?>
<?import javafx.collections.FXCollections?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Pagination?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<StackPane fx:id="root" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1">
<children>
<VBox fx:id="centPane" minHeight="-Infinity" minWidth="-Infinity" prefHeight="455.0" prefWidth="751.0">
<children>
<HBox alignment="CENTER_LEFT" prefHeight="50.0" prefWidth="600.0" spacing="10.0">
<children>
<JFXTextField fx:id="jobNameField" promptText="任务名称" />
<JFXComboBox fx:id="jobGroupComboBox" promptText="任务分组">
<items>
<FXCollections fx:factory="observableArrayList">
<Label>所有</Label>
<Label>默认</Label>
<Label>系统</Label>
</FXCollections>
</items>
</JFXComboBox>
<JFXComboBox fx:id="jobStatusComboBox" promptText="任务状态">
<items>
<FXCollections fx:factory="observableArrayList">
<Label>所有</Label>
<Label>成功</Label>
<Label>失败</Label>
</FXCollections>
</items>
</JFXComboBox>
<HBox alignment="CENTER_RIGHT">
<children>
<JFXDatePicker fx:id="beginDatePicker" maxWidth="-Infinity" prefWidth="120.0" promptText="开始时间">
<HBox.margin>
<Insets />
</HBox.margin>
<padding>
<Insets left="6.0" />
</padding>
</JFXDatePicker>
<Label text="-" />
<JFXDatePicker fx:id="endDatePicker" maxWidth="-Infinity" prefWidth="120.0" promptText="结束时间">
<padding>
<Insets left="6.0" />
</padding>
<HBox.margin>
<Insets />
</HBox.margin>
</JFXDatePicker>
</children>
</HBox>
<JFXButton fx:id="resetButton" text="重置" />
<JFXButton fx:id="searchButton" text="搜索" />
</children>
</HBox>
<AnchorPane VBox.vgrow="ALWAYS">
<children>
<TableView fx:id="tableView" prefHeight="200.0" prefWidth="200.0" AnchorPane.bottomAnchor="60.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<columns>
<TableColumn fx:id="sysJobNumberColumn" maxWidth="60.0" minWidth="60.0" prefWidth="60.0" text="日志编号" />
<TableColumn fx:id="jobNameColumn" maxWidth="120.0" minWidth="120.0" prefWidth="120.0" text="任务名称" />
<TableColumn fx:id="jobGroupColumn" maxWidth="100.0" minWidth="100.0" prefWidth="100.0" text="任务分组" />
<TableColumn fx:id="jobClassColumn" prefWidth="75.0" text="调用目标字符串" />
<TableColumn fx:id="jobInfoColumn" prefWidth="75.0" text="日志信息" />
<TableColumn fx:id="jobStatusColumn" maxWidth="60.0" minWidth="60.0" prefWidth="60.0" text="状态" />
<TableColumn fx:id="createTimeColumn" prefWidth="75.0" text="创建时间" />
<TableColumn fx:id="optIpColumn" maxWidth="60.0" minWidth="60.0" prefWidth="60.0" text="操作" />
</columns>
<columnResizePolicy>
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
</columnResizePolicy>
</TableView>
<Pagination fx:id="pagination" layoutY="358.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
</children>
</AnchorPane>
</children>
</VBox>
<JFXSpinner fx:id="spinner" radius="18.0" startingAngle="90.0" visible="false" />
</children>
</StackPane>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import javafx.scene.layout.AnchorPane?>
<AnchorPane id="waring" prefHeight="400.0" prefWidth="600.0" stylesheets="@../../css/app-dark.css" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fxml.test.Test">
<children>
<JFXButton layoutX="308.0" layoutY="39.0" styleClass="waringbut" />
</children>
</AnchorPane>

View File

@@ -17,7 +17,7 @@ sample-client.ribbon.ConnectTimeout = 60000
sample-client.ribbon.ReadTimeout = 60000
Archaius
sample-client.ribbon.listOfServers =localhost:8080,localhost:9080
sample-client.ribbon.listOfServers =localhost:8080
#启用主要连接

View File

@@ -104,6 +104,7 @@ public class MyStackedAreaChart<X, Y> extends LineChart<X, Y> {
VBox vBox = new VBox();
vBox.setSpacing(5);
vBox.getChildren().add(new Label(xValue.toString()));
for (int i = 0; i < getData().size(); i++) {
Series<X, Y> series = getData().get(i);
series.getNode().getStyle();

View File

@@ -29,10 +29,7 @@ public class StackedAreaChartApp extends Application {
private StackPane pane;
private CategoryAxis xAxis;
private NumberAxis yAxis;
private Circle selector;
private Line selectorLine;
private List<Path> strokePaths;
private Tooltip selectorTooltip;
public MyStackedAreaChart createContent() {
@@ -70,18 +67,11 @@ public class StackedAreaChartApp extends Application {
))
);
chart = new MyStackedAreaChart(xAxis, yAxis, areaChartData);
chart.setCreateSymbols(true);
chart.setCreateSymbols(false);
return chart;
}
private StackPane createPane(){
selectorLine = new Line();
selectorLine.setFill(Color.WHEAT);
selectorLine.setStrokeWidth(5f);
pane = new StackPane();
pane.getChildren().addAll(createContent(),selectorLine);
return pane;
}

View File

@@ -1,4 +1,4 @@
import com.epri.fx.server.vo.UserVO;
import com.fx.server.vo.UserVO;
import javafx.application.Application;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ListProperty;