This repository has been archived by the owner on Oct 13, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ui): improve speed of dashboard by caching data (#224)
- Loading branch information
1 parent
4f9ffa3
commit dfda394
Showing
7 changed files
with
112 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{% extends 'base.html' %} | ||
{% block modals %} | ||
{% endblock modals %} | ||
|
||
{% block content %} | ||
<div class="container px-auto my-5"> | ||
<div class="col-lg-12 mx-auto" id="themerr-container" style="min-width: 335px"> | ||
|
||
<h2 class="text-center text-white">{{ _('Database is being cached, please try again soon.') }}</h2> | ||
|
||
</div> | ||
</div> | ||
{% endblock content %} | ||
|
||
{% block scripts %} | ||
{% endblock scripts %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# standard imports | ||
import json | ||
import os | ||
|
||
# local imports | ||
from Code import webapp | ||
|
||
|
||
def test_cache_data(): | ||
webapp.cache_data() | ||
assert os.path.isfile(webapp.database_cache_file), "Database cache file not found" | ||
|
||
with open(webapp.database_cache_file, 'r') as f: | ||
data = json.load(f) | ||
|
||
assert data, "Database cache file is empty" |