iwla

iwla Commit Details

Date:2014-12-02 21:53:20 (6 years 7 months ago)
Author:Grégory Soutadé
Branch:dev, master
Commit:95023a5db3d2e90a20dff62fcf9944cb6bce4d67
Parents: 273bcd3526ec5d04eadac0e3a413a33eb1e94709
Message:Do a bunch of CSS and presentation

Changes:
Mdisplay.py (1 diff)
Miwla.py (1 diff)
Mresources/css/iwla.css (3 diffs)

File differences

display.py
204204
205205
206206
207
207
208208
209
210
209
210
211211
212212
213213
if style: style = ' class="%s"' % (style)
alt = '%s: %s' % (row[j], self.cols[j])
if self.maxes[j]:
height = int((self.raw_rows[i][j] * 100) / self.maxes[j])
height = int((self.raw_rows[i][j] * 100) / self.maxes[j]) or 1
else:
height = 0
html += '<img%s align="bottom" src="%s" height="%d" width="6" alt="%s" title="%s" />' % (style, icon, height, alt, alt)
height = 1
html += '<img%s src="%s" height="%d" width="6" alt="%s" title="%s" />' % (style, icon, height, alt, alt)
html += '</td>'
html += '</tr>'
html += '<tr>'
iwla.py
247247
248248
249249
250
251
250
251
252252
253253
254
254
255255
256256
257257
258258
259
259
260260
261261
262262
263
264
263
264
265
265266
266267
268
269
270
271
272
267273
268274
269275
nb_visits = 0
nb_days = 0
for i in range(0, nb_month_days):
cur_day = '%d %s' % (i+1, time.strftime('%b', cur_time))
full_cur_day = '%s %d' % (cur_day, cur_time.tm_year)
day = '%d<br/>%s' % (i+1, time.strftime('%b', cur_time))
full_day = '%d %s %d' % (i+1, time.strftime('%b', cur_time), cur_time.tm_year)
if i in self.current_analysis['days_stats'].keys():
stats = self.current_analysis['days_stats'][i]
row = [full_cur_day, stats['nb_visitors'], stats['viewed_pages'], stats['viewed_hits'],
row = [full_day, stats['nb_visitors'], stats['viewed_pages'], stats['viewed_hits'],
stats['viewed_bandwidth'], stats['not_viewed_bandwidth']]
nb_visits += stats['nb_visitors']
nb_days += 1
else:
row = [full_cur_day, 0, 0, 0, 0, 0]
row = [full_day, 0, 0, 0, 0, 0]
days.appendRow(row)
days.setCellValue(i, 4, bytesToStr(row[4]))
days.setCellValue(i, 5, bytesToStr(row[5]))
days.appendShortTitle(cur_day)
week_day = date(cur_time.tm_year, cur_time.tm_mon, i+1).weekday()
days.appendShortTitle(day)
adate = date(cur_time.tm_year, cur_time.tm_mon, i+1)
week_day = adate.weekday()
if week_day == 5 or week_day == 6:
days.setRowCSSClass(i, 'iwla_weekend')
if adate == date.today():
css = days.getCellCSSClass(i, 0)
if css: css = '%s %s' % (css, 'iwla_curday')
else: css = 'iwla_curday'
days.setCellCSSClass(i, 0, css)
stats = self.current_analysis['month_stats']
resources/css/iwla.css
4949
5050
5151
52
53
54
55
56
5257
5358
5459
......
6267
6368
6469
70
6571
6672
6773
......
6975
7076
7177
72
78
7379
7480
7581
76
82
83
84
85
86
87
vertical-align:middle;
}
td img
{
vertical-align:bottom;
}
td:first-child
{
text-align:left;
.iwla_bandwidth { background : #2EA495; }
.iwla_search { background : #F4F090; }
.iwla_weekend { background : #ECECEC; }
.iwla_curday { font-weight: bold; }
.iwla_graph_table
{
margin-right:auto;
}
table.iwla_graph_table > table.iwla_table
table.iwla_graph_table + table.iwla_table
{
margin-left:auto;
margin-right:auto;
}
}
table.iwla_graph_table td
{
text-align:center;
}

Archive Download the corresponding diff file

Branches

Tags