Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Commit

Permalink
Merge pull request #373 from mozilla/fix-fetch-all-param
Browse files Browse the repository at this point in the history
Bug 1097090 - use config.fetch_all to activate job pagination
  • Loading branch information
maurodoglio committed Feb 19, 2015
2 parents 3b951a6 + ba9a90b commit b8049b4
Show file tree
Hide file tree
Showing 10 changed files with 613 additions and 73,955 deletions.
2 changes: 1 addition & 1 deletion webapp/app/js/models/job.js
Expand Up @@ -34,7 +34,7 @@ treeherder.factory('ThJobModel', [
// a static method to retrieve a list of ThJobModel
config = config || {};
var timeout = config.timeout || null;
var fetch_all = fetch_all || false;
var fetch_all = config.fetch_all || false;

return $http.get(ThJobModel.get_uri(repoName),{
params: options,
Expand Down
2 changes: 1 addition & 1 deletion webapp/config/karma.conf.js
Expand Up @@ -33,7 +33,7 @@ module.exports = function (config) {
'app/vendor/*.js',

// fixtures
{pattern: 'test/mock/*.json', watched: true, served: true, included: false}
{pattern: 'test/mock/**/*.json', watched: true, served: true, included: false}
],

autoWatch: false,
Expand Down
114 changes: 114 additions & 0 deletions webapp/test/mock/job_list/job_1.json
@@ -0,0 +1,114 @@
{
"meta": {
"count": 2000,
"repository": "mozilla-central",
"offset": 0
},
"job_property_names": [
"submit_timestamp",
"machine_name",
"job_group_symbol",
"job_group_name",
"platform_option",
"job_type_description",
"result_set_id",
"result",
"id",
"machine_platform_architecture",
"end_timestamp",
"build_platform",
"job_guid",
"job_type_name",
"ref_data_name",
"platform",
"state",
"running_eta",
"pending_eta",
"build_os",
"option_collection_hash",
"who",
"failure_classification_id",
"job_type_symbol",
"reason",
"job_group_description",
"job_coalesced_to_guid",
"machine_platform_os",
"start_timestamp",
"build_architecture",
"device_name",
"last_modified",
"build_platform_id"
],
"results": [
[
1424270698,
"unknown",
"?",
"unknown",
"opt",
"fill me",
1,
"unknown",
2123473,
"x86",
0,
"linux32",
"effdbbfd128cbe4a29e8d418230d708eea165c94",
"Build",
"Linux mozilla-inbound build",
"linux32",
"running",
1721,
216,
"linux",
"102210fe594ee9b33d82058545b1ed14f4c8206e",
"unknown",
1,
"B",
"unknown",
"fill me",
null,
"linux",
1424271878,
"x86",
"unknown",
"2015-01-18T15:06:03",
17
],
[
1424270698,
"bld-linux64-spot-423",
"?",
"unknown",
"debug",
"fill me",
1,
"success",
2123474,
"x86",
1424272397,
"linux32",
"c63409cac418eb147286dfde9f773de6b2ad14b0",
"Build",
"Linux mozilla-inbound leak test build",
"linux32",
"completed",
1775,
209,
"linux",
"32faaecac742100f7753f0c1d0aa0add01b4046b",
"mozilla-inbound-firefox",
1,
"B",
"scheduler",
"fill me",
null,
"linux",
1424270703,
"x86",
"unknown",
"2015-01-18T15:19:17",
17
]
]
}
114 changes: 114 additions & 0 deletions webapp/test/mock/job_list/job_2.json
@@ -0,0 +1,114 @@
{
"meta": {
"count": 2000,
"repository": "mozilla-central",
"offset": 0
},
"job_property_names": [
"submit_timestamp",
"machine_name",
"job_group_symbol",
"job_group_name",
"platform_option",
"job_type_description",
"result_set_id",
"result",
"id",
"machine_platform_architecture",
"end_timestamp",
"build_platform",
"job_guid",
"job_type_name",
"ref_data_name",
"platform",
"state",
"running_eta",
"pending_eta",
"build_os",
"option_collection_hash",
"who",
"failure_classification_id",
"job_type_symbol",
"reason",
"job_group_description",
"job_coalesced_to_guid",
"machine_platform_os",
"start_timestamp",
"build_architecture",
"device_name",
"last_modified",
"build_platform_id"
],
"results": [
[
1424270698,
"unknown",
"?",
"unknown",
"opt",
"fill me",
2,
"unknown",
2123473,
"x86",
0,
"linux32",
"effdbbfd128cbe4a29e8d418230d708eea165c94",
"Build",
"Linux mozilla-inbound build",
"linux32",
"running",
1721,
216,
"linux",
"102210fe594ee9b33d82058545b1ed14f4c8206e",
"unknown",
1,
"B",
"unknown",
"fill me",
null,
"linux",
1424271878,
"x86",
"unknown",
"2015-02-18T15:06:03",
17
],
[
1424270698,
"bld-linux64-spot-423",
"?",
"unknown",
"debug",
"fill me",
2,
"success",
2123474,
"x86",
1424272397,
"linux32",
"c63409cac418eb147286dfde9f773de6b2ad14b0",
"Build",
"Linux mozilla-inbound leak test build",
"linux32",
"completed",
1775,
209,
"linux",
"32faaecac742100f7753f0c1d0aa0add01b4046b",
"mozilla-inbound-firefox",
1,
"B",
"scheduler",
"fill me",
null,
"linux",
1424270703,
"x86",
"unknown",
"2015-02-18T15:19:17",
17
]
]
}
114 changes: 114 additions & 0 deletions webapp/test/mock/job_list/pagination/page_1.json
@@ -0,0 +1,114 @@
{
"meta": {
"count": 2,
"repository": "mozilla-central",
"offset": 0
},
"job_property_names": [
"submit_timestamp",
"machine_name",
"job_group_symbol",
"job_group_name",
"platform_option",
"job_type_description",
"result_set_id",
"result",
"id",
"machine_platform_architecture",
"end_timestamp",
"build_platform",
"job_guid",
"job_type_name",
"ref_data_name",
"platform",
"state",
"running_eta",
"pending_eta",
"build_os",
"option_collection_hash",
"who",
"failure_classification_id",
"job_type_symbol",
"reason",
"job_group_description",
"job_coalesced_to_guid",
"machine_platform_os",
"start_timestamp",
"build_architecture",
"device_name",
"last_modified",
"build_platform_id"
],
"results": [
[
1424270698,
"unknown",
"?",
"unknown",
"opt",
"fill me",
1,
"unknown",
1,
"x86",
0,
"linux32",
"effdbbfd128cbe4a29e8d418230d708eea165c94",
"Build",
"Linux mozilla-inbound build",
"linux32",
"running",
1721,
216,
"linux",
"102210fe594ee9b33d82058545b1ed14f4c8206e",
"unknown",
1,
"B",
"unknown",
"fill me",
null,
"linux",
1424271878,
"x86",
"unknown",
"2015-01-18T15:06:03",
17
],
[
1424270698,
"bld-linux64-spot-423",
"?",
"unknown",
"debug",
"fill me",
1,
"success",
2,
"x86",
1424272397,
"linux32",
"c63409cac418eb147286dfde9f773de6b2ad14b0",
"Build",
"Linux mozilla-inbound leak test build",
"linux32",
"completed",
1775,
209,
"linux",
"32faaecac742100f7753f0c1d0aa0add01b4046b",
"mozilla-inbound-firefox",
1,
"B",
"scheduler",
"fill me",
null,
"linux",
1424270703,
"x86",
"unknown",
"2015-01-18T15:19:17",
17
]
]
}

0 comments on commit b8049b4

Please sign in to comment.