From d247f6c0f8eb5f4b96f949c6f41df2d4d2f25a91 Mon Sep 17 00:00:00 2001 From: David Moreau Simard Date: Sat, 11 Jul 2020 17:26:51 -0400 Subject: [PATCH] UI: Pluralize URLs for resources to match API When querying the API for playbooks, the url would be: /api/v1/playbooks And when querying the details of a playbook, the url would be: /api/v1/playbooks/ With that in mind, it makes sense to align the UI so that when viewing the details of a playbook, the url would be: /playbooks/1 instead of: /playbook/1 Change-Id: I3e7ee6a25e5f15518208b0b0a5f46c61e5ca89cb --- ara/ui/templates/index.html | 12 ++++++------ ara/ui/templates/partials/playbook_card.html | 12 ++++++------ ara/ui/templates/playbook.html | 10 +++++----- ara/ui/templates/result.html | 4 ++-- ara/ui/urls.py | 10 +++++----- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/ara/ui/templates/index.html b/ara/ui/templates/index.html index 68544adb..f9c79327 100644 --- a/ara/ui/templates/index.html +++ b/ara/ui/templates/index.html @@ -140,7 +140,7 @@ {{ playbook.ansible_version }} - + {% if playbook.name is not None %}{{ playbook.name }}{% else %}{{ playbook.path | truncatepath:50 }}{% endif %} @@ -158,19 +158,19 @@ - {{ playbook.items.hosts }} + {{ playbook.items.hosts }} - {{ playbook.items.plays }} + {{ playbook.items.plays }} - {{ playbook.items.results }} + {{ playbook.items.results }} - {{ playbook.items.files }} + {{ playbook.items.files }} - {{ playbook.items.records }} + {{ playbook.items.records }}
diff --git a/ara/ui/templates/partials/playbook_card.html b/ara/ui/templates/partials/playbook_card.html index 8dc52d41..b6d22ecc 100644 --- a/ara/ui/templates/partials/playbook_card.html +++ b/ara/ui/templates/partials/playbook_card.html @@ -38,34 +38,34 @@
diff --git a/ara/ui/templates/playbook.html b/ara/ui/templates/playbook.html index 8443131c..2e69596a 100644 --- a/ara/ui/templates/playbook.html +++ b/ara/ui/templates/playbook.html @@ -10,7 +10,7 @@ {% if playbook.items.records %} {% else %} @@ -21,7 +21,7 @@ Files
@@ -77,7 +77,7 @@ {% for host in playbook.hosts %} - {{ host.name }} + {{ host.name }} {{ host.changed }} @@ -128,10 +128,10 @@ {{ result.host.name }} - {{ task.name }} + {{ task.name }} - {{ task.action }} + {{ task.action }} {{ result.duration | format_duration }} diff --git a/ara/ui/templates/result.html b/ara/ui/templates/result.html index 6f5313c6..13336d9e 100644 --- a/ara/ui/templates/result.html +++ b/ara/ui/templates/result.html @@ -10,8 +10,8 @@