Add an "Open admin" button to the integration pages
Each integration page now has a button next to its title that opens the product's own admin panel in a new tab, using the address entered on the integration. Tailscale links to its admin console. Only http(s) addresses become links. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
51ad309e35
commit
75f0a3d881
9 files changed
+64
-8
No files matched your search
@@ -13,6 +13,7 @@ import { usePagination } from "../hooks/usePagination";
|
||||
import Pagination from "../components/Pagination";
|
||||
import { downloadCsv } from "../utils/csv";
|
||||
import { confirmDialog } from "../utils/dialogs";
|
||||
import IntegrationPageTitle from "../components/IntegrationPageTitle";
|
||||
|
||||
function updateBadge(c: DockhandContainer) {
|
||||
if (c.updateAvailable === null) return <span className="text-secondary">—</span>;
|
||||
@@ -140,7 +141,7 @@ export default function Docker({ user }: { user: CurrentUser }) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<h2 className="page-title mb-3">Docker</h2>
|
||||
<IntegrationPageTitle title="Docker" adminName="Dockhand" integration={selected} />
|
||||
{error && <div className="alert alert-danger">{error}</div>}
|
||||
|
||||
{integrations?.length === 0 ? (
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import IntegrationPageTitle from "../components/IntegrationPageTitle";
|
||||
import { Link } from "react-router-dom";
|
||||
import { api, type CurrentUser, type GiteaRepo, type IntegrationSummary } from "../api/client";
|
||||
import { useSortable } from "../hooks/useSortable";
|
||||
@@ -113,7 +114,7 @@ export default function Gitea({ user }: { user: CurrentUser }) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<h2 className="page-title mb-3">Gitea</h2>
|
||||
<IntegrationPageTitle title="Gitea" integration={selected} />
|
||||
{error && <div className="alert alert-danger">{error}</div>}
|
||||
|
||||
{integrations?.length === 0 ? (
|
||||
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
import { useSortable } from "../hooks/useSortable";
|
||||
import SortableTh from "../components/SortableTh";
|
||||
import { downloadCsv } from "../utils/csv";
|
||||
import IntegrationPageTitle from "../components/IntegrationPageTitle";
|
||||
|
||||
function formatBytes(bytes: number | null): string {
|
||||
if (bytes === null) return "—";
|
||||
@@ -126,7 +127,7 @@ export default function PbsBackup({ user: _user }: { user: CurrentUser }) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<h2 className="page-title mb-3">Proxmox Backup Server</h2>
|
||||
<IntegrationPageTitle title="Proxmox Backup Server" integration={selected} />
|
||||
{error && <div className="alert alert-danger">{error}</div>}
|
||||
|
||||
{integrations?.length === 0 ? (
|
||||
|
||||
@@ -16,6 +16,7 @@ import { usePagination } from "../hooks/usePagination";
|
||||
import Pagination from "../components/Pagination";
|
||||
import { downloadCsv } from "../utils/csv";
|
||||
import { confirmDialog } from "../utils/dialogs";
|
||||
import IntegrationPageTitle from "../components/IntegrationPageTitle";
|
||||
|
||||
function proxmoxStatusBadge(status: string) {
|
||||
return status === "running" ? (
|
||||
@@ -203,7 +204,7 @@ export default function Proxmox({ user }: { user: CurrentUser }) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<h2 className="page-title mb-3">Proxmox</h2>
|
||||
<IntegrationPageTitle title="Proxmox" integration={selected} />
|
||||
{error && <div className="alert alert-danger">{error}</div>}
|
||||
|
||||
{integrations?.length === 0 ? (
|
||||
|
||||
@@ -14,6 +14,7 @@ import { usePagination } from "../hooks/usePagination";
|
||||
import Pagination from "../components/Pagination";
|
||||
import { downloadCsv } from "../utils/csv";
|
||||
import { confirmDialog } from "../utils/dialogs";
|
||||
import IntegrationPageTitle from "../components/IntegrationPageTitle";
|
||||
|
||||
function semaphoreStatusBadge(template: SemaphoreTemplate) {
|
||||
const status = template.lastTask?.status;
|
||||
@@ -118,7 +119,7 @@ export default function Semaphore({ user }: { user: CurrentUser }) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<h2 className="page-title mb-3">Semaphore</h2>
|
||||
<IntegrationPageTitle title="Semaphore" integration={selected} />
|
||||
{error && <div className="alert alert-danger">{error}</div>}
|
||||
|
||||
{integrations?.length === 0 ? (
|
||||
|
||||
@@ -12,6 +12,7 @@ import {
|
||||
import { useSortable } from "../hooks/useSortable";
|
||||
import SortableTh from "../components/SortableTh";
|
||||
import { downloadCsv } from "../utils/csv";
|
||||
import IntegrationPageTitle from "../components/IntegrationPageTitle";
|
||||
|
||||
function healthBadge(status: string) {
|
||||
return status === "normal" ? (
|
||||
@@ -133,7 +134,7 @@ export default function Synology({ user: _user }: { user: CurrentUser }) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<h2 className="page-title mb-3">Synology</h2>
|
||||
<IntegrationPageTitle title="Synology" integration={selected} />
|
||||
{error && <div className="alert alert-danger">{error}</div>}
|
||||
|
||||
{integrations?.length === 0 ? (
|
||||
|
||||
@@ -15,6 +15,7 @@ import Pagination from "../components/Pagination";
|
||||
import { downloadCsv } from "../utils/csv";
|
||||
import { useSelection } from "../hooks/useSelection";
|
||||
import { confirmDialog } from "../utils/dialogs";
|
||||
import IntegrationPageTitle from "../components/IntegrationPageTitle";
|
||||
|
||||
const KEY_EXPIRY_WARN_DAYS = 30;
|
||||
|
||||
@@ -156,7 +157,7 @@ export default function Tailscale({ user }: { user: CurrentUser }) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<h2 className="page-title mb-3">Tailscale</h2>
|
||||
<IntegrationPageTitle title="Tailscale" url="https://login.tailscale.com/admin/machines" integration={selected} />
|
||||
{error && <div className="alert alert-danger">{error}</div>}
|
||||
|
||||
{integrations?.length === 0 ? (
|
||||
|
||||
@@ -7,6 +7,7 @@ import { usePagination } from "../hooks/usePagination";
|
||||
import Pagination from "../components/Pagination";
|
||||
import { downloadCsv } from "../utils/csv";
|
||||
import { readableError } from "../utils/errors";
|
||||
import IntegrationPageTitle from "../components/IntegrationPageTitle";
|
||||
|
||||
function statusBadge(monitor: UptimeKumaMonitor) {
|
||||
switch (monitor.status) {
|
||||
@@ -97,7 +98,7 @@ export default function UptimeKuma({ user: _user }: { user: CurrentUser }) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<h2 className="page-title mb-3">Uptime Kuma</h2>
|
||||
<IntegrationPageTitle title="Uptime Kuma" integration={selected} />
|
||||
{error && <div className="alert alert-danger">{error}</div>}
|
||||
|
||||
{integrations?.length === 0 ? (
|
||||
|
||||
Reference in new issue
Block a user