From 0754430c86db40e67d19f6d992d9d51c032e661e Mon Sep 17 00:00:00 2001 From: Zev Benjamin Date: Wed, 19 Jun 2013 17:46:11 -0400 Subject: [PATCH] Make portico pages structurally valid HTML There were a few things the W3C validator complained about that I didn't bother fixing (like img tags without alt attributes and obsolete tags). There also a few pages that were slightly more annoying to get my local instance to render (like the 404 and 500 error pages), so I checked those by eye. This does not cover the actual app at all. (imported from commit 1cbe1ec11067e96718814ec23eaf5a8b4b68ef19) --- templates/zephyr/api.html | 7 ++++--- templates/zephyr/api_content.json | 4 ++-- templates/zephyr/api_endpoints.html | 4 +--- templates/zephyr/apps.html | 13 +++++++------ templates/zephyr/integrations.html | 18 +++++++++--------- templates/zephyr/login.html | 5 +++-- templates/zephyr/new-user.html | 1 + templates/zephyr/reset_confirm.html | 2 +- templates/zephyr/reset_done.html | 2 +- 9 files changed, 29 insertions(+), 27 deletions(-) diff --git a/templates/zephyr/api.html b/templates/zephyr/api.html index 1c3cd46c56..ca6c622e1d 100644 --- a/templates/zephyr/api.html +++ b/templates/zephyr/api.html @@ -13,7 +13,7 @@

We have a well-documented API that allows you to build custom integrations, in addition to our existing integrations. For ease-of-use, we've created a Python module that you can drop in to a project to start interacting with our API.


- Download Python bindings and examples + Download Python bindings and examples Version 0.1.9

 

@@ -119,11 +119,11 @@ to pull out the resulting HTML :)

Stream message

humbug-send --stream Denmark --subject Castle \
---user othello-bot@example.com --api-key a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5
+--user othello-bot@example.com --api-key a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5

Private message

humbug-send wdaher@humbughq.com --user othello-bot@example.com \
---api-key a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5
+--api-key a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5
 

Passing in the message on the command-line

@@ -136,6 +136,7 @@ to pull out the resulting HTML :)

See also the full API endpoint documentation.

