diff options
-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 | ||||
-rw-r--r-- | gn3/templates/base.html | 24 | ||||
-rw-r--r-- | gn3/templates/common-macros.html | 7 | ||||
-rw-r--r-- | gn3/templates/oauth2/authorise-user.html | 48 | ||||
-rw-r--r-- | gn3/templates/oauth2/oauth2_error.html | 16 |
10 files changed, 0 insertions, 381 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%} diff --git a/gn3/templates/base.html b/gn3/templates/base.html deleted file mode 100644 index db08545..0000000 --- a/gn3/templates/base.html +++ /dev/null @@ -1,24 +0,0 @@ -{% from "common-macros.html" import flash_messages%} -<!DOCTYPE html> -<html lang="en"> - <head> - <meta charset="utf-8" /> - <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - - <title>Genenetwork 3: {%block title%}{%endblock%}</title> - - <link rel="stylesheet" type="text/css" - href="https://genenetwork.org/static/new/css/bootstrap-custom.css" /> - <link rel="stylesheet" type="text/css" href="/static/css/styles.css" /> - {%block css%}{%endblock%} - </head> - - <body> - <h1>Genenetwork3: {%block pagetitle%}{%endblock%}</h1> - - <div class="container"> - {%block content%}{%endblock%} - </div> - {%block js%}{%endblock%} - <body> -</html> diff --git a/gn3/templates/common-macros.html b/gn3/templates/common-macros.html deleted file mode 100644 index 1d9f302..0000000 --- a/gn3/templates/common-macros.html +++ /dev/null @@ -1,7 +0,0 @@ -{%macro flash_messages()%} -<div class="alert-messages"> - {%for category,message in get_flashed_messages(with_categories=true)%} - <div class="alert {{category}}" role="alert">{{message}}</div> - {%endfor%} -</div> -{%endmacro%} diff --git a/gn3/templates/oauth2/authorise-user.html b/gn3/templates/oauth2/authorise-user.html deleted file mode 100644 index b9284e5..0000000 --- a/gn3/templates/oauth2/authorise-user.html +++ /dev/null @@ -1,48 +0,0 @@ -{%extends "base.html"%} - -{%block title%}Authorise User{%endblock%} - -{%block pagetitle%}Authenticate to the API Server{%endblock%} - -{%block content%} -{{flash_messages()}} - -<form method="POST" action="{{url_for('oauth2.auth.authorise')}}"> - <input type="hidden" name="response_type" value="{{response_type}}" /> - <input type="hidden" name="scope" value="{{scope | join(' ')}}" /> - <input type="hidden" name="client_id" value="{{client.client_id}}" /> - <p> - You are authorising "{{client.client_metadata.client_name}}" to access - Genenetwork 3 with the following scope: - </p> - <fieldset> - <legend>Scope</legend> - {%for scp in scope%} - <div class="checkbox disabled"> - <label for="scope:{{scp}}"> - <input id="scope:{{scp}}" type="checkbox" name="scope[]" value="{{scp}}" - checked="checked" disabled="disabled" /> - {{scp}} - </label> - </div> - {%endfor%} - </fieldset> - - <fieldset> - <legend>User Credentials</legend> - <fieldset class="form-group"> - <label for="user:email" class="form-label">Email</label> - <input type="email" name="user:email" id="user:email" required="required" - class="form-control"/> - </fieldset> - - <fieldset class="form-group"> - <label for="user:password" class="form-label">Password</label> - <input type="password" name="user:password" id="user:password" - required="required" class="form-control" /> - </fieldset> - </fieldset> - - <input type="submit" value="authorise" class="btn btn-primary" /> -</form> -{%endblock%} diff --git a/gn3/templates/oauth2/oauth2_error.html b/gn3/templates/oauth2/oauth2_error.html deleted file mode 100644 index ec9a500..0000000 --- a/gn3/templates/oauth2/oauth2_error.html +++ /dev/null @@ -1,16 +0,0 @@ -{%extends "base.html"%} - -{%block title%}OAuth2 Error{%endblock%} - -{%block pagetitle%}Error: {{error.status_code}}{%endblock%} - -{%block content%} -{{flash_messages()}} - -There was an error trying to fulfill your request: - -<p> - <strong>{{error.error}}</strong>: - {{error.description}} -</p> -{%endblock%} |