Skip to content

Commit a7dc15a

Browse files
committed
Removed a function that is not used
1 parent f4cf2e7 commit a7dc15a

File tree

5 files changed

+2
-41
lines changed

5 files changed

+2
-41
lines changed

flask_monitoringdashboard/core/auth.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,6 @@ def is_admin():
4646
return session and session.get(config.link + '_admin')
4747

4848

49-
def check_login(name, password):
50-
if name == config.username and password == config.password:
51-
on_login(admin=True)
52-
return True
53-
elif name == config.guest_username and password in config.guest_password:
54-
on_login(admin=False)
55-
return True
56-
return False
57-
58-
5949
def on_login(admin):
6050
session[config.link + '_logged_in'] = True
6151
if admin:

flask_monitoringdashboard/database/request.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ def get_latencies_sample(session, endpoint_id, interval, sample_size=500):
1717
.limit(sample_size)
1818
)
1919

20-
# dialect = session.bind.dialect.name
21-
# if dialect == 'sqlite':
22-
# query = query.order_by(func.random())
23-
# elif dialect == 'mysql':
24-
# query = query.order_by(func.rand())
25-
2620
return [item.duration for item in query.all()]
2721

2822

flask_monitoringdashboard/static/pages/configuration.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@
1717
</tr>
1818
<tr>
1919
<td><b>Guest username</b></td>
20-
<td>
21-
<ul>
22-
<li ng-repeat="name in config.guest_username">{{ name }}</li>
23-
</ul>
24-
</td>
20+
<td>{{ config.guest_username }}</td>
2521
</tr>
2622
<tr>
2723
<td><b>Collecting outlier data?</b></td>

tests/api/test_endpoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def test_overview(dashboard_user, request_1, request_2, endpoint, session):
99
assert response.status_code == 200
1010

1111
[data] = [row for row in response.json if row['id'] == endpoint.id]
12-
print(data)
12+
1313
assert data['hits-overall'] == 2
1414
assert data['hits-today'] == 2
1515
assert data['hits-today-errors'] == 0

tests/unit/core/test_auth.py

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)