-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from CESNET/feature/ro-api
Feature/ro api
- Loading branch information
Showing
25 changed files
with
618 additions
and
805 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.7.3" | ||
__version__ = "0.8.0" |
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
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,44 @@ | ||
{% extends 'layouts/default.html' %} | ||
{% from 'forms/macros.html' import render_field, render_checkbox_field %} | ||
{% block title %}Add New Machine with ApiKey{% endblock %} | ||
{% block content %} | ||
<h2>Add new ApiKey for machine.</h2> | ||
<p> | ||
In general, the keys should be Read Only and with expiration. | ||
If you need to create a full access Read/Write key, consider using usual user form | ||
with your organization settings. | ||
</p> | ||
|
||
<div class="row"> | ||
|
||
<div class="col-sm-12"> | ||
<h6>Machine Api Key: {{ generated_key }}</h6> | ||
</div> | ||
|
||
<form action="{{ url_for('admin.add_machine_key') }}" method="POST"> | ||
{{ form.hidden_tag() if form.hidden_tag }} | ||
<div class="row"> | ||
<div class="col-sm-5"> | ||
{{ render_field(form.machine) }} | ||
</div> | ||
<div class="col-sm-2"> | ||
{{ render_checkbox_field(form.readonly, checked="checked") }} | ||
</div> | ||
<div class="col-sm-5"> | ||
{{ render_field(form.expires) }} | ||
</div> | ||
</div> | ||
|
||
</div> | ||
<div class="row"> | ||
<div class="col-sm-10"> | ||
{{ render_field(form.comment) }} | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="col-sm-10"> | ||
<button type="submit" class="btn btn-primary">Save</button> | ||
</div> | ||
</div> | ||
|
||
{% endblock %} |
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,55 @@ | ||
{% extends 'layouts/default.html' %} | ||
{% block title %}ExaFS - ApiKeys{% endblock %} | ||
{% block content %} | ||
<h1>Machines and ApiKeys</h1> | ||
<p> | ||
This is the list of all machines and their API keys, created by admin(s). | ||
In general, the keys should be Read Only and with expiration. | ||
If you need to create a full access Read/Write key, use usual user form with your organization settings. | ||
</p> | ||
<table class="table table-hover"> | ||
<tr> | ||
<th>Machine address</th> | ||
<th>ApiKey</th> | ||
<th>Created by</th> | ||
<th>Created for</th> | ||
<th>Expires</th> | ||
<th>Read/Write ?</th> | ||
<th>Action</th> | ||
</tr> | ||
{% for row in keys %} | ||
<tr> | ||
<td> | ||
{{ row.machine }} | ||
</td> | ||
<td> | ||
{{ row.key }} | ||
</td> | ||
<td> | ||
{{ row.user.name }} | ||
</td> | ||
<td> | ||
{{ row.comment }} | ||
<td> | ||
{{ row.expires|strftime }} | ||
</td> | ||
<td> | ||
{% if not row.readonly %} | ||
<button type="button" class="btn btn-warning btn-sm" title="Read Only"> | ||
<i class="bi bi-exclamation-lg"></i> | ||
</button> | ||
|
||
{% endif %} | ||
</td> | ||
<td> | ||
<a class="btn btn-danger btn-sm" href="{{ url_for('admin.delete_machine_key', key_id=row.id) }}" role="button"> | ||
<i class="bi bi-x-lg"></i> | ||
</a> | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
<a class="btn btn-primary" href="{{ url_for('admin.add_machine_key') }}" role="button"> | ||
Add new Machine ApiKey | ||
</a> | ||
{% endblock %} |
Oops, something went wrong.