Skip to content

Commit

Permalink
Merge pull request #55 from jekhokie/add-pass-conflict-indicator
Browse files Browse the repository at this point in the history
Add Pass Conflict Indicator
  • Loading branch information
jekhokie committed Feb 11, 2021
2 parents f17b02c + c5ecc7d commit 50e629b
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 2 deletions.
1 change: 1 addition & 0 deletions webpanel/App/Lang/ar.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"cancel" => "إلغاء",
"fail_delete_missing_id" => "فشل الحذف - معلمة "id" مفقودة",
"successful_delete_capture" => "تم حذف الالتقاط بنجاح",
"conflicting_pass" => "التعارض مع التمريرة السابقة",
);
?>

1 change: 1 addition & 0 deletions webpanel/App/Lang/de.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
"cancel" => "Stornieren",
"fail_delete_missing_id" => "Fehler beim Löschen - fehlender 'id'-Parameter",
"successful_delete_capture" => "Capture erfolgreich gelöscht",
"conflicting_pass" => "Konflikt mit vorherigem Pass",
);
?>
1 change: 1 addition & 0 deletions webpanel/App/Lang/en.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
"cancel" => "Cancel",
"fail_delete_missing_id" => "Failed to delete - missing 'id' parameter",
"successful_delete_capture" => "Successfully deleted capture",
"conflicting_pass" => "Conflict with previous pass",
);
?>
1 change: 1 addition & 0 deletions webpanel/App/Lang/es.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
"cancel" => "Cancelar",
"fail_delete_missing_id" => "Error al eliminar: falta el parámetro 'id'",
"successful_delete_capture" => "Captura eliminada con éxito",
"conflicting_pass" => "Conflicto con pase anterior",
);
?>
1 change: 1 addition & 0 deletions webpanel/App/Lang/sr.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
"cancel" => "Poništiti, otkazati",
"fail_delete_missing_id" => "Brisanje nije uspelo - nedostaje parametar „id“",
"successful_delete_capture" => "Snimanje je uspešno izbrisano",
"conflicting_pass" => "Sukob sa prethodnom prolaskom",
);
?>
10 changes: 9 additions & 1 deletion webpanel/App/Views/Passes/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,22 @@
{% set pass_end = pass.pass_end|date('H:i:s') %}

<tr {% if pass.is_active == false or pass_end < now %} class="inactive" {% endif %}>
<td scope="row">{{ pass.sat_name }}</td>
<td scope="row" class="{% if prev_pass_end >= pass.pass_start %}conflict{% endif %}">
{% if prev_pass_end >= pass.pass_start %}<i class="fa fa-exclamation-triangle conflict-icon" data-toggle="tooltip" data-placement="right" title="{{ lang['conflicting_pass'] }}"></i>{% endif %} {{ pass.sat_name }}
</td>
<td scope="row" class="text-center">{{ pass_start }}</td>
<td scope="row" class="text-center">{{ pass_end }}</td>
<td scope="row" class="text-center">{{ pass.max_elev }}</td>
</tr>

{% set prev_pass_end = pass.pass_end %}
{% endfor %}
{% endif %}
</tbody>
</table>

{% endblock %}

{% block js_includes %}
<script src="/assets/js/tooltips.js"></script>
{% endblock %}
5 changes: 4 additions & 1 deletion webpanel/App/Views/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.0/css/all.css"
integrity="sha384-lZN37f5QGtY3VHgisS14W3ExzMWZxybE1SJSEsQp9S+oqd12jhcu+A56Ebc1zFSJ" crossorigin="anonymous">

<title>Raspberry NOAA V2</title>

<link rel="shortcut icon" href="assets/web_img/favicon.ico" type="image/x-icon"/>
Expand Down Expand Up @@ -49,7 +52,7 @@
</div>

<footer class="footer text-center">
<div class="contaienr">
<div class="container">
<a href="https://github.com/jekhokie/raspberry-noaa-v2"><img class="img-footer" src="/assets/web_img/logo-small-v2.png"></a>
</div>
</footer>
Expand Down
8 changes: 8 additions & 0 deletions webpanel/public/assets/css/pass_list.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ div#satvis iframe {
height: 100%;
}

table#passes tr td.conflict i.conflict-icon {
color: #ec5645;
}

table#passes tr.inactive td.conflict i.conflict-icon {
color: lightgray;
}

table#passes tr.inactive {
color: lightgray;
}
Expand Down
3 changes: 3 additions & 0 deletions webpanel/public/assets/js/tooltips.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})

0 comments on commit 50e629b

Please sign in to comment.