mirror of
https://github.com/infinition/Bjorn.git
synced 2026-03-16 09:02:00 +00:00
Add Loki and Sentinel utility classes for web API endpoints
- Implemented LokiUtils class with GET and POST endpoints for managing scripts, jobs, and payloads. - Added SentinelUtils class with GET and POST endpoints for managing events, rules, devices, and notifications. - Both classes include error handling and JSON response formatting.
This commit is contained in:
633
web/css/pages/loot.css
Normal file
633
web/css/pages/loot.css
Normal file
@@ -0,0 +1,633 @@
|
||||
/* ==========================================================================
|
||||
LOOT
|
||||
========================================================================== */
|
||||
.loot-container {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
padding: 16px;
|
||||
margin-top: 5px;
|
||||
min-height: calc(100vh - var(--h-topbar, 56px) - var(--h-bottombar, 56px) - 24px);
|
||||
max-height: calc(100vh - var(--h-topbar, 56px) - var(--h-bottombar, 56px) - 24px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
animation: loot-fadeInUp .6s ease-out;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@keyframes loot-fadeInUp {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(30px);
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.loot-container .stats-bar {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
flex-wrap: wrap;
|
||||
padding: 12px;
|
||||
background: color-mix(in oklab, var(--_panel) 88%, transparent);
|
||||
border: 1px solid var(--_border);
|
||||
border-radius: 12px;
|
||||
box-shadow: var(--_shadow);
|
||||
backdrop-filter: blur(16px);
|
||||
}
|
||||
|
||||
.loot-container .stat-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 16px;
|
||||
background: color-mix(in oklab, var(--_panel) 65%, transparent);
|
||||
border: 1px solid var(--_border);
|
||||
border-radius: 10px;
|
||||
transition: .2s;
|
||||
}
|
||||
|
||||
.loot-container .stat-item:hover {
|
||||
background: color-mix(in oklab, var(--_panel) 78%, transparent);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.loot-container .stat-icon {
|
||||
font-size: 1.2rem;
|
||||
opacity: .95;
|
||||
}
|
||||
|
||||
.loot-container .stat-value {
|
||||
font-size: 1.05rem;
|
||||
font-weight: 800;
|
||||
background: linear-gradient(135deg, var(--_acid), var(--_acid2));
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
|
||||
.loot-container .stat-label {
|
||||
color: var(--_muted);
|
||||
font-size: .75rem;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.loot-container .controls-bar {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.loot-container .search-container {
|
||||
min-width: 200px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.loot-container .search-input {
|
||||
width: 100%;
|
||||
padding: 12px 16px 12px 44px;
|
||||
background: color-mix(in oklab, var(--_panel) 90%, transparent);
|
||||
border: 1px solid var(--_border);
|
||||
border-radius: 12px;
|
||||
color: var(--_ink);
|
||||
font-size: .95rem;
|
||||
backdrop-filter: blur(10px);
|
||||
transition: .2s;
|
||||
}
|
||||
|
||||
.loot-container .search-input:focus {
|
||||
outline: none;
|
||||
border-color: color-mix(in oklab, var(--_acid2) 40%, var(--_border));
|
||||
box-shadow: 0 0 0 3px color-mix(in oklab, var(--_acid2) 18%, transparent);
|
||||
background: color-mix(in oklab, var(--_panel) 96%, transparent);
|
||||
}
|
||||
|
||||
.loot-container .search-icon {
|
||||
position: absolute;
|
||||
left: 16px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: var(--_muted);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.loot-container .clear-search {
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: var(--_muted);
|
||||
cursor: pointer;
|
||||
font-size: 1rem;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.loot-container .search-input:not(:placeholder-shown)~.clear-search {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.loot-container .view-controls {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.loot-container .view-btn,
|
||||
.loot-container .sort-btn {
|
||||
padding: 10px;
|
||||
background: color-mix(in oklab, var(--_panel) 90%, transparent);
|
||||
border: 1px solid var(--_border);
|
||||
border-radius: 10px;
|
||||
color: var(--_muted);
|
||||
cursor: pointer;
|
||||
transition: .2s;
|
||||
backdrop-filter: blur(10px);
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.loot-container .view-btn:hover,
|
||||
.loot-container .sort-btn:hover {
|
||||
background: color-mix(in oklab, var(--_panel) 96%, transparent);
|
||||
color: var(--_ink);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.loot-container .view-btn.active {
|
||||
background: linear-gradient(135deg, color-mix(in oklab, var(--_acid) 20%, transparent), color-mix(in oklab, var(--_acid2) 12%, transparent));
|
||||
color: var(--_ink);
|
||||
border-color: color-mix(in oklab, var(--_acid2) 35%, var(--_border));
|
||||
}
|
||||
|
||||
.loot-container .sort-dropdown {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.loot-container .sort-menu {
|
||||
position: absolute;
|
||||
top: calc(100% + 8px);
|
||||
right: 0;
|
||||
background: color-mix(in oklab, var(--_panel) 98%, transparent);
|
||||
border: 1px solid var(--_border);
|
||||
border-radius: 12px;
|
||||
padding: 8px;
|
||||
min-width: 150px;
|
||||
backdrop-filter: blur(20px);
|
||||
box-shadow: var(--_shadow);
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transform: translateY(-10px);
|
||||
transition: .2s;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.loot-container .sort-dropdown.active .sort-menu {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.loot-container .sort-option {
|
||||
padding: 10px 12px;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
transition: .2s;
|
||||
font-size: .9rem;
|
||||
color: var(--_ink);
|
||||
}
|
||||
|
||||
.loot-container .sort-option:hover {
|
||||
background: rgba(255, 255, 255, .05);
|
||||
}
|
||||
|
||||
.loot-container .sort-option.active {
|
||||
color: var(--_ink);
|
||||
background: color-mix(in oklab, var(--_acid2) 14%, transparent);
|
||||
}
|
||||
|
||||
.loot-container .tabs-container {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
padding: 4px;
|
||||
background: color-mix(in oklab, var(--_panel) 88%, transparent);
|
||||
border-radius: 12px;
|
||||
border: 1px solid var(--_border);
|
||||
backdrop-filter: blur(10px);
|
||||
overflow-x: auto;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
.loot-container .tabs-container::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.loot-container .tab {
|
||||
padding: 10px 20px;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
transition: .2s;
|
||||
white-space: nowrap;
|
||||
font-size: .9rem;
|
||||
font-weight: 700;
|
||||
position: relative;
|
||||
color: var(--_muted);
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
.loot-container .tab:hover {
|
||||
background: rgba(255, 255, 255, .05);
|
||||
color: var(--_ink);
|
||||
}
|
||||
|
||||
.loot-container .tab.active {
|
||||
background: linear-gradient(135deg, color-mix(in oklab, var(--_acid) 16%, transparent), color-mix(in oklab, var(--_acid2) 10%, transparent));
|
||||
color: var(--_ink);
|
||||
border-color: color-mix(in oklab, var(--_acid2) 28%, var(--_border));
|
||||
}
|
||||
|
||||
.loot-container .tab.active::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 10%;
|
||||
right: 10%;
|
||||
height: 2px;
|
||||
background: linear-gradient(90deg, var(--_acid), var(--_acid2));
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.loot-container .tab-badge {
|
||||
display: inline-block;
|
||||
padding: 2px 6px;
|
||||
margin-left: 6px;
|
||||
background: rgba(255, 255, 255, .08);
|
||||
border: 1px solid var(--_border);
|
||||
border-radius: 10px;
|
||||
font-size: .75rem;
|
||||
font-weight: 700;
|
||||
color: var(--_ink);
|
||||
}
|
||||
|
||||
.loot-container .explorer {
|
||||
background: color-mix(in oklab, var(--_panel) 88%, transparent);
|
||||
border-radius: 20px;
|
||||
border: 1px solid var(--_border);
|
||||
backdrop-filter: blur(20px);
|
||||
box-shadow: var(--_shadow);
|
||||
overflow: hidden;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
animation: loot-slideIn .6s ease-out;
|
||||
}
|
||||
|
||||
@keyframes loot-slideIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateX(-16px);
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
|
||||
.loot-container .explorer-content {
|
||||
padding: 20px;
|
||||
overflow-y: auto;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.loot-container .tree-view {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.loot-container .tree-view.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.loot-container .list-view {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.loot-container .list-view.active {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.loot-container .loot-tree-node {
|
||||
margin-bottom: 4px;
|
||||
animation: loot-itemSlide .3s ease-out backwards;
|
||||
margin-left: calc(var(--loot-level, 0) * 8px);
|
||||
}
|
||||
|
||||
@keyframes loot-itemSlide {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateX(-10px);
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
|
||||
.loot-container .loot-tree-row {
|
||||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: 18px 30px minmax(0, 1fr) auto;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 10px 12px;
|
||||
cursor: pointer;
|
||||
border-radius: 10px;
|
||||
transition: .2s;
|
||||
border: 1px solid transparent;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: var(--_ink);
|
||||
background: color-mix(in oklab, var(--_panel) 86%, transparent);
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.loot-container .loot-tree-row::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .05), transparent);
|
||||
transform: translateX(-100%);
|
||||
transition: transform .6s;
|
||||
}
|
||||
|
||||
.loot-container .loot-tree-row:hover::before {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
|
||||
.loot-container .loot-tree-row:hover {
|
||||
border-color: color-mix(in oklab, var(--_acid2) 26%, var(--_border));
|
||||
background: color-mix(in oklab, var(--_panel) 94%, transparent);
|
||||
}
|
||||
|
||||
.loot-container .loot-tree-icon {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 8px;
|
||||
font-size: 1.1rem;
|
||||
flex-shrink: 0;
|
||||
background: color-mix(in oklab, var(--_acid) 12%, transparent);
|
||||
color: var(--_ink);
|
||||
}
|
||||
|
||||
.loot-container .folder-icon {
|
||||
background: color-mix(in oklab, var(--_acid) 10%, transparent);
|
||||
color: var(--_ink);
|
||||
}
|
||||
|
||||
.loot-container .loot-tree-name {
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.loot-container .loot-tree-chevron {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--_muted);
|
||||
transition: transform .3s cubic-bezier(.4, 0, .2, 1);
|
||||
font-size: .75rem;
|
||||
}
|
||||
|
||||
.loot-container .loot-tree-meta {
|
||||
justify-self: end;
|
||||
padding: 2px 8px;
|
||||
border-radius: 999px;
|
||||
border: 1px solid var(--_border);
|
||||
font-size: .72rem;
|
||||
color: var(--_muted);
|
||||
background: color-mix(in oklab, var(--_panel) 76%, transparent);
|
||||
}
|
||||
|
||||
.loot-container .loot-tree-node.expanded .loot-tree-chevron {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.loot-container .loot-tree-children {
|
||||
display: none;
|
||||
overflow: hidden;
|
||||
margin-left: 10px;
|
||||
padding-left: 14px;
|
||||
border-left: 1px dashed color-mix(in oklab, var(--_border) 82%, transparent);
|
||||
}
|
||||
|
||||
.loot-container .loot-tree-node.expanded .loot-tree-children {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.loot-container .file-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10px 12px;
|
||||
border-radius: 10px;
|
||||
cursor: pointer;
|
||||
transition: .2s;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.loot-container .file-item:hover {
|
||||
background: rgba(255, 255, 255, .04);
|
||||
transform: translateX(4px);
|
||||
}
|
||||
|
||||
.loot-container .file-item:active {
|
||||
transform: translateX(2px) scale(.98);
|
||||
}
|
||||
|
||||
.loot-container .file-item.is-tree-file {
|
||||
margin-left: calc(var(--loot-level, 0) * 8px);
|
||||
margin-top: 2px;
|
||||
margin-bottom: 2px;
|
||||
padding: 8px 10px;
|
||||
border: 1px solid transparent;
|
||||
background: color-mix(in oklab, var(--_panel) 82%, transparent);
|
||||
}
|
||||
|
||||
.loot-container .file-item.is-tree-file:hover {
|
||||
transform: none;
|
||||
border-color: color-mix(in oklab, var(--_acid2) 22%, var(--_border));
|
||||
}
|
||||
|
||||
.loot-container .file-icon {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 6px;
|
||||
margin-right: 12px;
|
||||
font-size: .9rem;
|
||||
flex-shrink: 0;
|
||||
color: var(--_ink);
|
||||
background: color-mix(in oklab, var(--_panel) 75%, transparent);
|
||||
}
|
||||
|
||||
.loot-container .file-icon.ssh {
|
||||
background: color-mix(in oklab, var(--_acid) 12%, transparent);
|
||||
}
|
||||
|
||||
.loot-container .file-icon.sql {
|
||||
background: color-mix(in oklab, var(--_acid2) 12%, transparent);
|
||||
}
|
||||
|
||||
.loot-container .file-icon.smb {
|
||||
background: color-mix(in oklab, var(--_acid2) 16%, transparent);
|
||||
}
|
||||
|
||||
.loot-container .file-icon.other {
|
||||
background: color-mix(in oklab, var(--_panel) 75%, transparent);
|
||||
}
|
||||
|
||||
.loot-container .file-name {
|
||||
flex: 1;
|
||||
font-size: .9rem;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
color: var(--_ink);
|
||||
}
|
||||
|
||||
.loot-container .file-type {
|
||||
padding: 3px 8px;
|
||||
border-radius: 6px;
|
||||
font-size: .7rem;
|
||||
font-weight: 800;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: .05em;
|
||||
margin-left: 8px;
|
||||
border: 1px solid var(--_border);
|
||||
color: var(--_ink);
|
||||
background: color-mix(in oklab, var(--_panel) 80%, transparent);
|
||||
}
|
||||
|
||||
.loot-container .file-type.ssh {
|
||||
background: color-mix(in oklab, var(--_acid) 12%, transparent);
|
||||
}
|
||||
|
||||
.loot-container .file-type.sql {
|
||||
background: color-mix(in oklab, var(--_acid2) 12%, transparent);
|
||||
}
|
||||
|
||||
.loot-container .file-type.smb {
|
||||
background: color-mix(in oklab, var(--_acid2) 16%, transparent);
|
||||
}
|
||||
|
||||
.loot-container .no-results {
|
||||
text-align: center;
|
||||
color: var(--_muted);
|
||||
padding: 40px;
|
||||
font-size: .95rem;
|
||||
}
|
||||
|
||||
.loot-container .no-results-icon {
|
||||
font-size: 3rem;
|
||||
margin-bottom: 16px;
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
.loot-container .loading {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.loot-container .loading-spinner {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border: 3px solid var(--_border);
|
||||
border-top-color: var(--_acid2);
|
||||
border-radius: 50%;
|
||||
animation: loot-spin 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes loot-spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:768px) {
|
||||
.loot-container {
|
||||
padding: 12px;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.loot-container .controls-bar {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.loot-container .search-container {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.loot-container .view-controls {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.loot-container .tabs-container {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.loot-container .tab {
|
||||
padding: 8px 14px;
|
||||
font-size: .85rem;
|
||||
}
|
||||
|
||||
.loot-container .explorer-content {
|
||||
padding: 12px;
|
||||
max-height: calc(100vh - 320px);
|
||||
}
|
||||
|
||||
.loot-container .loot-tree-row {
|
||||
grid-template-columns: 16px 26px minmax(0, 1fr);
|
||||
gap: 8px;
|
||||
padding: 9px 10px;
|
||||
}
|
||||
|
||||
.loot-container .loot-tree-meta {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.loot-container .loot-tree-children {
|
||||
margin-left: 8px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.loot-container .stat-item {
|
||||
padding: 6px 10px;
|
||||
}
|
||||
|
||||
.loot-container .stat-value {
|
||||
font-size: .95rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (hover:none) {
|
||||
.loot-container .loot-tree-row:active {
|
||||
background: rgba(255, 255, 255, .06);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user