Without compteur

Pushed by: unknown_user
Timestamp: 2026-01-25T20:21:30.710170
masterdev
Splunk Git Pusher 3 months ago
parent 35e711853e
commit 19383ecb49

@ -63,18 +63,18 @@ function populateAppsList(apps) {
return;
}
let html = '<div class="select-all-group">';
html += '<input type="checkbox" id="select-all" onchange="toggleSelectAll(this)">';
html += '<label for="select-all">Select All (' + apps.length + ' apps)</label>';
let html = '<div class="app-header">';
html += '<span>Select Applications</span>';
html += '<input type="checkbox" id="select-all">';
html += '</div>';
apps.forEach((app, index) => {
const checkboxId = 'app-' + index;
html += '<div class="dashboard-item">';
html += '<input type="checkbox" id="' + checkboxId + '" value="' + app.id + '" data-app="' + app.id + '" data-name="' + app.name + '">';
html += '<div class="app-item">';
html += '<input type="checkbox" id="' + checkboxId + '" value="' + app.id + '" data-app="true" data-name="' + app.name + '">';
html += '<label for="' + checkboxId + '"><strong>' + app.name + '</strong> <span class="app-badge">' + app.id + '</span>';
if (app.description) {
html += '<div style="font-size: 11px; color: #666; margin-top: 3px;">' + app.description + '</div>';
html += '<div style="font-size: 11px; color: #999; margin-top: 3px;">' + app.description + '</div>';
}
html += '</label>';
html += '</div>';
@ -82,6 +82,27 @@ function populateAppsList(apps) {
container.innerHTML = html;
console.log('Successfully populated ' + apps.length + ' apps');
// Ajouter les event listeners
addCheckboxListeners();
}
function addCheckboxListeners() {
console.log("addCheckboxListeners called");
const selectAllCheckbox = document.getElementById('select-all');
if (selectAllCheckbox) {
selectAllCheckbox.addEventListener('change', function() {
toggleSelectAll(this);
});
}
const appCheckboxes = document.querySelectorAll('#dashboard-list input[type="checkbox"][data-app]');
appCheckboxes.forEach(checkbox => {
checkbox.addEventListener('change', function() {
console.log("App checkbox changed");
});
});
}
function showAppsEmpty() {
@ -350,7 +371,7 @@ function showAppsEmpty() {
}
function toggleSelectAll(checkbox) {
const checkboxes = document.querySelectorAll('#dashboard-list input[type="checkbox"]:not(#select-all)');
const checkboxes = document.querySelectorAll('#dashboard-list input[type="checkbox"][data-app]');
checkboxes.forEach(cb => cb.checked = checkbox.checked);
}

@ -382,40 +382,6 @@
gap: 10px;
}
.stats {
display: flex;
gap: 15px;
margin-bottom: 20px;
}
.stat-item {
flex: 1;
background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
border-radius: 12px;
padding: 15px;
text-align: center;
border: 2px solid transparent;
transition: all 0.3s ease;
}
.stat-item:hover {
border-color: #667eea;
}
.stat-number {
font-size: 24px;
font-weight: 700;
color: #667eea;
margin-bottom: 5px;
}
.stat-label {
font-size: 12px;
color: #666;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.divider {
height: 1px;
background: linear-gradient(90deg, transparent, #e0e0e0, transparent);
@ -484,17 +450,6 @@
<!-- Applications Panel -->
<div class="card">
<div class="card-title">📦 Applications</div>
<div class="stats">
<div class="stat-item">
<div class="stat-number" id="total-apps">0</div>
<div class="stat-label">Available</div>
</div>
<div class="stat-item">
<div class="stat-number" id="selected-apps">0</div>
<div class="stat-label">Selected</div>
</div>
</div>
<div class="apps-list" id="dashboard-list">
<div style="padding: 30px; text-align: center; color: #999;">

@ -23,4 +23,4 @@ access = read : [ * ], write : [ * ]
export = none
owner = admin
version = 10.0.2
modtime = 1769363261.895692000
modtime = 1769368785.414181000

Loading…
Cancel
Save