Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.toolbox
Commits
7495ab2d
Commit
7495ab2d
authored
Jul 04, 2013
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slaprunner: grammar
parent
dfb607f4
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
12 additions
and
12 deletions
+12
-12
slapos/runner/runnertest.py
slapos/runner/runnertest.py
+1
-1
slapos/runner/static/js/scripts/account.js
slapos/runner/static/js/scripts/account.js
+1
-1
slapos/runner/static/js/scripts/folder.js
slapos/runner/static/js/scripts/folder.js
+2
-2
slapos/runner/templates/account.html
slapos/runner/templates/account.html
+2
-2
slapos/runner/templates/cloneRepository.html
slapos/runner/templates/cloneRepository.html
+1
-1
slapos/runner/templates/index.html
slapos/runner/templates/index.html
+1
-1
slapos/runner/utils.py
slapos/runner/utils.py
+3
-3
slapos/runner/views.py
slapos/runner/views.py
+1
-1
No files found.
slapos/runner/runnertest.py
View file @
7495ab2d
...
...
@@ -214,7 +214,7 @@ class SlaprunnerTestCase(unittest.TestCase):
"""Test Login user before create session. This should return error value"""
response
=
self
.
login
(
self
.
users
[
0
],
self
.
users
[
1
])
#redirect to config account page
assert
"<h2 class='title'>Your personal information
s
</h2><br/>"
in
response
.
data
assert
"<h2 class='title'>Your personal information</h2><br/>"
in
response
.
data
def
test_configAccount
(
self
):
"""For the first lauch of slaprunner user need do create first account"""
...
...
slapos/runner/static/js/scripts/account.js
View file @
7495ab2d
...
...
@@ -21,7 +21,7 @@ $(document).ready(function () {
return
false
;
}
if
(
!
$
(
"
input#email
"
).
val
().
match
(
/^
([
a-zA-Z0-9_
\.\-])
+
\@(([
a-zA-Z0-9
\-])
+
\.)
+
([
a-zA-Z0-9
]{2,4})
+$/
))
{
$
(
"
#error
"
).
Popup
(
"
Please enter a valid email adress!
"
,
{
type
:
'
alert
'
,
duration
:
3000
});
$
(
"
#error
"
).
Popup
(
"
Please enter a valid email ad
d
ress!
"
,
{
type
:
'
alert
'
,
duration
:
3000
});
return
false
;
}
if
(
!
hasAccount
&&
!
$
(
"
input#password
"
).
val
())
{
...
...
slapos/runner/static/js/scripts/folder.js
View file @
7495ab2d
...
...
@@ -64,9 +64,9 @@ $(document).ready(function () {
if
(
$
(
"
input#user
"
).
val
()
!==
""
)
{
name
=
$
(
"
input#user
"
).
val
();
}
if
(
$
(
"
input#email
"
).
val
()
!==
''
&&
$
(
"
input#email
"
).
val
()
!==
"
Enter your email adress...
"
)
{
if
(
$
(
"
input#email
"
).
val
()
!==
''
&&
$
(
"
input#email
"
).
val
()
!==
"
Enter your email ad
d
ress...
"
)
{
if
(
!
$
(
"
input#email
"
).
val
().
match
(
/^
([
a-zA-Z0-9_
\.\-])
+
\@(([
a-zA-Z0-9
\-])
+
\.)
+
([
a-zA-Z0-9
]{2,4})
+$/
))
{
$
(
"
#error
"
).
Popup
(
"
Please enter a valid email adress!
"
,
{
type
:
'
alert
'
,
duration
:
3000
});
$
(
"
#error
"
).
Popup
(
"
Please enter a valid email ad
d
ress!
"
,
{
type
:
'
alert
'
,
duration
:
3000
});
return
false
;
}
email
=
$
(
"
input#email
"
).
val
();
...
...
slapos/runner/templates/account.html
View file @
7495ab2d
...
...
@@ -5,13 +5,13 @@
<script
src=
"{{ url_for('static', filename='js/scripts/account.js') }}"
type=
"text/javascript"
charset=
"utf-8"
></script>
{% endblock %}
{% block body %}
<h2
class=
'title'
>
Your personal information
s
</h2><br/>
<h2
class=
'title'
>
Your personal information
</h2><br/>
<form
class=
"account"
>
<div
class=
'form'
>
<label
for=
"name"
>
Your name:
</label>
<input
type=
'text'
name=
'name'
id=
'name'
value=
'{{name}}'
/>
<div
class=
'clear'
></div>
<label
for=
"email"
>
Your email adress:
</label>
<label
for=
"email"
>
Your email ad
d
ress:
</label>
<input
type=
'text'
name=
'email'
id=
'email'
value=
'{{email}}'
/>
<div
class=
'clear'
></div>
<label
for=
"username"
>
User name:
</label>
...
...
slapos/runner/templates/cloneRepository.html
View file @
7495ab2d
...
...
@@ -28,7 +28,7 @@
<label
for=
'user'
>
Your name:
</label>
<input
type=
"text"
name=
"user"
id=
"user"
size=
'20'
value=
"{{name}}"
/>
<label
for=
'email'
>
Email:
</label>
<input
type=
"text"
name=
"email"
id=
"email"
size=
'25'
value=
"{% if not email %}Enter your email adress...{% else %}{{email}}{%endif%}"
/>
<input
type=
"text"
name=
"email"
id=
"email"
size=
'25'
value=
"{% if not email %}Enter your email ad
d
ress...{% else %}{{email}}{%endif%}"
/>
<input
type=
"hidden"
name=
"workdir"
id=
"workdir"
value=
"{{workDir}}"
/>
<button
class=
"button"
id=
"clone"
>
clone
</button>
<img
class=
"waitting"
id=
"imgwaitting"
src=
"{{ url_for('static', filename='images/waiting.gif') }}"
alt=
""
/>
...
...
slapos/runner/templates/index.html
View file @
7495ab2d
...
...
@@ -25,7 +25,7 @@
<div
class=
"clear"
></div>
<div
class=
"umenu"
>
<h2><a
href=
"{{ url_for('myAccount')}}"
>
Your Account
</a></h2>
<p>
Update your account information
s
</p>
<p>
Update your account information
</p>
<img
src=
"{{ url_for('static', filename='images/user_card.png') }}"
/>
</div>
<div
class=
"lmenu smaller"
>
...
...
slapos/runner/utils.py
View file @
7495ab2d
...
...
@@ -41,7 +41,7 @@ def getSession(config):
"""
Get the session data of current user.
Returns:
a list of user information
s
or False if fail to read data.
a list of user information or False if fail to read data.
"""
user_path
=
os
.
path
.
join
(
config
[
'etc_dir'
],
'.users'
)
user
=
""
...
...
@@ -343,7 +343,7 @@ def getProfilePath(projectDir, profile):
return
os
.
path
.
join
(
projectFolder
,
profile
)
def
getSlapStatus
(
config
):
"""Return all Slapos Partitions with associate information
s
"""
"""Return all Slapos Partitions with associate information"""
slap
=
slapos
.
slap
.
slap
()
slap
.
initializeConnection
(
config
[
'master_url'
])
partition_list
=
[]
...
...
@@ -379,7 +379,7 @@ def removeInstanceRoot(config):
shutil
.
rmtree
(
config
[
'instance_root'
])
def
getSvcStatus
(
config
):
"""Return all Softwares Instances process Information
s
"""
"""Return all Softwares Instances process Information"""
result
=
Popen
([
config
[
'supervisor'
],
config
[
'configuration_file_path'
],
'status'
]).
communicate
()[
0
]
regex
=
"(^unix:.+
\
.socke
t
)|(^error:)|(^watchdog).*$"
...
...
slapos/runner/views.py
View file @
7495ab2d
...
...
@@ -428,7 +428,7 @@ def getmd5sum():
else
:
return
jsonify
(
code
=
0
,
result
=
"Can not get md5sum for this file!"
)
#return information
s
about state of slapgrid process
#return information about state of slapgrid process
@
login_required
()
def
slapgridResult
():
software_state
=
isSoftwareRunning
(
app
.
config
)
...
...
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