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
222d1ca7
Commit
222d1ca7
authored
Nov 15, 2012
by
Kostas Papadimitriou
Browse files
Merge branch 'ui-0.11' into devel-0.12
parents
47cf2052
def41d6d
Changes
6
Hide whitespace changes
Inline
Side-by-side
snf-cyclades-app/synnefo/ui/static/snf/css/main.css
View file @
222d1ca7
...
...
@@ -6023,7 +6023,8 @@ table.list-machines .wave {
}
.create-vm
.personalize-cont
.confirm-params
{
max-height
:
190px
;
max-height
:
160px
;
margin-right
:
10px
;
}
.create-vm
.personalize-cont
,
...
...
@@ -6031,6 +6032,15 @@ table.list-machines .wave {
height
:
250px
;
}
.create-vm
.image-warning
{
display
:
none
;
background-color
:
#987249
;
color
:
#fff
;
padding
:
10px
15px
;
font-size
:
0.9em
;
border-bottom
:
1px
solid
#AAA
;
}
.create-vm
.create-step-cont
.rename
input
.rename-field
{
font-size
:
1.4em
;
padding
:
5px
;
...
...
snf-cyclades-app/synnefo/ui/static/snf/js/glance_models.js
View file @
222d1ca7
...
...
@@ -43,7 +43,9 @@
},
display_users
:
function
()
{
return
this
.
get_meta
(
'
users
'
).
split
(
'
'
).
join
(
"
,
"
);
try
{
return
this
.
get_meta
(
'
users
'
).
split
(
'
'
).
join
(
"
,
"
);
}
catch
(
err
)
{
console
.
log
(
err
);
return
''
}
}
})
...
...
snf-cyclades-app/synnefo/ui/static/snf/js/models.js
View file @
222d1ca7
...
...
@@ -261,6 +261,16 @@
return
this
.
get
(
'
owner
'
)
||
_
.
keys
(
synnefo
.
config
.
system_images_owners
)[
0
];
},
is_system_image
:
function
()
{
var
owner
=
this
.
get_owner
();
return
_
.
include
(
_
.
keys
(
synnefo
.
config
.
system_images_owners
),
owner
)
},
owned_by
:
function
(
user
)
{
if
(
!
user
)
{
user
=
synnefo
.
user
}
return
user
.
username
==
this
.
get_owner
();
},
display_owner
:
function
()
{
var
owner
=
this
.
get_owner
();
if
(
_
.
include
(
_
.
keys
(
synnefo
.
config
.
system_images_owners
),
owner
))
{
...
...
@@ -285,8 +295,12 @@
return
this
.
get_meta
(
'
GUI
'
);
},
get_created_user
:
function
()
{
return
synnefo
.
config
.
os_created_users
[
this
.
get_os
()]
||
"
root
"
;
get_created_users
:
function
()
{
try
{
var
users
=
this
.
get_meta
(
'
users
'
).
split
(
"
"
);
}
catch
(
err
)
{
users
=
null
}
if
(
!
users
)
{
users
=
[
synnefo
.
config
.
os_created_users
[
this
.
get_os
()]
||
"
root
"
]}
return
users
;
},
get_sort_order
:
function
()
{
...
...
@@ -308,12 +322,15 @@
return
this
.
get
(
'
status
'
)
==
"
DELETED
"
},
ssh_keys_path
:
function
()
{
prepend
=
''
;
if
(
this
.
get_created_user
()
!=
'
root
'
)
{
prepend
=
'
/home
'
}
return
'
{1}/{0}/.ssh/authorized_keys
'
.
format
(
this
.
get_created_user
(),
prepend
);
ssh_keys_paths
:
function
()
{
return
_
.
map
(
this
.
get_created_users
(),
function
(
username
)
{
prepend
=
''
;
if
(
username
!=
'
root
'
)
{
prepend
=
'
/home
'
}
return
'
{1}/{0}/.ssh/authorized_keys
'
.
format
(
username
,
prepend
);
});
},
_supports_ssh
:
function
()
{
...
...
@@ -334,16 +351,18 @@
},
personality_data_for_keys
:
function
(
keys
)
{
contents
=
''
;
_
.
each
(
keys
,
function
(
key
){
contents
=
contents
+
key
.
get
(
"
content
"
)
+
"
\n
"
});
contents
=
$
.
base64
.
encode
(
contents
);
return
_
.
map
(
this
.
ssh_keys_paths
(),
function
(
path
)
{
var
contents
=
''
;
_
.
each
(
keys
,
function
(
key
){
contents
=
contents
+
key
.
get
(
"
content
"
)
+
"
\n
"
});
contents
=
$
.
base64
.
encode
(
contents
);
return
{
path
:
this
.
ssh_keys_path
(),
contents
:
contents
}
return
{
path
:
path
,
contents
:
contents
}
});
}
});
...
...
snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_create_view.js
View file @
222d1ca7
...
...
@@ -314,6 +314,14 @@
hide_list_loading
:
function
()
{
this
.
$
(
"
.images-list-cont
"
).
removeClass
(
"
loading
"
);
},
display_warning_for_image
:
function
(
image
)
{
if
(
!
image
.
is_system_image
()
&&
!
image
.
owned_by
(
synnefo
.
user
))
{
$
(
"
.create-vm .image-warning
"
).
show
();
}
else
{
$
(
"
.create-vm .image-warning
"
).
hide
();
}
},
select_image
:
function
(
image
)
{
if
(
image
&&
image
.
get
(
'
id
'
)
&&
!
_
.
include
(
this
.
images_ids
,
image
.
get
(
'
id
'
)))
{
...
...
@@ -332,6 +340,7 @@
if
((
!
this
.
selected_image
&&
image
)
||
(
this
.
selected_image
!=
image
))
this
.
trigger
(
"
change
"
,
image
);
this
.
display_warning_for_image
(
image
);
this
.
selected_image
=
image
;
...
...
@@ -350,7 +359,7 @@
update_image_details
:
function
(
image
)
{
this
.
image_details_desc
.
hide
().
parent
().
hide
();
if
(
image
.
get_description
())
{
this
.
image_details_desc
.
text
(
image
.
get_description
(
tru
e
)).
show
().
parent
().
show
();
this
.
image_details_desc
.
html
(
image
.
get_description
(
fals
e
)).
show
().
parent
().
show
();
}
var
img
=
snf
.
ui
.
helpers
.
os_icon_tag
(
image
.
escape
(
"
OS
"
))
if
(
image
.
get
(
"
name
"
))
{
...
...
@@ -395,7 +404,7 @@
}
var
row_cls
=
key
.
toLowerCase
();
if
(
is_extra
)
{
row_cls
+=
"
extra-meta
"
};
extra_details
.
append
(
detail_tpl
.
format
(
_
.
escape
(
label
),
_
.
escape
(
value
)
,
row_cls
));
extra_details
.
append
(
detail_tpl
.
format
(
_
.
escape
(
label
),
value
,
row_cls
));
}
_
.
each
(
meta_keys
,
function
(
key
)
{
...
...
@@ -455,7 +464,7 @@
img
.
id
,
snf
.
ui
.
helpers
.
os_icon_tag
(
img
.
escape
(
"
OS
"
)),
_
.
escape
(
img
.
get_readable_size
()),
util
.
truncate
(
img
.
get_description
(),
35
),
util
.
truncate
(
img
.
get_description
(
false
),
35
),
_
.
escape
(
img
.
display_owner
())));
image
.
data
(
"
image
"
,
img
);
image
.
data
(
"
image_id
"
,
img
.
id
);
...
...
@@ -1276,7 +1285,7 @@
}
if
(
personality
.
length
)
{
extra
[
'
personality
'
]
=
personality
;
extra
[
'
personality
'
]
=
_
.
flatten
(
personality
)
;
}
storage
.
vms
.
create
(
data
.
name
,
data
.
image
,
data
.
flavor
,
meta
,
extra
,
_
.
bind
(
function
(
data
){
...
...
snf-cyclades-app/synnefo/ui/templates/partials/create_vm.html
View file @
222d1ca7
{% load i18n %}
<div
id=
"createvm-overlay-content"
class=
"hidden create-vm"
>
<div
class=
"steps-history clearfix"
>
<div
class=
"steps-history-cont step1h completed step-header"
id=
"vm-create-step-history-1"
>
...
...
@@ -79,6 +78,13 @@
</div>
</div>
</div>
<div
class=
"image-warning"
>
<p>
{% blocktrans %}You have selected a user-provided Image, which is not
officially endorsed by ~okeanos. Please make sure it is from a
trustworthy source.{% endblocktrans %}
</p>
</div>
<div
class=
"steps-container clearfix"
>
<div
class=
"step-1 select-image wide create-step-cont clearfix"
>
<div
class=
"clearfix step-header"
>
...
...
snf-cyclades-app/synnefo/ui/templates/partials/vm_connect.html
View file @
222d1ca7
...
...
@@ -16,8 +16,10 @@
</div>
<div
class=
"extra-info"
>
<p>
<span
class=
"important"
>
Keep in mind that recently rebooted or created VMs may take up to 5
minutes to connect to them
minutes to connect to them.
</span>
</p>
</div>
</div>
...
...
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