config.index.html
4.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
{% extends "template.starter.html" %}
{% block content %}
{% for modem in modems %}
<a href="#modem{{modem.name}}" class="btn btn-sm btn-primary">{{modem.name}}</a>
{% endfor %}
<a href="#addmodem" class="btn btn-sm btn-success">Tambah modem...</a>
<br>
{% for modem in modems %}
<div id="modem{{modem.name}}"> </div>
<div class="card">
<h5 class="card-header">
{{ modem.name }}
</h5>
<div class="card-body">
<dl class="row">
<dt class="col-sm-3">Outgoing</dt>
<dd class="col-sm-9">
{% if modem.outgoing %}
{% set newValue = 0 %}
{% set btnClass = "btn btn-success" %}
{% set btnTitle = "klik disini untuk menonaktifkan outgoing" %}
{% else %}
{% set newValue = 1 %}
{% set btnClass = "btn btn-danger" %}
{% set btnTitle = "klik disini untuk mengaktifkan outgoing" %}
{% endif %}
<a href="{{ baseUrl }}/modem/set-outgoing/{{ modem.name | urlencode }}/{{ newValue }}"
class="{{ btnClass }}" title="{{ btnTitle }}"
onclick="return window.confirm('Apakah anda yakin ingin mengubah status outgoing modem {{ modem.name }} menjadi {{ not modem.outgoing }}?');">
{{ modem.outgoing }}
</a>
</dd>
<dt class="col-sm-3">IMSI</dt>
<dd class="col-sm-9">
{{ modem.imsi or '-' }}
<br>
<form method="post" action="{{ baseUrl }}/modem/update-imsi" class="form-inline">
<input type="hidden" name="name" value="{{ modem.name | urlencode }}">
<div class="form-group">
<input type="text" name="imsi" class="form-control" placeholder="imsi baru, misal: 5100xxxxxxxxxxx">
</div>
<button type="submit" class="btn btn-primary">Simpan IMSI baru</button>
</form>
</dd>
<dt class="col-sm-3">Prefix</dt>
<dd class="col-sm-9">
{% for prefix_item in modem.prefix %}
{{ prefix_item }}
<a href="{{ baseUrl }}/modem/del-prefix/{{ modem.name | urlencode }}/{{ prefix_item | urlencode}}" onclick="return window.confirm('Apakah anda yakin ingin mengapus prefix {{ prefix_item }} dari modem {{ modem.name }}?');">
x
</a>
<br>
{% endfor %}
<form method="post" action="{{ baseUrl }}/modem/add-prefix" class="form-inline">
<input type="hidden" name="name" value="{{ modem.name | urlencode }}">
<div class="form-group">
<input type="text" name="prefix" class="form-control" placeholder="prefix baru, misal 6281x">
</div>
<button type="submit" class="btn btn-primary">Simpan prefix baru</button>
</form>
</dd>
<dt class="col-sm-3">Custom Sender</dt>
<dd class="col-sm-9">
<br>
<form method="post" action="{{ baseUrl }}/modem/update-custom-ip">
<input type="hidden" name="name" value="{{ modem.name | urlencode }}">
<div class="form-group">
<input type="text" name="url" class="form-control" placeholder="url: misal http://127.0.0.0:59194/service/sendsms" value="{{ modem.url }}">
</div>
<div class="form-group">
<input type="text" name="username" class="form-control" placeholder="username" value="{{ modem.username }}">
</div>
<div class="form-group">
<input type="password" name="password" class="form-control" placeholder="password" value="{{ modem.password }}">
</div>
<button type="submit" class="btn btn-primary">Simpan custom data sender</button>
</form>
</dd>
</dl>
<div class="text-right">
<form method="post" action="{{ baseUrl }}/modem/delete">
<input type="hidden" name="name" value="{{ modem.name | urlencode }}">
<button type="submit" class="btn btn-danger"
onclick="return window.confirm('Apakah anda yakin ingin menghapus modem {{ modem.name }}?');"
>
Hapus Modem
</button>
</form>
</div>
</div>
</div>
<br>
{% endfor %}
{% include "config.include.addmodem.html" %}
{% endblock %}