frontend/templates: reenable empty cart

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
Ahmet Alp Balkan 2018-06-27 16:28:16 -07:00 committed by Simon Zeltser
parent 076819d009
commit 06321e24f6
2 changed files with 9 additions and 12 deletions

View file

@ -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

View file

@ -11,7 +11,9 @@
{{ else }}
<h3>{{ len $.items }} item {{- if gt (len $.items) 1}}s{{end}}
in your Shopping Cart</h3>
in your Shopping Cart</h3> <form method="POST" action="/cart/empty">
<button class="btn btn-secondary" type="submit">Empty Cart</button>
</form>
{{ range $.items }}
<div class="row pt-2 mb-2">
@ -68,12 +70,7 @@
</div>
</div>
<div class="form-row">
<div class="col-12 d-flex justify-content-between align-items-center">
<form method="POST" action="/cart/empty">
<button class="btn btn-secondary" type="submit">Empty Cart</button>
</form>
<a class="btn btn-primary" href="/checkout" role="button">Proceed to Checkout &rarr;</a>
</div>
<a class="btn btn-primary" href="/checkout" role="button">Proceed to Checkout &rarr;</a>
</div>
</form>
</div>