Revision dc868498

b/snf-astakos-app/astakos/im/static/im/css/formating.css
113 113

  
114 114
/* heading extra */
115 115
h2 .header-actions { float: right; font-size: 0.8em;}
116

  
117
.api-access-view div.detail .title {
118
    float: left;
119
    font-size: 0.8em;
120
}
121

  
122
.api-access-view div.detail input {
123
    border: none;
124
    text-decoration: none;
125
    width: 80%;
126
    font-family: monospace;
127
    position: absolute;
128
    left: 20%;
129
    cursor: pointer;
130
}
131

  
132
.api-access-view div.detail {
133
    display: block;
134
    position: relative;
135
    margin: 1em 0;
136
    font-size: 1.3em;
137
    cursor: pointer;
138
    border-bottom: 1px solid #efefef;
139
    padding-bottom: 0.2em;
140
}
141

  
142
.api-access-view div.detail.small {
143
    padding-bottom: 0.9em;
144
}
145

  
146
.api-access-view div.detail .expires {
147
    font-size: 9px;
148
    font-family: 'Open Sans', sans-serif;
149
    position: absolute;
150
    right: 0;
151
    bottom: 15px;
152
}
153

  
154
.api-access-view p.sub {
155
    font-size: 0.7em;
156
    text-align: right;
157
}
158

  
159
.api-access-view .api-clients h3 {
160
    font-size: 1.2em;
161
}
162

  
163
.subsection {
164
    margin-bottom: 4em;
165
}
116

  
117
.api-access-view div.detail .title {
118
    float: left;
119
    font-size: 0.8em;
120
}
121

  
122
.api-access-view div.detail input {
123
    border: none;
124
    text-decoration: none;
125
    width: 80%;
126
    font-family: monospace;
127
    position: absolute;
128
    left: 20%;
129
    cursor: pointer;
130
}
131

  
132
.api-access-view div.detail {
133
    display: block;
134
    position: relative;
135
    margin: 2em 0;
136
    font-size: 1.3em; 
137
    padding-bottom: 0.2em;
138
}
139

  
140
.api-access-view div.detail.small {
141
    padding-bottom: 0.9em;
142
}
143

  
144
.api-access-view div.detail .expires {
145
    font-size: 9px;
146
    font-family: 'Open Sans', sans-serif;
147
    position: absolute;
148
    left: 20%;
149
    top: 25px;
150
    color:#b3b3b3;
151
}
152

  
153
.api-access-view p.sub {
154
    font-size: 0.7em;
155
    color:#b3b3b3;
156
    padding-top:6px;
157
}
158

  
159
.api-access-view .api-clients h3 {
160
    font-size: 1.2em;
161
}
162

  
163
.subsection {
164
    margin-bottom: 4em;
165
}
166

  
167
.token-view .actions {
168
    position: absolute;
169
    left:50%;
170
    font-size:13px;
171
}
172

  
173
.renew-token .confirm {
174
    color:#3582AC;
175
    margin:0 15px;
176
}
177

  
178
.renew-token .close {
179
    color:#F24E53;
180
}
181

  
182
.renew-token .sub,
183
.renew-token .confirm,
184
.renew-token .close {
185
    display: none
186
}
b/snf-astakos-app/astakos/im/static/im/css/max768.css
21 21
#token-confirm									{ position:relative; top:8px; left:auto; }
22 22

  
23 23
form.submit-inline .form-row.submit				{ position:static; margin-top:20px; }
24

  
25
.token-view .actions 							{ left:0; position: relative; top:50px;}
26
.api-access-view div.detail .expires			{ }
b/snf-astakos-app/astakos/im/static/im/js/common.js
408 408

  
409 409
/* end of project members page js */
410 410

  
411
  $('.renew-token a.do').click(function(e){
412
    e.preventDefault();
413
    var els = [$(".renew-token .sub"),$('.renew-token .confirm'), $('.renew-token .close')];
414
    _.each(els, function (el) { el.show();})
415
  })
