Qualys deploy UI: ActivationId/CustomerId masques (type password) + toggle œil

This commit is contained in:
Pierre & Lumière 2026-04-15 13:37:15 +02:00
parent a3a1ec7e6d
commit 6824fee081

View File

@ -24,18 +24,18 @@
<div>
<label class="text-xs text-gray-500 block mb-1">ActivationId Linux {% if keys_linux %}<span class="text-cyber-green">({{ keys_linux|length }} keys via API)</span>{% endif %}</label>
{% if keys_linux %}
<select id="activation_id_linux" class="w-full text-xs" style="font-family:monospace">
<select id="activation_id_linux" class="w-full text-xs" style="font-family:monospace;-webkit-text-security:disc;text-security:disc" onfocus="this.style.webkitTextSecurity='none';this.style.textSecurity='none'" onblur="this.style.webkitTextSecurity='disc';this.style.textSecurity='disc'">
{% for k in keys_linux %}<option value="{{ k.key }}" {% if k.key == activation_id_linux %}selected{% endif %}>{{ k.key }} — {{ k.title or '' }} ({{ k.used }} uses)</option>{% endfor %}
</select>
{% else %}
<input type="text" id="activation_id_linux" value="{{ activation_id_linux }}" class="w-full text-xs" style="font-family:monospace">
<input type="password" id="activation_id_linux" value="{{ activation_id_linux }}" class="w-full text-xs" style="font-family:monospace">
{% endif %}
<input type="hidden" id="activation_id" value="{{ activation_id_linux }}">
<input type="hidden" id="activation_id_windows" value="{{ activation_id_windows }}">
</div>
<div>
<label class="text-xs text-gray-500 block mb-1">CustomerId</label>
<input type="text" id="customer_id" value="{{ customer_id }}" class="w-full text-xs" style="font-family:monospace">
<label class="text-xs text-gray-500 block mb-1">CustomerId <button type="button" onclick="toggleField('customer_id')" class="text-xs text-cyber-accent ml-1">👁</button></label>
<input type="password" id="customer_id" value="{{ customer_id }}" class="w-full text-xs" style="font-family:monospace">
</div>
<div>
<label class="text-xs text-gray-500 block mb-1">ServerUri</label>
@ -201,6 +201,12 @@
</div>
<script>
function toggleField(id) {
var el = document.getElementById(id);
if (!el) return;
el.type = el.type === 'password' ? 'text' : 'password';
}
function saveSettings() {
var msg = document.getElementById('save-msg');
var actLin = (document.getElementById('activation_id_linux') || {}).value || '';