-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
disable and hide csv import button when request in flight (#142)
- Loading branch information
1 parent
4661814
commit becba25
Showing
20 changed files
with
702 additions
and
422 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,6 @@ | ||
<div class="tile is-child" hx-ext="sse" sse-connect="/events/connection"> | ||
<div | ||
id="places_parent" | ||
class="tile is-child" | ||
hx-get="/events/places/all" | ||
hx-target="this" | ||
hx-swap="none" | ||
hx-trigger="sse:place_state_change" | ||
> | ||
<div id="places_parent" class="tile is-child"> | ||
{% include "place/directive.html" %} | ||
{% include "place/list.html" %} | ||
{% include "place/list_lazy.html" %} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<a class="{{ include.className | default: "button is-primary" }}" hx-post="/app/apply-changes" hx-swap="none"> | ||
<a class="{{ include.className | default: "button is-primary" }}" hx-post="/app/apply-changes" hx-target="div#hero_directive_model" hx-swap="innerHTML"> | ||
<span class="material-symbols-outlined">group_add</span> Upload | ||
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<tr id="{{place.id}}" hx-sse="swap:update-{{place.id}}" hx-target="this" hx-swap="outerHTML"> | ||
{% for hierarchy in contactType.hierarchy %} | ||
{% capture propertyName %}hierarchy_{{ hierarchy.property_name }}{% endcapture %} | ||
{% | ||
include "components/list_cell.html" | ||
propertyName=propertyName | ||
property=hierarchy | ||
values=place.hierarchyProperties | ||
linkTo=place.resolvedHierarchy[hierarchy.level] | ||
%} | ||
{% endfor %} | ||
|
||
{% for property in contactType.place_properties %} | ||
{% if property.type != 'generated' %} | ||
{% capture propertyName %}place_{{ property.property_name }}{% endcapture %} | ||
{% | ||
include "components/list_cell.html" | ||
propertyName=propertyName | ||
property=property | ||
values=place.properties | ||
%} | ||
{% endif %} | ||
{% endfor %} | ||
|
||
{% for contact_property in contactType.contact_properties %} | ||
{% if contact_property.type != 'generated' %} | ||
{% capture propertyName %}contact_{{ contact_property.property_name }}{% endcapture %} | ||
{% | ||
include "components/list_cell.html" | ||
propertyName=propertyName | ||
property=contact_property | ||
values=place.contact.properties | ||
%} | ||
{% endif %} | ||
{% endfor %} | ||
|
||
{% if contactType.user_role.size > 1 %} | ||
{% capture propertyName %}user_{{ contactType.userRoleProperty.property_name }}{% endcapture %} | ||
{% | ||
include "components/list_cell.html" | ||
propertyName=propertyName | ||
property=contactType.userRoleProperty | ||
values=place.userRoleProperties | ||
%} | ||
{% endif %} | ||
|
||
<td> | ||
{% capture tag_text %}{% if place.validationErrors == empty %}{{ place.state }}{% else %}invalid{% endif %}{% | ||
endcapture %} | ||
{% capture tag_class %} | ||
{% if place.state == 'failure' %}is-danger | ||
{% elsif place.state == 'success' %}is-success | ||
{% elsif place.validationErrors != empty %}is-warning | ||
{% endif %} | ||
{% if place.uploadError %}has-tooltip-arrow has-tooltipl-multiline{% endif %} | ||
{% endcapture %} | ||
<span class="tag is-info {{ tag_class }}" {% if place.uploadError | ||
%}data-tooltip="{{ place.uploadError | escape }}" {% endif %}> | ||
{{ tag_text }} | ||
</span> | ||
</td> | ||
|
||
<td> | ||
{% if place.creationDetails.password %} | ||
{% capture explanation %}Username: {{ place.creationDetails.username }} Password: {{ place.creationDetails.password }}{% endcapture %} | ||
<span class="has-tooltip-arrow has-tooltipl-multiline material-symbols-outlined" | ||
data-tooltip="{{ explanation | escape }}" | ||
onclick="navigator.clipboard.writeText(`{{ explanation | escape }}`);"> | ||
key | ||
</span> | ||
{% else %} | ||
<a href="/place/edit/{{place.id}}" data-tooltip="Edit"> | ||
<span class="material-symbols-outlined">edit</span> | ||
</a> | ||
<a hx-post="/place/refresh/{{place.id}}" data-tooltip="Refresh" hx-target="this" hx-swap="none"> | ||
<span class="material-symbols-outlined">refresh</span> | ||
</a> | ||
{% if place.validationErrors == empty %} | ||
<a hx-post="/place/upload/{{place.id}}" hx-target="this" hx-swap="none" data-tooltip="Upload"> | ||
<span class="material-symbols-outlined">upload</span> | ||
</a> | ||
{%endif%} | ||
{%endif%} | ||
|
||
<a class="material-symbols-outlined" data-tooltip="Forget" hx-post="/place/remove/{{place.id}}" | ||
hx-swap="none">delete</a> | ||
</td> | ||
</tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<thead> | ||
<tr> | ||
{% for hierarchy in contactType.hierarchy %} | ||
<th id="hierarchy_{{ hierarchy.property_name }}">{{ hierarchy.friendly_name }}</th> | ||
{% endfor %} | ||
{% for property in contactType.place_properties %} | ||
{% if property.type != 'generated' %} | ||
<th id="place_{{property.property_name}}">{{property.friendly_name}}</th> | ||
{% endif %} | ||
{% endfor %} | ||
{% for contact_property in contactType.contact_properties %} | ||
{% if contact_property.type != 'generated' %} | ||
<th id="contact_{{contact_property.property_name}}">{{contact_property.friendly_name}}</th> | ||
{% endif %} | ||
{% endfor %} | ||
{% if contactType.user_role.size > 1 %} | ||
<th id="{{userRoleProperty.property_name}}">{{ contactType.userRoleProperty.friendly_name }}</th> | ||
{% endif %} | ||
<th></th> | ||
<th></th> | ||
</tr> | ||
</thead> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<div id="place_list" hx-trigger="load" hx-get="/app/list" hx-target="this" hx-swap="outerHTML"> | ||
{% for contactType in contactTypes %} | ||
<div id="{{contactType.name}}" class="mb-6"> | ||
<h2 class="title is-4">{{contactType.friendly}}</h2> | ||
<div> | ||
<table id="table_places" class="table is-fullwidth is-striped is-hoverable"> | ||
{% include "components/table_header.html" contactType=contactType %} | ||
</table> | ||
<div class="container p-6 is-flex is-justify-content-center is-align-content-center"> | ||
<img src="/public/spinner.gif" alt="Loading data" /> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
</div> |
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.