MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / getHelpUrl

Function getHelpUrl

web/pgadmin/help/static/js/help.js:10–28  ·  view source on GitHub ↗
(base_path, file, version)

Source from the content-addressed store, hash-verified

8//////////////////////////////////////////////////////////////////////////
9
10export function getHelpUrl(base_path, file, version) {
11 let major = Math.floor(version / 10000),
12 minor = Math.floor(version / 100) - (major * 100),
13 url = '',
14 replace_string = major + '.' + minor;
15
16 if (major >= 10) {
17 // Handle the version number format change in PG 10+
18 replace_string = major;
19 }
20
21 url = base_path.replace('$VERSION$', replace_string);
22
23 if (url.substr(-1) != '/') {
24 url = url + '/';
25 }
26
27 return url + file;
28}
29
30export function getEPASHelpUrl(version, epasURL=null) {
31 let major = Math.floor(version / 10000),

Callers 3

onHelpFunction · 0.90
onHelpFunction · 0.90
help_spec.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected