<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>STARTcloud</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="./styles.css">
</head>

<body>
    <div class="header">
        <div class="header-content-left">
            <div class="tooltip">
                <a href="https://github.com/STARTcloud/{{ provisioner_name }}/wiki" target="_blank" class="menu"><i class="fa fa-wikipedia-w" aria-hidden="true"></i></a>
                <span class="tooltiptext">{{ provisioner_name }} Wiki</span>
            </div>
            <div class="tooltip">
                <a href="https://github.com/STARTcloud/{{ provisioner_name }}/releases/tag/{{ provisioner_name }}%2Fv{{ provisioner_name }}:{{ provisioner_version }}" target="_blank" class="menu"><i class="fa fa-github" aria-hidden="true"></i>v{{ provisioner_version }}</a>
                <span class="tooltiptext">{{ provisioner_name }} Source</span>
            </div>
            <div class="tooltip" id="copied" style="display:none;">Copied to Clipboard</div>
        </div>
        <div class="header-content-right">
            <div class="tooltip">
                <a href="https://github.com/STARTcloud/{{ provisioner_name }}/issues" target="_blank" class="menu">{{ provisioner_name }}<i class="fa fa-bug" aria-hidden="true"></i></a>
                <span class="tooltiptext">Open an Issue for {{ provisioner_name }}</span>
            </div>
            <div class="tooltip">
                <a href="https://github.com/Moonshine-IDE/Genesis-Super.Human.Installer/issues" target="_blank" class="menu">Super.Human.Installer<i class="fa fa-bug" aria-hidden="true"></i></a>
                <span class="tooltiptext">Open an Issue for SHI</span>
            </div>
            <div class="tooltip">
                <a href="/support-bundle.zip" target="_blank" class="menu"><i class="fa fa-ambulance" aria-hidden="true"></i></a>
                <span class="tooltiptext">Support Bundle</span>
            </div>
        </div>
    </div>

    <div class="content">
        <div id="hosts-content" style="display:block;" class="section">
            <div>
                <p>Please ensure you have updated your HOSTS file for the following instructions to work.  You can learn how to update your HOSTS file on the following Platforms:</p>
                <div class="tooltip">
                        <a href="https://setapp.com/how-to/edit-mac-hosts-file" target="_blank" class="menu">Mac using Terminal</a>
                        <span class="tooltiptext">SetApp</span>
                </div>
                or
                <div class="tooltip">
                        <a href="https://apps.apple.com/us/app/ihosts-etc-hosts-editor/id1102004240?mt=12" target="_blank" class="menu">Mac using iHosts</a>
                        <span class="tooltiptext">Apple.com</span>
                </div>
                &emsp;<a href="https://www.howtogeek.com/27350/beginner-geek-how-to-edit-your-hosts-file/" target="_blank" class="menu">Windows</a>
                &emsp;<a href="https://www.howtogeek.com/27350/beginner-geek-how-to-edit-your-hosts-file/" target="_blank" class="menu">Linux</a>
            </div>
            <p>Add the following line to your HOSTS file (this only must be done one time for each server):</p>
            <div class="tooltipnoborder">
                <a href="#" onclick="CopyToClipboard('hosts');return false;"><code id="hosts">{{ netoutput.stdout }} {{ settings.hostname }} {{ settings.hostname }}.{{ settings.domain }} console.{{ settings.hostname }}.{{ settings.domain }} {% if domino_install_proxy_url is defined %}{{ domino_install_proxy_url }}{% endif %} {% if domino_vagrant_rest_api_proxy_url is defined %}{{ domino_vagrant_rest_api_proxy_url }}{% endif %} {{ startcloud_quick_start_proxy_url }} {% if domino_traveler_proxy_url is defined %}{{ domino_traveler_proxy_url }}{% endif %} {% if domino_verse_proxy_url is defined %}{{ domino_verse_proxy_url }}{% endif %} {% if domino_leap_proxy_url is defined %}{{ domino_leap_proxy_url }}{% endif %} {% if domino_nomadweb_proxy_url is defined %}{{ domino_nomadweb_proxy_url }}{% endif %} {% if domino_rest_api_proxy_url is defined %}{{ domino_rest_api_proxy_url }}{% endif %} #entry requested by Super.Human.Installer on {{ ansible_date_time.iso8601 }} for server id {{ settings.server_id }}</code></a>
                <span class="tooltiptextcenter">Copy to Clipboard</span>
            </div>
        </div>
        <hr>
        <div class="section">
            <h2 class="section-heading">Quick-Start</h2>
            <p>You can access your Domino server in 3 ways:</p>
            <p>1) The existing Notes Client on your desktop by using File --> Application --> Open then using this server name:</p>
            <p>&emsp;{{ settings.hostname }}.{{ settings.domain }}/{{ domino_organization }}</p>
            <p>2) Your browser by accessing:</p>
            <p>&emsp;<a href="https://domino.{{ settings.hostname }}.{{ settings.domain }}/Super.Human.Portal/js-release/index.html" target="_blank">Portal -- https://domino.{{ settings.hostname }}.{{ settings.domain }}/portal.nsf</a></p>
            <p>3) via Console:</p>
            <p>&emsp;a) Press the Terminal button in the Super.Human.Installer application</p>
            <p>&emsp;or</p>
            <p>&emsp;b) Open the <a href="https://console.{{ settings.hostname }}.{{ settings.domain }}/system/terminal" target="_blank">Web Console</a> and login with the linux user credentials below</p>
            <p>&emsp;then</p>
            <p>&emsp;To open the Domino console run <a href="#" onclick="CopyToClipboard('dom-console');return false;"><code id="dom-console">sudo domino console</code></a> </p>
            {% if selfsigned_enabled %}
            <p>You used the Self Signed Option, please add this Root CA to your Local OS to get rid of SSL warnings. This will vary based on your Local OS</p>
            <p><a href="https://{{ startcloud_quick_start_proxy_url }}/ca-certificate.pem" target="_blank">Root CA Certificate</a></p>
            {% endif %}
        </div>
        <hr>
        <div class="section">
            <p>If you have any questions about this process, we are happy to help.</p>
            <p>We hope you enjoy using the latest and greatest HCL Domino technology and learning about DevOps with Vagrant and Ruby if you feel so inclined.</p>
            <p>Enjoy!</p>
            <p>Prominic.NET, Inc.</p>
            <a href="mailto:Support@Prominic.NET">Support@Prominic.NET</a>
        </div>
        <hr>
        {% if domino_admin_user_first_name is defined %}
        <div class="section"> 
            <p>Domino:</p>
            <p>&emsp;User: <a href="#" onclick="CopyToClipboard('dom-admin-user');return false;"><code id="dom-admin-user">{{ domino_admin_user_first_name }} {{ domino_admin_user_last_name }}</code></a></p>
            <p>&emsp;Pass: <a href="#" onclick="CopyToClipboard('dom-admin-pass');return false;"><code id="dom-admin-pass">{{ domino_admin_notes_id_password }}</code></a></p>
            <p>&emsp;User: <a href="#" onclick="CopyToClipboard('dom-dev-user');return false;"><code id="dom-dev-user">{{ domino_dev_user_first_name }} {{ domino_dev_user_last_name }}</code></a></p>
            <p>&emsp;Pass: <a href="#" onclick="CopyToClipboard('dom-dev-pass');return false;"><code id="dom-dev-pass">{{ domino_dev_user_id_password }}</code></a></p>
            <p>Linux:</p>
            <p>&emsp;User: <a href="#" onclick="CopyToClipboard('linux-user');return false;"><code id="linux-user">{{ settings.vagrant_user }}</code></a></p>
            <p>&emsp;Pass: <a href="#" onclick="CopyToClipboard('linux-pass');return false;"><code id="linux-pass">{{ settings.vagrant_user_pass }}</code></a></p>
        </div>
        {% endif %}
    </div>
    <div class="footer">
        <div class="footer-content-left">
            <ul>
                {% if domino_install_proxy_url is defined %}
                <li>
                    <a href="https://{{ domino_install_proxy_url }}" target="_blank">Domino</a>
                </li>
                {% endif %}
                {% if domino_nomadweb_proxy_url is defined %}
                <li>
                    <a href="https://{{ domino_nomadweb_proxy_url }}" target="_blank">NomadWeb</a>
                </li>
                {% endif %}
                {% if domino_verse_proxy_url is defined %}
                <li>
                    <a href="https://{{ domino_verse_proxy_url }}/verse" target="_blank">Verse</a>
                </li>
                {% endif %}
                {% if domino_traveler_proxy_url is defined %}
                <li>
                    <a href="https://{{ domino_traveler_proxy_url }}/traveler" target="_blank">Traveler</a>
                </li>
                {% endif %}
                {% if domino_leap_proxy_url is defined %}
                <li>
                    <a href="https://{{ domino_leap_proxy_url }}/volt-apps/secure/org/ide/manager.html" target="_blank">Volt</a>
                </li>
                {% endif %}
                {% if domino_rest_api_proxy_url is defined %}
                <li>
                    <a href="https://opensource.hcltechsw.com/Domino-rest-api/index.html" target="_blank">Domino Rest API</a>
                </li>
                {% endif %}
            </ul>
        </div>
        <div class="footer-content-right">
            <ul>
                {% if domino_vagrant_rest_api_proxy_url is defined %}
                <li>
                    <a href="https://{{ domino_vagrant_rest_api_proxy_url }}" target="_blank">Vagrant-RestAPI</a>
                </li>
                {% endif %}
                {% if startcloud_quick_start_proxy_url is defined %}
                <li>
                    <a href="https://{{ startcloud_quick_start_proxy_url }}" target="_blank">Downloads</a>
                </li>
                {% endif %}
                <li>
                    <a href="https://console.{{ settings.hostname }}.{{ settings.domain }}/system/terminal" target="_blank">Web Console</a>
                </li>
            </ul>
        </div>
        <div class="footer-content">
                <p class="trademarks">HCL and Domino are registered trademarks of HCL Technologies Ltd.</p>
                <br>
                <p class="trademarks">Prominic is a registered trademark of <a href="https://prominic.net/" target="_blank">Prominic.NET</a>, Inc. All Rights Reserved. </p>
        </div>
    </div>
    <script>
        var x = document.getElementById("hosts-content");
        var request = new XMLHttpRequest();
        request.open('GET', 'https://downloads.{{ settings.hostname }}.{{ settings.domain }}/welcome.html', true);
        request.onreadystatechange = function(){
            if (request.readyState === 4){
                if (request.status === 200 ) {
                    if (x.style.display === "none") {
                        x.style.display = "block";
                    } else {
                        x.style.display = "none";
                    }
                }
            }
        };
        try{
                request.send();
        }catch(err){
                if(e.toString().startsWith("NetworkError")){
                        alert("Well this is awkward, something went wrong, please submit a bug report.");
                }
        }

        function CopyToClipboard(id)
        {
            var x = document.getElementById("copied");
            var r = document.createRange();
            r.selectNode(document.getElementById(id));
            window.getSelection().removeAllRanges();
            window.getSelection().addRange(r);
            document.execCommand('copy');
            window.getSelection().removeAllRanges();
            if (x.style.display === "none") {
                        x.style.display = "inline";
                        x.delay(5000).fadeOut(800);
                    } else {
                        x.style.display = "none";
                    }
        }
    </script>

</body>

</html>