77
88{% block content %}
99< div class ="container ">
10- < h1 > SystemGuard Targets</ h1 >
10+ < h1 > SystemGuard/Prometheus Targets</ h1 >
11+ < p class ="text-center "> SystemGuard uses Prometheus to monitor the services. You can add, remove, and change the scrape interval of the
12+ targets here.</ p >
1113 {% include 'ext/message.html' %}
1214
1315 < div class ="table-wrapper ">
@@ -33,13 +35,15 @@ <h1>SystemGuard Targets</h1>
3335 {% for target in info.targets %}
3436 < li >
3537 {{ target }}
36- < form action ="{{ url_for('remove_target') }} " method ="post " class ="inline-form ">
37- < input type ="hidden " name ="job_name " value ="{{ info.job_name }} ">
38- < input type ="hidden " name ="target_to_remove " value ="{{ target }} ">
39- < button type ="submit " class ="btn-danger ">
40- < i class ="fas fa-times "> </ i > Remove
41- </ button >
38+ {% if not system_ip_address in target %}
39+ < form action ="{{ url_for('remove_target') }} " method ="post " class ="inline-form "> </ form >
40+ < input type ="hidden " name ="job_name " value ="{{ info.job_name }} ">
41+ < input type ="hidden " name ="target_to_remove " value ="{{ target }} ">
42+ < button type ="submit " class ="btn-danger ">
43+ < i class ="fas fa-times "> </ i > Remove
44+ </ button >
4245 </ form >
46+ {% endif %}
4347 </ li >
4448 {% endfor %}
4549 </ ul >
@@ -58,13 +62,6 @@ <h1>SystemGuard Targets</h1>
5862 </ tbody >
5963 </ table >
6064 </ div >
61-
62- < div class ="section ">
63- < h2 > Restart Prometheus Docker Service</ h2 >
64- < form action ="{{ url_for('restart_prometheus') }} ">
65- < input type ="submit " value ="Restart Prometheus " class ="btn-warning ">
66- </ form >
67- </ div >
6865 < div class ="section ">
6966 < h2 > Add New Target</ h2 >
7067 < form action ="{{ url_for('add_target') }} " method ="post " class ="add-target-form ">
@@ -78,6 +75,12 @@ <h2>Add New Target</h2>
7875 < i class ="fas fa-plus "> </ i > Add Target
7976 </ button >
8077 </ form >
78+
79+ < div class ="section ">
80+ < form action ="{{ url_for('restart_prometheus') }} ">
81+ < input type ="submit " value ="Update Prometheus " class ="btn btn-lg btn-primary ">
82+ </ form >
83+ </ div >
8184 </ div >
8285</ div >
8386< script >
0 commit comments