projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '13645-fix-arvados-api-host-insecure'
[arvados.git]
/
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 0d021fa0de07b01101f7eb736fdb3475456037ed..e673c812102143d451fa48887b4cdf9d28e060a6 100644
(file)
--- a/
apps/workbench/app/helpers/version_helper.rb
+++ b/
apps/workbench/app/helpers/version_helper.rb
@@
-1,17
+1,22
@@
-module VersionHelper
- include ArvadosApiClientHelper
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
- def api_version()
+module VersionHelper
+ # Get the source_version given in the API server's discovery
+ # document.
+ def api_source_version
arvados_api_client.discovery[:source_version]
end
arvados_api_client.discovery[:source_version]
end
- def wb_version()
- Rails.configuration.source_version
+ # Get the packageVersion given in the API server's discovery
+ # document.
+ def api_package_version
+ arvados_api_client.discovery[:packageVersion]
end
end
- def wb_version_text()
- wbv = wb_version
- wbv += Rails.configuration.local_modified if Rails.configuration.local_modified
- wbv
+ # URL for browsing source code for the given version.
+ def version_link_target version
+ "https://arvados.org/projects/arvados/repository/changes?rev=#{version.sub(/-.*/, "")}"
end
end
end
end