irie 0.0.58__py3-none-any.whl → 0.0.60__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 (35) hide show
  1. irie/apps/evaluation/models.py +7 -0
  2. irie/apps/events/views_events.py +2 -2
  3. irie/apps/inventory/migrations/0009_datum_angle_x_datum_angle_y.py +23 -0
  4. irie/apps/inventory/models.py +1 -1
  5. irie/apps/inventory/views.py +10 -4
  6. irie/apps/prediction/forms/csi_upload.py +68 -0
  7. irie/apps/prediction/migrations/0007_remove_sensorassignment_orient_x_and_more.py +25 -0
  8. irie/apps/prediction/runners/__init__.py +6 -4
  9. irie/apps/prediction/runners/opensees/__init__.py +49 -14
  10. irie/apps/prediction/urls.py +6 -4
  11. irie/apps/prediction/views.py +248 -17
  12. irie/apps/static/assets/css/brace.css +1 -1
  13. irie/apps/static/assets/css/brace.css.map +1 -1
  14. irie/apps/static/assets/css/brace.min.css +1 -1
  15. irie/apps/static/assets/js/brace.js +101 -42
  16. irie/apps/templates/includes/footer.html +1 -1
  17. irie/apps/templates/inventory/asset-event-summary.html +7 -0
  18. irie/apps/templates/inventory/asset-on-map.html +22 -22
  19. irie/apps/templates/inventory/asset-on-map.js +115 -113
  20. irie/apps/templates/inventory/create-datum.html +44 -0
  21. irie/apps/templates/inventory/sensor-upload.html +22 -22
  22. irie/apps/templates/layouts/base.html +3 -3
  23. irie/apps/templates/prediction/create-model.html +32 -37
  24. irie/apps/templates/prediction/upload/confirm.html +93 -0
  25. irie/apps/templates/prediction/upload/step.html +119 -0
  26. irie/apps/templates/prediction/veux/navigator.html +54 -38
  27. irie/apps/templates/prediction/veux/navigator.js +222 -154
  28. irie/apps/templates/prediction/xara-profile.html +7 -3
  29. irie/core/settings.py +1 -0
  30. {irie-0.0.58.dist-info → irie-0.0.60.dist-info}/METADATA +7 -6
  31. {irie-0.0.58.dist-info → irie-0.0.60.dist-info}/RECORD +35 -29
  32. /irie/apps/prediction/{forms.py → forms/__init__.py} +0 -0
  33. {irie-0.0.58.dist-info → irie-0.0.60.dist-info}/WHEEL +0 -0
  34. {irie-0.0.58.dist-info → irie-0.0.60.dist-info}/entry_points.txt +0 -0
  35. {irie-0.0.58.dist-info → irie-0.0.60.dist-info}/top_level.txt +0 -0
@@ -1,13 +1,4 @@
1
1
  {% extends "layouts/base.html" %}
2
- {% comment %}
3
- <!--
4
- ===----------------------------------------------------------------------===#
5
-
6
- STAIRLab -- STructural Artificial Intelligence Laboratory
7
-
8
- ===----------------------------------------------------------------------===#
9
- -->
10
- {% endcomment}
11
2
 
12
3
  {% block title %} {{ asset.calid }} | Upload {% endblock %}
13
4
 
@@ -47,23 +38,45 @@
47
38
  </div>
48
39
  </div>
49
40
 