+ {% endblock %} diff --git a/templates/zephyr/api_content.json b/templates/zephyr/api_content.json index 58ac9a56b6..985c899a01 100644 --- a/templates/zephyr/api_content.json +++ b/templates/zephyr/api_content.json @@ -20,7 +20,7 @@ ] ], "example_request": { - "python": "
client.get_messages()\n
", + "python": "
client.get_messages()\n
", "curl": "
curl -G https://humbughq.com/api/v1/messages/latest \\\n -u othello-bot@example.com:a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5 \\\n -d \"last=102345\"\n
" } }, @@ -53,7 +53,7 @@ ] ], "example_request": { - "python": "
\nclient.send_message({\n    \"type\": \"private\",\n    \"to\": \"wdaher@humbughq.com\",\n    \"content\": \"I come not, friends, to steal away your hearts.\"\n})\nclient.send_message({\n    \"type\": \"stream\",\n    \"to\": \"Denmark\",\n    \"subject\": \"Castle\",\n    \"content\": \"Something is rotten in the state of Denmark.\"\n})\n
\n", + "python": "
\nclient.send_message({\n    \"type\": \"private\",\n    \"to\": \"wdaher@humbughq.com\",\n    \"content\": \"I come not, friends, to steal away your hearts.\"\n})\nclient.send_message({\n    \"type\": \"stream\",\n    \"to\": \"Denmark\",\n    \"subject\": \"Castle\",\n    \"content\": \"Something is rotten in the state of Denmark.\"\n})\n
\n", "curl": "
Stream message
\n
curl https://humbughq.com/api/v1/messages \\\n    -u BOT_EMAIL_ADDRESS:BOT_API_KEY \\\n    -d \"type=stream\" \\\n    -d \"to=Denmark\" \\\n    -d \"subject=Castle\" \\\n    -d \"content=Something is rotten in the state of Denmark.\"\n
\n
Private message
\n
curl https://humbughq.com/api/v1/messages \\\n    -u BOT_EMAIL_ADDRESS:BOT_API_KEY \\\n    -d \"type=private\" \\\n    -d \"to=wdaher@humbughq.com\" \\\n    -d \"content=I come not, friends, to steal away your hearts.\"\n
" } } diff --git a/templates/zephyr/api_endpoints.html b/templates/zephyr/api_endpoints.html index 55e54e77b1..f4a5617553 100644 --- a/templates/zephyr/api_endpoints.html +++ b/templates/zephyr/api_endpoints.html @@ -30,7 +30,7 @@ {% autoescape off %} {% for blurb in content %} -
+

{{ blurb.call }}

{{ blurb.endpoint }}
@@ -46,7 +46,6 @@ {% for return in blurb.returns %}
{{ return.0 }}
{{ return.1 }}
- {% endfor %} {%if blurb.example_request %} @@ -69,6 +68,5 @@
-
{% endblock %} diff --git a/templates/zephyr/apps.html b/templates/zephyr/apps.html index 6d37e86aca..e44e4aa955 100644 --- a/templates/zephyr/apps.html +++ b/templates/zephyr/apps.html @@ -46,7 +46,7 @@

Humbug has a 100% native app for iPhone, and we're in the process of getting it into the App Store. For now, - please email + please email us to request access.

@@ -58,7 +58,7 @@ easy to keep track of.

- Download Humbug for Mac + Download Humbug for Mac

@@ -67,28 +67,28 @@

We recommend making - a Chrome + a Chrome Application Shortcut for Humbug, so that it can appear on your system like a native application. Alternatively, we recommend simply pinning the Humbug tab in your browser.

You can find instructions for how to make a Chrome Application - Shortcut here.

+ Shortcut here.

We recommend making - a Chrome + a Chrome Application Shortcut for Humbug, so that it can appear on your system like a native application. Alternatively, we recommend simply pinning the Humbug tab in your browser.

You can find instructions for how to make a Chrome Application - Shortcut here.

+ Shortcut here.

@@ -109,6 +109,7 @@ + {% endblock %} diff --git a/templates/zephyr/integrations.html b/templates/zephyr/integrations.html index 183d21b704..cf1b99273e 100644 --- a/templates/zephyr/integrations.html +++ b/templates/zephyr/integrations.html @@ -111,7 +111,7 @@ another step of your deployment process, if you'd like the notification to fire at a different time. -

+

Congratulations! You're done!
Whenever you do a deployment, you'll get an automated notification that looks like @@ -235,8 +235,7 @@ following, to the stream commits with a subject that matches the re

  • Does the stream you picked (e.g. jenkins) already exist? If not, add yourself to it and try again.
  • Are your access key and email address correct? Test them using our curl API.
  • Still stuck? Email support@humbughq.com.
  • -

    - +

    ^ Back to top

    @@ -251,11 +250,11 @@ following, to the stream commits with a subject that matches the re mechanism that supports older versions of JIRA.

    In your JIRA administration control panel, go to the Webhooks page. If you are using the OnDemand hosted JIRA, follow the instructions - on the Atlassian wiki for locating the Webhook UI. + on the Atlassian wiki for locating the Webhook UI.

    Give your new web hook a name, and for the URL provide the following:

    - https://humbughq.com/api/v1/external/jira?api_key=abcdefgh&stream=jira + https://humbughq.com/api/v1/external/jira?api_key=abcdefgh&stream=jira

    where api_key is the API key of the user you @@ -291,14 +290,14 @@ following, to the stream commits with a subject that matches the re follow the on-screen instructions and restart JIRA for it to recognize the proper certificates.

    Humbug Integration

    Copy the folder integrations/jira/org/ (from the tarball you downloaded above) to your JIRA classes folder. - For self-contained JIRA installations, this will be atlassian-jira/WEB-INF/classes/, but this may be different in your deployment.

    + For self-contained JIRA installations, this will be atlassian-jira/WEB-INF/classes/, but this may be different in your deployment. Edit the constants at the top of org/humbug/jira/HumbugListener.groovy and fill them with the appropriate values:
    String humbugEmail = "jira-notifications-bot@example.com"
     String humbugAPIKey = "0123456789abcdef0123456789abcdef"
     String humbugStream = "JIRA"
     String issueBaseUrl = "https://jira.COMPANY.com/browse/"
    -

    +

    In the Administrators page, navigate to Plugins > Other > Script Listeners. In the Add Listener section, click on the Custom Listener option. Select the events you wish the Humbug integration to fire for, and the projects you wish Humbug to be notified for. In the Name of groovy class field, enter org.humbug.jira.HumbugListener. @@ -346,7 +345,7 @@ key=NAGIOS_BOT_API_KEY Once you've done that, reload your Nagios configuration - using /etc/init.d/nagios3 reload.

    + using /etc/init.d/nagios3 reload.

    Congratulations! You're done!
    When your Nagios system makes an alert, you'll see a message like the following, @@ -382,7 +381,7 @@ key=NAGIOS_BOT_API_KEY

    Humbug supports Pivotal Tracker integration and can notify you of changes to the stories in your Pivotal Tracker project. In the Settings page for your project, choose the Integrations tab. Scroll down to the Activity Web Hook section, and enter the following url:

    -

    https://humbughq.com/api/v1/external/pivotal?api_key=abcdefgh&stream=pivotal

    +

    https://humbughq.com/api/v1/external/pivotal?api_key=abcdefgh&stream=pivotal

    where api_key is the API key of the user you want updates to be sent as, and stream is the stream name you want the notifications sent to, and the stream must already exist.

    @@ -480,6 +479,7 @@ key=NAGIOS_BOT_API_KEY ^ Back to top

    + {% endblock %} diff --git a/templates/zephyr/login.html b/templates/zephyr/login.html index c91b4a191b..4e8823d86a 100644 --- a/templates/zephyr/login.html +++ b/templates/zephyr/login.html @@ -46,8 +46,9 @@ autofocus('#id_username');
    diff --git a/templates/zephyr/new-user.html b/templates/zephyr/new-user.html index b523ea937e..2b659f96b7 100644 --- a/templates/zephyr/new-user.html +++ b/templates/zephyr/new-user.html @@ -50,4 +50,5 @@

    You're ready to go!

    If you have any feedback, please, send it our way!

    + {% endblock %} diff --git a/templates/zephyr/reset_confirm.html b/templates/zephyr/reset_confirm.html index 93e4b2cb94..098ea2f217 100644 --- a/templates/zephyr/reset_confirm.html +++ b/templates/zephyr/reset_confirm.html @@ -13,7 +13,7 @@ {% if validlink %} -
    + {% csrf_token %}
    diff --git a/templates/zephyr/reset_done.html b/templates/zephyr/reset_done.html index 114f6c83cf..1baa95dc51 100644 --- a/templates/zephyr/reset_done.html +++ b/templates/zephyr/reset_done.html @@ -4,7 +4,7 @@

    -

    Password changed.

    +

    Password changed.

    Done! You can now log in.