diff --git a/CommonUI/src/Components/Card/Card.tsx b/CommonUI/src/Components/Card/Card.tsx index 40d74cff88..852b38e3c0 100644 --- a/CommonUI/src/Components/Card/Card.tsx +++ b/CommonUI/src/Components/Card/Card.tsx @@ -28,8 +28,8 @@ export interface ComponentProps { const Card: FunctionComponent = ( props: ComponentProps ): ReactElement => { - - const noRightElementsOrButtons = !props.rightElement && (!props.buttons || props.buttons.length === 0); + const noRightElementsOrButtons: boolean = + !props.rightElement && (!props.buttons || props.buttons.length === 0); return ( @@ -37,7 +37,11 @@ const Card: FunctionComponent = (
-
+

= ( props: ComponentProps ): ReactElement => { return ( - + {props.code} ); diff --git a/Dashboard/src/Components/Monitor/ServerMonitor/Documentation.tsx b/Dashboard/src/Components/Monitor/ServerMonitor/Documentation.tsx index c48c2edc68..5eca768dc0 100644 --- a/Dashboard/src/Components/Monitor/ServerMonitor/Documentation.tsx +++ b/Dashboard/src/Components/Monitor/ServerMonitor/Documentation.tsx @@ -1,4 +1,3 @@ - import ObjectID from 'Common/Types/ObjectID'; import Card from 'CommonUI/src/Components/Card/Card'; import CodeBlock from 'CommonUI/src/Components/CodeBlock/CodeBlock'; @@ -12,22 +11,32 @@ export interface ComponentProps { const ServerMonitorDocumentation: FunctionComponent = ( props: ComponentProps ): ReactElement => { + const host: string = `${HTTP_PROTOCOL}${HOST}`; + let showHost: boolean = true; - const host = `${HTTP_PROTOCOL}${HOST}`; + if (host === 'https://oneuptime.com') { + showHost = false; + } return ( <> -
Please install NPM on your server.
- -

npm install -g @oneuptime/infrastructure-agent

-

oneuptime-infrastructure-agent --secret-key={props.secretKey.toString()} --oneuptime-url={host}

-

} /> -
+
+ +
} /> diff --git a/Dashboard/src/Pages/Monitor/View/Index.tsx b/Dashboard/src/Pages/Monitor/View/Index.tsx index cf56d6fea1..3f94683cbe 100644 --- a/Dashboard/src/Pages/Monitor/View/Index.tsx +++ b/Dashboard/src/Pages/Monitor/View/Index.tsx @@ -133,7 +133,7 @@ const MonitorView: FunctionComponent = ( color: true, }, incomingRequestSecretKey: true, - serverMonitorSecretKey: true + serverMonitorSecretKey: true, }, }); @@ -295,7 +295,7 @@ const MonitorView: FunctionComponent = ( color={ ( item[ - 'currentMonitorStatus' + 'currentMonitorStatus' ] as JSONObject )['color'] as Color } @@ -303,7 +303,7 @@ const MonitorView: FunctionComponent = ( text={ ( item[ - 'currentMonitorStatus' + 'currentMonitorStatus' ] as JSONObject )['name'] as string } @@ -333,7 +333,7 @@ const MonitorView: FunctionComponent = ( labels={ BaseModel.fromJSON( (item['labels'] as JSONArray) || - [], + [], Label ) as Array