-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdashboard.html
executable file
·362 lines (311 loc) · 9.71 KB
/
dashboard.html
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
{% extends 'PHT/main.html' %}
{% load static %}
{% block content %}
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css"
integrity="sha384-gfdkjb5BdAXd+lj+gudLWI+BXq4IuLW5IT+brZEZsLFm++aCMlF1V92rMkPaX4PP" crossorigin="anonymous">
<br>
<style>
.btn-primary {
color: white;
background-color: #f05f6c;
font-size: large;
font-weight: bold;
border-color: #f05f6c;
}
.btn-primary:hover {
background-color: white;
font-size: bold;
color: #f05f6c;
border-color: #f05f6c;
}
.btn-primhassan {
color: #F63854;
position: relative;
left: 5px;
top: 2px;
border-color: violet;
}
.btn-primhassan:hover {
background-color: #F63854;
color: white;
font-size: bold;
}
.btn-primhassan:active,
.btn-primhassan:visited,
.btn-primhassan:focus {
border-color: #F63854;
}
td {
color: #f05f6c;
position: relative;
/* border: 2px solid black; */
width: 388px;
font-family: 'Times New Roman', Times, serif;
}
th {
position: relative;
/* border: 2px solid black; */
width: 250px;
font-family: 'Times New Roman', Times, serif;
}
.card-title-01 {
font-weight: bold;
font-size: 30px;
margin: 20px 0px;
}
.card-text-01 {
width: 150px;
font-weight: bold;
margin: 0px auto;
font-size: 50px;
}
.extra {
margin-top: 30px;
margin-bottom: 0px;
}
#card3 {
background: rgb(240, 71, 111);
background: linear-gradient(90deg, rgba(240, 71, 111, 1) 47%, rgba(242, 109, 140, 0.8379726890756303) 100%);
}
#card2 {
background: rgb(172, 152, 239);
background: linear-gradient(90deg, rgba(172, 152, 239, 1) 52%, rgba(190, 173, 241, 0.8519782913165266) 100%);
}
#card1 {
background: rgb(71, 35, 217);
background: linear-gradient(90deg, rgba(71, 35, 217, 1) 67%, rgba(71, 35, 217, 0.6755077030812324) 100%);
}
.custom-card {
color: white;
}
/* for custom table */
.main {
padding: 0px 120px;
}
th.custom-th,
td.custom-td {
text-align: center;
color: black;
}
/* radio buttons etc */
</style>
<!-- datatatttatat -->
<div class="container-fluid" style="padding-top: 15px !important;">
<!-- <h1>Dashboard</h1> -->
<div class="row">
<div class="custom-card col" style="margin: 5px 10px;" id="card1">
<div class="card-body">
<h5 class="card-title-01">AVERAGE PRICE</h5>
<p class="card-text-01">{{avgpricelst}}</p>
<p class="extra"><i class="fas fa-arrow-up fa-lg"></i> Total Average <b>Price</b></p>
<!-- <a href="#" class="btn btn-primary">Go somewhere</a> -->
</div>
</div>
<div class="custom-card col" style="margin: 5px 10px;" id="card2">
<div class="card-body">
<h5 class="card-title-01">AVERAGE RATINGS</h5>
<p class="card-text-01">{{avgratinglst}}</p>
<p class="extra"><i class="fas fa-arrow-up fa-lg"></i> Total Average <b>Ratings</b></p>
<!-- <a href="#" class="btn btn-primary">Go somewhere</a> -->
</div>
</div>
<div class="custom-card col" style="margin: 5px 10px;" id="card3">
<div class="card-body">
<h5 class="card-title-01">AVERAGE REVIEWS</h5>
<p class="card-text-01">{{avgreviewlst}}/5</p>
<p class="extra"><i class="fas fa-arrow-up fa-lg"></i> Total Average <b>Reviews</b></p>
<!-- <a href="#" class="btn btn-primary">Go somewhere</a> -->
</div>
</div>
</div>
<!-- newwwww -->
</div>
<div class="container-fluid mt-4">
<h1 style="margin-bottom: 0px">PRODUCT TRACKING</h1>
<hr>
<br>
<form method="POST" action="">
<!-- <input class="btn login_btn" value="Login"> -->
{% csrf_token %}
<div>
<div class="row mb-1">
<div class="col-sm-7 my-1">
<!-- <label class="sr-only" for="inlineFormInputGroupUsername">Username</label> -->
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text"><i class="fas fa-external-link-alt"></i></div>
</div>
<input type="text" name="urls" placeholder="Enter URL OR SKU NUMBER of Product..."
class="form-control" value="{{urls}}">
</div>
</div>
<div class="form-check form-check-inline col-sm-2 m-1"
style="background-color: #cdcccc;padding:0px 40px;border-radius: 8px;font-weight: bold;margin-left: 7% !important;">
<input class="form-check-input" type="radio" name="URLS" value="URLS">
<label class="form-check-label" for="URLS">
URLS
</label>
</div>
<div class="form-check form-check-inline col-sm-2 m-1"
style="background-color: #cdcccc;padding:0px 40px;border-radius: 8px;font-weight: bold;">
<input class="form-check-input" type="radio" name="URLS" value="SKU">
<label class="form-check-label" for="SKU">
SKU
</label>
</div>
</div>
<input class="btn btn-primary btn-sm" type="submit" value="Add-Product" style="width: 100%;">
<!-- <br /> <br> -->
<!--
<div class="input-group-append">
<span class="input-group-text"><i class="fas fa-external-link-alt"></i></span>
</div>
<input type="text" name="urls" placeholder="Enter Url of Daraz of Product OR SKU-NUMBER of Product..."
class="form-control" value="{{urls}}"> -->
</div>
<br>
<div
style="width: 100%; height: 20px; border-bottom: 1px solid black; text-align: center; margin-top: 5px;margin-bottom: 20px;">
<span style="font-size: 11px;font-weight: bold; background-color: #F3F5F6; padding: 0 10px;">
OR
<!--Padding is optional-->
</span>
</div>
<br>
</form>
</div>
<!-- export file button form -->
<div class="container-fluid">
<form method="POST" action="/exporttocsv/" enctype="multipart/form-data">
{% csrf_token %}
<div class="textboxes mb-1">
<!-- <label for="formFile" class="form-label">Default file input example</label> -->
<input class="form-control" type="file" name="SAJJAD">
<!-- <input name="SAJJAD" type="file" /> -->
</div>
<!-- <input class="btn btn-primary btn-sm" type="submit" value="Export File" style="width: 100%;"> -->
<button class="btn btn-primary btn-sm" name="importcsv" type="file" style="width: 100%;">Import File <i
class="fa fa-file-csv"></i></button>
</form>
</div>
<br>
<div class="container-fluid" style="margin-top: 20px;">
<h1 style="margin-bottom: 0px">TRACKED DATA</h1>
<hr>
</div>
<div class="main">
<form method="POST" action="/exporttocsv/" enctype="multipart/form-data">
{% csrf_token %}
<div style="display: flex;justify-content:end;margin-bottom: 5px;">
<button name="exportcsv" type="submit"
style="background-color: springgreen;border-radius: 5px;padding: 5px 40px;font-weight: bold;">Export
File <i class="fa fa-file-csv"></i></button>
</div>
</form>
<table class="table" style="box-shadow: 0px 8px 24px rgba(149, 157, 165, 0.2);">
<thead style="background-color: #ff5c56;">
<tr>
<th class="custom-th" scope="col">#</th>
<th class="custom-th" scope="col">Product</th>
<th class="custom-th" scope="col">Action</th>
</tr>
</thead>
<tbody>
{% for data in datas %}
<tr>
<th class="custom-th" scope="row">{{ forloop.counter }}</th>
<td class="custom-td" style="text-align: start;">{{data.item_name}}</td>
<td class="custom-td"><a class="btn btn-primhassan" style="width: 60%;"
href="{% url 'product' data.id %}">View / Track</a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<!-- <div class="col-md-7" style="
position: relative;
left: -7px;
color: #f05f6c;
">
<h5 style="color: #f05f6c;">Tracked Data </h5>
<hr>
<div class="card card-body" style="
height: 415px;
color: #f05f6c;">
<h5 style="color: #f05f6c;">Tracked Data Average </h5>
<table style="width: 100%; height: 100%; font-size: 300%;">
<thead>
<tbody>
<tr class="table100-head">
<th class="column1">Avg Price</th>
<td class="column2">Rs {{avgpricelst}}</td>
</tr>
<tr>
<th>Avg Ratings</th>
<td>{{avgratinglst}}</td>
</tr>
<tr>
<th>Avg Review</th>
<td>{{avgreviewlst}}/5</td>
</tr>
</tbody>
</thead>
</div>
</div> -->
{% endblock %}
<!-- <div class="row">
<div class="col-md-5" style="position: relative;left: 11px">
<h5 style="position: relative;
color: #f05f6c;
">PRODUCT TRACKING</h5>
<hr>
<form method="POST" action="/exporttocsv/" enctype="multipart/form-data">
{% csrf_token %}
<div>
<span class="input-group-text">
<h6>Export To CSV</h6><button name="exportcsv" style="
position: absolute;
right: 27px;
width: 6%;
color: darkgreen;
background-color: springgreen;
" type="submit">
<i class="fa fa-file-csv"></i>
</button>
</span>
<span class="input-group-text">
<!-- <h6>Import From CSV</h6><button name="importcsv" style="
position: absolute;
right: 27px;
width: 6%;
color: darkgreen;
background-color: springgreen;
"type="file" >
<i class="fa fa-file-csv"></i>
</button> -->
<!-- <label class="custom-file-upload">
Import From CSV
<input name="SAJJAD" type="file" />
<button name="importcsv" style="
position: absolute;
right: 27px;
width: 6%;
color: darkgreen;
background-color: springgreen;
" type="file">
<i class="fa fa-file-csv"></i>
</button>
</label>
</span>
</div>
<div class="card card-body" style="position: relative;">
<div>
<div>
{% for data in datas %}
<h6>{{data.item_name}}<a class="btn btn-primhassan" href="{% url 'product' data.id %}">View</a>
</h6>
{% endfor %}
</div>
</div>
</div>
</div> --> -->