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:
370
web/css/pages/credentials.css
Normal file
370
web/css/pages/credentials.css
Normal file
@@ -0,0 +1,370 @@
|
||||
/* ===== CREDENTIALS ===== */
|
||||
.credentials-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
scroll-padding-top: 56px;
|
||||
}
|
||||
|
||||
.credentials-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);
|
||||
}
|
||||
|
||||
.credentials-container .stat-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 12px;
|
||||
border: 1px solid var(--_border);
|
||||
border-radius: 10px;
|
||||
background: color-mix(in oklab, var(--_panel) 70%, transparent);
|
||||
}
|
||||
|
||||
.credentials-container .stat-icon {
|
||||
font-size: 1.1rem;
|
||||
opacity: .9;
|
||||
}
|
||||
|
||||
.credentials-container .stat-value {
|
||||
font-weight: 800;
|
||||
background: linear-gradient(135deg, var(--_acid), var(--_acid2));
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
|
||||
.credentials-container .stat-label {
|
||||
color: var(--_muted);
|
||||
font-size: .8rem;
|
||||
}
|
||||
|
||||
.credentials-container .global-search-container {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.credentials-container .global-search-input {
|
||||
width: 100%;
|
||||
padding: 10px 14px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid var(--_border);
|
||||
background: color-mix(in oklab, var(--_panel) 90%, transparent);
|
||||
color: var(--_ink);
|
||||
}
|
||||
|
||||
.credentials-container .global-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);
|
||||
}
|
||||
|
||||
.credentials-container .clear-global-button {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
background: none;
|
||||
border: 1px solid var(--_border);
|
||||
color: #ef4444;
|
||||
border-radius: 8px;
|
||||
padding: 2px 6px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.credentials-container .clear-global-button.show {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.credentials-container .tabs-container {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 20;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 12px;
|
||||
min-height: 44px;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
background: color-mix(in oklab, var(--_panel) 92%, transparent);
|
||||
border: 1px solid var(--_border);
|
||||
border-radius: 12px;
|
||||
box-shadow: var(--_shadow);
|
||||
}
|
||||
|
||||
.credentials-container .tabs-container::-webkit-scrollbar {
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.credentials-container .tab {
|
||||
padding: 10px 18px;
|
||||
border-radius: 10px;
|
||||
cursor: pointer;
|
||||
color: var(--_muted);
|
||||
font-weight: 700;
|
||||
font-size: .9rem;
|
||||
border: 1px solid transparent;
|
||||
white-space: nowrap;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.credentials-container .tab:hover {
|
||||
background: rgba(255, 255, 255, .05);
|
||||
color: var(--_ink);
|
||||
border-color: var(--_border);
|
||||
}
|
||||
|
||||
.credentials-container .tab.active {
|
||||
color: var(--_ink);
|
||||
background: linear-gradient(135deg, color-mix(in oklab, var(--_acid2) 18%, transparent), color-mix(in oklab, var(--_acid) 14%, transparent));
|
||||
border-color: color-mix(in oklab, var(--_acid2) 28%, var(--_border));
|
||||
}
|
||||
|
||||
.credentials-container .tab-badge {
|
||||
margin-left: 8px;
|
||||
padding: 2px 6px;
|
||||
border-radius: 999px;
|
||||
background: rgba(255, 255, 255, .1);
|
||||
border: 1px solid var(--_border);
|
||||
font-size: .75rem;
|
||||
}
|
||||
|
||||
.credentials-container .services-grid {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.credentials-container .service-card {
|
||||
background: color-mix(in oklab, var(--_panel) 88%, transparent);
|
||||
border: 1px solid var(--_border);
|
||||
border-radius: 16px;
|
||||
overflow: hidden;
|
||||
box-shadow: var(--_shadow);
|
||||
}
|
||||
|
||||
.credentials-container .service-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 12px;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
border-bottom: 1px solid color-mix(in oklab, var(--_border) 65%, transparent);
|
||||
}
|
||||
|
||||
.credentials-container .service-header:hover {
|
||||
background: rgba(255, 255, 255, .04);
|
||||
}
|
||||
|
||||
.credentials-container .service-title {
|
||||
flex: 1;
|
||||
font-weight: 800;
|
||||
letter-spacing: .2px;
|
||||
font-size: .95rem;
|
||||
text-transform: uppercase;
|
||||
background: linear-gradient(135deg, var(--_acid), var(--_acid2));
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.credentials-container .service-count {
|
||||
font-weight: 800;
|
||||
font-size: .8rem;
|
||||
padding: 4px 8px;
|
||||
border-radius: 10px;
|
||||
background: rgba(255, 255, 255, .08);
|
||||
color: var(--_ink);
|
||||
border: 1px solid var(--_border);
|
||||
}
|
||||
|
||||
.credentials-container .service-card[data-credentials]:not([data-credentials="0"]) .service-count {
|
||||
background: linear-gradient(135deg, #2e2e2e, #4CAF50);
|
||||
box-shadow: inset 0 0 0 1px rgba(76, 175, 80, .35);
|
||||
}
|
||||
|
||||
.credentials-container .search-container {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.credentials-container .search-input {
|
||||
padding: 6px 24px 6px 8px;
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
background: rgba(255, 255, 255, .06);
|
||||
color: var(--_ink);
|
||||
font-size: .82rem;
|
||||
}
|
||||
|
||||
.credentials-container .search-input:focus {
|
||||
outline: none;
|
||||
background: rgba(255, 255, 255, .1);
|
||||
}
|
||||
|
||||
.credentials-container .clear-button {
|
||||
position: absolute;
|
||||
right: 4px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
border: none;
|
||||
background: none;
|
||||
color: #ef4444;
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.credentials-container .clear-button.show {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.credentials-container .download-button {
|
||||
border: 1px solid var(--_border);
|
||||
background: rgba(255, 255, 255, .04);
|
||||
color: var(--_muted);
|
||||
border-radius: 8px;
|
||||
padding: 4px 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.credentials-container .download-button:hover {
|
||||
color: #e99f00;
|
||||
filter: brightness(1.06);
|
||||
}
|
||||
|
||||
.credentials-container .collapse-indicator {
|
||||
color: var(--_muted);
|
||||
}
|
||||
|
||||
.credentials-container .service-card.collapsed .service-content {
|
||||
max-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.credentials-container .service-content {
|
||||
padding: 8px 12px;
|
||||
}
|
||||
|
||||
.credentials-container .credential-item {
|
||||
border: 1px solid var(--_border);
|
||||
border-radius: 10px;
|
||||
margin-bottom: 6px;
|
||||
padding: 8px;
|
||||
background: rgba(255, 255, 255, .02);
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.credentials-container .credential-field {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.credentials-container .field-label {
|
||||
font-size: .78rem;
|
||||
color: var(--_muted);
|
||||
}
|
||||
|
||||
.credentials-container .field-value {
|
||||
flex: 1;
|
||||
padding: 2px 6px;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
.credentials-container .field-value:hover {
|
||||
background: rgba(255, 255, 255, .06);
|
||||
border-color: var(--_border);
|
||||
}
|
||||
|
||||
.credentials-container .bubble-blue {
|
||||
background: linear-gradient(135deg, #1d2a32, #00c4d6);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.credentials-container .bubble-green {
|
||||
background: linear-gradient(135deg, #1e2a24, #00b894);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.credentials-container .bubble-orange {
|
||||
background: linear-gradient(135deg, #3b2f1a, #e7951a);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.credentials-container .copied-feedback {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
bottom: 20px;
|
||||
transform: translateX(-50%);
|
||||
padding: 8px 12px;
|
||||
background: #4CAF50;
|
||||
color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: var(--_shadow);
|
||||
opacity: 0;
|
||||
transition: opacity .25s;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.credentials-container .copied-feedback.show {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* ── Mobile responsive ── */
|
||||
@media (max-width: 768px) {
|
||||
.credentials-container .stats-bar {
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.credentials-container .tabs-container {
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.credentials-container .tab {
|
||||
font-size: .75rem;
|
||||
padding: .35rem .6rem;
|
||||
}
|
||||
|
||||
.credentials-container .services-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.credentials-container .service-header {
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.credentials-container .search-container {
|
||||
width: 100%;
|
||||
order: 10;
|
||||
}
|
||||
|
||||
.credentials-container .credential-field {
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.credentials-container .field-value {
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user