From b71a48c31dd8409c797831bac0e69d0da29afad4 Mon Sep 17 00:00:00 2001 From: vivek Date: Fri, 22 Jul 2016 22:02:41 -0700 Subject: [PATCH] JENKINS-36481# Rollbar and it.pluginVersion() removed (#369) * JENKINS-36481# Rollbar and it.pluginVersion() removed BlueOceanUI is a bootstrap and core infrastructure class, we do want to keep it fiarly abstract and indepedent of direct Jenkins dependency. Rollbar or any such analytics tool integration should be done out of blueocean-web possibly inside a separate plugin or some place else that makes sense. Footer version to display the commitId/branch * Handle the case when revisionInfo is not there, returning null for now --- .../io/jenkins/blueocean/BlueOceanUI.java | 17 ---------- .../src/main/js/DevelopmentFooter.jsx | 10 +++--- .../jenkins/blueocean/BlueOceanUI/index.jelly | 34 +------------------ 3 files changed, 5 insertions(+), 56 deletions(-) diff --git a/blueocean-web/src/main/java/io/jenkins/blueocean/BlueOceanUI.java b/blueocean-web/src/main/java/io/jenkins/blueocean/BlueOceanUI.java index 2cdc0e5f..c48e9988 100644 --- a/blueocean-web/src/main/java/io/jenkins/blueocean/BlueOceanUI.java +++ b/blueocean-web/src/main/java/io/jenkins/blueocean/BlueOceanUI.java @@ -1,8 +1,6 @@ package io.jenkins.blueocean; import hudson.ExtensionList; -import hudson.model.UsageStatistics; -import jenkins.model.Jenkins; /** * Root of Blue Ocean UI @@ -36,19 +34,4 @@ public class BlueOceanUI { public String getUrlBase() { return urlBase; } - - /** - * @return True if jenkins reports usage statistics. - */ - public boolean includeRollbar() { - return false; -// return Jenkins.getInstance().isUsageStatisticsCollected() && !UsageStatistics.DISABLED; - } - - /** - * @return Version on the plugin e.g 1.0-SNAPSHOT (private-f9a14d3e-jenkins) - */ - public String getPluginVersion() { - return Jenkins.getInstance().getPlugin("blueocean-web").getWrapper().getVersion(); - } } diff --git a/blueocean-web/src/main/js/DevelopmentFooter.jsx b/blueocean-web/src/main/js/DevelopmentFooter.jsx index 3e2e2913..179a15a9 100644 --- a/blueocean-web/src/main/js/DevelopmentFooter.jsx +++ b/blueocean-web/src/main/js/DevelopmentFooter.jsx @@ -6,12 +6,10 @@ import revisionInfo from '../../../target/classes/io/jenkins/blueocean/revisionI export class DevelopmentFooter extends Component { render() { if (!revisionInfo || !revisionInfo.name) { - var blueOceanVersion = document.getElementsByTagName('head')[0].getAttribute('data-blue-ocean-version'); - return ( -
- Blue Ocean UI v{blueOceanVersion} -
- ); + // TODO: At minimum we should return Jenkins version. Jenkins version is always present + // in X-Hudson HTTP header. Something to be handled elsewhere during load time by + // inspecting HTTP response headers + return null; } return (
diff --git a/blueocean-web/src/main/resources/io/jenkins/blueocean/BlueOceanUI/index.jelly b/blueocean-web/src/main/resources/io/jenkins/blueocean/BlueOceanUI/index.jelly index 4b494246..76283452 100644 --- a/blueocean-web/src/main/resources/io/jenkins/blueocean/BlueOceanUI/index.jelly +++ b/blueocean-web/src/main/resources/io/jenkins/blueocean/BlueOceanUI/index.jelly @@ -12,8 +12,7 @@ + data-adjuncturl="${rootURL}/${j.getAdjuncts('').rootURL}"> Jenkins Blue Ocean @@ -30,37 +29,6 @@ - - - -