Skip to content

Commit

Permalink
Make table chart type explicit (#150)
Browse files Browse the repository at this point in the history
This adds an explicit chart type declaration to all tables. The benefit
of this is that this enables users to implement custom table types (with
a distinct chart type) in extensions without clashing with Hubble’s own
table type.
  • Loading branch information
pluehne authored and larsxschneider committed Apr 10, 2018
1 parent bb29f3d commit 6a98b4e
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 10 deletions.
7 changes: 6 additions & 1 deletion docs/assets/js/charts.js
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,11 @@ $(window).bind('load', function()
}
});

tables.each((index, table) => createTable(table));
tables.each(
function(index, table)
{
if ($(table).attr('data-type') == 'table')
createTable(table);
});
});
});
2 changes: 1 addition & 1 deletion docs/housekeeping-abandoned-orgs.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ <h3>Abandoned Organizations</h3>
</div>

<div class="chart-placeholder">
<table data-url="{{ site.dataURL }}/organizations-abandoned-detailed.tsv"></table>
<table data-url="{{ site.dataURL }}/organizations-abandoned-detailed.tsv" data-type="table"></table>
</div>
2 changes: 1 addition & 1 deletion docs/housekeeping-api-requests.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ <h3>API Requests</h3>
</div>

<div class="chart-placeholder">
<table data-url="{{ site.dataURL }}/api-requests-detailed.tsv"></table>
<table data-url="{{ site.dataURL }}/api-requests-detailed.tsv" data-type="table"></table>
<div class="info-box">
<p>
This table lists the resources requested via the API that accounted for the majority of API requests yesterday.
Expand Down
2 changes: 1 addition & 1 deletion docs/housekeeping-forks.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ <h3>Forks to Organizations</h3>
</div>

<div class="chart-placeholder">
<table data-url="{{ site.dataURL }}/forks-to-organizations-detailed.tsv"></table>
<table data-url="{{ site.dataURL }}/forks-to-organizations-detailed.tsv" data-type="table"></table>
</div>
2 changes: 1 addition & 1 deletion docs/housekeeping-git-requests.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ <h3>Git Requests</h3>
</div>

<div class="chart-placeholder">
<table data-url="{{ site.dataURL }}/git-requests-detailed.tsv"></table>
<table data-url="{{ site.dataURL }}/git-requests-detailed.tsv" data-type="table"></table>
<div class="info-box">
<p>
This table lists the repositories that accounted for the majority of Git requests yesterday.
Expand Down
2 changes: 1 addition & 1 deletion docs/housekeeping-git-traffic.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ <h3>Transferred Data</h3>
</div>

<div class="chart-placeholder">
<table data-url="{{ site.dataURL }}/git-download-detailed.tsv"></table>
<table data-url="{{ site.dataURL }}/git-download-detailed.tsv" data-type="table"></table>
<div class="info-box">
<p>
This table lists the repositories that accounted for the majority of the traffic yesterday.
Expand Down
2 changes: 1 addition & 1 deletion docs/housekeeping-repo-location.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ <h3>Personal Repositories with Nonowner Pushes (Last 4 Weeks)</h3>
</div>

<div class="chart-placeholder">
<table data-url="{{ site.dataURL }}/repositories-personal-nonowner-pushes-detailed.tsv"></table>
<table data-url="{{ site.dataURL }}/repositories-personal-nonowner-pushes-detailed.tsv" data-type="table"></table>
</div>
2 changes: 1 addition & 1 deletion docs/org-owners.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<div class="chart-placeholder">
<h3>Organization Owners</h3>
<table data-url="{{ site.dataURL }}/org-owners.tsv"></table>
<table data-url="{{ site.dataURL }}/org-owners.tsv" data-type="table"></table>
<div class="info-box">
<p>Owners for each GitHub organization.</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/recommendations-legacy-teams.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ <h3>Legacy Admin Teams</h3>
</div>

<div class="chart-placeholder">
<table data-url="{{ site.dataURL }}/teams-legacy-detailed.tsv"></table>
<table data-url="{{ site.dataURL }}/teams-legacy-detailed.tsv" data-type="table"></table>
</div>
2 changes: 1 addition & 1 deletion docs/recommendations-tokenless-auth.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@ <h3>Tokenless Authentication Requests</h3>
</div>

<div class="chart-placeholder">
<table data-url="{{ site.dataURL }}/tokenless-authentication-detailed.tsv"></table>
<table data-url="{{ site.dataURL }}/tokenless-authentication-detailed.tsv" data-type="table"></table>
</div>
1 change: 1 addition & 0 deletions docs/repos-activity.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ <h3>Most Active Repositories</h3>
<table
data-url="{{ site.dataURL }}/repository-activity-detailed.tsv"
data-config='{"slice": [0, 50]}'
data-type="table"
></table>
<div class="info-box">
<p>The top 50 most active repositories by number of pushes.</p>
Expand Down

0 comments on commit 6a98b4e

Please sign in to comment.