A GUI web-based tool to manage gem5 Resources. Can manage in two data sources, a MongoDB database or a JSON file. The JSON file can be both local or remote. JSON files are written to a temporary file before writing to the local file. The Manager supports the following functions on a high-level: - searching for a resource by ID - navigating to a resource version - adding a new resource - adding a new version to a resource - editing any information within a searched resource (while enforcing the gem5 Resources schema found at: https://resources.gem5.org/gem5-resources-schema.json) - deleting a resource version - undo and redo up to the last 10 operations The Manager also allows a user to save a session through localStorage and re-access it through a password securely. This patch also provides a Command Line Interface tool mainly for MongoDB-related functions. This CLI tool can currently: - backup a MongoDB collection to a JSON file - restore a JSON file to a MongoDB collection - search for a resource through its ID and view its JSON object - make a JSON file that is compliant with the gem5 Resources Schema Co-authored-by: Parth Shah <helloparthshah@gmail.com> Co-authored-by: Harshil2107 <harshilp2107@gmail.com> Co-authored-by: aarsli <arsli@ucdavis.edu> Change-Id: I8107f609c869300b5323d4942971a7ce7c28d6b5 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71218 Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu> Tested-by: kokoro <noreply+kokoro@google.com> Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
117 lines
3.2 KiB
HTML
117 lines
3.2 KiB
HTML
{% extends 'base.html' %} {% block head %}
|
|
<title>Resources Manager</title>
|
|
{% endblock %} {% block body %}
|
|
<div
|
|
class="modal fade"
|
|
id="savedSessionModal"
|
|
tabindex="-1"
|
|
aria-labelledby="savedSessionModal"
|
|
aria-hidden="true"
|
|
data-bs-backdrop="static"
|
|
>
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title secondary-text-semi" id="savedSessionModalLabel">
|
|
Load Saved Session
|
|
</h5>
|
|
<button
|
|
type="button"
|
|
id="close-load-session-modal"
|
|
class="btn-close"
|
|
data-bs-dismiss="modal"
|
|
aria-label="Close"
|
|
></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<h4 class="main-text-semi text-center">
|
|
Select Saved Session to Load & Enter Password.
|
|
</h4>
|
|
</div>
|
|
<form class="row mt-3">
|
|
<label
|
|
for="sessions-dropdown"
|
|
class="form-label main-text-regular ps-1"
|
|
>Saved Sessions</label
|
|
>
|
|
<select
|
|
id="sessions-dropdown"
|
|
class="form-select input-shadow"
|
|
aria-label="Select Session"
|
|
></select>
|
|
<label
|
|
for="session-password"
|
|
class="form-label main-text-regular ps-1 mt-3"
|
|
>Enter Password</label
|
|
>
|
|
<input
|
|
type="password"
|
|
class="form-control input-shadow main-text-regular"
|
|
id="session-password"
|
|
placeholder="Password..."
|
|
/>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button
|
|
id="loadSession"
|
|
type="button"
|
|
class="btn btn-outline-primary"
|
|
onclick="loadSession()"
|
|
>
|
|
Load Session
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<main>
|
|
<div
|
|
class="container-fluid d-flex justify-content-center main-panel-container"
|
|
>
|
|
<div
|
|
class="d-flex flex-column align-items-center justify-content-center panel-container"
|
|
>
|
|
<div class="d-flex flex-column align-items-center mb-3">
|
|
<div style="width: 50%">
|
|
<img
|
|
id="gem5RMImg"
|
|
class="img-fluid"
|
|
src="/static/images/gem5ResourcesManager.png"
|
|
alt="gem5"
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div class="d-flex flex-column justify-content-center mb-3 buttonGroup">
|
|
<button
|
|
id="showSavedSessionModal"
|
|
type="button"
|
|
class="btn btn-outline-primary btn-box-shadow mt-2 mb-2"
|
|
onclick="showSavedSessionModal()"
|
|
>
|
|
Load Saved Session
|
|
</button>
|
|
<a href="{{ url_for('login_mongodb') }}">
|
|
<button
|
|
class="btn btn-outline-primary btn-box-shadow mt-2 mb-2 w-100"
|
|
>
|
|
MongoDB
|
|
</button>
|
|
</a>
|
|
<a href="{{ url_for('login_json') }}">
|
|
<button
|
|
class="btn btn-outline-primary btn-box-shadow mt-2 mb-2 w-100"
|
|
>
|
|
JSON
|
|
</button>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
<script src="/static/js/index.js"></script>
|
|
{% endblock %}
|