This commit is contained in:
Admin9705
2025-05-02 12:20:51 -04:00
parent b7032729c1
commit 19fb1ca2e4
2 changed files with 7 additions and 2 deletions

View File

@@ -229,12 +229,16 @@ const historyModule = {
data.entries.forEach(entry => {
const row = document.createElement('tr');
// Format the instance name to include app type (capitalize first letter of app type)
const appType = entry.app_type ? entry.app_type.charAt(0).toUpperCase() + entry.app_type.slice(1) : '';
const formattedInstance = appType ? `${appType} - ${entry.instance_name}` : entry.instance_name;
row.innerHTML = `
<td>${entry.date_time_readable}</td>
<td>${this.escapeHtml(entry.processed_info)}</td>
<td>${this.formatOperationType(entry.operation_type)}</td>
<td>${this.escapeHtml(entry.id)}</td>
<td>${this.escapeHtml(entry.instance_name)}</td>
<td>${this.escapeHtml(formattedInstance)}</td>
<td>${this.escapeHtml(entry.how_long_ago)}</td>
`;

View File

@@ -68,7 +68,8 @@ def add_history_entry(app_type, entry_data):
"processed_info": entry_data["name"],
"id": entry_data["id"],
"instance_name": entry_data["instance_name"],
"operation_type": entry_data.get("operation_type", "missing") # Default to "missing" if not specified
"operation_type": entry_data.get("operation_type", "missing"), # Default to "missing" if not specified
"app_type": app_type # Include app_type in the entry for display in UI
}
history_file = os.path.join(HISTORY_BASE_PATH, f"{app_type}_history.json")