<html>
<head>
<meta name="viewport" content="width=device-width">
<title>SurvolCredentials</title>
<base href="www/"/>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<header>
  <section id="header">
    <div class="container">
      <div class="row">
        <div class="col-md-12">
          <div id="logo"> <img src="images/logo.png" width="80" height="80" alt="logo"></div>
        </div>
      </div>
    </div>
  </section>
</header>
<section id="SurvolCredentials">
  <div class="container">
    <div class="row">
      <h2>{{page_title}}</h2>
      <div class="line-center"><img src="images/line-center.png" width="71" height="4" alt="line"></div>
      <div style="overflow-x:auto;">
        <table class="surv-cr" width="100%" border="1">
          <tbody>
            <tr>
              <th>Host name</th>
              <th>Host address</th>
              <th>Remote address</th>
            </tr>
            <tr>
              <td>{{currHostNam}}</td>
              <td>{{currHostAddr}}</td>
              <td>{{addrRemote}}</td>
            </tr>
          </tbody>
        </table>
      </div>
      <div style="overflow-x:auto;">
        <table class="s-res" width="100%%" border="1">
          <form method="post" action="edit_credentials.py" name="ServerCredentials">
          <tbody>
            <tr>
              <th>Resource</th>
              <th>Account</th>
              <th>Password</th>
              <th>Del</th>
            </tr>
            {% for credType in credMap %}
            <tr>
              <td colspan="4"><b>{{credType}}</b></td>
            </tr>
              {% for credNam in credMap[credType] %}
              {% if credMap[credType][credNam][4] %}
              <tr>
              <td><a href="{{credMap[credType][credNam][4]}}">{{credNam}}</a></td>
              <td>{{credMap[credType][credNam][0]}}</td>
              <td><input name="{{credMap[credType][credNam][2]}}" value="{{credMap[credType][credNam][1]}}"></td>
              <td><input name="{{credMap[credType][credNam][3]}}" type="checkbox"></td>
              </tr>
              {% else %}
              <tr>
              <td>{{credNam}}</td>
              <td>{{credMap[credType][credNam][0]}}</td>
              <td><input name="{{credMap[credType][credNam][2]}}" value="{{credMap[credType][credNam][1]}}"></td>
              <td><input name="{{credMap[credType][credNam][3]}}" type="checkbox"></td>
              </tr>
              {% endif %}
              {% endfor %}
            {% endfor %}

            <tr>
              <td colspan="4"><input value="Update / delete credential" name="SubmitCredUpdName" type="submit" class="submm">
                <br></td>
            </tr>
          </form>
          <form method="post" action="edit_credentials.py" name="ServerCredentials">
          <tr>
            <td colspan="4"><b>Credentials creation</b></td>
          </tr>
          <tr>
            <td colspan="4"><select name="credentials_add_type">
              {% for oneCredType in credTypeList %}
                <option value="{{oneCredType}}">{{oneCredType}}</option>
              {% endfor %}
              </select></td>
          </tr>
          <tr>
            <td><input name="credentials_add_name"></td>
            <td><input name="credentials_add_usr"></td>
            <td><input name="credentials_add_pwd"></td>
            <td></td>
          </tr>
          <tr>
            <td colspan="4"><input value="HiddenValue" name="HiddenName" type="hidden">
              <input value="Insert new credential" name="SubmitCredAddName" type="submit" class="submm"></td>
          </tr>
          </form>
          </tbody>
        </table>
      </div>
    </div>
  </div>
</section>
<footer>
  <section id="footer-bottom">
    <div class="container">
      <div class="row">
        <div class="col-md-6 col-sm-6 col-xs-12">
          <div class="footer-menu">
            <ul>
              <li>
                <a href="index.htm">Survol home</a>
                <a href="../edit_configuration.py">Configuration</a>
                <a href="../edit_credentials.py">Credentials</a>
                <a href="help.htm">Help</a> </li>
            </ul>
          </div>
        </div>
        <div class="col-md-6 col-sm-6 col-xs-12">
          <div class="copyright">&copy;<a href="http://www.primhillcomputers.com/">Primhill Computers</a> 2017-2020</div>
        </div>
      </div>
    </div>
  </section>
</footer>
</body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="www/js/bootstrap.min.js"></script>
</html>