mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
CB-1433 CloudBeaver version update API
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
<extension point="org.eclipse.core.runtime.products" id="product">
|
||||
<product application="io.cloudbeaver.product.ce.application" description="Cloudbeaver Web UI Application" name="CloudBeaver CE Server">
|
||||
<property name="appName" value="CloudBeaver CE Server"/>
|
||||
<property name="versionUpdateURL" value="https://cloudbeaver.io/product/cloudbeaver-ce-version.xml"/>
|
||||
</product>
|
||||
</extension>
|
||||
|
||||
|
||||
@@ -101,6 +101,8 @@ type ProductInfo {
|
||||
buildTime: String!
|
||||
releaseTime: String!
|
||||
licenseInfo: String
|
||||
|
||||
latestVersionInfo: String!
|
||||
}
|
||||
|
||||
type ServerConfig {
|
||||
|
||||
@@ -20,6 +20,8 @@ import io.cloudbeaver.registry.WebServiceDescriptor;
|
||||
import io.cloudbeaver.registry.WebServiceRegistry;
|
||||
import io.cloudbeaver.server.CBApplication;
|
||||
import io.cloudbeaver.server.CBPlatform;
|
||||
import org.eclipse.core.runtime.IProduct;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.jkiss.dbeaver.model.meta.Property;
|
||||
import org.jkiss.dbeaver.model.navigator.DBNBrowseSettings;
|
||||
import org.jkiss.dbeaver.registry.language.PlatformLanguageDescriptor;
|
||||
@@ -179,4 +181,10 @@ public class WebServerConfig {
|
||||
return new WebProductInfo();
|
||||
}
|
||||
|
||||
@Property
|
||||
public String getLatestVersionInfo() {
|
||||
IProduct product = Platform.getProduct();
|
||||
return CommonUtils.notEmpty(product.getProperty("versionUpdateURL"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user