# Inspired by https://gitmemory.com/issue/jupyterhub/zero-to-jupyterhub-k8s/1266/632726020

apiVersion: v1
kind: ConfigMap
metadata:
  name: hub-templates
data:
  spawn.html: |
    {% extends "page.html" %}
    {% if announcement_spawn %}
      {% set announcement = announcement_spawn %}
    {% endif %}

    {% block main %}

    <div class="container">
      {% block heading %}
       <div class="row">

          <center><h2>Welcome to the Timeseries Integrated Knowledge Engine (TIKE)</h2></center><br/>

          <center>To get started, click "<font color='#f37524'>Start server</font>" below.</center><br/><br/>

          TIKE is a <a target="_blank" href="https://jupyter.org/hub">JupyterHub</a> service provided by the Space Telescope Science Institute (STScI), and its main goal is to increase the accessibility of scientific data and software related to the <a target="_blank" href="https://archive.stsci.edu">Mikulski Archive for Space Telescopes (MAST)</a>.  STScI's JupyterHub platforms achieve this by providing a modest, predefined computing environment hosted by Amazon Web Services (AWS), which runs in the same AWS region hosting MAST's <a target="_blank" href="https://registry.opendata.aws/collab/stsci">AWS Public Datasets</a>.  The initial focus is on timeseries data, such as those available from the <a target="_blank" href="https://outerspace.stsci.edu/display/TESS/TESS+Archive+Manual">TESS</a>, <a target="_blank" href="https://archive.stsci.edu/missions-and-data/kepler">Kepler</a>, and <a target="_blank" href="https://archive.stsci.edu/missions-and-data/k2">K2</a> missions, and this focus will expand in future releases.<br/><br/>

          <b>Useful information</b>&#58;<br/><br/>

            <ul>
            <li>TIKE is continually maintained and updated, and as such, there may be regular changes and downtime.</li>
            <li>At this time, <u>no data</u> you upload or create within TIKE is guaranteed to be preserved.  We recommend periodically backing up essential files.</li>
            <li>TIKE is free to use, and users do not require an AWS account to use TIKE or to access STScI's <a target="_blank" href="https://registry.opendata.aws/collab/stsci">Public Datasets in AWS</a>.</li>
            <li>Several resources are available to support TIKE usage, and we expect more to be added in the coming months. At this time, sources include the <a target="_blank" href="https://github.com/spacetelescope/tike_content">TIKE_content Github repository</a>, a copy of which is provided in each user's home directory.</li>
            <li>Usage is monitored, and access will be restricted as needed in order to provide an acceptable level of service to all users.</li>
            </ul><br/>

        <br/><br/><br/>
       </div>
      {% endblock %}
      <div class="row col-sm-offset-2 col-sm-8">
        {% if for_user and user.name != for_user.name -%}
          <p>Spawning server for {{ for_user.name }}</p>
        {% endif -%}
        {% if error_message -%}
          <p class="spawn-error-msg text-danger">
            Error: {{error_message}}
          </p>
        {% endif %}
        <form enctype="multipart/form-data" id="spawn_form" action="{{url}}" method="post" role="form">
          {{spawner_options_form | safe}}
          <br>
          <input type="submit" value="Start server" class="btn btn-jupyter form-control">
        </form>
      </div>
    </div>

    {% endblock %}
