You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5980041
Browse filesBrowse the repository at this point in the historyBrowse files
Add the clear-recordings agent tool to clear recorded HTTP calls, router navigations, and Analog server calls between reproduction runs. Gate the tool by the corresponding actions (http, router, analog) and broadcast clear events so connected devtools panels stay synchronized.
Fixespangular-inspector#331
Your client can ask you before it runs them. To drop them from the server, set `agent.readOnly`. See [Inspectors and agent tools](../getting-started/configuration.md#inspectors-and-agent-tools).
Sixty-one tools, grouped by inspector. Each one answers a question you would otherwise answer by clicking through the panel.
7
+
Sixty-two tools, grouped by inspector. Each one answers a question you would otherwise answer by clicking through the panel.
8
8
</ngmd-hero>
9
9
10
10
# Tools
@@ -48,12 +48,12 @@ The URL comes from the HTTP or router report. A page that sends neither (no rout
48
48
### Action tools
49
49
50
50
<ngmd-alertseverity="important">
51
-
<code>highlight</code>, <code>navigate</code>, <code>dispatch-ngrx-action</code>, <code>form-action</code>, <code>fill-form</code>, <code>set-http-rule</code>, <code>remove-http-rule</code> and <code>analog-call-api</code> act on the app. Every other tool is marked read-only for your client.
51
+
<code>highlight</code>, <code>navigate</code>, <code>dispatch-ngrx-action</code>, <code>form-action</code>, <code>fill-form</code>, <code>set-http-rule</code>, <code>remove-http-rule</code>, <code>analog-call-api</code> and <code>clear-recordings</code> act on the app. Every other tool is marked read-only for your client.
52
52
</ngmd-alert>
53
53
54
54
### Turn tools off
55
55
56
-
The server decides which tools exist. Set `agent.readOnly` to drop the eight action tools. Set `agent.tools.<inspector>` to `false` to hide one inspector's tools and resources, and keep its tab. Turning an inspector off with `inspectors`, or blocking an action with `actions`, drops the matching tools too. `actions.router` is the exception: `navigate` stays and refuses `navigate`, `abort`, `replay` and `probe`. See [Inspectors and agent tools](../getting-started/configuration.md#inspectors-and-agent-tools).
56
+
The server decides which tools exist. Set `agent.readOnly` to drop the nine action tools. Set `agent.tools.<inspector>` to `false` to hide one inspector's tools and resources, and keep its tab. Turning an inspector off with `inspectors`, or blocking an action with `actions`, drops the matching tools too. `actions.router` is the exception: `navigate` stays and refuses `navigate`, `abort`, `replay` and `probe`. See [Inspectors and agent tools](../getting-started/configuration.md#inspectors-and-agent-tools).
57
57
58
58
## Source scan
59
59
@@ -410,6 +410,18 @@ These tools read and change the rules of [Fault injection](../inspectors/ssr-htt
410
410
411
411
With [`actions.http`](../getting-started/configuration.md#actions) set to `false`, `set-http-rule` and `remove-http-rule` are dropped, and `list-http-rules` says that no rule applies.
|`clear-recordings`| Clears recorded HTTP calls, router navigations, or Analog server calls, and broadcasts the reset to the panel. |`target` (required), `page`|
420
+
421
+
`target` is one of `http`, `router`, `analog`, or `all`. With `router`, `page` clears navigations for that browser tab only; when left out, it clears navigations for every reporting page.
422
+
423
+
`clear-recordings` needs the matching write action ([`actions.http`](../getting-started/configuration.md#actions), `actions.router`, `actions.analog`). When `target` is `all` and an action is disabled, the permitted recordings are cleared and the disabled ones are reported as skipped.
424
+
413
425
## Capacitor
414
426
415
427
These tools read what a Capacitor app reported: its platform, its plugins and the plugin calls it made. See [Capacitor](../inspectors/capacitor.md). Reads: page.
|`inspectors.<name>`|`true`|`false` removes the inspector: no tab or dock, no page collector, no RPC functions, and no agent tools or resources. Its actions are blocked too. |
128
-
|`agent.readOnly`|`false`|`true` drops every agent tool that acts on the page or the server: `highlight`, `form-action`, `fill-form`, `navigate`, `dispatch-ngrx-action`, `set-http-rule`, `remove-http-rule` and `analog-call-api`. |
129
-
|`agent.tools.<name>`|`true`|`false` hides one inspector's agent tools and resources. The tab stays. |
|`inspectors.<name>`|`true`|`false` removes the inspector: no tab or dock, no page collector, no RPC functions, and no agent tools or resources. Its actions are blocked too. |
128
+
|`agent.readOnly`|`false`|`true` drops every agent tool that acts on the page or the server: `highlight`, `form-action`, `fill-form`, `navigate`, `dispatch-ngrx-action`, `set-http-rule`, `remove-http-rule`, `analog-call-api` and `clear-recordings`. |
129
+
|`agent.tools.<name>`|`true`|`false` hides one inspector's agent tools and resources. The tab stays. |
130
130
131
131
`agent.tools` has the same keys as `inspectors`. An inspector that is off has no agent tools, whatever `agent.tools` says.
132
132
@@ -136,14 +136,14 @@ If you open a tab that is turned off, the panel says so, shows the option that t
136
136
137
137
Actions are the writes that the panel and agents make to your app or the server.
|`actions.forms`|`true`| Form writes: set value, fill, mark touched, untouched, dirty or pristine, touch all, revalidate, reset, enable, disable, submit and restore. Drops `form-action` and `fill-form`. |
142
-
|`actions.router`|`true`| Navigate, abort, replay and probe, and clearing the navigations list. Probe runs your app's `canMatch` guards. The `navigate` agent tool stays for `instrument` and `resolve-lazy` and refuses the other four. |
143
-
|`actions.ngrx`|`true`| Restoring NgRx state from the change log and dispatching `@ngrx/store` actions. Drops the `dispatch-ngrx-action` agent tool. |
144
-
|`actions.http`|`true`| Editing fault injection rules and SSR overrides, and clearing the HTTP timeline. Drops the `set-http-rule` and `remove-http-rule` agent tools. |
145
-
|`actions.analog`|`true`| The Analog request playground. Drops the `analog-call-api` agent tool. |
|`actions.forms`|`true`| Form writes: set value, fill, mark touched, untouched, dirty or pristine, touch all, revalidate, reset, enable, disable, submit and restore. Drops `form-action` and `fill-form`. |
142
+
|`actions.router`|`true`| Navigate, abort, replay and probe, and clearing the navigations list. Drops router clearing in `clear-recordings`. The `navigate` agent tool stays for `instrument` and `resolve-lazy` and refuses the other four. |
143
+
|`actions.ngrx`|`true`| Restoring NgRx state from the change log and dispatching `@ngrx/store` actions. Drops the `dispatch-ngrx-action` agent tool. |
144
+
|`actions.http`|`true`| Editing fault injection rules and SSR overrides, and clearing the HTTP timeline. Drops the `set-http-rule` and `remove-http-rule` agent tools and HTTP clearing in `clear-recordings`.|
145
+
|`actions.analog`|`true`| The Analog request playground and clearing server calls. Drops the `analog-call-api` agent tool and Analog clearing in `clear-recordings`.|
146
+
|`actions`|`true`| All of the above. |
147
147
148
148
Pass `actions: false` to block every action, or an object to block some. Keys you leave out of the object stay on.
0 commit comments