Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gabriel Monnerat
slapos
Commits
48ad9b70
Commit
48ad9b70
authored
Dec 27, 2013
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stack-monitor: minor changes
parent
ad16bbaf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
stack/monitor/control.cgi.in
stack/monitor/control.cgi.in
+3
-2
stack/monitor/monitor.cfg.in
stack/monitor/monitor.cfg.in
+4
-4
stack/monitor/monitor.cgi.in
stack/monitor/monitor.cgi.in
+1
-0
No files found.
stack/monitor/control.cgi.in
View file @
48ad9b70
...
...
@@ -41,7 +41,7 @@ else:
with open("{{ config_cfg }}", 'w') as file:
parser.write(file)
print "
<html><body>
"
print "
<h1>
Values t
o be defined by the user
</h1>
"
print "
<h1>
Values t
hat can be defined by the user :
</h1>
"
print "
<form
action=
\"/control.cgi\"
method=
\"post\"
>
"
print "
<input
type=
\"hidden\"
name=
\"password\"
value=
\"{{
password
}}\"
>
"
for option in parser.options("public"):
...
...
@@ -49,11 +49,12 @@ else:
value=
\"%s\"
><br>
"% (option, option, parser.get('public', option))
print "
<input
type=
\"submit\"
value=
\"Save\"
></form>
"
print "
<h1>
Other values:
</h1>
"
print "
<h1>
Other values
:
</h1>
"
for section in parser.sections():
if section != 'public':
for option in parser.options(section):
print "
<b>
%s
</b>
: value=\"%s\"
<br>
" % (option,
parser.get(section, option))
print "
<br><br><p><a
href=
\"/monitor.cgi\"
>
Monitor interface
</a></p>
"
print "
</body></html>
"
\ No newline at end of file
stack/monitor/monitor.cfg.in
View file @
48ad9b70
...
...
@@ -72,7 +72,7 @@ filename = monitor.cgi
mode = 0744
context =
key json_file monitor-parameters:json-path
key password zero-parameters:
cgi
-password
key password zero-parameters:
monitor
-password
raw python_executable ${buildout:executable}
key this_filename :filename
...
...
@@ -84,7 +84,7 @@ filename = control.cgi
mode = 0744
context =
raw config_cfg $${buildout:directory}/knowledge0.cfg
key password zero-parameters:
cgi
-password
key password zero-parameters:
monitor
-password
raw python_executable ${buildout:executable}
key this_filename :filename
...
...
@@ -150,7 +150,7 @@ name = example.com
[public]
recipe = slapos.cookbook:zeroknown.write
filename = knowledge0.cfg
cgi
-password = passwordtochange
monitor
-password = passwordtochange
[zero-parameters]
recipe = slapos.cookbook:zeroknown.read
...
...
@@ -215,4 +215,4 @@ wrapper-path = $${directory:bin}/cgi-httpd
[publish-connection-parameter]
recipe = slapos.cookbook:publish
monitor_url = https://[$${cgi-httpd-configuration-file:listening-ip}]:$${cgi-httpd-configuration-file:listening-port}/index.html
IMPORTANT_monitor_info = change the password as soon as possible ! Default is : passwordtochange
\ No newline at end of file
IMPORTANT_monitor_info = change the monitor_password as soon as possible ! Default is : $${public:monitor-password}
\ No newline at end of file
stack/monitor/monitor.cgi.in
View file @
48ad9b70
...
...
@@ -46,4 +46,5 @@ else:
for r in result:
if result[r] == '':
print "
<h3>
%s
</h3><p>
%s
</p>
" % (r, result[r])
print "
<br><br><p><a
href=
\"/control.cgi\"
>
Control interface
</a></p>
"
print "
</body></html>
"
\ No newline at end of file
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