Browse Source

Add sorting and filtering to the caches table

Signed-off-by: Graham <gpe@openrs2.org>
master
Graham 2 months ago
parent
commit
f0cd4afcf0
  1. 1
      archive/build.gradle.kts
  2. 10
      archive/src/main/resources/org/openrs2/archive/templates/caches/index.html
  3. 6
      archive/src/main/resources/org/openrs2/archive/templates/layout.html
  4. 1
      gradle/libs.versions.toml

1
archive/build.gradle.kts

@ -25,6 +25,7 @@ dependencies {
implementation(projects.util)
implementation(projects.yaml)
implementation(libs.bootstrap)
implementation(libs.bootstrapTable)
implementation(libs.bundles.ktor)
implementation(libs.bundles.thymeleaf)
implementation(libs.byteUnits)

10
archive/src/main/resources/org/openrs2/archive/templates/caches/index.html

@ -12,13 +12,13 @@
<main class="container">
<h1>Caches</h1>
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover">
<table class="table table-striped table-bordered table-hover" data-toggle="table" data-filter-control="true" data-sticky-header="true">
<thead class="table-dark">
<tr>
<th>Game</th>
<th>Build(s)</th>
<th>Timestamp</th>
<th>Source(s)</th>
<th data-field="game" data-filter-control="select">Game</th>
<th data-field="builds" data-filter-control="input" data-sortable="true">Build(s)</th>
<th data-field="timestamp" data-sortable="true">Timestamp</th>
<th data-field="sources" data-filter-control="input">Source(s)</th>
<th>Indexes</th>
<th>Groups</th>
<th>Keys<sup><a href="#empty-locs">1</a></sup></th>

6
archive/src/main/resources/org/openrs2/archive/templates/layout.html

@ -4,9 +4,15 @@
<!--/*@thymesVar id="title" type="java.lang.String"*/-->
<title th:text="${title}? ${title} + ' - OpenRS2 Archive' : 'OpenRS2 Archive'">OpenRS2 Archive</title>
<link rel="stylesheet" href="/webjars/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" href="/webjars/bootstrap-table/dist/bootstrap-table.min.css" />
<link rel="stylesheet" href="/webjars/bootstrap-table/dist/extensions/filter-control/bootstrap-table-filter-control.min.css" />
<link rel="stylesheet" href="/webjars/bootstrap-table/dist/extensions/sticky-header/bootstrap-table-sticky-header.min.css" />
<link rel="stylesheet" href="/static/css/openrs2.css" />
<script src="/webjars/jquery/jquery.min.js" defer></script>
<script src="/webjars/bootstrap/js/bootstrap.bundle.min.js" defer></script>
<script src="/webjars/bootstrap-table/dist/bootstrap-table.min.js" defer></script>
<script src="/webjars/bootstrap-table/dist/extensions/filter-control/bootstrap-table-filter-control.min.js" defer></script>
<script src="/webjars/bootstrap-table/dist/extensions/sticky-header/bootstrap-table-sticky-header.min.js" defer></script>
</head>
<body>
<nav class="navbar navbar-dark navbar-expand bg-dark mb-4" th:fragment="nav">

1
gradle/libs.versions.toml

@ -18,6 +18,7 @@ asm-core = { module = "org.ow2.asm:asm", version.ref = "asm" }
asm-tree = { module = "org.ow2.asm:asm-tree", version.ref = "asm" }
asm-util = { module = "org.ow2.asm:asm-util", version.ref = "asm" }
bootstrap = { module = "org.webjars:bootstrap", version = "5.1.0" }
bootstrapTable = { module="org.webjars.npm:bootstrap-table", version="1.18.3" }
bouncyCastle-pkix = { module = "org.bouncycastle:bcpkix-jdk15on", version = "1.69" }
bouncyCastle-provider = { module = "org.bouncycastle:bcprov-jdk15on", version = "1.69" }
byteUnits = { module = "com.jakewharton.byteunits:byteunits", version = "0.9.1" }

Loading…
Cancel
Save