Skip to content
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

Merged
merged 22 commits into from
Sep 13, 2021
Merged

Conversation

Njimefo
Copy link
Contributor

@Njimefo Njimefo commented Aug 31, 2021

No description provided.

@Njimefo
Copy link
Contributor Author

Njimefo commented Aug 31, 2021

Hier sind die verschiedenen Ansichten

  • Top-Ansicht
    top view

  • Ansicht laufender Queries
    running view

  • Ansicht fehlgeschlagener Queries und des zurückgeworfenen Fehlers
    failed view

<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>
Copy link
Collaborator

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?

Copy link
Collaborator

Choose a reason for hiding this comment

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

☝️

Copy link
Collaborator

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.

@awildturtok
Copy link
Collaborator

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">
Copy link
Collaborator

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).

Copy link
Collaborator

@thoniTUB thoniTUB left a 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

<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>
Copy link
Collaborator

Choose a reason for hiding this comment

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

☝️

@Njimefo Njimefo requested a review from thoniTUB September 3, 2021 08:13
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;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wird der Import gebraucht?

Comment on lines 18 to 22
import lombok.experimental.FieldNameConstants;
import com.bakdata.conquery.models.i18n.I18n;

import static org.apache.shiro.util.StringUtils.hasText;

Copy link
Collaborator

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

Comment on lines 51 to 55
</li>
<li class="nav-item">
<a class="nav-link" href="/admin-ui/queries">Queries</a>
</li>
<li class="nav-item">
Copy link
Collaborator

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

Copy link
Collaborator

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?

@Njimefo Njimefo requested a review from thoniTUB September 6, 2021 14:16
…es-monitor

# Conflicts:
#	backend/src/main/java/com/bakdata/conquery/resources/admin/rest/AdminResource.java
thoniTUB
thoniTUB previously approved these changes Sep 7, 2021
Copy link
Collaborator

@thoniTUB thoniTUB left a 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

Comment on lines 143 to 153
function handleUpdateCheck(event) {
if (event.checked && !canUpdate) {
reloader = setInterval(getQueries, 5000);
canUpdate = true;
} else if (!event.checked && canUpdate) {
clearInterval(reloader);
reloader = 0;
canUpdate = false;
}

}
Copy link
Collaborator

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);
Copy link
Collaborator

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

Suggested change
reloader = setInterval(getQueries, 5000);
handleUpdateCheck(document.getElementById("updateCheckBox"));

Comment on lines 62 to 72
function updateQueriesTable(data) {
queries = data;

clearTables();
queryCounter = 0;
updateQueriesInnerCounter(data);
if (!data) return;

queries.sort(compareQueriesDate);
for (i = 0; i < queries.length; i++) {
queryCounter++;
Copy link
Collaborator

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;\"" )}>
Copy link
Collaborator

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

Suggested change
<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">
Copy link
Collaborator

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

Brandon Tietse and others added 2 commits September 10, 2021 13:00
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')}>
Copy link
Collaborator

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



clearTables();
QueryCounter = 0;
Copy link
Collaborator

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ja

@thoniTUB thoniTUB merged commit c945e3c into develop Sep 13, 2021
@delete-merged-branch delete-merged-branch bot deleted the feature/admin-queries-monitor branch September 13, 2021 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants