Permalink
Browse files

Plugin first version available in github

  • Loading branch information...
0 parents commit fc12aad6a4d7e40c83c6705c0baf38a6bd591996 @JoaoCostaImag JoaoCostaImag committed Dec 5, 2012
@@ -0,0 +1 @@
+redmine_evm
@@ -0,0 +1,3 @@
+<component name="ProjectDictionaryState">
+ <dictionary name="imaginary" />
+</component>
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
+</project>
+
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectInspectionProfilesVisibleTreeState">
+ <entry key="Project Default">
+ <profile-state>
+ <expanded-state>
+ <State>
+ <id />
+ </State>
+ </expanded-state>
+ <selected-state>
+ <State>
+ <id>CSS</id>
+ </State>
+ </selected-state>
+ </profile-state>
+ </entry>
+ </component>
+ <component name="ProjectResources">
+ <default-html-doctype>$APPLICATION_HOME_DIR$/lib/rubymine.jar!/resources/html5-schema/html5.rnc</default-html-doctype>
+ </component>
+ <component name="ProjectRootManager" version="2" project-jdk-name="RVM: ruby-1.9.3-p194 [global]" project-jdk-type="RUBY_SDK" />
+ <component name="SvnConfiguration" maxAnnotateRevisions="500" myUseAcceleration="nothing" myAutoUpdateAfterCommit="false" cleanupOnStartRun="false">
+ <option name="USER" value="" />
+ <option name="PASSWORD" value="" />
+ <option name="mySSHConnectionTimeout" value="30000" />
+ <option name="mySSHReadTimeout" value="30000" />
+ <option name="LAST_MERGED_REVISION" />
+ <option name="MERGE_DRY_RUN" value="false" />
+ <option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
+ <option name="UPDATE_LOCK_ON_DEMAND" value="false" />
+ <option name="IGNORE_SPACES_IN_MERGE" value="false" />
+ <option name="DETECT_NESTED_COPIES" value="true" />
+ <option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
+ <option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
+ <option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
+ <option name="FORCE_UPDATE" value="false" />
+ <option name="IGNORE_EXTERNALS" value="false" />
+ <myIsUseDefaultProxy>false</myIsUseDefaultProxy>
+ </component>
+</project>
+
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/.idea/redmine_evm.iml" filepath="$PROJECT_DIR$/.idea/redmine_evm.iml" />
+ </modules>
+ </component>
+</project>
+
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="RUBY_MODULE" version="4">
+ <component name="FacetManager">
+ <facet type="RailsFacetType" name="Ruby on Rails">
+ <configuration>
+ <RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_SUPPORT_REMOVED" VALUE="false" />
+ <RAILS_FACET_CONFIG_ID NAME="RAILS_TESTS_SOURCES_PATCHED" VALUE="true" />
+ <RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_APPLICATION_ROOT" VALUE="$MODULE_DIR$" />
+ </configuration>
+ </facet>
+ </component>
+ <component name="NewModuleRootManager">
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+ <component name="RModuleSettingsStorage">
+ <LOAD_PATH number="0" />
+ <I18N_FOLDERS number="1" string0="$MODULE_DIR$/config/locales" />
+ </component>
+</module>
+
@@ -0,0 +1,5 @@
+<component name="DependencyValidationManager">
+ <state>
+ <option name="SKIP_IMPORT_STATEMENTS" value="false" />
+ </state>
+</component>
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="VcsDirectoryMappings">
+ <mapping directory="" vcs="" />
+ </component>
+</project>
+

Large diffs are not rendered by default.

