Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos-mynij-dev
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
Mynij
slapos-mynij-dev
Commits
03f09863
Commit
03f09863
authored
Jan 14, 2014
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stack-monitor: pure css applied to cgi scripts
parent
8857c98b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
11 deletions
+24
-11
stack/monitor/buildout.cfg
stack/monitor/buildout.cfg
+1
-1
stack/monitor/webfiles/settings.cgi.in
stack/monitor/webfiles/settings.cgi.in
+19
-9
stack/monitor/webfiles/status.cgi.in
stack/monitor/webfiles/status.cgi.in
+4
-1
No files found.
stack/monitor/buildout.cfg
View file @
03f09863
...
...
@@ -108,7 +108,7 @@ logfile = $${directory:log}/crond.log
recipe = hexagonit.recipe.download
url = https://github.com/Sebatyne/staticForMonitoring/blob/master/static-files.tar.gz?raw=true
download-only = true
#md5sum =
md5sum = e98585b85634de48240b2c215e946769
filename = static-files.tar.gz
mode = 0644
...
...
stack/monitor/webfiles/settings.cgi.in
View file @
03f09863
...
...
@@ -8,7 +8,10 @@ import os
cgitb.enable()
form = cgi.FieldStorage()
print "
<html><body>
"
print "
<html><head>
"
print "
<link
rel=
\"stylesheet\"
href=
\"pure-min.css\"
>
"
print "
<link
rel=
\"stylesheet\"
href=
\"/style.css\"
>
"
print "
</head><body>
"
config_file = "{{ config_cfg }}"
...
...
@@ -26,18 +29,25 @@ with open(config_file, 'w') as file:
parser.write(file)
print "
<h1>
Values that can be defined by the user :
</h1>
"
print "
<form
action=
\"/index.cgi\"
method=
\"post\"
>
"
print "
<form
action=
\"/index.cgi\"
method=
\"post\"
class=
\"pure-form-aligned\"
>
"
print "
<input
type=
\"hidden\"
name=
\"posting-script\"
value=
\"{{
pwd
}}/{{
this_file
}}\"
>
"
for option in parser.options("public"):
print "%s :
<input
type=
\"text\"
name=
\"%s\"
\
value=
\"%s\"
><br>
"% (option, option, parser.get('public', option))
print "
<input
type=
\"submit\"
value=
\"Save\"
></form>
"
print "
<h1>
Other values :
</h1>
"
print "
<div
class=
\"pure-control-group\"
>
"
print "
<label
for=
\"=%s\"
>
%s
</label>
"%(option, option)
print "
<input
type=
\"text\"
name=
\"%s\"
value=
\"%s\"
readonly
>
"%(option, parser.get('public', option))
print "
</div>
"
print "
<div
class=
\"pure-controls\"
><button
type=
\"submit\"
class=
\"pure-button
\
pure-button-primary
\"
>
Save
</button></div></form>
"
print "
<br><h1>
Other values :
</h1>
"
print "
<form
class=
\"pure-form-aligned\"
>
"
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 "
<div
class=
\"pure-control-group\"
>
"
print "
<label
for=
\"=%s\"
>
%s
</label>
"%(option, option)
print "
<input
type=
\"text\"
name=
\"%s\"
value=
\"%s\"
>
"%(option, parser.get(section, option))
print "
</div>
"
print "
</form>
"
print "
</body></html>
"
stack/monitor/webfiles/status.cgi.in
View file @
03f09863
...
...
@@ -8,7 +8,10 @@ cgitb.enable(display=0, logdir="/tmp/cgi.log")
json_file = "{{ json_file }}"
result = json.load(open(json_file))
print "
<html><body>
"
print "
<html><head>
"
print "
<link
rel=
\"stylesheet\"
href=
\"pure-min.css\"
>
"
print "
<link
rel=
\"stylesheet\"
href=
\"/style.css\"
>
"
print "
</head><body>
"
print "
<h1>
Monitoring :
</h1>
"
print "
<p><em>
Last time of monitoring process : %s
</em></p>
" % (result['datetime'])
del result['datetime']
...
...
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