feat: add per-device custom Chrome production URL override
- Device model: add custom_chrome_url nullable column - API: GET /api/wmt/config/<mac> returns device custom_chrome_url when set, falls back to WMTGlobalConfig.chrome_url for all other devices - Web: device_edit POST saves/clears custom_chrome_url from form - Template: wmt/device_form.html adds Chrome URL override section with clear status indicator (using global vs custom URL) - DB: ALTER TABLE devices ADD COLUMN custom_chrome_url VARCHAR(500) applied
This commit is contained in:
@@ -72,6 +72,34 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<h6 class="text-muted mb-1">Chrome Launch – Production URL Override</h6>
|
||||
<p class="text-muted small mb-3">
|
||||
Leave blank to use the global default URL configured in
|
||||
<a href="{{ url_for('wmt_web.settings') }}" target="_blank">WMT Settings</a>.
|
||||
Fill in only if this device needs a different production page.
|
||||
</p>
|
||||
<div class="mb-3">
|
||||
<label class="form-label fw-semibold">Custom Production URL
|
||||
<small class="text-muted fw-normal">(device-specific override)</small>
|
||||
</label>
|
||||
<input type="url" name="custom_chrome_url" class="form-control"
|
||||
value="{{ device.custom_chrome_url or '' if device else '' }}"
|
||||
placeholder="Leave blank to use global default">
|
||||
{% if device and device.custom_chrome_url %}
|
||||
<div class="form-text text-warning">
|
||||
<i class="fas fa-exclamation-triangle me-1"></i>
|
||||
This device uses a custom URL instead of the global default.
|
||||
Clear the field to revert to the global setting.
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="form-text text-success">
|
||||
<i class="fas fa-check-circle me-1"></i>
|
||||
Using global default production URL.
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if device %}
|
||||
<div class="alert alert-light border small mb-4">
|
||||
<strong>Last seen:</strong>
|
||||
|
||||
Reference in New Issue
Block a user