mirror of
https://github.com/theonedev/onedev.git
synced 2025-12-08 18:26:30 +00:00
Show incompatibilities link in help menu
This commit is contained in:
parent
210daf114d
commit
ac86cf97a6
@ -1,6 +1,6 @@
|
|||||||
The MIT License
|
The MIT License
|
||||||
|
|
||||||
Copyright (c) 2018-2020 onedev.io
|
Copyright (c) 2018-2022 onedev.io
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -584,6 +584,7 @@ public class Upgrade extends DefaultPersistManager {
|
|||||||
FileUtils.copyFile(new File(Bootstrap.installDir, "readme.txt"), new File(upgradeDir, "readme.txt"));
|
FileUtils.copyFile(new File(Bootstrap.installDir, "readme.txt"), new File(upgradeDir, "readme.txt"));
|
||||||
FileUtils.copyFile(new File(Bootstrap.installDir, "license.txt"), new File(upgradeDir, "license.txt"));
|
FileUtils.copyFile(new File(Bootstrap.installDir, "license.txt"), new File(upgradeDir, "license.txt"));
|
||||||
FileUtils.copyFile(new File(Bootstrap.installDir, "version.txt"), new File(upgradeDir, "version.txt"));
|
FileUtils.copyFile(new File(Bootstrap.installDir, "version.txt"), new File(upgradeDir, "version.txt"));
|
||||||
|
FileUtils.copyFile(new File(Bootstrap.installDir, "build.txt"), new File(upgradeDir, "build.txt"));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,6 +24,7 @@
|
|||||||
<a wicket:id="docLink" class="dropdown-item" target="_blank">Documentation</a>
|
<a wicket:id="docLink" class="dropdown-item" target="_blank">Documentation</a>
|
||||||
<a href="https://code.onedev.io/projects/160/issues?query=%22State%22+is+%22Open%22" class="dropdown-item" target="_blank">Support & Bug Report</a>
|
<a href="https://code.onedev.io/projects/160/issues?query=%22State%22+is+%22Open%22" class="dropdown-item" target="_blank">Support & Bug Report</a>
|
||||||
<a href="/help/api" class="dropdown-item" target="_blank">RESTful API</a>
|
<a href="/help/api" class="dropdown-item" target="_blank">RESTful API</a>
|
||||||
|
<a wicket:id="incompatibilities" class="dropdown-item" target="_blank">Incompatibilities</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,11 +1,15 @@
|
|||||||
package io.onedev.server.web.page.layout;
|
package io.onedev.server.web.page.layout;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.servlet.http.Cookie;
|
import javax.servlet.http.Cookie;
|
||||||
|
|
||||||
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.apache.shiro.subject.PrincipalCollection;
|
import org.apache.shiro.subject.PrincipalCollection;
|
||||||
import org.apache.wicket.Component;
|
import org.apache.wicket.Component;
|
||||||
import org.apache.wicket.RestartResponseAtInterceptPageException;
|
import org.apache.wicket.RestartResponseAtInterceptPageException;
|
||||||
@ -32,6 +36,7 @@ import org.apache.wicket.request.mapper.parameter.PageParameters;
|
|||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
|
import io.onedev.commons.bootstrap.Bootstrap;
|
||||||
import io.onedev.commons.loader.AppLoader;
|
import io.onedev.commons.loader.AppLoader;
|
||||||
import io.onedev.commons.loader.Plugin;
|
import io.onedev.commons.loader.Plugin;
|
||||||
import io.onedev.server.OneDev;
|
import io.onedev.server.OneDev;
|
||||||
@ -301,6 +306,20 @@ public abstract class LayoutPage extends BasePage {
|
|||||||
Plugin product = AppLoader.getProduct();
|
Plugin product = AppLoader.getProduct();
|
||||||
sidebar.add(new Label("productVersion", "Ver. " + product.getVersion()));
|
sidebar.add(new Label("productVersion", "Ver. " + product.getVersion()));
|
||||||
sidebar.add(new ExternalLink("docLink", OneDev.getInstance().getDocRoot() + "/"));
|
sidebar.add(new ExternalLink("docLink", OneDev.getInstance().getDocRoot() + "/"));
|
||||||
|
try {
|
||||||
|
String buildNumber = FileUtils.readFileToString(
|
||||||
|
new File(Bootstrap.installDir, "build.txt"),
|
||||||
|
StandardCharsets.UTF_8);
|
||||||
|
if (buildNumber.length() != 0) {
|
||||||
|
sidebar.add(new ExternalLink("incompatibilities",
|
||||||
|
"https://code.onedev.io/projects/160/builds/" + buildNumber.trim()
|
||||||
|
+ "/markdown/Incompatibilities/doc/incompatibilities.md"));
|
||||||
|
} else {
|
||||||
|
sidebar.add(new WebMarkupContainer("incompatibilities").setVisible(false));
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
|
||||||
WebMarkupContainer topbar = new WebMarkupContainer("topbar");
|
WebMarkupContainer topbar = new WebMarkupContainer("topbar");
|
||||||
add(topbar);
|
add(topbar);
|
||||||
|
|||||||
0
server-product/system/build.txt
Normal file
0
server-product/system/build.txt
Normal file
@ -1,6 +1,6 @@
|
|||||||
The MIT License
|
The MIT License
|
||||||
|
|
||||||
Copyright (c) 2018 OneDev Pty
|
Copyright (c) 2018-2022 OneDev Pty
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user