Skip to content

Commit 31be465

Browse files
Removing version from docs links generated from backend. (#22342)
* Removing version from docs links generated from backend. * Updating links.
1 parent 3d63430 commit 31be465

File tree

1 file changed

+4
-19
lines changed

1 file changed

+4
-19
lines changed

graylog2-server/src/main/java/org/graylog2/plugin/DocsHelper.java

+4-19
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,14 @@
1616
*/
1717
package org.graylog2.plugin;
1818

19-
import org.graylog2.shared.ServerVersion;
20-
2119
public enum DocsHelper {
2220
PAGE_SENDING_JSONPATH("getting_in_log_data/json_path_from_http_api_input.html"),
2321
PAGE_SENDING_IPFIXPATH("getting_in_log_data/ipfix_input.html"),
24-
PAGE_ES_CONFIGURATION("https://go2docs.graylog.org/current/setting_up_graylog/server.conf.html#OpenSearch"),
25-
PAGE_ES_VERSIONS("downloading_and_installing_graylog/installing_graylog.html#CompatibilityMatrix"),
22+
PAGE_ES_CONFIGURATION("setting_up_graylog/server_configuration_settings_reference.htm#SearchBackendConfigurationProperties"),
23+
PAGE_ES_VERSIONS("downloading_and_installing_graylog/compatibility_matrix.htm"),
2624
REPORTING_HELP("interacting_with_your_log_data/reporting.html");
2725

28-
private static final String SERVER = "https://go2docs.graylog.org";
26+
private static final String SERVER = "https://go2docs.graylog.org/current";
2927

3028
private final String path;
3129

@@ -35,19 +33,6 @@ public enum DocsHelper {
3533

3634
@Override
3735
public String toString() {
38-
return SERVER + "/" + version() + "/" + path;
39-
}
40-
41-
private String version() {
42-
final var version = ServerVersion.VERSION.getVersion();
43-
if(version.toString().contains("SNAPSHOT")) {
44-
return "current";
45-
} else {
46-
return version.getMajorVersion() + "-" + version.getMinorVersion();
47-
}
48-
}
49-
50-
public String toLink(String title) {
51-
return "<a href=\"" + this + "\" target=\"_blank\">" + title + "</a>";
36+
return SERVER + "/" + path;
5237
}
5338
}

0 commit comments

Comments
 (0)