2024年3月10日16:15:58
parent
6cb6bb705f
commit
35d768dbd9
8
pom.xml
8
pom.xml
|
|
@ -94,12 +94,6 @@
|
|||
<artifactId>jackson-core</artifactId>
|
||||
<version>2.16.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>30.1-jre</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
|
|
@ -110,8 +104,6 @@
|
|||
<artifactId>tika-core</artifactId>
|
||||
<version>1.27</version> <!-- 请检查并使用最新版本 -->
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,12 @@
|
|||
package com.zhangmeng.minio;
|
||||
|
||||
import com.google.common.eventbus.Subscribe;
|
||||
import com.zhangmeng.minio.controller.MinioController;
|
||||
import com.zhangmeng.minio.message.Message;
|
||||
import com.zhangmeng.minio.utils.ConfigUtils;
|
||||
import com.zhangmeng.minio.utils.EventBusUtils;
|
||||
import com.zhangmeng.minio.utils.MinioUtils;
|
||||
import javafx.application.Application;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.stage.Stage;
|
||||
import lombok.extern.log4j.Log4j;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.log4j.spi.LoggerFactory;
|
||||
|
||||
|
||||
/**
|
||||
* @author zhangmeng
|
||||
|
|
@ -24,41 +17,10 @@ public class MiniToolsApplication extends Application {
|
|||
|
||||
@Override
|
||||
public void start(Stage primaryStage) throws Exception {
|
||||
|
||||
MinioUtils.objectMap.put(MinioUtils.primaryStage,primaryStage);
|
||||
|
||||
Parent root = FXMLLoader.load(this.getClass().getResource("/fxml/main.fxml"));
|
||||
primaryStage.setScene(new Scene(root));
|
||||
primaryStage.setTitle("javafx minio 工具");
|
||||
primaryStage.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
EventBusUtils.getDefault().register(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() throws Exception {
|
||||
EventBusUtils.getDefault().unregister(this);
|
||||
MinioController minioController = (MinioController) MinioUtils.objectMap.get(MinioUtils.minioController);
|
||||
if (minioController != null){
|
||||
EventBusUtils.getDefault().unregister(minioController);
|
||||
System.out.println("EventBusUtils.getDefault().unregister(minioController)");
|
||||
}
|
||||
System.out.println("EventBusUtils.getDefault().unregister(MiniToolsApplication) ");
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
launch(args);
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void handlerMessage(Message message){
|
||||
System.out.println(message.getMsg());
|
||||
MinioController minioController = (MinioController) MinioUtils.objectMap.get(MinioUtils.minioController);
|
||||
minioController.reload();
|
||||
|
||||
ConfigUtils.getDefaultConfig();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
package com.zhangmeng.minio;
|
||||
|
||||
import javafx.application.Application;
|
||||
|
||||
/**
|
||||
* @author zhangmeng
|
||||
* @version 1.0
|
||||
* @date 2024-03-10 15:56
|
||||
*/
|
||||
public class Start {
|
||||
public static void main(String[] args) {
|
||||
Application.launch(MiniToolsApplication.class,args);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,20 +1,15 @@
|
|||
package com.zhangmeng.minio.controller;
|
||||
|
||||
import com.zhangmeng.minio.message.Message;
|
||||
|
||||
import com.zhangmeng.minio.utils.AlertUtils;
|
||||
import com.zhangmeng.minio.utils.EventBusUtils;
|
||||
import com.zhangmeng.minio.utils.MinioUtils;
|
||||
import io.minio.MinioClient;
|
||||
import io.minio.messages.Bucket;
|
||||
import javafx.beans.value.ChangeListener;
|
||||
import javafx.beans.value.ObservableValue;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.ComboBox;
|
||||
import javafx.stage.Stage;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -53,7 +48,5 @@ public class BucketChooseController {
|
|||
MinioUtils.objectMap.put(MinioUtils.current_bucket,selectedItem);
|
||||
Stage stage = (Stage) MinioUtils.objectMap.get(MinioUtils.bucket_choose_action_stage);
|
||||
stage.close();
|
||||
|
||||
EventBusUtils.getDefault().post(new Message("save_choose ............."));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,93 +0,0 @@
|
|||
package com.zhangmeng.minio.controller;
|
||||
|
||||
import com.zhangmeng.minio.model.BucketFile;
|
||||
import com.zhangmeng.minio.utils.AlertUtils;
|
||||
import com.zhangmeng.minio.utils.MinioUtils;
|
||||
import javafx.collections.ObservableMap;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.event.EventHandler;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.geometry.Pos;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.layout.BorderPane;
|
||||
import javafx.scene.layout.Region;
|
||||
import javafx.scene.text.Text;
|
||||
import javafx.stage.Modality;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.stage.StageStyle;
|
||||
import javafx.stage.Window;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @author zhangmeng
|
||||
* @version 1.0
|
||||
* @date 2024-03-07 16:30
|
||||
*/
|
||||
public class BucketFileCell extends ListCell<BucketFile> {
|
||||
|
||||
private final Label label;
|
||||
private final BorderPane pane;
|
||||
|
||||
public BucketFileCell() {
|
||||
pane = new BorderPane();
|
||||
label = new Label();
|
||||
BorderPane.setAlignment(label, Pos.CENTER_LEFT);
|
||||
Button button = new Button();
|
||||
button.getStyleClass().add("remove-btn");
|
||||
button.setGraphic(new Region());
|
||||
button.setOnAction(event -> {
|
||||
|
||||
try {
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/fxml/alert.fxml"));
|
||||
Parent root = fxmlLoader.load();
|
||||
ObservableMap<String, Object> namespace = fxmlLoader.getNamespace();
|
||||
Button yes = (Button) namespace.get("yes");
|
||||
Button cancel = (Button) namespace.get("cancel");
|
||||
|
||||
Stage stage = AlertUtils.alert("文件删除",root,396,200, (Stage) MinioUtils.objectMap.get(MinioUtils.primaryStage));
|
||||
|
||||
yes.setOnAction(new EventHandler<ActionEvent>() {
|
||||
@Override
|
||||
public void handle(ActionEvent event) {
|
||||
if (getItem() == getListView().getSelectionModel().getSelectedItem()) {
|
||||
getListView().getSelectionModel().clearSelection();
|
||||
}
|
||||
getListView().getItems().remove(getItem());
|
||||
stage.close();
|
||||
}
|
||||
});
|
||||
|
||||
cancel.setOnAction(new EventHandler<ActionEvent>() {
|
||||
@Override
|
||||
public void handle(ActionEvent event) {
|
||||
stage.close();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
pane.setCenter(label);
|
||||
pane.setRight(button);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateItem(BucketFile item, boolean empty) {
|
||||
super.updateItem(item, empty);
|
||||
if (item == null || empty) {
|
||||
setGraphic(null);
|
||||
setText("");
|
||||
} else {
|
||||
String name = item.getFileName();
|
||||
label.setText(name.substring(0, name.length() - 4) );
|
||||
setGraphic(pane);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -14,6 +14,7 @@ import javafx.collections.ObservableMap;
|
|||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.control.cell.PropertyValueFactory;
|
||||
import javafx.scene.input.KeyCode;
|
||||
import javafx.scene.input.KeyCodeCombination;
|
||||
import javafx.scene.input.KeyCombination;
|
||||
|
|
@ -35,9 +36,6 @@ import java.util.Properties;
|
|||
*/
|
||||
public class MinioController {
|
||||
|
||||
@FXML
|
||||
public ListView<BucketFile> listView;
|
||||
|
||||
@FXML
|
||||
public AnchorPane center;
|
||||
|
||||
|
|
@ -84,6 +82,20 @@ public class MinioController {
|
|||
|
||||
private final ObservableList<String> backet_item_list = FXCollections.observableArrayList();
|
||||
|
||||
public TableView<BucketFile> tableview;
|
||||
|
||||
@FXML
|
||||
public TableColumn<BucketFile,String> file_name;
|
||||
|
||||
@FXML
|
||||
public TableColumn<BucketFile,Number> file_size;
|
||||
|
||||
@FXML
|
||||
public TableColumn<BucketFile,String> file_url;
|
||||
|
||||
@FXML
|
||||
public TableColumn<BucketFile,String> file_bucket;
|
||||
|
||||
private File upload_file;
|
||||
|
||||
public MinioController() {
|
||||
|
|
@ -92,8 +104,40 @@ public class MinioController {
|
|||
|
||||
@FXML
|
||||
public void initialize() {
|
||||
listView.setItems(list);
|
||||
listView.setCellFactory(fileListView -> new BucketFileCell());
|
||||
tableview.setItems(list);
|
||||
file_name.setCellValueFactory(new PropertyValueFactory<BucketFile,String>("fileName"));
|
||||
file_size.setCellValueFactory(new PropertyValueFactory<BucketFile,Number>("size"));
|
||||
file_url.setCellValueFactory(new PropertyValueFactory<BucketFile,String>("url"));
|
||||
file_bucket.setCellValueFactory(new PropertyValueFactory<BucketFile,String>("bucketName"));
|
||||
|
||||
file_name.prefWidthProperty().bind(tableview.widthProperty().divide(tableview.getColumns().size()));
|
||||
file_size.prefWidthProperty().bind(tableview.widthProperty().divide(tableview.getColumns().size()));
|
||||
file_url.prefWidthProperty().bind(tableview.widthProperty().divide(tableview.getColumns().size()));
|
||||
file_bucket.prefWidthProperty().bind(tableview.widthProperty().divide(tableview.getColumns().size()));
|
||||
|
||||
// 创建上下文菜单
|
||||
final ContextMenu contextMenu = new ContextMenu();
|
||||
MenuItem menuItem = new MenuItem("删除");
|
||||
menuItem.setOnAction(event -> {
|
||||
list.remove(tableview.getSelectionModel().getSelectedItem());
|
||||
});
|
||||
contextMenu.getItems().add(menuItem);
|
||||
// 添加事件监听器来处理上下文菜单的显示
|
||||
tableview.setOnContextMenuRequested(event -> {
|
||||
// 只有当表格有选中项时才显示上下文菜单
|
||||
if (!tableview.getSelectionModel().isEmpty()) {
|
||||
contextMenu.show(tableview, event.getScreenX(), event.getScreenY());
|
||||
}
|
||||
});
|
||||
|
||||
tableview.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<BucketFile>() {
|
||||
@Override
|
||||
public void changed(ObservableValue<? extends BucketFile> observable, BucketFile oldValue, BucketFile newValue) {
|
||||
if (newValue != null) {
|
||||
System.out.println(newValue.getFileName());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//绑定快捷键
|
||||
KeyCombination kc1 = KeyCombination.valueOf("ctrl+q");
|
||||
|
|
@ -309,7 +353,7 @@ public class MinioController {
|
|||
|
||||
@FXML
|
||||
private void bucket_choose_action(){
|
||||
Stage primaryStage = (Stage) this.listView.getScene().getWindow();
|
||||
Stage primaryStage = (Stage) this.choose_upload_file.getScene().getWindow();
|
||||
FXMLLoader fxmlLoader =new FXMLLoader( getClass().getResource("/fxml/bucket_choose.fxml"));
|
||||
AnchorPane bucket_choose = null;
|
||||
try {
|
||||
|
|
@ -323,7 +367,12 @@ public class MinioController {
|
|||
|
||||
@FXML
|
||||
public void reload(){
|
||||
String bucketName = MinioUtils.objectMap.get(MinioUtils.current_bucket).toString();
|
||||
Object obj = MinioUtils.objectMap.get(MinioUtils.current_bucket);
|
||||
if (obj == null){
|
||||
AlertUtils.alert_warning("请选择bucket再试");
|
||||
return;
|
||||
}
|
||||
String bucketName = obj.toString();
|
||||
List<BucketFile> bucketFiles = MinioUtils.getFileList(bucketName);
|
||||
if (bucketFiles.size()>0){
|
||||
list.clear();
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
package com.zhangmeng.minio.message;
|
||||
|
||||
/**
|
||||
* @author zhangmeng
|
||||
* @version 1.0
|
||||
* @date 2024-03-08 10:19
|
||||
*/
|
||||
public class Message {
|
||||
|
||||
private String msg ;
|
||||
|
||||
public Message(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
package com.zhangmeng.minio.utils;
|
||||
|
||||
|
||||
import org.apache.commons.configuration2.Configuration;
|
||||
import org.apache.commons.configuration2.ex.ConfigurationException;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
* @author zhangmeng
|
||||
* @version 1.0
|
||||
* @date 2024-03-08 14:17
|
||||
*/
|
||||
public class ConfigUtils {
|
||||
|
||||
public static void getDefaultConfig(){
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static class MinioConfig {
|
||||
|
||||
private String endpoint;
|
||||
private String accessKey;
|
||||
private String secretKey;
|
||||
|
||||
public MinioConfig() {
|
||||
}
|
||||
|
||||
public MinioConfig(String endpoint, String accessKey, String secretKey) {
|
||||
this.endpoint = endpoint;
|
||||
this.accessKey = accessKey;
|
||||
this.secretKey = secretKey;
|
||||
}
|
||||
|
||||
public String getEndpoint() {
|
||||
return endpoint;
|
||||
}
|
||||
|
||||
public void setEndpoint(String endpoint) {
|
||||
this.endpoint = endpoint;
|
||||
}
|
||||
|
||||
public String getAccessKey() {
|
||||
return accessKey;
|
||||
}
|
||||
|
||||
public void setAccessKey(String accessKey) {
|
||||
this.accessKey = accessKey;
|
||||
}
|
||||
|
||||
public String getSecretKey() {
|
||||
return secretKey;
|
||||
}
|
||||
|
||||
public void setSecretKey(String secretKey) {
|
||||
this.secretKey = secretKey;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -34,9 +34,9 @@ public class MinioUtils {
|
|||
|
||||
private static MinioClient minioClient = null;
|
||||
|
||||
private static String endpoint = "http://192.168.1.254:9000";
|
||||
private static String accessKey = "minioadmin";
|
||||
private static String secretKey = "minioadmin";
|
||||
// private static String endpoint = "http://192.168.1.254:9000";
|
||||
// private static String accessKey = "minioadmin";
|
||||
// private static String secretKey = "minioadmin";
|
||||
|
||||
public static Map<String,Object> objectMap = new HashMap<>();
|
||||
public static String current_bucket = "current_bucket";
|
||||
|
|
@ -46,7 +46,29 @@ public class MinioUtils {
|
|||
|
||||
public static MinioClient getDefault() {
|
||||
if (minioClient == null) {
|
||||
minioClient = MinioClient.builder().endpoint(endpoint).credentials(accessKey, secretKey).build();
|
||||
Object endpoint = objectMap.get("endpoint");
|
||||
Object accessKey = objectMap.get("accessKey");
|
||||
Object secretKey = objectMap.get("secretKey");
|
||||
if (endpoint == null ){
|
||||
Platform.runLater(()->{
|
||||
AlertUtils.alert_warning("配置文件:endpoint 为空");
|
||||
});
|
||||
return null;
|
||||
}
|
||||
if (accessKey == null ){
|
||||
Platform.runLater(()->{
|
||||
AlertUtils.alert_warning("配置文件:accessKey 为空");
|
||||
});
|
||||
return null;
|
||||
}
|
||||
|
||||
if (secretKey == null ){
|
||||
Platform.runLater(()->{
|
||||
AlertUtils.alert_warning("配置文件:secretKey 为空");
|
||||
});
|
||||
return null;
|
||||
}
|
||||
minioClient = MinioClient.builder().endpoint(endpoint.toString()).credentials(accessKey.toString(), secretKey.toString()).build();
|
||||
}
|
||||
return minioClient;
|
||||
}
|
||||
|
|
@ -143,6 +165,7 @@ public class MinioUtils {
|
|||
if (itemList.size() > 0 ){
|
||||
list = itemList.stream().map(i -> {
|
||||
BucketFile bucketFile = new BucketFile();
|
||||
bucketFile.setBucketName(bucketName);
|
||||
bucketFile.setDir(i.isDir());
|
||||
bucketFile.setFileName(i.objectName());
|
||||
bucketFile.setSize(i.size());
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
/**
|
||||
* @author zhangmeng
|
||||
* @date 2024-03-07 14:29
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
open module javafx.tools.minio {
|
||||
requires com.google.common;
|
||||
requires javafx.controls;
|
||||
requires javafx.media;
|
||||
requires javafx.fxml;
|
||||
requires rxcontrols;
|
||||
requires minio;
|
||||
requires lombok;
|
||||
requires com.fasterxml.jackson.core;
|
||||
requires log4j;
|
||||
requires org.apache.commons.lang3;
|
||||
requires tika.core;
|
||||
requires org.apache.commons.configuration2;
|
||||
}
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
.root{
|
||||
/*-fx-background-image: url(../img/sunset.jpg);*/
|
||||
/*-fx-background-size: 1200;*/
|
||||
|
||||
-base-hover-color: #1ECE9A;
|
||||
}
|
||||
|
||||
.split-pane{
|
||||
/*-fx-background-image: url(../img/sunset.jpg);*/
|
||||
-fx-background-size: 1200;
|
||||
-fx-background-color: white;
|
||||
}
|
||||
|
||||
.list-view{
|
||||
-fx-font-size: 14;
|
||||
-fx-focus-color: #0000;
|
||||
-fx-faint-focus-color: #0000;
|
||||
-fx-background-color: white;
|
||||
}
|
||||
|
||||
.list-cell {
|
||||
-fx-pref-height: 40;
|
||||
-fx-background-color: null;
|
||||
}
|
||||
|
||||
.list-cell:hover,
|
||||
.list-cell:selected {
|
||||
-fx-background-color: #F8F8F8;
|
||||
}
|
||||
|
||||
.list-cell:hover .label,
|
||||
.list-cell:selected .label {
|
||||
-fx-text-fill: -base-hover-color;
|
||||
}
|
||||
|
||||
.menu-bar{
|
||||
-fx-background-color: #beebb6;
|
||||
-fx-text-fill: black;
|
||||
}
|
||||
|
||||
.list-cell .remove-btn {
|
||||
-fx-background-color: null;
|
||||
-fx-pref-height: 20;
|
||||
-fx-pref-width: 38;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.list-cell .remove-btn Region {
|
||||
-fx-background-color: -base-hover-color;
|
||||
-fx-shape: "M798.938839 1017.751676h-497.58838a120.584726 120.584726 0 0 1-123.951493-118.62903V274.661607a29.706769 29.706769 0 0 1 31.910021-29.186901 30.89504 30.89504 0 0 1 31.885265 29.186901v624.461039a60.131451 60.131451 0 0 0 62.01288 58.349045h497.58838a61.319722 61.319722 0 0 0 62.01288-58.349045V274.661607a29.706769 29.706769 0 0 1 31.885266-29.186901 30.919795 30.919795 0 0 1 31.910021 29.186901v624.461039a125.189275 125.189275 0 0 1-127.615329 118.62903z m-92.041472-178.933771a30.89504 30.89504 0 0 1-31.885266-29.186901V393.315393a29.855303 29.855303 0 0 1 31.885266-29.261168 30.919795 30.919795 0 0 1 31.910021 29.261168v416.241344a32.182333 32.182333 0 0 1-31.910021 29.36019z m-155.960537 0a30.89504 30.89504 0 0 1-31.885266-29.186901V393.315393a29.706769 29.706769 0 0 1 31.885266-29.261168 30.969307 30.969307 0 0 1 31.910021 29.261168v416.241344a30.919795 30.919795 0 0 1-31.786243 29.36019z m-155.960537 0a30.870284 30.870284 0 0 1-31.910021-29.186901V393.315393a29.706769 29.706769 0 0 1 31.910021-29.261168 30.969307 30.969307 0 0 1 31.910021 29.261168v416.241344a30.919795 30.919795 0 0 1-31.662465 29.36019zM1063.551883 214.431133H38.098975A30.89504 30.89504 0 0 1 6.188954 185.268988a29.706769 29.706769 0 0 1 31.910021-29.261168H332.963412V95.802102A91.37307 91.37307 0 0 1 426.886314 6.31046h247.878231a92.561341 92.561341 0 0 1 93.898145 89.491642v60.205718h294.889193a29.335434 29.335434 0 1 1 0 58.423313zM394.976293 154.225414h311.673517V93.920673a29.706769 29.706769 0 0 0-31.885265-29.162145H426.886314a30.89504 30.89504 0 0 0-31.910021 29.162145zM799.013106 1023.940586h-497.58838a126.253768 126.253768 0 0 1-130.115648-124.842696V274.661607a35.994702 35.994702 0 0 1 38.098931-35.375811 36.861149 36.861149 0 0 1 38.074176 35.375811v624.436283a54.165342 54.165342 0 0 0 55.82397 52.184891h497.58838a55.526902 55.526902 0 0 0 55.82397-52.184891V274.661607a35.994702 35.994702 0 0 1 38.098931-35.375811 36.836393 36.836393 0 0 1 38.074175 35.375811v624.436283a130.586005 130.586005 0 0 1-133.878505 124.842696z m-589.728875-772.375992a23.666393 23.666393 0 0 0-25.721111 22.99799V898.998867a113.875948 113.875948 0 0 0 117.737828 112.464877h497.58838a119.693523 119.693523 0 0 0 121.30264-112.61341V274.661607a24.755641 24.755641 0 0 0-25.696355-22.997991 23.666393 23.666393 0 0 0-25.721111 22.997991v624.436283a67.360099 67.360099 0 0 1-68.201791 64.562711h-497.58838a66.518407 66.518407 0 0 1-68.20179-64.562711V274.661607a24.755641 24.755641 0 0 0-25.49831-22.997991z m497.58838 593.343198a36.861149 36.861149 0 0 1-38.098931-35.37581V393.315393a36.019457 36.019457 0 0 1 38.098931-35.450078 36.885905 36.885905 0 0 1 38.074175 35.450078v416.241344a38.371243 38.371243 0 0 1-38.049419 35.375811z m0-474.689412a23.691148 23.691148 0 0 0-25.721111 23.072257v416.241345a24.755641 24.755641 0 0 0 25.696355 22.99799 25.8944 25.8944 0 0 0 25.745867-23.56737v-415.647209a24.755641 24.755641 0 0 0-25.696355-22.99799z m-155.960537 474.689412a36.861149 36.861149 0 0 1-38.098931-35.37581V393.315393a36.019457 36.019457 0 0 1 38.098931-35.450078 36.885905 36.885905 0 0 1 38.074175 35.450078v416.241344a36.836393 36.836393 0 0 1-37.925641 35.450078z m0-474.689412a23.691148 23.691148 0 0 0-25.721111 23.072257v416.241345a25.869645 25.869645 0 0 0 51.417466 0V393.315393a24.755641 24.755641 0 0 0-25.547821-22.99799z m-155.960537 474.689412a36.861149 36.861149 0 0 1-38.098931-35.37581V393.315393a36.019457 36.019457 0 0 1 38.098931-35.450078 36.91066 36.91066 0 0 1 38.098931 35.450078v416.241344a36.861149 36.861149 0 0 1-37.826619 35.450078z m0-474.689412a23.691148 23.691148 0 0 0-25.721111 23.072257v416.241345a25.8944 25.8944 0 0 0 51.442222 0V393.315393a24.755641 24.755641 0 0 0-25.448799-22.99799zM1063.502372 220.52102H38.049464A36.836393 36.836393 0 0 1-0.024712 185.169965a36.019457 36.019457 0 0 1 38.074176-35.450077H326.774502V95.678324a98.032338 98.032338 0 0 1 100.087056-95.655796h247.853476a99.27012 99.27012 0 0 1 100.111811 95.655796v54.041564H1063.502372a36.885905 36.885905 0 0 1 38.098931 35.450077 37.306751 37.306751 0 0 1-37.826619 35.450078zM38.049464 162.097708a23.666393 23.666393 0 0 0-25.696355 23.072257 24.755641 24.755641 0 0 0 25.696355 22.973235H1063.502372a23.17128 23.17128 0 1 0 0-46.045492H762.449025V95.678324A86.644743 86.644743 0 0 0 674.715034 12.400348H426.861558A85.679273 85.679273 0 0 0 339.152323 95.678324v66.419384z m674.764501-1.782406h-324.051338V93.821651a36.861149 36.861149 0 0 1 38.098931-35.375811h247.853476a36.019457 36.019457 0 0 1 38.098931 35.375811z m-311.673518-12.377821h299.295697V93.821651a23.666393 23.666393 0 0 0-25.72111-22.997991H426.861558a24.755641 24.755641 0 0 0-25.721111 22.997991z";
|
||||
}
|
||||
|
||||
.list-cell:hover .remove-btn,
|
||||
.list-cell:selected .remove-btn {
|
||||
visibility: visible;
|
||||
}
|
||||
|
|
@ -3,11 +3,9 @@
|
|||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.ComboBox?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.ListView?>
|
||||
<?import javafx.scene.control.Menu?>
|
||||
<?import javafx.scene.control.MenuBar?>
|
||||
<?import javafx.scene.control.MenuItem?>
|
||||
<?import javafx.scene.control.SplitPane?>
|
||||
<?import javafx.scene.control.TableColumn?>
|
||||
<?import javafx.scene.control.TableView?>
|
||||
<?import javafx.scene.control.TextField?>
|
||||
|
|
@ -15,37 +13,35 @@
|
|||
|
||||
<AnchorPane prefHeight="649" prefWidth="1200" stylesheets="@../css/main.css" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.zhangmeng.minio.controller.MinioController">
|
||||
<children>
|
||||
<SplitPane dividerPositions="0.5" layoutX="40.0" layoutY="63.0" prefHeight="200.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="25.0">
|
||||
<items>
|
||||
<ListView fx:id="listView" maxWidth="300.0" minWidth="100.0" />
|
||||
<AnchorPane fx:id="center" prefHeight="200.0" prefWidth="200.0">
|
||||
<children>
|
||||
<Label layoutX="57.0" layoutY="53.0" text="endpoint :" />
|
||||
<Label layoutX="55.0" layoutY="119.0" text="accessKey :" />
|
||||
<Label layoutX="56.0" layoutY="181.0" text="secretKey :" />
|
||||
<TextField fx:id="endpoint" layoutX="143.0" layoutY="49.0" prefHeight="23.0" prefWidth="207.0" />
|
||||
<TextField fx:id="accessKey" layoutX="143.0" layoutY="115.0" prefHeight="23.0" prefWidth="207.0" />
|
||||
<TextField fx:id="secretKey" layoutX="143.0" layoutY="177.0" prefHeight="23.0" prefWidth="207.0" />
|
||||
<ComboBox fx:id="backet_list" layoutX="500.0" layoutY="114.0" prefHeight="25.0" prefWidth="207.0" />
|
||||
<Label layoutX="391.0" layoutY="119.0" text="backetList :" />
|
||||
<Button fx:id="save_config" layoutX="215.0" layoutY="233.0" mnemonicParsing="false" text="保存配置" />
|
||||
<TableView layoutX="378.0" layoutY="287.0" prefHeight="335.0" prefWidth="892.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="287.0">
|
||||
<columns>
|
||||
<TableColumn prefWidth="270.0" text="文件名称" />
|
||||
<TableColumn prefWidth="133.0" text="文件大小" />
|
||||
<TableColumn prefWidth="488.0" text="文件url" />
|
||||
</columns>
|
||||
</TableView>
|
||||
<Label layoutX="391.0" layoutY="53.0" text="createBucket :" />
|
||||
<TextField fx:id="bucket_name" layoutX="500.0" layoutY="49.0" />
|
||||
<Button fx:id="bucket_btn" layoutX="677.0" layoutY="49.0" mnemonicParsing="false" text="创建bucket" />
|
||||
<Label layoutX="394.0" layoutY="181.0" text="上传文件 :" />
|
||||
<TextField fx:id="upload_path" layoutX="500.0" layoutY="177.0" prefHeight="23.0" prefWidth="207.0" />
|
||||
<Button fx:id="upload" layoutX="792.0" layoutY="177.0" mnemonicParsing="false" text="上传" />
|
||||
<Button fx:id="choose_upload_file" layoutX="717.0" layoutY="177.0" mnemonicParsing="false" text="选择文件" />
|
||||
</children></AnchorPane>
|
||||
</items>
|
||||
</SplitPane>
|
||||
<AnchorPane fx:id="center" layoutY="25.0" prefHeight="623.0" prefWidth="1200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="25.0">
|
||||
<children>
|
||||
<Label layoutX="57.0" layoutY="53.0" text="endpoint :" />
|
||||
<Label layoutX="55.0" layoutY="119.0" text="accessKey :" />
|
||||
<Label layoutX="56.0" layoutY="181.0" text="secretKey :" />
|
||||
<TextField fx:id="endpoint" layoutX="143.0" layoutY="49.0" prefHeight="23.0" prefWidth="207.0" />
|
||||
<TextField fx:id="accessKey" layoutX="143.0" layoutY="115.0" prefHeight="23.0" prefWidth="207.0" />
|
||||
<TextField fx:id="secretKey" layoutX="143.0" layoutY="177.0" prefHeight="23.0" prefWidth="207.0" />
|
||||
<ComboBox fx:id="backet_list" layoutX="500.0" layoutY="114.0" prefHeight="25.0" prefWidth="207.0" />
|
||||
<Label layoutX="391.0" layoutY="119.0" text="backetList :" />
|
||||
<Button fx:id="save_config" layoutX="215.0" layoutY="233.0" mnemonicParsing="false" text="保存配置" />
|
||||
<TableView fx:id="tableview" layoutX="378.0" layoutY="277.0" prefHeight="347.0" prefWidth="1200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="277.0">
|
||||
<columns>
|
||||
<TableColumn fx:id="file_bucket" prefWidth="300.0" text="bucket名称" />
|
||||
<TableColumn fx:id="file_name" prefWidth="270.0" text="文件名称" />
|
||||
<TableColumn fx:id="file_size" prefWidth="133.0" text="文件大小" />
|
||||
<TableColumn fx:id="file_url" prefWidth="496.0" text="文件url" />
|
||||
|
||||
</columns>
|
||||
</TableView>
|
||||
<Label layoutX="391.0" layoutY="53.0" text="createBucket :" />
|
||||
<TextField fx:id="bucket_name" layoutX="500.0" layoutY="49.0" />
|
||||
<Button fx:id="bucket_btn" layoutX="677.0" layoutY="49.0" mnemonicParsing="false" text="创建bucket" />
|
||||
<Label layoutX="394.0" layoutY="181.0" text="上传文件 :" />
|
||||
<TextField fx:id="upload_path" layoutX="500.0" layoutY="177.0" prefHeight="23.0" prefWidth="207.0" />
|
||||
<Button fx:id="upload" layoutX="792.0" layoutY="177.0" mnemonicParsing="false" text="上传" />
|
||||
<Button fx:id="choose_upload_file" layoutX="717.0" layoutY="177.0" mnemonicParsing="false" text="选择文件" />
|
||||
</children>
|
||||
</AnchorPane>
|
||||
<MenuBar prefHeight="25.0" prefWidth="240.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0">
|
||||
<menus>
|
||||
<Menu mnemonicParsing="false" text="配置">
|
||||
|
|
|
|||
Loading…
Reference in New Issue