-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmcp-app.html
More file actions
214 lines (207 loc) · 8.53 KB
/
Copy pathmcp-app.html
File metadata and controls
214 lines (207 loc) · 8.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="color-scheme" content="light dark">
<title>QueryCraft - OData Query Generator</title>
</head>
<body>
<main class="main">
<!-- Header -->
<header class="header">
<div class="logo">
<svg class="logo-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M12 2L2 7l10 5 10-5-10-5z"/>
<path d="M2 17l10 5 10-5"/>
<path d="M2 12l10 5 10-5"/>
</svg>
<h1 class="logo-text">QueryCraft</h1>
</div>
</header>
<!-- Service Status Panel -->
<section id="service-panel" class="panel service-panel hidden">
<div class="service-status">
<div class="service-icon" id="service-icon">
<svg class="icon-loading" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="10"/>
</svg>
<svg class="icon-connected hidden" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/>
<polyline points="22 4 12 14.01 9 11.01"/>
</svg>
<svg class="icon-error hidden" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="10"/>
<line x1="15" y1="9" x2="9" y2="15"/>
<line x1="9" y1="9" x2="15" y2="15"/>
</svg>
</div>
<div class="service-info">
<span id="service-name" class="service-name">Connecting...</span>
<span id="service-url" class="service-url"></span>
<span class="service-meta">
<span class="service-meta-label">Last updated</span>
<span id="service-last-updated" class="service-meta-value">—</span>
</span>
</div>
<div id="service-badge" class="service-badge loading">
<span id="service-badge-text">Connecting</span>
</div>
</div>
<div class="service-hint">Connected service is ready for exploration and execution.</div>
</section>
<!-- Starter Queries Panel -->
<section id="starter-panel" class="panel starter-panel hidden">
<div class="panel-header">
<span class="panel-icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M12 2v6"/>
<path d="M12 16v6"/>
<path d="M4.93 4.93l4.24 4.24"/>
<path d="M14.83 14.83l4.24 4.24"/>
<path d="M2 12h6"/>
<path d="M16 12h6"/>
<path d="M4.93 19.07l4.24-4.24"/>
<path d="M14.83 9.17l4.24-4.24"/>
</svg>
</span>
<span class="panel-title">Starter Queries</span>
<span class="badge">Click to copy</span>
</div>
<div class="panel-content">
<div id="starter-list" class="starter-grid"></div>
</div>
</section>
<!-- Schema Panel (collapsible) -->
<section id="schema-panel" class="panel schema-panel hidden">
<button class="panel-toggle" aria-expanded="false">
<div class="panel-header">
<span class="panel-icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="3" y="3" width="18" height="18" rx="2"/>
<path d="M3 9h18"/>
<path d="M9 21V9"/>
</svg>
</span>
<span class="panel-title">Schema</span>
<span id="entity-count" class="badge">0 entities</span>
</div>
<svg class="chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M6 9l6 6 6-6"/>
</svg>
</button>
<div class="panel-content">
<div class="schema-search">
<input id="schema-search" type="search" placeholder="Search entities..." aria-label="Search entities" />
<span id="schema-search-count" class="schema-search-count"></span>
</div>
<div id="entities-list" class="entities-grid"></div>
<details class="schema-details">
<summary>Full Schema Context</summary>
<pre id="schema-context" class="schema-code"></pre>
</details>
</div>
</section>
<!-- Entity Diagram Panel -->
<section id="diagram-panel" class="panel diagram-panel hidden">
<div class="panel-header">
<span class="panel-icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="6" cy="6" r="3"/>
<circle cx="18" cy="6" r="3"/>
<circle cx="6" cy="18" r="3"/>
<circle cx="18" cy="18" r="3"/>
<path d="M9 6h6"/>
<path d="M6 9v6"/>
<path d="M18 9v6"/>
<path d="M9 18h6"/>
</svg>
</span>
<span class="panel-title">Entity Relationships</span>
<span id="relationship-count" class="badge">0 relationships</span>
</div>
<div class="diagram-container">
<svg id="diagram-svg" class="entity-diagram"></svg>
</div>
<div class="diagram-legend">
<span class="legend-item"><span class="legend-line solid"></span> Single</span>
<span class="legend-item"><span class="legend-line collection"></span> Collection</span>
</div>
</section>
<!-- Query Panel -->
<section id="query-panel" class="panel query-panel hidden">
<div class="panel-header">
<span class="panel-icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<polyline points="16 18 22 12 16 6"/>
<polyline points="8 6 2 12 8 18"/>
</svg>
</span>
<span class="panel-title">Generated Query</span>
<div id="query-status" class="query-badge hidden">
<span class="query-badge-icon"></span>
<span id="query-status-text"></span>
</div>
</div>
<div class="query-content">
<code id="query-url" class="query-code"></code>
<button id="copy-btn" class="btn btn-primary">
<svg class="icon-copy" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"/>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/>
</svg>
<svg class="icon-check hidden" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<polyline points="20 6 9 17 4 12"/>
</svg>
<span class="btn-text">Copy</span>
</button>
</div>
<div id="query-explanation" class="query-explanation hidden">
<div class="query-explanation-header">
<span class="query-explanation-title">Query Breakdown</span>
<span id="query-hint" class="query-explanation-hint"></span>
</div>
<div id="query-explanation-body" class="query-explanation-body"></div>
</div>
</section>
<!-- Results Panel -->
<section id="results-panel" class="panel results-panel hidden">
<div class="panel-header">
<span class="panel-icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="3" y="3" width="18" height="18" rx="2"/>
<path d="M3 9h18"/>
<path d="M3 15h18"/>
<path d="M9 3v18"/>
</svg>
</span>
<span class="panel-title">Results</span>
<span id="results-subtitle" class="panel-subtitle"></span>
<span id="results-count" class="badge">0 results</span>
</div>
<div class="table-container">
<table class="results-table">
<thead></thead>
<tbody id="results-body"></tbody>
</table>
</div>
</section>
<!-- Empty state / Help -->
<section id="empty-state" class="empty-state">
<div class="empty-icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/>
</svg>
</div>
<p class="empty-text">Ask Claude to explore this OData service</p>
<p class="empty-hint">Start with a simple, bounded request</p>
<div class="empty-tips">
<span class="empty-pill">Top 5 results</span>
<span class="empty-pill">Filter by date</span>
<span class="empty-pill">Select key fields</span>
</div>
</section>
</main>
<script type="module" src="/src/mcp-app.ts"></script>
</body>
</html>