mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-10-25 22:20:05 -05:00
Fixed the SQL help issue for EDB Postgres Advanced Server. Fixes #4099
This commit is contained in:
1 parent
4a8037fc6a
commit
9b8902dfb8
7 files changed
+75
-26
No files matched your search
@@ -7,18 +7,23 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
export function getHelpUrl(base_path, file, version) {
|
||||
export function getHelpUrl(base_path, file, version, server_type) {
|
||||
var major = Math.floor(version / 10000),
|
||||
minor = Math.floor(version / 100) - (major * 100),
|
||||
url = '';
|
||||
subminor = version - ((major * 10000) + (minor * 100)),
|
||||
url = '',
|
||||
replace_string = major + '.' + minor;
|
||||
|
||||
// Handle the version number format change in PG 10+
|
||||
if (major >= 10) {
|
||||
url = base_path.replace('$VERSION$', major);
|
||||
} else {
|
||||
url = base_path.replace('$VERSION$', major + '.' + minor);
|
||||
// Handle the version number format change in EPAS 9.6 and below
|
||||
if (server_type == 'ppas' && major < 10) {
|
||||
replace_string = major + '.' + minor + '.' + subminor;
|
||||
} else if (server_type == 'pg' && major >= 10) {
|
||||
// Handle the version number format change in PG 10+
|
||||
replace_string = major;
|
||||
}
|
||||
|
||||
url = base_path.replace('$VERSION$', replace_string);
|
||||
|
||||
if (url.substr(-1) != '/') {
|
||||
url = url + '/';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user