mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-01-16 23:00:51 +00:00
fix fmt
This commit is contained in:
parent
05199efd12
commit
742ee7c3cf
3 changed files with 14 additions and 9 deletions
|
|
@ -84,7 +84,9 @@ export default class MonitorStep extends DatabaseProperty {
|
|||
return this;
|
||||
}
|
||||
|
||||
public setMonitorDestination(monitorDestination: URL | IP | Hostname): MonitorStep {
|
||||
public setMonitorDestination(
|
||||
monitorDestination: URL | IP | Hostname
|
||||
): MonitorStep {
|
||||
this.data!.monitorDestination = monitorDestination;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -182,7 +184,8 @@ export default class MonitorStep extends DatabaseProperty {
|
|||
if (
|
||||
json &&
|
||||
json['monitorDestination'] &&
|
||||
(json['monitorDestination'] as JSONObject)['_type'] === ObjectType.URL
|
||||
(json['monitorDestination'] as JSONObject)['_type'] ===
|
||||
ObjectType.URL
|
||||
) {
|
||||
monitorDestination = URL.fromJSON(
|
||||
json['monitorDestination'] as JSONObject
|
||||
|
|
@ -192,7 +195,8 @@ export default class MonitorStep extends DatabaseProperty {
|
|||
if (
|
||||
json &&
|
||||
json['monitorDestination'] &&
|
||||
(json['monitorDestination'] as JSONObject)['_type'] === ObjectType.Hostname
|
||||
(json['monitorDestination'] as JSONObject)['_type'] ===
|
||||
ObjectType.Hostname
|
||||
) {
|
||||
monitorDestination = Hostname.fromJSON(
|
||||
json['monitorDestination'] as JSONObject
|
||||
|
|
@ -202,7 +206,8 @@ export default class MonitorStep extends DatabaseProperty {
|
|||
if (
|
||||
json &&
|
||||
json['monitorDestination'] &&
|
||||
(json['monitorDestination'] as JSONObject)['_type'] === ObjectType.IP
|
||||
(json['monitorDestination'] as JSONObject)['_type'] ===
|
||||
ObjectType.IP
|
||||
) {
|
||||
monitorDestination = IP.fromJSON(
|
||||
json['monitorDestination'] as JSONObject
|
||||
|
|
|
|||
|
|
@ -131,7 +131,8 @@ const MonitorStepElement: FunctionComponent<ComponentProps> = (
|
|||
: undefined
|
||||
}
|
||||
onChange={(value: string) => {
|
||||
let destination: IP | URL | Hostname | undefined = undefined;
|
||||
let destination: IP | URL | Hostname | undefined =
|
||||
undefined;
|
||||
|
||||
try {
|
||||
if (props.monitorType === MonitorType.IP) {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ export default class PingMonitor {
|
|||
hostAddress = host.toString();
|
||||
}
|
||||
|
||||
logger.info("Pinging host: " + hostAddress);
|
||||
logger.info('Pinging host: ' + hostAddress);
|
||||
|
||||
try {
|
||||
const res: ping.PingResponse = await ping.promise.probe(
|
||||
|
|
@ -43,7 +43,7 @@ export default class PingMonitor {
|
|||
}
|
||||
);
|
||||
|
||||
logger.info("Pinging host "+hostAddress+" success: ");
|
||||
logger.info('Pinging host ' + hostAddress + ' success: ');
|
||||
logger.info(res);
|
||||
|
||||
return {
|
||||
|
|
@ -53,8 +53,7 @@ export default class PingMonitor {
|
|||
: undefined,
|
||||
};
|
||||
} catch (err) {
|
||||
|
||||
logger.info("Pinging host "+hostAddress+" error: ");
|
||||
logger.info('Pinging host ' + hostAddress + ' error: ');
|
||||
logger.info(err);
|
||||
|
||||
if (!retry) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue