<!--
 Copyright 2020 Google LLC

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->

{{ define "footer" }}

<footer class="py-5">
    <div class="footer-top">
        <div class="container footer-social">
            <p class="footer-text">This website is hosted for demo purposes only. It is not an actual shop. This is not a Google product.</p>
            <p class="footer-text">© 2020-{{ .currentYear }} Google LLC (<a href="https://github.com/GoogleCloudPlatform/microservices-demo">Source Code</a>)</p>
            <p class="footer-text">
                <small>
                    {{ if $.session_id }}session-id: {{ $.session_id }} — {{end}}
                    {{ if $.request_id }}request-id: {{ $.request_id }}{{end}}
                </small>
                <br/>
                <small>
                    {{ if $.deploymentDetails }}
                        {{ if index .deploymentDetails "CLUSTERNAME" }}
                        <b>Cluster: </b>{{ index .deploymentDetails "CLUSTERNAME" }}<br/>
                        {{ end }}
                        {{ if index .deploymentDetails "ZONE" }}
                        <b>Zone: </b>{{ index .deploymentDetails "ZONE" }}<br/>
                        {{ end }}
                        {{ if index .deploymentDetails "HOSTNAME" }}
                        <b>Pod: </b>{{ index .deploymentDetails "HOSTNAME" }}
                        {{ end }}
                    {{ else }}
                    Deployment details are still loading.
                    Try refreshing this page.
                    {{ end }}
                </small>
            </p>
        </div>
    </div>
</footer>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"
    integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T" crossorigin="anonymous">
</script>
</body>

</html>
{{ end }}
