Customize template for viewing probe details
probably still need to improve editing also? we'll see
This commit is contained in:
parent
daa304c613
commit
aa97a36167
|
@ -160,6 +160,12 @@ body > #body-wrapper {
|
||||||
* Panels
|
* Panels
|
||||||
******************************/
|
******************************/
|
||||||
|
|
||||||
|
.panel-wrapper {
|
||||||
|
float: left;
|
||||||
|
margin-right: 15px;
|
||||||
|
width: 40%;
|
||||||
|
}
|
||||||
|
|
||||||
.panel,
|
.panel,
|
||||||
.panel-grid {
|
.panel-grid {
|
||||||
border-left: 1px solid Black;
|
border-left: 1px solid Black;
|
||||||
|
|
|
@ -11,11 +11,6 @@
|
||||||
#product-image {
|
#product-image {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
.panel-wrapper {
|
|
||||||
float: left;
|
|
||||||
margin-right: 15px;
|
|
||||||
width: 40%;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
|
|
88
tailbone/templates/tempmon/probes/view.mako
Normal file
88
tailbone/templates/tempmon/probes/view.mako
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
## -*- coding: utf-8; -*-
|
||||||
|
<%inherit file="/master/view.mako" />
|
||||||
|
|
||||||
|
##############################
|
||||||
|
## page body
|
||||||
|
##############################
|
||||||
|
|
||||||
|
<ul id="context-menu">
|
||||||
|
${self.context_menu_items()}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="form-wrapper">
|
||||||
|
|
||||||
|
<div class="panel" id="probe-main">
|
||||||
|
<h2>General</h2>
|
||||||
|
<div class="panel-body">
|
||||||
|
<div style="clear: none; float: left;">
|
||||||
|
${self.render_main_fields(form)}
|
||||||
|
</div>
|
||||||
|
## % if image_url:
|
||||||
|
## ${h.image(image_url, "Probe Image", id='probe-image', width=150, height=150)}
|
||||||
|
## % endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panel-wrapper">
|
||||||
|
${self.left_column()}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panel-wrapper">
|
||||||
|
${self.right_column()}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
% if master.has_rows:
|
||||||
|
${rows_grid|n}
|
||||||
|
% endif
|
||||||
|
|
||||||
|
##############################
|
||||||
|
## rendering methods
|
||||||
|
##############################
|
||||||
|
|
||||||
|
<%def name="render_main_fields(form)">
|
||||||
|
${form.render_field_readonly('client')}
|
||||||
|
${form.render_field_readonly('config_key')}
|
||||||
|
${form.render_field_readonly('appliance_type')}
|
||||||
|
${form.render_field_readonly('description')}
|
||||||
|
${form.render_field_readonly('device_path')}
|
||||||
|
${form.render_field_readonly('notes')}
|
||||||
|
${form.render_field_readonly('enabled')}
|
||||||
|
${form.render_field_readonly('status')}
|
||||||
|
${form.render_field_readonly('therm_status_timeout')}
|
||||||
|
${form.render_field_readonly('status_alert_timeout')}
|
||||||
|
</%def>
|
||||||
|
|
||||||
|
<%def name="left_column()">
|
||||||
|
<div class="panel">
|
||||||
|
<h2>Temperatures</h2>
|
||||||
|
<div class="panel-body">
|
||||||
|
${self.render_temperature_fields(form)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</%def>
|
||||||
|
|
||||||
|
<%def name="right_column()">
|
||||||
|
<div class="panel">
|
||||||
|
<h2>Timeouts</h2>
|
||||||
|
<div class="panel-body">
|
||||||
|
${self.render_timeout_fields(form)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</%def>
|
||||||
|
|
||||||
|
<%def name="render_temperature_fields(form)">
|
||||||
|
${form.render_field_readonly('critical_temp_max')}
|
||||||
|
${form.render_field_readonly('good_temp_max')}
|
||||||
|
${form.render_field_readonly('good_temp_min')}
|
||||||
|
${form.render_field_readonly('critical_temp_min')}
|
||||||
|
</%def>
|
||||||
|
|
||||||
|
<%def name="render_timeout_fields(form)">
|
||||||
|
${form.render_field_readonly('critical_max_timeout')}
|
||||||
|
${form.render_field_readonly('good_max_timeout')}
|
||||||
|
${form.render_field_readonly('good_min_timeout')}
|
||||||
|
${form.render_field_readonly('critical_min_timeout')}
|
||||||
|
${form.render_field_readonly('error_timeout')}
|
||||||
|
</%def>
|
|
@ -51,6 +51,13 @@ class TempmonProbeView(MasterView):
|
||||||
has_rows = True
|
has_rows = True
|
||||||
model_row_class = tempmon.Reading
|
model_row_class = tempmon.Reading
|
||||||
|
|
||||||
|
labels = {
|
||||||
|
'critical_max_timeout': "Critical High Timeout",
|
||||||
|
'good_max_timeout': "High Timeout",
|
||||||
|
'good_min_timeout': "Low Timeout",
|
||||||
|
'critical_min_timeout': "Critical Low Timeout",
|
||||||
|
}
|
||||||
|
|
||||||
grid_columns = [
|
grid_columns = [
|
||||||
'client',
|
'client',
|
||||||
'config_key',
|
'config_key',
|
||||||
|
|
Loading…
Reference in a new issue