feat: make uninstall command always visible in Agents settings
Previously the uninstall command was hidden behind the token generation step. Now it's always visible at the bottom of the 'Add a unified agent' card.
This commit is contained in:
parent
1a9973461e
commit
9aa1000bdb
1 changed files with 27 additions and 0 deletions
|
|
@ -716,6 +716,33 @@ export const UnifiedAgents: Component = () => {
|
|||
</details>
|
||||
</div>
|
||||
</Show>
|
||||
|
||||
{/* Uninstall section - always visible */}
|
||||
<div class="border-t border-gray-200 dark:border-gray-700 pt-4 mt-4">
|
||||
<div class="space-y-2">
|
||||
<h4 class="text-sm font-semibold text-gray-900 dark:text-gray-100">Uninstall agent</h4>
|
||||
<p class="text-xs text-gray-600 dark:text-gray-400">
|
||||
Run this command on any host to remove the Pulse agent:
|
||||
</p>
|
||||
<div class="flex items-center gap-2">
|
||||
<code class="flex-1 break-all rounded bg-gray-900 px-3 py-2 font-mono text-xs text-red-400 dark:bg-gray-950">
|
||||
{getUninstallCommand()}
|
||||
</code>
|
||||
<button
|
||||
type="button"
|
||||
onClick={async () => {
|
||||
const success = await copyToClipboard(getUninstallCommand());
|
||||
if (typeof window !== 'undefined' && window.showToast) {
|
||||
window.showToast(success ? 'success' : 'error', success ? 'Copied!' : 'Failed');
|
||||
}
|
||||
}}
|
||||
class="rounded-lg bg-red-50 px-3 py-1.5 text-xs font-medium text-red-700 transition-colors hover:bg-red-100 dark:bg-red-900/30 dark:text-red-300 dark:hover:bg-red-900/50"
|
||||
>
|
||||
Copy
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue