9 |
10 |
Unbound GET endpoint ping result:
11 |
12 |
13 |
14 |
15 |
16 |
Unbound POST endpoint ping result:
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/src/ScaleUnitSample/POS/Controls/Dialogs/Display/PingResultDialogModule.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * SAMPLE CODE NOTICE
3 | *
4 | * THIS SAMPLE CODE IS MADE AVAILABLE AS IS. MICROSOFT MAKES NO WARRANTIES, WHETHER EXPRESS OR IMPLIED,
5 | * OF FITNESS FOR A PARTICULAR PURPOSE, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS, OR CONDITIONS OF MERCHANTABILITY.
6 | * THE ENTIRE RISK OF THE USE OR THE RESULTS FROM THE USE OF THIS SAMPLE CODE REMAINS WITH THE USER.
7 | * NO TECHNICAL SUPPORT IS PROVIDED. YOU MAY NOT DISTRIBUTE THIS CODE UNLESS YOU HAVE A LICENSE AGREEMENT WITH MICROSOFT THAT ALLOWS YOU TO DO SO.
8 | */
9 |
10 | import * as Dialogs from "PosApi/Create/Dialogs";
11 | import { ObjectExtensions } from "PosApi/TypeExtensions";
12 |
13 | type DialogResolve = (result: any) => void;
14 | type DialogReject = (reason: any) => void;
15 |
16 | export default class PingResultDialog extends Dialogs.ExtensionTemplatedDialogBase {
17 | private _resolve: DialogResolve;
18 | private _pingUnboundGetResult: boolean;
19 | private _pingUnboundPostResult: boolean;
20 |
21 | constructor() {
22 | super();
23 | }
24 |
25 | public onReady(element: HTMLElement): void {
26 | let getPingResult = element.querySelector("#UnboundGetResult") as HTMLSpanElement;
27 | getPingResult.textContent = this._pingUnboundGetResult ? "Success!" : "Failed.";
28 | let postPingResult = element.querySelector("#UnboundPostResult") as HTMLSpanElement;
29 | postPingResult.textContent = this._pingUnboundPostResult ? "Success!" : "Failed.";
30 | }
31 |
32 | public open(pingUnboundGetResult: boolean, pingUnboundPostResult: boolean): Promise