allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [07/14] git commit: [#6545] remove SF-specific ticket graph (was deteriorating anyway)
Date Tue, 10 Sep 2013 16:17:27 GMT
[#6545] remove SF-specific ticket graph (was deteriorating anyway)


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/23561450
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/23561450
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/23561450

Branch: refs/heads/master
Commit: 235614508e37b2b1d31c1c7fc30db930e3e844ff
Parents: aad259f
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Fri Sep 6 19:37:49 2013 +0000
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Committed: Tue Sep 10 14:35:48 2013 +0000

----------------------------------------------------------------------
 .../forgetracker/templates/tracker/stats.html   | 55 +-------------------
 ForgeTracker/forgetracker/tracker_main.py       | 27 +---------
 2 files changed, 2 insertions(+), 80 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/23561450/ForgeTracker/forgetracker/templates/tracker/stats.html
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/templates/tracker/stats.html b/ForgeTracker/forgetracker/templates/tracker/stats.html
index 6351cf7..9db3fb3 100644
--- a/ForgeTracker/forgetracker/templates/tracker/stats.html
+++ b/ForgeTracker/forgetracker/templates/tracker/stats.html
@@ -41,57 +41,4 @@
 <li>7 days: {{week_comments}}</li>
 <li>14 days: {{fortnight_comments}}</li>
 <li>30 days: {{month_comments}}</li>
-</ul>
-{% if show_stats %}
-<h2>Open and closed tickets over time</h2>
-<form class="bp" action="{{request.path_url}}">
-  <div id="stats_date_picker">
-    <label for="dates">Date Range: </label>
-    <input value="{{dates}}" type="text" class="text ui-corner-all" name="dates" id="dates">
-  </div>
-</form>
-
-<div id="stats-viz-container" class="project_stats">
-  <div id="stats-viz" class="ui-corner-left ui-corner-br">
-    <table>
-      <tr>
-        <td class="yaxis">Tickets</td>
-        <td>
-          <div id="project_stats_holder">
-            <div id="grid">
-                <div class="busy"></div>
-            </div>
-          </div>
-        </td>
-      </tr>
-      <tr>
-        <td colspan="2" class="xaxis">Date</td>
-      </tr>
-    </table>
-  </div>
-</div>
-{% endif %}
-{% endblock %}
-{% block extra_js %}
-{% if show_stats %}
-<script type="text/javascript" src="{{g.forge_static('js/jquery.flot.js')}}"></script>
-<script type="text/javascript" src="{{g.forge_static('js/jquery.daterangepicker.js')}}"></script>
-<script type="text/javascript" src="{{g.forge_static('js/stats.js')}}"></script>
-<script type="text/javascript">
-  /*global chartProjectStats */
-  $(document).ready(function () {
-    var series = function(data){
-      return [{label: "Opened", lines: {show: true, lineWidth: 3}, points: {show:true, radius:2,
fill: true, fillColor: '#0685c6'}, data: data.opened, shadowSize: 0},
-              {label: "Closed", lines: {show: true, lineWidth: 3}, points: {show:true, radius:2,
fill: true, fillColor: '#87c706'}, data: data.closed, shadowSize: 0}];
-    };
-    var checkEmpty = function(data){
-      return !data.opened && !data.closed;
-    };
-    var tooltipFormat = function(x,y,item){
-      return y + " tickets";
-    };
-    chartProjectStats('{{c.app.url}}stats_data',{},series,checkEmpty,tooltipFormat);
-  });
-</script>
-{% endif %}
-{% endblock %}
\ No newline at end of file
+</ul>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/23561450/ForgeTracker/forgetracker/tracker_main.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tracker_main.py b/ForgeTracker/forgetracker/tracker_main.py
index c273279..df1e084 100644
--- a/ForgeTracker/forgetracker/tracker_main.py
+++ b/ForgeTracker/forgetracker/tracker_main.py
@@ -57,7 +57,6 @@ from allura.lib import widgets as w
 from allura.lib import validators as V
 from allura.lib.widgets import form_fields as ffw
 from allura.lib.widgets.subscriptions import SubscribeForm
-from allura.lib.zarkov_helpers import zero_fill_zarkov_result
 from allura.lib.plugin import ImportIdConverter
 from allura.controllers import AppDiscussionController, AppDiscussionRestController
 from allura.controllers import attachments as ac
@@ -928,10 +927,6 @@ class RootController(BaseController, FeedController):
         if dates is None:
             today = datetime.utcnow()
             dates = "%s to %s" % ((today - timedelta(days=61)).strftime('%Y-%m-%d'), today.strftime('%Y-%m-%d'))
-        if c.app.config.get_tool_data('sfx', 'group_artifact_id') and config.get('zarkov.webservice_host'):
-            show_stats = True
-        else:
-            show_stats = False
         return dict(
                 now=str(now),
                 week_ago=str(week_ago),
@@ -949,28 +944,8 @@ class RootController(BaseController, FeedController):
                 closed=closed,
                 globals=globals,
                 dates=dates,
-                show_stats=show_stats)
+        )
 
-    @expose('json:')
-    def stats_data(self, begin=None, end=None, **kw):
-        if c.app.config.get_tool_data('sfx', 'group_artifact_id') and config.get('zarkov.webservice_host'):
-            if begin is None and end is None:
-                end_time = datetime.utcnow()
-                begin_time = (end_time - timedelta(days=61))
-                end = end_time.strftime('%Y-%m-%d')
-                begin = begin_time.strftime('%Y-%m-%d')
-            else:
-                end_time = datetime.strptime(end,'%Y-%m-%d')
-                begin_time = datetime.strptime(begin,'%Y-%m-%d')
-            time_interval = 'date'
-            if end_time - begin_time > timedelta(days=183):
-                time_interval = 'month'
-            q_filter = 'group-tracker-%s/%s/%s/' % (time_interval,c.project.get_tool_data('sfx',
'group_id'),c.app.config.get_tool_data('sfx', 'group_artifact_id'))
-            params = urlencode({'data': '{"c":"tracker","b":"'+q_filter+begin+'","e":"'+q_filter+end+'"}'})
-            read_zarkov = json.load(urlopen(config.get('zarkov.webservice_host')+'/q', params))
-            return zero_fill_zarkov_result(read_zarkov, time_interval, begin, end)
-        else:
-            return dict()
 
     @expose()
     @validate(W.subscribe_form)


Mime
View raw message