]> source.dussan.org Git - sonarqube.git/commitdiff
Remove ImageWidget. It was used for validating new dashboards.
authorSimon Brandhof <simon.brandhof@gmail.com>
Mon, 21 May 2012 09:24:12 +0000 (11:24 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Mon, 21 May 2012 09:24:12 +0000 (11:24 +0200)
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/ImageWidget.java [deleted file]
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/image.html.erb [deleted file]

index 9aeeb35e45647f95f5ec0faee7a143f9744c5fc4..b99b1558fe5d22b3362832563aa4f9b7fdb12182 100644 (file)
@@ -89,7 +89,6 @@ import org.sonar.plugins.core.widgets.FilterWidget;
 import org.sonar.plugins.core.widgets.HotspotMetricWidget;
 import org.sonar.plugins.core.widgets.HotspotMostViolatedResourcesWidget;
 import org.sonar.plugins.core.widgets.HotspotMostViolatedRulesWidget;
-import org.sonar.plugins.core.widgets.ImageWidget;
 import org.sonar.plugins.core.widgets.ItCoverageWidget;
 import org.sonar.plugins.core.widgets.RulesWidget;
 import org.sonar.plugins.core.widgets.SizeWidget;
@@ -324,7 +323,6 @@ public final class CorePlugin extends SonarPlugin {
     extensions.add(ActionPlansWidget.class);
     extensions.add(ReviewsMetricsWidget.class);
     extensions.add(TreemapWidget.class);
-    extensions.add(ImageWidget.class);
     extensions.add(FilterWidget.class);
 
     // dashboards
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/ImageWidget.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/ImageWidget.java
deleted file mode 100644 (file)
index 5ac2599..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2008-2012 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * Sonar is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
- */
-package org.sonar.plugins.core.widgets;
-
-import org.sonar.api.web.AbstractRubyTemplate;
-import org.sonar.api.web.RubyRailsWidget;
-import org.sonar.api.web.WidgetCategory;
-import org.sonar.api.web.WidgetProperties;
-import org.sonar.api.web.WidgetProperty;
-import org.sonar.api.web.WidgetPropertyType;
-import org.sonar.api.web.WidgetScope;
-
-@WidgetCategory({"Global", "Misc"})
-@WidgetScope("GLOBAL")
-@WidgetProperties(
-{
-  @WidgetProperty(key = "imageUrl", type = WidgetPropertyType.STRING, defaultValue = "http://www.sonarsource.org/wp-content/themes/sonarsource.org/images/sonar.png"),
-  @WidgetProperty(key = "alt", type = WidgetPropertyType.STRING, defaultValue = "SonarSource"),
-  @WidgetProperty(key = "link", type = WidgetPropertyType.STRING, defaultValue = "http://www.sonarsource.org"),
-  @WidgetProperty(key = "width", type = WidgetPropertyType.INTEGER, defaultValue = "100"),
-  @WidgetProperty(key = "height", type = WidgetPropertyType.INTEGER, defaultValue = "54")
-})
-public class ImageWidget extends AbstractRubyTemplate implements RubyRailsWidget {
-
-  public String getId() {
-    return "image";
-  }
-
-  public String getTitle() {
-    return "Image";
-  }
-
-  @Override
-  protected String getTemplatePath() {
-    return "/org/sonar/plugins/core/widgets/image.html.erb";
-  }
-}
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/image.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/image.html.erb
deleted file mode 100644 (file)
index c0ab4d7..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<a href="<%= widget_properties['link'] %>" title="<%= widget_properties['alt'] %>">
-  <img src="<%= widget_properties['imageUrl'] %>" alt="<%= widget_properties['alt'] %>" width="<%= widget_properties['width'] %>" height="<%= widget_properties['height'] %>" />
-</a>