aboutsummaryrefslogtreecommitdiff
path: root/templates/index.tpl
blob: 19d533e8ca4c5d0bfd34ae1a674920b79b5f73df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Select Account</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="stylesheet" type="text/css" href="/assets/site.css" />
        <script id="credential_row_template" type="text/template">
            <tr id="credentials-for-[[ .Account ]]">
                <td colspan="3">
                    <textarea>[[ .Content ]]</textarea>
                    <button>Close</button>
                </td>
            </tr>
        </script>
        <script id="aws_account_row_template" type="text/template">
            <tr id="account-row-[[ .short_name ]]" class="account-row" data-account-name="[[ .short_name ]]" data-global-credential-endpoint="[[ .global_credential_url ]]">
                <td>[[ .name ]] <span class="tag vendor-[[ .vendor ]]" alt="[[ .vendor ]]" title="[[ .vendor ]]">[[ .vendor ]]</span></td>
                <td>
                    <a href="[[ .console_redirect_url ]]">Console</a> |
                    <a data-content-type="application/vnd.broker.v2.credential.aws.ini" href="#/cli/[[ .short_name ]]">AWS CLI</a> |
                    <a data-content-type="application/vnd.broker.v2.credential.aws.sh" href="#/sh/[[ .short_name ]]">Bash</a> |
                    <a data-content-type="application/vnd.broker.v2.credential.aws.psl" href="#/ps/[[ .short_name ]]">Powershell</a>
                </td>
            </tr>
        </script>
        <script type="text/javascript" src="/assets/site.js"></script>
        <script type="text/javascript">
            window.addEventListener('load', setupHomePage);
        </script>
    </head>
    <body>
        <p id="api-error">Error communicating with the API.</p>

        <div id="login-row">
            Hello <span id="username"></span>! (<a href="/api">API</a> | <a href="#" id="show-api-key">API Key</a> | <a href="/logout">Logout</a>)
        </div>

        <h1>Cloud Accounts</h1>
        <table id="account-table">
            <tr>
                <th>Console Login</th>
                <th>Credentials</th>
            </tr>
        </table>

        <div id="api-key-block">
        <h1>API Key</h1>
        <div id="api-key">
            <p>To access <a href="/api/account">the API</a> set the header <tt>Authorization: Bearer {token}</tt> to the token below:</p>
            <textarea>Bearer {token}</textarea>
            <p><b>Token Expires:</b> <span id="session-expires"></span></p>
        </div>
        </div>
    </body>
</html>