416

  
417
  $('.renew-token a.close').click(function(e){
418
    e.preventDefault();
419
    var els = [$(".renew-token .sub"),$('.renew-token .confirm'), $('.renew-token .close')];
420
    _.each(els, function (el) { el.hide();})
421
  })
422

  
411 423

  
412 424
});
413 425
	
b/snf-astakos-app/astakos/im/templates/im/api_access_base.html
5 5
<div class="api-access-view">
6 6
    <div class="subsection">
7 7
    {% block page.body.title %}
8
    <h2>API ACCESS</h2>
8
        <h2>API ACCESS</h2>
9 9
    {% endblock %}
10 10
    {% block page.body.description %}
11
    <p>
12
    {{ BRANDING_SERVICE_NAME }} provides a complete REST API that allows you to access and
11
        <div class="two-cols dotted clearfix">
12
            <div class="rt">
13
                <p>
14
                If
15
                you want to learn more about the specification of the REST API itself,
16
                please take a look at the <a href="https://www.synnefo.org/docs" 
17
                alt="Synnefo documentation">Synnefo documentation</a>. 
18
                </p>
19
            </div>
20
            <div class="lt">
21
                <p>{{ BRANDING_SERVICE_NAME }} provides a complete REST API that allows you to access and
13 22
    control your virtual resources programmatically. This means you can execute
14 23
    all the actions you do from the {{ BRANDING_SERVICE_NAME }} Web UI by using a command
15
    line client or importing the corresponding library inside your own code. If
16
    you want to learn more about the specification of the REST API itself,
17
    please take a look at the <a href="https://www.synnefo.org/docs" 
18
    alt="Synnefo documentation">Synnefo documentation</a>. 
19
    </p>
24
    line client or importing the corresponding library inside your own code.</p>
25
            </div>
26

  
27
        </div>
28
    
20 29
    {% endblock %}
21 30
    </div>
22 31
    
23
    <div class="subsection">
32
    <div class="subsection dotted">
24 33
    {% block page.body.token %}
25
    <h2>API details</h2>
26
    <p>
34
        <h2>API details</h2>
35
        <p>
27 36
    To use {{ BRANDING_SERVICE_NAME }} via its REST API the only things you will need is your
28 37
    Authentication Token and the Identity Service's public URL, which you can
29
    find right below.
30
    <br />
31
    <br />
32
    </p>
33
    <div class="token-view">
34
        <div class="detail small clearfix">
35
            <span class="title">Authentication url</span>
36
            <input type="text" value="{{ token_url }}" disabled />
37
        </div>
38
        <div class="detail clearfix">
39
            <span class="title">API Token</span>
40
            <input type="text" value="{{ request.user.auth_token }}" disabled />
41
            <span class="expires">
42
                <span class="date">
43
                    expires in {{ request.user.auth_token_expires|timeuntil }}
44
                    ({{ request.user.auth_token_expires|date }})
45
                </span>
46
            </span>
47
<span class="extra-img" id="token-span">&nbsp;</span>
38
    find right below.<br /><br />
39
        </p>
40
        <div class="token-view">
41
            <div class="detail small clearfix">
42
                <span class="title">Authentication url</span>
43
                <input type="text" value="{{ token_url }}" disabled />
44
            </div>
45
            <div class="detail clearfix">
46
                <div class="facts">
47
                    <span class="title">API Token</span>
48
                    <input type="text" value="{{ request.user.auth_token }}" disabled />
49
                    <span class="expires">
50
                        <span class="date">
51
                            expires in {{ request.user.auth_token_expires|timeuntil }}
52
                            ({{ request.user.auth_token_expires|date }})
53
                        </span>
54
                    </span>
55
                </div>
56
                <div class="actions">
57
                    <div class="renew-token">
58
                        <a href="#" class="do">renew token</a>
59
                        <a href="#" class="confirm">confirm</a>
60
                        <a href="#" class="close">x</a>
61
                        <p class="sub">Make sure to set the new token in any client<br> you may be using each
62
                time you renew your token.</p>
63
                    </div>
64
                </div>
65
                
66
                
