Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix historical chart time expression format error #822

Merged
merged 2 commits into from
Mar 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,11 @@ public List<Hierarchy> getAllAppHierarchy(String lang) {
@Override
public String getMonitorDefineFileContent(String app) {
String classpath = this.getClass().getClassLoader().getResource("").getPath();
String defineAppPath = classpath + File.separator + "define" + File.separator + "app-" + app + ".yml";
String defineAppPath = classpath + "define" + File.separator + "app-" + app + ".yml";
File defineAppFile = new File(defineAppPath);
if (!defineAppFile.exists() || !defineAppFile.isFile()) {
classpath = this.getClass().getResource(File.separator).getPath();
defineAppPath = classpath + File.separator + "define" + File.separator + "app-" + app + ".yml";
defineAppPath = classpath + "define" + File.separator + "app-" + app + ".yml";
defineAppFile = new File(defineAppPath);
if (!defineAppFile.exists() || !defineAppFile.isFile()) {
try {
Expand Down Expand Up @@ -225,7 +225,7 @@ public void applyMonitorDefineYml(String ymlContent) {
// app params verify
verifyDefineAppContent(app);
String classpath = this.getClass().getClassLoader().getResource("").getPath();
String defineAppPath = classpath + File.separator + "define" + File.separator + "app-" + app.getApp() + ".yml";
String defineAppPath = classpath + "define" + File.separator + "app-" + app.getApp() + ".yml";
File defineAppFile = new File(defineAppPath);
try {
FileUtils.writeStringToFile(defineAppFile, ymlContent, StandardCharsets.UTF_8, false);
Expand Down Expand Up @@ -253,7 +253,7 @@ public void deleteMonitorDefine(String app) {
throw new IllegalArgumentException("Can not delete define which has monitoring instances.");
}
String classpath = this.getClass().getClassLoader().getResource("").getPath();
String defineAppPath = classpath + File.separator + "define" + File.separator + "app-" + app + ".yml";
String defineAppPath = classpath + "define" + File.separator + "app-" + app + ".yml";
File defineAppFile = new File(defineAppPath);
if (defineAppFile.exists() && defineAppFile.isFile()) {
defineAppFile.delete();
Expand All @@ -273,15 +273,15 @@ public void run(String... args) throws Exception {
loadFromFile = false;
} else {
String classpath = rootUrl.getPath();
defineAppPath = classpath + File.separator + "define";
defineAppPath = classpath + "define";
directory = new File(defineAppPath);
if (!directory.exists() || directory.listFiles() == null) {
rootUrl = this.getClass().getResource(File.separator);
if (rootUrl == null) {
loadFromFile = false;
} else {
classpath = rootUrl.getPath();
defineAppPath = classpath + File.separator + "define";
defineAppPath = classpath + "define";
directory = new File(defineAppPath);
if (!directory.exists() || directory.listFiles() == null) {
loadFromFile = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class MonitorDataChartComponent implements OnInit {
}
},
onclick: () => {
this.loadData('1d');
this.loadData('1D');
}
},
myPeriod1w: {
Expand All @@ -119,7 +119,7 @@ export class MonitorDataChartComponent implements OnInit {
}
},
onclick: () => {
this.loadData('1w', true);
this.loadData('1W', true);
}
},
myPeriod4w: {
Expand All @@ -132,7 +132,7 @@ export class MonitorDataChartComponent implements OnInit {
}
},
onclick: () => {
this.loadData('4w', true);
this.loadData('1M', true);
}
},
myPeriod3m: {
Expand All @@ -145,7 +145,7 @@ export class MonitorDataChartComponent implements OnInit {
}
},
onclick: () => {
this.loadData('12w', true);
this.loadData('3M', true);
}
},
myRefresh: {
Expand Down