@page "/Rooms/{RoomId}/Policies2" @using LibMatrix @using ArcaneLibs.Extensions @using LibMatrix.EventTypes.Spec.State.Policy @using System.Diagnostics @using LibMatrix.RoomTypes @using System.Collections.Frozen @using System.Reflection @using ArcaneLibs.Attributes @using LibMatrix.EventTypes @using LibMatrix.EventTypes.Spec.State.RoomInfo @using MatrixUtils.Web.Shared.PolicyEditorComponents
Loading...
} else if (PolicyEventsByType is not { Count: > 0 }) {No policies yet
} else { var renderSw = Stopwatch.StartNew(); var renderTotalSw = Stopwatch.StartNew(); @foreach (var (type, value) in PolicyEventsByType) {@(GetValidPolicyEventsByType(type).Count) active, @(GetInvalidPolicyEventsByType(type).Count) invalid (@value.Count total) @(GetPolicyTypeName(type).ToLower())
} Console.WriteLine($"Rendered hearder in {renderSw.GetElapsedAndRestart()}"); @foreach (var type in KnownPolicyTypes.OrderByDescending(t => GetPolicyEventsByType(t).Count)) {meow
} } else {No permission to modify
}State key | Json contents |
---|---|
@policy.StateKey |
@policy.RawContent.ToJson(true, false) |