Oops, something went wrong.
18 LICENSE
@@ -0,0 +1,18 @@
+Redmine plugin redmine_evm
+Copyright (c) 2012 ImaginaryCloud, imaginarycloud.com.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
+ associated documentation files (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies
+or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
@@ -0,0 +1,50 @@
+= redmine_evm
+
+V0.9.0 (05-Dec-2012)
+
+==About
+
+ This plugin generates line graphical indicators, per Project and open Versions,
+ used in EVM (Earned-Value Management).
+ It shows actual cost (hours reported in log time), planned value
+ (estimated hours indicated in new issue),
+ and earned value distributed in weeks / years.
+ It also shows cpi and spi indicators.
+ Tested on redmine 2.1.3
+
+==Plugin details
+
+ While within a project, this plugin will collect information on hours planned and spent on a
+ project and it's open versions, and present them along with a time scale of weeks per year.
+ It's advisable to fill information on project, version or issues creation about their start date,
+ end date and estimated hours.
+ If such information is not provided it will assume as end date the most likely to be it,
+ such as today's date, for example.
+ Issue estimated hours are distributed equally through issue duration in working days.
+ Hours are presented in a cummulated fashion over time, shown in linear format which serves as a visual
+ indicator to performance obtained.
+ Also included are CPI and SPI indicators.
+ Permissions are
+ Charts are provided by Google Charts. Live connection to internet is required to generate charts.
+
+==Installation:
+
+ 1) Downloading tarball.
+ 2) Extract tarball to {redmine_root}/plugins/redmine_evm/
+
+
+==Keywords:
+
+ EVM, CPI, SPI, Earned Value Management, Redmine, Plugin
+
+==Todo:
+ Baselines;
+ Forecast;
+ Cost to Resources;
+ YTD Values, not constant to End Date;
+
+==License:
+ Copyright © 2012 ImaginaryCloud, imaginarycloud.com. This plugin is licensed under the MIT license.
+
+
+
@@ -0,0 +1,17 @@
+class RatiosController < ApplicationController
+ unloadable
+ include IndicatorsLogic
+
+ def index
+
+ @project = Project.find(params[:id])
+ @proj_or_vers_data = IndicatorsLogic::retrive_data(@project)
+ @proj_or_vers_indicators = IndicatorsLogic::calc_indicators(@project, @proj_or_vers_data[0], @proj_or_vers_data[1])
+
+ end
+
+
+end
+
+
+
@@ -0,0 +1,5 @@
+module RatiosHelper
+
+
+
+end
@@ -0,0 +1,67 @@
+
+<div id="chart <%= name %>" class="goocharts"></div>
+<div id="gauge_cpi <%= name %>" class="googauges"></div>
+<div id="gauge_spi <%= name %>" class="googauges"></div>
+<div style="clear:both;"></div>
+<script type="text/javascript">
+ drawChart();
+ drawCpi();
+ drawSpi();
+
+ function drawChart() {
+ var data = new google.visualization.arrayToDataTable(<%=raw @proj_or_vers_indicators[0] %>);
+
+ var options = {
+ title: 'EVM Indicators - <%= name %>',
+ series: {0:{color: 'red'},
+ 1:{color: 'blue'},
+ 2:{color: 'green'}},
+ vAxis: {title: 'Hours', titleTextStyle: {color: 'red'}}
+ };
+
+ var chart = new google.visualization.LineChart(document.getElementById("chart <%= name %>"));
+ chart.draw(data, options);
+ }
+
+ function drawCpi() {
+ // Create and populate the data table.
+ var data_gauge = new google.visualization.arrayToDataTable([
+ ['Label', 'Value'],
+ ['CPI', <%=raw @proj_or_vers_indicators[1].round(3) %>]
+ ]);
+
+
+ var options_g = {
+ redFrom: 0, redTo: 0.85,
+ yellowFrom:0.85, yellowTo: 1,
+ greenFrom:1, greenTo:2,
+ minorTicks:5,
+ min:0, max:2
+ };
+
+ // Create and draw the visualization.
+ var gauge= new google.visualization.Gauge(document.getElementById("gauge_cpi <%= name %>"));
+ gauge.draw(data_gauge, options_g);
+ }
+
+ function drawSpi() {
+ // Create and populate the data table.
+ var data_gauges = new google.visualization.arrayToDataTable([
+ ['Label', 'Value'],
+ ['SPI', <%=raw @proj_or_vers_indicators[2].round(3) %>]
+ ]);
+
+
+ var options_gs = {
+ redFrom: 0, redTo: 0.85,
+ yellowFrom:0.85, yellowTo: 1,
+ greenFrom:1, greenTo:2,
+ minorTicks:5,
+ min:0, max:2
+ };
+
+ // Create and draw the visualization.
+ var gauge= new google.visualization.Gauge(document.getElementById("gauge_spi <%= name %>"));
+ gauge.draw(data_gauges, options_gs);
+ }
+</script>
@@ -0,0 +1,67 @@
+
+<div id="chart <%= name %>" class="goocharts"></div>
+<div id="gauge_cpi <%= name %>" class="googauges"></div>
+<div id="gauge_spi <%= name %>" class="googauges"></div>
+<div style="clear:both;"></div>
+<script type="text/javascript">
+ drawChart();
+ drawCpi();
+ drawSpi();
+
+ function drawChart() {
+ var data = new google.visualization.arrayToDataTable(<%=raw @proj_or_vers_indicators[0] %>);
+
+ var options = {
+ title: 'Indicadores EVM - <%= name %>',
+ series: {0:{color: 'red'},
+ 1:{color: 'blue'},
+ 2:{color: 'green'}},
+ vAxis: {title: 'Hours', titleTextStyle: {color: 'red'}}
+ };
+
+ var chart = new google.visualization.LineChart(document.getElementById("chart <%= name %>"));
+ chart.draw(data, options);
+ }
+
+ function drawCpi() {
+ // Create and populate the data table.
+ var data_gauge = new google.visualization.arrayToDataTable([
+ ['Label', 'Value'],
+ ['CPI', <%=raw @proj_or_vers_indicators[1].round(3) %>]
+ ]);
+
+
+ var options_g = {
+ redFrom: 0, redTo: 0.85,
+ yellowFrom:0.85, yellowTo: 1,
+ greenFrom:1, greenTo:2,
+ minorTicks:5,
+ min:0, max:2
+ };
+
+ // Create and draw the visualization.
+ var gauge= new google.visualization.Gauge(document.getElementById("gauge_cpi <%= name %>"));
+ gauge.draw(data_gauge, options_g);
+ }
+
+ function drawSpi() {
+ // Create and populate the data table.
+ var data_gauges = new google.visualization.arrayToDataTable([
+ ['Label', 'Value'],
+ ['SPI', <%=raw @proj_or_vers_indicators[2].round(3) %>]
+ ]);
+
+
+ var options_gs = {
+ redFrom: 0, redTo: 0.85,
+ yellowFrom:0.85, yellowTo: 1,
+ greenFrom:1, greenTo:2,
+ minorTicks:5,
+ min:0, max:2
+ };
+
+ // Create and draw the visualization.
+ var gauge= new google.visualization.Gauge(document.getElementById("gauge_spi <%= name %>"));
+ gauge.draw(data_gauges, options_gs);
+ }
+</script>
@@ -0,0 +1,6 @@
+<script type="text/javascript" src="https://www.google.com/jsapi"></script>
+<script type="text/javascript">
+ google.load("visualization", "1", {packages:["corechart"]});
+ google.load('visualization', '1', {packages: ['gauge']});
+</script>
+
@@ -0,0 +1,20 @@
+<!---Load header javascript --->
+<%= render "ratios/head_js" %>
+
+<!--- Load custom css --->
+<% content_for :header_tags do %>
+ <%= stylesheet_link_tag 'ratios', :plugin => 'redmine_evm' %>
+<% end %>
+
+<!--- Load javascript functions --->
+<%= render :partial=>"ratios/bottom_js", :locals=>{:name=>@project.name}%>
+
+<!--- Iterate through versions and render indicators --->
+<% @project.versions.where(:status=>"open").each do |my_version|%>
+<%= render "ratios/head_js" %>
+<% proj_or_vers_data=IndicatorsLogic::retrive_data(my_version) %>
+<% @proj_or_vers_indicators=IndicatorsLogic::calc_indicators(my_version, proj_or_vers_data[0], proj_or_vers_data[1]) %>
+<%= render :partial=>"ratios/bottom_js", :locals=>{:name=>my_version.name}%>
+<% end %>
+
+
@@ -0,0 +1,13 @@
+.googauges{
+ width:150px;
+ height:200px;
+ margin-top:150px;
+ margin-left:25px;
+ float:left;
+}
+
+.goocharts{
+ width:60%;
+ height:400px;
+ float:left;
+}
@@ -0,0 +1,3 @@
+# English strings go here for Rails i18n
+en:
+ my_label: "My label"
@@ -0,0 +1,4 @@
+# Plugin's routes
+# See: http://guides.rubyonrails.org/routing.html
+
+get 'ratios', :to => 'ratios#index'
Oops, something went wrong.

0 comments on commit fc12aad

Please sign in to comment.