Revision 6de7fde5
b/snf-cyclades-app/synnefo/app_settings/default/ui.py | ||
---|---|---|
37 | 37 |
# Fast update interval |
38 | 38 |
UI_UPDATE_INTERVAL_FAST = UI_UPDATE_INTERVAL / 2 |
39 | 39 |
|
40 |
# Miliseconds to remove from the previous server response time used in |
|
41 |
# consecutive API calls (aligning changes-since attribute). |
|
42 |
UI_CHANGES_SINCE_ALIGNMENT = 0 |
|
43 |
|
|
40 | 44 |
# List of emails used for sending the feedback messages to (following the ADMINS format) |
41 | 45 |
FEEDBACK_CONTACTS = ( |
42 | 46 |
# ('Contact Name', 'contact_email@domain.com'), |
b/snf-cyclades-app/synnefo/ui/static/snf/css/main.css | ||
---|---|---|
1136 | 1136 |
|
1137 | 1137 |
div.indicators { |
1138 | 1138 |
margin-right: 2px !important; |
1139 |
cursor: pointer; |
|
1139 | 1140 |
} |
1141 |
|
|
1140 | 1142 |
div.indicator1, div.indicator2, div.indicator3, div.indicator4 { |
1141 | 1143 |
background-color: #63cf1c; |
1142 | 1144 |
width:10px; |
b/snf-cyclades-app/synnefo/ui/static/snf/js/models.js | ||
---|---|---|
1535 | 1535 |
parse: function (resp, xhr) { |
1536 | 1536 |
// FIXME: depricated global var |
1537 | 1537 |
if (!resp) { return []}; |
1538 |
|
|
1539 | 1538 |
var data = _.map(resp.networks.values, _.bind(this.parse_net_api_data, this)); |
1540 | 1539 |
return data; |
1541 | 1540 |
}, |
... | ... | |
1611 | 1610 |
} |
1612 | 1611 |
|
1613 | 1612 |
return this.api_call(this.path, "create", params, callback); |
1613 |
}, |
|
1614 |
|
|
1615 |
get_public: function(){ |
|
1616 |
return this.filter(function(n){return n.get('public')}); |
|
1614 | 1617 |
} |
1615 | 1618 |
}) |
1616 | 1619 |
|
... | ... | |
1674 | 1677 |
}, |
1675 | 1678 |
|
1676 | 1679 |
parse: function (resp, xhr) { |
1677 |
// FIXME: depricated global var |
|
1678 | 1680 |
var data = _.map(resp.images.values, _.bind(this.parse_meta, this)); |
1679 | 1681 |
return resp.images.values; |
1680 | 1682 |
}, |
... | ... | |
1760 | 1762 |
}, |
1761 | 1763 |
|
1762 | 1764 |
parse: function (resp, xhr) { |
1763 |
// FIXME: depricated global var |
|
1764 | 1765 |
return _.map(resp.flavors.values, function(o) { o.disk_template = o['SNF:disk_template']; return o}); |
1765 | 1766 |
}, |
1766 | 1767 |
|
... | ... | |
1830 | 1831 |
copy_image_meta: true, |
1831 | 1832 |
|
1832 | 1833 |
parse: function (resp, xhr) { |
1833 |
// FIXME: depricated after refactoring |
|
1834 | 1834 |
var data = resp; |
1835 | 1835 |
if (!resp) { return [] }; |
1836 | 1836 |
data = _.filter(_.map(resp.servers.values, _.bind(this.parse_vm_api_data, this)), function(v){return v}); |
... | ... | |
1950 | 1950 |
if (synnefo.config.vm_image_common_metadata) { |
1951 | 1951 |
_.each(synnefo.config.vm_image_common_metadata, |
1952 | 1952 |
function(key){ |
1953 |
console.log(key, image.get(key), "image key"); |
|
1954 | 1953 |
if (image.get_meta(key)) { |
1955 | 1954 |
meta[key] = image.get_meta(key); |
1956 | 1955 |
} |
b/snf-cyclades-app/synnefo/ui/static/snf/js/sync.js | ||
---|---|---|
96 | 96 |
var path = snf.util.parseUri(url).path; |
97 | 97 |
var d = api_history[path + "_" + method]; |
98 | 98 |
if (d) { |
99 |
url = url + "?changes-since=" + snf.util.ISODateString(d) |
|
99 |
// subtract threshold |
|
100 |
d = new Date(d - synnefo.config.changes_since_alignment); |
|
101 |
url = url + "?changes-since=" + snf.util.ISODateString(d); |
|
100 | 102 |
} |
101 | 103 |
return url; |
102 | 104 |
} |
b/snf-cyclades-app/synnefo/ui/templates/home.html | ||
---|---|---|
610 | 610 |
synnefo.config.js_url = '{{ SYNNEFO_JS_URL }}'; |
611 | 611 |
synnefo.config.images_url = '{{ SYNNEFO_IMAGES_URL }}'; |
612 | 612 |
synnefo.config.image_deleted_title = {{ image_deleted_title|safe }}; |
613 |
synnefo.config.changes_since_alignment = {{ changes_since_alignment }}; |
|
613 | 614 |
synnefo.config.image_deleted_size_title = {{ image_deleted_size_title|safe }}; |
614 | 615 |
synnefo.config.use_glance = {{ use_glance }}; |
615 | 616 |
synnefo.config.indicators_icons_url = '{{ SYNNEFO_IMAGES_URL }}icons/indicators/'; |
b/snf-cyclades-app/synnefo/ui/views.py | ||
---|---|---|
59 | 59 |
# UI preferences settings |
60 | 60 |
TIMEOUT = getattr(settings, "TIMEOUT", 10000) |
61 | 61 |
UPDATE_INTERVAL = getattr(settings, "UI_UPDATE_INTERVAL", 5000) |
62 |
CHANGES_SINCE_ALIGNMENT = getattr(settings, "UI_CHANGES_SINCE_ALIGNMENT", 0) |
|
62 | 63 |
UPDATE_INTERVAL_INCREASE = getattr(settings, "UI_UPDATE_INTERVAL_INCREASE", 500) |
63 | 64 |
UPDATE_INTERVAL_INCREASE_AFTER_CALLS_COUNT = getattr(settings, |
64 | 65 |
"UI_UPDATE_INTERVAL_INCREASE_AFTER_CALLS_COUNT", |
... | ... | |
165 | 166 |
'update_interval_increase_after_calls': UPDATE_INTERVAL_INCREASE_AFTER_CALLS_COUNT, |
166 | 167 |
'update_interval_fast': UPDATE_INTERVAL_FAST, |
167 | 168 |
'update_interval_max': UPDATE_INTERVAL_MAX, |
169 |
'changes_since_alignment': CHANGES_SINCE_ALIGNMENT, |
|
168 | 170 |
# additional settings |
169 | 171 |
'image_icons': IMAGE_ICONS, |
170 | 172 |
'logout_redirect': LOGOUT_URL, |
Also available in: Unified diff