From 06321e24f6138484afd2be5aa32acc0a8c0ec8a4 Mon Sep 17 00:00:00 2001 From: Ahmet Alp Balkan Date: Wed, 27 Jun 2018 16:28:16 -0700 Subject: [PATCH] frontend/templates: reenable empty cart Signed-off-by: Ahmet Alp Balkan --- src/frontend/port-forward-dependencies.sh | 10 +++++----- src/frontend/templates/cart.html | 11 ++++------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/frontend/port-forward-dependencies.sh b/src/frontend/port-forward-dependencies.sh index 5d507b4..137c997 100755 --- a/src/frontend/port-forward-dependencies.sh +++ b/src/frontend/port-forward-dependencies.sh @@ -1,11 +1,11 @@ #!/bin/bash set -ex -kubectl port-forward $(kubectl get pods -l app=currencyservice -o=name) 7000:31337 & -kubectl port-forward $(kubectl get pods -l app=recommendationservice -o=name) 8081:8080 & -kubectl port-forward $(kubectl get pods -l app=cartservice -o=name) 7070:7070 & -kubectl port-forward $(kubectl get pods -l app=productcatalogservice -o=name) 3550:3550 & -kubectl port-forward $(kubectl get pods -l app=checkoutservice -o=name) 5050:5050 & +kubectl port-forward $(kubectl get pods -l app=currencyservice -o=name | head -n 1) 7000:31337 & +kubectl port-forward $(kubectl get pods -l app=recommendationservice -o=name | head -n 1) 8081:8080 & +kubectl port-forward $(kubectl get pods -l app=cartservice -o=name | head -n 1) 7070:7070 & +kubectl port-forward $(kubectl get pods -l app=productcatalogservice -o=name | head -n 1) 3550:3550 & +kubectl port-forward $(kubectl get pods -l app=checkoutservice -o=name | head -n 1) 5050:5050 & set +x trap "exit" INT TERM ERR diff --git a/src/frontend/templates/cart.html b/src/frontend/templates/cart.html index 97f12f0..652e64d 100644 --- a/src/frontend/templates/cart.html +++ b/src/frontend/templates/cart.html @@ -11,7 +11,9 @@ {{ else }}

{{ len $.items }} item {{- if gt (len $.items) 1}}s{{end}} - in your Shopping Cart

+ in your Shopping Cart
+ +
{{ range $.items }}
@@ -68,12 +70,7 @@