Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
79cab042
Commit
79cab042
authored
Dec 09, 2013
by
Kostas Papadimitriou
Browse files
ui: Introduce setting UI_SUPPORT_SSH_OS_FAMILY_LIST
os families list setting for which ui will allow ssh key injection
parent
981ef332
Changes
5
Hide whitespace changes
Inline
Side-by-side
Changelog
View file @
79cab042
...
...
@@ -236,6 +236,8 @@ Cyclades UI
- Double escaping fix in machine create wizard images list and machine details
subview.
- Fix image ordering in machine create wizard.
- New setting ``UI_SUPPORT_SSH_OS_FAMILY_LIST``. A list of image OS families
for which ui will enable ssh key injection in machine wizard.
Pithos
...
...
snf-cyclades-app/conf/20-snf-cyclades-app-ui.conf
View file @
79cab042
...
...
@@ -189,3 +189,6 @@
##Base url for external css fonts. If set to ``None``, no external css fonts
##will be loaded.
#UI_FONTS_BASE_URL = "//fonts.googleapis.com/"
#
## A list of os family names that support ssh public key assignment
#UI_SUPPORT_SSH_OS_FAMILY_LIST = ['linux', 'openbsd', 'freebsd', 'netbsd']
snf-cyclades-app/synnefo/ui/static/snf/js/models.js
View file @
79cab042
...
...
@@ -552,12 +552,19 @@
},
_supports_ssh
:
function
()
{
if
(
synnefo
.
config
.
support_ssh_os_list
.
indexOf
(
this
.
get_os
())
>
-
1
)
{
var
os_list
=
synnefo
.
config
.
support_ssh_os_list
;
var
osfamily_list
=
synnefo
.
config
.
support_ssh_os_family_list
;
var
os
=
this
.
get_os
();
if
(
os_list
.
indexOf
(
os
)
>
-
1
)
{
return
true
;
}
if
(
this
.
get_meta
(
'
osfamily
'
)
==
'
linux
'
)
{
return
true
;
var
osfamily
=
this
.
get_meta
(
"
osfamily
"
);
if
(
osfamily_list
.
indexOf
(
osfamily
)
>
-
1
)
{
return
true
}
return
false
;
},
...
...
snf-cyclades-app/synnefo/ui/templates/home.html
View file @
79cab042
...
...
@@ -660,6 +660,7 @@
synnefo
.
config
.
ui_console_url
=
'
{% url ui_machines_console %}
'
;
synnefo
.
config
.
ui_connect_url
=
'
{% url ui_machines_connect %}
'
;
synnefo
.
config
.
support_ssh_os_list
=
{{
support_ssh_os_list
|
safe
}};
synnefo
.
config
.
support_ssh_os_family_list
=
{{
support_ssh_os_family_list
|
safe
}};
synnefo
.
config
.
unknown_os
=
{{
unknown_os
|
safe
}};
synnefo
.
config
.
os_created_users
=
{{
os_created_users
|
safe
}};
synnefo
.
config
.
feedback_post_url
=
{{
feedback_post_url
|
safe
}};
...
...
snf-cyclades-app/synnefo/ui/views.py
View file @
79cab042
...
...
@@ -78,6 +78,9 @@ IMAGE_DELETED_SIZE_TITLE = \
getattr
(
settings
,
'UI_IMAGE_DELETED_SIZE_TITLE'
,
'(none)'
)
SUPPORT_SSH_OS_LIST
=
getattr
(
settings
,
"UI_SUPPORT_SSH_OS_LIST"
,)
SUPPORT_SSH_OS_FAMILY_LIST
=
getattr
(
settings
,
"UI_SUPPORT_SSH_OS_FAMILY_LIST"
,
[
'linux'
,
'openbsd'
,
'freebsd'
,
'netbsd'
])
OS_CREATED_USERS
=
getattr
(
settings
,
"UI_OS_DEFAULT_USER_MAP"
)
UNKNOWN_OS
=
getattr
(
settings
,
"UI_UNKNOWN_OS"
,
"unknown"
)
...
...
@@ -225,6 +228,7 @@ def home(request):
'vm_name_template'
:
json
.
dumps
(
VM_NAME_TEMPLATE
),
'flavors_disk_templates_info'
:
json
.
dumps
(
FLAVORS_DISK_TEMPLATES_INFO
),
'support_ssh_os_list'
:
json
.
dumps
(
SUPPORT_SSH_OS_LIST
),
'support_ssh_os_family_list'
:
json
.
dumps
(
SUPPORT_SSH_OS_FAMILY_LIST
),
'unknown_os'
:
json
.
dumps
(
UNKNOWN_OS
),
'os_created_users'
:
json
.
dumps
(
OS_CREATED_USERS
),
'userdata_keys_limit'
:
json
.
dumps
(
MAX_SSH_KEYS_PER_USER
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment