Added car by motor

This commit is contained in:
SepehrYahyaee
2026-09-29 16:31:40 +03:30
parent 83c5810399
commit 36deb87582
14 changed files with 471 additions and 36 deletions
+21 -10
View File
@@ -70,6 +70,7 @@
<option value="legalPerson">Legal person</option>
<option value="carByPlate">Car by plate</option>
<option value="carByChassis">Car by chassis</option>
<option value="carByMotor">Car by motor number</option>
<option value="thirdPartyCar">Third-party car</option>
<option value="policyByChassis">Policy by chassis</option>
<option value="policyByPlate">Policy by plate</option>
@@ -96,28 +97,38 @@
</section>
<section class="panel">
<div class="panel-heading"><div><p class="eyebrow">Batch input</p><h2>Test plate inquiries from JSON</h2></div></div>
<p class="muted">Choose a JSON or TXT file, or paste a JSON array. For Parsian third-party plate inquiries, use <strong>Car by plate</strong>; the other routes remain available only for diagnostics.</p>
<div class="panel-heading"><div><p class="eyebrow">Batch input</p><h2>Test vehicle inquiries from JSON</h2></div></div>
<p class="muted">Choose plate, chassis/VIN, motor number, or a combined mode. Each lookup produces an independently expandable result with separate logs, traces, and cURLs.</p>
<div class="batch-controls">
<label>JSON/TXT file<input id="batchFile" type="file" accept=".json,.txt,application/json,text/plain" /></label>
<label>Inquiry mode
<select id="batchInquiryMode">
<option value="carByPlate">By plate</option>
<option value="carByChassis">By chassis / VIN</option>
<option value="carByMotor">By motor number</option>
<option value="both" selected>Plate and chassis</option>
<option value="all">Plate, chassis, and motor</option>
</select>
</label>
<label>Delay between requests (ms)<input id="batchDelay" type="number" min="0" max="10000" step="100" value="0" /></label>
</div>
<label class="wide">Input preview / paste JSON
<textarea id="batchPayload" rows="8" spellcheck="false" placeholder='[{"nationalCode":"4311402422","plk1":"12","plk2":"ب","plk3":"345","plksrl":"67"}]'></textarea>
<textarea id="batchPayload" rows="8" spellcheck="false" placeholder='[{"nationalCode":"4311402422","plk1":"12","plk2":"ب","plk3":"345","plksrl":"67","vin":"IRFC89R2VSY976455","motorNo":"147H0403219"}]'></textarea>
</label>
<div class="endpoint-list">
<span class="muted">Endpoints</span>
<label class="checkbox"><input type="checkbox" name="batchEndpoint" value="carByPlate" checked /> Car by plate</label>
<label class="checkbox"><input type="checkbox" name="batchEndpoint" value="thirdPartyCar" /> Third-party car (diagnostic)</label>
<label class="checkbox"><input type="checkbox" name="batchEndpoint" value="policyByPlate" /> Policy by plate (diagnostic)</label>
</div>
<div class="batch-actions">
<button id="runBatchButton" class="primary" type="button">Run batch test</button>
<button id="stopBatchButton" class="ghost hidden" type="button">Stop after current request</button>
<span id="batchSummary" class="muted"></span>
</div>
<div id="batchCoverage" class="coverage-grid hidden" aria-live="polite">
<article class="coverage-card coverage-card-good"><span>Answered by plate or VIN</span><strong id="coverageAnswered">0 / 0</strong><small id="coverageAnsweredRate">0.0%</small></article>
<article class="coverage-card coverage-card-bad"><span>No answer from either</span><strong id="coverageUnanswered">0 / 0</strong><small id="coverageUnansweredRate">0.0%</small></article>
<article class="coverage-card coverage-card-pending"><span>Inconclusive</span><strong id="coverageInconclusive">0</strong><small>failure or invalid input</small></article>
<article class="coverage-card coverage-card-recovered"><span>Recovered by motor</span><strong id="coverageMotorRecovered">0</strong><small>plate + VIN still count as no-answer</small></article>
</div>
<label id="batchCoverageFilter" class="checkbox coverage-filter hidden"><input id="batchUnansweredOnly" type="checkbox" /> Show only records with no plate or VIN answer</label>
<progress id="batchProgress" class="batch-progress hidden" max="1" value="0"></progress>
<div class="table-wrap"><table><thead><tr><th>#</th><th>Input</th><th>Endpoint</th><th>Status</th><th>Tracking code</th><th>Message</th></tr></thead><tbody id="batchResultsBody"></tbody></table></div>
<div class="table-wrap"><table><thead><tr><th>#</th><th>Input</th><th>Endpoint</th><th>Status</th><th>Tracking code</th><th>Message</th><th>Coverage / follow-up</th></tr></thead><tbody id="batchResultsBody"></tbody></table></div>
<p id="batchOutput" class="table-hint" role="status">Click a request row to expand its full response.</p>
</section>