prenus 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE.txt +20 -0
- data/README.rdoc +103 -0
- data/bin/prenus +190 -0
- data/lib/css/table.css +576 -0
- data/lib/images/back_disabled.png +0 -0
- data/lib/images/back_enabled.png +0 -0
- data/lib/images/back_enabled_hover.png +0 -0
- data/lib/images/forward_disabled.png +0 -0
- data/lib/images/forward_enabled.png +0 -0
- data/lib/images/forward_enabled_hover.png +0 -0
- data/lib/images/sort_asc.png +0 -0
- data/lib/images/sort_asc_disabled.png +0 -0
- data/lib/images/sort_both.png +0 -0
- data/lib/images/sort_desc.png +0 -0
- data/lib/images/sort_desc_disabled.png +0 -0
- data/lib/input.rb +1 -0
- data/lib/input/nessusin.rb +127 -0
- data/lib/js/highcharts.js +239 -0
- data/lib/js/jquery.dataTables.js +12091 -0
- data/lib/js/jquery.min.js +4 -0
- data/lib/output.rb +6 -0
- data/lib/output/afterglowout.rb +64 -0
- data/lib/output/circosout.rb +101 -0
- data/lib/output/hostinfoout.rb +62 -0
- data/lib/output/htmlout.rb +732 -0
- data/lib/output/output.rb +39 -0
- data/lib/output/xlsout.rb +60 -0
- metadata +87 -0
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2012 Christian Frichot
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
= Prenus - The Pretty Nessus .. Thing
|
2
|
+
|
3
|
+
This is a quickly hacked together Ruby script that can consume version 2 nessus files (with the help of an udpated ruby-nessus gem) and allows the output of a few different formats, including:
|
4
|
+
|
5
|
+
* Static HTML files with jQuery Datatables and Highcharts graphs
|
6
|
+
* XLS file (Actually a HTML Table with an .xls extension) with unique Nessus vulns and associated IPs
|
7
|
+
* Afterglow (http://afterglow.sourceforge.net/), 2 column CSV files
|
8
|
+
* Circos (http://circos.ca) tableviewer text file
|
9
|
+
* Hosts information, formatted in a 3 column CSV output
|
10
|
+
|
11
|
+
== Installation
|
12
|
+
|
13
|
+
* Clone our copy of the ruby-nessus gem and install it
|
14
|
+
git clone git://github.com/AsteriskLabs/ruby-nessus.git
|
15
|
+
cd ruby-nessus
|
16
|
+
rake install
|
17
|
+
* Install the Prenus gem
|
18
|
+
gem install prenus
|
19
|
+
|
20
|
+
== Usage
|
21
|
+
|
22
|
+
* Download the .nessus files from Nessus you want to Prettify (make sure they're version 2 files, not version 1)
|
23
|
+
* Cd into the folder where the files are
|
24
|
+
* Run Prenus
|
25
|
+
prenus -t html -o tmp *.nessus
|
26
|
+
* Happy Happy Joy Joy
|
27
|
+
|
28
|
+
== Command Line Options
|
29
|
+
|
30
|
+
Usage: prenus <options> [INPUT]
|
31
|
+
|
32
|
+
Specific Options:
|
33
|
+
-h, --help Display this screen
|
34
|
+
-c, --config FILE Load a YAML formatted config file
|
35
|
+
-o, --ouput DIR/FILE Defaults to '.'
|
36
|
+
-t, --type TYPE Select: xls, html, glow, circos or host. Defaults to html
|
37
|
+
-s, --severity LEVEL Defaults to 3 for High -> Critical. For large datasets 4 is saner
|
38
|
+
-f, --filter FILTER Only show these Nessus IDs. For multiple separate with commas 12345,23232,21212
|
39
|
+
-d, --debug Displays stats and other debugging
|
40
|
+
-v, --version Shows the version
|
41
|
+
|
42
|
+
=== Config File
|
43
|
+
|
44
|
+
If you specify a config file (see the example prenus.yaml) file, this allows you to override some host information, or skip vulns for particular hosts.
|
45
|
+
|
46
|
+
=== Output
|
47
|
+
|
48
|
+
Output is handled in a few different ways, if you're running as type 'html', then this option is a folder. If you don't specify a folder, then the HTML files, js files, image files etc are built into the current folder. You might not want this, so give it a folder name, such as 'tmp' to output the files to the ./tmp sub-folder.
|
49
|
+
|
50
|
+
If the type is not 'html', then this is the file which will be used for output, or, can be omitted to simply output to the screen (STDOUT)
|
51
|
+
|
52
|
+
=== Type
|
53
|
+
|
54
|
+
Type specifies what output parser you want:
|
55
|
+
1. html - Outputs a number of HTML files
|
56
|
+
2. xls - Outputs a HTML TABLE text with an .xls extension, which can be opened by fairly modern versions of Excel
|
57
|
+
3. glow - Outputs a CSV formatted text which can be consumed by Afterglow
|
58
|
+
4. circos - Outputs a tabular style text file which can be consumed by the Circos Tableviewer tool
|
59
|
+
5. host - Outputs a CSV formatted file with host information (just ip, os and hostname)
|
60
|
+
|
61
|
+
By default this is html
|
62
|
+
|
63
|
+
=== Severity
|
64
|
+
|
65
|
+
This option doesn't apply to the html output, but, for all other output types, this sets the bottom severity which will be included for output. For example, if severity is 0, then all vulnerabilities identified as informational, low, medium, high and critical will be included. If severity is 3 then only high and critical will be included.
|
66
|
+
|
67
|
+
By default this is 3.
|
68
|
+
|
69
|
+
=== Filter
|
70
|
+
|
71
|
+
This option doesn't apply to the html output, but, for all other output types, this allows you to output only explicitly listed Nessus Plugin IDs. For example: 54343,34443,12345
|
72
|
+
|
73
|
+
=== Debug
|
74
|
+
|
75
|
+
If flagged, then we'll output some raw data.
|
76
|
+
|
77
|
+
== Afterglow - what?
|
78
|
+
|
79
|
+
So, you're interested in creating some pretty Afterglow/Graphviz files to see relationships between Nessus IDs and Hosts? Look no further!
|
80
|
+
|
81
|
+
Using the example colouring Afterglow properties file (prenus.properties) you can execute this to graph critical vulns (as long as you have afterglow working with all its dependencies, PLUS you have Graphviz installed and working (# which neato))
|
82
|
+
|
83
|
+
This will only work if you're in Afterglow's src/perl/graph/ folder:
|
84
|
+
|
85
|
+
prenus -t glow -s 4 /folder/where/nessus/files/are/*.nessus | ./afterglow -t -c /folder/where/prenus.properties | neato -v -Tpng -Gnormalize=true -Goutputorder=edgesfirst -o prenus.png
|
86
|
+
|
87
|
+
== Circos - huh?
|
88
|
+
|
89
|
+
What about those pretty awesome Circos graphs huh?
|
90
|
+
|
91
|
+
Well, getting GD and all the other Circos dependencies was a bit of a pain in the butt on OS X 10.7, but after a bunch of googling and checking out the following URLs, it seemed to work okay. (Might help, probably not: https://gist.github.com/3214492) (I think I also had to update the #!s on top of the .pl files :/)
|
92
|
+
|
93
|
+
You might also need to fiddle with the circos.conf file, but eventually I had it working pretty solidly. I had circos installed in ~/circos/circos-0.62-1/ and the circos tools in ~/circos/circos-tools-0.16/
|
94
|
+
|
95
|
+
s will only work if you're in the Circos Tools tableviewer folder (in my instance, ~/circos/circos-tools-0.16/tools/tableviewer/)
|
96
|
+
|
97
|
+
prenus -t circos -s 4 /folder/where/nessus/files/are/*.nessus | bin/parse-table -conf samples/parse-table-01.conf | bin/make-conf -dir data
|
98
|
+
../../../circos-0.62-1/bin/circos -conf etc/circos.conf -outputfile prenus.png
|
99
|
+
|
100
|
+
This will dump the png into the img/ folder.
|
101
|
+
|
102
|
+
== Changes
|
103
|
+
* Version 0.0.1 - initial release .. buggy to the max
|
data/bin/prenus
ADDED
@@ -0,0 +1,190 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
lib_dir = File.expand_path(File.join(File.dirname(__FILE__),'..'))
|
4
|
+
unless $LOAD_PATH.include?(lib_dir)
|
5
|
+
$LOAD_PATH << lib_dir
|
6
|
+
end
|
7
|
+
|
8
|
+
$root_dir = File.expand_path(File.join(File.dirname(__FILE__),'..'))
|
9
|
+
|
10
|
+
#require some goodies
|
11
|
+
require 'ruby-nessus'
|
12
|
+
|
13
|
+
require 'fileutils'
|
14
|
+
require 'optparse'
|
15
|
+
require 'yaml'
|
16
|
+
|
17
|
+
require 'lib/output'
|
18
|
+
require 'lib/input'
|
19
|
+
|
20
|
+
#Versioning and .. those things
|
21
|
+
$verstring = "Version 0.0.1 - 27th of July, 2012 - Created by Christian \"xntrik\" Frichot.\n\n"
|
22
|
+
$verstring += "Copyright 2012 Christian Frichot\n\n"
|
23
|
+
$verstring += "Licensed under the Apache License, Version 2.0 (the \"License\");\n"
|
24
|
+
$verstring += "you may not use this file except in compliance with the License.\n"
|
25
|
+
$verstring += "You may obtain a copy of the License at\n\n"
|
26
|
+
$verstring += "\thttp://www.apache.org/licenses/LICENSE-2.0\n\n"
|
27
|
+
$verstring += "Unless required by applicable law or agreed to in writing, software\n"
|
28
|
+
$verstring += "distributed under the License is distributed on an \"AS IS\" BASIS,\n"
|
29
|
+
$verstring += "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n"
|
30
|
+
$verstring += "See the License for the specific language governing permissions and\n"
|
31
|
+
$verstring += "limitations under the License.\n"
|
32
|
+
|
33
|
+
class OptsConsole
|
34
|
+
def self.parse(args)
|
35
|
+
options = {}
|
36
|
+
|
37
|
+
opts = OptionParser.new do |opts|
|
38
|
+
opts.banner = "Usage: prenus <options> [INPUT]"
|
39
|
+
|
40
|
+
opts.separator ""
|
41
|
+
opts.separator "Specific Options:"
|
42
|
+
|
43
|
+
opts.on('-h', '--help', 'Display this screen') do
|
44
|
+
puts opts
|
45
|
+
exit
|
46
|
+
end
|
47
|
+
|
48
|
+
opts.on('-c', '--config FILE', 'Load a YAML formatted config file') do |config|
|
49
|
+
options[:configfile] = config
|
50
|
+
end
|
51
|
+
|
52
|
+
# input option
|
53
|
+
# opts.on('-i', '--input FILE', "Or pass in a search option, such as '*.nessus' <- needs single quotes") do |input|
|
54
|
+
# options[:input] = input
|
55
|
+
# end
|
56
|
+
|
57
|
+
# output dir
|
58
|
+
opts.on('-o', '--ouput DIR/FILE', "Defaults to '.'") do |output|
|
59
|
+
#options[:outputdir] = output
|
60
|
+
options[:output] = output
|
61
|
+
end
|
62
|
+
|
63
|
+
# output type
|
64
|
+
opts.on('-t', '--type TYPE', "Select: xls, html, glow, circos or host. Defaults to html") do |type|
|
65
|
+
case type
|
66
|
+
when "html"
|
67
|
+
options[:type] = "html"
|
68
|
+
when "xls"
|
69
|
+
options[:type] = "xls"
|
70
|
+
when "glow"
|
71
|
+
options[:type] = "glow"
|
72
|
+
when "circos"
|
73
|
+
options[:type] = "circos"
|
74
|
+
when "host"
|
75
|
+
options[:type] = "host"
|
76
|
+
else
|
77
|
+
options[:type] = "html"
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
# level - how deep to go on some of the inputs
|
82
|
+
opts.on('-s', '--severity LEVEL', "Defaults to 3 for High -> Critical. For large datasets 4 is saner") do |sev|
|
83
|
+
case sev.to_i
|
84
|
+
when 0
|
85
|
+
options[:severity] = 0
|
86
|
+
when 1
|
87
|
+
options[:severity] = 1
|
88
|
+
when 2
|
89
|
+
options[:severity] = 2
|
90
|
+
when 3
|
91
|
+
options[:severity] = 3
|
92
|
+
when 4
|
93
|
+
options[:severity] = 4
|
94
|
+
else
|
95
|
+
options[:severity] = 3
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
#filter - this is used for some of the outputs - to filter the output ... using MAGIC
|
100
|
+
opts.on('-f','--filter FILTER', "Only show these Nessus IDs. For multiple separate with commas 12345,23232,21212") do |filter|
|
101
|
+
options[:filter] = filter.to_s.split(",")
|
102
|
+
end
|
103
|
+
|
104
|
+
# print debug stuff?
|
105
|
+
opts.on('-d', '--debug', "Displays stats and other debugging") do |debug|
|
106
|
+
options[:debug] = true
|
107
|
+
end
|
108
|
+
|
109
|
+
#yawn
|
110
|
+
opts.on('-v', '--version', "Shows the version") do |version|
|
111
|
+
options[:version] = true
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
begin
|
116
|
+
opts.parse!(args)
|
117
|
+
if ARGV.count == 0 and options[:version].nil?
|
118
|
+
puts
|
119
|
+
puts "** Please specify input files"
|
120
|
+
puts
|
121
|
+
puts opts
|
122
|
+
exit
|
123
|
+
end
|
124
|
+
|
125
|
+
if options[:version]
|
126
|
+
print $verstring
|
127
|
+
exit
|
128
|
+
end
|
129
|
+
|
130
|
+
if options[:debug] and options[:output].nil?
|
131
|
+
print "** can't debug whilst printing out to stdout\n"
|
132
|
+
print "** try without the -d option, or by specifying an output file with -o\n"
|
133
|
+
exit
|
134
|
+
end
|
135
|
+
|
136
|
+
if options[:type] == "html" and options[:output].nil?
|
137
|
+
print "** need a folder name when generating html\n"
|
138
|
+
print "** try with the -o option\n"
|
139
|
+
exit
|
140
|
+
end
|
141
|
+
|
142
|
+
#options[:outputdir] = "." if options[:outputdir].nil? #Default output dir
|
143
|
+
options[:type] = "html" if options[:type].nil? #Default output type
|
144
|
+
options[:severity] = 3 if options[:severity].nil? #Default severity level
|
145
|
+
options[:input] = ARGV # remaining command line options are files
|
146
|
+
|
147
|
+
rescue OptionParser::InvalidOption
|
148
|
+
puts "Invalid option, try -h for usage"
|
149
|
+
exit
|
150
|
+
end
|
151
|
+
|
152
|
+
options
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
options = OptsConsole.parse(ARGV)
|
157
|
+
|
158
|
+
options[:override] = YAML.load_file(options[:configfile])['prenus']['input']['override'] unless options[:configfile].nil?
|
159
|
+
options[:skip] = YAML.load_file(options[:configfile])['prenus']['input']['skip'] unless options[:configfile].nil?
|
160
|
+
|
161
|
+
# Process the input file(s) into two hashes
|
162
|
+
hosts, events = Prenus::Input::Nessusin.import_nessus_files(options)
|
163
|
+
|
164
|
+
# Create an output object - depending on options - and run it
|
165
|
+
case options[:type]
|
166
|
+
when "html"
|
167
|
+
Prenus::Output::Htmlout.new(events,hosts,options).run
|
168
|
+
when "xls"
|
169
|
+
Prenus::Output::Xlsout.new(events,hosts,options).run
|
170
|
+
when "glow"
|
171
|
+
Prenus::Output::Afterglowout.new(events,hosts,options).run
|
172
|
+
when "circos"
|
173
|
+
Prenus::Output::Circosout.new(events,hosts,options).run
|
174
|
+
when "host"
|
175
|
+
Prenus::Output::Hostinfoout.new(events,hosts,options).run
|
176
|
+
end
|
177
|
+
|
178
|
+
# some debuggy / extra info stuff
|
179
|
+
if options[:debug]
|
180
|
+
|
181
|
+
require 'pp'
|
182
|
+
pp events
|
183
|
+
pp hosts
|
184
|
+
pp options
|
185
|
+
|
186
|
+
puts "__STATS___"
|
187
|
+
|
188
|
+
puts "Number of hosts: " + hosts.count.to_s
|
189
|
+
puts "Number of vulns: " + events.count.to_s
|
190
|
+
end
|
data/lib/css/table.css
ADDED
@@ -0,0 +1,576 @@
|
|
1
|
+
/*
|
2
|
+
* File: demo_table.css
|
3
|
+
* CVS: $Id$
|
4
|
+
* Description: CSS descriptions for DataTables demo pages
|
5
|
+
* Author: Allan Jardine
|
6
|
+
* Created: Tue May 12 06:47:22 BST 2009
|
7
|
+
* Modified: $Date$ by $Author$
|
8
|
+
* Language: CSS
|
9
|
+
* Project: DataTables
|
10
|
+
*
|
11
|
+
* Copyright 2009 Allan Jardine. All Rights Reserved.
|
12
|
+
*
|
13
|
+
* ***************************************************************************
|
14
|
+
* DESCRIPTION
|
15
|
+
*
|
16
|
+
* The styles given here are suitable for the demos that are used with the standard DataTables
|
17
|
+
* distribution (see www.datatables.net). You will most likely wish to modify these styles to
|
18
|
+
* meet the layout requirements of your site.
|
19
|
+
*
|
20
|
+
* Common issues:
|
21
|
+
* 'full_numbers' pagination - I use an extra selector on the body tag to ensure that there is
|
22
|
+
* no conflict between the two pagination types. If you want to use full_numbers pagination
|
23
|
+
* ensure that you either have "example_alt_pagination" as a body class name, or better yet,
|
24
|
+
* modify that selector.
|
25
|
+
* Note that the path used for Images is relative. All images are by default located in
|
26
|
+
* ../images/ - relative to this CSS file.
|
27
|
+
*/
|
28
|
+
|
29
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
30
|
+
* DataTables features
|
31
|
+
*/
|
32
|
+
|
33
|
+
.dataTables_wrapper {
|
34
|
+
position: relative;
|
35
|
+
clear: both;
|
36
|
+
zoom: 1; /* Feeling sorry for IE */
|
37
|
+
}
|
38
|
+
|
39
|
+
.dataTables_processing {
|
40
|
+
position: absolute;
|
41
|
+
top: 50%;
|
42
|
+
left: 50%;
|
43
|
+
width: 250px;
|
44
|
+
height: 30px;
|
45
|
+
margin-left: -125px;
|
46
|
+
margin-top: -15px;
|
47
|
+
padding: 14px 0 2px 0;
|
48
|
+
border: 1px solid #ddd;
|
49
|
+
text-align: center;
|
50
|
+
color: #999;
|
51
|
+
font-size: 14px;
|
52
|
+
background-color: white;
|
53
|
+
}
|
54
|
+
|
55
|
+
.dataTables_length {
|
56
|
+
width: 40%;
|
57
|
+
float: left;
|
58
|
+
}
|
59
|
+
|
60
|
+
.dataTables_filter {
|
61
|
+
width: 50%;
|
62
|
+
float: right;
|
63
|
+
text-align: right;
|
64
|
+
}
|
65
|
+
|
66
|
+
.dataTables_info {
|
67
|
+
width: 60%;
|
68
|
+
float: left;
|
69
|
+
}
|
70
|
+
|
71
|
+
.dataTables_paginate {
|
72
|
+
float: right;
|
73
|
+
text-align: right;
|
74
|
+
}
|
75
|
+
|
76
|
+
/* Pagination nested */
|
77
|
+
.paginate_disabled_previous, .paginate_enabled_previous,
|
78
|
+
.paginate_disabled_next, .paginate_enabled_next {
|
79
|
+
height: 19px;
|
80
|
+
float: left;
|
81
|
+
cursor: pointer;
|
82
|
+
*cursor: hand;
|
83
|
+
color: #111 !important;
|
84
|
+
}
|
85
|
+
.paginate_disabled_previous:hover, .paginate_enabled_previous:hover,
|
86
|
+
.paginate_disabled_next:hover, .paginate_enabled_next:hover {
|
87
|
+
text-decoration: none !important;
|
88
|
+
}
|
89
|
+
.paginate_disabled_previous:active, .paginate_enabled_previous:active,
|
90
|
+
.paginate_disabled_next:active, .paginate_enabled_next:active {
|
91
|
+
outline: none;
|
92
|
+
}
|
93
|
+
|
94
|
+
.paginate_disabled_previous,
|
95
|
+
.paginate_disabled_next {
|
96
|
+
color: #666 !important;
|
97
|
+
}
|
98
|
+
.paginate_disabled_previous, .paginate_enabled_previous {
|
99
|
+
padding-left: 23px;
|
100
|
+
}
|
101
|
+
.paginate_disabled_next, .paginate_enabled_next {
|
102
|
+
padding-right: 23px;
|
103
|
+
margin-left: 10px;
|
104
|
+
}
|
105
|
+
|
106
|
+
.paginate_disabled_previous {
|
107
|
+
background: url('back_disabled.png') no-repeat top left;
|
108
|
+
}
|
109
|
+
|
110
|
+
.paginate_enabled_previous {
|
111
|
+
background: url('back_enabled.png') no-repeat top left;
|
112
|
+
}
|
113
|
+
.paginate_enabled_previous:hover {
|
114
|
+
background: url('back_enabled_hover.png') no-repeat top left;
|
115
|
+
}
|
116
|
+
|
117
|
+
.paginate_disabled_next {
|
118
|
+
background: url('forward_disabled.png') no-repeat top right;
|
119
|
+
}
|
120
|
+
|
121
|
+
.paginate_enabled_next {
|
122
|
+
background: url('forward_enabled.png') no-repeat top right;
|
123
|
+
}
|
124
|
+
.paginate_enabled_next:hover {
|
125
|
+
background: url('forward_enabled_hover.png') no-repeat top right;
|
126
|
+
}
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
131
|
+
* DataTables display
|
132
|
+
*/
|
133
|
+
table.display {
|
134
|
+
margin: 0 auto;
|
135
|
+
clear: both;
|
136
|
+
width: 100%;
|
137
|
+
|
138
|
+
/* Note Firefox 3.5 and before have a bug with border-collapse
|
139
|
+
* ( https://bugzilla.mozilla.org/show%5Fbug.cgi?id=155955 )
|
140
|
+
* border-spacing: 0; is one possible option. Conditional-css.com is
|
141
|
+
* useful for this kind of thing
|
142
|
+
*
|
143
|
+
* Further note IE 6/7 has problems when calculating widths with border width.
|
144
|
+
* It subtracts one px relative to the other browsers from the first column, and
|
145
|
+
* adds one to the end...
|
146
|
+
*
|
147
|
+
* If you want that effect I'd suggest setting a border-top/left on th/td's and
|
148
|
+
* then filling in the gaps with other borders.
|
149
|
+
*/
|
150
|
+
}
|
151
|
+
|
152
|
+
table.display thead th {
|
153
|
+
padding: 3px 18px 3px 10px;
|
154
|
+
border-bottom: 1px solid black;
|
155
|
+
font-weight: bold;
|
156
|
+
cursor: pointer;
|
157
|
+
* cursor: hand;
|
158
|
+
}
|
159
|
+
|
160
|
+
table.display tfoot th {
|
161
|
+
padding: 3px 18px 3px 10px;
|
162
|
+
border-top: 1px solid black;
|
163
|
+
font-weight: bold;
|
164
|
+
}
|
165
|
+
|
166
|
+
table.display tr.heading2 td {
|
167
|
+
border-bottom: 1px solid #aaa;
|
168
|
+
}
|
169
|
+
|
170
|
+
table.display td {
|
171
|
+
padding: 3px 10px;
|
172
|
+
}
|
173
|
+
|
174
|
+
table.display td.center {
|
175
|
+
text-align: center;
|
176
|
+
}
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
181
|
+
* DataTables sorting
|
182
|
+
*/
|
183
|
+
|
184
|
+
.sorting_asc {
|
185
|
+
background: url('sort_asc.png') no-repeat center right;
|
186
|
+
}
|
187
|
+
|
188
|
+
.sorting_desc {
|
189
|
+
background: url('sort_desc.png') no-repeat center right;
|
190
|
+
}
|
191
|
+
|
192
|
+
.sorting {
|
193
|
+
background: url('sort_both.png') no-repeat center right;
|
194
|
+
}
|
195
|
+
|
196
|
+
.sorting_asc_disabled {
|
197
|
+
background: url('sort_asc_disabled.png') no-repeat center right;
|
198
|
+
}
|
199
|
+
|
200
|
+
.sorting_desc_disabled {
|
201
|
+
background: url('sort_desc_disabled.png') no-repeat center right;
|
202
|
+
}
|
203
|
+
|
204
|
+
th:active {
|
205
|
+
outline: none;
|
206
|
+
}
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
212
|
+
* DataTables row classes
|
213
|
+
*/
|
214
|
+
table.display tr.odd.gradeA {
|
215
|
+
background-color: #ddffdd;
|
216
|
+
}
|
217
|
+
|
218
|
+
table.display tr.even.gradeA {
|
219
|
+
background-color: #eeffee;
|
220
|
+
}
|
221
|
+
|
222
|
+
table.display tr.odd.gradeC {
|
223
|
+
background-color: #ddddff;
|
224
|
+
}
|
225
|
+
|
226
|
+
table.display tr.even.gradeC {
|
227
|
+
background-color: #eeeeff;
|
228
|
+
}
|
229
|
+
|
230
|
+
table.display tr.odd.gradeX {
|
231
|
+
background-color: #ffdddd;
|
232
|
+
}
|
233
|
+
|
234
|
+
table.display tr.even.gradeX {
|
235
|
+
background-color: #ffeeee;
|
236
|
+
}
|
237
|
+
|
238
|
+
table.display tr.odd.gradeU {
|
239
|
+
background-color: #ddd;
|
240
|
+
}
|
241
|
+
|
242
|
+
table.display tr.even.gradeU {
|
243
|
+
background-color: #eee;
|
244
|
+
}
|
245
|
+
|
246
|
+
|
247
|
+
tr.odd {
|
248
|
+
background-color: #E2E4FF;
|
249
|
+
}
|
250
|
+
|
251
|
+
tr.even {
|
252
|
+
background-color: white;
|
253
|
+
}
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
260
|
+
* Misc
|
261
|
+
*/
|
262
|
+
.dataTables_scroll {
|
263
|
+
clear: both;
|
264
|
+
}
|
265
|
+
|
266
|
+
.dataTables_scrollBody {
|
267
|
+
*margin-top: -1px;
|
268
|
+
-webkit-overflow-scrolling: touch;
|
269
|
+
}
|
270
|
+
|
271
|
+
.top, .bottom {
|
272
|
+
padding: 15px;
|
273
|
+
background-color: #F5F5F5;
|
274
|
+
border: 1px solid #CCCCCC;
|
275
|
+
}
|
276
|
+
|
277
|
+
.top .dataTables_info {
|
278
|
+
float: none;
|
279
|
+
}
|
280
|
+
|
281
|
+
.clear {
|
282
|
+
clear: both;
|
283
|
+
}
|
284
|
+
|
285
|
+
.dataTables_empty {
|
286
|
+
text-align: center;
|
287
|
+
}
|
288
|
+
|
289
|
+
tfoot input {
|
290
|
+
margin: 0.5em 0;
|
291
|
+
width: 100%;
|
292
|
+
color: #444;
|
293
|
+
}
|
294
|
+
|
295
|
+
tfoot input.search_init {
|
296
|
+
color: #999;
|
297
|
+
}
|
298
|
+
|
299
|
+
td.group {
|
300
|
+
background-color: #d1cfd0;
|
301
|
+
border-bottom: 2px solid #A19B9E;
|
302
|
+
border-top: 2px solid #A19B9E;
|
303
|
+
}
|
304
|
+
|
305
|
+
td.details {
|
306
|
+
background-color: #d1cfd0;
|
307
|
+
border: 2px solid #A19B9E;
|
308
|
+
}
|
309
|
+
|
310
|
+
|
311
|
+
.example_alt_pagination div.dataTables_info {
|
312
|
+
width: 40%;
|
313
|
+
}
|
314
|
+
|
315
|
+
.paging_full_numbers {
|
316
|
+
width: 400px;
|
317
|
+
height: 22px;
|
318
|
+
line-height: 22px;
|
319
|
+
}
|
320
|
+
|
321
|
+
.paging_full_numbers a:active {
|
322
|
+
outline: none
|
323
|
+
}
|
324
|
+
|
325
|
+
.paging_full_numbers a:hover {
|
326
|
+
text-decoration: none;
|
327
|
+
}
|
328
|
+
|
329
|
+
.paging_full_numbers a.paginate_button,
|
330
|
+
.paging_full_numbers a.paginate_active {
|
331
|
+
border: 1px solid #aaa;
|
332
|
+
-webkit-border-radius: 5px;
|
333
|
+
-moz-border-radius: 5px;
|
334
|
+
padding: 2px 5px;
|
335
|
+
margin: 0 3px;
|
336
|
+
cursor: pointer;
|
337
|
+
*cursor: hand;
|
338
|
+
color: #333 !important;
|
339
|
+
}
|
340
|
+
|
341
|
+
.paging_full_numbers a.paginate_button {
|
342
|
+
background-color: #ddd;
|
343
|
+
}
|
344
|
+
|
345
|
+
.paging_full_numbers a.paginate_button:hover {
|
346
|
+
background-color: #ccc;
|
347
|
+
text-decoration: none !important;
|
348
|
+
}
|
349
|
+
|
350
|
+
.paging_full_numbers a.paginate_active {
|
351
|
+
background-color: #99B3FF;
|
352
|
+
}
|
353
|
+
|
354
|
+
table.display tr.even.row_selected td {
|
355
|
+
background-color: #B0BED9;
|
356
|
+
}
|
357
|
+
|
358
|
+
table.display tr.odd.row_selected td {
|
359
|
+
background-color: #9FAFD1;
|
360
|
+
}
|
361
|
+
|
362
|
+
|
363
|
+
/*
|
364
|
+
* Sorting classes for columns
|
365
|
+
*/
|
366
|
+
/* For the standard odd/even */
|
367
|
+
tr.odd td.sorting_1 {
|
368
|
+
background-color: #D3D6FF;
|
369
|
+
}
|
370
|
+
|
371
|
+
tr.odd td.sorting_2 {
|
372
|
+
background-color: #DADCFF;
|
373
|
+
}
|
374
|
+
|
375
|
+
tr.odd td.sorting_3 {
|
376
|
+
background-color: #E0E2FF;
|
377
|
+
}
|
378
|
+
|
379
|
+
tr.even td.sorting_1 {
|
380
|
+
background-color: #EAEBFF;
|
381
|
+
}
|
382
|
+
|
383
|
+
tr.even td.sorting_2 {
|
384
|
+
background-color: #F2F3FF;
|
385
|
+
}
|
386
|
+
|
387
|
+
tr.even td.sorting_3 {
|
388
|
+
background-color: #F9F9FF;
|
389
|
+
}
|
390
|
+
|
391
|
+
|
392
|
+
/* For the Conditional-CSS grading rows */
|
393
|
+
/*
|
394
|
+
Colour calculations (based off the main row colours)
|
395
|
+
Level 1:
|
396
|
+
dd > c4
|
397
|
+
ee > d5
|
398
|
+
Level 2:
|
399
|
+
dd > d1
|
400
|
+
ee > e2
|
401
|
+
*/
|
402
|
+
tr.odd.gradeA td.sorting_1 {
|
403
|
+
background-color: #c4ffc4;
|
404
|
+
}
|
405
|
+
|
406
|
+
tr.odd.gradeA td.sorting_2 {
|
407
|
+
background-color: #d1ffd1;
|
408
|
+
}
|
409
|
+
|
410
|
+
tr.odd.gradeA td.sorting_3 {
|
411
|
+
background-color: #d1ffd1;
|
412
|
+
}
|
413
|
+
|
414
|
+
tr.even.gradeA td.sorting_1 {
|
415
|
+
background-color: #d5ffd5;
|
416
|
+
}
|
417
|
+
|
418
|
+
tr.even.gradeA td.sorting_2 {
|
419
|
+
background-color: #e2ffe2;
|
420
|
+
}
|
421
|
+
|
422
|
+
tr.even.gradeA td.sorting_3 {
|
423
|
+
background-color: #e2ffe2;
|
424
|
+
}
|
425
|
+
|
426
|
+
tr.odd.gradeC td.sorting_1 {
|
427
|
+
background-color: #c4c4ff;
|
428
|
+
}
|
429
|
+
|
430
|
+
tr.odd.gradeC td.sorting_2 {
|
431
|
+
background-color: #d1d1ff;
|
432
|
+
}
|
433
|
+
|
434
|
+
tr.odd.gradeC td.sorting_3 {
|
435
|
+
background-color: #d1d1ff;
|
436
|
+
}
|
437
|
+
|
438
|
+
tr.even.gradeC td.sorting_1 {
|
439
|
+
background-color: #d5d5ff;
|
440
|
+
}
|
441
|
+
|
442
|
+
tr.even.gradeC td.sorting_2 {
|
443
|
+
background-color: #e2e2ff;
|
444
|
+
}
|
445
|
+
|
446
|
+
tr.even.gradeC td.sorting_3 {
|
447
|
+
background-color: #e2e2ff;
|
448
|
+
}
|
449
|
+
|
450
|
+
tr.odd.gradeX td.sorting_1 {
|
451
|
+
background-color: #ffc4c4;
|
452
|
+
}
|
453
|
+
|
454
|
+
tr.odd.gradeX td.sorting_2 {
|
455
|
+
background-color: #ffd1d1;
|
456
|
+
}
|
457
|
+
|
458
|
+
tr.odd.gradeX td.sorting_3 {
|
459
|
+
background-color: #ffd1d1;
|
460
|
+
}
|
461
|
+
|
462
|
+
tr.even.gradeX td.sorting_1 {
|
463
|
+
background-color: #ffd5d5;
|
464
|
+
}
|
465
|
+
|
466
|
+
tr.even.gradeX td.sorting_2 {
|
467
|
+
background-color: #ffe2e2;
|
468
|
+
}
|
469
|
+
|
470
|
+
tr.even.gradeX td.sorting_3 {
|
471
|
+
background-color: #ffe2e2;
|
472
|
+
}
|
473
|
+
|
474
|
+
tr.odd.gradeU td.sorting_1 {
|
475
|
+
background-color: #c4c4c4;
|
476
|
+
}
|
477
|
+
|
478
|
+
tr.odd.gradeU td.sorting_2 {
|
479
|
+
background-color: #d1d1d1;
|
480
|
+
}
|
481
|
+
|
482
|
+
tr.odd.gradeU td.sorting_3 {
|
483
|
+
background-color: #d1d1d1;
|
484
|
+
}
|
485
|
+
|
486
|
+
tr.even.gradeU td.sorting_1 {
|
487
|
+
background-color: #d5d5d5;
|
488
|
+
}
|
489
|
+
|
490
|
+
tr.even.gradeU td.sorting_2 {
|
491
|
+
background-color: #e2e2e2;
|
492
|
+
}
|
493
|
+
|
494
|
+
tr.even.gradeU td.sorting_3 {
|
495
|
+
background-color: #e2e2e2;
|
496
|
+
}
|
497
|
+
|
498
|
+
|
499
|
+
/*
|
500
|
+
* Row highlighting example
|
501
|
+
*/
|
502
|
+
.ex_highlight #example tbody tr.even:hover, #example tbody tr.even td.highlighted {
|
503
|
+
background-color: #ECFFB3;
|
504
|
+
}
|
505
|
+
|
506
|
+
.ex_highlight #example tbody tr.odd:hover, #example tbody tr.odd td.highlighted {
|
507
|
+
background-color: #E6FF99;
|
508
|
+
}
|
509
|
+
|
510
|
+
.ex_highlight_row #example tr.even:hover {
|
511
|
+
background-color: #ECFFB3;
|
512
|
+
}
|
513
|
+
|
514
|
+
.ex_highlight_row #example tr.even:hover td.sorting_1 {
|
515
|
+
background-color: #DDFF75;
|
516
|
+
}
|
517
|
+
|
518
|
+
.ex_highlight_row #example tr.even:hover td.sorting_2 {
|
519
|
+
background-color: #E7FF9E;
|
520
|
+
}
|
521
|
+
|
522
|
+
.ex_highlight_row #example tr.even:hover td.sorting_3 {
|
523
|
+
background-color: #E2FF89;
|
524
|
+
}
|
525
|
+
|
526
|
+
.ex_highlight_row #example tr.odd:hover {
|
527
|
+
background-color: #E6FF99;
|
528
|
+
}
|
529
|
+
|
530
|
+
.ex_highlight_row #example tr.odd:hover td.sorting_1 {
|
531
|
+
background-color: #D6FF5C;
|
532
|
+
}
|
533
|
+
|
534
|
+
.ex_highlight_row #example tr.odd:hover td.sorting_2 {
|
535
|
+
background-color: #E0FF84;
|
536
|
+
}
|
537
|
+
|
538
|
+
.ex_highlight_row #example tr.odd:hover td.sorting_3 {
|
539
|
+
background-color: #DBFF70;
|
540
|
+
}
|
541
|
+
|
542
|
+
|
543
|
+
/*
|
544
|
+
* KeyTable
|
545
|
+
*/
|
546
|
+
table.KeyTable td {
|
547
|
+
border: 3px solid transparent;
|
548
|
+
}
|
549
|
+
|
550
|
+
table.KeyTable td.focus {
|
551
|
+
border: 3px solid #3366FF;
|
552
|
+
}
|
553
|
+
|
554
|
+
table.display tr.gradeA {
|
555
|
+
background-color: #eeffee;
|
556
|
+
}
|
557
|
+
|
558
|
+
table.display tr.gradeC {
|
559
|
+
background-color: #ddddff;
|
560
|
+
}
|
561
|
+
|
562
|
+
table.display tr.gradeX {
|
563
|
+
background-color: #ffdddd;
|
564
|
+
}
|
565
|
+
|
566
|
+
table.display tr.gradeU {
|
567
|
+
background-color: #ddd;
|
568
|
+
}
|
569
|
+
|
570
|
+
div.box {
|
571
|
+
height: 100px;
|
572
|
+
padding: 10px;
|
573
|
+
overflow: auto;
|
574
|
+
border: 1px solid #8080FF;
|
575
|
+
background-color: #E5E5FF;
|
576
|
+
}
|