diff --git a/CMakeLists.txt b/CMakeLists.txt index 192cf70..16f4d23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) set(META_PROJECT_NAME repomgr) set(META_PROJECT_TYPE application) set(META_APP_AUTHOR "Martchus") -set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}") +set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/arch-repo-manager") set(META_APP_DESCRIPTION "Repository manager and package builder for Arch Linux") set(META_APP_CATEGORIES "System;Utility;Network;FileTransfer") set(META_VERSION_MAJOR 0) diff --git a/librepomgr/serversetup.cpp b/librepomgr/serversetup.cpp index 80e0b22..53aca3b 100644 --- a/librepomgr/serversetup.cpp +++ b/librepomgr/serversetup.cpp @@ -873,6 +873,7 @@ std::string ServiceSetup::Locks::forDatabase(const LibPkg::Database &db) ServiceStatus::ServiceStatus(ServiceSetup &setup) : version(applicationInfo.version) + , url(applicationInfo.url) , config(setup.config.computeStatus()) , actions(setup.building.metaInfo) , presets(setup.building.presets) diff --git a/librepomgr/serversetup.h b/librepomgr/serversetup.h index 571d5f5..e344816 100644 --- a/librepomgr/serversetup.h +++ b/librepomgr/serversetup.h @@ -216,9 +216,10 @@ inline std::pair { - ServiceStatus(ServiceSetup &setup); + explicit ServiceStatus(ServiceSetup &setup); const char *const version = nullptr; + const char *const url = nullptr; const LibPkg::Status config; const BuildActionMetaInfo &actions; const BuildPresets &presets; diff --git a/srv/static/index.html b/srv/static/index.html index fe895a8..0f29656 100644 --- a/srv/static/index.html +++ b/srv/static/index.html @@ -256,6 +256,7 @@

Repository Manager for Arch Linux

Logo

unknown version

+

Source code repository

Icons from Material Design Icons

diff --git a/srv/static/js/globalstatuspage.js b/srv/static/js/globalstatuspage.js index e461b77..60267e3 100644 --- a/srv/static/js/globalstatuspage.js +++ b/srv/static/js/globalstatuspage.js @@ -29,6 +29,10 @@ function handleGlobalStatusUpdate(ajaxRequest) if (applicationVersion) { Utils.getAndEmptyElement('application-version').appendChild(document.createTextNode(applicationVersion)); } + const applicationURL = responseJson.url; + if (applicationURL) { + document.getElementById('source-code-repo-link').href = applicationURL; + } const dbStats = responseJson.config.dbStats; const dbTable = GenericRendering.renderTableFromJsonArray({ rows: dbStats,