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
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
slapos.toolbox
Commits
d35f77d8
Commit
d35f77d8
authored
Feb 13, 2013
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'slaprunner'
parents
f6cdd4e8
624ac647
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
35 deletions
+36
-35
slapos/runner/gittools.py
slapos/runner/gittools.py
+0
-2
slapos/runner/templates/cloneRepository.html
slapos/runner/templates/cloneRepository.html
+30
-30
slapos/runner/utils.py
slapos/runner/utils.py
+6
-3
No files found.
slapos/runner/gittools.py
View file @
d35f77d8
...
@@ -40,8 +40,6 @@ def cloneRepo(data):
...
@@ -40,8 +40,6 @@ def cloneRepo(data):
code
=
1
code
=
1
except
Exception
as
e
:
except
Exception
as
e
:
json
=
safeResult
(
str
(
e
))
json
=
safeResult
(
str
(
e
))
if
os
.
path
.
exists
(
workDir
):
shutil
.
rmtree
(
workDir
)
return
jsonify
(
code
=
code
,
result
=
json
)
return
jsonify
(
code
=
code
,
result
=
json
)
def
gitStatus
(
project
):
def
gitStatus
(
project
):
...
...
slapos/runner/templates/cloneRepository.html
View file @
d35f77d8
...
@@ -22,9 +22,9 @@
...
@@ -22,9 +22,9 @@
<div
id=
"tab1"
class=
"tabContents"
>
<div
id=
"tab1"
class=
"tabContents"
>
<div
id=
"repository"
style=
"margin-left:40px;"
>
<div
id=
"repository"
style=
"margin-left:40px;"
>
<label
for=
'name'
>
Project name:
</label>
<label
for=
'name'
>
Project name:
</label>
<input
type=
"text"
name=
"name"
id=
"name"
size=
'20'
value=
"
Enter the project name...
"
/>
<input
type=
"text"
name=
"name"
id=
"name"
size=
'20'
value=
"
slapos
"
/>
<label
for=
'repo'
>
url:
</label>
<label
for=
'repo'
>
url:
</label>
<input
type=
"text"
name=
"repo"
id=
"repo"
size=
'25'
value=
"
Enter the url of your repository...
"
/><br/>
<input
type=
"text"
name=
"repo"
id=
"repo"
size=
'25'
value=
"
http://git.erp5.org/repos/slapos.git
"
/><br/>
<label
for=
'user'
>
Your name:
</label>
<label
for=
'user'
>
Your name:
</label>
<input
type=
"text"
name=
"user"
id=
"user"
size=
'20'
value=
"{{name}}"
/>
<input
type=
"text"
name=
"user"
id=
"user"
size=
'20'
value=
"{{name}}"
/>
<label
for=
'email'
>
Email:
</label>
<label
for=
'email'
>
Email:
</label>
...
@@ -39,36 +39,36 @@
...
@@ -39,36 +39,36 @@
<div
class=
"menu-box-right"
>
<div
class=
"menu-box-right"
>
<div
style=
"background:#fff; padding:10px; min-height:100px; font-size:14px;"
>
<div
style=
"background:#fff; padding:10px; min-height:100px; font-size:14px;"
>
<div
id=
"box0"
>
<div
id=
"box0"
>
<h2>
Clone Repository without using HTTPS and SSH
</h2><br/>
<h2>
Clone Repository without using HTTPS and SSH
</h2><br/>
<p>
Choose this mode if you don't have login and password for the repository and you if you don't have the possibility to
<p>
Choose this mode if you don't have login and password for the repository and you if you don't have the possibility to
use SSH authentication. Otherwise use your public key or your login and password to clone your project by choosing https or ssh mode. Note
use SSH authentication. Otherwise use your public key or your login and password to clone your project by choosing https or ssh mode. Note
that, with readonly mode you can not be able to push your changes.
</p>
that, with readonly mode you can not be able to push your changes.
</p>
<br/>
<br/>
</div>
</div>
<div
id=
"box1"
style=
"display:none"
>
<div
id=
"box1"
style=
"display:none"
>
<h2>
You can use this public key to setup your repository
</h2><br/>
<h2>
You can use this public key to setup your repository
</h2><br/>
<textarea
class=
"mb_style public_key"
readonly
>
<textarea
class=
"mb_style public_key"
readonly
>
{{public_key}}
{{public_key}}
</textarea>
</textarea>
</div>
</div>
<div
id=
"box2"
style=
"display:none;"
>
<div
id=
"box2"
style=
"display:none;"
>
<h2>
Enter your username and password for https authentication access
</h2><br/>
<h2>
Enter your username and password for https authentication access
</h2><br/>
<div
style=
"margin-left:140px; margin-bottom:20px;"
>
<div
style=
"margin-left:140px; margin-bottom:20px;"
>
<label
for=
'username'
>
Your username:
</label>
<label
for=
'username'
>
Your username:
</label>
<input
type=
"text"
name=
"username"
id=
"username"
size=
'20'
value=
"Enter your username..."
/><br/><br/>
<input
type=
"text"
name=
"username"
id=
"username"
size=
'20'
value=
"Enter your username..."
/><br/><br/>
<label
for=
'password'
>
Your password:
</label>
<label
for=
'password'
>
Your password:
</label>
<input
type=
"password"
name=
"password"
id=
"password"
size=
'20'
value=
""
class=
"idleField"
/>
<input
type=
"password"
name=
"password"
id=
"password"
size=
'20'
value=
""
class=
"idleField"
/>
</div>
</div>
<p></p>
<p></p>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"menu-box-left"
>
<div
class=
"menu-box-left"
>
<ul
id=
"modelist"
>
<ul
id=
"modelist"
>
<li
class=
"checked"
><input
type=
"radio"
name=
"security"
id=
"nothing"
value=
"nothing"
/><label
for=
"nothing"
>
ReadOnly
</label></li>
<li
class=
"checked"
><input
type=
"radio"
name=
"security"
id=
"nothing"
value=
"nothing"
/><label
for=
"nothing"
>
ReadOnly
</label></li>
<li><input
type=
"radio"
name=
"security"
id=
"ssh"
value=
"SSH"
checked
/><label
for=
"ssh"
>
SSH Mode
</label></li>
<li><input
type=
"radio"
name=
"security"
id=
"ssh"
value=
"SSH"
checked
/><label
for=
"ssh"
>
SSH Mode
</label></li>
<li
style=
"border-bottom:none"
><input
type=
"radio"
name=
"security"
id=
"https"
value=
"HTTPS"
/><label
for=
"https"
>
Https Mode
</label></li>
<li
style=
"border-bottom:none"
><input
type=
"radio"
name=
"security"
id=
"https"
value=
"HTTPS"
/><label
for=
"https"
>
Https Mode
</label></li>
</ul>
</ul>
</div>
</div>
<div
class=
"clear"
></div><br/>
<div
class=
"clear"
></div><br/>
<!--Fin tab1-->
<!--Fin tab1-->
...
...
slapos/runner/utils.py
View file @
d35f77d8
...
@@ -19,6 +19,8 @@ from flask import jsonify
...
@@ -19,6 +19,8 @@ from flask import jsonify
import
slapos.slap
import
slapos.slap
# Global variable
global_software_type
=
'default'
# Setup default flask (werkzeug) parser
# Setup default flask (werkzeug) parser
...
@@ -105,8 +107,9 @@ def requestInstance(config, software_type=None):
...
@@ -105,8 +107,9 @@ def requestInstance(config, software_type=None):
"""
"""
Request the main instance of our environment
Request the main instance of our environment
"""
"""
if
not
software_type
:
if
software_type
:
software_type
=
None
global
global_software_type
global_software_type
=
software_type
slap
=
slapos
.
slap
.
slap
()
slap
=
slapos
.
slap
.
slap
()
profile
=
getCurrentSoftwareReleaseProfile
(
config
)
profile
=
getCurrentSoftwareReleaseProfile
(
config
)
...
@@ -122,7 +125,7 @@ def requestInstance(config, software_type=None):
...
@@ -122,7 +125,7 @@ def requestInstance(config, software_type=None):
profile
,
profile
,
partition_reference
=
getSoftwareReleaseName
(
config
),
partition_reference
=
getSoftwareReleaseName
(
config
),
partition_parameter_kw
=
partition_parameter_kw
,
partition_parameter_kw
=
partition_parameter_kw
,
software_type
=
software_type
,
software_type
=
global_
software_type
,
filter_kw
=
None
,
filter_kw
=
None
,
state
=
None
,
state
=
None
,
shared
=
False
)
shared
=
False
)
...
...
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