From patchwork Wed Nov 9 19:26:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zygmunt Krynicki X-Patchwork-Id: 4991 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id F399623E51 for ; Wed, 9 Nov 2011 19:26:19 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id E4B7EA1810C for ; Wed, 9 Nov 2011 19:26:19 +0000 (UTC) Received: by mail-fx0-f52.google.com with SMTP id n26so2870852faa.11 for ; Wed, 09 Nov 2011 11:26:19 -0800 (PST) Received: by 10.152.105.83 with SMTP id gk19mr2501830lab.30.1320866779614; Wed, 09 Nov 2011 11:26:19 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.10.72 with SMTP id g8cs183733lab; Wed, 9 Nov 2011 11:26:19 -0800 (PST) Received: by 10.216.163.149 with SMTP id a21mr61852wel.86.1320866776581; Wed, 09 Nov 2011 11:26:16 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id c4si3316954wed.40.2011.11.09.11.26.16 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 09 Nov 2011 11:26:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1RODmq-0000et-1w for ; Wed, 09 Nov 2011 19:26:16 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 06237E01E4 for ; Wed, 9 Nov 2011 19:26:16 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-server X-Launchpad-Branch: ~linaro-validation/lava-server/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 279 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-server/trunk] Rev 279: Rewrite API templates. Message-Id: <20111109192616.3833.16085.launchpad@ackee.canonical.com> Date: Wed, 09 Nov 2011 19:26:16 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="14263"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 22a090d737d58c4a673870b247c887e5f7554f97 ------------------------------------------------------------ revno: 279 committer: Zygmunt Krynicki branch nick: lava-server timestamp: Wed 2011-11-09 00:52:22 +0100 message: Rewrite API templates. Reuse more code from base templates, especially the new form layout. Use the sidebar sensibly (or don't use it at all), reword some text to make it clearer what's going on. removed: lava_server/templates/linaro_django_xmlrpc/_base.html modified: lava_server/templates/linaro_django_xmlrpc/api.html lava_server/templates/linaro_django_xmlrpc/authtoken_confirm_delete.html lava_server/templates/linaro_django_xmlrpc/create_token.html lava_server/templates/linaro_django_xmlrpc/edit_token.html lava_server/templates/linaro_django_xmlrpc/tokens.html --- lp:lava-server https://code.launchpad.net/~linaro-validation/lava-server/trunk You are subscribed to branch lp:lava-server. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-server/trunk/+edit-subscription === removed file 'lava_server/templates/linaro_django_xmlrpc/_base.html' --- lava_server/templates/linaro_django_xmlrpc/_base.html 2011-09-16 09:46:32 +0000 +++ lava_server/templates/linaro_django_xmlrpc/_base.html 1970-01-01 00:00:00 +0000 @@ -1,25 +0,0 @@ -{% extends "layouts/content_with_sidebar.html" %} -{% load i18n %} - - -{% block title %} -{{ block.super }} | {% trans "XML-RPC" %} -{% endblock %} - - -{% block navigation %} - -{% endblock %} - - -{% block breadcrumbs %} -{{ block.super }} -
  • {% trans "Available Methods" %}
  • -{% endblock %} === modified file 'lava_server/templates/linaro_django_xmlrpc/api.html' --- lava_server/templates/linaro_django_xmlrpc/api.html 2011-07-13 18:27:25 +0000 +++ lava_server/templates/linaro_django_xmlrpc/api.html 2011-11-08 23:52:22 +0000 @@ -1,13 +1,30 @@ -{% extends "linaro_django_xmlrpc/_base.html" %} +{% extends "layouts/content.html" %} {% load markup %} {% load i18n %} -{% block title %}{{ block.super }} | {% trans "XML-RPC Handler" %}{% endblock %} +{% block title %} +{{ block.super }} | {% trans "XML-RPC" %} +{% endblock %} {% block breadcrumbs %} {{ block.super }} +
  • {% trans "LAVA" %}
  • +
  • {% trans "API" %}
  • +
  • {% trans "Available Methods" %}
  • +{% endblock %} + + +{% block navigation %} + {% endblock %} === modified file 'lava_server/templates/linaro_django_xmlrpc/authtoken_confirm_delete.html' --- lava_server/templates/linaro_django_xmlrpc/authtoken_confirm_delete.html 2011-07-12 02:22:10 +0000 +++ lava_server/templates/linaro_django_xmlrpc/authtoken_confirm_delete.html 2011-11-08 23:52:22 +0000 @@ -1,12 +1,19 @@ -{% extends "linaro_django_xmlrpc/_base.html" %} +{% extends "layouts/form.html" %} {% load i18n %} -{% block title %}{{ block.super }} | {% trans "API Tokens" %} | {% trans "Delete Token" %} {{ token.pk }}{% endblock %} +{% block title %} +{{ block.super }} +| {% trans "API" %} +| {% trans "Authentication Tokens" %} +| {% trans "Delete Token" %} {{ token.pk }} +{% endblock %} {% block breadcrumbs %} {{ block.super }} +
  • {% trans "LAVA" %}
  • +
  • {% trans "API" %}
  • {% trans "Authentication Tokens" %}
  • @@ -16,22 +23,21 @@ {% endblock %} - -{% block content %} -
    - {% csrf_token %} -

    Would you like to delete {{ token }} - {% if token.description %} - with description “{{ token.description }}”? - {% else %} - with no description? - {% endif %} -

    - -
    - +{% block form_header %} +

    Would you like to delete {{ token }} +{% if token.description %} +with description “{{ token.description }}”? +{% else %} +with no description? +{% endif %} +

    +{% endblock %} + + +{% block form_footer %} +

    Continue

    + +or cancel {% endblock %} === modified file 'lava_server/templates/linaro_django_xmlrpc/create_token.html' --- lava_server/templates/linaro_django_xmlrpc/create_token.html 2011-07-12 02:22:10 +0000 +++ lava_server/templates/linaro_django_xmlrpc/create_token.html 2011-11-08 23:52:22 +0000 @@ -1,36 +1,38 @@ -{% extends "linaro_django_xmlrpc/_base.html" %} +{% extends "layouts/form.html" %} {% load i18n %} -{% block title %}{{ block.super }} | {% trans "API Tokens" %} | {% trans "Create" %}{% endblock %} +{% block title %} +{{ block.super }} +| {% trans "API" %} +| {% trans "Authentication Tokens" %} +| {% trans "Create" %} +{% endblock %} {% block breadcrumbs %} {{ block.super }} -
  • {% trans "Authentication Tokens" %}
  • -
  • {% trans "Create Token" %}
  • +
  • {% trans "LAVA" %}
  • +
  • {% trans "API" %}
  • +
  • {% trans "Authentication Tokens" %}
  • +
  • {% trans "Create Token" %}
  • {% endblock %} -{% block content %} +{% block form_header %}

    Create new authentication token

    -

    - It makes sense to create a token for each script you want to give - access to LAVA, so you can delete a particular token if you suspect - it has been compromised without disrupting other scripts. -

    -

    - You can give each token a description, so you can know which is - which. -

    -
    - {% csrf_token %} -

    - - -

    -

    - -

    -
    +{% endblock %} + + +{% block form_footer %} +{{ block.super }} +or cancel {% endblock %} === modified file 'lava_server/templates/linaro_django_xmlrpc/edit_token.html' --- lava_server/templates/linaro_django_xmlrpc/edit_token.html 2011-07-12 02:22:10 +0000 +++ lava_server/templates/linaro_django_xmlrpc/edit_token.html 2011-11-08 23:52:22 +0000 @@ -1,13 +1,22 @@ -{% extends "linaro_django_xmlrpc/_base.html" %} +{% extends "layouts/form.html" %} {% load i18n %} -{% block title %}{{ block.super }} | {% trans "API Tokens" %} | {% trans "Edit Token" %} {{ token.pk }}{% endblock %} +{% block title %} +{{ block.super }} +| {% trans "API" %} +| {% trans "Authentication Tokens" %} +| {% trans "Edit Token" %} {{ token.pk }} +{% endblock %} {% block breadcrumbs %} {{ block.super }}
  • {% trans "LAVA" %}
  • +
  • {% trans "API" %}
  • +
  • {% trans "Authentication Tokens" %}
  • Edit token {{ token.pk }} -
    - {% csrf_token %} -

    - - -

    -

    - -

    -
    - +{% endblock %} + + +{% block form_footer %} +{{ block.super }} +or
    cancel {% endblock %} === modified file 'lava_server/templates/linaro_django_xmlrpc/tokens.html' --- lava_server/templates/linaro_django_xmlrpc/tokens.html 2011-08-18 15:01:52 +0000 +++ lava_server/templates/linaro_django_xmlrpc/tokens.html 2011-11-08 23:52:22 +0000 @@ -1,4 +1,4 @@ -{% extends "linaro_django_xmlrpc/_base.html" %} +{% extends "layouts/content_with_sidebar.html" %} {% load i18n %} @@ -8,75 +8,76 @@ {% endblock %} -{% block title %}{{ block.super }} | {% trans "API Tokens" %}{% endblock %} +{% block title %}{{ block.super }} | {% trans "API" %} | {% trans "Authentication Tokens" %}{% endblock %} {% block breadcrumbs %} {{ block.super }} +
  • {% trans "LAVA" %}
  • +
  • {% trans "API" %}
  • {% trans "Authentication Tokens" %}
  • {% endblock %} +{% block sidebar %} +

    Actions

    + +{% endblock %} + + {% block content %} - - - - - - - - - - - - - - - {% for token in token_list %} - - - - - - - - - {% endfor %} - -
    - Available authentication tokens for {{ request.user.username }} -
    ID{% trans "Description" %}{% trans "Created On" %}{% trans "Last Used On" %}{% trans "Secret" %}{% trans "Actions" %}
    {{ token.pk }}{{ token.description|default:"empty" }}{{ token.created_on|date }}{{ token.last_used_on|default_if_none:"Never" }} - - - {% trans "Delete" %} - {% trans "Edit" %} - - -
    -{% endblock %} - - -{% block sidebar %} -

    - Authentication tokens allow scripts - using lava-tool to - securely access LAVA resources. -

    -

    You can create a new authentication token.

    + +{% empty %} +

    You don't have any tokens yet.

    +{% endfor %} {% endblock %}