Commit d35f77d8 authored by Cédric de Saint Martin's avatar Cédric de Saint Martin

Merge branch 'slaprunner'

parents f6cdd4e8 624ac647
...@@ -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):
......
...@@ -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'>&nbsp;url: &nbsp;&nbsp;</label> <label for='repo'>&nbsp;url: &nbsp;&nbsp;</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: &nbsp;&nbsp;&nbsp;</label> <label for='user'>Your name: &nbsp;&nbsp;&nbsp;</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>
......
...@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment