Skip to content

Commit

Permalink
bugfix historical chart time expression format error (#822)
Browse files Browse the repository at this point in the history
Signed-off-by: sunqinbo <27339183@qq.com>

---------

Signed-off-by: sunqinbo <27339183@qq.com>
  • Loading branch information
sunqinbo authored and tomsun28 committed Mar 10, 2024
1 parent 4b5c265 commit 6415a74
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
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

0 comments on commit 6415a74

Please sign in to comment.