Commit 7e119508 authored by Nicolas Wavrant's avatar Nicolas Wavrant

slaprunner: /myAccount can render user-defined paramters

parent 82d02800
...@@ -41,6 +41,14 @@ html_escape_table = { ...@@ -41,6 +41,14 @@ html_escape_table = {
"<": "&lt;", "<": "&lt;",
} }
def getBuildAndRunParams():
dict_params = {
'run_instance' : RUN_INSTANCE,
'run_software' : RUN_SOFTWARE,
'max_run_instance' : MAX_RUN_INSTANCE,
'max_run_software' : MAX_RUN_SOFTWARE
}
return dict_params
def html_escape(text): def html_escape(text):
"""Produce entities within text.""" """Produce entities within text."""
......
...@@ -14,7 +14,8 @@ from flask import (Flask, request, redirect, url_for, render_template, ...@@ -14,7 +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, getProfilePath, from slapos.runner.utils import (checkSoftwareFolder, configNewSR, getProfilePath,
listFolder, getProjectTitle, getSession, listFolder, getBuildAndRunParams,
getProjectTitle, getSession,
getSlapStatus, getSvcStatus, getSlapStatus, getSvcStatus,
getSvcTailProcess, isInstanceRunning, getSvcTailProcess, isInstanceRunning,
isSoftwareRunning, isSoftwareReleaseReady, isText, isSoftwareRunning, isSoftwareReleaseReady, isText,
...@@ -85,7 +86,8 @@ def setAccount(): ...@@ -85,7 +86,8 @@ def setAccount():
def myAccount(): def myAccount():
account = getSession(app.config) account = getSession(app.config)
return render_template('account.html', username=account[0], return render_template('account.html', username=account[0],
email=account[2], name=account[3].decode('utf-8')) email=account[2], name=account[3].decode('utf-8'),
params=getBuildAndRunParams())
@app.route("/dologout") @app.route("/dologout")
......
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