Revision 8fa1cbc9

b/snf-cyclades-app/synnefo/ui/static/snf/js/models.js
1954 1954

  
1955 1955
            // OS attribute
1956 1956
            if (this.has_meta(data)) {
1957
                data['OS'] = data.metadata.values.OS || "unknown";
1957
                data['OS'] = data.metadata.values.OS || snf.config.unknown_os;
1958 1958
            }
1959 1959
            
1960 1960
            if (!data.diagnostics) {
b/snf-cyclades-app/synnefo/ui/static/snf/js/synnefo.js
445 445
    var size = sizes_map[machines_view];
446 446
    var img_selector = views_map[machines_view];
447 447
    var cls = states_map[state];
448
    if (os === "unknown") { os = synnefo.config.unknown_os }
448 449
 
449 450
    var new_img = 'url("' + synnefo.config.machines_icons_url + size + '/' + os + '-sprite.png")';
450 451

  
b/snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_list_view.js
484 484
            var os = vm.get_os();
485 485
            var icons = window.os_icons || views.ListView.VM_OS_ICONS;
486 486
            if (icons.indexOf(os) == -1) {
487
                os = "unknown";
487
                os = snf.config.unknown_os;
488 488
            }
489 489
            return os;
490 490
        },
......
495 495
            var icons = window.os_icons || views.ListView.VM_OS_ICONS;
496 496

  
497 497
            if (icons.indexOf(os) == -1) {
498
                os = "unknown";
498
                os = snf.config.unknown_os;
499 499
            }
500 500
            
501 501
            var st = "off";
b/snf-cyclades-app/synnefo/ui/templates/home.html
627 627
            synnefo.config.indicators_icons_url = '{{ SYNNEFO_IMAGES_URL }}icons/indicators/';
628 628
            synnefo.config.machines_icons_url = '{{ SYNNEFO_IMAGES_URL }}icons/machines/';
629 629
            synnefo.config.support_ssh_os_list = {{ support_ssh_os_list|safe }};
630
            synnefo.config.unknown_os = {{ unknown_os|safe }};
630 631
            synnefo.config.os_created_users = {{ os_created_users|safe }};
631 632
            
632 633
            synnefo.config.logout_redirect = '{{ logout_redirect }}';
b/snf-cyclades-app/synnefo/ui/views.py
86 86

  
87 87
SUPPORT_SSH_OS_LIST = getattr(settings, "UI_SUPPORT_SSH_OS_LIST",)
88 88
OS_CREATED_USERS = getattr(settings, "UI_OS_DEFAULT_USER_MAP")
89
UNKNOWN_OS = getattr(settings, "UI_UNKNOWN_OS", "unknown")
89 90
LOGOUT_URL = getattr(settings, "UI_LOGOUT_URL", '/im/authenticate')
90 91
LOGIN_URL = getattr(settings, "UI_LOGIN_URL", '/im/login')
91 92
AUTH_COOKIE_NAME = getattr(settings, "UI_AUTH_COOKIE_NAME", 'synnefo_user')
......
99 100
# Additional settings
100 101
VM_NAME_TEMPLATE = getattr(settings, "VM_CREATE_NAME_TPL", "My {0} server")
101 102
VM_HOSTNAME_FORMAT = getattr(settings, "UI_VM_HOSTNAME_FORMAT",
102
                                    'snf-%(id)s.vm.okeanos.grnet.gr')
103
                                    'snf-%(id)s.vm.synnefo.org')
103 104

  
104 105
if isinstance(VM_HOSTNAME_FORMAT, basestring):
105 106
  VM_HOSTNAME_FORMAT =  VM_HOSTNAME_FORMAT % {'id':'{0}'}
......
127 128
# extensions
128 129
ENABLE_GLANCE = getattr(settings, 'UI_ENABLE_GLANCE', True)
129 130
GLANCE_API_URL = getattr(settings, 'UI_GLANCE_API_URL', '/glance')
130
FEEDBACK_CONTACTS = getattr(settings, "FEEDBACK_CONTACTS", []) 
131
FEEDBACK_CONTACTS = getattr(settings, "FEEDBACK_CONTACTS", [])
131 132
DIAGNOSTICS_UPDATE_INTERVAL = getattr(settings,
132 133
                'UI_DIAGNOSTICS_UPDATE_INTERVAL', 2000)
133 134

  
......
203 204
               'flavors_disk_templates_info': json.dumps(FLAVORS_DISK_TEMPLATES_INFO),
204 205
               'support_ssh_os_list': json.dumps(SUPPORT_SSH_OS_LIST),
205 206
               'os_created_users': json.dumps(OS_CREATED_USERS),
207
               'unknown_os': json.dumps(UNKNOWN_OS),
206 208
               'userdata_keys_limit': json.dumps(MAX_SSH_KEYS_PER_USER),
207 209
               'use_glance': json.dumps(ENABLE_GLANCE),
208 210
               'glance_api_url': json.dumps(GLANCE_API_URL),
......
449 451

  
450 452
    mail_subject_txt = 'Feedback from '
451 453
    + snf_settings.BRANDING_SERVICE_NAME +' application'
452
    mail_subject = unicode(_mail_subject_txt) 
453
    
454
    mail_subject = unicode(_mail_subject_txt)
455

  
454 456
    mail_context = {'message': message, 'data': data, 'email': email,
455 457
                    'allow_data_send': allow_data_send, 'request': request}
456 458
    mail_content = render_to_string("feedback_mail.txt", mail_context)

Also available in: Unified diff