Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
87cf344b
authored
Oct 20, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: check for resource/disk perms in vm tour
skip steps if the user doesn't have any
parent
542ebeb1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
7 deletions
+20
-7
circle/dashboard/static/dashboard/vm-tour.js
+20
-7
No files found.
circle/dashboard/static/dashboard/vm-tour.js
View file @
87cf344b
...
@@ -53,7 +53,7 @@ function get_steps() {
...
@@ -53,7 +53,7 @@ function get_steps() {
steps
=
[
steps
=
[
{
{
element
:
document
.
querySelector
(
"#vm-details-start-template-tour"
),
element
:
document
.
querySelector
(
"#vm-details-start-template-tour"
),
intro
:
"<p>"
+
gettext
(
"Welcome to the template tutorial. In this quick tour, we
gonna
show you how to do the steps described above."
)
+
"</p>"
+
intro
:
"<p>"
+
gettext
(
"Welcome to the template tutorial. In this quick tour, we
are going to
show you how to do the steps described above."
)
+
"</p>"
+
"<p>"
+
gettext
(
'For the next tour step press the "Next" button or the right arrow (or "Back" button/left arrow for the previous step).'
)
+
"</p>"
"<p>"
+
gettext
(
'For the next tour step press the "Next" button or the right arrow (or "Back" button/left arrow for the previous step).'
)
+
"</p>"
},
},
{
{
...
@@ -70,8 +70,12 @@ function get_steps() {
...
@@ -70,8 +70,12 @@ function get_steps() {
},
},
{
{
element
:
document
.
querySelector
(
'a[href="#resources"]'
),
element
:
document
.
querySelector
(
'a[href="#resources"]'
),
intro
:
gettext
(
"On the resources tab you can edit the CPU/RAM options and add/remove disks."
),
intro
:
gettext
(
"On the resources tab you can edit the CPU/RAM options and add/remove disks if you have required permissions."
),
},
}
];
if
(
$
(
"#vm-details-resources-save"
).
length
)
{
steps
.
push
(
{
{
element
:
document
.
querySelector
(
'#vm-details-resources-form'
),
element
:
document
.
querySelector
(
'#vm-details-resources-form'
),
intro
:
'<p><strong>'
+
gettext
(
"CPU priority"
)
+
":</strong> "
+
intro
:
'<p><strong>'
+
gettext
(
"CPU priority"
)
+
":</strong> "
+
...
@@ -81,12 +85,21 @@ function get_steps() {
...
@@ -81,12 +85,21 @@ function get_steps() {
"<p><strong>"
+
gettext
(
"RAM amount"
)
+
":</strong> "
+
"<p><strong>"
+
gettext
(
"RAM amount"
)
+
":</strong> "
+
gettext
(
"amount of RAM."
)
+
"</p>"
,
gettext
(
"amount of RAM."
)
+
"</p>"
,
position
:
"top"
,
position
:
"top"
,
},
}
);
}
if
(
$
(
".operation-create_disk"
).
length
||
$
(
".operation-download_disk"
).
length
)
{
steps
.
push
(
{
{
element
:
document
.
querySelector
(
'#vm-details-resources-disk'
),
element
:
document
.
querySelector
(
'#vm-details-resources-disk'
),
intro
:
gettext
(
"You can add empty disks, download new ones and remove existing ones here."
),
intro
:
gettext
(
"You can add empty disks, download new ones and remove existing ones here."
),
position
:
"top"
,
position
:
"top"
,
},
}
);
}
steps
.
push
(
{
{
element
:
document
.
querySelector
(
'a[href="#network"]'
),
element
:
document
.
querySelector
(
'a[href="#network"]'
),
intro
:
gettext
(
'You can add new network interfaces or remove existing ones here.'
),
intro
:
gettext
(
'You can add new network interfaces or remove existing ones here.'
),
...
@@ -110,7 +123,7 @@ function get_steps() {
...
@@ -110,7 +123,7 @@ function get_steps() {
{
{
element
:
document
.
querySelector
(
".alert-new-template"
),
element
:
document
.
querySelector
(
".alert-new-template"
),
intro
:
gettext
(
"This is the last message, if something is not clear you can do the the tour again."
),
intro
:
gettext
(
"This is the last message, if something is not clear you can do the the tour again."
),
}
,
}
]
;
)
;
return
steps
;
return
steps
;
}
}
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