Skip to content

Instantly share code, notes, and snippets.

@baude
Created July 14, 2015 13:35
Show Gist options
  • Select an option

  • Save baude/d7394e362b67dcf81ea0 to your computer and use it in GitHub Desktop.

Select an option

Save baude/d7394e362b67dcf81ea0 to your computer and use it in GitHub Desktop.
function process_info(data) {
var resp = JSON.parse(data);
var rresults = resp.results
var docker_ids = Object.keys(resp.results)
var html = ""
for (var key in resp.results) {
var docker_id = "<h2>" + key + "</h2>";
var value = resp.results[key];
if (!value.hasOwnProperty('msg')){
scan_result = "<P>" + value.critical;
tpl = "<ul><li>Critical: {{critical}}</li><li>Important: {{important}}</li><li>Moderate: {{moderate}}</li><li>Low: {{low}}</li><li>OS: {{os}}</li><li>Containers with same base image: {{value.cids}}</li></ul>";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment