Skip to content

Commit

Permalink
Add issues + mailing lists
Browse files Browse the repository at this point in the history
  • Loading branch information
bar-tender committed Dec 12, 2023
1 parent aa7ed2a commit 1fdca15
Showing 1 changed file with 53 additions and 10 deletions.
63 changes: 53 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,39 +58,50 @@
// if it is ask jerry
console.log(url);
if (url.includes("askjerry")) {
document.getElementById("chooseHeader").innerHTML = '<img src="AskJerry_cropped.png" class="img-fluid mb-4" alt="Responsive image">';
document.getElementById("chooseHeader").innerHTML = '<img src="AskJerry_cropped.png" class="img-fluid mb-4" alt="Responsive image">';
} else {
document.getElementById("chooseHeader").innerHTML = '<img src="https://bar.eecs.berkeley.edu/images/logo.png" class="img-fluid mt-5 mb-5" alt="Responsive image">';
}
// TODO: add GH-issues, add mailing lists
var projects = [
[
"Chipyard",
"Chipyard Docs",
"chipyard.readthedocs.io",
["latest", "stable", "1.10.0", "1.9.1", "1.9.0", "1.8.1", "1.8.0", "1.7.1", "1.7.0", "1.6.2", "1.6.1", "1.6.0", "1.5.0", "1.4.0", "1.3.0", "1.2.0", "1.1.0", "1.0.0", "main"]
],
[
"FireSim",
"FireSim Docs",
"docs.fires.im",
["latest", "stable", "1.17.1", "1.17.0", "1.16.0", "1.15.2", "1.15.1", "1.15.0", "1.14.2", "1.14.1", "1.14.0", "1.13.6", "1.13.5", "1.13.4", "1.13.3", "1.13.2", "1.13.1", "1.13.0", "1.12.0", "1.11.0", "1.10.1", "1.10.0", "1.9.0", "1.8.0", "1.7.0", "1.6.0", "1.5.0", "1.4.0", "1.3.2", "1.3.1", "1.3.0", "1.2", "1.1", "williamlyh", "main"]
["latest", "stable", "1.17.1", "1.17.0", "1.16.0", "1.15.2", "1.15.1", "1.15.0", "1.14.2", "1.14.1", "1.14.0", "1.13.6", "1.13.5", "1.13.4", "1.13.3", "1.13.2", "1.13.1", "1.13.0", "1.12.0", "1.11.0", "1.10.1", "1.10.0", "1.9.0", "1.8.0", "1.7.0", "1.6.0", "1.5.0", "1.4.0", "1.3.2", "1.3.1", "1.3.0", "1.2", "1.1", "main"]
],
[
"FireMarshal",
"FireMarshal Docs",
"firemarshal.readthedocs.io",
["latest", "stable", "v1.12.1", "v1.12.0", "v1.11.0", "v1.10.0"]
],
[
"BOOM",
"BOOM Docs",
"docs.boom-core.org",
["latest", "stable"]
],
[
"Hammer",
"Hammer Docs",
"hammer-vlsi.readthedocs.io",
["latest", "stable", "1.2.0", "1.1.2", "1.1.1", "1.1.0", "1.0.4", "1.0.1", "1.0.0", "0.1.0"]
]
];

var misc_sites = [
[ "Chipyard Issues", "https://github.com/ucb-bar/chipyard/issues" ],
[ "FireSim Issues", "https://github.com/firesim/firesim/issues" ],
[ "FireMarshal Issues", "https://github.com/firesim/FireMarshal/issues" ],
[ "BOOM Issues", "https://github.com/riscv-boom/riscv-boom/issues" ],
[ "Hammer Issues", "https://github.com/ucb-bar/hammer/issues" ],
[ "Chipyard Mailing List", "https://groups.google.com/forum/#!forum/chipyard" ],
[ "FireSim Mailing List", "https://groups.google.com/forum/#!forum/firesim" ],
[ "BOOM Mailing List", "https://groups.google.com/forum/#!forum/riscv-boom" ]
]

for (var i = 0; i < projects.length; i++) {
var drop_name = projects[i][0];
var dropdownContents = '<div class="input-group mb-3">'; // Bootstrap input group
Expand All @@ -103,7 +114,7 @@

// Bootstrap styled select dropdown
dropdownContents += '<select class="custom-select" name="' + drop_name + '" id="' + drop_name + 'dropdown">';

for (var j = 0; j < projects[i][2].length; j++) {
var temp_val = projects[i][2][j];
dropdownContents += '<option value="' + temp_val + '">' + temp_val + '</option>';
Expand All @@ -115,20 +126,52 @@
document.getElementById("dropdowns").innerHTML += dropdownContents;
}

for (var i = 0; i < misc_sites.length; i++) {
var drop_name = misc_sites[i][0];
var dropdownContents = '<div class="input-group mb-3">'; // Bootstrap input group

// Bootstrap label for the dropdown
dropdownContents += '<div class="input-group-prepend">';
drop_name2 = "'" + drop_name + "'";
dropdownContents += '<label class="btn btn-outline-secondary" onclick="changecheckboxes('+drop_name2+')" for="' + drop_name + ' id=' + drop_name + '"> <input type="checkbox" autocomplete="off" Checked id="' + drop_name + 'checkbox"> ' + drop_name + '</label>';
dropdownContents += '</div>';

dropdownContents += '</div>'; // Close input group

document.getElementById("dropdowns").innerHTML += dropdownContents;
}

function formSite(s) {
return "site:" + s;
}

function doQuery() {
var querystring = document.getElementById("searchbox").value + " (";

var sites_to_search = [];

for (var i = 0; i < projects.length; i++) {
enabled = document.getElementById(projects[i][0] + "checkbox").checked;
if (!enabled) {
continue;
}
version_num = document.getElementById(projects[i][0] + "dropdown").value;
url_part = projects[i][1];
querystring += "site:" + url_part + "/en/" + version_num;
sites_to_search.push(formSite(url_part + "/en/" + version_num));
}

for (var i = 0; i < misc_sites.length; i++) {
enabled = document.getElementById(misc_sites[i][0] + "checkbox").checked;
if (!enabled) {
continue;
}
sites_to_search.push(formSite(misc_sites[i][1]));
}

for (var i = 0; i < sites_to_search.length; i++) {
querystring += sites_to_search[i];

if (i != projects.length-1) {
if (i != sites_to_search.length-1) {
querystring += " OR ";
}
}
Expand Down

0 comments on commit 1fdca15

Please sign in to comment.