Skip to content

Commit

Permalink
improve UX of progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
xsuchy committed Feb 16, 2024
1 parent 6e7e36e commit 5b626e3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion backend/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def store(self, feedback_result: FeedbackSchema) -> None:
@classmethod
def get_logs(cls) -> list:
if not os.path.exists(FEEDBACK_DIR):
raise NoDataFound(f"Directory doesn't exist: {FEEDBACK_DIR}")
return []

all_files = [[
os.path.join(subdir[0], file)
Expand Down
2 changes: 1 addition & 1 deletion frontend/public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ a:hover {
position: absolute;
margin-left: auto;
margin-right: auto;
margin-top: 3px;
margin-top: 0px;
left: 0;
right: 0;
text-align: center;
Expand Down
9 changes: 9 additions & 0 deletions frontend/public/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ <h5 class="card-title">Future Plans</h5>
</div>

<h2 class="text-center">FAQ</h2>

<div class="card">
<div class="card-body">
<a id="goals" />
<h5 class="card-title">What is our first goal?</h5>
Our first step is to collect 1000 annotated logs. This is the estimated amount we need to start producing useful results when training AI. After we reach this goal, we will begin working on a CLI tool that will use the trained data. We will then continue to collect data as 2-3 thousands samples should be needed to get satisfactionary results.
</div>
</div>

<div class="card">
<div class="card-body">
<h5 class="card-title">What AI model are you using?</h5>
Expand Down
15 changes: 9 additions & 6 deletions frontend/src/app/homepage.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,15 @@
@report-target)) 100)) 100))

(defn render-stats []
[:div {:id "progressbar"}
[:h5 "Are we there yet?"]
[:div {:id "progressbar-number"}
[:p (progress-width) "%"]]
[:div {:id "progress"
:style {:width (str (progress-width) "%")}}]])
[:<>
[:div {:id "progressbar"}
[:p {:id "progressbar-number"} (str (progress-width) "%")]
[:div {:id "progress"
:style {:width (str (progress-width) "%")}}]
[:div {:id "progressbar2"}
[:div
[:p "Collected " (:total_reports @backend-stats) " logs from "
[:a {:href "/documentation#goals"} @report-target]]]]]])

(defn render-card [provider url title img text inputs]
[:div {:class "card-body"}
Expand Down

0 comments on commit 5b626e3

Please sign in to comment.