Skip to content

Commit

Permalink
[CHORE] Remove old stats/logs pages + typescript (#4505)
Browse files Browse the repository at this point in the history
**Description**

Removes outdated resources (html, routes and typescript) after #4474 was merged.

Fixes #4475

**How to test**

- CI should cover most
- Check if stats pages for teachers and admins work

**Checklist**
Done? Check if you have it all in place using this list: (mark with x if done)

- [x] Contains one of the PR categories in the name
- [x] Describes changes in the format above
- [x] Links to an existing issue or discussion
- [x] Has a "How to test" section
  • Loading branch information
jtwaleson authored Sep 22, 2023
1 parent 92c82e9 commit a9cf603
Show file tree
Hide file tree
Showing 23 changed files with 35 additions and 1,410 deletions.
2 changes: 1 addition & 1 deletion static/css/generated.css

Large diffs are not rendered by default.

48 changes: 23 additions & 25 deletions static/js/appbundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/js/appbundle.js.map

Large diffs are not rendered by default.

13 changes: 1 addition & 12 deletions static/js/initialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { initializeApp, initializeCodePage, InitializeCodePageOptions, initializ
import { initializeFormSubmits } from './auth';
import { setClientMessageLanguage } from './client-messages';
import { logs } from './logs';
import { InitializeAdminStatsOptions, InitializeClassStatsPageOptions, stats } from './statistics';
import { initializeClassOverviewPage, InitializeClassOverviewPageOptions, initializeCustomizeClassPage, InitializeCustomizeClassPageOptions, initializeTeacherPage, InitializeTeacherPageOptions } from './teachers';
import { initializeTutorial } from './tutorials/tutorial';

Expand Down Expand Up @@ -53,9 +52,7 @@ type InitializePageOptions =
| InitializeTeacherPageOptions
| InitializeViewProgramPageOptions
| InitializeClassOverviewPageOptions
| InitializeAdminStatsOptions
| InitializeAdminUsersPageOptions
| InitializeClassStatsPageOptions
;


Expand Down Expand Up @@ -95,14 +92,6 @@ export function initialize(options: InitializeOptions) {
initializeViewProgramPage(options.javascriptPageOptions);
break;

case 'admin-stats':
stats.initializeAdminStats();
break;

case 'class-stats':
stats.initializeClassStats();
break;

case 'admin-users':
initializeAdminUserPage(options.javascriptPageOptions);
break;
Expand All @@ -112,4 +101,4 @@ export function initialize(options: InitializeOptions) {
if (options.logs) {
logs.initialize();
}
}
}
550 changes: 0 additions & 550 deletions static/js/statistics.ts

Large diffs are not rendered by default.

47 changes: 0 additions & 47 deletions templates/admin/admin-classes.html

This file was deleted.

17 changes: 0 additions & 17 deletions templates/admin/admin-logs.html

This file was deleted.

163 changes: 0 additions & 163 deletions templates/admin/admin-stats.html

This file was deleted.

3 changes: 0 additions & 3 deletions templates/admin/admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@
<h1 class="text-center">Admin overview</h1>
<div class="flex flex-wrap gap-4 items-center justify-center">
<button class="green-btn p-4" id="users_button" onclick="window.open('/admin/users', '_self')">Users overview</button>
<button class="green-btn p-4" onclick="window.open('/admin/classes', '_self')">Classes overview</button>
<button class="green-btn p-4" onclick="window.open('/admin/adventures', '_self')">Adventures overview</button>
<button class="green-btn p-4" onclick="window.open('/admin/achievements', '_self')">Achievements overview</button>
<button class="green-btn p-4" onclick="window.open('/admin/stats', '_self')">Statistics</button>
<button class="green-btn p-4" onclick="window.open('/admin/logs', '_self')">Logs</button>
</div>
</div>
{% endblock %}
17 changes: 0 additions & 17 deletions templates/class-logs.html

This file was deleted.

Loading

0 comments on commit a9cf603

Please sign in to comment.