This repository has been archived by the owner on Oct 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
803 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,4 @@ config/unicorn.rb | |
public/robots.txt | ||
.*install_done | ||
.bundle/config | ||
|
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
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
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 |
---|---|---|
@@ -1,3 +1,11 @@ | ||
= Contentqa | ||
|
||
This project rocks and uses MIT-LICENSE. | ||
The report generation is done with delayed_job. To install run: | ||
|
||
$ bundle | ||
$ rails generate delayed_job:active_record | ||
$ rake db:migrate | ||
|
||
To start delayed_job in a camp use: | ||
|
||
$ rake jobs:work |
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
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,81 @@ | ||
// Place all the behaviors and hooks related to the matching controller here. | ||
// All this logic will automatically be available in application.js. | ||
|
||
// index page | ||
$(".sortable").tablesorter({ | ||
headers: { | ||
2: {sorter: false}, | ||
3: {sorter: false}, | ||
4: {sorter: false}, | ||
5: {sorter: false}, | ||
6: {sorter: false}, | ||
7: {sorter: false}, | ||
8: {sorter: false} | ||
} | ||
}); | ||
|
||
// errors page | ||
$(".error_table:first").show(); | ||
|
||
$(".error_link").bind("click", function() { | ||
$(".error_table").hide(); | ||
$("#" + $(this).attr("id") + "_table").show(); | ||
}); | ||
|
||
// provider/gloabl page | ||
$('#check_all').on("click", function() { | ||
var checked = this.checked; | ||
$('input[name="reports[]"]:enabled').map(function() { | ||
$(this).prop("checked", checked); | ||
}) | ||
}); | ||
|
||
$('.generate_reports').on("click", function() { | ||
var report_types = $('input[name="reports[]"]:checked').map(function() { | ||
return $(this).val(); | ||
}).get(); | ||
if (report_types.length) { | ||
$(this).prop("disabled", true); | ||
$('#check_all').prop("disabled", true); | ||
var ingest_id = $('#id').val(); | ||
var provider = $('#provider').val(); | ||
var count = 0; | ||
var total = report_types.length; | ||
report_types.forEach(function(report_type) { | ||
$.ajax({ | ||
url: "/qa/reporting/create", | ||
data: {id: ingest_id, report_type: report_type}, | ||
success: function() { | ||
count++; | ||
$("." + report_type + "_link").html("Generating."); | ||
if (count == total) { | ||
if (provider == "global") { | ||
window.location.replace("/qa/reporting/global?id=" + ingest_id); | ||
} | ||
else { | ||
window.location.replace("/qa/reporting/provider?id=" + ingest_id); | ||
} | ||
} | ||
} | ||
}); | ||
}); | ||
} | ||
}); | ||
|
||
if ($('.running').length) { | ||
setInterval(function() { | ||
var ingest_id = $('#id').val(); | ||
var provider = $('#provider').val(); | ||
var url; | ||
if (provider == "global") { | ||
url = "/qa/reporting/global" | ||
} | ||
else { | ||
url = "/qa/reporting/provider" | ||
} | ||
$.ajax({ | ||
url: url, | ||
data: {id: ingest_id} | ||
}); | ||
}, 5000); | ||
} |
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
25 changes: 25 additions & 0 deletions
25
contentqa/app/assets/stylesheets/contentqa/tablesorter.css
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,25 @@ | ||
/* header */ | ||
.sortable .header, | ||
.sortable .tablesorter-header { | ||
background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==); | ||
background-position: center right; | ||
background-repeat: no-repeat; | ||
cursor: pointer; | ||
white-space: normal; | ||
} | ||
.sortable thead .headerSortUp, | ||
.sortable thead .tablesorter-headerSortUp, | ||
.sortable thead .tablesorter-headerAsc { | ||
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7); | ||
border-bottom: #000 2px solid; | ||
} | ||
.sortable thead .headerSortDown, | ||
.sortable thead .tablesorter-headerSortDown, | ||
.sortable thead .tablesorter-headerDesc { | ||
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7); | ||
border-bottom: #000 2px solid; | ||
} | ||
.sortable thead .sorter-false { | ||
background-image: none; | ||
cursor: default; | ||
} |
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
Oops, something went wrong.