Skip to content

Commit 0d2bd79

Browse files
authored
Merge pull request #221 from Dokyeongyun/ft-220423-removeAlertLogDateFormat
Ft 220423 removeAlertLogDateFormat
2 parents f80d991 + 5f993cd commit 0d2bd79

File tree

5 files changed

+2
-41
lines changed

5 files changed

+2
-41
lines changed

config/common.properties

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
db.setting.contents=host,sid,user,password,port,driver,url
44
db.setting.oracle.driver.combo=thin
55

6-
# Server Setting Contents
7-
server.setting.dateformat.combo=yyyy-MM-dd,EEE MMM dd HH:mm:ss yyyy
8-
96
# DB Monitoring Contents
107
db.monitoring.contents=Archive Usage,TableSpace Usage,ASM Disk Usage
118

src/main/java/root/core/domain/AlertLogCommand.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,12 @@
88
public class AlertLogCommand {
99
private int readLine;
1010
private String readFilePath;
11-
private String dateFormat;
12-
private String dateFormatRegex;
1311
private String[] catchErrorMsg;
1412

1513
public AlertLogCommand(int readLine, String readFilePath) {
1614
this.readLine = readLine;
1715
this.readFilePath = readFilePath;
1816
}
19-
20-
public AlertLogCommand(int readLine, String readFilePath, String dateFormat, String dateFormatRegex) {
21-
this.readLine = readLine;
22-
this.readFilePath = readFilePath;
23-
this.dateFormat = dateFormat;
24-
this.dateFormatRegex = dateFormatRegex;
25-
}
2617

2718
public AlertLogCommand(int readLine, String readFilePath, String... catchErrorMsg) {
2819
this.readLine = readLine;

src/main/java/root/core/repository/implement/PropertyRepositoryImpl.java

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -195,18 +195,6 @@ public void saveServerConnectionInfo(String filePath, Map<String, JschConnection
195195
config.setProperty(serverName + ".server.port", jsch.getPort());
196196
config.setProperty(serverName + ".server.username", jsch.getUserName());
197197
config.setProperty(serverName + ".server.password", jsch.getPassword());
198-
199-
String dateFormat = jsch.getAlc().getDateFormat();
200-
String dateFormatRegex = "";
201-
202-
if (dateFormat.equals("EEE MMM dd HH:mm:ss yyyy")) {
203-
dateFormatRegex = "...\\s...\\s([0-2][0-9]|1[012])\\s\\d\\d:\\d\\d:\\d\\d\\s\\d{4}";
204-
} else if (dateFormat.equals("yyyy-MM-dd")) {
205-
dateFormatRegex = "\\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T";
206-
}
207-
208-
config.setProperty(serverName + ".server.alertlog.dateformat", dateFormat);
209-
config.setProperty(serverName + ".server.alertlog.dateformatregex", dateFormatRegex);
210198
config.setProperty(serverName + ".server.alertlog.filepath", jsch.getAlc().getReadFilePath());
211199
config.setProperty(serverName + ".server.alertlog.readline", 500);
212200
}
@@ -553,10 +541,7 @@ public JschConnectionInfo getJschConnectionInfo(String serverName) {
553541
public AlertLogCommand getAlertLogCommand(String serverName) {
554542
String alertLogFilePath = connInfoConfig.getString(serverName + ".server.alertlog.filepath");
555543
int alertLogReadLine = connInfoConfig.getInt(serverName + ".server.alertlog.readline");
556-
String alertLogDateFormat = connInfoConfig.getString(serverName + ".server.alertlog.dateformat");
557-
String alertLogDateFormatRegex = connInfoConfig.getString(serverName + ".server.alertlog.dateformatregex");
558-
AlertLogCommand alc = new AlertLogCommand(alertLogReadLine, alertLogFilePath, alertLogDateFormat,
559-
alertLogDateFormatRegex);
544+
AlertLogCommand alc = new AlertLogCommand(alertLogReadLine, alertLogFilePath);
560545
return alc;
561546
}
562547

src/main/java/root/javafx/CustomView/ServerConnectionInfoAnchorPane.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ public class ServerConnectionInfoAnchorPane extends ConnectionInfoAP {
4949
@FXML
5050
TextField alertLogFilePathTF;
5151

52-
@FXML
53-
JFXComboBox<String> alertLogDateFormatCB;
54-
5552
public ServerConnectionInfoAnchorPane() {
5653
try {
5754
FXMLLoader loader = DependencyInjection.getLoader("/fxml/ServerConnectionInfoAnchorPane.fxml");
@@ -73,10 +70,6 @@ public void init() {
7370
// Set textFormatter
7471
portTF.setTextFormatter(new NumberTextFormatter());
7572

76-
// Set AlertLogDateFormat ComboBox values
77-
alertLogDateFormatCB.getItems()
78-
.addAll(propertyRepository.getCommonResources("server.setting.dateformat.combo"));
79-
8073
// Set ServerOS ComboBox values
8174
serverOSCB.getItems().addAll(ServerOS.values());
8275
}
@@ -89,7 +82,6 @@ public void setInitialValue(JschConnectionInfo jsch) {
8982
userTF.setText(jsch.getUserName());
9083
passwordPF.setText(jsch.getPassword());
9184
alertLogFilePathTF.setText(jsch.getAlc().getReadFilePath());
92-
alertLogDateFormatCB.getSelectionModel().select(jsch.getAlc().getDateFormat());
9385
}
9486

9587
public JschConnectionInfo getInputValues() {
@@ -102,7 +94,6 @@ public JschConnectionInfo getInputValues() {
10294
jsch.setPassword(passwordPF.getText());
10395
AlertLogCommand alc = new AlertLogCommand();
10496
alc.setReadFilePath(alertLogFilePathTF.getText());
105-
alc.setDateFormat(alertLogDateFormatCB.getSelectionModel().getSelectedItem());
10697
jsch.setAlc(alc);
10798
return jsch;
10899
}
@@ -116,6 +107,6 @@ public boolean isAnyEmptyInput() {
116107

117108
return StringUtils.isAnyEmpty(serverOS.name(), hostTF.getText(),
118109
portTF.getText(), userTF.getText(), serverNameTF.getText(), passwordPF.getText(),
119-
alertLogFilePathTF.getText(), alertLogDateFormatCB.getSelectionModel().getSelectedItem());
110+
alertLogFilePathTF.getText());
120111
}
121112
}

src/main/resources/fxml/ServerConnectionInfoAnchorPane.fxml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
<RowConstraints minHeight="30.0" percentHeight="24.0" vgrow="SOMETIMES" />
2525
<RowConstraints minHeight="30.0" percentHeight="24.0" vgrow="SOMETIMES" />
2626
<RowConstraints minHeight="30.0" percentHeight="24.0" vgrow="SOMETIMES" />
27-
<RowConstraints minHeight="30.0" percentHeight="24.0" vgrow="SOMETIMES" />
2827
</rowConstraints>
2928
<children>
3029
<Label style="-fx-font-size: 11px;" styleClass="basic-font" text="Host :" />
@@ -47,8 +46,6 @@
4746
<TextField fx:id="portTF" GridPane.columnIndex="3" />
4847
<TextField fx:id="hostTF" prefWidth="200.0" GridPane.columnIndex="1" />
4948
<PasswordField fx:id="passwordPF" prefWidth="200.0" promptText="hidden" GridPane.columnIndex="1" GridPane.columnSpan="2" GridPane.rowIndex="2" />
50-
<Label style="-fx-font-size: 11px;" styleClass="basic-font" stylesheets="@../css/javaFx.css" text="AlertLog DateFormat :" GridPane.rowIndex="4" />
51-
<JFXComboBox fx:id="alertLogDateFormatCB" prefWidth="424.0" GridPane.columnIndex="1" GridPane.rowIndex="4" />
5249
<Label style="-fx-font-size: 11px;" styleClass="basic-font" stylesheets="@../css/javaFx.css" text="Server OS" GridPane.columnIndex="2" GridPane.rowIndex="2">
5350
<padding>
5451
<Insets left="10.0" />

0 commit comments

Comments
 (0)