All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.plugins.sigmm.mm_widget.erb Maven / Gradle / Ivy

The newest version!
<%
      if measure('sigmm-maintainability')

	    def self.format(ms)
	      mapping = {'0.0' => '--', '1.0' => '-', '2.0' => '0', '3.0' => '+', '4.0' => '++'};
	      mapping[shift_measure(ms)];
	    end

	    def self.shift_measure(ms)
	      (measure(ms).value + 2).to_s;
	    end

      def self.color(ms)
        color_mapping = {'++' => '00ff00', '+' => '7fff00', '0' => 'ffff00', '-' => 'ff7f00', '--' => 'ff0000'};
        color_mapping[format(ms)];
      end


	    a = 'sigmm-analysability';
	    c = 'sigmm-changeability';
	    s = 'sigmm-stability';
	    t = 'sigmm-testability';
	    m = 'sigmm-maintainability';

%>

SIG Maintain. Model

<%= image_tag 'help.png', :class => 'png' -%>
(A)nalysability <%= format(a) -%>
(C)hangeability <%= format(c) -%>
(S)tability <%= format(s) -%>
(T)estability <%= format(t) -%>
<%= chart('ck=xradar&w=120&h=120&c=' + color(m) + '|' + color(m) + '&m=4&g=0.2&l=A,C,S,T&v=' + shift_measure(a) + ',' + shift_measure(c) + ',' + shift_measure(s) + ',' + shift_measure(t)) -%>
<% end %>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy