Commit 569f852d authored by Dmytro Bogatov's avatar Dmytro Bogatov 💕

Fix modals in health.

parent f830489b
......@@ -193,8 +193,8 @@ export class HealthMetricPage extends MetricPage<Metric<HealthDataPoint>> {
let code = `
<div
class="modal fade"
id="modal-details"
class="modal fade health-details-modal"
id="modal-details-${timestamp.getTime()}"
tabindex="-1"
role="dialog"
aria-hidden="true"
......@@ -254,16 +254,23 @@ export class HealthMetricPage extends MetricPage<Metric<HealthDataPoint>> {
</div>
`;
$("#modal").html(code);
$("body").append(code);
$('#details-table').DataTable({
"order": [[0, "desc"]],
destroy: true,
order: [[0, "desc"]],
lengthChange: false,
searching: false,
pageLength: 10
});
$("#modal-details").modal();
$(`#modal-details-${timestamp.getTime()}`).modal();
$(`#modal-details-${timestamp.getTime()}`).on(
"hidden.bs.modal",
() => $(".health-details-modal").remove()
);
},
false);
......
......@@ -22,7 +22,7 @@
<div class="card">
<div class="card-header">
<h2>Plotted data <small>Data is requested for a day back.</small></h2>
<h2>Plotted data <small>Data is requested for a 3 days back.</small></h2>
</div>
<div class="card-body card-padding">
<div id="metric-detailed-plot" class="flot-chart"></div>
......@@ -38,7 +38,7 @@
<div class="card">
<div class="card-header">
<h2>Data points <small>Data is requested for a day back.</small></h2>
<h2>Data points <small>Data is shown for the same interval as selected plot.</small></h2>
</div>
<div class="card-body card-padding">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment