irie 0.0.5__py3-none-any.whl → 0.0.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of irie might be problematic. Click here for more details.

Files changed (61) hide show
  1. irie/apps/config.py +0 -1
  2. irie/apps/evaluation/identification.py +1 -1
  3. irie/apps/evaluation/models.py +3 -3
  4. irie/apps/evaluation/views.py +3 -3
  5. irie/apps/events/admin.py +2 -2
  6. irie/apps/events/migrations/0002_rename_event_eventrecord.py +19 -0
  7. irie/apps/events/migrations/0003_hazardevent.py +21 -0
  8. irie/apps/events/models.py +55 -5
  9. irie/apps/events/views.py +48 -3
  10. irie/apps/events/views_events.py +6 -10
  11. irie/apps/inventory/filters.py +37 -0
  12. irie/apps/inventory/models.py +7 -0
  13. irie/apps/inventory/urls.py +1 -0
  14. irie/apps/inventory/views.py +134 -227
  15. irie/apps/prediction/forms.py +4 -8
  16. irie/apps/prediction/metrics.py +0 -2
  17. irie/apps/prediction/migrations/0002_alter_predictormodel_protocol.py +18 -0
  18. irie/apps/prediction/models.py +4 -4
  19. irie/apps/prediction/predictor.py +18 -12
  20. irie/apps/prediction/runners/__init__.py +3 -398
  21. irie/apps/prediction/runners/hazus.py +579 -0
  22. irie/apps/prediction/runners/opensees/__init__.py +395 -0
  23. irie/apps/prediction/runners/{utilities.py → opensees/utilities.py} +7 -7
  24. irie/apps/prediction/runners/ssid.py +414 -0
  25. irie/apps/prediction/urls.py +1 -1
  26. irie/apps/prediction/views.py +45 -22
  27. irie/apps/site/view_sdof.py +2 -2
  28. irie/apps/templates/admin/base_site.html +3 -1
  29. irie/apps/templates/css/admin-extra.css +7 -0
  30. irie/apps/templates/includes/sidebar.html +17 -14
  31. irie/apps/templates/inventory/asset-event-summary.html +3 -2
  32. irie/apps/templates/inventory/asset-profile.html +126 -38
  33. irie/apps/templates/inventory/asset-table.html +191 -135
  34. irie/apps/templates/inventory/dashboard.html +105 -27
  35. irie/apps/templates/inventory/preamble.tex +131 -0
  36. irie/apps/templates/inventory/report.tex +59 -0
  37. irie/apps/templates/networks/corridor_table.html +2 -2
  38. irie/apps/templates/networks/networks.html +164 -0
  39. irie/apps/templates/prediction/asset-predictors.html +6 -6
  40. irie/apps/templates/prediction/form-submission.html +3 -3
  41. irie/apps/templates/prediction/hazus/event.html +33 -0
  42. irie/apps/templates/prediction/hazus/history.html +1 -0
  43. irie/apps/templates/prediction/hazus/history.js +44 -0
  44. irie/apps/templates/prediction/{new-predictor.html → new-runner.html} +12 -8
  45. irie/apps/templates/site/index.html +29 -47
  46. irie/core/urls.py +7 -2
  47. irie/init/__main__.py +2 -0
  48. irie/init/bridges.py +5 -3
  49. irie/init/management/commands/init_assets.py +24 -45
  50. irie/init/management/commands/init_corridors.py +3 -6
  51. irie/init/management/commands/init_predictors.py +23 -8
  52. irie/post/__main__.py +88 -0
  53. {irie-0.0.5.dist-info → irie-0.0.6.dist-info}/METADATA +5 -3
  54. {irie-0.0.5.dist-info → irie-0.0.6.dist-info}/RECORD +61 -47
  55. /irie/apps/prediction/runners/{metrics.py → opensees/metrics.py} +0 -0
  56. /irie/apps/prediction/runners/{xmlutils.py → opensees/xmlutils.py} +0 -0
  57. /irie/apps/prediction/runners/{zipped.py → opensees/zipped.py} +0 -0
  58. /irie/init/data/{04.tar → nbi/04.tar} +0 -0
  59. {irie-0.0.5.dist-info → irie-0.0.6.dist-info}/WHEEL +0 -0
  60. {irie-0.0.5.dist-info → irie-0.0.6.dist-info}/entry_points.txt +0 -0
  61. {irie-0.0.5.dist-info → irie-0.0.6.dist-info}/top_level.txt +0 -0
