Skip to content

Commit

Permalink
refactor: remove outdated comments and improve context object in VMRu…
Browse files Browse the repository at this point in the history
…nner
  • Loading branch information
simlarsen committed Jan 1, 2025
1 parent 92174be commit 5ba526d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
3 changes: 3 additions & 0 deletions Common/Server/Utils/VM/VMRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ export default class VMRunner {
http: http,
https: https,
axios: axios,
setTimeout: setTimeout,
clearTimeout: clearTimeout,
setInterval: setInterval,
...options.context,
};

Expand Down
3 changes: 0 additions & 3 deletions Dashboard/src/Components/Form/Monitor/MonitorStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,6 @@ const MonitorStepElement: FunctionComponent<ComponentProps> = (

if (props.monitorType === MonitorType.SyntheticMonitor) {
codeEditorPlaceholder = `
// You can use axios module, and page object from Playwright here.
// Page Object is a class that represents a single page in a browser.
// Objects available in the context of the script are:
// - axios: Axios module to make HTTP requests
Expand Down
2 changes: 0 additions & 2 deletions Docs/Content/monitor/synthetic-monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ Synthetic monitoring is a way to proactively monitor your applications by simula
The following example shows how to use a Synthetic Monitor:

```javascript
// You can use axios module, and page object from Playwright here.
// Page Object is a class that represents a single page in a browser.

// Objects available in the context of the script are:

Expand Down
3 changes: 1 addition & 2 deletions Probe/Index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import logger from "Common/Server/Utils/Logger";
import App from "Common/Server/Utils/StartServer";
import Telemetry from "Common/Server/Utils/Telemetry";
import "ejs";
import Port from "Common/Types/Port";

const APP_NAME: string = "probe";

Expand All @@ -23,7 +22,7 @@ const init: PromiseVoidFunction = async (): Promise<void> => {
// init the app
await App.init({
appName: APP_NAME,
port: new Port(3874), // some random port to start the server. Since this is the probe, it doesn't need to be exposed.
port: undefined,
isFrontendApp: false,
statusOptions: {
liveCheck: async () => {},
Expand Down

0 comments on commit 5ba526d

Please sign in to comment.