Skip to content

Commit d687902

Browse files
authored
merge: merge pull request #9 from n0rfas/dev
2 parents 79fcd26 + 7e734fe commit d687902

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Git-Analytics
22

3-
[![PyPI](https://img.shields.io/pypi/v/git-analytics.svg)](https://pypi.org/project/git-analytics/)
3+
[![PyPI](https://img.shields.io/pypi/v/git-analytics.svg?color=green)](https://pypi.org/project/git-analytics/)
44
[![Python Versions](https://img.shields.io/pypi/pyversions/git-analytics.svg)](https://pypi.org/project/git-analytics/)
55
[![code quality check](https://github.com/n0rfas/git-analytics/actions/workflows/code-check-dev.yml/badge.svg?branch=dev)](https://github.com/n0rfas/git-analytics/tree/dev)
66
[![python versions check](https://github.com/n0rfas/git-analytics/actions/workflows/python-matrix-main.yml/badge.svg?branch=main)](https://github.com/n0rfas/git-analytics/tree/main)

git_analytics/static/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,5 +168,18 @@ <h1 class="h3 mb-4">Other statistics</h1>
168168
<script src="js/bootstrap.bundle.min.js"></script>
169169
<script src="js/chart.umd.min.js"></script>
170170
<script src="js/git-analytics.js"></script>
171+
172+
<!-- Loading Modal -->
173+
<div class="modal fade" id="loadingModal" tabindex="-1" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
174+
<div class="modal-dialog modal-dialog-centered">
175+
<div class="modal-content text-center">
176+
<div class="modal-body">
177+
<div class="spinner-border text-primary mb-3" role="status"></div>
178+
<p class="mb-0"><strong>Analyzing repository. Please wait...</strong></p>
179+
</div>
180+
</div>
181+
</div>
182+
</div>
183+
171184
</body>
172185
</html>

git_analytics/static/js/git-analytics.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,11 @@ async function fetchStatistics() {
392392

393393
document.addEventListener("DOMContentLoaded", async () => {
394394
try {
395+
const modalEl = document.getElementById("loadingModal");
396+
const modal = new bootstrap.Modal(modalEl, { backdrop: "static", keyboard: false });
397+
modal.show();
395398
const stats = await fetchStatistics();
399+
modal.hide();
396400
const authorsData = stats.authors_statistics.authors;
397401
renderSummary(stats);
398402
buildAuthorsChart(authorsData);

0 commit comments

Comments
 (0)