|
3 | 3 |
|
4 | 4 | {% block stylesheets %} |
5 | 5 | <link rel="stylesheet" href="/static/assets/css/select2.css"> |
6 | | - <link rel="stylesheet" href="/static/assets/css/custom_dashboards.css"> |
| 6 | + <link rel="stylesheet" href="/static/assets/css/custom_dashboards.css?v=2026042701"> |
7 | 7 | {% endblock stylesheets %} |
8 | 8 |
|
9 | 9 | {% block content %} |
@@ -140,16 +140,43 @@ <h6 class="mb-0 text-uppercase text-muted small">Editor Mode</h6> |
140 | 140 | </div> |
141 | 141 |
|
142 | 142 | <div id="dashboardBuilderPanel" class="dashboard-builder-panel"> |
143 | | - <p class="text-muted small mb-3" id="dashboardBuilderEmptyHint">Add sections to organise widgets. Sections can display a title and optional divider bar to visually separate groups of widgets.</p> |
144 | | - <div id="dashboardSectionsContainer" class="dashboard-builder-sections"></div> |
145 | | - <div class="d-flex justify-content-between align-items-center mt-3"> |
146 | | - <div> |
147 | | - <small class="text-muted">Sections help recreate analytic layouts.</small> |
148 | | - </div> |
149 | | - <div> |
150 | | - <button type="button" class="btn btn-outline-primary btn-sm" id="addSectionBtn"><i class="fas fa-layer-group mr-1"></i>Add section</button> |
151 | | - </div> |
| 143 | + <div class="dashboard-builder-layout"> |
| 144 | + <aside class="dashboard-builder-rail" id="dashboardBuilderRail"> |
| 145 | + <div class="dashboard-builder-rail-header"> |
| 146 | + <span class="dashboard-builder-rail-title">Layout</span> |
| 147 | + <button type="button" class="btn btn-primary btn-sm" id="addSectionBtn" title="Add section"> |
| 148 | + <i class="fas fa-plus"></i> |
| 149 | + </button> |
| 150 | + </div> |
| 151 | + <div class="dashboard-builder-rail-list" id="dashboardBuilderRailList"></div> |
| 152 | + <div class="dashboard-builder-rail-empty d-none" id="dashboardBuilderRailEmpty"> |
| 153 | + <p class="small text-muted mb-2">No sections yet.</p> |
| 154 | + <button type="button" class="btn btn-outline-primary btn-sm" id="dashboardBuilderRailEmptyAddBtn"> |
| 155 | + <i class="fas fa-plus mr-1"></i>Add a section |
| 156 | + </button> |
| 157 | + </div> |
| 158 | + </aside> |
| 159 | + |
| 160 | + <section class="dashboard-builder-editor" id="dashboardBuilderEditor"> |
| 161 | + <div class="dashboard-builder-editor-empty" id="dashboardBuilderEditorEmpty"> |
| 162 | + <div class="dashboard-builder-editor-empty-inner"> |
| 163 | + <i class="fas fa-th-large dashboard-builder-editor-empty-icon"></i> |
| 164 | + <h6 class="mb-1">Pick a section or widget to edit</h6> |
| 165 | + <p class="small text-muted mb-3"> |
| 166 | + Use the panel on the left to navigate. Each widget pulls data from a table, |
| 167 | + optionally aggregates and filters it, then renders as the chart of your choice. |
| 168 | + </p> |
| 169 | + <button type="button" class="btn btn-outline-primary btn-sm" id="dashboardBuilderEditorEmptyAddBtn"> |
| 170 | + <i class="fas fa-plus mr-1"></i>Add a section |
| 171 | + </button> |
| 172 | + </div> |
| 173 | + </div> |
| 174 | + <div class="dashboard-builder-editor-content" id="dashboardBuilderEditorContent"></div> |
| 175 | + </section> |
152 | 176 | </div> |
| 177 | + |
| 178 | + <div class="d-none" id="dashboardBuilderEmptyHint"></div> |
| 179 | + <div class="d-none" id="dashboardSectionsContainer"></div> |
153 | 180 | </div> |
154 | 181 |
|
155 | 182 | <div id="dashboardJsonPanel" class="dashboard-json-panel d-none"> |
@@ -189,6 +216,16 @@ <h6 class="mb-0 text-uppercase text-muted small">Editor Mode</h6> |
189 | 216 | <option value="cases.creator_id"> |
190 | 217 | <option value="cases.reviewer_id"> |
191 | 218 | <option value="cases.review_status_id"> |
| 219 | + <option value="cases.state_id"> |
| 220 | + <option value="cases.status_id"> |
| 221 | + <option value="cases.severity_id"> |
| 222 | + <option value="cases.classification_id"> |
| 223 | + <option value="cases.client_id"> |
| 224 | + <option value="cases.open_date"> |
| 225 | + <option value="cases.close_date"> |
| 226 | + <option value="cases.initial_date"> |
| 227 | + <option value="case_state.state_id"> |
| 228 | + <option value="case_state.state_name"> |
192 | 229 | <option value="case_reviewer.id"> |
193 | 230 | <option value="case_reviewer.username"> |
194 | 231 | <option value="case_reviewer.name"> |
@@ -268,6 +305,28 @@ <h6 class="dashboard-help-heading">Filter operators</h6> |
268 | 305 | </table> |
269 | 306 | </div> |
270 | 307 | </div> |
| 308 | + <div class="dashboard-help-section"> |
| 309 | + <h6 class="dashboard-help-heading">Case outcomes</h6> |
| 310 | + <p class="mb-2">Use <code>cases.status_id</code> to filter by case outcome. The visual builder shows a dropdown automatically; if you edit JSON directly, use the integer values below.</p> |
| 311 | + <div class="table-responsive mb-3"> |
| 312 | + <table class="table table-sm table-striped mb-0"> |
| 313 | + <thead> |
| 314 | + <tr> |
| 315 | + <th style="width: 100px;">Value</th> |
| 316 | + <th>Outcome</th> |
| 317 | + </tr> |
| 318 | + </thead> |
| 319 | + <tbody> |
| 320 | + <tr><td><code>0</code></td><td>Unknown</td></tr> |
| 321 | + <tr><td><code>1</code></td><td>False positive</td></tr> |
| 322 | + <tr><td><code>2</code></td><td>True positive with impact</td></tr> |
| 323 | + <tr><td><code>3</code></td><td>Not applicable</td></tr> |
| 324 | + <tr><td><code>4</code></td><td>True positive without impact</td></tr> |
| 325 | + <tr><td><code>5</code></td><td>Legitimate</td></tr> |
| 326 | + </tbody> |
| 327 | + </table> |
| 328 | + </div> |
| 329 | + </div> |
271 | 330 | <div class="dashboard-help-section"> |
272 | 331 | <h6 class="dashboard-help-heading">Allowed tables & columns</h6> |
273 | 332 | <div class="table-responsive mb-3"> |
@@ -430,5 +489,5 @@ <h5 class="modal-title">Dashboard JSON Tools</h5> |
430 | 489 | <script src="/static/assets/js/plugin/ace/src-noconflict/ace.js" type="text/javascript" charset="utf-8"></script> |
431 | 490 | <script src="/static/assets/js/plugin/ace/src-noconflict/ext-language_tools.js" type="text/javascript" charset="utf-8"></script> |
432 | 491 | <script src="/static/assets/js/core/charts.js"></script> |
433 | | - <script src="/static/assets/js/iris/custom_dashboards/custom_dashboards.js"></script> |
| 492 | + <script src="/static/assets/js/iris/custom_dashboards/custom_dashboards.js?v=2026042701"></script> |
434 | 493 | {% endblock javascripts %} |
0 commit comments