Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
UW-Glance
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eva Schiffer
UW-Glance
Commits
b7dc63cb
Commit
b7dc63cb
authored
3 years ago
by
Eva Schiffer
Browse files
Options
Downloads
Patches
Plain Diff
belt and suspenders our zebra tables because mako doesn't believe in belts
parent
347a6ef8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pyglance/glance/report-base.txt
+40
-26
40 additions, 26 deletions
pyglance/glance/report-base.txt
pyglance/glance/report-variable.txt
+57
-31
57 additions, 31 deletions
pyglance/glance/report-variable.txt
with
97 additions
and
57 deletions
pyglance/glance/report-base.txt
+
40
−
26
View file @
b7dc63cb
...
...
@@ -16,31 +16,33 @@ Copyright (c) 2011 University of Wisconsin SSEC. All rights reserved.
<%block name="cssStyle">
<style>
th.l { text-align: left; }
td.n,th.n { text-align: right; }
body { font-family: sans-serif; }
h4 { margin-bottom: 0; }
tr th { background-color: white; }
tr:nth-child(even) { background-color: #EEE; }
table { border-collapse: collapse; }
td, th { padding-left: 0.5em; padding-right: 0.5em; }
.testfail,.testpass {
display: inline-block;
border: 4px solid black;
text-align: center;
width: 1.15em;
max-width: 1.15em;
height: 1.15em;
max-height: 1.15em;
font-size: 3em;
font-weight: bold;
}
.testfail {
color: #F00;
}
.testpass {
color: #0F0;
}
th.l { text-align: left; }
td.n,th.n { text-align: right; }
body { font-family: sans-serif; }
h4 { margin-bottom: 0; }
tr th { background-color: white; }
tr:nth-child(even) { background-color: #EEE; }
## the tr.evenrow is for coping with PyQt not letting us use nth-child
tr.evenrow { background-color: #EEE; }
table { border-collapse: collapse; }
td, th { padding-left: 0.5em; padding-right: 0.5em; }
.testfail,.testpass {
display: inline-block;
border: 4px solid black;
text-align: center;
width: 1.15em;
max-width: 1.15em;
height: 1.15em;
max-height: 1.15em;
font-size: 3em;
font-weight: bold;
}
.testfail {
color: #F00;
}
.testpass {
color: #0F0;
}
</style>
</%block>
...
...
@@ -212,8 +214,20 @@ Copyright (c) 2011 University of Wisconsin SSEC. All rights reserved.
% endfor
</tr>
## loop to put a line in the table for each attribute
<%
# this is coping with the PyQt gui not handling nth-child
# we're starting with true because we have one table headder row
isEven = True
%>
% for attrKey in sorted(allAttrKeys) :
<tr>
% if isEven :
<tr class="evenrow">
% else :
<tr>
% endif
<%
isEven = not isEven
%>
<td>${attrKey}</td>
## loop to add values for each of the files
% for fileKey in sorted(attributesInfo) :
...
...
This diff is collapsed.
Click to expand it.
pyglance/glance/report-variable.txt
+
57
−
31
View file @
b7dc63cb
...
...
@@ -117,39 +117,65 @@ Copyright (c) 2011 University of Wisconsin SSEC. All rights reserved.
## list out all of the statistics groups we have
<%def name="doclink()">
% if constants.DOCUMENTATION_PATH_KEY in runInfo:
<a href="${runInfo[constants.DOCUMENTATION_PATH_KEY]}">*</a>
% else:
% endif
% if constants.DOCUMENTATION_PATH_KEY in runInfo:
<a href="${runInfo[constants.DOCUMENTATION_PATH_KEY]}">*</a>
% else:
% endif
</%def>
<table>
% if groupedStats is UNDEFINED:
% for setName in sorted(list(statGroups)) :
<% dataSet = statGroups[setName] %>
<tr><th class="l" colspan="2">${setName}</th></tr>
% for statName, statValue in sorted(list(dataSet.items())) :
<tr>
<td class="n">${statName}${doclink()}:</td>
<td class="n">${report.make_formatted_display_string(statValue)}</td>
</tr>
% endfor
% endfor
% else:
% for setName in sorted(list(groupedStats)) :
<% dataSet = groupedStats[setName] %>
<tr><th class="l">${setName}</th><th>Both</th><th>File A</th><th>File B</th></tr>
% for statName, statValue in sorted(list(dataSet.items())) :
<tr>
<td class="n">${statName}${doclink()}:</td>
<td class="n">${report.make_formatted_display_string(statValue['both'])}</td>
<td class="n">${report.make_formatted_display_string(statValue['a'])}</td>
<td class="n">${report.make_formatted_display_string(statValue['b'])}</td>
</tr>
% endfor
% endfor
% endif
</table>
<table>
<%
# this is coping with the PyQt gui not handling nth-child
isEven = False
%>
% if groupedStats is UNDEFINED:
% for setName in sorted(list(statGroups)) :
<% dataSet = statGroups[setName] %>
<tr><th class="l" colspan="2">${setName}</th></tr>
<%
# to make our two ways of striping agree, turn this on and off for header rows too
isEven = not isEven
%>
% for statName, statValue in sorted(list(dataSet.items())) :
% if isEven :
<tr class="evenrow">
% else :
<tr>
% endif
<%
isEven = not isEven
%>
<td class="n">${statName}${doclink()}:</td>
<td class="n">${report.make_formatted_display_string(statValue)}</td>
</tr>
% endfor
% endfor
% else:
% for setName in sorted(list(groupedStats)) :
<% dataSet = groupedStats[setName] %>
<tr><th class="l">${setName}</th><th>Both</th><th>File A</th><th>File B</th></tr>
<%
# to make our two ways of striping agree, turn this on and off for header rows too
isEven = not isEven
%>
% for statName, statValue in sorted(list(dataSet.items())) :
% if isEven :
<tr class="evenrow">
% else :
<tr>
% endif
<%
isEven = not isEven
%>
<td class="n">${statName}${doclink()}:</td>
<td class="n">${report.make_formatted_display_string(statValue['both'])}</td>
<td class="n">${report.make_formatted_display_string(statValue['a'])}</td>
<td class="n">${report.make_formatted_display_string(statValue['b'])}</td>
</tr>
% endfor
% endfor
% endif
</table>
</%block>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment