Commit 16aae696 authored by Nicolas Wavrant's avatar Nicolas Wavrant

runner: BuildAndRun parameters can now be accessed as a json through an url.

parent 1dfbcfb0
...@@ -14,8 +14,8 @@ from flask import (Flask, request, redirect, url_for, render_template, ...@@ -14,8 +14,8 @@ from flask import (Flask, request, redirect, url_for, render_template,
from slapos.runner.process import killRunningProcess from slapos.runner.process import killRunningProcess
from slapos.runner.utils import (checkSoftwareFolder, configNewSR, from slapos.runner.utils import (checkSoftwareFolder, configNewSR,
createNewUser, getProfilePath, createNewUser, getBuildAndRunParams,
getSlapgridResult, getProfilePath, getSlapgridResult,
listFolder, getBuildAndRunParams, listFolder, getBuildAndRunParams,
getProjectTitle, getRcode, getSession, getProjectTitle, getRcode, getSession,
getSlapStatus, getSvcStatus, getSlapStatus, getSvcStatus,
...@@ -94,6 +94,10 @@ def myAccount(): ...@@ -94,6 +94,10 @@ def myAccount():
params=getBuildAndRunParams(app.config)) params=getBuildAndRunParams(app.config))
def getSlapgridParameters():
return jsonify(getBuildAndRunParams(app.config))
def manageRepository(): def manageRepository():
public_key = open(app.config['public_key']).read() public_key = open(app.config['public_key']).read()
account = getSession(app.config) account = getSession(app.config)
...@@ -782,3 +786,4 @@ app.add_url_rule("/editFile", 'editFile', editFile, methods=['GET']) ...@@ -782,3 +786,4 @@ app.add_url_rule("/editFile", 'editFile', editFile, methods=['GET'])
app.add_url_rule('/shell', 'shell', shell) app.add_url_rule('/shell', 'shell', shell)
app.add_url_rule('/isSRReady', 'isSRReady', isSRReady) app.add_url_rule('/isSRReady', 'isSRReady', isSRReady)
app.add_url_rule('/addUser', 'addUser', addUser, methods=['POST']) app.add_url_rule('/addUser', 'addUser', addUser, methods=['POST'])
app.add_url_rule('/getSlapgridParameters', 'getSlapgridParameters', getSlapgridParameters, methods=['GET'])
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