hubstats 0.3.17 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -13
- data/.gitignore +0 -1
- data/CHANGELOG.markdown +10 -0
- data/MIT-LICENSE +3 -1
- data/README.md +2 -2
- data/app/assets/javascripts/hubstats/application.js +80 -24
- data/app/assets/javascripts/hubstats/pull_requests.js +35 -3
- data/app/assets/javascripts/hubstats/select2.js +8 -1
- data/app/assets/javascripts/hubstats/users.js +17 -5
- data/app/assets/stylesheets/hubstats/application.css +39 -1
- data/app/assets/stylesheets/hubstats/bootstrap.css +0 -6
- data/app/assets/stylesheets/hubstats/deploys.css +2 -0
- data/app/assets/stylesheets/hubstats/label.css +2 -0
- data/app/assets/stylesheets/hubstats/octicons.css.erb +2 -0
- data/app/assets/stylesheets/hubstats/pull_requests.css +2 -0
- data/app/controllers/hubstats/application_controller.rb +12 -4
- data/app/controllers/hubstats/base_controller.rb +8 -0
- data/app/controllers/hubstats/deploys_controller.rb +31 -8
- data/app/controllers/hubstats/events_controller.rb +11 -0
- data/app/controllers/hubstats/pull_requests_controller.rb +9 -1
- data/app/controllers/hubstats/repos_controller.rb +17 -3
- data/app/controllers/hubstats/users_controller.rb +15 -0
- data/app/models/hubstats/comment.rb +13 -5
- data/app/models/hubstats/deploy.rb +29 -6
- data/app/models/hubstats/label.rb +16 -4
- data/app/models/hubstats/pull_request.rb +44 -2
- data/app/models/hubstats/repo.rb +48 -4
- data/app/models/hubstats/user.rb +130 -32
- data/app/views/hubstats/deploys/index.html.erb +1 -3
- data/app/views/hubstats/deploys/show.html.erb +7 -2
- data/app/views/hubstats/partials/_comment-condensed.html.erb +3 -0
- data/app/views/hubstats/partials/_comment.html.erb +3 -0
- data/app/views/hubstats/partials/_deploy-condensed.html.erb +2 -2
- data/app/views/hubstats/partials/_deploy.html.erb +1 -1
- data/app/views/hubstats/partials/_footer.html.erb +22 -0
- data/app/views/hubstats/partials/_header.html.erb +18 -10
- data/app/views/hubstats/partials/_pull-condensed.html.erb +2 -0
- data/app/views/hubstats/partials/_pull.html.erb +2 -0
- data/app/views/hubstats/partials/_quick_addition_stats.html.erb +2 -0
- data/app/views/hubstats/partials/_quick_stats.html.erb +1 -0
- data/app/views/hubstats/partials/_repo.html.erb +2 -3
- data/app/views/hubstats/partials/_user-condensed.html.erb +4 -0
- data/app/views/hubstats/partials/_user.html.erb +4 -2
- data/app/views/hubstats/pull_requests/index.html.erb +6 -1
- data/app/views/hubstats/pull_requests/show.html.erb +5 -0
- data/app/views/hubstats/repos/dashboard.html.erb +6 -4
- data/app/views/hubstats/repos/show.html.erb +6 -1
- data/app/views/hubstats/tables/_comments-condensed.html.erb +2 -1
- data/app/views/hubstats/tables/_comments.html.erb +2 -1
- data/app/views/hubstats/tables/_deploys-condensed.html.erb +1 -0
- data/app/views/hubstats/tables/_deploys.html.erb +1 -0
- data/app/views/hubstats/tables/_grouped_deploys.html.erb +1 -0
- data/app/views/hubstats/tables/_grouped_pulls.html.erb +1 -0
- data/app/views/hubstats/tables/_pulls-condensed.html.erb +1 -0
- data/app/views/hubstats/tables/_pulls.html.erb +1 -0
- data/app/views/hubstats/tables/_repos-condensed.html.erb +1 -0
- data/app/views/hubstats/tables/_repos.html.erb +1 -0
- data/app/views/hubstats/tables/_users-condensed.html.erb +1 -0
- data/app/views/hubstats/tables/_users.html.erb +1 -1
- data/app/views/hubstats/users/index.html.erb +3 -2
- data/app/views/hubstats/users/show.html.erb +7 -1
- data/app/views/layouts/hubstats/application.html.erb +4 -4
- data/config/routes.rb +2 -1
- data/db/seeds.rb +41 -0
- data/hubstats.gemspec +1 -0
- data/lib/generators/hubstats/install_generator.rb +2 -1
- data/lib/hub_helper.rb +18 -0
- data/lib/hubstats.rb +0 -30
- data/lib/hubstats/events_handler.rb +25 -7
- data/lib/hubstats/github_api.rb +43 -15
- data/lib/hubstats/version.rb +1 -1
- data/lib/tasks/hubstats_tasks.rake +1 -0
- data/lib/tasks/populate_task.rake +2 -1
- data/spec/controllers/hubstats/deploys_controller_spec.rb +0 -3
- data/spec/controllers/hubstats/pull_requests_controller_spec.rb +3 -4
- data/spec/controllers/hubstats/repos_controller_spec.rb +4 -5
- data/spec/factories/comment.rb +2 -1
- data/spec/factories/deploys.rb +1 -0
- data/spec/factories/pull_requests.rb +1 -0
- data/spec/factories/repo.rb +1 -0
- data/spec/factories/users.rb +2 -1
- data/spec/lib/hubstats/github_api_spec.rb +5 -5
- metadata +41 -26
- data/date_range +0 -0
checksums.yaml
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
|
|
5
|
-
data.tar.gz: !binary |-
|
|
6
|
-
Yzc2Njc2YWU4MzU4NjIxMGJkODM5MTJhZGE1MDUyZGI2MGFmYzUwNg==
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 1d42a5ea9c74a42127466bba8c74ef9a8effec2b
|
|
4
|
+
data.tar.gz: 32f44d7a496f560c48bcbd44469d4ab7f2b07ec4
|
|
7
5
|
SHA512:
|
|
8
|
-
metadata.gz:
|
|
9
|
-
|
|
10
|
-
MTQ5ZWZmNzc4NWY2MDcyZjUwNjdjNzgyYjU5NzdlYmE4YzM5YzBjNGZhM2Rm
|
|
11
|
-
MmQ4NWM4MmU4YWQ5ZTU5YTRiM2VjODQwMTkwNzJlODAzMmIyN2I=
|
|
12
|
-
data.tar.gz: !binary |-
|
|
13
|
-
OGEyYmUzMjJlM2VkMDQ5NGEwZTllODg0NDE1OWJmYThlMDZkOTI2NGFhNjc2
|
|
14
|
-
Y2UzMDdhMTM2MjFkNzU2YzZiNWM0MzZhMjNhMmZlOWFlMWEzNmEzOGUwY2Nm
|
|
15
|
-
ZjgwOTc0NWRkMmMzYWExOWNkNzljZmRkNDhlNzI3NTkzZDJlNDQ=
|
|
6
|
+
metadata.gz: 4688a3e72183f7108fb153953ea9902feb1195ff8f7e903a81a6c2197a1ac203b6a498d404519711686f7882b9b4a4aca3fb45430d12c0973233215aa62b2103
|
|
7
|
+
data.tar.gz: a57941f00689be010919731bd4ef7c4c3f744b3776be4c8a0887eb0d4e5c1d5e6d07d2efde44c75894bbb78b54c136cb52970868c4fd6b5e60a050c92d2ea45a
|
data/.gitignore
CHANGED
data/CHANGELOG.markdown
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
#### v0.4.1
|
|
2
|
+
#### v0.4.0
|
|
3
|
+
* Cleaning up code; fixing bug with repo filter; adding pretty footer
|
|
4
|
+
|
|
5
|
+
> Emma Sax: Luke Ludwig, Nick LaMuro: https://github.com/sportngin/hubstats/pull/70
|
|
6
|
+
|
|
7
|
+
* Cleaning up code; fixing bug with repo filter; adding pretty footer
|
|
8
|
+
|
|
9
|
+
> Emma Sax: Luke Ludwig, Nick LaMuro: https://github.com/sportngin/hubstats/pull/70
|
|
10
|
+
|
|
1
11
|
#### v0.3.17
|
|
2
12
|
* Adding migration to fix datetimes versus strings
|
|
3
13
|
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
|
@@ -30,7 +30,7 @@ Hubstats can also use OAUTH access tokens stored in ENV["GITHUB_API_TOKEN"] or f
|
|
|
30
30
|
|
|
31
31
|
### Webhooks
|
|
32
32
|
|
|
33
|
-
Hubstats uses GitHub webhooks to keep itself
|
|
33
|
+
Hubstats uses GitHub webhooks to keep itself updated. It requires you to set a secret as well as an endpoint to push to.
|
|
34
34
|
|
|
35
35
|
To generate a secret run:
|
|
36
36
|
|
|
@@ -48,7 +48,7 @@ Hubstats needs to know what repos for it to watch. You can set it to watch eithe
|
|
|
48
48
|
|
|
49
49
|
## Testing
|
|
50
50
|
|
|
51
|
-
All of the automated tests are written in RSpec. Since hubstats is a plugin, not an application, we need to install the plugin into a Rails application to run. The `test` directory is a dummy rails application for manually testing the UI by serving hubstats locally. When developing and using the `test/dummy` locally, then the test will automatically sync with any updated code, so it doesn't need to be re-served when changes are made with the normal Rails application. When in the development process, one just needs to run `rails s` once from the command line (while in `test/dummy`) to serve the plugin. http://guides.rubyonrails.org/plugins.html will give more information on the implementation of a Rails plugin.
|
|
51
|
+
All of the automated tests are written in RSpec. Since hubstats is a plugin, not an application, we need to install the plugin into a Rails application to run. The `test` directory is a dummy rails application for manually testing the UI by serving hubstats locally. When developing and using the `test/dummy` locally, then the test will automatically sync with any updated code, so it doesn't need to be re-served when changes are made with the normal Rails application. When in the development process, one just needs to run `bundle exec rails s` once from the command line (while in `test/dummy`) to serve the plugin. http://guides.rubyonrails.org/plugins.html will give more information on the implementation of a Rails plugin.
|
|
52
52
|
|
|
53
53
|
## TL:DR
|
|
54
54
|
|
|
@@ -14,45 +14,101 @@
|
|
|
14
14
|
//= require jquery_ujs
|
|
15
15
|
//= require select2
|
|
16
16
|
//= require hubstats/bootstrap
|
|
17
|
+
//= require bootstrap-datepicker
|
|
17
18
|
//= require_tree .
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
/* Below function will run automatically upon refresh. It will do two things:
|
|
21
|
+
* - format the datepicker settings
|
|
22
|
+
* - call setDateRange on the datepicker
|
|
23
|
+
*/
|
|
24
|
+
$(document).ready(function() {
|
|
25
|
+
$('.input-daterange').datepicker({
|
|
26
|
+
"todayHighlight": true,
|
|
27
|
+
"endDate": "Today",
|
|
28
|
+
"todayBtn": true
|
|
29
|
+
});
|
|
30
|
+
setDateRange();
|
|
21
31
|
});
|
|
22
32
|
|
|
33
|
+
/* setDateRange
|
|
34
|
+
* Reads the current cookie (which is currently set as a string with two dates),
|
|
35
|
+
* and sets the dates in the corresponding datepicker.
|
|
36
|
+
*/
|
|
23
37
|
function setDateRange() {
|
|
24
|
-
var
|
|
25
|
-
var
|
|
38
|
+
var dates;
|
|
39
|
+
var cookie = readCookie("hubstats_dates");
|
|
26
40
|
|
|
27
|
-
|
|
41
|
+
if (cookie === null || cookie.indexOf("null") > -1) {
|
|
42
|
+
dates = getDefaultDateRange();
|
|
43
|
+
} else {
|
|
44
|
+
dates = readCookie("hubstats_dates");
|
|
45
|
+
}
|
|
46
|
+
var submitButton = document.getElementById("submitDateRange");
|
|
47
|
+
var datesArray = dates.split("~~");
|
|
28
48
|
|
|
29
|
-
|
|
30
|
-
|
|
49
|
+
var start_input = $('.input-daterange').find('[name="start"]');
|
|
50
|
+
var end_input = $('.input-daterange').find('[name="end"]');
|
|
51
|
+
|
|
52
|
+
start_input.datepicker('update', new Date(datesArray[0]));
|
|
53
|
+
end_input.datepicker('update', new Date(datesArray[1]));
|
|
54
|
+
|
|
55
|
+
/* When the 'Apply' button is pressed for the datepicker, this function will
|
|
56
|
+
* read the datepicker values, assign them to the cookie, and reload the page.
|
|
57
|
+
*/
|
|
58
|
+
submitButton.onclick = function() {
|
|
59
|
+
var start_date = start_input.datepicker('getDate');
|
|
60
|
+
var end_date = end_input.datepicker('getDate');
|
|
61
|
+
createCookie("hubstats_dates", start_date + "~~" + end_date, 1);
|
|
31
62
|
window.location.reload();
|
|
32
63
|
};
|
|
33
64
|
};
|
|
34
65
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
66
|
+
/* createCookie
|
|
67
|
+
* @params - name, value, days
|
|
68
|
+
* Takes a name, value, and number of days and will make a cookie out of those parameters.
|
|
69
|
+
*/
|
|
70
|
+
function createCookie(name, value, days) {
|
|
71
|
+
if (days) {
|
|
72
|
+
var date = new Date();
|
|
73
|
+
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
|
74
|
+
var expires = "; expires=" + date.toGMTString();
|
|
75
|
+
}
|
|
76
|
+
else var expires = "";
|
|
77
|
+
document.cookie = name + "=" + value + expires + "; path=/";
|
|
43
78
|
};
|
|
44
79
|
|
|
80
|
+
/* readCookie
|
|
81
|
+
* @params - name
|
|
82
|
+
* Takes in the name of a cookie, and will read that cookie, returning either the data
|
|
83
|
+
* from the cookie or null if there is no cookie with that name.
|
|
84
|
+
*/
|
|
45
85
|
function readCookie(name) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
86
|
+
var cookieName = name + "=";
|
|
87
|
+
var cookieData = document.cookie.split(';');
|
|
88
|
+
for(var i = 0; i < cookieData.length ; i++) {
|
|
89
|
+
var c = cookieData[i];
|
|
90
|
+
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
|
|
91
|
+
if (c.indexOf(cookieName) == 0) return c.substring(cookieName.length, c.length);
|
|
92
|
+
}
|
|
93
|
+
return null;
|
|
54
94
|
};
|
|
55
95
|
|
|
96
|
+
/* eraseCookie
|
|
97
|
+
* @params - name
|
|
98
|
+
* Creates a new blank cookie.
|
|
99
|
+
*/
|
|
56
100
|
function eraseCookie(name) {
|
|
57
|
-
|
|
101
|
+
createCookie(name, "" , -1);
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
/* getDefaultDateRange
|
|
105
|
+
* Returns a string that is the date two weeks ago, '~~', and today's date with all hours
|
|
106
|
+
* set at midnight.
|
|
107
|
+
*/
|
|
108
|
+
function getDefaultDateRange() {
|
|
109
|
+
var today = new Date();
|
|
110
|
+
today.setHours(0,0,0,0);
|
|
111
|
+
var twoWeeksAgo = new Date(today);
|
|
112
|
+
twoWeeksAgo.setDate(twoWeeksAgo.getDate() - 14);
|
|
113
|
+
return twoWeeksAgo + '~~' + today;
|
|
58
114
|
};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
// Place all the behaviors and hooks related to the matching controller here.
|
|
2
2
|
// All this logic will automatically be available in application.js.
|
|
3
3
|
|
|
4
|
+
/* This will be run whenever the Pull Requests page or Deploy page (for some functionality)
|
|
5
|
+
* is opened or refreshed. It will automatically call of the below functions on all of the
|
|
6
|
+
* variables that are in the URL of the page. The below pieces are all about sorting
|
|
7
|
+
* the data on the page based on state (open or closed), order (newest first
|
|
8
|
+
* or oldest first), and the grouping (by repo or user).
|
|
9
|
+
*/
|
|
4
10
|
$(document).ready(function() {
|
|
5
11
|
queryParameters = getUrlVars();
|
|
6
12
|
setDefaults(queryParameters);
|
|
@@ -31,7 +37,11 @@ $(document).ready(function() {
|
|
|
31
37
|
});
|
|
32
38
|
});
|
|
33
39
|
|
|
34
|
-
|
|
40
|
+
/**
|
|
41
|
+
* updateQueryStringParameter
|
|
42
|
+
* @params - queryParameters, key, value
|
|
43
|
+
* Updates the string paramters based on the specifications in the URL.
|
|
44
|
+
*/
|
|
35
45
|
function updateQueryStringParameter(queryParameters, key, value) {
|
|
36
46
|
var uri = document.location.pathname;
|
|
37
47
|
if (!queryParameters[key])
|
|
@@ -49,6 +59,9 @@ function updateQueryStringParameter(queryParameters, key, value) {
|
|
|
49
59
|
document.location.href = uri
|
|
50
60
|
}
|
|
51
61
|
|
|
62
|
+
/* getUrlVars
|
|
63
|
+
* Gets all of the variables that are in the URL.
|
|
64
|
+
*/
|
|
52
65
|
function getUrlVars() {
|
|
53
66
|
var vars = [], hash;
|
|
54
67
|
if (window.location.href.indexOf('?') > 0) {
|
|
@@ -63,6 +76,10 @@ function getUrlVars() {
|
|
|
63
76
|
return vars;
|
|
64
77
|
}
|
|
65
78
|
|
|
79
|
+
/* setDefaults
|
|
80
|
+
* @params - queryParameters
|
|
81
|
+
* Sets the state, order, and grouping to be 'default', or all, descending, and non-grouped.
|
|
82
|
+
*/
|
|
66
83
|
function setDefaults(queryParameters) {
|
|
67
84
|
if (queryParameters["state"])
|
|
68
85
|
$('#' + queryParameters["state"]).addClass('active');
|
|
@@ -78,6 +95,11 @@ function setDefaults(queryParameters) {
|
|
|
78
95
|
$('#group-by').val(queryParameters["group"]);
|
|
79
96
|
}
|
|
80
97
|
|
|
98
|
+
/* initLabels
|
|
99
|
+
* @params - queryParameters
|
|
100
|
+
* Takes the query parameters and if there are labels as a parameter, then assigns
|
|
101
|
+
* the background colors to the labels that are highlighted.
|
|
102
|
+
*/
|
|
81
103
|
function initLabels (queryParameters) {
|
|
82
104
|
if (queryParameters["label"]) {
|
|
83
105
|
var labels = queryParameters["label"].split(',');
|
|
@@ -93,6 +115,9 @@ function initLabels (queryParameters) {
|
|
|
93
115
|
}
|
|
94
116
|
}
|
|
95
117
|
|
|
118
|
+
/* changeColors
|
|
119
|
+
* Adds the colors to the labels on the list of labels and when labeling the pull requests.
|
|
120
|
+
*/
|
|
96
121
|
function changeColors () {
|
|
97
122
|
$(".color-label").each( function() {
|
|
98
123
|
var color = '#' + $(this)[0].title;
|
|
@@ -104,9 +129,12 @@ function changeColors () {
|
|
|
104
129
|
var color = '#' + $(this).data("color");
|
|
105
130
|
$(this).children().eq(0).css('background-color',color);
|
|
106
131
|
});
|
|
107
|
-
|
|
108
132
|
}
|
|
109
133
|
|
|
134
|
+
/* activeLabels
|
|
135
|
+
* Shows only the labels that are assigned to a pull request that is currently being shown;
|
|
136
|
+
* whether a PR is being shown is dependent on what state (closed, open, or all) the data is showing.
|
|
137
|
+
*/
|
|
110
138
|
function activeLabels () {
|
|
111
139
|
$("#labels-container .btn-label").click(function () {
|
|
112
140
|
$(this).toggleClass("active");
|
|
@@ -122,7 +150,11 @@ function activeLabels () {
|
|
|
122
150
|
});
|
|
123
151
|
}
|
|
124
152
|
|
|
125
|
-
|
|
153
|
+
/* isDark
|
|
154
|
+
* @params - color
|
|
155
|
+
* Edits the color of the text if the label color is dark.
|
|
156
|
+
*/
|
|
157
|
+
function isDark(color) {
|
|
126
158
|
var match = /rgb\((\d+).*?(\d+).*?(\d+)\)/.exec(color);
|
|
127
159
|
return parseFloat(match[1])
|
|
128
160
|
+ parseFloat(match[2])
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/* This is for the filters in the top left corner of the Deploys and Pull Requests pages.
|
|
2
|
+
* This allows the user of Hubstats to filter by an entire list of the repos/users, and then
|
|
3
|
+
* on selection only show data for that choice.
|
|
4
|
+
*/
|
|
1
5
|
$(document).ready(function() {
|
|
2
6
|
usersIDs = queryParameters["users"] ? queryParameters["users"].replace("%2C", ",") : "";
|
|
3
7
|
reposIDs = queryParameters["repos"] ? queryParameters["repos"].replace("%2C", ",") : "";
|
|
@@ -86,7 +90,10 @@ $(document).ready(function() {
|
|
|
86
90
|
}).select2('val', []);
|
|
87
91
|
});
|
|
88
92
|
|
|
89
|
-
|
|
93
|
+
/* getPath
|
|
94
|
+
* @params - model (string)
|
|
95
|
+
* Returns the user or repo bath, based on whether the string passed in is 'repo' or 'user'.
|
|
96
|
+
*/
|
|
90
97
|
function getPath (model) {
|
|
91
98
|
if (model == 'user') {
|
|
92
99
|
return $("#brand").attr('data-user-path');}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
// Place all the behaviors and hooks related to the matching controller here.
|
|
2
2
|
// All this logic will automatically be available in application.js.
|
|
3
3
|
|
|
4
|
+
/* This function is run whenever the Metrics page or the Users page is opened or refreshed. It will
|
|
5
|
+
* sort all of the repos/users sorted by count of (or alphabetically by) name, number of deploys,
|
|
6
|
+
* number of merged pull requests, number of comments, net additions, average additions, or average
|
|
7
|
+
* deletions.
|
|
8
|
+
*/
|
|
4
9
|
$(document).ready(function() {
|
|
5
10
|
queryParameters = getUrlVars();
|
|
6
11
|
setUserDefaults(queryParameters);
|
|
@@ -21,7 +26,6 @@ $(document).ready(function() {
|
|
|
21
26
|
toggleOrder(queryParameters,$(this).attr('id'));
|
|
22
27
|
});
|
|
23
28
|
|
|
24
|
-
// No longer using additions and deletions, but instead using net additions
|
|
25
29
|
$("#netadditions").on("click", function(){
|
|
26
30
|
toggleOrder(queryParameters,$(this).attr('id'));
|
|
27
31
|
});
|
|
@@ -35,6 +39,10 @@ $(document).ready(function() {
|
|
|
35
39
|
});
|
|
36
40
|
});
|
|
37
41
|
|
|
42
|
+
/* toggleOrder
|
|
43
|
+
* @params - queryParams, sort_by
|
|
44
|
+
* Will toggle the order that the data is sorted by (highest first or lowest first).
|
|
45
|
+
*/
|
|
38
46
|
function toggleOrder(queryParams, sort_by) {
|
|
39
47
|
if (queryParams["order"] !== undefined) {
|
|
40
48
|
if (queryParams["order"] === sort_by+"-desc" ) {
|
|
@@ -47,10 +55,14 @@ function toggleOrder(queryParams, sort_by) {
|
|
|
47
55
|
}
|
|
48
56
|
}
|
|
49
57
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
58
|
+
/* setUserDefaults
|
|
59
|
+
* @params - queryParameters
|
|
60
|
+
* Sets the arrow next to what piece of data is being sorted.
|
|
61
|
+
*/
|
|
62
|
+
function setUserDefaults(queryParams) {
|
|
63
|
+
if (queryParams["order"]) {
|
|
64
|
+
sort_by = queryParams["order"].split("-")[0];
|
|
65
|
+
order = queryParams["order"].split("-")[1];
|
|
54
66
|
if (order === 'asc') {
|
|
55
67
|
$('#'+sort_by+' .octicon').addClass('octicon-arrow-up');
|
|
56
68
|
} else {
|
|
@@ -12,9 +12,42 @@
|
|
|
12
12
|
*= require hubstats/bootstrap
|
|
13
13
|
*= require select2
|
|
14
14
|
*= require select2-bootstrap
|
|
15
|
+
*= require bootstrap-datepicker
|
|
15
16
|
*= require_tree .
|
|
16
17
|
*/
|
|
17
18
|
|
|
19
|
+
/*For the 'Apply' button*/
|
|
20
|
+
.apply {
|
|
21
|
+
float: right;
|
|
22
|
+
margin-top: 8px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/*For the active tab on the navigation bar*/
|
|
26
|
+
.navbar-active {
|
|
27
|
+
font-weight: bold;
|
|
28
|
+
color: #E0E0E0;
|
|
29
|
+
background-color: #E0E0E0;
|
|
30
|
+
border-color: #E0E0E0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/*For the datepicker*/
|
|
34
|
+
.input-daterange {
|
|
35
|
+
width: 245px;
|
|
36
|
+
top: 8px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.footer-main-text {
|
|
40
|
+
font-size: 18px;
|
|
41
|
+
color: #B0B0B0;
|
|
42
|
+
text-align: center;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.footer-text {
|
|
46
|
+
font-size: 12px;
|
|
47
|
+
color: #A0A0A0;
|
|
48
|
+
line-height: 20px;
|
|
49
|
+
}
|
|
50
|
+
|
|
18
51
|
.numeric, .title {
|
|
19
52
|
text-align: center;
|
|
20
53
|
}
|
|
@@ -50,13 +83,14 @@
|
|
|
50
83
|
padding: 5px;
|
|
51
84
|
}
|
|
52
85
|
|
|
53
|
-
|
|
54
86
|
.user-image > img,
|
|
55
87
|
.repo-image {
|
|
56
88
|
width: 55px;
|
|
57
89
|
height: 55px;
|
|
58
90
|
}
|
|
59
91
|
|
|
92
|
+
/*For the various images of the repos, octicons, deploys, etc*/
|
|
93
|
+
|
|
60
94
|
.repo-octicon-small {
|
|
61
95
|
font-size: 36px !important;
|
|
62
96
|
}
|
|
@@ -71,6 +105,8 @@
|
|
|
71
105
|
height: 36px;
|
|
72
106
|
}
|
|
73
107
|
|
|
108
|
+
/*For the lists of repos, pull requests, deploys, comments, and users*/
|
|
109
|
+
|
|
74
110
|
.pulls, .comments, .users, .repos, .deploys {
|
|
75
111
|
margin: 15px 0px 15px 0px;
|
|
76
112
|
border: 1px solid #ccc;
|
|
@@ -123,6 +159,8 @@
|
|
|
123
159
|
margin: 0px;
|
|
124
160
|
}
|
|
125
161
|
|
|
162
|
+
/*Other extraneous bits that format the UI*/
|
|
163
|
+
|
|
126
164
|
.push-down {
|
|
127
165
|
margin-top: 8px;
|
|
128
166
|
}
|
|
@@ -3667,12 +3667,6 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
|
|
|
3667
3667
|
.navbar-collapse.in {
|
|
3668
3668
|
overflow-y: auto;
|
|
3669
3669
|
}
|
|
3670
|
-
.navbar-active {
|
|
3671
|
-
font-weight: bold;
|
|
3672
|
-
color: #E0E0E0;
|
|
3673
|
-
background-color: #E0E0E0;
|
|
3674
|
-
border-color: #E0E0E0;
|
|
3675
|
-
}
|
|
3676
3670
|
@media (min-width: 768px) {
|
|
3677
3671
|
.navbar-collapse {
|
|
3678
3672
|
width: auto;
|