private String getVersion() { String version = ""; AboutResource aboutResource = this.aboutOperations.get(); if(aboutResource != null) { version = aboutResource.getVersionInfo().getCore().getVersion(); } return version; }
private DataFlowMode getServerDataFlowMode() { if (shell.getDataFlowOperations() == null || shell.getDataFlowOperations().aboutOperation() == null) { throw new IllegalStateException("If the server is available the about operation should be present"); } if (shell.getDataFlowOperations().aboutOperation().get().getFeatureInfo().isSkipperEnabled()) { return DataFlowMode.skipper; } return DataFlowMode.classic; }
@ResponseStatus(HttpStatus.OK) public AboutResource getAboutResource() { final AboutResource aboutResource = new AboutResource(); final FeatureInfo featureInfo = new FeatureInfo(); featureInfo.setAnalyticsEnabled(featuresProperties.isAnalyticsEnabled()); aboutResource.setFeatureInfo(featureInfo); aboutResource.setVersionInfo(versionInfo); aboutResource.setSecurityInfo(securityInfo); aboutResource.setRuntimeEnvironment(runtimeEnvironment); grafanaInfo.setUrl(this.grafanaProperties.getUrl()); grafanaInfo.setRefreshInterval(this.grafanaProperties.getRefreshInterval()); aboutResource.setGrafanaInfo(grafanaInfo); aboutResource.add(ControllerLinkBuilder.linkTo(AboutController.class).withSelfRel());
rowIndex++; modelBuilder.addRow().addValue("Features").addValue(about.getFeatureInfo()); rowIndex++; modelBuilder.addRow().addValue("Versions").addValue(versions); rowIndex++; versions.compute(about.getVersionInfo().getImplementation().getName(), (k, v) -> about.getVersionInfo().getImplementation().getVersion()); versions.compute(about.getVersionInfo().getCore().getName(), (k, v) -> about.getVersionInfo().getCore().getVersion()); versions.compute(about.getVersionInfo().getDashboard().getName(), (k, v) -> about.getVersionInfo().getDashboard().getVersion()); versions.compute(about.getVersionInfo().getShell().getName(), (k, v) -> about.getVersionInfo().getShell().getVersion()); SecurityInfo securityInfo = about.getSecurityInfo(); modelBuilder.addRow().addValue("Security").addValue(securityInfo); rowIndex++; RuntimeEnvironmentDetails appDeployer = about.getRuntimeEnvironment().getAppDeployer(); List<RuntimeEnvironmentDetails> taskLaunchers = about.getRuntimeEnvironment().getTaskLaunchers(); String deployerColumnName = "Skipper Deployer"; modelBuilder.addRow().addValue(deployerColumnName).addValue(appDeployer);
@ResponseStatus(HttpStatus.OK) public AboutResource getAboutResource() { final AboutResource aboutResource = new AboutResource(); final FeatureInfo featureInfo = new FeatureInfo(); featureInfo.setAnalyticsEnabled(featuresProperties.isAnalyticsEnabled()); aboutResource.setFeatureInfo(featureInfo); aboutResource.setVersionInfo(versionInfo); aboutResource.setSecurityInfo(securityInfo); aboutResource.setRuntimeEnvironment(runtimeEnvironment); aboutResource.add(ControllerLinkBuilder.linkTo(AboutController.class).withSelfRel());
rowIndex++; modelBuilder.addRow().addValue("Features").addValue(about.getFeatureInfo()); rowIndex++; modelBuilder.addRow().addValue("Versions").addValue(versions); rowIndex++; versions.compute(about.getVersionInfo().getImplementation().getName(), (k, v) -> about.getVersionInfo().getImplementation().getVersion()); versions.compute(about.getVersionInfo().getCore().getName(), (k, v) -> about.getVersionInfo().getCore().getVersion()); versions.compute(about.getVersionInfo().getDashboard().getName(), (k, v) -> about.getVersionInfo().getDashboard().getVersion()); versions.compute(about.getVersionInfo().getShell().getName(), (k, v) -> about.getVersionInfo().getShell().getVersion()); SecurityInfo securityInfo = about.getSecurityInfo(); modelBuilder.addRow().addValue("Security").addValue(securityInfo); rowIndex++; RuntimeEnvironmentDetails appDeployer = about.getRuntimeEnvironment().getAppDeployer(); RuntimeEnvironmentDetails taskLauncher = about.getRuntimeEnvironment().getTaskLauncher(); String deployerColumnName = this.shellDataflowMode == DataFlowMode.skipper ? "Skipper Deployer" : "App Deployer"; modelBuilder.addRow().addValue(deployerColumnName).addValue(appDeployer);
private String getVersion() { String version = ""; AboutResource aboutResource = this.aboutOperations.get(); if(aboutResource != null) { version = aboutResource.getVersionInfo().getCore().getVersion(); } return version; }