Revision 93a33f09
b/snf-cyclades-app/synnefo/ui/settings.py | ||
---|---|---|
52 | 52 |
|
53 | 53 |
cyclades_services = cyclades_settings.cyclades_services |
54 | 54 |
|
55 |
VOLUME_URL = endpoint(cyclades_services, 'volume', 'v2.0').rstrip('/') |
|
55 | 56 |
GLANCE_URL = endpoint(cyclades_services, 'image', 'v1.0').rstrip('/') |
56 | 57 |
COMPUTE_URL = endpoint(cyclades_services, 'compute', 'v2.0').rstrip('/') |
57 | 58 |
NETWORK_URL = endpoint(cyclades_services, 'network', 'v2.0').rstrip('/') |
b/snf-cyclades-app/synnefo/ui/static/snf/js/models.js | ||
---|---|---|
1448 | 1448 |
skip_api_error: false |
1449 | 1449 |
}); |
1450 | 1450 |
}, |
1451 |
|
|
1452 |
create_snapshot: function(snapshot_params, callback) { |
|
1453 |
var volume = this.get('volumes') && this.get('volumes').length ? |
|
1454 |
this.get('volumes')[0] : undefined; |
|
1455 |
var params = _.extend({ |
|
1456 |
'metadata': {}, |
|
1457 |
'volume_id': volume |
|
1458 |
}, snapshot_params); |
|
1459 |
|
|
1460 |
snf.api.sync('create', undefined, { |
|
1461 |
url: synnefo.config.api_urls.volume, |
|
1462 |
data: params, |
|
1463 |
success: callback, |
|
1464 |
skip_api_error: false |
|
1465 |
}); |
|
1466 |
}, |
|
1451 | 1467 |
|
1452 | 1468 |
// action helper |
1453 | 1469 |
call: function(action_name, success, error, params) { |
b/snf-cyclades-app/synnefo/ui/templates/home.html | ||
---|---|---|
631 | 631 |
'userdata': '{% url ui_userdata %}', |
632 | 632 |
'compute': {{ compute_api_url|safe }}, |
633 | 633 |
'network': {{ network_api_url|safe }}, |
634 |
'volume': {{ volume_api_url|safe }}, |
|
634 | 635 |
'glance': {{ glance_api_url|safe }}, |
635 | 636 |
'accounts': {{ accounts_api_url|safe }}, |
636 | 637 |
}; |
b/snf-cyclades-app/synnefo/ui/views.py | ||
---|---|---|
198 | 198 |
'request': request, |
199 | 199 |
'current_lang': get_language() or 'en', |
200 | 200 |
'compute_api_url': json.dumps(uisettings.COMPUTE_URL), |
201 |
'volumes_api_url': json.dumps(uisettings.VOLUME_URL), |
|
201 | 202 |
'network_api_url': json.dumps(uisettings.NETWORK_URL), |
202 | 203 |
'user_catalog_url': json.dumps(uisettings.USER_CATALOG_URL), |
203 | 204 |
'feedback_post_url': json.dumps(uisettings.FEEDBACK_URL), |
Also available in: Unified diff