Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions v1/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -3015,32 +3015,6 @@ func readInputCompilePostV1(reqBytes []byte, queryParserOptions ast.ParserOption
var indexHTML, _ = template.New("index").Parse(`
<html>
<head>
<script type="text/javascript">
function query() {
params = {
'query': document.getElementById("query").value,
}
if (document.getElementById("input").value !== "") {
try {
params["input"] = JSON.parse(document.getElementById("input").value);
} catch (e) {
document.getElementById("result").innerHTML = e;
return;
}
}
body = JSON.stringify(params);
opts = {
'method': 'POST',
'body': body,
}
fetch(new Request('v1/query', opts))
.then(resp => resp.json())
.then(json => {
str = JSON.stringify(json, null, 2);
document.getElementById("result").innerHTML = str;
});
}
</script>
</head>
</body>
<pre>
Expand All @@ -3058,13 +3032,6 @@ Version: {{ .Version }}<br>
Build Commit: {{ .BuildCommit }}<br>
Build Timestamp: {{ .BuildTimestamp }}<br>
Build Hostname: {{ .BuildHostname }}<br>
<br>
Copy link
Copy Markdown
Contributor

@charlieegan3 charlieegan3 Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that removing the form makes sense, but I might vote to keep the Commit and Version as I am unsure how you might do this without running rego otherwise and people might depend on that if not the form?

Release #1, #2, ..#n

  1. We can remove the form. Add deprecation text to page.
  2. Still 200, but remove the version etc.
  3. Remove the page. but still show a 200OK and {"status": "OK"}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with only dropping the form 👍.
Looks like maybe only the version is part of the /status endpoint's returned labels; maybe we should add these other fields too(?).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think that makes sense as a continuity gesture at least. It doesn't look like it's possible to change the version label or the id one either, would these become the same? it might be that someone is using hostname in their own labels.

Query:<br>
<textarea rows="10" cols="50" id="query"></textarea><br>
<br>Input Data (JSON):<br>
<textarea rows="10" cols="50" id="input"></textarea><br>
<br><button onclick="query()">Submit</button>
<pre><div id="result"></div></pre>
</body>
</html>
`)
Expand Down
Loading