diff options
Diffstat (limited to 'gn3/templates/admin')
-rw-r--r-- | gn3/templates/admin/dashboard.html | 24 | ||||
-rw-r--r-- | gn3/templates/admin/list-oauth2-clients.html | 56 | ||||
-rw-r--r-- | gn3/templates/admin/login.html | 32 | ||||
-rw-r--r-- | gn3/templates/admin/register-client.html | 78 | ||||
-rw-r--r-- | gn3/templates/admin/registered-client.html | 21 | ||||
-rw-r--r-- | gn3/templates/admin/view-oauth2-client.html | 75 |
6 files changed, 0 insertions, 286 deletions
diff --git a/gn3/templates/admin/dashboard.html b/gn3/templates/admin/dashboard.html deleted file mode 100644 index 7798022..0000000 --- a/gn3/templates/admin/dashboard.html +++ /dev/null @@ -1,24 +0,0 @@ -{%extends "base.html"%} - -{%block title%}Genenetwork3: Admin Dashboard{%endblock%} - -{%block pagetitle%}Admin Dashboard{%endblock%} - -{%block content%} -{{flash_messages()}} - -<ul class="nav"> - <li> - <a href="{{url_for('oauth2.admin.register_client')}}" - title="Register a new OAuth2 client.">Register OAuth2 Client</a> - </li> - <li> - <a href="{{url_for('oauth2.admin.list_clients')}}" - title="List OAuth2 clients.">List OAuth2 Client</a> - </li> - <li> - <a href="{{url_for('oauth2.admin.logout')}}" - title="Log out of the system.">Logout</a> - </li> -</ul> -{%endblock%} diff --git a/gn3/templates/admin/list-oauth2-clients.html b/gn3/templates/admin/list-oauth2-clients.html deleted file mode 100644 index 0104f0d..0000000 --- a/gn3/templates/admin/list-oauth2-clients.html +++ /dev/null @@ -1,56 +0,0 @@ -{%extends "base.html"%} - -{%block title%}Genenetwork3: OAuth2 Clients{%endblock%} - -{%block pagetitle%}OAuth2 Clients{%endblock%} - -{%block content%} -{{flash_messages()}} - -<table class="table table-hover table-striped cell-border no-footer"> - <caption>List of registered OAuth2 clients</caption> - <thead> - <tr> - <th>Client ID</th> - <th>Client Name</th> - <th>Default Redirect URI</th> - <th>Owner</th> - <th colspan="2">Actions</th> - </tr> - </thead> - - <tbody> - {%for client in clients%} - <tr> - <td>{{client.client_id}}</td> - <td>{{client.client_metadata.client_name}}</td> - <td>{{client.client_metadata.default_redirect_uri}}</td> - <td>{{client.user.name}} ({{client.user.email}})</td> - <td> - <a href="{{url_for('oauth2.admin.view_client', client_id=client.client_id)}}" - title"View/Edit client {{client.client_metadata.client_name}}" - class="btn btn-info"> - View/Edit - </a> - </td> - <td> - <form id="frm:delete:{{client.client_id}}" - action="{{url_for('oauth2.admin.delete_client')}}" - method="POST"> - <input type="hidden" name="client_id" value="{{client.client_id}}" /> - <input type="submit" value="Delete" - title"Delete client {{client.client_metadata.client_name}}" - class="btn btn-danger" /> - </form> - </td> - </tr> - {%else%} - <tr> - <td colspan="4" style="text-align: center;"> - No registered OAuth2 clients! - </td> - </tr> - {%endfor%} - </tbody> -</table> -{%endblock%} diff --git a/gn3/templates/admin/login.html b/gn3/templates/admin/login.html deleted file mode 100644 index ac217ab..0000000 --- a/gn3/templates/admin/login.html +++ /dev/null @@ -1,32 +0,0 @@ -{%extends "base.html"%} - -{%block title%}Log in to Genenetwork3{%endblock%} - -{%block pagetitle%}Admin Log In{%endblock%} - -{%block content%} -{{flash_messages()}} - -<form method="POST" action="{{url_for('oauth2.admin.login')}}"> - - <fieldset> - <legend>User Credentials</legend> - - <input name="next_uri" type="hidden" value={{next_uri}}> - - <fieldset class="form-group"> - <label for="txt:email" class="form-label">Email Address</label> - <input name="email" type="email" id="txt:email" required="required" - placeholder="your@email.address" class="form-control" /> - </fieldset> - - <fieldset class="form-group"> - <label for="txt:password" class="form-label">Password</label> - <input name="password" type="password" id="txt:password" - required="required" class="form-control" /> - </fieldset> - </fieldset> - - <input type="submit" value="log in" class="btn btn-primary" /> -</form> -{%endblock%} diff --git a/gn3/templates/admin/register-client.html b/gn3/templates/admin/register-client.html deleted file mode 100644 index daac977..0000000 --- a/gn3/templates/admin/register-client.html +++ /dev/null @@ -1,78 +0,0 @@ -{%extends "base.html"%} - -{%block title%}Genenetwork3: Register OAuth2 Client{%endblock%} - -{%block pagetitle%}Register OAuth2 Client{%endblock%} - -{%block content%} -{{flash_messages()}} - -<form method="POST" action="{{url_for('oauth2.admin.register_client')}}"> - - <fieldset> - <legend>Select client scope</legend> - - {%for scp in scope%} - <input name="scope[]" id="chk:{{scp}}"type="checkbox" value="{{scp}}" - {%if scp=="profile"%}checked="checked"{%endif%} /> - <label for="chk:{{scp}}">{{scp}}</label><br /> - {%endfor%} - - </fieldset> - - <fieldset> - <legend>Basic OAuth2 client information</legend> - - - <label for="txt:client-name">Client name</label> - <input name="client_name" type="text" id="txt:client-name" - required="required" /> - <br /><br /> - - <label for="txt:redirect-uri">Redirect URI</label> - <input name="redirect_uri" type="text" id="txt:redirect-uri" - required="required" /> - <br /><br /> - - <label for="txt:other-redirect-uris"> - Other redirect URIs (Enter one URI per line)</label> - <br /> - <textarea name="other_redirect_uris" id="txt:other-redirect-uris" - cols="80" rows="10" - title="Enter one URI per line."></textarea> - <br /><br /> - <fieldset> - <legend>Supported grant types</legend> - <input name="grants[]" - type="checkbox" - value="authorization_code" - id="chk:authorization-code" - checked="checked" /> - <label for="chk:authorization-code">Authorization Code</label> - <br /><br /> - - <input name="grants[]" - type="checkbox" - value="refresh_token" - id="chk:refresh-token" /> - <label for="chk:refresh-token">Refresh Token</label> - </fieldset> - </fieldset> - - <fieldset> - <legend>User information</legend> - - <p>The user to register this client for</p> - <select name="user" required="required"> - {%for user in users%} - <option value="{{user.user_id}}" - {%if user.user_id==current_user.user_id%} - selected="selected" - {%endif%}>{{user.name}} ({{user.email}})</option> - {%endfor%} - </select> - </fieldset> - - <input type="submit" value="register client" /> -</form> -{%endblock%} diff --git a/gn3/templates/admin/registered-client.html b/gn3/templates/admin/registered-client.html deleted file mode 100644 index 5c46f4d..0000000 --- a/gn3/templates/admin/registered-client.html +++ /dev/null @@ -1,21 +0,0 @@ -{%extends "base.html"%} - -{%block title%}Genenetwork3: Register OAuth2 Client{%endblock%} - -{%block pagetitle%}Register OAuth2 Client{%endblock%} - -{%block content%} -{{flash_messages()}} - -<p>Client has been registered successfully.</p> - -<p>Please save the following client details somewhere. There is no way to - retrieve the the <strong>CLIENT_SECRET</strong> once you leave this page.</p> - -<dl> - <dt>CLIENT_ID</dt> - <dd>{{client.client_id}}</dd> - <dt>CLIENT_SECRET</dt> - <dd>{{client_secret}}</dd> -</dl> -{%endblock%} diff --git a/gn3/templates/admin/view-oauth2-client.html b/gn3/templates/admin/view-oauth2-client.html deleted file mode 100644 index b90428d..0000000 --- a/gn3/templates/admin/view-oauth2-client.html +++ /dev/null @@ -1,75 +0,0 @@ -{%extends "base.html"%} - -{%block title%}Genenetwork3: View OAuth2 Client{%endblock%} - -{%block pagetitle%}View OAuth2 Client{%endblock%} - -{%block content%} -{{flash_messages()}} - -{%if client.is_nothing()%} -<p>No such client</p> -{%else%} -{%set client = client.value%} -<form method="POST" action="{{url_for('oauth2.admin.edit_client')}}"> - <legend>View/Edit Oauth2 Client</legend> - <input type="hidden" name="client_id" value="{{client.client_id}}" /> - <div> - <p><strong>Client ID: <strong> {{client.client_id}}</p> - <p><strong>Client Name: <strong> {{client.client_metadata.client_name}}</p> - </div> - <fieldset> - <legend>Scope</legend> - {%for scp in scope%} - <input name="scope[]" id="chk:{{scp}}" type="checkbox" value="{{scp}}" - {%if scp in client.client_metadata.scope%} - checked="checked" - {%endif%} /> - <label for="chk:{{scp}}">{{scp}}</label><br /> - {%endfor%} - </fieldset> - - <fieldset> - <legend>Redirect URIs</legend> - <label for="txt:default-redirect-uri">Default Redirect URI</label> - <br /> - <input type="text" name="default_redirect_uri" id="txt:default-redirect-uri" - value="{{client.client_metadata.default_redirect_uri}}" - required="required"> - <br /><br /> - - <label for="txta:other-redirect-uris">Other Redirect URIs</label> - <br /> - <textarea id="txta:other-redirect-uris" - name="other_redirect_uris" - cols="80" rows="10" - title="Enter one URI per line." - >{{"\r\n".join(client.client_metadata.redirect_uris)}}</textarea> - </fieldset> - - <fieldset> - <legend>Grants</legend> - <input name="grants[]" - type="checkbox" - value="authorization_code" - id="chk:authorization-code" - {%if "authorization_code" in client.client_metadata.grant_types%} - checked="checked" - {%endif%} /> - <label for="chk:authorization-code">Authorization Code</label> - <br /><br /> - - <input name="grants[]" - type="checkbox" - value="refresh_token" - id="chk:refresh-token" - {%if "refresh_token" in client.client_metadata.grant_types%} - checked="checked" - {%endif%} /> - <label for="chk:refresh-token">Refresh Token</label> - </fieldset> - - <input type="submit" value="update client" /> -</form> -{%endif%} -{%endblock%} |