66{% endblock %}
77
88{% block content %}
9- < div class ="container ">
10- < h1 > SystemGuard Targets</ h1 >
11- {% include 'ext/message.html' %}
9+ < div class ="container ">
10+ < h1 > SystemGuard Targets</ h1 >
11+ {% include 'ext/message.html' %}
1212
13- < div class ="table-wrapper ">
14- < table class ="modern-table ">
15- < thead >
16- < tr >
17- < th > Group Name < i class ="fas fa-info-circle " title ="Job Name is the name of the service that is being monitored. "> </ i > </ th >
18- < th > Targets < i class ="fas fa-info-circle " title ="Targets are the IP addresses of the services that are being monitored. "> </ i > </ th >
19- < th > Scrape Interval < i class ="fas fa-info-circle " title ="Scrape Interval is the time interval between each scrape of the target. "> </ i > </ th >
20- < th > New Interval< i class ="fas fa-info-circle " title ="Change the scrape interval of the target. "> </ i > </ th >
21- </ tr >
22- </ thead >
23- < tbody >
24- {% for info in targets_info %}
25- < tr >
26- < td > {{ info.job_name }}</ td >
27- < td >
28- < ul class ="target-list ">
29- {% for target in info.targets %}
30- < li >
31- {{ target }}
32- < form action ="{{ url_for('remove_target') }} " method ="post " class ="inline-form ">
33- < input type ="hidden " name ="job_name " value ="{{ info.job_name }} ">
34- < input type ="hidden " name ="target_to_remove " value ="{{ target }} ">
35- < button type ="submit " class ="btn-danger ">
36- < i class ="fas fa-times "> </ i > Remove
37- </ button >
38- </ form >
39- </ li >
40- {% endfor %}
41- </ ul >
42- </ td >
43- < td > {{ info.scrape_interval }}</ td >
44- < td >
45- < form action ="{{ url_for('change_interval') }} " method ="post " class ="inline-form ">
46- < input type ="hidden " name ="job_name " value ="{{ info.job_name }} ">
47- < input type ="text " name ="new_interval " placeholder ="New Interval " required class ="input-field ">
48- < input type ="submit " value ="Change Interval " class ="btn-primary ">
49- </ form >
50- </ td >
51- </ tr >
52- {% endfor %}
53- </ tbody >
54- </ table >
55- </ div >
56-
57- < div class ="section ">
58- < h2 > Restart Prometheus Docker Service</ h2 >
59- < form action ="{{ url_for('restart_prometheus') }} ">
60- < input type ="submit " value ="Restart Prometheus " class ="btn-warning ">
61- </ form >
62- </ div >
13+ < div class ="table-wrapper ">
14+ < table class ="modern-table ">
15+ < thead >
16+ < tr >
17+ < th > Group Name < i class ="fas fa-info-circle "
18+ title ="Job Name is the name of the service that is being monitored. "> </ i > </ th >
19+ < th > Targets < i class ="fas fa-info-circle "
20+ title ="Targets are the IP addresses of the services that are being monitored. "> </ i > </ th >
21+ < th > Scrape Interval < i class ="fas fa-info-circle "
22+ title ="Scrape Interval is the time interval between each scrape of the target. "> </ i > </ th >
23+ < th > New Interval< i class ="fas fa-info-circle " title ="Change the scrape interval of the target. "> </ i >
24+ </ th >
25+ </ tr >
26+ </ thead >
27+ < tbody >
28+ {% for info in targets_info %}
29+ < tr >
30+ < td > {{ info.job_name }}</ td >
31+ < td >
32+ < ul class ="target-list ">
33+ {% for target in info.targets %}
34+ < li >
35+ {{ 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 >
42+ </ form >
43+ </ li >
44+ {% endfor %}
45+ </ ul >
46+ </ td >
47+ < td > {{ info.scrape_interval }}</ td >
48+ < td >
49+ < form action ="{{ url_for('change_interval') }} " method ="post " class ="inline-form ">
50+ < input type ="hidden " name ="job_name " value ="{{ info.job_name }} ">
51+ < input type ="text " name ="new_interval " placeholder ="New Interval " required
52+ class ="input-field ">
53+ < input type ="submit " value ="Change Interval " class ="btn-primary ">
54+ </ form >
55+ </ td >
56+ </ tr >
57+ {% endfor %}
58+ </ tbody >
59+ </ table >
60+ </ div >
6361
64- < div class ="section ">
65- < h2 > Add New Target</ h2 >
66- < form action ="{{ url_for('add_target') }} " method ="post " class ="add-target-form ">
67- < input type ="text " name ="job_name " placeholder ="Group Name " required class ="input-field ">
68- < input type ="text " name ="new_target " placeholder ="New Target " required class ="input-field ">
69- < input type ="text " name ="scrape_interval " placeholder ="Scrape Interval " required class ="input-field ">
70- < br >
71- < button type ="submit " class ="btn btn-primary btn-lg ">
72- < i class ="fas fa-plus "> </ i > Add Target
73- </ button >
74- </ form >
75- </ div >
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 >
68+ < div class ="section ">
69+ < h2 > Add New Target</ h2 >
70+ < form action ="{{ url_for('add_target') }} " method ="post " class ="add-target-form ">
71+ < input type ="text " name ="job_name " placeholder ="Group Name " required class ="input-field ">
72+ < input type ="text " name ="new_target " placeholder ="New Target " required class ="input-field ">
73+ < input type ="text " name ="scrape_interval " placeholder ="Scrape Interval " required class ="input-field ">
74+ < input type ="text " name ="username " placeholder ="Username " required class ="input-field ">
75+ <!-- New Username field -->
76+ < input type ="password " name ="password " placeholder ="Password " required class ="input-field ">
77+ <!-- New Password field -->
78+ < br >
79+ < button type ="submit " class ="btn btn-primary btn-lg ">
80+ < i class ="fas fa-plus "> </ i > Add Target
81+ </ button >
82+ </ form >
7683 </ div >
84+
85+ </ div >
7786{% endblock %}
7887
7988{% block extra_scripts %}
8089< script src ="{{ url_for('static', filename='js/targets.js') }} "> </ script >
81- {% endblock %}
90+ {% endblock %}
0 commit comments