1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

[PS-293] Update admin portal to use the new version.json (#2006)

* PS-293: Get latest version no comes from GitHub instead of DockerHub.

* PS-293: format fixes

* PS-293: code refactor and clean up

* PS-293: deserialization to class, argument typification.

* PS-293: formating fix

* PS-293: Moved ProjectType to HomeController

* PS-293: updated version endpoint to CDN

* PS-293: Update endpoint to CF protected
This commit is contained in:
André Filipe da Silva Bispo
2022-06-20 12:53:09 +01:00
committed by GitHub
parent ee5946c4b9
commit 904193560c
2 changed files with 38 additions and 16 deletions

View File

@ -1,4 +1,5 @@
@model HomeModel
@using Bit.Admin.Controllers
@model HomeModel
@{
ViewData["Title"] = "Dashboard";
}
@ -9,7 +10,7 @@
let loadedWebLatest = false;
let loadedWebInstalled = false;
fetch('@Url.Action("GetLatestDockerHubVersion", new { repository = "web" })').then((response) => {
fetch('@Url.Action("GetLatestVersion", new { project = @ProjectType.Web })').then((response) => {
return response.json();
}).then((version) => {
document.getElementById('web-latest').innerText = version;
@ -19,7 +20,7 @@
}
});
fetch('@Url.Action("GetLatestDockerHubVersion", new { repository = "api" })').then((response) => {
fetch('@Url.Action("GetLatestVersion", new { project = @ProjectType.Core })').then((response) => {
return response.json();
}).then((version) => {
document.getElementById('server-latest').innerText = version;