Skip to content

Commit

Permalink
Plugin first version available in github
Browse files Browse the repository at this point in the history
  • Loading branch information
Joao Costa committed Dec 5, 2012
0 parents commit fc12aad
Show file tree
Hide file tree
Showing 24 changed files with 945 additions and 0 deletions.
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/dictionaries/imaginary.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 42 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions .idea/redmine_evm.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/scopes/scope_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

466 changes: 466 additions & 0 deletions .idea/workspace.xml

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions 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.

50 changes: 50 additions & 0 deletions README.rdoc
@@ -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.



17 changes: 17 additions & 0 deletions app/controllers/ratios_controller.rb
@@ -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



5 changes: 5 additions & 0 deletions app/helpers/ratios_helper.rb
@@ -0,0 +1,5 @@
module RatiosHelper



end
67 changes: 67 additions & 0 deletions app/views/ratios/_bottom_js.html.erb
@@ -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>
67 changes: 67 additions & 0 deletions app/views/ratios/_bottom_js.html.erb~
@@ -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>
6 changes: 6 additions & 0 deletions app/views/ratios/_head_js.html.erb
@@ -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>

20 changes: 20 additions & 0 deletions app/views/ratios/index.html.erb
@@ -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 %>


13 changes: 13 additions & 0 deletions assets/stylesheets/ratios.css
@@ -0,0 +1,13 @@
.googauges{
width:150px;
height:200px;
margin-top:150px;
margin-left:25px;
float:left;
}

.goocharts{
width:60%;
height:400px;
float:left;
}
3 changes: 3 additions & 0 deletions config/locales/en.yml
@@ -0,0 +1,3 @@
# English strings go here for Rails i18n
en:
my_label: "My label"
4 changes: 4 additions & 0 deletions config/routes.rb
@@ -0,0 +1,4 @@
# Plugin's routes
# See: http://guides.rubyonrails.org/routing.html

get 'ratios', :to => 'ratios#index'

0 comments on commit fc12aad

Please sign in to comment.