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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Aurel
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
Show 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:
...
@@ -41,7 +41,7 @@ else:
with open("{{ config_cfg }}", 'w') as file:
with open("{{ config_cfg }}", 'w') as file:
parser.write(file)
parser.write(file)
print "
<html><body>
"
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 "
<form
action=
\"/control.cgi\"
method=
\"post\"
>
"
print "
<input
type=
\"hidden\"
name=
\"password\"
value=
\"{{
password
}}\"
>
"
print "
<input
type=
\"hidden\"
name=
\"password\"
value=
\"{{
password
}}\"
>
"
for option in parser.options("public"):
for option in parser.options("public"):
...
@@ -49,11 +49,12 @@ else:
...
@@ -49,11 +49,12 @@ else:
value=
\"%s\"
><br>
"% (option, option, parser.get('public', option))
value=
\"%s\"
><br>
"% (option, option, parser.get('public', option))
print "
<input
type=
\"submit\"
value=
\"Save\"
></form>
"
print "
<input
type=
\"submit\"
value=
\"Save\"
></form>
"
print "
<h1>
Other values:
</h1>
"
print "
<h1>
Other values
:
</h1>
"
for section in parser.sections():
for section in parser.sections():
if section != 'public':
if section != 'public':
for option in parser.options(section):
for option in parser.options(section):
print "
<b>
%s
</b>
: value=\"%s\"
<br>
" % (option,
print "
<b>
%s
</b>
: value=\"%s\"
<br>
" % (option,
parser.get(section, option))
parser.get(section, option))
print "
<br><br><p><a
href=
\"/monitor.cgi\"
>
Monitor interface
</a></p>
"
print "
</body></html>
"
print "
</body></html>
"
\ No newline at end of file
stack/monitor/monitor.cfg.in
View file @
48ad9b70
...
@@ -72,7 +72,7 @@ filename = monitor.cgi
...
@@ -72,7 +72,7 @@ filename = monitor.cgi
mode = 0744
mode = 0744
context =
context =
key json_file monitor-parameters:json-path
key json_file monitor-parameters:json-path
key password zero-parameters:
cgi
-password
key password zero-parameters:
monitor
-password
raw python_executable ${buildout:executable}
raw python_executable ${buildout:executable}
key this_filename :filename
key this_filename :filename
...
@@ -84,7 +84,7 @@ filename = control.cgi
...
@@ -84,7 +84,7 @@ filename = control.cgi
mode = 0744
mode = 0744
context =
context =
raw config_cfg $${buildout:directory}/knowledge0.cfg
raw config_cfg $${buildout:directory}/knowledge0.cfg
key password zero-parameters:
cgi
-password
key password zero-parameters:
monitor
-password
raw python_executable ${buildout:executable}
raw python_executable ${buildout:executable}
key this_filename :filename
key this_filename :filename
...
@@ -150,7 +150,7 @@ name = example.com
...
@@ -150,7 +150,7 @@ name = example.com
[public]
[public]
recipe = slapos.cookbook:zeroknown.write
recipe = slapos.cookbook:zeroknown.write
filename = knowledge0.cfg
filename = knowledge0.cfg
cgi
-password = passwordtochange
monitor
-password = passwordtochange
[zero-parameters]
[zero-parameters]
recipe = slapos.cookbook:zeroknown.read
recipe = slapos.cookbook:zeroknown.read
...
@@ -215,4 +215,4 @@ wrapper-path = $${directory:bin}/cgi-httpd
...
@@ -215,4 +215,4 @@ wrapper-path = $${directory:bin}/cgi-httpd
[publish-connection-parameter]
[publish-connection-parameter]
recipe = slapos.cookbook:publish
recipe = slapos.cookbook:publish
monitor_url = https://[$${cgi-httpd-configuration-file:listening-ip}]:$${cgi-httpd-configuration-file:listening-port}/index.html
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
IMPORTANT_monitor_info = change the monitor_password as soon as possible ! Default is : $${public:monitor-password}
\ No newline at end of file
\ No newline at end of file
stack/monitor/monitor.cgi.in
View file @
48ad9b70
...
@@ -46,4 +46,5 @@ else:
...
@@ -46,4 +46,5 @@ else:
for r in result:
for r in result:
if result[r] == '':
if result[r] == '':
print "
<h3>
%s
</h3><p>
%s
</p>
" % (r, 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>
"
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