Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

3.4 KB
Raw Blame
// ============================================
// ERRORS — error tracker (Monitoring group tab)
// ============================================
// Only what the DS does not already cover lives here: the error cell's
// type/message stack, the occurrence-count badge, and the detail drawer's
// traceback/context pre blocks. Table, toolbar, stat strip, drawer and pills
// are all shared primitives (.sk-dtable, .sk-listhead, .stat-strip, .sk-pill).

.errors-page {

    .sk-err__cell {
        min-width: 0;
        max-width: 520px;
    }

    .sk-err__type {
        font-family: var(--mono);
        font-size: $text-xs;
        font-weight: $font-weight-semibold;
    }

    .sk-err__message {
        margin-top: $space-hair;
        font-size: $text-sm;
        color: var(--text-dim);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sk-err__endpoint {
        font-family: var(--mono);
        font-size: $text-xs;
        color: var(--text-dim);
        white-space: nowrap;
        max-width: 260px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sk-err__when {
        font-size: $text-xs;
        color: var(--text-faint);
        white-space: nowrap;
    }

    // Occurrence badge — only rendered when the same fingerprint hit >1 time.
    .sk-err__count {
        display: inline-block;
        padding: 1px $space-2;
        border-radius: $radius-full;
        border: 1px solid var(--border);
        background: var(--surface-2);
        font-size: $text-xs;
        color: var(--amber);
    }

    .sk-err__muted { color: var(--text-ghost); }

    // A resolved error is handled business; dim the whole row like the event
    // log dims debug rows, so the unresolved work stands out.
    .sk-dtable .is-resolved { opacity: 0.6; }
}

// Error detail drawer body
.err-detail {
    display: flex;
    flex-direction: column;
    gap: $space-4;

    &__rows {
        margin: 0;
        display: flex;
        flex-direction: column;

        > div {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: $space-4;
            padding: $space-2 0;
            border-bottom: 1px solid var(--border-soft);

            &:last-child { border-bottom: none; }
        }

        dt { font-size: $text-sm; color: var(--text-faint); }

        dd {
            margin: 0;
            font-size: $text-sm;
            color: var(--text-dim);
            text-align: right;
            word-break: break-word;
        }

        code {
            font-family: var(--mono);
            font-size: $text-xs;
        }
    }

    &__heading {
        margin: 0;
        font-size: $text-xs;
        color: var(--text-faint);
    }

    // Traceback / context mono blocks — same treatment as the event drawer's
    // payload block; the traceback gets more room because stacks are tall.
    &__traceback,
    &__context {
        margin: 0;
        overflow: auto;
        padding: $space-3;
        border-radius: $radius-card;
        border: 1px solid var(--border-soft);
        background: var(--surface-2);
        font-family: var(--mono);
        font-size: $text-xs;
        line-height: 1.55;
        color: var(--text-dim);
        white-space: pre;
    }

    &__traceback { max-height: 400px; }
    &__context { max-height: 240px; }

    &__actions {
        display: flex;
        justify-content: flex-end;
        gap: $space-2;
    }
}