-
Notifications
You must be signed in to change notification settings - Fork 993
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic html output to conan list (#13135)
* add simple html * fix message * review * fix test * fix test
- Loading branch information
Showing
5 changed files
with
34 additions
and
62 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
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,57 +1,28 @@ | ||
list_packages_html_template = r""" | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<title>Conan | {{ reference }}</title> | ||
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"/> | ||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.21/css/dataTables.bootstrap.min.css"/> | ||
<style> | ||
tr td { | ||
white-space:nowrap; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="container-fluid"> | ||
<h1>{{ reference }}</h1> | ||
<div class="info"> | ||
<p> | ||
Depending on your package_id_mode, any combination of settings, options and requirements | ||
can give you a different packageID. Take into account that your configuration might be | ||
different from the one used to generate the packages. | ||
</p> | ||
</div> | ||
<head> | ||
<title>conan list results</title> | ||
<script> | ||
var list_results = {{ results|safe }}; | ||
document.addEventListener("DOMContentLoaded", function () { | ||
var divContainer = document.getElementById("showResults"); | ||
divContainer.innerHTML = JSON.stringify(list_results, null, 2); | ||
}); | ||
</script> | ||
</head> | ||
<table id="results" class="table table-striped table-bordered" style="width:100%"> | ||
<thead> | ||
</thead> | ||
<tbody> | ||
</tbody> | ||
<tfoot> | ||
</tfoot> | ||
</table> | ||
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script> | ||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script> | ||
<script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.10.20/datatables.min.js"></script> | ||
<script type="text/javascript" src="https://cdn.datatables.net/1.10.21/js/dataTables.bootstrap.min.js"></script> | ||
<script> | ||
</script> | ||
</div> | ||
</body> | ||
<footer> | ||
<div class="container-fluid"> | ||
<div class="info"> | ||
<p> | ||
Conan <b>v{{ version }}</b> <script>document.write(new Date().getFullYear())</script> JFrog LTD. <a>https://conan.io</a> | ||
</p> | ||
</div> | ||
</div> | ||
</footer> | ||
<body> | ||
<pre id="showResults"></pre> | ||
</body> | ||
<footer> | ||
<p> | ||
Conan <b>{{ version }}</b> | ||
<script> | ||
document.write(new Date().getFullYear()); | ||
</script> | ||
JFrog LTD. <a href="https://conan.io">https://conan.io</a> | ||
</p> | ||
</footer> | ||
</html> | ||
""" |
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