-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresponse-comparator.html
More file actions
214 lines (203 loc) · 7.16 KB
/
Copy pathresponse-comparator.html
File metadata and controls
214 lines (203 loc) · 7.16 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" />
<title>DevKit Studio | Response Comparator</title>
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
rel="stylesheet"
/>
<link rel="stylesheet" href="styles.css" />
</head>
<body data-page="response-comparator">
<div class="app-shell">
<aside class="sidebar">
<a class="brand" href="index.html" aria-label="DevKit Studio dashboard">
<div class="brand-mark">DS</div>
<div>
<h1 class="brand-title">DevKit Studio</h1>
<p class="brand-subtitle">VS Code meets Postman in the browser</p>
</div>
</a>
<p class="sidebar-label">Workspace Modules</p>
<nav class="module-nav" aria-label="DevKit modules">
<a class="module-link" href="index.html" data-page-link="index"
><span>Dashboard</span><span class="module-index">00</span></a
>
<a
class="module-link"
href="json-explorer.html"
data-page-link="json-explorer"
><span>JSON Explorer</span><span class="module-index">01</span></a
>
<a
class="module-link"
href="xml-explorer.html"
data-page-link="xml-explorer"
><span>XML Explorer</span><span class="module-index">02</span></a
>
<a
class="module-link"
href="rss-reader.html"
data-page-link="rss-reader"
><span>RSS Reader</span><span class="module-index">03</span></a
>
<a
class="module-link"
href="api-client.html"
data-page-link="api-client"
><span>API Client</span><span class="module-index">04</span></a
>
<a
class="module-link"
href="response-comparator.html"
data-page-link="response-comparator"
><span>Response Comparator</span
><span class="module-index">05</span></a
>
<a
class="module-link"
href="schema-builder.html"
data-page-link="schema-builder"
><span>Schema Builder</span><span class="module-index">06</span></a
>
<a
class="module-link"
href="json-xml-converter.html"
data-page-link="json-xml-converter"
><span>JSON ↔ XML Converter</span
><span class="module-index">07</span></a
>
<a
class="module-link"
href="api-viewer.html"
data-page-link="api-viewer"
><span>API Viewer</span><span class="module-index">08</span></a
>
<a
class="module-link"
href="request-history.html"
data-page-link="request-history"
><span>Request History</span><span class="module-index">09</span></a
>
<a
class="module-link"
href="collections.html"
data-page-link="collections"
><span>Collections</span><span class="module-index">10</span></a
>
<a
class="module-link"
href="environment-variables.html"
data-page-link="environment-variables"
><span>Environment Variables</span
><span class="module-index">11</span></a
>
<a
class="module-link"
href="mock-response-generator.html"
data-page-link="mock-response-generator"
><span>Mock Response Generator</span
><span class="module-index">12</span></a
>
</nav>
<p class="footer-note">Local-first developer tooling workspace</p>
</aside>
<main class="main-shell">
<header class="page-header">
<p class="page-kicker">Module 05</p>
<h2 class="page-title">Response Comparator</h2>
<p class="page-subtitle">
Compare two JSON responses recursively and export a structured diff
report.
</p>
</header>
<section class="status-bar" aria-live="polite">
<p class="status-message" id="globalStatus">
Response Comparator ready. Paste two JSON responses or load a
sample.
</p>
<span class="status-chip">Diff</span>
</section>
<section class="module-grid equal">
<div class="panel">
<div class="toolbar">
<button
class="btn btn-cyber"
type="button"
id="compareResponsesBtn"
>
Compare Responses
</button>
<button
class="btn btn-purple"
type="button"
id="loadComparisonSampleBtn"
>
Load Sample Comparison
</button>
<button
class="btn btn-ghost"
type="button"
id="copyDiffReportBtn"
>
Copy Diff Report
</button>
<button
class="btn btn-ghost"
type="button"
id="downloadDiffJsonBtn"
>
Download Diff JSON
</button>
</div>
<label class="form-label" for="originalResponseInput"
>Original JSON</label
>
<textarea
class="code-input form-control mb-3"
id="originalResponseInput"
spellcheck="false"
placeholder="Paste original response JSON"
></textarea>
<label class="form-label" for="updatedResponseInput"
>Updated JSON</label
>
<textarea
class="code-input form-control"
id="updatedResponseInput"
spellcheck="false"
placeholder="Paste updated response JSON"
></textarea>
</div>
<div class="panel">
<div class="panel-header">
<div>
<h3 class="panel-title">Diff Report</h3>
<p class="panel-subtitle">
Added, removed, changed, and unchanged fields.
</p>
</div>
</div>
<div class="pill-row mb-3" id="diffStats">
<span class="stat-pill">Added: 0</span>
<span class="stat-pill">Removed: 0</span>
<span class="stat-pill">Changed: 0</span>
<span class="stat-pill">Unchanged: 0</span>
</div>
<div id="diffResultsOutput">
<div class="empty-state">
Compare two responses to view the diff report.
</div>
</div>
</div>
</section>
</main>
</div>
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<script src="js/shared.js"></script>
<script src="js/response-comparator.js"></script>
</body>
</html>