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
Roque
slapos
Commits
f2cfdbb8
Commit
f2cfdbb8
authored
Jan 16, 2015
by
Alain Takoudjou
Committed by
Tristan Cavelier
Mar 31, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
monitor: Can display informations about computer parition and more
parent
da569721
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
183 additions
and
1 deletion
+183
-1
stack/monitor/buildout.cfg
stack/monitor/buildout.cfg
+8
-0
stack/monitor/monitor.cfg.in
stack/monitor/monitor.cfg.in
+23
-1
stack/monitor/webfile-directory/information.html.in
stack/monitor/webfile-directory/information.html.in
+152
-0
No files found.
stack/monitor/buildout.cfg
View file @
f2cfdbb8
...
@@ -82,6 +82,14 @@ md5sum = 7400c8cfa16a15a0d41f512b8bbb1581
...
@@ -82,6 +82,14 @@ md5sum = 7400c8cfa16a15a0d41f512b8bbb1581
filename = index.html.jinja2
filename = index.html.jinja2
mode = 0644
mode = 0644
[info-template]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/webfile-directory/${:filename}
download-only = true
#md5sum =
filename = information.html.in
mode = 0644
[status-cgi]
[status-cgi]
recipe = hexagonit.recipe.download
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/webfile-directory/${:filename}
url = ${:_profile_base_location_}/webfile-directory/${:filename}
...
...
stack/monitor/monitor.cfg.in
View file @
f2cfdbb8
...
@@ -100,7 +100,8 @@ recipe = slapos.recipe.template:jinja2
...
@@ -100,7 +100,8 @@ recipe = slapos.recipe.template:jinja2
template = ${index:location}/${index:filename}
template = ${index:location}/${index:filename}
rendered = $${monitor-parameters:index-path}
rendered = $${monitor-parameters:index-path}
update-apache-access = ${apache:location}/bin/htpasswd -cb $${monitor-parameters:htaccess-file} admin
update-apache-access = ${apache:location}/bin/htpasswd -cb $${monitor-parameters:htaccess-file} admin
mode = 0744
# Force deploy information.html
mode = $${partition-parameters:mode}
context =
context =
key cgi_directory monitor-directory:cgi-bin
key cgi_directory monitor-directory:cgi-bin
raw index_template $${deploy-index-template:location}/$${deploy-index-template:filename}
raw index_template $${deploy-index-template:location}/$${deploy-index-template:filename}
...
@@ -322,6 +323,27 @@ filename = $${public:filename}
...
@@ -322,6 +323,27 @@ filename = $${public:filename}
[monitor-rewrite-rule]
[monitor-rewrite-rule]
[partition-parameters]
recipe = slapos.recipe.template:jinja2
template = ${info-template:location}/${info-template:filename}
rendered = $${monitor-directory:monitoring-cgi}/information.html
mode = 0744
instance-id =
context =
raw extra_eggs_interpreter ${buildout:directory}/bin/${extra-eggs:interpreter}
key computer_id slap-connection:computer-id
key partition_id slap-connection:partition-id
key home buildout:directory
key master_url slap-connection:server-url
key software_url slap-connection:software-release-url
key ipv4 slap-parameters:ipv4-random
key ipv6 slap-parameters:ipv6-random
key slapparameter_dict slap-parameters:configuration
key instance_reference :instance-id
section extra_parameters extra-parameters-output
[extra-parameters-output]
# XXX could it be something lighter?
# XXX could it be something lighter?
[monitor-httpd-configuration]
[monitor-httpd-configuration]
pid-file = $${monitor-directory:run}/cgi-httpd.pid
pid-file = $${monitor-directory:run}/cgi-httpd.pid
...
...
stack/monitor/webfile-directory/information.html.in
0 → 100644
View file @
f2cfdbb8
#!{{ extra_eggs_interpreter }}
print """
<html>
<head>
<title>
Computer Partition
</title>
<link
rel=
"stylesheet"
href=
"pure-min.css"
>
<link
rel=
"stylesheet"
href=
"style.css"
>
<style>
.mo-table
{
margin
:
0px
;
padding
:
0px
;
width
:
100%
;
border
:
1px
solid
#ffffff
;
-moz-border-radius-bottomleft
:
0px
;
-webkit-border-bottom-left-radius
:
0px
;
border-bottom-left-radius
:
0px
;
-moz-border-radius-bottomright
:
0px
;
-webkit-border-bottom-right-radius
:
0px
;
border-bottom-right-radius
:
0px
;
-moz-border-radius-topright
:
0px
;
-webkit-border-top-right-radius
:
0px
;
border-top-right-radius
:
0px
;
-moz-border-radius-topleft
:
0px
;
-webkit-border-top-left-radius
:
0px
;
border-top-left-radius
:
0px
;
}
.mo-table
table
{
border-collapse
:
collapse
;
border-spacing
:
0
;
width
:
100%
;
margin
:
0px
;
padding
:
0px
;
}
.mo-table
tr
:last-child
td
:last-child
{
-moz-border-radius-bottomright
:
0px
;
-webkit-border-bottom-right-radius
:
0px
;
border-bottom-right-radius
:
0px
;
}
.mo-table
table
tr
:first-child
td
:first-child
{
-moz-border-radius-topleft
:
0px
;
-webkit-border-top-left-radius
:
0px
;
border-top-left-radius
:
0px
;
}
.mo-table
table
tr
:first-child
td
:last-child
{
-moz-border-radius-topright
:
0px
;
-webkit-border-top-right-radius
:
0px
;
border-top-right-radius
:
0px
;
}
.mo-table
tr
:last-child
td
:first-child
{
-moz-border-radius-bottomleft
:
0px
;
-webkit-border-bottom-left-radius
:
0px
;
border-bottom-left-radius
:
0px
;
}
.mo-table
tr
:hover
td
{
background-color
:
#EEF1F4
;
}
.mo-table
td
.upper
{
text-transform
:
uppercase
;}
.mo-table
td
{
vertical-align
:
middle
;
background-color
:
#e8eaed
;
min-width
:
190px
;
border
:
1px
solid
#ffffff
;
border-width
:
0px
1px
1px
0px
;
text-align
:
left
;
padding
:
12px
;
font-size
:
13px
;
font-family
:
Helvetica
;
font-weight
:
normal
;
color
:
#575757
;
}
.mo-table
tr
:last-child
td
{
border-width
:
0px
1px
0px
0px
;
}
.mo-table
tr
td
:last-child
{
border-width
:
0px
0px
1px
0px
;
}
.mo-table
tr
:last-child
td
:last-child
{
border-width
:
0px
0px
0px
0px
;
}
.mo-table
tr
:first-child
td
{
background-color
:
#3799fc
;
border
:
0px
solid
#ffffff
;
text-align
:
left
;
border-width
:
0px
0px
1px
1px
;
font-size
:
16px
;
font-family
:
Helvetica
;
font-weight
:
normal
;
color
:
#ffffff
;
}
.mo-table
tr
:first-child
td
:first-child
{
border-width
:
0px
0px
1px
0px
;
}
.mo-table
tr
:first-child
td
:last-child
{
border-width
:
0px
0px
1px
1px
;
}
</style>
</head>
<body>
<h1>
Computer Partition Parameters
</h1>
<div
class=
"mo-table"
>
<table
>
<tr>
<td
colspan=
2
>
Computer Partition information
</td>
</tr>
<tr>
<td
class=
"upper"
>
Partition IPv4
</td>
<td>
{{ ipv4 }}
</td>
</tr>
<tr>
<td
class=
"upper"
>
Partition IPv6
</td>
<td>
{{ ipv6 }}
</td>
</tr>
<!--<tr>
<td class="upper" > Instance Reference </td>
<td> {{ instance_reference }} </td>
</tr>-->
<tr>
<td
class=
"upper"
>
Software Release Url
</td>
<td>
<a
href=
"{{ software_url }}"
target=
'_blank'
>
{{ software_url }}
</a>
</td>
</tr>
<tr>
<td
class=
"upper"
>
Partition Home directory
</td>
<td>
{{ home }}
</td>
</tr>
<tr>
<td
class=
"upper"
>
Partition Reference
</td>
<td>
{{ partition_id }}
</td>
</tr>
<tr>
<td
class=
"upper"
>
Computer Reference
</td>
<td>
{{ computer_id }}
</td>
</tr>
<tr>
<td
class=
"upper"
>
Master Server Url
</td>
<td>
{{ master_url }}
</td>
</tr>
{% for key, parameter in extra_parameters.items() -%}
<tr>
<td
class=
"upper"
>
{{ key }}
</td>
<td>
{{ parameter }}
</td>
</tr>
{% endfor -%}
<tr>
<td
class=
"upper"
>
Instance Parameters
</td>
<td>
{{ slapparameter_dict }}
</td>
</tr>
</table>
</div>
</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