|
5 | 5 | url_for,
|
6 | 6 | render_template_string,
|
7 | 7 | jsonify,
|
| 8 | + render_template, |
8 | 9 | )
|
9 | 10 | import pymysql.cursors
|
10 | 11 | import json
|
|
32 | 33 |
|
33 | 34 | @app.route("/")
|
34 | 35 | def index():
|
35 |
| - html = """ |
36 |
| - <!DOCTYPE html> |
37 |
| - <html> |
38 |
| - <head> |
39 |
| - <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='style.css') }}"> |
40 |
| - </head> |
41 |
| - <body> |
42 |
| - <nav style="position: fixed; top: 0; left: 0; right: 0; background: white; padding: 3px; border-bottom: 1px solid #ccc;"> |
43 |
| - <a href="{{ url_for('index') }}"> |
44 |
| - <img src="{{ url_for('static', filename='integrity_service_logo_256.png') }}" alt="Logo" style="height:60px; vertical-align:middle;"> |
45 |
| - </a> |
46 |
| - </nav> |
47 |
| - <h1 style="margin-top: 80px;">Fileset Database</h1> |
48 |
| - <h2>Fileset Actions</h2> |
49 |
| - <ul> |
50 |
| - <li><a href="{{ url_for('fileset') }}">Fileset</a></li> |
51 |
| - <li><a href="{{ url_for('user_games_list') }}">User Games List</a></li> |
52 |
| - <li><a href="{{ url_for('ready_for_review') }}">Ready for review</a></li> |
53 |
| - <li><a href="{{ url_for('fileset_search') }}">Fileset Search</a></li> |
54 |
| - </ul> |
55 |
| - <h2>Logs</h2> |
56 |
| - <ul> |
57 |
| - <li><a href="{{ url_for('logs') }}">Logs</a></li> |
58 |
| - </ul> |
59 |
| - <form action="{{ url_for('clear_database') }}" method="POST"> |
60 |
| - <button style="margin:100px 0 0 0; background-color:red" type="submit"> Clear Database </button> |
61 |
| - </form> |
62 |
| - </body> |
63 |
| - </html> |
64 |
| - """ |
65 |
| - return render_template_string(html) |
| 36 | + return redirect(url_for("logs")) |
| 37 | + |
| 38 | + |
| 39 | +@app.route("/home") |
| 40 | +def home(): |
| 41 | + return render_template("home.html") |
66 | 42 |
|
67 | 43 |
|
68 | 44 | @app.route("/clear_database", methods=["POST"])
|
@@ -148,10 +124,18 @@ def fileset():
|
148 | 124 | <link rel="stylesheet" type="text/css" href="{{{{ url_for('static', filename='style.css') }}}}">
|
149 | 125 | </head>
|
150 | 126 | <body>
|
151 |
| - <nav style="position: fixed; top: 0; left: 0; right: 0; background: white; padding: 3px; border-bottom: 1px solid #ccc;"> |
152 |
| - <a href="{{{{ url_for('index') }}}}"> |
153 |
| - <img src="{{{{ url_for('static', filename='integrity_service_logo_256.png') }}}}" alt="Logo" style="height:60px; vertical-align:middle;"> |
154 |
| - </a> |
| 127 | + <nav> |
| 128 | + <div class="logo"> |
| 129 | + <a href="{{{{ url_for('home') }}}}"> |
| 130 | + <img src="{{{{ url_for('static', filename='integrity_service_logo_256.png') }}}}" alt="Logo"> |
| 131 | + </a> |
| 132 | + </div> |
| 133 | + <div class="nav-buttons"> |
| 134 | + <a href="{{{{ url_for('user_games_list') }}}}">User Games List</a> |
| 135 | + <a href="{{{{ url_for('ready_for_review') }}}}">Ready for review</a> |
| 136 | + <a href="{{{{ url_for('fileset_search') }}}}">Fileset Search</a> |
| 137 | + <a href="{{{{ url_for('logs') }}}}">Logs</a> |
| 138 | + </div> |
155 | 139 | </nav>
|
156 | 140 | <h2 style="margin-top: 80px;"><u>Fileset: {id}</u></h2>
|
157 | 141 | <table>
|
@@ -501,10 +485,18 @@ def merge_fileset(id):
|
501 | 485 | <link rel="stylesheet" type="text/css" href="{{{{ url_for('static', filename='style.css') }}}}">
|
502 | 486 | </head>
|
503 | 487 | <body>
|
504 |
| - <nav style="position: fixed; top: 0; left: 0; right: 0; background: white; padding: 3px; border-bottom: 1px solid #ccc;"> |
505 |
| - <a href="{{{{ url_for('index') }}}}"> |
506 |
| - <img src="{{{{ url_for('static', filename='integrity_service_logo_256.png') }}}}" alt="Logo" style="height:60px; vertical-align:middle;"> |
507 |
| - </a> |
| 488 | + <nav> |
| 489 | + <div class="logo"> |
| 490 | + <a href="{{{{ url_for('home') }}}}"> |
| 491 | + <img src="{{{{ url_for('static', filename='integrity_service_logo_256.png') }}}}" alt="Logo"> |
| 492 | + </a> |
| 493 | + </div> |
| 494 | + <div class="nav-buttons"> |
| 495 | + <a href="{{{{ url_for('user_games_list') }}}}">User Games List</a> |
| 496 | + <a href="{{{{ url_for('ready_for_review') }}}}">Ready for review</a> |
| 497 | + <a href="{{{{ url_for('fileset_search') }}}}">Fileset Search</a> |
| 498 | + <a href="{{{{ url_for('logs') }}}}">Logs</a> |
| 499 | + </div> |
508 | 500 | </nav>
|
509 | 501 | <h2 style="margin-top: 80px;">Search Results for '{search_query}'</h2>
|
510 | 502 | <form method="POST">
|
@@ -540,10 +532,18 @@ def merge_fileset(id):
|
540 | 532 | <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='style.css') }}">
|
541 | 533 | </head>
|
542 | 534 | <body>
|
543 |
| - <nav style="position: fixed; top: 0; left: 0; right: 0; background: white; padding: 3px; border-bottom: 1px solid #ccc;"> |
544 |
| - <a href="{{ url_for('index') }}"> |
545 |
| - <img src="{{ url_for('static', filename='integrity_service_logo_256.png') }}" alt="Logo" style="height:60px; vertical-align:middle;"> |
546 |
| - </a> |
| 535 | + <nav> |
| 536 | + <div class="logo"> |
| 537 | + <a href="{{ url_for('home') }}"> |
| 538 | + <img src="{{ url_for('static', filename='integrity_service_logo_256.png') }}" alt="Logo"> |
| 539 | + </a> |
| 540 | + </div> |
| 541 | + <div class="nav-buttons"> |
| 542 | + <a href="{{ url_for('user_games_list') }}">User Games List</a> |
| 543 | + <a href="{{ url_for('ready_for_review') }}">Ready for review</a> |
| 544 | + <a href="{{ url_for('fileset_search') }}">Fileset Search</a> |
| 545 | + <a href="{{ url_for('logs') }}">Logs</a> |
| 546 | + </div> |
547 | 547 | </nav>
|
548 | 548 | <h2 style="margin-top: 80px;">Search Fileset to Merge</h2>
|
549 | 549 | <form method="POST">
|
@@ -599,10 +599,18 @@ def possible_merge_filesets(id):
|
599 | 599 | <link rel="stylesheet" type="text/css" href="{{{{ url_for('static', filename='style.css') }}}}">
|
600 | 600 | </head>
|
601 | 601 | <body>
|
602 |
| - <nav style="position: fixed; top: 0; left: 0; right: 0; background: white; padding: 3px; border-bottom: 1px solid #ccc;"> |
603 |
| - <a href="{{{{ url_for('index') }}}}"> |
604 |
| - <img src="{{{{ url_for('static', filename='integrity_service_logo_256.png') }}}}" alt="Logo" style="height:60px; vertical-align:middle;"> |
605 |
| - </a> |
| 602 | + <nav> |
| 603 | + <div class="logo"> |
| 604 | + <a href="{{{{ url_for('home') }}}}"> |
| 605 | + <img src="{{{{ url_for('static', filename='integrity_service_logo_256.png') }}}}" alt="Logo"> |
| 606 | + </a> |
| 607 | + </div> |
| 608 | + <div class="nav-buttons"> |
| 609 | + <a href="{{{{ url_for('user_games_list') }}}}">User Games List</a> |
| 610 | + <a href="{{{{ url_for('ready_for_review') }}}}">Ready for review</a> |
| 611 | + <a href="{{{{ url_for('fileset_search') }}}}">Fileset Search</a> |
| 612 | + <a href="{{{{ url_for('logs') }}}}">Logs</a> |
| 613 | + </div> |
606 | 614 | </nav>
|
607 | 615 | <h2 style="margin-top: 80px;">Possible Merges for fileset-'{id}'</h2>
|
608 | 616 | <table>
|
@@ -731,10 +739,18 @@ def highlight_differences(source, target):
|
731 | 739 | <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='style.css') }}">
|
732 | 740 | </head>
|
733 | 741 | <body>
|
734 |
| - <nav style="position: fixed; top: 0; left: 0; right: 0; background: white; padding: 3px; border-bottom: 1px solid #ccc;"> |
735 |
| - <a href="{{ url_for('index') }}"> |
736 |
| - <img src="{{ url_for('static', filename='integrity_service_logo_256.png') }}" alt="Logo" style="height:60px; vertical-align:middle;"> |
737 |
| - </a> |
| 742 | + <nav> |
| 743 | + <div class="logo"> |
| 744 | + <a href="{{ url_for('home') }}"> |
| 745 | + <img src="{{ url_for('static', filename='integrity_service_logo_256.png') }}" alt="Logo"> |
| 746 | + </a> |
| 747 | + </div> |
| 748 | + <div class="nav-buttons"> |
| 749 | + <a href="{{ url_for('user_games_list') }}">User Games List</a> |
| 750 | + <a href="{{ url_for('ready_for_review') }}">Ready for review</a> |
| 751 | + <a href="{{ url_for('fileset_search') }}">Fileset Search</a> |
| 752 | + <a href="{{ url_for('logs') }}">Logs</a> |
| 753 | + </div> |
738 | 754 | </nav>
|
739 | 755 | <h2 style="margin-top: 80px;">Confirm Merge</h2>
|
740 | 756 | <form id="confirm_merge_form">
|
|
0 commit comments