@nhic-lab/srv-wrapper 0.1.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.
@@ -0,0 +1,189 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>srv — ops console</title>
7
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
8
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
9
+ <link href="https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;800&family=IBM+Plex+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet" />
10
+ <script>
11
+ // Resolve the theme before first paint so there is no light flash.
12
+ (function () {
13
+ try {
14
+ var t = localStorage.getItem('srv.theme');
15
+ var dark = t ? t === 'dark' : window.matchMedia('(prefers-color-scheme: dark)').matches;
16
+ document.documentElement.dataset.theme = dark ? 'dark' : 'light';
17
+ } catch (e) {
18
+ document.documentElement.dataset.theme = 'light';
19
+ }
20
+ })();
21
+ </script>
22
+ <link rel="stylesheet" href="/styles.css" />
23
+ </head>
24
+ <body>
25
+ <div class="app" id="app" data-view="live" data-pane="list">
26
+
27
+ <header class="topbar">
28
+ <div class="topbar-inner">
29
+ <div class="brand">
30
+ <div class="brand-mark facet-8" aria-hidden="true">&gt;_</div>
31
+ <div class="brand-name">srv <span class="brand-sub">ops console</span></div>
32
+ </div>
33
+
34
+ <nav class="tabs" aria-label="Views">
35
+ <button type="button" class="tab" data-view="live" aria-current="true">
36
+ <svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M22 12h-4l-3 9L9 3l-3 9H2"></path></svg>
37
+ <span class="tab-label">Live</span>
38
+ <span class="tab-badge" id="tab-live-badge" hidden>0</span>
39
+ </button>
40
+ <button type="button" class="tab" data-view="history">
41
+ <svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 3v5h5"></path><path d="M3.05 13A9 9 0 1 0 6 5.3L3 8"></path><path d="M12 7v5l4 2"></path></svg>
42
+ <span class="tab-label">History</span>
43
+ </button>
44
+ <button type="button" class="tab" data-view="servers">
45
+ <svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect width="20" height="8" x="2" y="2" rx="1"></rect><rect width="20" height="8" x="2" y="14" rx="1"></rect><path d="M6 6h.01M6 18h.01"></path></svg>
46
+ <span class="tab-label">Servers</span>
47
+ <span class="tab-count" id="tab-server-count">0</span>
48
+ </button>
49
+ </nav>
50
+
51
+ <span class="topbar-spacer"></span>
52
+
53
+ <div class="topbar-right">
54
+ <span class="conn" id="conn" data-state="connecting">
55
+ <span class="conn-dot"></span>
56
+ <span class="conn-label">Connecting…</span>
57
+ <span class="conn-addr">127.0.0.1:4280</span>
58
+ </span>
59
+ <button type="button" class="theme-btn" id="theme-toggle" aria-label="Switch to dark theme" title="Switch theme">
60
+ <svg class="theme-icon-sun" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="4"></circle><path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M6.3 17.7l-1.4 1.4M19.1 4.9l-1.4 1.4"></path></svg>
61
+ <svg class="theme-icon-moon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"></path></svg>
62
+ </button>
63
+ <button type="button" class="palette-btn facet-8" id="open-palette">
64
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.3-4.3"></path></svg>
65
+ <span class="palette-btn-label">Jump to…</span>
66
+ <span class="palette-btn-kbd">⌘K</span>
67
+ </button>
68
+ </div>
69
+ </div>
70
+
71
+ <svg class="imigongo" width="100%" height="8" aria-hidden="true" role="presentation">
72
+ <defs>
73
+ <pattern id="imigongo" width="80" height="8" patternUnits="userSpaceOnUse">
74
+ <rect class="imigongo-bg" width="80" height="8" fill="#0E3B2C"></rect>
75
+ <path d="M0 8 L8 1 L16 8 Z" fill="#17211B"></path>
76
+ <path d="M16 8 L24 1 L32 8 Z" fill="#0B6B4D"></path>
77
+ <path d="M32 8 L40 1 L48 8 Z" fill="#E8A33D"></path>
78
+ <path d="M48 8 L56 1 L64 8 Z" fill="#0B6B4D"></path>
79
+ <path d="M64 8 L72 1 L80 8 Z" fill="#17211B"></path>
80
+ </pattern>
81
+ </defs>
82
+ <rect width="100%" height="8" fill="url(#imigongo)"></rect>
83
+ </svg>
84
+ </header>
85
+
86
+ <div class="body">
87
+
88
+ <section class="list-pane" aria-label="List">
89
+ <div class="list-head">
90
+ <div class="list-overline" id="list-overline">Watching</div>
91
+ <div class="list-title-row">
92
+ <h1 class="list-title" id="list-title">Live activity</h1>
93
+ <button type="button" class="btn-add facet-8" id="add-server" hidden>
94
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M5 12h14M12 5v14"></path></svg>
95
+ Add
96
+ </button>
97
+ </div>
98
+ </div>
99
+
100
+ <div class="list-filters">
101
+ <div class="search-wrap">
102
+ <svg class="search-icon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#8A968F" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.3-4.3"></path></svg>
103
+ <input type="search" class="search-input" id="list-search" placeholder="Filter running by id or agent" aria-label="Filter list" />
104
+ </div>
105
+ <select class="hist-select" id="hist-status" aria-label="Filter by outcome" hidden>
106
+ <option value="any">Any</option>
107
+ <option value="ok">Exit 0</option>
108
+ <option value="fail">Non-zero</option>
109
+ <option value="running">Running</option>
110
+ </select>
111
+ <select class="hist-select" id="srv-status" aria-label="Filter by reachability" hidden>
112
+ <option value="any">All</option>
113
+ <option value="online">Online</option>
114
+ <option value="offline">Offline</option>
115
+ <option value="untested">Not tested</option>
116
+ </select>
117
+ <button type="button" class="btn-testall" id="test-all" title="Test all servers" hidden>
118
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 2v4M12 18v4M4.9 4.9l2.9 2.9M16.2 16.2l2.9 2.9M2 12h4M18 12h4M4.9 19.1l2.9-2.9M16.2 7.8l2.9-2.9"></path></svg>
119
+ Test all
120
+ </button>
121
+ </div>
122
+
123
+ <div class="tallies" id="tallies" hidden></div>
124
+
125
+ <div class="list-scroll" id="list-scroll">
126
+ <div id="list-rows"></div>
127
+ <div class="list-more" id="list-more" hidden>
128
+ <button type="button" class="btn-outline" id="load-more">Load older runs</button>
129
+ <span class="list-more-note" id="list-more-note"></span>
130
+ </div>
131
+ </div>
132
+
133
+ <div class="import" id="import-block" hidden>
134
+ <button type="button" class="import-toggle" id="import-toggle" aria-expanded="false">
135
+ <svg class="import-chev" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 18 6-6-6-6"></path></svg>
136
+ <span class="import-toggle-label">Bulk import from JSON</span>
137
+ </button>
138
+ <div class="import-body" id="import-body" hidden>
139
+ <textarea class="import-ta" id="import-text" spellcheck="false" aria-label="Servers JSON"></textarea>
140
+ <div class="import-foot">
141
+ <span class="import-hint">Existing ids are rejected, never overwritten.</span>
142
+ <button type="button" class="btn-outline" id="import-submit">Import</button>
143
+ </div>
144
+ </div>
145
+ </div>
146
+ </section>
147
+
148
+ <section class="detail-pane" id="detail-pane" aria-label="Detail">
149
+ <button type="button" class="pane-back" id="pane-back">
150
+ <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m15 18-6-6 6-6"></path></svg>
151
+ <span id="pane-back-label">All runs</span>
152
+ </button>
153
+ <div class="detail-inner" id="detail"></div>
154
+ </section>
155
+
156
+ </div>
157
+
158
+ <div class="overlay overlay-center" id="confirm-overlay" hidden>
159
+ <div class="scrim" id="confirm-scrim"></div>
160
+ <div class="dialog facet-24" id="confirm-dialog" role="alertdialog" aria-modal="true" aria-labelledby="confirm-title">
161
+ <div class="dialog-body">
162
+ <h2 class="dialog-title" id="confirm-title">Delete server?</h2>
163
+ <p class="dialog-text" id="confirm-text">Agents holding this id lose access immediately. Past runs stay in History.</p>
164
+ </div>
165
+ <div class="dialog-actions">
166
+ <button type="button" class="btn-outline" id="confirm-cancel">Keep</button>
167
+ <button type="button" class="btn-danger facet-8" id="confirm-ok">Delete server</button>
168
+ </div>
169
+ </div>
170
+ </div>
171
+
172
+ <div class="overlay overlay-top" id="palette-overlay" hidden>
173
+ <div class="scrim" id="palette-scrim"></div>
174
+ <div class="palette facet-24" id="palette" role="dialog" aria-modal="true" aria-label="Command palette">
175
+ <div class="palette-head">
176
+ <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#8A968F" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.3-4.3"></path></svg>
177
+ <input type="text" class="palette-input" id="palette-input" placeholder="Jump to a view or server" autocomplete="off" />
178
+ <span class="palette-esc">esc</span>
179
+ </div>
180
+ <div class="palette-list" id="palette-list"></div>
181
+ </div>
182
+ </div>
183
+
184
+ <div class="toasts" id="toasts" aria-live="polite"></div>
185
+ </div>
186
+
187
+ <script src="/app.js"></script>
188
+ </body>
189
+ </html>