{% extends ../../../templates/base.html %}

{% block title %}temBoard / {{instance}} / Monitoring{% end %}

{% block head %}
<link href="/css/dygraph.css" rel="stylesheet" />
{% end %}

{% block content %}

<div id="app">
  <alerting-check />
</div>

<script src="/js/dygraph.min.js"></script>
<script type="module" src="{{ vitejs.url_for('alerting.check.js') }}"></script>
<script>
var apiUrl = "/server/{{instance.agent_address}}/{{instance.agent_port}}/alerting"
var checkInitialData = {
  name: "{{check['name']}}",
  description: "{{ check['description']}}",
  valueType: "{{value_type}}",
  warning: {{'{0:g}'.format(float(check['warning']))}},
  critical: {{'{0:g}'.format(float(check['critical']))}},
  enabled: {{ json_encode(check["enabled"]) }}
}
</script>
{% end %}
