Repository: james-project
Updated Branches:
  refs/heads/master 32e5edd40 -> 43267e06c


JAMES-1845 Display James 3.0 release progress as an html


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/43267e06
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/43267e06
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/43267e06

Branch: refs/heads/master
Commit: 43267e06c61f5e14bfc2b47ff56cc688d6885b9d
Parents: 226eba1
Author: Quynh Nguyen <qngu...@linagora.com>
Authored: Mon Sep 26 14:57:55 2016 +0700
Committer: Antoine Duprat <adup...@apache.org>
Committed: Thu Oct 20 16:03:52 2016 +0200

----------------------------------------------------------------------
 james3-roadmap-progress/index.html    | 156 +++++++++++++++++++++++++++++
 james3-roadmap-progress/progress.json | 119 ++++++++++++++++++++++
 2 files changed, 275 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/43267e06/james3-roadmap-progress/index.html
----------------------------------------------------------------------
diff --git a/james3-roadmap-progress/index.html 
b/james3-roadmap-progress/index.html
new file mode 100644
index 0000000..b87dd6a
--- /dev/null
+++ b/james3-roadmap-progress/index.html
@@ -0,0 +1,156 @@
+<!DOCTYPE HTML>
+<html lang="en">
+
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <!-- Plotly.js -->
+  <script type="text/javascript" 
src="https://cdn.plot.ly/plotly-latest.min.js";></script>
+  <title> James 3 progressing tasks </title>
+</head>
+
+<body>
+  <div id="myDiv" style="width: 100%; height: 800px;">
+    <!-- Plotly chart will be drawn inside this DIV -->
+  </div>
+  <script>
+    function createChart(x, y, text, title, height) {
+                       if (!height) {
+                               height = 210;
+                       } else if (height && (height < 400)) {
+                               height = 400;
+                       }
+
+      return {
+        data: [
+        {
+         name: 'Completion',
+          type: 'bar',
+          x: x,
+          y: y,
+          orientation: 'h',
+                                       text: text,
+                                       hoverinfo: 'x + y + text'
+        }],
+        layout: {
+          hovermode: 'closest',
+                                       shapes: {
+                                               fillcolor: '#444'
+                                       },
+          title: title,
+          height: height,
+          xaxis: {
+            title: 'Percent',
+            showgrid: false,
+            zeroline: false,
+                                               range: [0, 100]
+          },
+          margin: {
+            l: 400
+          }
+        }
+      };
+    }
+
+    function getTaskPercent(task) {
+      if (task.hasOwnProperty('completion')) {
+        return task.completion;
+      }
+
+      if (task.hasOwnProperty('children') && task.children.length) {
+        var sum = 0;
+        task.children.forEach(function(subtask) {
+                                       if 
(subtask.hasOwnProperty('completion')) {
+               sum += subtask.completion;
+                                       } else if 
(subtask.hasOwnProperty('children')) {
+                                               sum += 
parseInt(getTaskPercent(subtask));
+                                       }
+        });
+        return (sum / task.children.length).toFixed(0);
+      }
+
+      return 0;
+    }
+       
+    function createCharts(jsonData) {
+      var jsonData = jsonData
+      var charts = [];
+      var dataToScan = [jsonData];
+      while (dataToScan.length) {
+        var data = dataToScan.pop();
+        var x = [];
+        var y = [];
+        var text = [];
+        var title = data.name;
+        var height = 10;
+
+        data.children.forEach(function(value) {
+          x.push(getTaskPercent(value));
+          y.push(value.name);
+                                       text.push('Complexity: ' + 
value.complexity);
+               
+          height = height + 40;
+
+          if (value.hasOwnProperty('children')) {
+            dataToScan.push(value);
+          }
+        });
+
+        x.unshift(getTaskPercent(data));
+        y.unshift('Summarize');
+                               text.unshift('');
+
+        if (x.length) {
+          charts.push(createChart(x, y, text, title, height));
+        }
+      }
+
+      return charts;
+    }
+
+    function drawCharts(jsonData) {
+      var charts = createCharts(jsonData);
+
+      charts.forEach(function(chart, index) {
+        var parentDiv = document.createElement('div');
+        parentDiv.id = chart.layout.title;
+
+        var div = document.createElement('div');
+        var divID = 'chart-' + index;
+        div.id = divID;
+        parentDiv.appendChild(div);
+
+        document.getElementById('myDiv').appendChild(parentDiv);
+
+        Plotly.newPlot(div.id, chart.data, chart.layout);
+
+        div.on('plotly_click', function(data) {
+          var pts = '';
+          for (var i = 0; i < data.points.length; i++) {
+            //pts = 'x = '+data.points[i].x +'\ny = '+ data.points[i].y + 
'\n\n';
+            pts = data.points[i].y;
+          }
+          if (document.getElementById(pts)) {
+            window.location.href = '#' + pts;
+          } else {
+                                               window.location.href = '#' + 
jsonData.name + '(summarize)';
+                                       }
+        });
+
+
+      });
+    }
+
+    function getData(callback) {
+      var req = new XMLHttpRequest();
+      req.addEventListener('load', function() {
+        callback(JSON.parse(this.responseText))
+      });
+      req.open('GET', 'progress.json');
+      req.send();
+    }
+
+    getData(drawCharts);
+  </script>
+</body>
+
+</html>

http://git-wip-us.apache.org/repos/asf/james-project/blob/43267e06/james3-roadmap-progress/progress.json
----------------------------------------------------------------------
diff --git a/james3-roadmap-progress/progress.json 
b/james3-roadmap-progress/progress.json
new file mode 100644
index 0000000..39462ff
--- /dev/null
+++ b/james3-roadmap-progress/progress.json
@@ -0,0 +1,119 @@
+{
+ "name": "3.0 release",
+ "children": [
+   {
+     "name" : "Remove design violation by using only mailbox-api from jmap",
+     "completion" : 100,
+     "complexity" : 10
+   },
+   {
+     "name" : "Make a marketing James 3.0 website",
+     "completion" : 15.12,
+     "complexity" : 10
+   },
+   {
+     "name" : "Assign a unique Id to message entity (and handle move and move 
to trash)",
+     "completion" : 20.5,
+     "complexity" : 10
+   },
+   {
+     "name" : "deploy James @ Linagora",
+     "completion" : 11,
+     "complexity" : 10
+   },
+   {
+     "name" : "write Gatling load and endurance testing",
+     "completion" : 10,
+     "complexity" : 10
+   },
+   {
+     "name" : "implement hasAttachment in search",
+     "completion" : 12,
+     "complexity" : 10
+   },
+   {
+     "name" : "publish a completion status documentation along James 3.0 
release notes",
+     "completion" : 13,
+     "complexity" : 10
+   },
+   {
+     "name" : "Finish Vacation partial update (PR pending)",
+     "completion" : 14,
+     "complexity" : 10
+   },
+   {
+     "name" : "INBOX-298 : handle generated-bodyText property in jmap 
messages",
+     "completion" : 15,
+     "complexity" : 10
+   },
+   {
+     "name" : "Complete IMAP METADATA implementation",
+     "completion" : 80,
+     "complexity" : 5
+   },
+   {
+     "name" : "Make use of Docker 1.12 and swarm capabilities to speedup 
build",
+     "completion" : 18,
+     "complexity" : 10
+   },
+   {
+     "name" : "cleanup james public repositories and tag frequently",
+     "completion" : 17,
+     "complexity" : 10
+   },
+   {
+     "name" : "handle PR build on apache github repository",
+     "completion" : 16,
+     "complexity" : 10
+   },
+   {
+     "name" : "sanitize every supported mailets",
+     "completion" : 19,
+     "complexity" : 10
+   },
+   {
+     "name" : "re-submit a new James logo for contest",
+     "completion" : 50,
+     "complexity" : 10
+   },
+   {
+     "name" : "make sure default (JPA + ES) backends work well",
+     "completion" : 21,
+     "complexity" : 10
+   },
+   {
+     "name" : "Implement a Guice JPA + ES module",
+     "completion" : 22,
+     "complexity" : 10
+   },
+   {
+     "name" : "make a security audit",
+     "completion" : 23,
+     "complexity" : 10
+   },
+   {
+     "name" : "bug triaging",
+     "completion" : 24,
+     "complexity" : 10
+   },
+  {
+   "name": "Mailet refactor",
+   "children": [
+      {"name": "RemoveMailAttributes", "completion": 80, "complexity" : 1},
+      {"name": "RecipientRewriteTable", "completion": 80, "complexity" : 5}
+     ],
+     "complexity" : 40
+    },
+  {
+   "name": "Matcher refactor",
+   "children": [
+      {"name": "Matcher A", "completion": 50, "complexity" : 11},
+      {"name": "Matcher B", "completion": 30, "complexity" : 11},
+      {"name": "Matcher C", "completion": 50, "complexity" : 11},
+      {"name": "Matcher D", "completion": 0, "complexity" : 11}
+     ],
+     "complexity" : 50
+    }
+ ]
+}
+


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to