Skip to content

Commit

Permalink
fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
simlarsen committed Jun 6, 2023
1 parent 05199ef commit 742ee7c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
13 changes: 9 additions & 4 deletions Common/Types/Monitor/MonitorStep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion Dashboard/src/Components/Form/Monitor/MonitorStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
7 changes: 3 additions & 4 deletions Probe/Utils/Monitors/MonitorTypes/PingMonitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -43,7 +43,7 @@ export default class PingMonitor {
}
);

logger.info("Pinging host "+hostAddress+" success: ");
logger.info('Pinging host ' + hostAddress + ' success: ');
logger.info(res);

return {
Expand All @@ -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) {
Expand Down

0 comments on commit 742ee7c

Please sign in to comment.