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
Titouan Soulard
slapos
Commits
52de3010
Commit
52de3010
authored
Jun 17, 2014
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
monitor: move static files into a static directory (and removed external jquery)
parent
3b6e41d0
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
34 additions
and
34 deletions
+34
-34
stack/monitor/buildout.cfg
stack/monitor/buildout.cfg
+11
-1
stack/monitor/monitor.cfg.in
stack/monitor/monitor.cfg.in
+4
-8
stack/monitor/webfile-directory/index.cgi.in
stack/monitor/webfile-directory/index.cgi.in
+2
-2
stack/monitor/webfile-directory/index.html.jinja2
stack/monitor/webfile-directory/index.html.jinja2
+4
-4
stack/monitor/webfile-directory/monitor-password.cgi.in
stack/monitor/webfile-directory/monitor-password.cgi.in
+4
-4
stack/monitor/webfile-directory/settings.cgi.in
stack/monitor/webfile-directory/settings.cgi.in
+2
-2
stack/monitor/webfile-directory/static/jquery-1.10.2.min.js
stack/monitor/webfile-directory/static/jquery-1.10.2.min.js
+0
-6
stack/monitor/webfile-directory/static/welcome.html
stack/monitor/webfile-directory/static/welcome.html
+1
-1
stack/monitor/webfile-directory/status-history.cgi.in
stack/monitor/webfile-directory/status-history.cgi.in
+2
-2
stack/monitor/webfile-directory/status.cgi.in
stack/monitor/webfile-directory/status.cgi.in
+4
-4
No files found.
stack/monitor/buildout.cfg
View file @
52de3010
...
@@ -127,8 +127,18 @@ logfile = $${directory:log}/crond.log
...
@@ -127,8 +127,18 @@ logfile = $${directory:log}/crond.log
recipe = hexagonit.recipe.download
recipe = hexagonit.recipe.download
url = http://git.erp5.org/gitweb/slapos.git/snapshot/6f44080d0edacdeee9eed59887957c6834d09775.tar.gz
url = http://git.erp5.org/gitweb/slapos.git/snapshot/6f44080d0edacdeee9eed59887957c6834d09775.tar.gz
#url = https://github.com/SlapOS/staticForMonitoring/blob/8b7050faa2dd22592766e25b66b9efe0d0b216c9/static-files.tar.gz?raw=true
#url = https://github.com/SlapOS/staticForMonitoring/blob/8b7050faa2dd22592766e25b66b9efe0d0b216c9/static-files.tar.gz?raw=true
download-only =
tru
e
download-only =
fals
e
#md5sum = 05030ff31dc75c2b96559dedc70945f5
#md5sum = 05030ff31dc75c2b96559dedc70945f5
filename = monitor-static.tar.gz
filename = monitor-static.tar.gz
destination = ${buildout:directory}/parts/monitor-static-files
destination = ${buildout:directory}/parts/monitor-static-files
ignore-existing = true
strip-top-level-dir = true
mode = 0644
[download-monitor-jquery]
recipe = hexagonit.recipe.download
url = http://code.jquery.com/jquery-1.10.2.min.js
download-only = true
destination = ${download-monitor-static:destination}
filename = jquery-1.10.2.min.js
mode = 0644
mode = 0644
stack/monitor/monitor.cfg.in
View file @
52de3010
...
@@ -87,13 +87,9 @@ frequency = */5 * * * *
...
@@ -87,13 +87,9 @@ frequency = */5 * * * *
command = $${make-rss:rendered}
command = $${make-rss:rendered}
[setup-static-files]
[setup-static-files]
recipe = hexagonit.recipe.download
recipe = plone.recipe.command
url = ${download-monitor-static:destination}/${download-monitor-static:filename}
command = ln -s ${download-monitor-jquery:destination} $${monitor-directory:www}/static
filename = static
update-command = $${:command}
destination = $${monitor-directory:www}
ignore-existing = true
strip-top-level-dir = true
mode = 0644
[deploy-index]
[deploy-index]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template:jinja2
...
@@ -108,7 +104,7 @@ context =
...
@@ -108,7 +104,7 @@ context =
key monitor_password_script_path deploy-monitor-password-cgi:rendered
key monitor_password_script_path deploy-monitor-password-cgi:rendered
key apache_update_command :update-apache-access
key apache_update_command :update-apache-access
raw extra_eggs_interpreter ${buildout:directory}/bin/${extra-eggs:interpreter}
raw extra_eggs_interpreter ${buildout:directory}/bin/${extra-eggs:interpreter}
raw default_page /welcome.html
raw default_page /
static/
welcome.html
[deploy-index-template]
[deploy-index-template]
recipe = hexagonit.recipe.download
recipe = hexagonit.recipe.download
...
...
stack/monitor/webfile-directory/index.cgi.in
View file @
52de3010
...
@@ -161,8 +161,8 @@ if not is_password_set():
...
@@ -161,8 +161,8 @@ if not is_password_set():
elif not check_password(password):
elif not check_password(password):
print "
<html><head>
"
print "
<html><head>
"
print """
print """
<link
rel=
"stylesheet"
href=
"pure-min.css"
>
<link
rel=
"stylesheet"
href=
"
static/
pure-min.css"
>
<link
rel=
"stylesheet"
href=
"/style.css"
>
"""
<link
rel=
"stylesheet"
href=
"
static
/style.css"
>
"""
print "
</head><body>
"
print "
</head><body>
"
if password is None:
if password is None:
print "
<h1>
This is the monitoring interface
</h1>
"
print "
<h1>
This is the monitoring interface
</h1>
"
...
...
stack/monitor/webfile-directory/index.html.jinja2
View file @
52de3010
<html>
<html>
<head>
<head>
<title>
Monitoring Interface
</title>
<title>
Monitoring Interface
</title>
<link
rel=
"stylesheet"
href=
"pure-min.css"
>
<link
rel=
"stylesheet"
href=
"
static/
pure-min.css"
>
<link
rel=
"stylesheet"
href=
"/style.css"
>
<link
rel=
"stylesheet"
href=
"
static
/style.css"
>
<script
src=
"jquery-1.10.2.min.js"
></script>
<script
src=
"
static/
jquery-1.10.2.min.js"
></script>
<script
src=
"script.js"
></script>
<script
src=
"s
tatic/s
cript.js"
></script>
</head>
</head>
<body>
<body>
<div
id=
"div-menu"
>
<div
id=
"div-menu"
>
...
...
stack/monitor/webfile-directory/monitor-password.cgi.in
View file @
52de3010
...
@@ -6,9 +6,9 @@ cgitb.enable()
...
@@ -6,9 +6,9 @@ cgitb.enable()
print "
<html><head>
"
print "
<html><head>
"
print """
print """
<script
type=
"text/javascript"
src=
"/jquery-1.10.2.min.js"
></script>
<script
type=
"text/javascript"
src=
"
static
/jquery-1.10.2.min.js"
></script>
<link
rel=
"stylesheet"
href=
"pure-min.css"
>
<link
rel=
"stylesheet"
href=
"
static/
pure-min.css"
>
<link
rel=
"stylesheet"
href=
"/style.css"
>
"""
<link
rel=
"stylesheet"
href=
"
static
/style.css"
>
"""
print "
</head><body>
"
print "
</head><body>
"
print "
<h1>
This is the monitoring interface
</h1>
"
print "
<h1>
This is the monitoring interface
</h1>
"
print "
<h2>
Please set your password for later access
</h2>
"
print "
<h2>
Please set your password for later access
</h2>
"
...
@@ -24,6 +24,6 @@ print """
...
@@ -24,6 +24,6 @@ print """
<div
class=
"pure-controls"
>
<div
class=
"pure-controls"
>
<button
id=
"register-button"
type=
"submit"
class=
"pure-button pure-button-primary"
disabled
>
Access
</button></div>
<button
id=
"register-button"
type=
"submit"
class=
"pure-button pure-button-primary"
disabled
>
Access
</button></div>
</form>
</form>
<script
type=
"text/javascript"
src=
"monitor-register.js"
></script>
<script
type=
"text/javascript"
src=
"
static/
monitor-register.js"
></script>
</body></html>
</body></html>
"""
"""
stack/monitor/webfile-directory/settings.cgi.in
View file @
52de3010
...
@@ -9,8 +9,8 @@ cgitb.enable()
...
@@ -9,8 +9,8 @@ cgitb.enable()
form = cgi.FieldStorage()
form = cgi.FieldStorage()
print "
<html><head>
"
print "
<html><head>
"
print "
<link
rel=
\"stylesheet\"
href=
\"pure-min.css\"
>
"
print "
<link
rel=
\"stylesheet\"
href=
\"
static/
pure-min.css\"
>
"
print "
<link
rel=
\"stylesheet\"
href=
\"/style.css\"
>
"
print "
<link
rel=
\"stylesheet\"
href=
\"
static
/style.css\"
>
"
print "
</head><body>
"
print "
</head><body>
"
config_file = "{{ config_cfg }}"
config_file = "{{ config_cfg }}"
...
...
stack/monitor/webfile-directory/static/jquery-1.10.2.min.js
deleted
100644 → 0
View file @
3b6e41d0
This diff is collapsed.
Click to expand it.
stack/monitor/webfile-directory/static/welcome.html
View file @
52de3010
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<head>
<head>
<title>
Welcome to the Monitoring Interface
</title>
<title>
Welcome to the Monitoring Interface
</title>
<link
rel=
"stylesheet"
href=
"pure-min.css"
>
<link
rel=
"stylesheet"
href=
"pure-min.css"
>
<link
rel=
"stylesheet"
href=
"
/
style.css"
>
<link
rel=
"stylesheet"
href=
"style.css"
>
</head>
</head>
<body>
<body>
<h1>
Welcome to your monitoring interface
</h1>
<h1>
Welcome to your monitoring interface
</h1>
...
...
stack/monitor/webfile-directory/status-history.cgi.in
View file @
52de3010
...
@@ -12,8 +12,8 @@ status_history_length = '{{ status_history_length }}'
...
@@ -12,8 +12,8 @@ status_history_length = '{{ status_history_length }}'
db = sqlite3.connect(db_path)
db = sqlite3.connect(db_path)
print """
<html><head>
print """
<html><head>
<link
rel=
"stylesheet"
href=
"pure-min.css"
>
<link
rel=
"stylesheet"
href=
"
static/
pure-min.css"
>
<link
rel=
"stylesheet"
href=
"/style.css"
>
<link
rel=
"stylesheet"
href=
"
static
/style.css"
>
</head><body>
</head><body>
<h1>
Monitor Status History :
</h1>
"""
<h1>
Monitor Status History :
</h1>
"""
...
...
stack/monitor/webfile-directory/status.cgi.in
View file @
52de3010
...
@@ -20,8 +20,8 @@ if not os.path.exists(json_file) or "refresh" in form:
...
@@ -20,8 +20,8 @@ if not os.path.exists(json_file) or "refresh" in form:
if not os.path.exists(json_file):
if not os.path.exists(json_file):
print """
<html><head>
print """
<html><head>
<link
rel=
"stylesheet"
href=
"pure-min.css"
>
<link
rel=
"stylesheet"
href=
"
static/
pure-min.css"
>
<link
rel=
"stylesheet"
href=
"/style.css"
>
<link
rel=
"stylesheet"
href=
"
static
/style.css"
>
</head><body>
</head><body>
<h1>
Monitoring :
</h1>
<h1>
Monitoring :
</h1>
No status file found
</p></body></html>
"""
No status file found
</p></body></html>
"""
...
@@ -30,8 +30,8 @@ if not os.path.exists(json_file):
...
@@ -30,8 +30,8 @@ if not os.path.exists(json_file):
result = json.load(open(json_file))
result = json.load(open(json_file))
print "
<html><head>
"
print "
<html><head>
"
print "
<link
rel=
\"stylesheet\"
href=
\"pure-min.css\"
>
"
print "
<link
rel=
\"stylesheet\"
href=
\"
static/
pure-min.css\"
>
"
print "
<link
rel=
\"stylesheet\"
href=
\"/style.css\"
>
"
print "
<link
rel=
\"stylesheet\"
href=
\"
static
/style.css\"
>
"
print "
</head><body>
"
print "
</head><body>
"
print "
<h1>
Monitoring :
</h1>
"
print "
<h1>
Monitoring :
</h1>
"
print "
<form
action=
\"/index.cgi\"
method=
\"post\"
class=
\"pure-form-aligned\"
>
"
print "
<form
action=
\"/index.cgi\"
method=
\"post\"
class=
\"pure-form-aligned\"
>
"
...
...
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