Skip to content

Commit 9b426a4

Browse files
committed
feat(model-server): allow repository deletion via web ui
1 parent 54d5df1 commit 9b426a4

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

model-server/src/main/kotlin/org/modelix/model/server/handlers/RepositoryOverview.kt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ import io.ktor.server.routing.routing
99
import kotlinx.html.FlowContent
1010
import kotlinx.html.FlowOrInteractiveOrPhrasingContent
1111
import kotlinx.html.a
12+
import kotlinx.html.form
1213
import kotlinx.html.h1
1314
import kotlinx.html.i
1415
import kotlinx.html.p
16+
import kotlinx.html.postButton
1517
import kotlinx.html.span
1618
import kotlinx.html.table
1719
import kotlinx.html.tbody
@@ -48,7 +50,7 @@ class RepositoryOverview(private val repoManager: RepositoriesManager) {
4850
th { +"Repository" }
4951
th { +"Branch" }
5052
th {
51-
colSpan = "2"
53+
colSpan = "3"
5254
+"Actions"
5355
}
5456
}
@@ -67,6 +69,7 @@ class RepositoryOverview(private val repoManager: RepositoriesManager) {
6769
td { }
6870
td { }
6971
td { }
72+
td { }
7073
}
7174
} else {
7275
for (branch in branches) {
@@ -86,6 +89,15 @@ class RepositoryOverview(private val repoManager: RepositoriesManager) {
8689
+"Explore Latest Version"
8790
}
8891
}
92+
td {
93+
form {
94+
postButton {
95+
name = "delete"
96+
formAction = "../v2/repositories/${branch.repositoryId.id}/delete"
97+
+"Delete Repository"
98+
}
99+
}
100+
}
89101
}
90102
}
91103
}

0 commit comments

Comments
 (0)