-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new chart for organization total and teams total
- Loading branch information
Todd O'Connor
authored and
Lars Schneider
committed
Nov 20, 2017
1 parent
91c30ef
commit e0ef5f2
Showing
9 changed files
with
145 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
date total | ||
2017-09-25 923 | ||
2017-09-24 926 | ||
2017-09-23 930 | ||
2017-09-22 929 | ||
2017-09-21 928 | ||
2017-09-20 927 | ||
2017-09-19 926 | ||
2017-09-18 924 | ||
2017-09-17 922 | ||
2017-09-16 918 | ||
2017-09-15 916 | ||
2017-09-14 909 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
date total | ||
2017-09-25 579 | ||
2017-09-24 575 | ||
2017-09-23 578 | ||
2017-09-22 574 | ||
2017-09-21 572 | ||
2017-09-20 566 | ||
2017-09-19 556 | ||
2017-09-18 548 | ||
2017-09-17 541 | ||
2017-09-16 533 | ||
2017-09-15 524 | ||
2017-09-14 511 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
layout: default | ||
title: Organizations | ||
permalink: /orgs-total | ||
--- | ||
|
||
<h3>Organizations (Total)</h3> | ||
|
||
<div class="row"> | ||
<div class="col-main"> | ||
<div class="chart-container"> | ||
<canvas | ||
class="chart" | ||
data-url="{{ site.dataURL }}/orgs-total.tsv" | ||
data-type="history" | ||
></canvas> | ||
</div> | ||
</div> | ||
<div class="col-aside"> | ||
<div class="info-box"> | ||
<p> | ||
The number of organizations in total. | ||
</p> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
layout: default | ||
title: Teams | ||
permalink: /teams-total | ||
--- | ||
|
||
<h3>Teams (Total)</h3> | ||
|
||
<div class="row"> | ||
<div class="col-main"> | ||
<div class="chart-container"> | ||
<canvas | ||
class="chart" | ||
data-url="{{ site.dataURL }}/teams-total.tsv" | ||
data-type="history" | ||
></canvas> | ||
</div> | ||
</div> | ||
<div class="col-aside"> | ||
<div class="info-box"> | ||
<p> | ||
The number of teams in total. | ||
</p> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from .ReportDaily import * | ||
|
||
# Lists the total number of organizations | ||
class ReportOrgsTotal(ReportDaily): | ||
def name(self): | ||
return "orgs-total" | ||
|
||
def updateDailyData(self): | ||
newHeader, newData = self.parseData( | ||
self.executeQuery(self.query()) | ||
) | ||
self.header = newHeader if newHeader else self.header | ||
self.data.extend(newData) | ||
self.truncateData(self.timeRangeTotal()) | ||
self.sortDataByDate() | ||
|
||
def query(self): | ||
query = ''' | ||
SELECT | ||
"''' + str(self.yesterday()) + '''" AS date, | ||
COUNT(*) AS total | ||
FROM | ||
users AS orgs | ||
WHERE | ||
orgs.type = "Organization" ''' + \ | ||
self.andExcludedEntities("orgs.login") | ||
return query |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from .ReportDaily import * | ||
|
||
# Lists the total number of organizations | ||
class ReportTeamsTotal(ReportDaily): | ||
def name(self): | ||
return "teams-total" | ||
|
||
def updateDailyData(self): | ||
newHeader, newData = self.parseData( | ||
self.executeQuery(self.query()) | ||
) | ||
self.header = newHeader if newHeader else self.header | ||
self.data.extend(newData) | ||
self.truncateData(self.timeRangeTotal()) | ||
self.sortDataByDate() | ||
|
||
def query(self): | ||
query = ''' | ||
SELECT | ||
"''' + str(self.yesterday()) + '''" AS date, | ||
COUNT(*) AS total | ||
FROM | ||
teams, users AS orgs | ||
WHERE | ||
teams.organization_id = orgs.id ''' + \ | ||
self.andExcludedEntities("orgs.login") | ||
return query |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters