Adds support for pwa-node and adds a poll option.

This commit is contained in:
Henning Dieterichs
2020-07-20 19:40:12 +02:00
parent e5707a0f2e
commit 5964c1c503
10 changed files with 162 additions and 77 deletions

View File

@@ -103,19 +103,20 @@ export class VisualizerHeaderMain extends React.Component<{ model: Model }> {
<ExpressionInput model={m} />
</div>
<div style={{ width: 4 }} />
{m.loading ? (
<div style={{ padding: "0 4px" }}>
<Spinner size={Spinner.SIZE_SMALL} />
</div>
) : (
<Button
minimal
small
className="part-Icon"
icon="refresh"
onClick={() => m.refresh()}
/>
)}
{!m.isPolling &&
(m.loading ? (
<div style={{ padding: "0 4px" }}>
<Spinner size={Spinner.SIZE_SMALL} />
</div>
) : (
<Button
minimal
small
className="part-Icon"
icon="refresh"
onClick={() => m.refresh()}
/>
))}
<Button
minimal
small

View File

@@ -1,5 +1,5 @@
import * as React from "react";
import { Popover } from "@blueprintjs/core";
import { Popover, Checkbox } from "@blueprintjs/core";
import { DataExtractorInfo } from "@hediet/debug-visualizer-data-extraction";
import { computed } from "mobx";
import { observer } from "mobx-react";
@@ -80,6 +80,12 @@ export class VisualizerHeaderDetails extends React.Component<{ model: Model }> {
: []
}
/>
<div style={{ width: 10 }} />
<Checkbox
label="Poll"
checked={m.isPolling}
onChange={e => m.setPolling(e.currentTarget.checked)}
/>
</div>
);
}