X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/fd658b2312b45a6010fe285d4d8adf364faa97b4..d9561b0197cba4a9a0f70929eb03c892df5c4543:/apps/workbench/app/helpers/version_helper.rb diff --git a/apps/workbench/app/helpers/version_helper.rb b/apps/workbench/app/helpers/version_helper.rb index 54470ae395..6cae78f53e 100644 --- a/apps/workbench/app/helpers/version_helper.rb +++ b/apps/workbench/app/helpers/version_helper.rb @@ -1,29 +1,30 @@ module VersionHelper - include ArvadosApiClientHelper + # api_version returns the git commit hash for the API server's + # current version. It is extracted from api_version_text, which + # returns the source_version provided by the discovery document and + # may have the word "-modified" appended to it (if the API server is + # running from a locally modified repository). - # api_version returns the git commit hash for the API server's current version. - # It is extracted from api_version_text, which returns the source_version provided - # by the discovery document and may have the word "-modified" appended to it (if - # the API server is running from a locally modified repository). - - def api_version() - api_version_text().sub(/[^[:xdigit:]].*/, '') + def api_version + api_version_text.sub(/[^[:xdigit:]].*/, '') end - def api_version_text() + def api_version_text arvados_api_client.discovery[:source_version] end # wb_version and wb_version_text provide the same strings for the # code version that this Workbench is currently running. - def wb_version() + def wb_version Rails.configuration.source_version end - def wb_version_text() - wbv = wb_version - wbv += Rails.configuration.local_modified if Rails.configuration.local_modified - wbv + def wb_version_text + wb_version + (Rails.configuration.local_modified or '') + end + + def version_link_target version + "https://arvados.org/projects/arvados/repository/changes?rev=#{version}" end end