@@ -20,9 +20,10 @@
20
20
  <div class="py-4 align-right">
21
21
  <a role="button" class="button btn btn-outline-primary"
22
22
  href="/inventory/{{ asset.calid }}" class="me-1">Structure Profile</a>
23
- {% comment %}
23
+
24
24
  {% include 'includes/modal-report.html' with event_summaries=event_summaries %}
25
- {% endcomment %}
25
+ {% comment %}
26
+ {% endcomment %}
26
27
  </div>
27
28
 
28
29
  {# BRIDGE RENDER #}
@@ -3,6 +3,12 @@
3
3
  {% block title %} {{ asset.calid }} {% endblock %}
4
4
 
5
5
  {% block stylesheets %}
6
+ {% if asset.rendering %}
7
+ <!-- <meta name="viewport" content="width=device-width, initial-scale=1.0"> -->
8
+ <!-- <script src="https://unpkg.com/three@0.152.0/build/three.min.js"></script> -->
9
+ <script type="module" src="https://ajax.googleapis.com/ajax/libs/model-viewer/4.0.0/model-viewer.min.js"></script>
10
+ <!-- <script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"></script> -->
11
+ {% endif %}
6
12
  <style>
7
13
  @media print {
8
14
  @page {
@@ -91,22 +97,75 @@
91
97
  stroke: #61DAFB;
92
98
  }
93
99
  </style>
100
+
101
+ <script src="https://cdn.plot.ly/plotly-2.27.0.min.js" charset="utf-8"></script>
94
102
  {% endblock stylesheets %}
95
103
 
96
104
  {% block content %}
97
105
  <div class="print">
98
- <h1 class="fs-2 lh-2 me-3"><code>{{ asset.calid }}</code> {{ asset.name }}</h1>
99
- <span id="structureProfile" class="fs-2 lh-2 me-3">Structure Profile</span>
100
-
106
+ <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center py-4">
107
+ <div class="d-block mb-4 mb-md-0">
108
+ <nav aria-label="breadcrumb" class="d-none d-md-inline-block">
109
+ <ol class="breadcrumb breadcrumb-dark breadcrumb-transparent">
110
+ <li class="breadcrumb-item">
111
+ <a href="/">
112
+ <svg class="icon icon-xxs" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"></path></svg>
113
+ </a>
114
+ </li>
115
+ <li class="breadcrumb-item"><a href="{% url 'dashboard' %}">BRACE<sup>2</sup></a></li>
116
+ <li class="breadcrumb-item" aria-current="page">Inventory</li>
117
+ <li class="breadcrumb-item active"><code>{{ asset.calid }}</code></li>
118
+ </ol>
119
+ </nav>
120
+ <h2 class="h4">{{ asset.name }}</h2>
121
+ </div>
122
+ <div class="btn-toolbar mb-2 mb-md-0">
123
+ <a role="button"
124
+ href="/inventory/{{ asset.calid }}/predictors/"
125
+ class="btn btn-sm btn-gray-800 d-inline-flex align-items-center">
126
+ <svg class="icon icon-xs me-2" fill="none"
127
+ stroke="currentColor" viewBox="0 0 24 24"
128
+ xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path></svg>
129
+ Predictors
130
+ </a>
131
+ </div>
132
+ </div>
133
+ <!-- <h1 class="fs-2 lh-2 me-3"></h1> -->
134
+ <!-- <span id="structureProfile" class="fs-2 lh-2 me-3">Structure Profile</span> -->
135
+ <!--
101
136
  <div class="py-4 align-right">
102
137
  <a role="button" class="button btn btn-outline-primary"
103
138
  href="/inventory/{{ asset.calid }}/predictors/" class="me-1">Configure Predictors</a>
104
139
  </div>
105
-
106
- {% if asset.cesmd %}
140
+ -->
141
+
107
142
  {# BRIDGE RENDERING #}
108
- <details id="asset-sensors" open><summary><h3>Sensor Layout</h3></summary>
109
- <div id="rendering" class="row">
143
+ <details id="asset-sensors" open><summary><h3>Geometry</h3></summary>
144
+ {% if asset.rendering %}
145
+ <div id="rendering" class="row">
146
+ <div class="col-10 mb-4">
147
+ <div class="card h-100 bg-white-100 border-0 shadow">
148
+ <div class="card-header d-sm-flex flex-row align-items-center flex-0">
149
+ </div>
150
+ <div class="card-body align-items-center">
151
+ <model-viewer
152
+ id="viewer"
153
+ src="{{ asset.rendering }}"
154
+ alt="3D Model"
155
+ auto-rotate
156
+ camera-controls
157
+ interaction-prompt="none"
158
+ camera-orbit="0deg 75deg 2m"
159
+ field-of-view="30deg"
160
+ style="width: 100%; height: 400px;">
161
+ </model-viewer>
162
+ </div>
163
+ </div>
164
+ </div>
165
+ </div>
166
+ {% endif %}
167
+ {% if asset.cesmd %}
168
+ <div id="sensors" class="row">
110
169
  <div class="col-10 mb-4">
111
170
  <div class="card h-100 bg-white-100 border-0 shadow">
112
171
  <div class="card-header d-sm-flex flex-row align-items-center flex-0">
@@ -117,18 +176,44 @@
117
176
  </div>
118
177
  </div>
119
178
  </div>
120
- </details>
121
179
  {% endif %}
180
+ </details>
181
+
122
182
 
123
183
  {% if asset.cesmd %}
124
- <details id="event-table" open><summary><h3>Event History</h3></summary>
125
- <div class="row">
184
+ <details id="event-table" open><summary><h3>Health History</h3></summary>
185
+
186
+ <div class="row">
187
+ <div class="col-10 mb-4">
188
+ <div class="card bg-white-100 border-0 shadow table-wrapper table-responsive">
189
+ {% include 'includes/asset-event-table.html' with evaluations=evaluations %}
190
+ </div>
191
+ </div>
192
+ </div>
193
+
194
+ {# Hazus #}
195
+ <div class="row">
126
196
  <div class="col-10 mb-4">
127
- <div class="card bg-white-100 border-0 shadow table-wrapper table-responsive">
128
- {% include 'includes/asset-event-table.html' with evaluations=evaluations %}
197
+ <div class="card bg-white-100 border-0 shadow ">
198
+ <div class="card-header">
199
+ <h4>Hazus Fragility</h4>
200
+ </div>
201
+ <div class="card-body">
202
+ {% include "prediction/hazus/history.html" with hazus=hazus %}
203
+ </div>
129
204
  </div>
130
205
  </div>
131
- </div>
206
+ </div>
207
+
208
+ {% if mountains %}
209
+ <div class="col-10 card bg-white-100 border-0 shadow mt-4">
210
+ <div class="card-body">
211
+ <h4>Mountains</h4>
212
+ <img src="data:image/jpeg;base64,{{ mountains }}" alt="Fragility Curve" style="max-width: 100%; height: auto;">
213
+ </div>
214
+ </div>
215
+ {% endif %}
216
+
132
217
  </details>
133
218
  <hr>
134
219
  {% endif %}
@@ -139,31 +224,31 @@
139
224
  <details open><summary><h3>Structure Details</h3></summary>
140
225
 
141
226
  <div class="row">
142
- <div class="col-10 mb-4">
143
- {% for table in tables %}
144
- <div class="card bg-white-100 border-0 shadow table-wrapper table-responsive">
145
- <div class="card card-body shadow table-wrapper table-responsive">
146
- <table class="table table-hover" style="display: block;">
147
- <caption>{{asset.calid}} Table {{forloop.counter}}</caption>
148
- {# <thead><tr><th>Key</th> <th>Value</th></tr></thead> #}
149
- <tbody>
150
- {# <tr><td><b>CESMD</b></td><td>{{ asset_data.cesmd }}</td></tr> #}
151
- {% for key,val in table.items %}
152
- {% if val %}
153
- <tr>
154
- <th scope="row" style="text-align:left; width:40%;">{{ key }}</th>
155
- <!-- The inline style here ensures that
156
- there are line breaks in rows with long text -->
157
- <td style="width: 60%; white-space: normal !important;word-wrap: break-word;">{{ val }}</td>
158
- </tr>
159
- {% endif %}
160
- {% endfor %}
161
- </tbody>
162
- </table>
163
- </div>
227
+ <div class="col-10 mb-4">
228
+ {% for table in tables %}
229
+ <div class="card bg-white-100 border-0 shadow table-wrapper table-responsive">
230
+ <div class="card card-body shadow table-wrapper table-responsive">
231
+ <table class="table table-hover" style="display: block;">
232
+ <caption>{{asset.calid}} Table {{forloop.counter}}</caption>
233
+ {# <thead><tr><th>Key</th> <th>Value</th></tr></thead> #}
234
+ <tbody>
235
+ {# <tr><td><b>CESMD</b></td><td>{{ asset_data.cesmd }}</td></tr> #}
236
+ {% for key,val in table.items %}
237
+ {% if val %}
238
+ <tr>
239
+ <th scope="row" style="text-align:left; width:40%;">{{ key }}</th>
240
+ <!-- The inline style here ensures that
241
+ there are line breaks in rows with long text -->
242
+ <td style="width: 60%; white-space: normal !important;word-wrap: break-word;">{{ val }}</td>
243
+ </tr>
244
+ {% endif %}
245
+ {% endfor %}
246
+ </tbody>
247
+ </table>
164
248
  </div>
165
- <br>
166
- {% endfor %}
249
+ </div>
250
+ <br>
251
+ {% endfor %}
167
252
  </div>
168
253
  </details>
169
254
 
@@ -201,6 +286,10 @@
201
286
  };
202
287
  }
203
288
  </script>
289
+
290
+ <script>
291
+ {% include "prediction/hazus/history.js" %}
292
+ </script>
204
293
  <script type="text/javascript">
205
294
  function printTables() {
206
295
  var myWindow = window.open('','','width=200,height=100')
@@ -208,5 +297,4 @@
208
297
  myWindow.print();
209
298
  }
210
299
  </script>
211
-
212
300
  {% endblock javascripts %}
@@ -3,6 +3,8 @@
3
3
  {% block title %} Inventory {% endblock %}
4
4
 
5
5
  {% block stylesheets %}
6
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
7
+
6
8
  <style>
7
9
  table a[href^="http"]::after,
8
10
  table a[href^="https://"]::after
@@ -22,170 +24,224 @@ table a[href^="https://"]::after
22
24
 
23
25
  {% block content %}
24
26
  <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center py-4">
25
- <div class="d-block mb-4 mb-md-0">
26
- <nav aria-label="breadcrumb" class="d-none d-md-inline-block">
27
- <ol class="breadcrumb breadcrumb-dark breadcrumb-transparent">
28
- <li class="breadcrumb-item">
29
- <a href="/">
30
- <svg class="icon icon-xxs" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"></path></svg>
31
- </a>
32
- </li>
33
- <li class="breadcrumb-item"><a href="{% url 'dashboard' %}">BRACE2</a></li>
34
- <li class="breadcrumb-item active" aria-current="page">Inventory</li>
35
- </ol>
36
- </nav>
37
- <h2 class="h4">All Assets</h2>
38
- </div>
39
- <div class="btn-toolbar mb-2 mb-md-0">
40
- <!-- <a href="#" class="btn btn-sm btn-gray-800 d-inline-flex align-items-center">
41
- <svg class="icon icon-xs me-2" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path></svg>
42
- New Plan
43
- </a> -->
27
+ <div class="d-block mb-4 mb-md-0">
28
+ <nav aria-label="breadcrumb" class="d-none d-md-inline-block">
29
+ <ol class="breadcrumb breadcrumb-dark breadcrumb-transparent">
30
+ <li class="breadcrumb-item">
31
+ <a href="/">
32
+ <svg class="icon icon-xxs" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"></path></svg>
33
+ </a>
34
+ </li>
35
+ <li class="breadcrumb-item"><a href="{% url 'dashboard' %}">BRACE<sup>2</sup></a></li>
36
+ <li class="breadcrumb-item active" aria-current="page">Inventory</li>
37
+ </ol>
38
+ </nav>
39
+ <h2 class="h4">Inventory</h2>
40
+ </div>
41
+ </div>
44
42
 
45
- <div class="btn-group ms-2 ms-lg-3">
46
- <!-- <button type="button" class="btn btn-sm btn-outline-gray-600">Share</button> -->
47
- <span class="d-inline-block" tabindex="0" data-bs-toggle="tooltip" data-bs-placement="left" title="Disabled">
48
- <button type="button" class="btn btn-sm btn-outline-gray-600 style="pointer-events: none;" disabled>Export</button>
49
- </span>
50
- <!-- <span class="d-inline-block" tabindex="0" data-bs-toggle="tooltip" title="Disabled tooltip">
51
- <button class="btn btn-primary" style="pointer-events: none;" type="button" disabled>Export</button>
52
- </span> -->
43
+ {# Content #}
44
+ <div class="row">
45
+ <div class="col-xl-4">
46
+ {# #}
47
+ <div class="card border-0 shadow">
48
+ <div class="card-header">
49
+ <div class="row align-items-center">
50
+ <div class="col">
51
+ <h2 class="fs-5 fw-bold mb-0">Search</h2>
52
+ </div>
53
+ </div>
53
54
  </div>
54
- </div>
55
- </div>
56
- <div class="row">
57
- <div class="col-12 my-4">
58
- <div class="card bg-white-100 border-0 shadow">
59
- <!-- <div class="card-header d-sm-flex flex-row align-items-center flex-0">
60
- <div class="d-block mb-3 mb-sm-0">
61
- <div class="fs-5 fw-normal mb-2">Inventory Map</div>
55
+
56
+ <div class="card card-body border-0 shadow table-wrapper table-responsive">
57
+ <form method="get" class="row g-3 mb-4">
58
+ <!-- Search Field -->
59
+ <div class="input-group mb-3">
60
+ <span class="input-group-text">
61
+ <svg class="icon icon-xs" x-description="Heroicon name: solid/search" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
62
+ <path fill-rule="evenodd" d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" clip-rule="evenodd"></path>
63
+ </svg>
64
+ </span>
65
+ <button type="button" class="btn input-group-text btn-outline dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
66
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-caret-down-fill" viewBox="0 0 16 16">
67
+ <path d="M7.247 11.14l-4.796-5.481C2.014 5.334 2.482 4.5 3.25 4.5h9.5c.768 0 1.236.835.799 1.159l-4.796 5.481a1 1 0 0 1-1.506 0z"/>
68
+ </svg>
69
+ <span class="visually-hidden">Toggle Dropdown</span>
70
+ </button>
71
+ <ul class="dropdown-menu">
72
+ <li><a class="dropdown-item" href="#">Include fields:</a></li>
73
+ <li><hr class="dropdown-divider"></li>
74
+ <li><div class="form-check form-switch">
75
+ <input class="form-check-input" type="checkbox" role="switch" id="flexSwitchCheckDefault">
76
+ <label class="form-check-label" for="flexSwitchCheckDefault">ID</label>
77
+ </div></li>
78
+ <li><div class="form-check form-switch">
79
+ <input class="form-check-input" type="checkbox" role="switch" id="flexSwitchCheckChecked" checked>
80
+ <label class="form-check-label" for="flexSwitchCheckChecked">Name</label>
81
+ </div></li>
82
+ <li><div class="form-check form-switch">
83
+ <input class="form-check-input" type="checkbox" role="switch" id="flexSwitchCheckDisabled" >
84
+ <label class="form-check-label" for="flexSwitchCheckDisabled">District</label>
85
+ </div></li>
86
+ </ul>
87
+ <input
88
+ id="search"
89
+ name="search"
90
+ type="text"
91
+ class="form-control"
92
+ value="{{ filter.form.search.value|default_if_none:'' }}"
93
+ placeholder="Search assets"
94
+ >
95
+ </div>
96
+
97
+ <!-- CESMD Not Null Checkbox -->
98
+ <div class="col-12">
99
+ <div class="form-check">
100
+ <input
101
+ type="checkbox"
102
+ name="cesmd_not_null"
103
+ id="cesmd_not_null"
104
+ class="form-check-input"
105
+ {% if filter.form.cesmd_not_null.value %}checked{% endif %}>
106
+ <label for="cesmd_not_null" class="form-check-label">
107
+ {{ filter.form.cesmd_not_null.label }}
108
+ </label>
62
109
  </div>
63
- </div> -->
64
- <div class="card-body p-2">
65
- {{ asset_map|safe }}
66
- </div>
67
110
  </div>
68
- </div>
69
- </div>
70
-
71
- <div class="table-settings mb-4">
72
- <div class="row align-items-center justify-content-between">
73
- <div class="col col-md-6 col-lg-3 col-xl-4">
74
- <span class="d-inline-block" tabindex="0" data-bs-toggle="tooltip" data-bs-placement="right" title="Disabled">
75
- <div class="input-group me-2 me-lg-3 fmxw-400">
76
- <span class="input-group-text">
77
- <svg class="icon icon-xs" x-description="Heroicon name: solid/search" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
78
- <path fill-rule="evenodd" d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" clip-rule="evenodd"></path>
79
- </svg>
80
- </span>
81
- <input disabled type="text" class="form-control" placeholder="Search assets">
111
+
112
+ {# Is Complete Checkbox #}
113
+ <div class="col-12">
114
+ <div class="form-check">
115
+ <input
116
+ type="checkbox"
117
+ name="is_complete"
118
+ id="is_complete"
119
+ class="form-check-input"
120
+ {% if filter.form.is_complete.value %}checked{% endif %}>
121
+ <label for="is_complete" class="form-check-label">
122
+ {{ filter.form.is_complete.label }}
123
+ </label>
124
+ </div>
82
125
  </div>
83
- </span>
84
- </div>
85
- <!-- <div class="col-4 col-md-2 col-xl-1 ps-md-0 text-end">
86
- <div class="dropdown">
87
- <button class="btn btn-link text-dark dropdown-toggle dropdown-toggle-split m-0 p-1" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
88
- <svg class="icon icon-sm" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z" clip-rule="evenodd"></path></svg>
89
- <span class="visually-hidden">Toggle Dropdown</span>
126
+
127
+ {# Buttons #}
128
+ <div class="col-12 d-flex justify-content-between">
129
+ <button type="submit" class="btn btn-primary">
130
+ <i class="bi bi-search"></i> Apply
90
131
  </button>
91
- <div class="dropdown-menu dropdown-menu-xs dropdown-menu-end pb-0">
92
- <span class="small ps-3 fw-bold text-dark">Show</span>
93
- <a class="dropdown-item d-flex align-items-center fw-bold" href="#">10 <svg class="icon icon-xxs ms-auto" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"></path></svg></a>
94
- <a class="dropdown-item fw-bold" href="#">20</a>
95
- <a class="dropdown-item fw-bold rounded-bottom" href="#">30</a>
96
- </div>
97
- </div> -->
132
+ <a href="{% url 'asset_table' %}" class="btn btn-gray-800">
133
+ <i class="bi bi-x-circle"></i> Reset
134
+ </a>
135
+ </div>
136
+ </form>
137
+ </div>
138
+ </div>
139
+ </div>
140
+ <div class="col-xl-8">
141
+ <div class="card bg-white-100 border-0 shadow">
142
+ <!--
143
+ <div class="card-header d-sm-flex flex-row align-items-center flex-0">
144
+ <div class="d-block mb-3 mb-sm-0">
145
+ <div class="fs-5 fw-normal mb-2">Inventory Map</div>
98
146
  </div>
147
+ </div>
148
+ -->
149
+ <div class="card-body p-2">
150
+ {{ asset_map|safe }}
151
+ </div>
99
152
  </div>
153
+ </div>
100
154
  </div>
101
-
102
- <div class="card card-body border-0 shadow table-wrapper table-responsive">
103
- <table class="table table-hover">
104
- <thead>
105
- <tr>
106
- <th><span
107
- title="Structure Number is an alphanumeric sequence assigned by each State to uniquely identify the structure within each State.">
108
- CALID
109
- </span></th>
110
- <th>CESMD</th>
111
- <th>Name</th>
112
- {% if false %}
113
- <th>Source code</th>
114
- {% endif %}
115
- </tr>
116
- </thead>
117
- <tbody>
118
- {% for v in bridges %}
119
- <tr>
120
- <td><code>{{ v.calid.split|first }}</code></td>
121
155
 
122
- <td><a target="_blank"
123
- href="https://www.strongmotioncenter.org/cgi-bin/CESMD/stationhtml.pl?stationID={{ v.cesmd }}&netword=CGS">
124
- <code>{{ v.cesmd }}</code></a></td>
156
+ <div class="card my-4">
157
+ <div class="card-body border-0 shadow table-wrapper table-responsive">
158
+ <table class="table table-hover">
159
+ <thead>
160
+ <tr>
161
+ <th><span
162
+ title="Structure Number is an alphanumeric sequence assigned by each State to uniquely identify the structure within each State.">
163
+ CALID
164
+ </span></th>
165
+ <th>CESMD</th>
166
+ <th>Name</th>
167
+ </tr>
168
+ </thead>
169
+ <tbody>
170
+ {% for v in bridges %}
171
+ <tr>
172
+ <td><code>{{ v.calid.split|first }}</code></td>
125
173
 
126
- {% if v.name %}
127
- <td> <a href="{% url 'asset_profile' calid=v.calid %}" >{{ v.name }}</a></td>
128
- {% else %}
129
- <td> <a href="{% url 'asset_profile' calid=v.calid %}" >{{ v.calid }}</a></td>
130
- {% endif %}
174
+ <td><a target="_blank"
175
+ href="https://www.strongmotioncenter.org/cgi-bin/CESMD/stationhtml.pl?stationID={{ v.cesmd }}&netword=CGS">
176
+ <code>{{ v.cesmd }}</code></a></td>
131
177
 
132
- {% if False %}
133
- <td><code>{{ v.total_length.split|first }}</code></td>
134
- <td><code>{{ v.no_of_spans }}</code></td>
135
- {% endif %}
178
+ {% if v.name %}
179
+ <td> <a href="{% url 'asset_profile' calid=v.calid %}" >{{ v.name }}</a></td>
180
+ {% else %}
181
+ <td> <a href="{% url 'asset_profile' calid=v.calid %}" >{{ v.calid }}</a></td>
182
+ {% endif %}
136
183
 
137
- </tr>
138
- {% endfor %}
139
- </tbody>
140
- </table>
184
+ </tr>
185
+ {% endfor %}
186
+ </tbody>
187
+ </table>
188
+ </div>
141
189
 
142
- <div class="card-footer px-3 border-0 d-flex flex-column flex-lg-row align-items-center justify-content-between">
143
- <nav aria-label="Page navigation example">
144
- <ul class="pagination mb-0">
145
- <li class="page-item {% if not bridges.has_previous %}disabled{% endif %}">
190
+ <div class="card-footer px-3 border-0 d-flex flex-column flex-lg-row align-items-center justify-content-between">
191
+ <nav aria-label="Page navigation example">
192
+ <ul class="pagination mb-0">
193
+ <li class="page-item {% if not bridges.has_previous %}disabled{% endif %}">
146
194
  {% if bridges.has_previous %}
147
- <a class="page-link" href="?page={{ bridges.previous_page_number }}/">Previous</a>
195
+ <a class="page-link" href="?page={{ bridges.previous_page_number }}&{{ query_string }}">Previous</a>
148
196
  {% else %}
149
197
  <a class="page-link disabled" href="#">Previous</a>
150
198
  {% endif %}
151
199
  </li>
152
200
  {% for page in bridges.paginator.page_range %}
153
- {% if page <= bridges.number|add:3 and page >= bridges.number|add:-3 %}
154
- <li class="page-item {% if page == bridges.number %}active{% endif %}">
155
- <a class="page-link" href="?page={{ page }}">{{ page }}</a>
156
- </li>
157
- {% endif %}
201
+ {% if page <= bridges.number|add:3 and page >= bridges.number|add:-3 %}
202
+ <li class="page-item {% if page == bridges.number %}active{% endif %}">
203
+ <a class="page-link" href="?page={{ page }}&{{ query_string }}">{{ page }}</a>
204
+ </li>
205
+ {% endif %}
158
206
  {% endfor %}
159
207
  <li class="page-item {% if not bridges.has_next %}disabled{% endif %}">
160
208
  {% if bridges.has_next %}
161
- <a class="page-link" href="?page={{ bridges.next_page_number }}/">Next</a>
209
+ <a class="page-link" href="?page={{ bridges.next_page_number }}&{{ query_string }}">Next</a>
162
210
  {% else %}
163
211
  <a class="page-link disabled" href="#">Next</a>
164
212
  {% endif %}
165
213
  </li>
166
- </ul>
167
- </nav>
168
- <div class="fw-normal small mt-4 mt-lg-0">Showing <b>{{ bridges|length }}</b> out of <b>{{ bridges.paginator.count }}</b> entries</div>
169
- </div>
170
- {% comment %}
171
- <div class="card-footer px-3 border-0 d-flex flex-column flex-lg-row align-items-center justify-content-between">
172
- <nav aria-label="Page navigation example">
173
- <ul class="pagination mb-0">
174
- <li class="page-item disabled" >
175
- <a class="page-link" href="#">Previous</a>
176
- </li>
177
- <li class="page-item disabled">
178
- <a class="page-link" href="#">1</a>
179
- </li>
180
- <li class="page-item disabled" style="pointer-events: none;">
181
- <a class="page-link" href="#">Next</a>
182
- </li>
214
+
215
+
216
+ {% if False %}
217
+ <li class="page-item {% if not bridges.has_previous %}disabled{% endif %}">
218
+ {% if bridges.has_previous %}
219
+ <a class="page-link" href="?page={{ bridges.previous_page_number }}/">Previous</a>
220
+ {% else %}
221
+ <a class="page-link disabled" href="#">Previous</a>
222
+ {% endif %}
223
+ </li>
224
+ {% for page in bridges.paginator.page_range %}
225
+ {% if page <= bridges.number|add:3 and page >= bridges.number|add:-3 %}
226
+ <li class="page-item {% if page == bridges.number %}active{% endif %}">
227
+ <a class="page-link" href="?page={{ page }}">{{ page }}</a>
228
+ </li>
229
+ {% endif %}
230
+ {% endfor %}
231
+ <li class="page-item {% if not bridges.has_next %}disabled{% endif %}">
232
+ {% if bridges.has_next %}
233
+ <a class="page-link" href="?page={{ bridges.next_page_number }}/">Next</a>
234
+ {% else %}
235
+ <a class="page-link disabled" href="#">Next</a>
236
+ {% endif %}
237
+ </li>
238
+ {% endif %}
183
239
  </ul>
184
- </nav>
185
- <div class="fw-normal small mt-4 mt-lg-0">Showing <b>{{ bridges|length }}</b> out of <b>{{ bridges|length }}</b> entries</div>
186
- </div>
240
+ </nav>
241
+ <div class="fw-normal small mt-4 mt-lg-0">Showing <b>{{ bridges|length }}</b> out of <b>{{ bridges.paginator.count }}</b> entries</div>
187
242
  </div>
188
- {% endcomment %}
243
+ </div>
244
+
189
245
  {% endblock content %}
190
246
 
191
247
  {% block javascripts %}