Add links to internal state
This commit is contained in:
1 parent
73b6314ec7
commit
b68aad7d4a
1 file changed
+41
@@ -1,4 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import { getHost } from "lib/Api/Host";
|
||||||
import { playletStateStore } from "lib/Stores";
|
import { playletStateStore } from "lib/Stores";
|
||||||
|
|
||||||
export let visibility: boolean;
|
export let visibility: boolean;
|
||||||
@@ -38,6 +39,26 @@
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const host = `http://${getHost()}`;
|
||||||
|
const internalStateLinks = [
|
||||||
|
{
|
||||||
|
displayText: "App state",
|
||||||
|
link: `${host}/api/state`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayText: "Logs",
|
||||||
|
link: `${host}/logs/app_logs.txt`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayText: "Logs (previous run)",
|
||||||
|
link: `${host}/logs/app_logs_previous.txt`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayText: "Preferences",
|
||||||
|
link: `${host}/api/preferences`,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
function transformValue(key, value) {
|
function transformValue(key, value) {
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case "app_version":
|
case "app_version":
|
||||||
@@ -140,6 +161,26 @@ ${JSON.stringify(preferencesInfo, null, 2)}
|
|||||||
<td>{@html transformValue(item.key, appInfo[item.key])}</td>
|
<td>{@html transformValue(item.key, appInfo[item.key])}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/each}
|
{/each}
|
||||||
|
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>App internal state</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
{#each internalStateLinks as item}
|
||||||
|
<tr>
|
||||||
|
<td>{item.displayText}</td>
|
||||||
|
<td
|
||||||
|
><a
|
||||||
|
class="link"
|
||||||
|
href={item.link}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer">link</a
|
||||||
|
></td
|
||||||
|
>
|
||||||
|
</tr>
|
||||||
|
{/each}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in new issue
Block a user