Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
20 deletions
+33
-20
circle/dashboard/static/dashboard/vm-tour.js
+33
-20
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,23 +70,36 @@ function get_steps() {
...
@@ -70,23 +70,36 @@ 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."
),
},
}
{
];
element
:
document
.
querySelector
(
'#vm-details-resources-form'
),
intro
:
'<p><strong>'
+
gettext
(
"CPU priority"
)
+
":</strong> "
+
if
(
$
(
"#vm-details-resources-save"
).
length
)
{
gettext
(
"higher is better"
)
+
"</p>"
+
steps
.
push
(
"<p><strong>"
+
gettext
(
"CPU count"
)
+
":</strong> "
+
{
gettext
(
"number of CPU cores."
)
+
"</p>"
+
element
:
document
.
querySelector
(
'#vm-details-resources-form'
),
"<p><strong>"
+
gettext
(
"RAM amount"
)
+
":</strong> "
+
intro
:
'<p><strong>'
+
gettext
(
"CPU priority"
)
+
":</strong> "
+
gettext
(
"amount of RAM."
)
+
"</p>"
,
gettext
(
"higher is better"
)
+
"</p>"
+
position
:
"top"
,
"<p><strong>"
+
gettext
(
"CPU count"
)
+
":</strong> "
+
},
gettext
(
"number of CPU cores."
)
+
"</p>"
+
{
"<p><strong>"
+
gettext
(
"RAM amount"
)
+
":</strong> "
+
element
:
document
.
querySelector
(
'#vm-details-resources-disk'
),
gettext
(
"amount of RAM."
)
+
"</p>"
,
intro
:
gettext
(
"You can add empty disks, download new ones and remove existing ones here."
),
position
:
"top"
,
position
:
"top"
,
}
},
);
}
if
(
$
(
".operation-create_disk"
).
length
||
$
(
".operation-download_disk"
).
length
)
{
steps
.
push
(
{
element
:
document
.
querySelector
(
'#vm-details-resources-disk'
),
intro
:
gettext
(
"You can add empty disks, download new ones and remove existing ones here."
),
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