Hard delete applications, nest installer packages, detect PE versions

Soft delete left orphaned executables on disk and let a deleted name collide
with a fresh import, so delete is now a hard delete that removes the
associated files. The destructive paths (delete, revert-to-record) require a
typed OK because neither can be undone.

Installers keep their filename at import and nest per application/version,
which stops repeat imports doubling up. Version now comes from the same PE
detection the endpoints agent uses; when no version can be read the caller is
asked for one rather than silently storing a blank.

Applications also surface Version and a monitorable toggle, with launch path
and process name required only while monitorable is ticked. Fleet shows the
PC alias, matching PC Details.
This commit is contained in:
benjamin.baker
2026-09-07 15:04:21 -04:00
parent 79545db96e
commit 0134eaa219
17 changed files with 1600 additions and 148 deletions

View File

@@ -44,9 +44,6 @@
<a v-if="app.installpath" :href="fileHref(app.installpath)" target="_blank" title="Download Installation Files" class="icon-download">
&#x2B07;
</a>
<a v-else-if="app.applicationlink" :href="fileHref(app.applicationlink)" target="_blank" title="Application Link" class="icon-link">
&#x1F517;
</a>
</td>
<td class="icon-cell">
<a v-if="app.documentationpath" :href="fileHref(app.documentationpath)" target="_blank" title="View Documentation" class="icon-docs">
@@ -178,19 +175,23 @@ function debouncedSearch() {
}, 300)
}
// The server deactivates rather than drops the row, so this is reversible and
// the prompt does not claim otherwise. It does warn about the fleet-wide
// consequence, which is the part that is not obvious from a Delete button.
// This permanently drops the row, its versions and its uploaded installer, so
// the prompt says so plainly and requires the word OK to be typed. A plain
// confirm() is one misplaced click away from destroying licensed software.
async function deleteApplication(app) {
const warning = app.isrequired
? `\n\n"${app.appname}" is currently required on all PCs. Removing it also `
+ 'withdraws the policy that installs it.'
: ''
if (!confirm(`Remove "${app.appname}" from the catalogue?${warning}`)) return
const answer = prompt(
`Permanently delete "${app.appname}", its versions and its uploaded `
+ `executables? This action cannot be reversed.${warning}\n\n`
+ 'Type OK to proceed')
if ((answer || '').trim().toUpperCase() !== 'OK') return
try {
await applicationsApi.delete(app.appid)
await applicationsApi.delete(app.appid, (answer || '').trim())
loadApplications()
} catch (error) {
console.error('Error deleting application:', error)
@@ -227,10 +228,6 @@ function changePerPage(newPerPage) {
color: var(--success);
}
.icon-link {
color: var(--link);
}
.icon-docs {
color: var(--secondary);
}