50
- <div class="row">
51
- <div class="col">
52
- <form method="POST" enctype="multipart/form-data">
53
- {% csrf_token %}
54
- {{ form.as_p}}
55
- <button id="render" type="button" class="btn btn-outline-primary" >Render</button>
56
- <button type="submit" class="btn btn-primary" name="action" value="commit">Submit</button>
57
- </form>
41
+ <div class="row align-right">
42
+ <div class="col-md-4">
43
+ <div class="card bg-white-100 border-1 rounded-0 shadow">
44
+ <div class="card-header">
45
+ <h3 class="mb-0">Sensors</h3>
46
+ </div>
47
+ <div class="card-body">
48
+ <ul class="list-group">
49
+ <li class="list-group-item active" aria-current="true">Datum</li>
50
+ <li class="list-group-item">Structure</li>
51
+ <li class="list-group-item">Sensors</li>
52
+ <li class="list-group-item">Submit</li>
53
+ </ul>
54
+ </div>
55
+ </div>
56
+ </div>
57
+
58
+ <div class="col-md-8">
59
+ <div class="card bg-white-100 border-1 rounded-0 shadow">
60
+ <div class="card-body">
61
+ <div class="col">
62
+ <form method="POST" enctype="multipart/form-data">
63
+ {% csrf_token %}
64
+ {{ form.as_p}}
65
+ <button id="render" type="button" class="btn btn-outline-primary" >Render</button>
66
+ <button type="submit" class="btn btn-primary" name="action" value="commit">Submit</button>
67
+ </form>
68
+ </div>
69
+ </div>
70
+ </div>
58
71
  </div>
59
72
  </div>
60
73
 
74
+
75
+
61
76
  {% if navigator %}
62
77
  {% include "prediction/veux/navigator.html" with members=navigator.members sections=navigator.sections %}
63
78
  {% endif %}
64
79
 
65
- {% if error %}
66
- {% endif %}
67
80
  <div class="row">
68
81
  <iframe
69
82
  id="map"
@@ -76,24 +89,6 @@
76
89
  {% endblock content %}
77
90
 
78
91
  {% block javascripts %}
79
- {% if navigator %}
80
- <script>
81
-
82
- {% include "prediction/veux/navigator.js" %}
83
-
84
- const VIEWER = new VeuxNavigator(`/inventory/{{asset.calid}}/predictors/{{predictor.id}}/render/?section=`,
85
- document.querySelector('#tab-link-container'),
86
- document.getElementById('tab-content-container'));
87
-
88
- function handleMemberSelection(elem) {
89
- VIEWER.select(elem);
90
- }
91
-
92
- document.addEventListener('DOMContentLoaded', function () {
93
- VIEWER.initTabs('tab1', '.tab-link');
94
- });
95
- </script>
96
- {% endif %}
97
92
 
98
93
  <script>
99
94
  const button = document.getElementById('render');
