Tweak builds page
This commit is contained in:
parent
43f2b4082e
commit
bc3b92c524
1 changed files with 3 additions and 3 deletions
|
|
@ -22,7 +22,7 @@
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="builds"></div>
|
<div id="builds">Connecting...</div>
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
{{ footer_html }}
|
{{ footer_html }}
|
||||||
{{ additional_footer_html }}
|
{{ additional_footer_html }}
|
||||||
|
|
@ -35,6 +35,7 @@
|
||||||
|
|
||||||
function onopen(event) {
|
function onopen(event) {
|
||||||
console.log("connected");
|
console.log("connected");
|
||||||
|
document.getElementById("builds").innerHTML = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
function onmessage(event) {
|
function onmessage(event) {
|
||||||
|
|
@ -42,7 +43,7 @@
|
||||||
var buildElement = document.getElementById(oEvent.build.name);
|
var buildElement = document.getElementById(oEvent.build.name);
|
||||||
if (oEvent.event == "upd") {
|
if (oEvent.event == "upd") {
|
||||||
if (buildElement) {
|
if (buildElement) {
|
||||||
// update event element
|
// update build element
|
||||||
buildElement.build = oEvent.build;
|
buildElement.build = oEvent.build;
|
||||||
} else {
|
} else {
|
||||||
var rowId = `branch-${oEvent.build.commit_info.target_branch}`;
|
var rowId = `branch-${oEvent.build.commit_info.target_branch}`;
|
||||||
|
|
@ -79,7 +80,6 @@
|
||||||
|
|
||||||
function connect() {
|
function connect() {
|
||||||
console.log("connecting...")
|
console.log("connecting...")
|
||||||
document.getElementById("builds").innerHTML = '';
|
|
||||||
const repo = new URLSearchParams(window.location.search).get("repo");
|
const repo = new URLSearchParams(window.location.search).get("repo");
|
||||||
const target_branch = new URLSearchParams(window.location.search).get("target_branch");
|
const target_branch = new URLSearchParams(window.location.search).get("target_branch");
|
||||||
var url = `/api/v1/build-events?repo=${repo}`
|
var url = `/api/v1/build-events?repo=${repo}`
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue