-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
323 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
src/main/java/si/matjazcerkvenik/alertmonitor/web/uibeans/InstanceStatuses.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
package si.matjazcerkvenik.alertmonitor.web.uibeans; | ||
|
||
public class InstanceStatuses { | ||
|
||
private String instance; | ||
private String job; | ||
private String scrapeInterval; | ||
private String status; | ||
private String downTime; | ||
private String availability; | ||
private String MTBF; | ||
|
||
public String getInstance() { | ||
return instance; | ||
} | ||
|
||
public void setInstance(String instance) { | ||
this.instance = instance; | ||
} | ||
|
||
public String getJob() { | ||
return job; | ||
} | ||
|
||
public void setJob(String job) { | ||
this.job = job; | ||
} | ||
|
||
public String getScrapeInterval() { | ||
return scrapeInterval; | ||
} | ||
|
||
public void setScrapeInterval(String scrapeInterval) { | ||
this.scrapeInterval = scrapeInterval; | ||
} | ||
|
||
public String getStatus() { | ||
return status; | ||
} | ||
|
||
public void setStatus(String status) { | ||
if (status.equalsIgnoreCase("0")) this.status = "DOWN"; | ||
if (status.equalsIgnoreCase("1")) this.status = "UP"; | ||
} | ||
|
||
/** | ||
* Return red if DOWN and green if UP. | ||
* @return color | ||
*/ | ||
public String getStatusColor() { | ||
if (status == null) return "black"; | ||
if (status.equals("UP")) return "green"; | ||
return "red"; | ||
} | ||
|
||
public String getDownTime() { | ||
return downTime; | ||
} | ||
|
||
public void setDownTime(String downTime) { | ||
this.downTime = downTime; | ||
} | ||
|
||
public String getAvailability() { | ||
return availability; | ||
} | ||
|
||
public void setAvailability(String availability) { | ||
this.availability = availability; | ||
} | ||
|
||
public String getMTBF() { | ||
return MTBF; | ||
} | ||
|
||
public void setMTBF(String MTBF) { | ||
this.MTBF = MTBF; | ||
} | ||
} |
Oops, something went wrong.