@@ -0,0 +1,93 @@
1
+ {% extends "layouts/base.html" %}
2
+
3
+ {% block title %} {{ asset.calid }} | Upload {% endblock %}
4
+
5
+ {% block stylesheets %}
6
+ {% endblock stylesheets %}
7
+
8
+ {% block content %}
9
+ <div class="print">
10
+ <div class="col-10 mb-4 d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center py-4">
11
+ <div class="d-block mb-4 mb-md-0">
12
+ <nav aria-label="breadcrumb" class="d-none d-md-inline-block">
13
+ <ol class="breadcrumb breadcrumb-dark breadcrumb-transparent">
14
+ <li class="breadcrumb-item">
15
+ <a href="{% url 'dashboard' %}">
16
+ <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>
17
+ </a>
18
+ </li>
19
+ <li class="breadcrumb-item text-dark" aria-current="page"><a href="{% url 'asset_table' %}">Inventory</a></li>
20
+ <li class="breadcrumb-item"><a href="{% url 'asset_profile' calid=asset.calid %}"><code>{{ asset.calid }}</code></a></li>
21
+ <li class="breadcrumb-item"><a href="/inventory/{{ asset.calid }}/predictors/">Predictors</a></li>
22
+ <li class="breadcrumb-item active">Upload</li>
23
+ </ol>
24
+ </nav>
25
+ <h1 class="h4"><samp>{{ asset.id }}</samp> / {{ asset.calid }} Predictor Upload</h1>
26
+ </div>
27
+ <div class="btn-toolbar mb-2 mb-md-0">
28
+ <a role="button"
29
+ href="/inventory/{{ asset.calid }}/predictors/"
30
+ class="btn btn-sm btn-outline-primary d-inline-flex align-items-center mx-1">
31
+ Predictors
32
+ </a>
33
+ <a role="button"
34
+ href="{% url 'asset_sensors' calid=asset.calid %}"
35
+ class="btn btn-sm btn-outline-primary d-inline-flex align-items-center mx-1">
36
+ Sensors
37
+ </a>
38
+ </div>
39
+ </div>
40
+
41
+
42
+ <div class="row">
43
+ <iframe
44
+ id="map"
45
+ width="100%"
46
+ height="400"
47
+ >
48
+ </iframe>
49
+ </div>
50
+ </div>
51
+ {% endblock content %}
52
+
53
+ {% block javascripts %}
54
+ {% if navigator %}
55
+ <script>
56
+
57
+ {% include "prediction/veux/navigator.js" %}
58
+
59
+ const VIEWER = new VeuxNavigator(`/inventory/{{asset.calid}}/predictors/{{predictor.id}}/`,
60
+ document.querySelector('#tab-link-container'),
61
+ document.getElementById('tab-content-container'));
62
+
63
+ function handleMemberSelection(elem) {
64
+ VIEWER.select(elem);
65
+ }
66
+
67
+ document.addEventListener('DOMContentLoaded', function () {
68
+ VIEWER.initTabs('tab1', '.tab-link');
69
+ });
70
+ </script>
71
+ {% endif %}
72
+
73
+ <script>
74
+ const button = document.getElementById('render');
75
+ const form = document.querySelector('form');
76
+ const map = document.getElementById('map');
77
+ button.addEventListener('click', function(event) {
78
+ event.preventDefault();
79
+ fetch('/inventory/{{ asset.calid }}/predictors/create/map/', {
80
+ method: 'POST',
81
+ body: new FormData(form)
82
+ }).then(response => response.text())
83
+ .then(data => {
84
+ const blob = new Blob([data], { type: 'text/html' });
85
+ const url = window.URL.createObjectURL(blob);
86
+ map.src = url;
87
+ })
88
+ .catch(error => {
89
+ console.error('Error fetching map:', error);
90
+ });
91
+ });
92
+ </script>
93
+ {% endblock javascripts %}
@@ -0,0 +1,119 @@
1
+ {% extends "layouts/base.html" %}
2
+ {% load predictor %}
3
+ {% load crispy_forms_tags %}
4
+
5
+ {% block title %} {{ asset.calid }} | Upload {% endblock %}
6
+
7
+ {% block stylesheets %}
8
+ {# wizard.form.media #}
9
+ {% endblock %}
10
+
11
+ {% block content %}
12
+ <div class="col-10 mb-4 d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center py-4">
13
+ <div class="d-block mb-4 mb-md-0">
14
+ <nav aria-label="breadcrumb" class="d-none d-md-inline-block">
15
+ <ol class="breadcrumb breadcrumb-dark breadcrumb-transparent">
16
+ <li class="breadcrumb-item">
17
+ <a href="{% url 'dashboard' %}">
18
+ <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>
19
+ </a>
20
+ </li>
21
+ <li class="breadcrumb-item text-dark" aria-current="page"><a href="{% url 'asset_table' %}">Inventory</a></li>
22
+ <li class="breadcrumb-item"><a href="{% url 'asset_profile' calid=asset.calid %}"><code>{{ asset.calid }}</code></a></li>
23
+ <li class="breadcrumb-item"><a href="/inventory/{{ asset.calid }}/predictors/">Predictors</a></li>
24
+ <li class="breadcrumb-item active">Upload</li>
25
+ </ol>
26
+ </nav>
27
+ <h1 class="h4">CSi Upload</h1>
28
+ </div>
29
+ <div class="btn-toolbar mb-2 mb-md-0">
30
+ <a role="button"
31
+ href="/inventory/{{ asset.calid }}/predictors/"
32
+ class="btn btn-sm btn-outline-primary d-inline-flex align-items-center mx-1">
33
+ Predictors
34
+ </a>
35
+ <a role="button"
36
+ href="{% url 'asset_sensors' calid=asset.calid %}"
37
+ class="btn btn-sm btn-outline-primary d-inline-flex align-items-center mx-1">
38
+ Sensors
39
+ </a>
40
+ </div>
41
+ </div>
42
+
43
+
44
+ <form method="post" enctype="multipart/form-data">
45
+ {% csrf_token %}
46
+ {{ wizard.management_form }}
47
+
48
+ <div class="row align-right" style="height: 500px;">
49
+ <!-- Left: progress indicator -->
50
+ <div class="col-md-4 align-items-stretch">
51
+ <div class="card bg-white-100 border-1 rounded-0 shadow">
52
+ <!-- <div class="card-header">
53
+ <h3 class="mb-0">Upload</h3>
54
+ </div> -->
55
+ <div class="card-body">
56
+ <ul class="list-group list-group-flush list-group-numbered">
57
+ {% for n in wizard.steps.all %}
58
+ {% if wizard.steps.current == n %}
59
+ <button name="wizard_goto_step" value="{{ n }}" class="list-group-item list-group-item-action active">{{ n.title }}</button>
60
+ {% else %}
61
+ <button name="wizard_goto_step" value="{{ n }}" class="list-group-item list-group-item-action ">{{ n.title }}</button>
62
+ {% endif %}
63
+ {% endfor %}
64
+ </ul>
65
+ </div>
66
+ </div>
67
+ </div>
68
+
69
+ <!-- Right: form for this step -->
70
+ <div class="col-md-8 align-items-stretch">
71
+ <div class="card h-100 bg-white-100 border-1 rounded-0 shadow">
72
+ <div class="card-body d-flex flex-column">
73
+
74
+ <!-- <button id="render" type="button" class="btn btn-outline-primary">Render Map</button> -->
75
+ {% if wizard.steps.current == "confirm" %}
76
+ <iframe
77
+ id="map"
78
+ width="100%"
79
+ height="400"
80
+ data-srcdoc="{{ rndrdoc|safe }}"
81
+ >
82
+ </iframe>
83
+ {% endif %}
84
+
85
+ <!-- Form -->
86
+ {# form.as_p #}
87
+ {% crispy form %}
88
+ </div>
89
+ <div class="card-footer mb-0 p-1">
90
+ <div class="btn-group rounded-1" role="group" aria-label="Basic example">
91
+ {% if wizard.steps.prev %}
92
+ <button name="wizard_goto_step"
93
+ value="{{ wizard.steps.prev }}"
94
+ class="btn btn-outline-primary mb-0">
95
+ Back
96
+ </button>
97
+ {% endif %}
98
+ <button type="submit" class="btn btn-outline-primary mb-0">
99
+ {{ wizard.steps.next|yesno:"Next,Submit" }}
100
+ </button>
101
+ </div>
102
+ </div>
103
+ </div>
104
+ </div>
105
+ </div>
106
+ </form>
107
+ {% endblock %}
108
+
109
+
110
+ {% block javascripts %}
111
+ <script>
112
+ const button = document.getElementById('render');
113
+ const map = document.getElementById('map');
114
+ document.addEventListener('DOMContentLoaded', function () {
115
+ const blob = new Blob([map.dataset.srcdoc], { type: 'text/html' });
116
+ map.src = window.URL.createObjectURL(blob);
117
+ });
118
+ </script>
119
+ {% endblock javascripts %}
@@ -4,6 +4,8 @@
4
4
  <div class="col-md-4" >
5
5
  <div class="card bg-white-100 border-1 rounded-0 shadow">
6
6
  <div class="card-header d-sm-flex flex-row align-items-center flex-0">
7
+ <h5 class="mb-0 me-2">Components </h5>
8
+
7
9
  <select id="table-switcher"
8
10
  class="form-select form-select-sm me-2">
9
11
  <option value="members" >Members</option>
@@ -17,35 +19,14 @@
17
19
  class="table align-items-center table-flush">
18
20
  <thead class="thead-light">
19
21
  <tr>
20
- <th class="border-bottom" scope="col">#</th>
22
+ <th class="border-bottom" scope="col">Name</th>
21
23
  <th class="border-bottom" scope="col">Type</th>
22
24
  </tr>
23
25
  </thead>
24
26
  <tbody>
25
27
  {% for member in members %}
26
28
  <tr id="veux-member-{{member.id}}"
27
- data-section="{{ member.section }}"
28
- style="cursor: pointer;"
29
- onClick="handleMemberSelection(this)">
30
- <td><code>{{ member.name }}</code></td>
31
- <td>{{ member.type }}</td>
32
- </tr>
33
- {% endfor %}
34
- </tbody>
35
- </table>
36
-
37
- <table id="sections" hidden
38
- class="table align-items-center table-flush">
39
- <thead class="thead-light">
40
- <tr>
41
- <th class="border-bottom" scope="col">#</th>
42
- <th class="border-bottom" scope="col">Type</th>
43
- </tr>
44
- </thead>
45
- <tbody>
46
- {% for member in sections %}
47
- <tr id="veux-member-{{member.id}}"
48
- data-query="{{ member.name }}"
29
+ data-render="section={{ member.section }}"
49
30
  data-name="{{ member.name }}"
50
31
  style="cursor: pointer;"
51
32
  onClick="handleMemberSelection(this)">
@@ -55,7 +36,31 @@
55
36
  {% endfor %}
56
37
  </tbody>
57
38
  </table>
58
-
39
+ <div>
40
+ <table id="sections" hidden
41
+ class="table align-items-center table-flush">
42
+ <thead class="thead-light">
43
+ <tr>
44
+ <th class="border-bottom" scope="col">Name</th>
45
+ <th class="border-bottom" scope="col">Type</th>
46
+ </tr>
47
+ </thead>
48
+ <tbody>
49
+ {% for member in sections %}
50
+ <tr id="veux-member-{{member.id}}"
51
+ data-render="section={{ member.name }}"
52
+ data-analysis="section={{ member.name }}"
53
+ data-name="{{ member.name }}"
54
+ style="cursor: pointer;"
55
+ onClick="handleMemberSelection(this)">
56
+ <td><code>{{ member.name }}</code></td>
57
+ <td>{{ member.type }}</td>
58
+ </tr>
59
+ {% endfor %}
60
+ </tbody>
61
+ </table>
62
+ </div>
63
+
59
64
  <table id="sensors"
60
65
  class="table align-items-center table-flush" hidden>
61
66
  <thead class="thead-light">
@@ -87,30 +92,41 @@
87
92
  </div>
88
93
  </div>
89
94
  </div>
95
+
96
+ <div id="veux-properties" class="card bg-white-100 border-1 rounded-0 shadow mt-3">
97
+ <div class="card-header">
98
+ <h5 class="mb-0">Properties</h5>
99
+ </div>
100
+ <div class="card-body">
101
+ <div id="property-viewer" class="text-center">
102
+ <p>Select a member or sensor to view properties.</p>
103
+ </div>
104
+ </div>
105
+ </div>
90
106
  </div>
91
-
92
- <!-- Right Side: Predictor Rendering -->
107
+
108
+ <!-- Right Side: Rendering -->
93
109
  <div class="col-md-8">
94
110
  <div id="rendering" class="card bg-white-100 border-1 rounded-0 shadow">
95
111
  <div class="card-header">
96
112
  <ul id="tab-link-container" class="nav nav-tabs" id="myTab" role="tablist">
97
- <li class="nav-item" role="presentation">
98
- <a class="nav-link tab-link active"
99
- id="tab1-tab"
100
- data-bs-toggle="tab" href="#"
101
- data-tab="tab1"
102
- role="tab">Model</a>
103
- </li>
113
+ <li class="nav-item" role="presentation">
114
+ <a class="nav-link tab-link active"
115
+ id="tab1-tab"
116
+ data-bs-toggle="tab" href="#"
117
+ data-tab="tab1"
118
+ role="tab">Model</a>
119
+ </li>
104
120
  </ul>
105
121
  </div>
106
122
  <div class="card-body text-center" style="background-color: #f0f0f0;">
107
- <div id="tab-content-container">
108
- <div id="tab1-content" class="tab-content">
109
- <div id="main-viewer"
110
- style="width: 100%; height: 300px; background-color: #f0f0f0; margin: 0 auto;">
111
- </div>
123
+ <div id="tab-content-container">
124
+ <div id="tab1-content" class="tab-content">
125
+ <div id="main-viewer"
126
+ style="width: 100%; height: 300px; background-color: #f0f0f0; margin: 0 auto;">
112
127
  </div>
113
128
  </div>
129
+ </div>
114
130
  </div>
115
131
  <div class="card-footer text-center">
116
132
  Powered by <a href="https://veux.io/">veux</a>