Skip to content

Commit 0346c42

Browse files
committed
feat(model-server): add link to compare with previous version in HistoryHandler
1 parent d2b3e7c commit 0346c42

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ class HistoryHandler(val client: IModelClient, private val repositoriesManager:
250250
th { +"Time" }
251251
th { +"Operations" }
252252
th {
253-
colSpan = "2"
253+
colSpan = "3"
254254
+"Actions"
255255
}
256256
}
@@ -313,6 +313,17 @@ class HistoryHandler(val client: IModelClient, private val repositoriesManager:
313313
}
314314
}
315315
}
316+
317+
td {
318+
style = "white-space: nowrap;"
319+
val previousVersion = version.baseVersion
320+
if (previousVersion != null) {
321+
a("/../../../diff/view?repository=$repositoryId&oldVersionHash=${previousVersion.getContentHash()}&newVersionHash=${version.getContentHash()}") {
322+
+"Compare with Previous"
323+
}
324+
}
325+
}
326+
316327
td {
317328
style = "white-space: nowrap;"
318329
a("/../../../content/repositories/$repositoryId/versions/${version.getContentHash()}/") {

0 commit comments

Comments
 (0)