admin-redesign #26
@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en" class="dark">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
@ -9,21 +9,21 @@
|
|||||||
{% include 'base/partials/stylesheets.html.j2' %}
|
{% include 'base/partials/stylesheets.html.j2' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
<body class="bg-gray-50 text-gray-900 min-h-screen flex flex-col">
|
<body class="bg-gray-50 text-gray-900 dark:bg-gray-900 min-h-screen flex flex-col">
|
||||||
|
|
||||||
<!-- Layout Container -->
|
<!-- Layout Container -->
|
||||||
<div class="flex flex-1 h-full overflow-hidden">
|
<div class="flex flex-1 h-full overflow-hidden">
|
||||||
|
|
||||||
<!-- Sidebar -->
|
<!-- Sidebar -->
|
||||||
|
|
||||||
<aside class="hidden md:flex md:w-64 flex-col h-full min-h-screen bg-white border-r border-gray-300" id="sidebar" aria-label="sidebar">
|
<aside class="hidden md:flex md:w-64 flex-col h-full min-h-screen bg-white border-r border-gray-300 dark:bg-gray-800 dark:border-gray-700" id="sidebar" aria-label="sidebar">
|
||||||
{% include "base/partials/sidebar.html.j2" %}
|
{% include "base/partials/sidebar.html.j2" %}
|
||||||
</aside>
|
</aside>
|
||||||
<!-- Main Panel -->
|
<!-- Main Panel -->
|
||||||
<div class="flex-1 flex flex-col overflow-hidden">
|
<div class="flex-1 flex flex-col overflow-hidden">
|
||||||
|
|
||||||
<!-- Topbar -->
|
<!-- Topbar -->
|
||||||
<header class="bg-white border-b px-4 py-3 border-gray-300">
|
<header class="bg-white border-b px-4 py-3 border-gray-300 dark:bg-gray-800 dark:border-gray-700">
|
||||||
{% include "base/partials/navbar.html.j2" %}
|
{% include "base/partials/navbar.html.j2" %}
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
<!-- Master Pane -->
|
<!-- Master Pane -->
|
||||||
<aside id="master-pane"
|
<aside id="master-pane"
|
||||||
class="md:w-80 w-full shrink-0 border-r overflow-y-auto bg-white md:block border-gray-200 p-4">
|
class="md:w-80 w-full shrink-0 border-r overflow-y-auto bg-white md:block border-gray-200 p-4 dark:bg-gray-800 dark:border-gray-700">
|
||||||
{% block master %}
|
{% block master %}
|
||||||
<p class="p-4 text-gray-500">Master view (e.g. list/tree)</p>
|
<p class="p-4 text-gray-500">Master view (e.g. list/tree)</p>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -15,9 +15,9 @@
|
|||||||
|
|
||||||
<!-- Detail Pane -->
|
<!-- Detail Pane -->
|
||||||
<section id="detail-pane"
|
<section id="detail-pane"
|
||||||
class="flex-1 flex overflow-y-auto bg-white p-4 hidden md:block">
|
class="flex-1 flex overflow-y-auto bg-white p-4 hidden md:block dark:bg-gray-800">
|
||||||
{% block detail %}
|
{% block detail %}
|
||||||
<p class="p-4 text-gray-500">Select an item to view details</p>
|
<p class="p-4 text-gray-500 dark:text-gray-200">Select an item to view details</p>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,9 @@
|
|||||||
{% extends "/base/base.html.j2" %}
|
{% extends "/base/base.html.j2" %}
|
||||||
|
|
||||||
{% block title %}{{ title or "Page" }}{% endblock %}
|
|
||||||
|
|
||||||
{% block breadcrumbs %}
|
{% block breadcrumbs %}
|
||||||
|
|
||||||
<div class="p-4 bg-white block sm:flex items-center justify-between border-b border-gray-200">
|
<div class="p-4 bg-white block sm:flex items-center justify-between border-b border-gray-200 dark:bg-gray-800 dark:border-gray-700">
|
||||||
<nav class="text-sm text-gray-500" aria-label="Breadcrumb">
|
<nav class="text-sm text-gray-500" aria-label="Breadcrumb">
|
||||||
|
|
||||||
<sl-breadcrumb id="breadcrumbs">
|
<sl-breadcrumb id="breadcrumbs">
|
||||||
@ -32,7 +31,7 @@
|
|||||||
<!-- Breadcrumbs -->
|
<!-- Breadcrumbs -->
|
||||||
|
|
||||||
<!-- Page Content -->
|
<!-- Page Content -->
|
||||||
<section>
|
<section class="bg-white dark:bg-gray-800">
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
<p>This is a generic page.</p>
|
<p>This is a generic page.</p>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<!-- Top: Brand -->
|
<!-- Top: Brand -->
|
||||||
<div class="px-4 py-6">
|
<div class="px-4 py-6">
|
||||||
|
|
||||||
<a href="/" class="text-xl font-semibold text-gray-800">
|
<a href="/" class="text-xl font-semibold text-gray-800 dark:text-gray-100">
|
||||||
<sl-icon src="{{ url_for('static', path='logo.svg') }}"></sl-icon>
|
<sl-icon src="{{ url_for('static', path='logo.svg') }}"></sl-icon>
|
||||||
Sshecret
|
Sshecret
|
||||||
</a>
|
</a>
|
||||||
@ -13,28 +13,28 @@
|
|||||||
<ul class="space-y-">
|
<ul class="space-y-">
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href="/" class="flex items-center px-3 py-2 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-100">
|
<a href="/" class="flex items-center px-3 py-2 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-700">
|
||||||
<sl-icon name="house"></sl-icon>
|
<sl-icon name="house"></sl-icon>
|
||||||
Dashboard
|
Dashboard
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href="/clients/" class="flex items-center px-3 py-2 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-100">
|
<a href="/clients/" class="flex items-center px-3 py-2 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-700">
|
||||||
<sl-icon name="person-fill-lock"> </sl-icon>
|
<sl-icon name="person-fill-lock"> </sl-icon>
|
||||||
Clients
|
Clients
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href="/secrets" class="flex items-center px-3 py-2 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-100">
|
<a href="/secrets" class="flex items-center px-3 py-2 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-700">
|
||||||
<sl-icon name="database-lock"></sl-icon>
|
<sl-icon name="database-lock"></sl-icon>
|
||||||
Secrets
|
Secrets
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href="/audit" class="flex items-center px-3 py-2 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-100">
|
<a href="/audit" class="flex items-center px-3 py-2 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-700">
|
||||||
<sl-icon name="card-list"></sl-icon>
|
<sl-icon name="card-list"></sl-icon>
|
||||||
Audit Log
|
Audit Log
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -35,3 +35,16 @@
|
|||||||
href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.20.1/cdn/themes/dark.css"
|
href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.20.1/cdn/themes/dark.css"
|
||||||
onload="document.documentElement.classList.add('sl-theme-dark');"
|
onload="document.documentElement.classList.add('sl-theme-dark');"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// On page load or when changing themes, best to add inline in `head` to avoid FOUC
|
||||||
|
if (
|
||||||
|
localStorage.getItem("color-theme") === "dark" ||
|
||||||
|
(!("color-theme" in localStorage) &&
|
||||||
|
window.matchMedia("(prefers-color-scheme: dark)").matches)
|
||||||
|
) {
|
||||||
|
document.documentElement.classList.add("dark");
|
||||||
|
} else {
|
||||||
|
document.documentElement.classList.remove("dark");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
{% block detail %}
|
{% block detail %}
|
||||||
|
|
||||||
<div id="clientdetails" class="w-full">
|
<div id="clientdetails" class="w-full bg-white dark:bg-gray-800">
|
||||||
<h3 class="mb-4 text-sm italic text-gray-400 dark:text-white">Click an item to view details</h3>
|
<h3 class="mb-4 text-sm italic text-gray-400 dark:text-white">Click an item to view details</h3>
|
||||||
</div>
|
</div>
|
||||||
{% include '/clients/partials/drawer_create.html.j2' %}
|
{% include '/clients/partials/drawer_create.html.j2' %}
|
||||||
|
|||||||
@ -47,37 +47,37 @@
|
|||||||
<div id="client_details">
|
<div id="client_details">
|
||||||
<div class="w-full p-2">
|
<div class="w-full p-2">
|
||||||
<div class="px-4 sm:px-0">
|
<div class="px-4 sm:px-0">
|
||||||
<h3 class="text-base/7 font-semibold text-gray-900">{{client.name}}</h3>
|
<h3 class="text-base/7 font-semibold text-gray-900 dark:text-gray-50">{{client.name}}</h3>
|
||||||
{% if client.description %}
|
{% if client.description %}
|
||||||
<p class="mt-1 max-w-2xl text-sm/6 text-gray-500">{{ client.description }}</p>
|
<p class="mt-1 max-w-2xl text-sm/6 text-gray-500 dark:text-gray-100">{{ client.description }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-6 border-t border-gray-100">
|
<div class="mt-6 border-t border-gray-100">
|
||||||
<dl class="divide-y divide-gray-100">
|
<dl class="divide-y divide-gray-100">
|
||||||
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0">
|
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0">
|
||||||
<dt class="text-sm/6 font-medium text-gray-900">Client ID</dt>
|
<dt class="text-sm/6 font-medium text-gray-900 dark:text-gray-200">Client ID</dt>
|
||||||
<dd class="mt-1 text-sm/6 text-gray-700 sm:col-span-2 sm:mt-0">{{client.id}}</dd>
|
<dd class="mt-1 text-sm/6 text-gray-700 sm:col-span-2 sm:mt-0 dark:text-gray-300">{{client.id}}</dd>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0">
|
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0">
|
||||||
<dt class="text-sm/6 font-medium text-gray-900">Client Description</dt>
|
<dt class="text-sm/6 font-medium text-gray-900 dark:text-gray-200">Client Description</dt>
|
||||||
<dd class="mt-1 text-sm/6 text-gray-700 sm:col-span-2 sm:mt-0">{{client.description}}</dd>
|
<dd class="mt-1 text-sm/6 text-gray-700 sm:col-span-2 sm:mt-0 dark:text-gray-300">{{client.description}}</dd>
|
||||||
</div>
|
</div>
|
||||||
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0">
|
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0">
|
||||||
<dt class="text-sm/6 font-medium text-gray-900">Client Version</dt>
|
<dt class="text-sm/6 font-medium text-gray-900 dark:text-gray-200">Client Version</dt>
|
||||||
<dd class="mt-1 text-sm/6 text-gray-700 sm:col-span-2 sm:mt-0">{{client.version}}</dd>
|
<dd class="mt-1 text-sm/6 text-gray-700 sm:col-span-2 sm:mt-0 dark:text-gray-300">{{client.version}}</dd>
|
||||||
</div>
|
</div>
|
||||||
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0">
|
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0">
|
||||||
<dt class="text-sm/6 font-medium text-gray-900">Public Key</dt>
|
<dt class="text-sm/6 font-medium text-gray-900 dark:text-gray-200">Public Key</dt>
|
||||||
<dd class="mt-1 text-sm/6 text-gray-700 sm:col-span-2 sm:mt-0 truncate">{{client.public_key}}</dd>
|
<dd class="mt-1 text-sm/6 text-gray-700 sm:col-span-2 sm:mt-0 dark:text-gray-300 truncate">{{client.public_key}}</dd>
|
||||||
</div>
|
</div>
|
||||||
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0">
|
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0">
|
||||||
<dt class="text-sm/6 font-medium text-gray-900">Assigned Secrets</dt>
|
<dt class="text-sm/6 font-medium text-gray-900 dark:text-gray-200">Assigned Secrets</dt>
|
||||||
<dd class="mt-1 text-sm/6 text-gray-700 sm:col-span-2 sm:mt-0">{{client.secrets|length}}</dd>
|
<dd class="mt-1 text-sm/6 text-gray-700 sm:col-span-2 sm:mt-0 dark:text-gray-300">{{client.secrets|length}}</dd>
|
||||||
</div>
|
</div>
|
||||||
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0">
|
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0">
|
||||||
<dt class="text-sm/6 font-medium text-gray-900">Allowed sources</dt>
|
<dt class="text-sm/6 font-medium text-gray-900 dark:text-gray-200">Allowed sources</dt>
|
||||||
<dd class="mt-1 text-sm/6 text-gray-700 sm:col-span-2 sm:mt-0">{{client.policies|join(', ')}}</dd>
|
<dd class="mt-1 text-sm/6 text-gray-700 sm:col-span-2 sm:mt-0 dark:text-gray-300">{{client.policies|join(', ')}}</dd>
|
||||||
</div>
|
</div>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<div class="w-full my-2">
|
<div class="w-full my-2 dark:text-white">
|
||||||
<ul class="w-48 text-sm font-medium text-gray-900 bg-white dark:bg-gray-700 dark:text-white" id="secretclientlist">
|
<ul class="w-48 text-sm font-medium text-gray-900 bg-white dark:bg-gray-700 dark:text-white" id="secretclientlist">
|
||||||
{% include '/secrets/partials/client_list_inner.html.j2' %}
|
{% include '/secrets/partials/client_list_inner.html.j2' %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<div class="w-full">
|
<div class="w-full dark:text-white">
|
||||||
<sl-details summary="Create secret">
|
<sl-details summary="Create secret">
|
||||||
<form
|
<form
|
||||||
hx-post="/secrets/create/root"
|
hx-post="/secrets/create/root"
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<div class="w-full">
|
<div class="w-full dark:text-white">
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<h3 class="text-xl font-semibold dark:text-white">Group {{group.group_name}}</h3>
|
<h3 class="text-xl font-semibold dark:text-white">Group {{group.group_name}}</h3>
|
||||||
{% if description %}
|
{% if description %}
|
||||||
|
|||||||
@ -1,33 +1,33 @@
|
|||||||
<div class="w-full flowbite-init-target" id="secretdetails">
|
<div class="w-full flowbite-init-target dark:text-white" id="secretdetails">
|
||||||
|
|
||||||
<!-- menu -->
|
<!-- menu -->
|
||||||
|
|
||||||
<div class="flex justify-end px-4">
|
<div class="flex justify-end px-4">
|
||||||
<button id="secret-menu-button" data-dropdown-toggle="secret-edit-menu" class="inline-block text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-4 focus:outline-none focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-1.5" type="button">
|
<button id="secret-menu-button" data-dropdown-toggle="secret-edit-menu" class="inline-block text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-4 focus:outline-none focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-1.5" type="button">
|
||||||
<span class="sr-only">Open dropdown</span>
|
<span class="sr-only">Open dropdown</span>
|
||||||
<svg class="w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 3">
|
<svg class="w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 3">
|
||||||
<path d="M2 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm6.041 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM14 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Z"/>
|
<path d="M2 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm6.041 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM14 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Z"/>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
<!-- Dropdown menu -->
|
<!-- Dropdown menu -->
|
||||||
<div id="secret-edit-menu" class="z-10 hidden text-base list-none bg-white divide-y divide-gray-100 rounded-lg shadow-sm w-44 dark:bg-gray-700">
|
<div id="secret-edit-menu" class="z-10 hidden text-base list-none bg-white divide-y divide-gray-100 rounded-lg shadow-sm w-44 dark:bg-gray-700">
|
||||||
<ul class="py-2" aria-labelledby="secret-menu-button">
|
<ul class="py-2" aria-labelledby="secret-menu-button">
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="#"
|
href="#"
|
||||||
class="block px-4 py-2 text-sm text-red-600 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white"
|
class="block px-4 py-2 text-sm text-red-600 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white"
|
||||||
hx-delete="/secrets/{{secret.name}}"
|
hx-delete="/secrets/{{secret.name}}"
|
||||||
hx-target="#secretdetails"
|
hx-target="#secretdetails"
|
||||||
hx-swap="OuterHTML"
|
hx-swap="OuterHTML"
|
||||||
hx-indicator=".secret-spinner"
|
hx-indicator=".secret-spinner"
|
||||||
hx-confirm="Really delete this secret?"
|
hx-confirm="Really delete this secret?"
|
||||||
>
|
>
|
||||||
Delete
|
Delete
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<h3 class="mb-4 text-xl font-semibold dark:text-white">{{secret.name}}</h3>
|
<h3 class="mb-4 text-xl font-semibold dark:text-white">{{secret.name}}</h3>
|
||||||
@ -53,65 +53,65 @@
|
|||||||
</div>
|
</div>
|
||||||
</sl-details>
|
</sl-details>
|
||||||
{% if secret.secret %}
|
{% if secret.secret %}
|
||||||
<sl-details summary="Read/Update Secret">
|
<sl-details summary="Read/Update Secret">
|
||||||
<div id="secretvalue">
|
<div id="secretvalue">
|
||||||
<div class="mb-6">
|
<div class="mb-6">
|
||||||
<label for="secret-value" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Value</label>
|
<label for="secret-value" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Value</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex w-full">
|
|
||||||
<div class="relative w-full">
|
|
||||||
<input type="text" id="disabled-input" aria-label="disabled input" class="mb-6 bg-gray-100 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 cursor-not-allowed dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="••••••••" disabled>
|
|
||||||
</div>
|
|
||||||
<div class="px-2.5 mb-2">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="text-gray-900 hover:text-blue-700 border border-gray-200 hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center me-2 mb-2 dark:border-blue-500 dark:text-blue-500 dark:hover:text-white dark:hover:bg-blue-500 dark:focus:ring-blue-800"
|
|
||||||
hx-get="/secrets/partial/{{ secret.name }}/viewsecret"
|
|
||||||
hx-target="#secretvalue"
|
|
||||||
hx-trigger="click"
|
|
||||||
hx-indicator="#secretupdatespinner"
|
|
||||||
>
|
|
||||||
View
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="htmx-indicator" id="secretupdatespinner">
|
|
||||||
<div role="status">
|
|
||||||
<svg aria-hidden="true" class="inline w-4 h-4 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"/>
|
|
||||||
<path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentFill"/>
|
|
||||||
</svg>
|
|
||||||
<span class="sr-only">Loading...</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</sl-details>
|
|
||||||
{% if groups.groups %}
|
|
||||||
<sl-details summary="Group">
|
|
||||||
<form
|
|
||||||
hx-put="/secrets/set-group/{{ secret.name }}"
|
|
||||||
hx-target="#secretdetails"
|
|
||||||
hx-swap="OuterHTML"
|
|
||||||
hx-indicator=".secret-spinner"
|
|
||||||
>
|
|
||||||
<div class="flex w-full">
|
<div class="flex w-full">
|
||||||
<div class="relative w-full">
|
<div class="relative w-full">
|
||||||
<select id="group_name" name="group_name" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
<input type="text" id="disabled-input" aria-label="disabled input" class="mb-6 bg-gray-100 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 cursor-not-allowed dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="••••••••" disabled>
|
||||||
<option value="__ROOT">Ungrouped</option>
|
|
||||||
{% for group in groups.groups %}
|
|
||||||
<option value="{{ group.group_name }}" {% if group.name == secret.group -%}selected{% endif %}>{{ group.path }}</option>
|
|
||||||
{% endfor %}
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="px-2.5 mb-2">
|
<div class="px-2.5 mb-2">
|
||||||
<button type="Submit" class="text-gray-900 hover:text-blue-700 border border-gray-200 hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center me-2 mb-2 dark:border-blue-500 dark:text-blue-500 dark:hover:text-white dark:hover:bg-blue-500 dark:focus:ring-blue-800">Update</button>
|
<button
|
||||||
|
type="button"
|
||||||
|
class="text-gray-900 hover:text-blue-700 border border-gray-200 hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center me-2 mb-2 dark:border-blue-500 dark:text-blue-500 dark:hover:text-white dark:hover:bg-blue-500 dark:focus:ring-blue-800"
|
||||||
|
hx-get="/secrets/partial/{{ secret.name }}/viewsecret"
|
||||||
|
hx-target="#secretvalue"
|
||||||
|
hx-trigger="click"
|
||||||
|
hx-indicator="#secretupdatespinner"
|
||||||
|
>
|
||||||
|
View
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</div>
|
||||||
|
<div class="htmx-indicator" id="secretupdatespinner">
|
||||||
|
<div role="status">
|
||||||
|
<svg aria-hidden="true" class="inline w-4 h-4 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"/>
|
||||||
|
<path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentFill"/>
|
||||||
|
</svg>
|
||||||
|
<span class="sr-only">Loading...</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</sl-details>
|
</sl-details>
|
||||||
|
{% if groups.groups %}
|
||||||
|
<sl-details summary="Group">
|
||||||
|
<form
|
||||||
|
hx-put="/secrets/set-group/{{ secret.name }}"
|
||||||
|
hx-target="#secretdetails"
|
||||||
|
hx-swap="OuterHTML"
|
||||||
|
hx-indicator=".secret-spinner"
|
||||||
|
>
|
||||||
|
<div class="flex w-full">
|
||||||
|
<div class="relative w-full">
|
||||||
|
<select id="group_name" name="group_name" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
||||||
|
<option value="__ROOT">Ungrouped</option>
|
||||||
|
{% for group in groups.groups %}
|
||||||
|
<option value="{{ group.group_name }}" {% if group.name == secret.group -%}selected{% endif %}>{{ group.path }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="px-2.5 mb-2">
|
||||||
|
<button type="Submit" class="text-gray-900 hover:text-blue-700 border border-gray-200 hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center me-2 mb-2 dark:border-blue-500 dark:text-blue-500 dark:hover:text-white dark:hover:bg-blue-500 dark:focus:ring-blue-800">Update</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</sl-details>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
<sl-details summary="Events" class="dark:text-white">
|
||||||
<sl-details summary="Events">
|
|
||||||
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-600" id="last-audit-events">
|
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-600" id="last-audit-events">
|
||||||
<thead class="bg-gray-50 dark:bg-gray-700">
|
<thead class="bg-gray-50 dark:bg-gray-700">
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@ -19,3 +19,11 @@ sl-details.small-details::part(header) {
|
|||||||
sl-details.small-details::part(base) {
|
sl-details.small-details::part(base) {
|
||||||
font-size: var(--sl-input-font-size-small);
|
font-size: var(--sl-input-font-size-small);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
sl-details::part(base) {
|
||||||
|
background-color: var(--color-gray-700);
|
||||||
|
border: solid 1px var(--color-gray-500);
|
||||||
|
color: var(--color-gray-50);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user