67
                <span class="extra-img" id="token-span">&nbsp;</span>
68
            </div>
69
            
48 70
        </div>
49
        <p class="sub">Make sure to set the new token in any client you may be using each
50
        time you renew your token.</p>
71
        {% endblock %}
51 72
    </div>
52
    {% endblock %}
53
</div>
54 73

  
55
    <div class="subsection api-clients">
56
    {% block page.body.clients %}
57
    <h2>Kamaki</h2>
58
    <p>
59
    <a href="{{ client_url }}" alt="kamaki">Kamaki</a> is the official
74
   
75
    
76
    <div class="two-cols dotted clearfix">
77
        <div class="rt">
78
            {% block page.body.api_advanced %}
79
            <h2>API Advanced Usage</h2>
80
            <p>
81
            Apart from using the kamaki command line client, you can also import the
82
            kamaki library inside your code and use it directly. More details on how
83
            to do that on the corresponding kamaki 
84
            <a href="{{ client_url }}">kamaki </a>page.</p> 
85
            <p>You can also implement the REST API calls by yourself, without
86
            using the official kamaki library if you feel confident with your
87
            programming skills. To do so, you first need to get a good grasp of the
88
            API itself; for more information take a look at the corresponding page
89
            inside the 
90
            <a href="https://synnefo.org/docs/">Synnefo documentation</a>.
91
            </p>
92
            {% endblock %}
93
        </div>
94
        <div class="lt">
95
            {% block page.body.clients %}
96
            <h2>Kamaki</h2>
97
            <p><a href="{{ client_url }}" alt="kamaki">Kamaki</a> is the official
60 98
    {{ BRANDING_SERVICE_NAME }} command line client. You can use it to control your virtual
61
    resources from the command line or use it inside your scripts. Kamaki allows
62
    you to execute all the operations you do from the Web UI. You can use kamaki
63
    to register images, spawn clusters of customized VMs, connect them to
64
    Private Virtual Networks, have them executing computations dynamically and
65
    many other neat things. Kamaki is available for most Linux distributions,
99
    resources from the command line or use it inside your scripts.</p>
100
            <p>Kamaki allows you to execute all the operations you do from the Web UI. You can use kamaki to<br><br>
101
            - register images,<br>- spawn clusters of customized VMs,<br>- connect them to
102
    Private Virtual Networks,<br>- have them executing computations dynamically and
103
    many other neat things.</p>
104
            <p> Kamaki is available for most Linux distributions,
66 105
    Windows and Mac OS X. To use it you will need to set it up using your
67 106
    Authentication Token and the Identity Service's public URL, found above. To
68 107
    learn more about kamaki and how to install, configure and use, take a look
69
    at its <a href="http://www.synnefo.org/docs/kamaki/latest/index.html">corresponding page</a> </p>
70

  
71
    <p class="download">You can download kamaki 
108
    at its <a href="http://www.synnefo.org/docs/kamaki/latest/index.html">corresponding page</a>
109
            </p>
110
             <p class="download">You can download kamaki 
72 111
    from the <a href="{{ client_url }}">project homepage</a></p>
73
    {% endblock %}
74
    </div>
75

  
76
    <div class="subsection api-advanced">
77
    {% block page.body.api_advanced %}
78
    <h2>API Advanced Usage</h2>
79
    <p>
80
    Apart from using the kamaki command line client, you can also import the
81
    kamaki library inside your code and use it directly. More details on how
82
    to do that on the corresponding kamaki 
83
    <a href="{{ client_url }}">kamaki </a>page. 
84
    You can also implement the REST API calls by yourself, without
85
    using the official kamaki library if you feel confident with your
86
    programming skills. To do so, you first need to get a good grasp of the
87
    API itself; for more information take a look at the corresponding page
88
    inside the 
89
    <a href="https://synnefo.org/docs/">Synnefo documentation</a>.
90
    </p>
91
    {% endblock %}
112
    
113
        </div>
114
        {% endblock %}
92 115
    </div>
93 116
</div>
94
</div>
95 117
{% endblock %}

Also available in: Unified diff