the-android-mcp 3.23.0 → 3.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -0
- package/dist/web-ui.d.ts.map +1 -1
- package/dist/web-ui.js +332 -31
- package/dist/web-ui.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,6 +38,24 @@ sequenceDiagram
|
|
|
38
38
|
M-->>A: Result (fields found, submit tapped)
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
## Web UI v3 (Local 50000)
|
|
42
|
+
|
|
43
|
+
The local web cockpit is now designed for complete beginners first, with advanced controls hidden behind an explicit toggle.
|
|
44
|
+
|
|
45
|
+
- URL: `http://127.0.0.1:50000`
|
|
46
|
+
- Start command: `the-android-mcp-web-ui --serve --host 127.0.0.1 --port 50000`
|
|
47
|
+
- UX direction: plain-language actions, large guided cards, futuristic gradients, and visual mission feedback.
|
|
48
|
+
|
|
49
|
+
### Screenshots
|
|
50
|
+
|
|
51
|
+
Desktop:
|
|
52
|
+
|
|
53
|
+

|
|
54
|
+
|
|
55
|
+
Android live session (captured from connected device workflow):
|
|
56
|
+
|
|
57
|
+

|
|
58
|
+
|
|
41
59
|
## Quick Start (Copy/Paste)
|
|
42
60
|
|
|
43
61
|
```bash
|
|
@@ -182,6 +200,7 @@ Based on the original project: [infiniV/Android-Ui-MCP](https://github.com/infin
|
|
|
182
200
|
|
|
183
201
|
## Table of Contents
|
|
184
202
|
|
|
203
|
+
- [Web UI v3 (Local 50000)](#web-ui-v3-local-50000)
|
|
185
204
|
- [AI Agent Configuration](#ai-agent-configuration)
|
|
186
205
|
- [Installation](#installation)
|
|
187
206
|
- [GUI App (Linux)](#gui-app-linux)
|
package/dist/web-ui.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-ui.d.ts","sourceRoot":"","sources":["../src/web-ui.ts"],"names":[],"mappings":";AAKA,OAAO,IAAyC,MAAM,MAAM,CAAC;AAgB7D,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAC/C,eAAO,MAAM,mBAAmB,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"web-ui.d.ts","sourceRoot":"","sources":["../src/web-ui.ts"],"names":[],"mappings":";AAKA,OAAO,IAAyC,MAAM,MAAM,CAAC;AAgB7D,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAC/C,eAAO,MAAM,mBAAmB,QAAQ,CAAC;AA4zczC,wBAAgB,gBAAgB,CAAC,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,IAAI,CAAC,MAAM,CAgC5F;AAED,wBAAsB,qBAAqB,CAAC,OAAO,GAAE;IACnD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACV,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAiBhF"}
|
package/dist/web-ui.js
CHANGED
|
@@ -8934,18 +8934,21 @@ const INDEX_HTML = String.raw `<!doctype html>
|
|
|
8934
8934
|
<link href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
|
|
8935
8935
|
<style>
|
|
8936
8936
|
:root {
|
|
8937
|
-
--bg0: #
|
|
8938
|
-
--bg1: #
|
|
8939
|
-
--bg2: #
|
|
8940
|
-
--card: #
|
|
8941
|
-
--
|
|
8942
|
-
--
|
|
8943
|
-
--
|
|
8944
|
-
--
|
|
8945
|
-
--
|
|
8946
|
-
--
|
|
8947
|
-
--
|
|
8948
|
-
--
|
|
8937
|
+
--bg0: #071019;
|
|
8938
|
+
--bg1: #0e1f2d;
|
|
8939
|
+
--bg2: #153448;
|
|
8940
|
+
--card: #0f1f2cbd;
|
|
8941
|
+
--card-strong: #102434f2;
|
|
8942
|
+
--line: #2f516bba;
|
|
8943
|
+
--line-soft: #3a617d66;
|
|
8944
|
+
--text: #eef8ff;
|
|
8945
|
+
--muted: #9fbed2;
|
|
8946
|
+
--ok: #8eeecf;
|
|
8947
|
+
--err: #ff8f9c;
|
|
8948
|
+
--acc0: #00d2a6;
|
|
8949
|
+
--acc1: #16a8ff;
|
|
8950
|
+
--acc2: #75e2ff;
|
|
8951
|
+
--warn: #ffc067;
|
|
8949
8952
|
}
|
|
8950
8953
|
* { box-sizing: border-box; }
|
|
8951
8954
|
body {
|
|
@@ -8954,43 +8957,167 @@ const INDEX_HTML = String.raw `<!doctype html>
|
|
|
8954
8957
|
color: var(--text);
|
|
8955
8958
|
min-height: 100vh;
|
|
8956
8959
|
background:
|
|
8957
|
-
|
|
8958
|
-
|
|
8959
|
-
linear-gradient(155deg, var(--bg0), var(--bg1) 44%, var(--bg2));
|
|
8960
|
+
linear-gradient(135deg, #05111cfa, #0a1825e8 45%, #0d2334de),
|
|
8961
|
+
url('https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&w=2200&q=80') center/cover fixed no-repeat;
|
|
8960
8962
|
padding: 16px;
|
|
8961
8963
|
}
|
|
8962
|
-
.app { max-width:
|
|
8964
|
+
.app { max-width: 1600px; margin: 0 auto; display: grid; gap: 14px; }
|
|
8963
8965
|
.hero {
|
|
8964
8966
|
border: 1px solid var(--line);
|
|
8965
|
-
border-radius:
|
|
8966
|
-
background:
|
|
8967
|
-
|
|
8967
|
+
border-radius: 20px;
|
|
8968
|
+
background:
|
|
8969
|
+
linear-gradient(125deg, #0d2538d8, #10263bd1),
|
|
8970
|
+
url('https://images.unsplash.com/photo-1498050108023-c5249f4df085?auto=format&fit=crop&w=1800&q=80') center/cover;
|
|
8971
|
+
box-shadow: 0 20px 60px #02090f8c;
|
|
8972
|
+
padding: 16px;
|
|
8968
8973
|
display: grid;
|
|
8969
|
-
gap:
|
|
8974
|
+
gap: 8px;
|
|
8975
|
+
}
|
|
8976
|
+
.hero h1 { margin: 0; font-size: 1.55rem; letter-spacing: 0.01em; }
|
|
8977
|
+
.hero-badge {
|
|
8978
|
+
display: inline-flex;
|
|
8979
|
+
width: fit-content;
|
|
8980
|
+
border: 1px solid #86d8ff55;
|
|
8981
|
+
color: #cff1ff;
|
|
8982
|
+
background: #05273bcc;
|
|
8983
|
+
border-radius: 999px;
|
|
8984
|
+
padding: 4px 10px;
|
|
8985
|
+
font-size: 12px;
|
|
8986
|
+
font-weight: 700;
|
|
8987
|
+
text-transform: uppercase;
|
|
8988
|
+
letter-spacing: 0.06em;
|
|
8970
8989
|
}
|
|
8971
8990
|
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
|
|
8972
8991
|
.pill {
|
|
8973
|
-
border: 1px solid #
|
|
8992
|
+
border: 1px solid #5a8daf;
|
|
8993
|
+
background: #0a2232d9;
|
|
8974
8994
|
border-radius: 999px;
|
|
8975
8995
|
padding: 4px 10px;
|
|
8976
8996
|
font-size: 12px;
|
|
8977
8997
|
font-family: 'JetBrains Mono', monospace;
|
|
8978
|
-
color: #
|
|
8998
|
+
color: #dbf3ff;
|
|
8979
8999
|
}
|
|
8980
9000
|
.dot {
|
|
8981
9001
|
width: 8px;
|
|
8982
9002
|
height: 8px;
|
|
8983
9003
|
border-radius: 50%;
|
|
8984
9004
|
background: var(--acc0);
|
|
8985
|
-
box-shadow: 0 0
|
|
9005
|
+
box-shadow: 0 0 12px var(--acc0);
|
|
8986
9006
|
display: inline-block;
|
|
8987
9007
|
margin-right: 6px;
|
|
8988
9008
|
}
|
|
9009
|
+
.easy-mode {
|
|
9010
|
+
border: 1px solid var(--line);
|
|
9011
|
+
border-radius: 20px;
|
|
9012
|
+
background: linear-gradient(145deg, #0f2436db, #102638e6);
|
|
9013
|
+
backdrop-filter: blur(7px);
|
|
9014
|
+
padding: 14px;
|
|
9015
|
+
display: grid;
|
|
9016
|
+
gap: 10px;
|
|
9017
|
+
box-shadow: 0 16px 42px #0510198a;
|
|
9018
|
+
}
|
|
9019
|
+
.easy-head {
|
|
9020
|
+
display: flex;
|
|
9021
|
+
flex-wrap: wrap;
|
|
9022
|
+
gap: 10px;
|
|
9023
|
+
justify-content: space-between;
|
|
9024
|
+
align-items: center;
|
|
9025
|
+
}
|
|
9026
|
+
.easy-head h2 {
|
|
9027
|
+
margin: 0;
|
|
9028
|
+
font-size: 1.2rem;
|
|
9029
|
+
}
|
|
9030
|
+
.easy-note {
|
|
9031
|
+
margin: 0;
|
|
9032
|
+
color: #d8efff;
|
|
9033
|
+
font-size: 13px;
|
|
9034
|
+
}
|
|
9035
|
+
.easy-grid {
|
|
9036
|
+
display: grid;
|
|
9037
|
+
gap: 10px;
|
|
9038
|
+
grid-template-columns: 1.3fr 1fr 1fr;
|
|
9039
|
+
}
|
|
9040
|
+
.easy-card {
|
|
9041
|
+
border: 1px solid var(--line-soft);
|
|
9042
|
+
border-radius: 14px;
|
|
9043
|
+
padding: 10px;
|
|
9044
|
+
background:
|
|
9045
|
+
linear-gradient(145deg, #0f2232e8, #0c1d2be8),
|
|
9046
|
+
var(--easy-bg, none);
|
|
9047
|
+
background-size: cover;
|
|
9048
|
+
background-position: center;
|
|
9049
|
+
display: grid;
|
|
9050
|
+
gap: 7px;
|
|
9051
|
+
}
|
|
9052
|
+
.easy-card h3 {
|
|
9053
|
+
margin: 0;
|
|
9054
|
+
font-size: 0.98rem;
|
|
9055
|
+
}
|
|
9056
|
+
.easy-stats {
|
|
9057
|
+
display: grid;
|
|
9058
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
9059
|
+
gap: 8px;
|
|
9060
|
+
}
|
|
9061
|
+
.easy-stat {
|
|
9062
|
+
border: 1px solid #4f789266;
|
|
9063
|
+
border-radius: 10px;
|
|
9064
|
+
padding: 8px;
|
|
9065
|
+
background: #0a1c2cdb;
|
|
9066
|
+
}
|
|
9067
|
+
.easy-stat strong {
|
|
9068
|
+
display: block;
|
|
9069
|
+
font-size: 0.95rem;
|
|
9070
|
+
}
|
|
9071
|
+
.easy-stat span {
|
|
9072
|
+
font-size: 11px;
|
|
9073
|
+
color: #cde4f5;
|
|
9074
|
+
}
|
|
9075
|
+
.easy-ops {
|
|
9076
|
+
display: grid;
|
|
9077
|
+
gap: 8px;
|
|
9078
|
+
grid-template-columns: 1fr 1fr;
|
|
9079
|
+
}
|
|
9080
|
+
.easy-btn {
|
|
9081
|
+
border: 1px solid #65bee799;
|
|
9082
|
+
border-radius: 12px;
|
|
9083
|
+
background: linear-gradient(140deg, #0d6f88, #1a5b93);
|
|
9084
|
+
color: #effbff;
|
|
9085
|
+
font-size: 13px;
|
|
9086
|
+
font-weight: 700;
|
|
9087
|
+
letter-spacing: 0.01em;
|
|
9088
|
+
padding: 11px;
|
|
9089
|
+
}
|
|
9090
|
+
.easy-btn.alt {
|
|
9091
|
+
background: linear-gradient(140deg, #225265, #1f6f58);
|
|
9092
|
+
}
|
|
9093
|
+
.easy-btn.warn {
|
|
9094
|
+
background: linear-gradient(140deg, #875b1b, #7d3f1c);
|
|
9095
|
+
border-color: #e6b37588;
|
|
9096
|
+
}
|
|
9097
|
+
.easy-hint {
|
|
9098
|
+
border: 1px solid #4f789266;
|
|
9099
|
+
border-radius: 12px;
|
|
9100
|
+
background: #0a1b29d1;
|
|
9101
|
+
padding: 10px;
|
|
9102
|
+
font-size: 13px;
|
|
9103
|
+
}
|
|
9104
|
+
.advanced-toggle-wrap {
|
|
9105
|
+
display: flex;
|
|
9106
|
+
justify-content: flex-end;
|
|
9107
|
+
}
|
|
9108
|
+
.advanced-toggle-btn {
|
|
9109
|
+
width: auto;
|
|
9110
|
+
min-width: 240px;
|
|
9111
|
+
border-radius: 999px;
|
|
9112
|
+
}
|
|
8989
9113
|
.grid {
|
|
8990
9114
|
display: grid;
|
|
8991
9115
|
gap: 10px;
|
|
8992
9116
|
grid-template-columns: 1fr 1fr 1fr;
|
|
8993
9117
|
}
|
|
9118
|
+
.grid.hidden {
|
|
9119
|
+
display: none;
|
|
9120
|
+
}
|
|
8994
9121
|
.card {
|
|
8995
9122
|
border: 1px solid var(--line);
|
|
8996
9123
|
border-radius: 14px;
|
|
@@ -9004,9 +9131,9 @@ const INDEX_HTML = String.raw `<!doctype html>
|
|
|
9004
9131
|
.quick { display: grid; gap: 6px; grid-template-columns: 1fr 1fr; }
|
|
9005
9132
|
input, textarea, select, button {
|
|
9006
9133
|
width: 100%;
|
|
9007
|
-
border: 1px solid #
|
|
9134
|
+
border: 1px solid #3f6985;
|
|
9008
9135
|
border-radius: 10px;
|
|
9009
|
-
background: #
|
|
9136
|
+
background: #0f1c28e0;
|
|
9010
9137
|
color: var(--text);
|
|
9011
9138
|
padding: 9px;
|
|
9012
9139
|
font: inherit;
|
|
@@ -9020,10 +9147,10 @@ const INDEX_HTML = String.raw `<!doctype html>
|
|
|
9020
9147
|
.events, .metrics, .jobs, .lanes {
|
|
9021
9148
|
max-height: 300px;
|
|
9022
9149
|
overflow: auto;
|
|
9023
|
-
border: 1px solid #
|
|
9150
|
+
border: 1px solid #32556f;
|
|
9024
9151
|
border-radius: 10px;
|
|
9025
9152
|
padding: 8px;
|
|
9026
|
-
background: #
|
|
9153
|
+
background: #0b141de6;
|
|
9027
9154
|
}
|
|
9028
9155
|
.item {
|
|
9029
9156
|
border: 1px solid #2e4a61;
|
|
@@ -9057,8 +9184,16 @@ const INDEX_HTML = String.raw `<!doctype html>
|
|
|
9057
9184
|
.muted { margin: 0; color: var(--muted); font-size: 12px; }
|
|
9058
9185
|
.ok { color: var(--ok); }
|
|
9059
9186
|
.err { color: var(--err); }
|
|
9187
|
+
@media (max-width: 1300px) {
|
|
9188
|
+
.easy-grid { grid-template-columns: 1fr 1fr; }
|
|
9189
|
+
.easy-stats { grid-template-columns: 1fr 1fr; }
|
|
9190
|
+
}
|
|
9060
9191
|
@media (max-width: 1200px) { .grid { grid-template-columns: 1fr 1fr; } }
|
|
9061
|
-
@media (max-width: 900px) {
|
|
9192
|
+
@media (max-width: 900px) {
|
|
9193
|
+
.grid { grid-template-columns: 1fr; }
|
|
9194
|
+
.easy-grid { grid-template-columns: 1fr; }
|
|
9195
|
+
.easy-ops { grid-template-columns: 1fr; }
|
|
9196
|
+
}
|
|
9062
9197
|
</style>
|
|
9063
9198
|
</head>
|
|
9064
9199
|
<body>
|
|
@@ -9073,11 +9208,51 @@ const INDEX_HTML = String.raw `<!doctype html>
|
|
|
9073
9208
|
<span class="pill" id="queue-pill">queue: 0</span>
|
|
9074
9209
|
<span class="pill">port: 50000</span>
|
|
9075
9210
|
</div>
|
|
9076
|
-
<
|
|
9077
|
-
<
|
|
9211
|
+
<span class="hero-badge">Futuristic Easy Control</span>
|
|
9212
|
+
<h1>the-android-mcp v${package_json_1.default.version} command center</h1>
|
|
9213
|
+
<p class="muted">Eine Oberfläche für alle: erst einfache Knöpfe, dann bei Bedarf Profi-Tools.</p>
|
|
9078
9214
|
</section>
|
|
9079
9215
|
|
|
9080
|
-
<section class="
|
|
9216
|
+
<section class="easy-mode">
|
|
9217
|
+
<div class="easy-head">
|
|
9218
|
+
<h2>Easy Mode: 1-Klick Steuerung</h2>
|
|
9219
|
+
<p class="easy-note">Für Nicht-Techniker: URL eintragen, großen Knopf drücken, fertig.</p>
|
|
9220
|
+
</div>
|
|
9221
|
+
<div class="easy-grid">
|
|
9222
|
+
<article class="easy-card" style="--easy-bg:url('https://images.unsplash.com/photo-1512941937669-90a1b58e7e9c?auto=format&fit=crop&w=1400&q=80')">
|
|
9223
|
+
<h3>Schritt 1: Website aufs Handy schicken</h3>
|
|
9224
|
+
<input id="easy-url-input" type="url" value="https://www.wikipedia.org" />
|
|
9225
|
+
<div class="easy-ops">
|
|
9226
|
+
<button class="easy-btn" id="easy-open-btn">Website öffnen</button>
|
|
9227
|
+
<button class="easy-btn alt" id="easy-smoke-btn">Schnellcheck starten</button>
|
|
9228
|
+
</div>
|
|
9229
|
+
<div class="easy-hint" id="easy-last-action">Noch keine Aktion ausgeführt.</div>
|
|
9230
|
+
</article>
|
|
9231
|
+
<article class="easy-card" style="--easy-bg:url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&w=1400&q=80')">
|
|
9232
|
+
<h3>Schritt 2: Automatisch reparieren</h3>
|
|
9233
|
+
<div class="easy-ops">
|
|
9234
|
+
<button class="easy-btn alt" id="easy-autofix-btn">Auto-Fix ausführen</button>
|
|
9235
|
+
<button class="easy-btn" id="easy-strategy-btn">Turbo-Strategie</button>
|
|
9236
|
+
</div>
|
|
9237
|
+
<button class="easy-btn warn" id="easy-panic-btn">Notfall-Stabilisierung</button>
|
|
9238
|
+
</article>
|
|
9239
|
+
<article class="easy-card">
|
|
9240
|
+
<h3>Status in Klartext</h3>
|
|
9241
|
+
<div class="easy-stats">
|
|
9242
|
+
<div class="easy-stat"><strong id="easy-risk">-</strong><span>Risiko</span></div>
|
|
9243
|
+
<div class="easy-stat"><strong id="easy-mode">-</strong><span>Modus</span></div>
|
|
9244
|
+
<div class="easy-stat"><strong id="easy-device">-</strong><span>Geräte</span></div>
|
|
9245
|
+
<div class="easy-stat"><strong id="easy-jobs">-</strong><span>Jobs</span></div>
|
|
9246
|
+
</div>
|
|
9247
|
+
<div class="easy-hint" id="easy-recommendation">Empfehlung wird geladen ...</div>
|
|
9248
|
+
</article>
|
|
9249
|
+
</div>
|
|
9250
|
+
<div class="advanced-toggle-wrap">
|
|
9251
|
+
<button class="s advanced-toggle-btn" id="easy-toggle-advanced-btn">Profi-Bereich einblenden</button>
|
|
9252
|
+
</div>
|
|
9253
|
+
</section>
|
|
9254
|
+
|
|
9255
|
+
<section class="grid hidden" id="advanced-grid">
|
|
9081
9256
|
<article class="card stack">
|
|
9082
9257
|
<h2>Device operations</h2>
|
|
9083
9258
|
<select id="device-select"></select>
|
|
@@ -9713,6 +9888,15 @@ https://developer.android.com</textarea>
|
|
|
9713
9888
|
const $opsMissionPolicyPanel = document.getElementById('ops-mission-policy-panel');
|
|
9714
9889
|
const $queueSnapshotName = document.getElementById('queue-snapshot-name');
|
|
9715
9890
|
const $campaignDeviceIds = document.getElementById('campaign-device-ids');
|
|
9891
|
+
const $easyUrlInput = document.getElementById('easy-url-input');
|
|
9892
|
+
const $easyRisk = document.getElementById('easy-risk');
|
|
9893
|
+
const $easyMode = document.getElementById('easy-mode');
|
|
9894
|
+
const $easyDevice = document.getElementById('easy-device');
|
|
9895
|
+
const $easyJobs = document.getElementById('easy-jobs');
|
|
9896
|
+
const $easyRecommendation = document.getElementById('easy-recommendation');
|
|
9897
|
+
const $easyLastAction = document.getElementById('easy-last-action');
|
|
9898
|
+
const $advancedGrid = document.getElementById('advanced-grid');
|
|
9899
|
+
const $easyToggleAdvancedBtn = document.getElementById('easy-toggle-advanced-btn');
|
|
9716
9900
|
|
|
9717
9901
|
function setMessage(text, isError) {
|
|
9718
9902
|
$message.textContent = text;
|
|
@@ -10539,6 +10723,91 @@ https://developer.android.com</textarea>
|
|
|
10539
10723
|
await refreshJobsAndLanes();
|
|
10540
10724
|
}
|
|
10541
10725
|
|
|
10726
|
+
function setEasyLastAction(text, isError) {
|
|
10727
|
+
if (!$easyLastAction) {
|
|
10728
|
+
return;
|
|
10729
|
+
}
|
|
10730
|
+
$easyLastAction.textContent = text;
|
|
10731
|
+
$easyLastAction.style.borderColor = isError ? '#cf6d7a88' : '#4f789266';
|
|
10732
|
+
$easyLastAction.style.color = isError ? '#ffd3da' : '#d5ecff';
|
|
10733
|
+
}
|
|
10734
|
+
|
|
10735
|
+
function renderEasyOverview(statePayload, controlPayload, commandPayload) {
|
|
10736
|
+
if ($easyRisk) {
|
|
10737
|
+
const value = commandPayload && typeof commandPayload.riskScore === 'number'
|
|
10738
|
+
? commandPayload.riskScore
|
|
10739
|
+
: 0;
|
|
10740
|
+
$easyRisk.textContent = String(value);
|
|
10741
|
+
}
|
|
10742
|
+
if ($easyMode) {
|
|
10743
|
+
$easyMode.textContent = commandPayload && commandPayload.mode ? String(commandPayload.mode) : 'unknown';
|
|
10744
|
+
}
|
|
10745
|
+
if ($easyDevice) {
|
|
10746
|
+
$easyDevice.textContent = String((statePayload && statePayload.connectedDeviceCount) || 0);
|
|
10747
|
+
}
|
|
10748
|
+
if ($easyJobs) {
|
|
10749
|
+
$easyJobs.textContent = String((statePayload && statePayload.jobCount) || 0);
|
|
10750
|
+
}
|
|
10751
|
+
if ($easyRecommendation) {
|
|
10752
|
+
const commandActions = commandPayload && Array.isArray(commandPayload.quickActions) ? commandPayload.quickActions : [];
|
|
10753
|
+
const controlActions = controlPayload && Array.isArray(controlPayload.recommendations) ? controlPayload.recommendations : [];
|
|
10754
|
+
const recommendation = commandActions[0] || controlActions[0] || 'Alles stabil. Du kannst normal weiterarbeiten.';
|
|
10755
|
+
$easyRecommendation.textContent = String(recommendation);
|
|
10756
|
+
}
|
|
10757
|
+
}
|
|
10758
|
+
|
|
10759
|
+
async function loadEasyOverview() {
|
|
10760
|
+
const statePayload = await api('/api/state');
|
|
10761
|
+
const controlPayload = await api('/api/ops/control-room');
|
|
10762
|
+
const commandPayload = await api('/api/ops/missions/command-center?horizonMs=1200000&analyticsLimit=200');
|
|
10763
|
+
renderEasyOverview(statePayload, controlPayload, commandPayload);
|
|
10764
|
+
}
|
|
10765
|
+
|
|
10766
|
+
async function easyOpenWebsiteUi() {
|
|
10767
|
+
const url = ($easyUrlInput && $easyUrlInput.value ? $easyUrlInput.value : $urlInput.value || '').trim();
|
|
10768
|
+
if (!url) {
|
|
10769
|
+
throw new Error('Bitte eine URL eintragen.');
|
|
10770
|
+
}
|
|
10771
|
+
$urlInput.value = url;
|
|
10772
|
+
await openUrl(url);
|
|
10773
|
+
setEasyLastAction('Website geöffnet: ' + url, false);
|
|
10774
|
+
await loadEasyOverview();
|
|
10775
|
+
}
|
|
10776
|
+
|
|
10777
|
+
async function easySmokeUi() {
|
|
10778
|
+
await runDeviceSmoke();
|
|
10779
|
+
await runSuite();
|
|
10780
|
+
setEasyLastAction('Schnellcheck abgeschlossen.', false);
|
|
10781
|
+
await loadEasyOverview();
|
|
10782
|
+
}
|
|
10783
|
+
|
|
10784
|
+
async function easyAutoFixUi() {
|
|
10785
|
+
await runOpsMissionCommandQuickFixUi();
|
|
10786
|
+
setEasyLastAction('Auto-Fix wurde ausgeführt.', false);
|
|
10787
|
+
await loadEasyOverview();
|
|
10788
|
+
}
|
|
10789
|
+
|
|
10790
|
+
async function easyStrategyUi() {
|
|
10791
|
+
await executeOpsMissionCommandStrategyUi();
|
|
10792
|
+
setEasyLastAction('Turbo-Strategie abgeschlossen.', false);
|
|
10793
|
+
await loadEasyOverview();
|
|
10794
|
+
}
|
|
10795
|
+
|
|
10796
|
+
async function easyPanicUi() {
|
|
10797
|
+
await runOpsStabilizeUi();
|
|
10798
|
+
await runWatchdogUi();
|
|
10799
|
+
setEasyLastAction('Notfall-Stabilisierung abgeschlossen.', false);
|
|
10800
|
+
await loadEasyOverview();
|
|
10801
|
+
}
|
|
10802
|
+
|
|
10803
|
+
function toggleAdvancedUi() {
|
|
10804
|
+
if (!$advancedGrid || !$easyToggleAdvancedBtn) {
|
|
10805
|
+
return;
|
|
10806
|
+
}
|
|
10807
|
+
const hidden = $advancedGrid.classList.toggle('hidden');
|
|
10808
|
+
$easyToggleAdvancedBtn.textContent = hidden ? 'Profi-Bereich einblenden' : 'Profi-Bereich ausblenden';
|
|
10809
|
+
}
|
|
10810
|
+
|
|
10542
10811
|
function connectRealtime() {
|
|
10543
10812
|
const scheme = window.location.protocol === 'https:' ? 'wss' : 'ws';
|
|
10544
10813
|
const wsUrl = scheme + '://' + window.location.host + '/api/ws';
|
|
@@ -10593,6 +10862,10 @@ https://developer.android.com</textarea>
|
|
|
10593
10862
|
waitForReadyMs: 900,
|
|
10594
10863
|
});
|
|
10595
10864
|
renderOutput(result);
|
|
10865
|
+
if ($easyUrlInput) {
|
|
10866
|
+
$easyUrlInput.value = url;
|
|
10867
|
+
}
|
|
10868
|
+
setEasyLastAction('Website geöffnet: ' + url, false);
|
|
10596
10869
|
setMessage('URL opened', false);
|
|
10597
10870
|
}
|
|
10598
10871
|
|
|
@@ -12769,6 +13042,27 @@ https://developer.android.com</textarea>
|
|
|
12769
13042
|
await loadAlertsUi();
|
|
12770
13043
|
}
|
|
12771
13044
|
|
|
13045
|
+
document.getElementById('easy-open-btn').addEventListener('click', async function () {
|
|
13046
|
+
try { await easyOpenWebsiteUi(); } catch (error) { setEasyLastAction(String(error), true); setMessage(String(error), true); }
|
|
13047
|
+
});
|
|
13048
|
+
document.getElementById('easy-smoke-btn').addEventListener('click', async function () {
|
|
13049
|
+
try { await easySmokeUi(); } catch (error) { setEasyLastAction(String(error), true); setMessage(String(error), true); }
|
|
13050
|
+
});
|
|
13051
|
+
document.getElementById('easy-autofix-btn').addEventListener('click', async function () {
|
|
13052
|
+
try { await easyAutoFixUi(); } catch (error) { setEasyLastAction(String(error), true); setMessage(String(error), true); }
|
|
13053
|
+
});
|
|
13054
|
+
document.getElementById('easy-strategy-btn').addEventListener('click', async function () {
|
|
13055
|
+
try { await easyStrategyUi(); } catch (error) { setEasyLastAction(String(error), true); setMessage(String(error), true); }
|
|
13056
|
+
});
|
|
13057
|
+
document.getElementById('easy-panic-btn').addEventListener('click', async function () {
|
|
13058
|
+
try { await easyPanicUi(); } catch (error) { setEasyLastAction(String(error), true); setMessage(String(error), true); }
|
|
13059
|
+
});
|
|
13060
|
+
if ($easyToggleAdvancedBtn) {
|
|
13061
|
+
$easyToggleAdvancedBtn.addEventListener('click', function () {
|
|
13062
|
+
toggleAdvancedUi();
|
|
13063
|
+
});
|
|
13064
|
+
}
|
|
13065
|
+
|
|
12772
13066
|
document.getElementById('open-url-btn').addEventListener('click', async function () {
|
|
12773
13067
|
try { await openUrl($urlInput.value); } catch (error) { setMessage(String(error), true); }
|
|
12774
13068
|
});
|
|
@@ -13202,6 +13496,11 @@ https://developer.android.com</textarea>
|
|
|
13202
13496
|
try {
|
|
13203
13497
|
ensureOpsMissionCommandCenterUi();
|
|
13204
13498
|
await refreshCore();
|
|
13499
|
+
if ($easyUrlInput && !$easyUrlInput.value) {
|
|
13500
|
+
$easyUrlInput.value = $urlInput.value || 'https://www.wikipedia.org';
|
|
13501
|
+
}
|
|
13502
|
+
await loadEasyOverview();
|
|
13503
|
+
setEasyLastAction('Bereit. Wähle eine Aktion oben im Easy Mode.', false);
|
|
13205
13504
|
const history = await api('/api/history?limit=45');
|
|
13206
13505
|
const events = Array.isArray(history.events) ? history.events : [];
|
|
13207
13506
|
for (let i = events.length - 1; i >= 0; i -= 1) {
|
|
@@ -13280,6 +13579,8 @@ https://developer.android.com</textarea>
|
|
|
13280
13579
|
if (missionCommandCenterPayload.anomalies) {
|
|
13281
13580
|
renderOpsMissionAnomaliesUi(missionCommandCenterPayload.anomalies);
|
|
13282
13581
|
}
|
|
13582
|
+
const easyStatePayload = await api('/api/state');
|
|
13583
|
+
renderEasyOverview(easyStatePayload, controlRoomPayload, missionCommandCenterPayload);
|
|
13283
13584
|
const missionCommandRiskPayload = await api('/api/ops/missions/command-center/risk-explain?horizonMs=1200000&analyticsLimit=200');
|
|
13284
13585
|
renderOpsMissionCommandRiskUi(missionCommandRiskPayload);
|
|
13285
13586
|
const missionCommandHistoryPayload = await api('/api/ops/missions/command-center/history?limit=40');
|