index.html
3.94 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
{% extends "starter-template.html" %}
{% block content %}
<form class="form-horizontal">
<div class="form-group">
<label for="inputDate" class="col-sm-2 control-label">Date</label>
<div class="col-sm-2">
<input name="trxdate" type="date" class="form-control" id="inputDate" value="{{ conditions.ts_date }}">
</div>
</div>
<div class="form-group">
<label for="inputDestination" class="col-sm-2 control-label">Destination</label>
<div class="col-sm-10">
<input name="destination" type="text" class="form-control" id="inputDestination" value="{{ conditions.destination }}">
</div>
</div>
<div class="form-group">
<label for="inputProduct" class="col-sm-2 control-label">Product</label>
<div class="col-sm-10">
<input name="product" type="text" class="form-control" id="inputProduct" value="{{ conditions.product }}">
</div>
</div>
<div class="form-group">
<label for="inputSupplier" class="col-sm-2 control-label">Supplier</label>
<div class="col-sm-10">
<select class="form-control" name="supplier" id="inputSupplier">
{% for supplier in suppliers %}
<option
{% if supplier == conditions.supplier %}
selected="selected"
{% endif %}
>
{{ supplier }}
</option>
{% endfor %}
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<input type="submit" class="btn btn-primary">
</div>
</div>
</form>
<br><br>
<table class="table table-striped table-hover">
<tr>
<th class="hidden-xs hidden-sm hidden-md">ReqId</th>
<th>Time</th>
<th>Destination</th>
<th>Product</th>
<th class="hidden-xs hidden-sm hidden-md">Supplier</th>
<th>RC</th>
<th class="hidden-xs hidden-sm hidden-md">Message</th>
</tr>
{% for trx in trxs %}
{% if trx.responses %}
{% set lastResponse = trx.responses|last %}
{% endif %}
<tr>
<td class="hidden-xs hidden-sm hidden-md">
<a href="/trx/view/{{ trx.requestId }}">{{ trx.requestId }}</a>
</td>
<td>{{ trx.ts }}</td>
<td>
<a href="/trx/view/{{ trx.requestId }}">{{ trx.destination }}</a>
</td>
<td>{{ trx.product }}</td>
<td class="hidden-xs hidden-sm hidden-md">
{% if trx.supplier %}
{{ trx.supplier }}
{% else %}
-
{% endif %}
</td>
<td>
{% if lastResponse %}
{% if (trx.supplier == "CJK") %}
{{ lastResponse.parsed.ciwaru.rc }}
{% elif (trx.supplier == "TRUST") %}
{{ lastResponse.parsed.RESPONSECODE }}
{% else %}
UNKNOWN
{% endif %}
{% else %}
-
{% endif %}
</td>
<td class="hidden-xs hidden-sm hidden-md">
{% if lastResponse %}
{% if (trx.supplier == "CJK") %}
{{ lastResponse.parsed.ciwaru.msg }}
{% elif (trx.supplier == "TRUST") %}
{{ lastResponse.parsed.MESSAGE }}
{% else %}
UNKNOWN
{% endif %}
{% else %}
-
{% endif %}
</td>
</tr>
{% endfor %}
</table>
<p>
<ul class="pagination">
{% for page in paginator %}
<li
{% if page.active %}
class="active"
{% endif %}
>
<a href="{{ page.link | safe }}">
{{ page.number }}
</a>
</li>
{% endfor %}
</ul>
</p>
<p>
Total {{ trxcount }} transactions available in {{ pagecount }} pages.
</p>
{% endblock %}