-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Admin ui for live view of queries #2062
Conversation
backend/src/main/resources/com/bakdata/conquery/resources/admin/ui/queries.html.ftl
Outdated
Show resolved
Hide resolved
backend/src/main/resources/com/bakdata/conquery/resources/admin/ui/queries.html.ftl
Outdated
Show resolved
Hide resolved
backend/src/main/resources/com/bakdata/conquery/resources/admin/ui/queries.html.ftl
Outdated
Show resolved
Hide resolved
backend/src/main/resources/com/bakdata/conquery/resources/admin/ui/queries.html.ftl
Outdated
Show resolved
Hide resolved
backend/src/main/resources/com/bakdata/conquery/resources/admin/ui/queries.html.ftl
Outdated
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/resources/admin/rest/AdminResource.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/resources/admin/rest/AdminResource.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/resources/admin/rest/UIProcessor.java
Outdated
Show resolved
Hide resolved
backend/src/main/resources/com/bakdata/conquery/resources/admin/ui/queries.html.ftl
Outdated
Show resolved
Hide resolved
backend/src/main/resources/com/bakdata/conquery/resources/admin/ui/queries.html.ftl
Outdated
Show resolved
Hide resolved
backend/src/main/resources/com/bakdata/conquery/resources/admin/ui/queries.html.ftl
Outdated
Show resolved
Hide resolved
backend/src/main/resources/com/bakdata/conquery/resources/admin/ui/queries.html.ftl
Outdated
Show resolved
Hide resolved
<div class="col"> | ||
<div class="collapse multi-collapse" id="error${queryCounter}"> | ||
<div class="card card-body"> | ||
<pre> ${(data.error ? JSON.stringify(data.error, undefined, 2) : '')} </pre> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ich weiß, nervig aber kannst du versuchen den Trace etwas zu rekonstruieren statt das rohe json zu printen?
Denke, die Message und dann $Datei $Klasse::$Methode#$Zeile
untereinander wäre ein guter Anfang?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
☝️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ich finde das in Ordnung, wie es gerade ist, denn ein Stacktrace ist zu verbose.
backend/src/main/resources/com/bakdata/conquery/resources/admin/ui/queries.html.ftl
Outdated
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/resources/admin/rest/AdminResource.java
Outdated
Show resolved
Hide resolved
Den Abstand zwischen den Queries würde ich noch halbieren, sonst sieht's echt schick aus! |
<div class="row container"> | ||
<div class="col"> | ||
<div class="progress"> | ||
<div class="progress-bar ${(data.status === "RUNNING" ? "bg-warning" : (data.status === "FAILED" ? "bg-danger" : (data.status === "DONE" ? "bg-success" : "") ))}" role="progressbar" style="width: ${(data.progress+k)}%" aria-valuenow="${(data.progress+k)}" aria-valuemin="0" aria-valuemax="100"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Achtung progress
kann null sein (und ist es normaler Weise auch).
…t/AdminResource.java Co-authored-by: awildturtok <1553491+awildturtok@users.noreply.github.com>
backend/src/main/resources/com/bakdata/conquery/resources/admin/ui/queries.html.ftl
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry hatte mich verklickt
backend/src/main/java/com/bakdata/conquery/apiv1/FullExecutionStatus.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/resources/admin/rest/AdminResource.java
Outdated
Show resolved
Hide resolved
<div class="col"> | ||
<div class="collapse multi-collapse" id="error${queryCounter}"> | ||
<div class="card card-body"> | ||
<pre> ${(data.error ? JSON.stringify(data.error, undefined, 2) : '')} </pre> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
☝️
…nto feature/admin-queries-monitor
…nto feature/admin-queries-monitor
…kdata/conquery into feature/admin-queries-monitor
import java.time.ZonedDateTime; | ||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
import com.bakdata.conquery.models.execution.ExecutionState; | ||
import com.bakdata.conquery.models.identifiable.ids.specific.DatasetId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wird der Import gebraucht?
import lombok.experimental.FieldNameConstants; | ||
import com.bakdata.conquery.models.i18n.I18n; | ||
|
||
import static org.apache.shiro.util.StringUtils.hasText; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sieht so aus als ob die Imports auch weg können
backend/src/main/java/com/bakdata/conquery/resources/admin/rest/AdminResource.java
Outdated
Show resolved
Hide resolved
backend/src/main/resources/com/bakdata/conquery/resources/admin/ui/queries.html.ftl
Outdated
Show resolved
Hide resolved
backend/src/main/resources/com/bakdata/conquery/resources/admin/ui/queries.html.ftl
Outdated
Show resolved
Hide resolved
backend/src/main/resources/com/bakdata/conquery/resources/admin/ui/queries.html.ftl
Outdated
Show resolved
Hide resolved
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="/admin-ui/queries">Queries</a> | ||
</li> | ||
<li class="nav-item"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hier ist die Formatierung futsch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kanns du bitte die ganze Datei mein Tab-Indent formatieren?
…es-monitor # Conflicts: # backend/src/main/java/com/bakdata/conquery/resources/admin/rest/AdminResource.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Es ist jetzt noch space indented
backend/src/main/java/com/bakdata/conquery/resources/admin/rest/AdminResource.java
Show resolved
Hide resolved
backend/src/main/resources/com/bakdata/conquery/resources/admin/ui/queries.html.ftl
Outdated
Show resolved
Hide resolved
function handleUpdateCheck(event) { | ||
if (event.checked && !canUpdate) { | ||
reloader = setInterval(getQueries, 5000); | ||
canUpdate = true; | ||
} else if (!event.checked && canUpdate) { | ||
clearInterval(reloader); | ||
reloader = 0; | ||
canUpdate = false; | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
brauchst du die Variable canUpdate
? Das Checked reicht doch, oder?
var languageTag = {}; | ||
window.onload = (event) => { | ||
languageTag = navigator.language || navigator.userLanguage; | ||
reloader = setInterval(getQueries, 5000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So ist es sauberer, denke ich
reloader = setInterval(getQueries, 5000); | |
handleUpdateCheck(document.getElementById("updateCheckBox")); |
function updateQueriesTable(data) { | ||
queries = data; | ||
|
||
clearTables(); | ||
queryCounter = 0; | ||
updateQueriesInnerCounter(data); | ||
if (!data) return; | ||
|
||
queries.sort(compareQueriesDate); | ||
for (i = 0; i < queries.length; i++) { | ||
queryCounter++; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Du benutzt hier zwei referenzen auf das selbe Objekt: queries
und data
.
Bitte nur eins von beidem
</button> | ||
</div> | ||
</div> | ||
<div class="row container" ${(!data.progress || data.progress == null ? data.progress : "style=\"display: none;\"" )}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ich denke sonst ist es falsch
<div class="row container" ${(!data.progress || data.progress == null ? data.progress : "style=\"display: none;\"" )}> | |
<div class="row container" ${(data.progress && data.progress != null ? "" : "style=\"display: none;\"" )}> |
<div class="row container" ${(!data.progress || data.progress == null ? data.progress : "style=\"display: none;\"" )}> | ||
<div class="col"> | ||
<div class="progress"> | ||
<div class="progress-bar ${(data.status === "RUNNING" ? "bg-warning" : (data.status === "FAILED" ? "bg-danger" : (data.status === "DONE" ? "bg-success" : "") ))}" role="progressbar" style="width: ${(data.progress && data.progress != null ? data.progress : 0 )}%" aria-valuenow="${(data.progress && data.progress != null ? data.progress : 0 )}" aria-valuemin="0" aria-valuemax="100"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Der Progress ist ein Float im Interval [0-1], du müsstest ihn also vorher zu Prozent konvertieren
Query-Type : ${data.queryType} | ||
</div> | ||
<div class="col"> | ||
<button class="btn btn-primary innerBtn" type="button" data-toggle="collapse" data-target="#query${queryCounter}" aria-expanded="false" aria-controls="query${queryCounter}" ${(data.query ? '' : 'disabled')}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
queryCounter
bitte noch als Parameter übergeben nicht als globale Variable
…nto feature/admin-queries-monitor
|
||
|
||
clearTables(); | ||
QueryCounter = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hast du den mit Absicht großgeschrieben?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ja
No description provided.