Created
September 30, 2015 21:32
-
-
Save anonymous/37d89cb8c8eb8faf5d41 to your computer and use it in GitHub Desktop.
TryCF Gist
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
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" integrity="sha256-MfvZlkHCEqatNoGiOXveE8FIwMzZg4W85qfrfIFBfYc= sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin="anonymous"> | |
<cfoutput>#buildTable()#</cfoutput> | |
<cfscript> | |
function buildTable(version = "all"){ | |
var versionMap = {"10": 7770, "11": 10206, "all": "null" }; | |
var surl = "https://bugbase.adobe.com/index.cfm?event=qSearchBugs&page=1&pageSize=8000&gridsortcolumn=AD_S_CREATED_DT&gridsortdirection=ASC&type=null&product=1149&version=#versionMap[version]#&prodArea=10&state=OPEN&status=null&reason=null&numFiles=&numFilesOp=%3D&numVotes=&numVotesOp=%3D&creationDate=&creationDateOp=%3D&priority=null&failureType=null&frequency=null&reportedBy=&fixedInBuild=&foundInBuild=&appLanguage=-&osLanguage=-&platform=-&browser=-&title=&description=&testConfig=&_cf_nodebug=true&_cf_nocache=true&_cf_clientid=0BB3E5E1EDECE92681695E31F5D9F568&_cf_rc=19"; | |
httpsvc = new Http(); | |
httpsvc.setUrl(surl); | |
response = httpSvc.send().getPrefix(); | |
bugs = deserializeJSON( mid( response.filecontent, 3, response.filecontent.len() ) ); | |
table = '<table class="table table-striped sortable"><thead><tr><th>id</th><th>status</th><th>reason</th><th>title</th><th>created date</th></tr></thead><tbody>'; | |
table &= bugs.query.data.reduce( function( result, a ){ | |
result = result ?: ""; | |
return result & ( a[4] == "neverfix" ? "" : | |
"<tr> | |
<td><a href='https://bugbase.adobe.com/index.cfm?event=selectBug&CFGRIDKEY=#a[2]#' target='_blank'>#a[2]#</a></td> | |
<td>#a[3]#</td> | |
<td>#a[4]#</td> | |
<td>#a[5]#</td> | |
<td>#dateFormat(a[6],'mmm dd, yyyy')#</td> | |
</tr>" ); | |
}); | |
table &= "</tbody></table>"; | |
return table; | |
} | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment