Skip to content

Home Information - Your home, your data, organized.

Python

Added icons to collection view. Added a few more icons.

Anthony Cassandra231ca38726ac
diff --git a/src/hi/apps/collection/collection_manager.py b/src/hi/apps/collection/collection_manager.py
index 16df64a6..265126e4 100644
--- a/src/hi/apps/collection/collection_manager.py
+++ b/src/hi/apps/collection/collection_manager.py
@@ -67,6 +67,15 @@ class CollectionManager(Singleton):
entity_status_data_list = StatusDisplayManager().get_entity_status_data_list(
entities = entity_list,
)
+
+ svg_item_factory = SvgItemFactory()
+ for entity_status_data in entity_status_data_list:
+ svg_icon_item = svg_item_factory.get_display_only_svg_icon_item(
+ entity = entity_status_data.entity,
+ )
+ entity_status_data.display_only_svg_icon_item = svg_icon_item
+ continue
+
return CollectionData(
collection = collection,
entity_status_data_list = entity_status_data_list,
diff --git a/src/hi/apps/collection/views.py b/src/hi/apps/collection/views.py
index 8fb22f7d..0caa08c2 100644
--- a/src/hi/apps/collection/views.py
+++ b/src/hi/apps/collection/views.py
@@ -65,6 +65,7 @@ class CollectionViewView( HiGridView, CollectionViewMixin ):
collection = collection,
is_editing = request.view_parameters.is_editing,
)
+
context = collection_data.to_template_context()
context['is_async_request'] = is_ajax( request )
return context
diff --git a/src/hi/apps/entity/enums.py b/src/hi/apps/entity/enums.py
index 64e47fc1..3e56ced4 100644
--- a/src/hi/apps/entity/enums.py
+++ b/src/hi/apps/entity/enums.py
@@ -23,7 +23,8 @@ class EntityType(LabeledEnum):
CONTROLLER = ( 'Controller', '' )
CONTROL_WIRE = ( 'Control Wire', '' )
COOKTOP = ( 'Cooktop', '' )
- DOOR = ( 'Door', '' )
+ DISK = ( 'Disk', '' )
+ DOOR = ( 'Door', '' )
DOOR_LOCK = ( 'Door Lock', '' ) # Controls doors
ELECTRICAL_OUTLET = ( 'Electrical Outlet', '' )
ELECTRICITY_METER = ( 'Electricity Meter', '' )
@@ -51,8 +52,10 @@ class EntityType(LabeledEnum):
PLANT = ( 'Plant', '' )
POOL_FILTER = ( 'Pool Filter', '' )
PRESENCE_SENSOR = ( 'Presence Sensor', '' )
+ PRINTER = ( 'Printer', '' )
PUMP = ( 'Pump', '' )
REFRIGERATOR = ( 'Refrigerator', '' )
+ SERVER = ( 'Server' , '' )
SERVICE = ( 'Service' , '' )
SEWER_LINE = ( 'Sewer Line', '' )
SHOWER = ( 'Shower', '' )
diff --git a/src/hi/apps/entity/templates/entity/panes/entity_display_only_svg_icon.html b/src/hi/apps/entity/templates/entity/panes/entity_display_only_svg_icon.html
new file mode 100644
index 00000000..a50c3194
--- /dev/null
+++ b/src/hi/apps/entity/templates/entity/panes/entity_display_only_svg_icon.html
@@ -0,0 +1,5 @@
+<svg class="hi-entity-display-only-icon"
+ xmlns="http://www.w3.org/2000/svg"
+ viewBox="{{ svg_icon_item.bounding_box }}">
+ {% include svg_icon_item.template_name %}
+</svg>
diff --git a/src/hi/apps/entity/templates/entity/panes/entity_status_card.html b/src/hi/apps/entity/templates/entity/panes/entity_status_card.html
index 252e58ad..21a6f3f0 100644
--- a/src/hi/apps/entity/templates/entity/panes/entity_status_card.html
+++ b/src/hi/apps/entity/templates/entity/panes/entity_status_card.html
@@ -1,17 +1,22 @@
<div>
{% with entity=entity_status_data.entity %}
- <div>
- {% if request.view_parameters.is_editing %}
- <a href="{% url 'entity_details' entity_id=entity.id %}"
- data-async="true">
- {{ entity.name }}
- </a>
- {% else %}
- <a href="{% url 'entity_status' entity_id=entity.id %}"
- data-async="true">
- {{ entity.name }}
- </a>
- {% endif %}
+ <div class="d-flex justify-content-start">
+ <div class="display-only-svg-icon pr-2">
+ {% include "entity/panes/entity_display_only_svg_icon.html" with svg_icon_item=entity_status_data.display_only_svg_icon_item %}
+ </div>
+ <div>
+ {% if request.view_parameters.is_editing %}
+ <a href="{% url 'entity_details' entity_id=entity.id %}"
+ data-async="true">
+ {{ entity.name }}
+ </a>
+ {% else %}
+ <a href="{% url 'entity_status' entity_id=entity.id %}"
+ data-async="true">
+ {{ entity.name }}
+ </a>
+ {% endif %}
+ </div>
</div>
{% endwith %}
diff --git a/src/hi/apps/entity/templates/entity/panes/entity_status_row.html b/src/hi/apps/entity/templates/entity/panes/entity_status_row.html
index 086ce42c..4a54609d 100644
--- a/src/hi/apps/entity/templates/entity/panes/entity_status_row.html
+++ b/src/hi/apps/entity/templates/entity/panes/entity_status_row.html
@@ -1,17 +1,24 @@
<div class="row">
{% with entity=entity_status_data.entity %}
<div class="col-3">
- {% if request.view_parameters.is_editing %}
- <a href="{% url 'entity_details' entity_id=entity.id %}"
- data-async="true">
- {{ entity.name }}
- </a>
- {% else %}
- <a href="{% url 'entity_status' entity_id=entity.id %}"
- data-async="true">
- {{ entity.name }}
- </a>
- {% endif %}
+ <div class="d-flex justify-content-start">
+ <div class="display-only-svg-icon pr-2">
+ {% include "entity/panes/entity_display_only_svg_icon.html" with svg_icon_item=entity_status_data.display_only_svg_icon_item %}
+ </div>
+ <div>
+ {% if request.view_parameters.is_editing %}
+ <a href="{% url 'entity_details' entity_id=entity.id %}"
+ data-async="true">
+ {{ entity.name }}
+ </a>
+ {% else %}
+ <a href="{% url 'entity_status' entity_id=entity.id %}"
+ data-async="true">
+ {{ entity.name }}
+ </a>
+ {% endif %}
+ </div>
+ </div>
</div>
{% endwith %}
diff --git a/src/hi/apps/entity/templates/entity/svg/type.disk.svg b/src/hi/apps/entity/templates/entity/svg/type.disk.svg
new file mode 100644
index 00000000..d959dae4
--- /dev/null
+++ b/src/hi/apps/entity/templates/entity/svg/type.disk.svg
@@ -0,0 +1,191 @@
+<rect class="hi-entity-bg" x="0" y="0" width="51" height="64" fill="none"/>
+ <path class="hi-entity-disk-background"
+ fill="#d0d0d0" stroke="black" stroke-width="0"
+ d="M 4.07,0.87
+ C 4.07,0.87 8.25,0.87 8.25,0.87
+ 8.25,0.87 16.01,0.87 16.01,0.87
+ 16.01,0.87 39.67,0.87 39.67,0.87
+ 39.67,0.87 46.20,0.87 46.20,0.87
+ 48.57,0.86 50.01,2.30 50.01,4.66
+ 50.01,4.66 50.01,49.66 50.01,49.66
+ 50.01,49.66 50.01,59.34 50.01,59.34
+ 50.01,61.70 48.57,63.14 46.20,63.14
+ 46.20,63.14 11.58,63.14 11.58,63.14
+ 11.58,63.14 5.05,63.14 5.05,63.14
+ 2.63,63.14 1.24,61.75 1.23,59.34
+ 1.23,59.34 1.23,14.96 1.23,14.96
+ 1.23,14.96 1.23,4.66 1.23,4.66
+ 1.23,2.72 2.10,1.38 4.07,0.87 Z" />
+ <path class="hi-entity-disk-platter"
+ fill="#f0f0f0" stroke="black" stroke-width="0"
+ d="M 25.01,7.75
+ C 25.01,7.75 25.99,7.75 25.99,7.75
+ 32.03,7.72 37.44,11.12 40.24,16.43
+ 41.08,18.02 41.75,20.16 41.97,21.95
+ 41.97,21.95 42.10,23.42 42.10,23.42
+ 42.18,24.16 42.09,24.44 42.03,25.13
+ 41.83,27.15 41.60,28.65 40.74,30.53
+ 40.53,30.97 39.90,32.57 39.29,32.35
+ 38.98,32.24 38.21,31.41 37.94,31.14
+ 37.09,30.29 35.54,28.57 34.49,28.14
+ 31.87,27.05 29.05,29.74 30.02,32.37
+ 30.43,33.46 32.14,34.93 33.01,35.80
+ 33.32,36.10 34.19,36.89 34.28,37.27
+ 34.43,37.95 33.02,38.48 32.52,38.71
+ 30.54,39.61 27.92,40.12 25.75,40.09
+ 25.75,40.09 24.51,39.98 24.51,39.98
+ 20.23,39.64 16.30,37.82 13.46,34.57
+ 11.38,32.19 9.74,28.32 9.73,25.13
+ 9.73,25.13 9.73,22.44 9.73,22.44
+ 9.76,20.10 10.97,16.77 12.26,14.84
+ 14.45,11.55 17.51,9.43 21.31,8.39
+ 22.54,8.05 23.76,7.95 25.01,7.75 Z" />
+ <path class="hi-entity-disk-head"
+ fill="#f0f0c0" stroke="black" stroke-width="0"
+ d="M 32.89,29.86
+ C 34.11,29.67 34.82,30.73 35.60,31.51
+ 35.60,31.51 41.61,37.52 41.61,37.52
+ 42.27,38.33 42.15,39.70 41.02,40.02
+ 39.87,40.34 39.02,39.21 38.31,38.50
+ 38.31,38.50 32.30,32.49 32.30,32.49
+ 31.47,31.50 31.63,30.35 32.89,29.86 Z" />
+ <path class="hi-entity-disk-label"
+ fill="#fcfcfe" stroke="black" stroke-width="0"
+ d="M 16.83,48.92
+ C 17.27,48.74 17.76,48.80 18.23,48.80
+ 18.23,48.80 20.94,48.80 20.94,48.80
+ 20.94,48.80 30.55,48.80 30.55,48.80
+ 30.55,48.80 33.38,48.80 33.38,48.80
+ 33.61,48.80 33.99,48.78 34.17,48.92
+ 34.42,49.11 34.37,49.62 34.37,49.90
+ 34.37,49.90 34.37,51.74 34.37,51.74
+ 34.36,51.98 34.38,52.31 34.17,52.47
+ 33.98,52.63 33.51,52.60 33.26,52.60
+ 33.26,52.60 20.57,52.60 20.57,52.60
+ 20.57,52.60 17.62,52.60 17.62,52.60
+ 17.39,52.60 17.01,52.62 16.83,52.47
+ 16.58,52.28 16.63,51.78 16.63,51.49
+ 16.63,50.86 16.48,49.40 16.83,48.92 Z" />
+ <path class="hi-entity-disk-lines"
+ fill="#020204" stroke="black" stroke-width="0"
+ d="M 3.70,0.68
+ C 3.70,0.68 7.88,0.61 7.88,0.61
+ 7.88,0.61 15.64,0.61 15.64,0.61
+ 15.64,0.61 39.79,0.61 39.79,0.61
+ 39.79,0.61 46.57,0.61 46.57,0.61
+ 48.82,0.62 50.26,2.05 50.26,4.29
+ 50.26,4.29 50.26,49.66 50.26,49.66
+ 50.26,49.66 50.26,59.71 50.26,59.71
+ 50.26,60.10 50.27,60.43 50.16,60.81
+ 49.68,62.52 48.29,63.38 46.57,63.39
+ 46.57,63.39 11.58,63.39 11.58,63.39
+ 11.58,63.39 4.68,63.39 4.68,63.39
+ 2.44,63.38 0.99,61.94 0.99,59.71
+ 0.99,59.71 0.99,14.96 0.99,14.96
+ 0.99,14.96 0.99,4.29 0.99,4.29
+ 0.99,2.45 1.90,1.21 3.70,0.68 Z
+ M 4.80,3.07
+ C 3.61,3.34 3.46,3.89 3.45,5.03
+ 3.45,5.03 3.45,9.56 3.45,9.56
+ 3.45,9.56 3.45,30.04 3.45,30.04
+ 3.45,30.04 3.45,53.70 3.45,53.70
+ 3.45,53.70 3.45,58.97 3.45,58.97
+ 3.46,59.47 3.50,60.14 3.87,60.51
+ 4.30,60.94 5.10,60.93 5.67,60.93
+ 5.67,60.93 24.88,60.93 24.88,60.93
+ 24.88,60.93 42.38,60.93 42.38,60.93
+ 42.38,60.93 45.83,60.93 45.83,60.93
+ 46.35,60.93 46.96,60.89 47.36,60.50
+ 47.81,60.05 47.80,59.32 47.80,58.73
+ 47.80,58.73 47.80,16.06 47.80,16.06
+ 47.80,16.06 47.80,5.15 47.80,5.15
+ 47.79,3.37 47.30,3.07 45.58,3.07
+ 45.58,3.07 18.60,3.07 18.60,3.07
+ 18.60,3.07 9.61,3.07 9.61,3.07
+ 9.61,3.07 4.80,3.07 4.80,3.07 Z
+ M 6.54,5.62
+ C 6.98,5.50 7.58,5.43 7.97,5.73
+ 8.60,6.22 8.51,7.53 7.75,7.86
+ 6.16,8.56 5.16,6.47 6.54,5.62 Z
+ M 23.65,5.54
+ C 23.65,5.54 27.35,5.54 27.35,5.54
+ 28.67,5.53 30.41,5.92 31.66,6.33
+ 36.52,7.95 40.44,11.41 42.59,16.06
+ 44.10,19.35 44.39,21.70 44.35,25.26
+ 44.33,26.93 43.68,29.49 43.01,31.02
+ 43.01,31.02 41.65,33.72 41.65,33.72
+ 41.53,34.15 41.85,34.41 42.13,34.70
+ 42.70,35.29 43.32,35.84 43.78,36.54
+ 44.87,38.19 44.41,40.65 42.74,41.74
+ 41.90,42.30 41.37,42.31 40.41,42.30
+ 38.93,42.28 38.32,41.69 37.33,40.70
+ 36.96,40.34 36.29,39.46 35.72,39.61
+ 35.72,39.61 34.00,40.55 34.00,40.55
+ 33.05,41.01 31.69,41.52 30.67,41.79
+ 25.33,43.21 19.39,42.02 14.91,38.81
+ 12.41,37.03 10.19,34.42 8.91,31.63
+ 5.73,24.72 7.29,16.16 12.69,10.79
+ 15.77,7.72 19.41,6.21 23.65,5.54 Z
+ M 43.98,5.61
+ C 44.46,5.49 45.01,5.44 45.41,5.82
+ 46.12,6.48 45.85,7.85 44.72,7.96
+ 43.18,8.11 42.67,6.33 43.98,5.61 Z
+ M 39.54,32.12
+ C 40.09,30.99 40.65,30.04 41.05,28.81
+ 42.19,25.31 41.97,21.43 40.60,18.02
+ 39.83,16.11 38.51,14.11 37.07,12.63
+ 31.46,6.90 22.01,6.59 15.77,11.48
+ 15.22,11.92 14.29,12.84 13.81,13.36
+ 12.94,14.31 12.25,15.41 11.67,16.55
+ 8.26,23.35 10.01,32.32 16.38,36.78
+ 19.03,38.63 22.86,39.87 26.12,39.76
+ 29.41,39.64 31.21,39.05 34.12,37.52
+ 33.10,36.09 30.42,34.11 29.80,32.74
+ 28.54,29.95 31.31,26.86 34.25,27.71
+ 36.21,28.29 37.85,30.92 39.54,32.12 Z
+ M 24.88,20.29
+ C 25.32,20.22 25.68,20.23 26.12,20.23
+ 29.30,20.27 30.64,24.23 28.65,26.47
+ 27.82,27.40 26.80,27.60 25.62,27.59
+ 25.09,27.58 24.77,27.53 24.27,27.33
+ 21.25,26.10 21.23,21.27 24.88,20.29 Z
+ M 25.50,22.86
+ C 23.99,23.48 24.82,25.28 26.12,24.97
+ 26.98,24.77 27.23,23.68 26.58,23.09
+ 26.24,22.78 25.92,22.80 25.50,22.86 Z
+ M 32.89,30.22
+ C 31.91,30.66 31.91,31.48 32.55,32.25
+ 32.55,32.25 38.43,38.13 38.43,38.13
+ 39.05,38.74 39.93,39.92 40.90,39.69
+ 41.52,39.54 41.89,38.85 41.67,38.25
+ 41.56,37.96 41.35,37.74 41.14,37.52
+ 41.14,37.52 35.48,31.88 35.48,31.88
+ 34.75,31.16 34.02,30.05 32.89,30.22 Z
+ M 15.28,46.55
+ C 15.28,46.55 20.82,46.47 20.82,46.47
+ 20.82,46.47 31.91,46.47 31.91,46.47
+ 31.91,46.47 34.99,46.47 34.99,46.47
+ 35.54,46.47 36.02,46.51 36.40,46.97
+ 36.74,47.40 36.71,47.92 36.71,48.43
+ 36.71,48.43 36.71,53.09 36.71,53.09
+ 36.71,53.56 36.71,54.02 36.38,54.41
+ 36.01,54.85 35.51,54.80 34.99,54.80
+ 34.99,54.80 19.22,54.80 19.22,54.80
+ 19.22,54.80 15.89,54.80 15.89,54.80
+ 15.42,54.80 15.05,54.78 14.71,54.41
+ 14.37,54.03 14.41,53.56 14.41,53.09
+ 14.41,53.09 14.41,48.06 14.41,48.06
+ 14.42,47.25 14.48,46.90 15.28,46.55 Z
+ M 34.12,49.04
+ C 34.12,49.04 17.00,49.04 17.00,49.04
+ 17.00,49.04 17.00,52.35 17.00,52.35
+ 17.00,52.35 34.12,52.35 34.12,52.35
+ 34.12,52.35 34.12,49.04 34.12,49.04 Z
+ M 6.54,56.14
+ C 7.04,55.99 7.66,55.95 8.06,56.35
+ 8.59,56.88 8.47,58.06 7.75,58.38
+ 6.16,59.08 5.16,56.99 6.54,56.14 Z
+ M 43.98,56.12
+ C 44.46,56.00 45.01,55.96 45.41,56.33
+ 46.12,56.99 45.85,58.36 44.72,58.47
+ 43.18,58.62 42.67,56.84 43.98,56.12 Z" />
diff --git a/src/hi/apps/entity/templates/entity/svg/type.printer.svg b/src/hi/apps/entity/templates/entity/svg/type.printer.svg
new file mode 100644
index 00000000..7ef1b4f5
--- /dev/null
+++ b/src/hi/apps/entity/templates/entity/svg/type.printer.svg
@@ -0,0 +1,136 @@
+<rect class="hi-entity-bg" x="0" y="0" width="64" height="64" fill="none"/>
+ <path class="hi-entity-printer-slots"
+ fill="#c0c0c0" stroke="black" stroke-width="0"
+ d="M 51.20,38.34
+ C 52.25,37.89 57.49,37.64 58.36,38.34
+ 58.93,38.78 58.98,39.82 58.88,40.48
+ 58.77,41.23 58.55,41.61 57.80,41.89
+ 57.39,41.95 56.50,41.94 56.05,41.89
+ 53.87,41.96 50.17,42.78 50.68,39.43
+ 50.79,38.70 50.83,38.85 51.20,38.34 Z
+ M 7.76,48.82
+ C 9.28,48.20 11.07,48.45 12.66,48.45
+ 12.66,48.45 21.33,48.45 21.33,48.45
+ 21.33,48.45 53.15,48.45 53.15,48.45
+ 53.87,48.45 55.25,48.37 55.83,48.82
+ 56.51,49.36 56.87,52.56 56.18,53.14
+ 55.64,53.60 54.20,53.51 53.51,53.51
+ 53.51,53.51 16.99,53.51 16.99,53.51
+ 16.99,53.51 10.12,53.51 10.12,53.51
+ 9.52,53.51 8.23,53.56 7.76,53.30
+ 6.52,52.69 7.20,49.67 7.76,48.82 Z" />
+ <path class="hi-entity-printer-paper"
+ fill="#ffffff" stroke="black" stroke-width="0"
+ d="M 16.49,6.52
+ C 18.12,5.82 22.27,6.15 24.23,6.15
+ 24.23,6.15 41.22,6.15 41.22,6.15
+ 42.44,6.15 46.64,5.82 47.36,6.72
+ 47.81,7.30 47.73,8.68 47.73,9.40
+ 47.73,9.40 47.73,29.29 47.73,29.29
+ 47.73,30.55 48.06,35.07 47.15,35.79
+ 46.58,36.24 45.19,36.16 44.47,36.16
+ 44.47,36.16 23.14,36.16 23.14,36.16
+ 21.85,36.16 17.00,36.50 16.28,35.58
+ 15.82,35.01 15.91,33.62 15.91,32.90
+ 15.91,32.90 15.91,14.10 15.91,14.10
+ 15.91,12.22 15.47,7.94 16.49,6.52 Z
+ M 43.75,11.93
+ C 43.75,11.93 19.89,11.93 19.89,11.93
+ 19.89,11.93 19.89,12.66 19.89,12.66
+ 19.89,12.66 43.75,12.66 43.75,12.66
+ 43.75,12.66 43.75,11.93 43.75,11.93 Z
+ M 43.75,17.36
+ C 43.75,17.36 19.89,17.36 19.89,17.36
+ 19.89,17.36 19.89,18.08 19.89,18.08
+ 19.89,18.08 43.75,18.08 43.75,18.08
+ 43.75,18.08 43.75,17.36 43.75,17.36 Z
+ M 43.75,22.78
+ C 43.75,22.78 26.03,22.42 26.03,22.42
+ 24.19,22.42 21.03,21.86 19.89,23.50
+ 19.89,23.50 43.75,23.50 43.75,23.50
+ 43.75,23.50 43.75,22.78 43.75,22.78 Z
+ M 43.75,27.84
+ C 43.75,27.84 19.89,27.84 19.89,27.84
+ 19.89,27.84 19.89,28.56 19.89,28.56
+ 19.89,28.56 43.75,28.56 43.75,28.56
+ 43.75,28.56 43.75,27.84 43.75,27.84 Z" />
+ <path class="hi-entity-printer-lines"
+ fill="#f0f0e0" stroke="black" stroke-width="1"
+ d="M 14.82,4.70
+ C 14.82,4.70 48.81,4.70 48.81,4.70
+ 48.81,4.70 48.81,35.44 48.81,35.44
+ 48.81,35.44 51.34,35.44 51.34,35.44
+ 51.34,35.44 51.34,28.93 51.34,28.93
+ 53.00,28.93 58.43,28.72 59.65,29.24
+ 60.49,29.60 61.16,30.27 61.52,31.11
+ 61.88,31.96 61.83,33.07 61.83,33.99
+ 61.83,33.99 61.83,55.32 61.83,55.32
+ 61.81,59.67 60.02,60.38 56.05,60.38
+ 56.05,60.38 14.46,60.38 14.46,60.38
+ 12.52,60.38 5.73,60.60 4.34,60.06
+ 3.43,59.71 2.69,59.08 2.23,58.21
+ 1.73,57.25 1.81,56.02 1.81,54.96
+ 1.81,54.96 1.81,36.88 1.81,36.88
+ 1.81,34.76 1.32,31.37 3.02,29.86
+ 4.67,28.37 10.02,28.93 12.29,28.93
+ 12.29,28.93 12.29,35.44 12.29,35.44
+ 12.29,35.44 14.82,35.44 14.82,35.44
+ 14.82,35.44 14.82,4.70 14.82,4.70 Z
+ M 47.01,6.87
+ C 47.01,6.87 16.63,6.87 16.63,6.87
+ 16.63,6.87 16.63,35.44 16.63,35.44
+ 16.63,35.44 47.01,35.44 47.01,35.44
+ 47.01,35.44 47.01,6.87 47.01,6.87 Z
+ M 58.21,38.69
+ C 58.21,38.69 51.34,38.69 51.34,38.69
+ 51.34,38.69 51.34,41.22 51.34,41.22
+ 51.34,41.22 58.21,41.22 58.21,41.22
+ 58.21,41.22 58.21,38.69 58.21,38.69 Z
+ M 56.05,52.79
+ C 56.05,52.79 55.67,49.75 55.67,49.75
+ 55.67,49.75 52.79,49.18 52.79,49.18
+ 52.79,49.18 46.64,49.18 46.64,49.18
+ 46.64,49.18 17.72,49.18 17.72,49.18
+ 17.72,49.18 10.49,49.18 10.49,49.18
+ 10.49,49.18 7.97,49.74 7.97,49.74
+ 7.97,49.74 7.59,52.79 7.59,52.79
+ 7.59,52.79 56.05,52.79 56.05,52.79 Z" />
+ <path class="hi-entity-printer-text"
+ fill="#020204" stroke="black" stroke-width="0"
+ d="M 19.16,11.21
+ C 19.16,11.21 44.47,11.21 44.47,11.21
+ 44.47,11.21 44.47,13.38 44.47,13.38
+ 44.47,13.38 19.16,13.38 19.16,13.38
+ 19.16,13.38 19.16,11.21 19.16,11.21 Z
+ M 19.16,16.63
+ C 19.16,16.63 44.47,16.63 44.47,16.63
+ 44.47,16.63 44.47,18.80 44.47,18.80
+ 44.47,18.80 19.16,18.80 19.16,18.80
+ 19.16,18.80 19.16,16.63 19.16,16.63 Z
+ M 19.16,21.69
+ C 19.16,21.69 44.47,21.69 44.47,21.69
+ 44.47,21.69 44.47,24.23 44.47,24.23
+ 44.47,24.23 19.16,24.23 19.16,24.23
+ 19.16,24.23 19.16,21.69 19.16,21.69 Z
+ M 19.89,22.06
+ C 19.89,22.06 19.53,22.06 19.53,22.06
+ 19.53,22.06 19.89,22.42 19.89,22.42
+ 19.89,22.42 19.89,22.06 19.89,22.06 Z
+ M 44.11,22.06
+ C 44.11,22.06 43.75,22.06 43.75,22.06
+ 43.75,22.06 44.11,22.42 44.11,22.42
+ 44.11,22.42 44.11,22.06 44.11,22.06 Z
+ M 19.89,23.50
+ C 19.89,23.50 19.53,23.50 19.53,23.50
+ 19.53,23.50 19.89,23.86 19.89,23.86
+ 19.89,23.86 19.89,23.50 19.89,23.50 Z
+ M 44.11,23.50
+ C 44.11,23.50 43.75,23.50 43.75,23.50
+ 43.75,23.50 44.11,23.86 44.11,23.86
+ 44.11,23.86 44.11,23.50 44.11,23.50 Z
+ M 19.16,27.12
+ C 19.16,27.12 44.47,27.12 44.47,27.12
+ 44.47,27.12 44.11,29.65 44.11,29.65
+ 44.11,29.65 31.82,29.29 31.82,29.29
+ 31.82,29.29 19.53,29.65 19.53,29.65
+ 19.53,29.65 19.16,27.12 19.16,27.12 Z" />
diff --git a/src/hi/apps/entity/templates/entity/svg/type.server.svg b/src/hi/apps/entity/templates/entity/svg/type.server.svg
new file mode 100644
index 00000000..26b5badf
--- /dev/null
+++ b/src/hi/apps/entity/templates/entity/svg/type.server.svg
@@ -0,0 +1,215 @@
+<rect class="hi-entity-bg" x="0" y="0" width="45" height="64" fill="none"/>
+ <path class="hi-entity-server-background"
+ fill="#404060" stroke="black" stroke-width="0"
+ d="M 3.11,1.91
+ C 3.11,1.91 6.74,1.91 6.74,1.91
+ 6.74,1.91 13.56,1.91 13.56,1.91
+ 13.56,1.91 34.55,1.91 34.55,1.91
+ 34.55,1.91 40.94,1.91 40.94,1.91
+ 42.83,1.90 43.79,3.10 43.79,4.92
+ 43.79,4.92 43.79,48.73 43.79,48.73
+ 43.79,48.73 43.79,56.93 43.79,56.93
+ 43.78,58.11 43.31,59.17 42.15,59.65
+ 41.46,59.93 40.96,59.85 40.25,59.86
+ 40.03,59.86 39.78,59.86 39.65,60.06
+ 39.52,60.26 39.56,60.90 39.56,61.15
+ 39.54,61.94 39.19,61.93 38.52,61.93
+ 38.52,61.93 34.64,61.93 34.64,61.93
+ 34.39,61.93 34.08,61.96 33.88,61.79
+ 33.32,61.33 33.89,60.16 33.33,59.91
+ 33.19,59.85 32.89,59.86 32.74,59.86
+ 32.74,59.86 12.01,59.86 12.01,59.86
+ 11.85,59.86 11.56,59.85 11.41,59.91
+ 10.85,60.16 11.42,61.33 10.86,61.79
+ 10.66,61.96 10.35,61.93 10.11,61.92
+ 10.11,61.92 6.22,61.92 6.22,61.92
+ 6.22,61.92 5.70,61.92 5.70,61.92
+ 4.74,61.73 5.47,60.42 5.04,60.00
+ 4.84,59.79 4.09,59.86 3.80,59.86
+ 1.80,59.85 0.95,58.53 0.95,56.67
+ 0.95,56.67 0.95,15.01 0.95,15.01
+ 0.95,15.01 0.95,5.00 0.95,5.00
+ 0.95,3.47 1.51,2.32 3.11,1.91 Z" />
+ <path class="hi-entity-server-lines"
+ fill="#a0a0b0" stroke="black" stroke-width="0"
+ d="M 5.01,60.03
+ C 3.38,60.03 1.58,60.05 0.99,58.13
+ 0.87,57.73 0.86,57.51 0.86,57.10
+ 0.86,57.10 0.86,33.64 0.86,33.64
+ 0.86,33.64 0.86,9.14 0.86,9.14
+ 0.86,9.14 0.86,5.69 0.86,5.69
+ 0.86,5.69 0.86,4.40 0.86,4.40
+ 0.88,3.21 1.62,2.21 2.76,1.86
+ 3.18,1.74 3.46,1.73 3.89,1.73
+ 3.89,1.73 20.82,1.73 20.82,1.73
+ 20.82,1.73 38.52,1.73 38.52,1.73
+ 38.52,1.73 40.25,1.73 40.25,1.73
+ 40.25,1.73 41.55,1.73 41.55,1.73
+ 42.57,1.90 43.38,2.57 43.73,3.54
+ 43.88,3.96 43.88,4.13 43.88,4.57
+ 43.88,4.57 43.88,47.09 43.88,47.09
+ 43.88,47.09 43.88,55.46 43.88,55.46
+ 43.88,56.74 44.11,58.14 43.16,59.16
+ 42.25,60.14 40.95,60.03 39.73,60.03
+ 39.73,61.04 40.05,62.09 38.69,62.10
+ 38.69,62.10 35.33,62.10 35.33,62.10
+ 34.94,62.10 34.19,62.16 33.87,61.98
+ 33.49,61.77 33.51,61.44 33.51,61.07
+ 33.51,61.07 33.51,60.03 33.51,60.03
+ 33.51,60.03 11.23,60.03 11.23,60.03
+ 11.23,60.03 11.23,61.15 11.23,61.15
+ 11.22,61.94 10.95,62.09 10.19,62.10
+ 10.19,62.10 6.13,62.10 6.13,62.10
+ 5.79,62.10 5.40,62.10 5.16,61.81
+ 4.92,61.52 5.01,60.44 5.01,60.03 Z
+ M 5.53,5.87
+ C 5.33,5.99 5.23,6.01 5.11,6.22
+ 4.94,6.52 5.01,8.02 5.01,8.45
+ 5.01,8.45 5.01,14.32 5.01,14.32
+ 5.01,14.87 4.83,15.99 5.45,16.24
+ 5.63,16.31 5.93,16.30 6.13,16.30
+ 6.13,16.30 31.96,16.30 31.96,16.30
+ 31.96,16.30 37.74,16.30 37.74,16.30
+ 38.30,16.30 39.42,16.48 39.67,15.87
+ 39.74,15.68 39.73,15.38 39.73,15.18
+ 39.73,15.18 39.73,8.11 39.73,8.11
+ 39.73,7.56 39.91,6.27 39.38,5.97
+ 39.16,5.85 38.85,5.87 38.61,5.87
+ 38.61,5.87 16.50,5.87 16.50,5.87
+ 16.50,5.87 9.24,5.87 9.24,5.87
+ 9.24,5.87 5.53,5.87 5.53,5.87 Z
+ M 5.53,19.07
+ C 5.33,19.18 5.23,19.21 5.11,19.42
+ 4.94,19.72 5.01,21.22 5.01,21.65
+ 5.01,21.65 5.01,28.38 5.01,28.38
+ 5.01,29.39 5.24,29.50 6.22,29.50
+ 6.22,29.50 31.96,29.50 31.96,29.50
+ 31.96,29.50 37.74,29.50 37.74,29.50
+ 38.30,29.50 39.42,29.68 39.67,29.06
+ 39.74,28.88 39.73,28.58 39.73,28.38
+ 39.73,28.38 39.73,21.30 39.73,21.30
+ 39.73,20.76 39.91,19.47 39.38,19.16
+ 39.16,19.04 38.85,19.06 38.61,19.07
+ 38.61,19.07 16.50,19.07 16.50,19.07
+ 16.50,19.07 9.24,19.07 9.24,19.07
+ 9.24,19.07 5.53,19.07 5.53,19.07 Z
+ M 5.53,32.27
+ C 5.33,32.38 5.23,32.41 5.11,32.61
+ 4.94,32.91 5.01,34.41 5.01,34.85
+ 5.01,34.85 5.01,41.57 5.01,41.57
+ 5.01,42.56 5.27,42.69 6.22,42.70
+ 6.22,42.70 31.96,42.70 31.96,42.70
+ 31.96,42.70 38.52,42.70 38.52,42.70
+ 39.50,42.69 39.73,42.57 39.73,41.57
+ 39.73,41.57 39.73,34.50 39.73,34.50
+ 39.73,34.00 39.88,32.71 39.46,32.41
+ 39.22,32.23 38.89,32.26 38.61,32.27
+ 38.61,32.27 16.50,32.27 16.50,32.27
+ 16.50,32.27 9.24,32.27 9.24,32.27
+ 9.24,32.27 5.53,32.27 5.53,32.27 Z
+ M 5.53,45.46
+ C 5.33,45.58 5.23,45.60 5.11,45.81
+ 4.94,46.11 5.01,47.69 5.01,48.13
+ 5.01,48.13 5.01,54.77 5.01,54.77
+ 5.01,55.81 5.33,55.89 6.31,55.89
+ 6.31,55.89 31.96,55.89 31.96,55.89
+ 31.96,55.89 38.52,55.89 38.52,55.89
+ 39.49,55.89 39.73,55.75 39.73,54.77
+ 39.73,54.77 39.73,47.70 39.73,47.70
+ 39.73,47.19 39.88,45.91 39.46,45.61
+ 39.22,45.43 38.89,45.46 38.61,45.46
+ 38.61,45.46 16.50,45.46 16.50,45.46
+ 16.50,45.46 9.24,45.46 9.24,45.46
+ 9.24,45.46 5.53,45.46 5.53,45.46 Z" />
+ <path class="hi-entity-server-slots"
+ fill="#a0a0b0" stroke="black" stroke-width="0"
+ d="M 26.27,9.81
+ C 26.75,9.69 28.26,9.75 28.85,9.75
+ 28.85,9.75 34.03,9.75 34.03,9.75
+ 34.58,9.75 35.87,9.56 36.17,10.10
+ 36.29,10.31 36.28,10.63 36.28,10.87
+ 36.28,11.14 36.30,11.76 36.21,11.99
+ 35.97,12.60 35.18,12.51 34.64,12.51
+ 34.64,12.51 27.29,12.51 27.29,12.51
+ 26.96,12.51 26.38,12.51 26.12,12.28
+ 25.76,11.97 25.73,10.59 25.91,10.18
+ 26.01,9.96 26.07,9.93 26.27,9.81 Z
+ M 26.43,22.91
+ C 26.43,22.91 29.37,22.86 29.37,22.86
+ 29.37,22.86 34.98,22.86 34.98,22.86
+ 35.90,22.86 36.27,22.97 36.28,23.98
+ 36.28,24.52 36.43,25.39 35.76,25.60
+ 35.60,25.62 35.32,25.62 35.15,25.60
+ 35.15,25.60 26.95,25.60 26.95,25.60
+ 26.64,25.62 26.28,25.65 26.04,25.41
+ 25.80,25.16 25.83,24.73 25.83,24.41
+ 25.82,23.76 25.72,23.20 26.43,22.91 Z
+ M 26.35,36.12
+ C 26.86,35.99 28.64,36.05 29.28,36.05
+ 29.28,36.05 35.07,36.05 35.07,36.05
+ 36.05,36.06 36.27,36.29 36.28,37.26
+ 36.28,37.74 36.39,38.53 35.84,38.75
+ 35.66,38.83 35.35,38.81 35.15,38.81
+ 35.15,38.81 26.95,38.81 26.95,38.81
+ 26.68,38.81 26.34,38.84 26.12,38.66
+ 25.83,38.42 25.83,37.95 25.83,37.61
+ 25.82,36.98 25.72,36.47 26.35,36.12 Z
+ M 26.35,49.31
+ C 26.86,49.19 28.64,49.25 29.28,49.25
+ 29.28,49.25 35.07,49.25 35.07,49.25
+ 35.97,49.25 36.27,49.42 36.28,50.37
+ 36.28,50.87 36.40,51.72 35.84,51.95
+ 35.66,52.02 35.35,52.01 35.15,52.01
+ 35.15,52.01 26.95,52.01 26.95,52.01
+ 26.64,52.01 26.35,52.04 26.11,51.81
+ 25.74,51.46 25.73,50.12 25.95,49.69
+ 26.06,49.46 26.14,49.43 26.35,49.31 Z" />
+ <path class="hi-entity-server-lights"
+ fill="blue" stroke="black" stroke-width="0"
+ d="M 8.47,10.15
+ C 8.84,10.07 9.17,10.07 9.49,10.32
+ 10.12,10.82 9.91,12.17 8.72,12.07
+ 7.65,11.97 7.43,10.60 8.47,10.15 Z
+ M 12.61,10.15
+ C 12.91,10.09 13.19,10.06 13.47,10.20
+ 14.35,10.64 14.11,12.19 12.87,12.07
+ 11.94,11.98 11.55,10.66 12.61,10.15 Z
+ M 16.84,10.14
+ C 17.12,10.09 17.35,10.06 17.62,10.19
+ 18.54,10.60 18.36,12.20 17.02,12.07
+ 16.05,11.97 15.74,10.58 16.84,10.14 Z
+ M 8.46,23.34
+ C 8.83,23.27 9.19,23.24 9.49,23.50
+ 10.01,23.93 9.99,24.96 9.16,25.22
+ 7.89,25.61 7.19,23.89 8.46,23.34 Z
+ M 12.61,23.34
+ C 13.02,23.26 13.39,23.25 13.71,23.57
+ 14.23,24.08 14.02,25.02 13.30,25.22
+ 12.05,25.58 11.43,23.87 12.61,23.34 Z
+ M 16.76,23.35
+ C 17.16,23.25 17.62,23.26 17.93,23.58
+ 18.40,24.08 18.18,24.99 17.53,25.21
+ 16.33,25.63 15.53,24.01 16.76,23.35 Z
+ M 8.38,36.55
+ C 8.75,36.46 9.18,36.43 9.49,36.69
+ 10.02,37.14 9.95,38.09 9.24,38.38
+ 8.07,38.87 7.14,37.23 8.38,36.55 Z
+ M 12.53,36.56
+ C 12.90,36.46 13.32,36.43 13.64,36.69
+ 14.17,37.13 14.13,38.08 13.39,38.38
+ 12.22,38.86 11.36,37.22 12.53,36.56 Z
+ M 16.76,36.55
+ C 17.12,36.46 17.56,36.43 17.86,36.69
+ 18.43,37.19 18.23,38.13 17.53,38.39
+ 16.33,38.85 15.53,37.13 16.76,36.55 Z
+ M 8.64,49.64
+ C 10.06,49.53 10.23,51.38 9.07,51.63
+ 7.81,51.91 7.16,50.09 8.64,49.64 Z
+ M 12.87,49.64
+ C 13.18,49.63 13.46,49.67 13.70,49.89
+ 14.38,50.54 13.86,51.77 12.87,51.65
+ 11.80,51.51 11.54,49.93 12.87,49.64 Z
+ M 17.02,49.64
+ C 17.37,49.63 17.68,49.69 17.93,49.96
+ 18.49,50.57 18.09,51.56 17.27,51.65
+ 16.04,51.78 15.61,49.97 17.02,49.64 Z" />
diff --git a/src/hi/apps/location/svg_item_factory.py b/src/hi/apps/location/svg_item_factory.py
index 49e2871f..1dd8082d 100644
--- a/src/hi/apps/location/svg_item_factory.py
+++ b/src/hi/apps/location/svg_item_factory.py
@@ -21,6 +21,22 @@ class SvgItemFactory( Singleton ):
def __init_singleton__(self):
return
+ def get_display_only_svg_icon_item( self, entity : Entity ) -> SvgIconItem:
+ template_name = EntityStyle.get_svg_icon_template_name( entity_type = entity.entity_type )
+ svg_view_box = EntityStyle.get_svg_icon_viewbox( entity_type = entity.entity_type )
+
+ return SvgIconItem(
+ html_id = None,
+ css_class = None,
+ status_value = None,
+ position_x = None,
+ position_y = None,
+ rotate = None,
+ scale = None ,
+ template_name = template_name,
+ bounding_box = svg_view_box,
+ )
+
def create_svg_icon_item( self,
item : LocationItemModelMixin,
position : LocationItemPositionModel,
diff --git a/src/hi/apps/monitor/transient_models.py b/src/hi/apps/monitor/transient_models.py
index 5f0935ad..846f5955 100644
--- a/src/hi/apps/monitor/transient_models.py
+++ b/src/hi/apps/monitor/transient_models.py
@@ -2,6 +2,7 @@ from dataclasses import dataclass
from typing import List
from hi.apps.control.transient_models import ControllerData
+from hi.apps.common.svg_models import SvgIconItem
from hi.apps.entity.models import Entity, EntityState
from hi.apps.sense.transient_models import SensorResponse
@@ -23,6 +24,7 @@ class EntityStateStatusData:
class EntityStatusData:
entity : Entity
entity_state_status_data_list : List[ EntityStateStatusData ]
+ display_only_svg_icon_item : SvgIconItem = None
def to_template_context(self):
context = {
diff --git a/src/hi/hi_styles.py b/src/hi/hi_styles.py
index 57fdb0ed..99a9647e 100644
--- a/src/hi/hi_styles.py
+++ b/src/hi/hi_styles.py
@@ -223,6 +223,7 @@ class EntityStyle:
EntityType.CONSUMABLE,
EntityType.CONTROLLER,
EntityType.COOKTOP,
+ EntityType.DISK,
EntityType.DOOR_LOCK,
EntityType.ELECTRICAL_OUTLET,
EntityType.ELECTRICITY_METER,
@@ -246,8 +247,10 @@ class EntityStyle:
EntityType.PLANT,
EntityType.POOL_FILTER,
EntityType.PRESENCE_SENSOR,
+ EntityType.PRINTER,
EntityType.PUMP,
EntityType.REFRIGERATOR,
+ EntityType.SERVER,
EntityType.SERVICE,
EntityType.SHOWER,
EntityType.SINK,
@@ -273,6 +276,7 @@ class EntityStyle:
EntityType.AUTOMOBILE: SvgViewBox( x = 0, y = 0, width = 200, height = 300 ),
EntityType.BAROMETER: SvgViewBox( x = 0, y = 0, width = 44, height = 64 ),
EntityType.CONTROLLER: SvgViewBox( x = 0, y = 0, width = 47, height = 64 ),
+ EntityType.DISK: SvgViewBox( x = 0, y = 0, width = 51, height = 64 ),
EntityType.ELECTRICAL_OUTLET: SvgViewBox( x = 0, y = 0, width = 45, height = 64 ),
EntityType.HUMIDIFIER: SvgViewBox( x = 0, y = 0, width = 44, height = 64 ),
EntityType.HVAC_AIR_HANDLER: SvgViewBox( x = 0, y = 0, width = 64, height = 44 ),
@@ -283,6 +287,7 @@ class EntityStyle:
EntityType.OPEN_CLOSE_SENSOR: SvgViewBox( x = 0, y = 0, width = 64, height = 50 ),
EntityType.PUMP: SvgViewBox( x = 0, y = 0, width = 64, height = 45 ),
EntityType.REFRIGERATOR: SvgViewBox( x = 0, y = 0, width = 48, height = 64 ),
+ EntityType.SERVER: SvgViewBox( x = 0, y = 0, width = 45, height = 64 ),
EntityType.SINK: SvgViewBox( x = 0, y = 0, width = 64, height = 50 ),
EntityType.SPRINKLER_HEAD: SvgViewBox( x = 0, y = 0, width = 64, height = 44 ),
EntityType.TELEVISION: SvgViewBox( x = 0, y = 0, width = 64, height = 48 ),
diff --git a/src/hi/static/css/main.css b/src/hi/static/css/main.css
index 04dff900..7c8e302e 100644
--- a/src/hi/static/css/main.css
+++ b/src/hi/static/css/main.css
@@ -302,24 +302,19 @@ div[status="on"] {
}
g[status="open"] {
- outline: 5px solid var(--status-active-color);
- filter: drop-shadow(0 0 5px var(--status-active-color));
+ filter: drop-shadow(0 0 5px var(--status-bad-color));
}
g[status="connected"] {
- outline: 5px solid var(--status-ok-color);
filter: drop-shadow(0 0 5px var(--status-ok-color));
}
g[status="disconnected"] {
- outline: 5px solid var(--status-active-color);
- filter: drop-shadow(0 0 5px var(--status-active-color));
+ filter: drop-shadow(0 0 5px var(--status-bad-color));
}
g[status="high"] {
- outline: 5px solid var(--status-ok-color);
filter: drop-shadow(0 0 5px var(--status-ok-color));
}
g[status="low"] {
- outline: 5px solid var(--status-active-color);
- filter: drop-shadow(0 0 5px var(--status-active-color));
+ filter: drop-shadow(0 0 5px var(--status-bad-color));
}
div[status="active"] {
@@ -367,6 +362,11 @@ g[hover] {
filter: drop-shadow(0 0 10px var(--status-hover-color)) !important;
}
+.display-only-svg-icon {
+ width: 2rem;
+ height: auto;
+}
+
.switch {
position: relative;
display: inline-block;