Ninja: Fixed things that got broken in previous merge
models/config.php: LIMIT 0 sucks in SQL

If the $num_per_page wasn't set/set to 0, we'd still add the LIMIT and
OFFSET clause, which is bad.

Signed-off-by: Carl Helmertz <chelmertz@op5.com>
Revert part of d28217f37

Lesson learned: check which files are included in a cherry-picked
commit (I only wanted the ones in helper/config.php).

Signed-off-by: Carl Helmertz <chelmertz@op5.com>
models/reports: Rename alert_history->histogram

Because alert_history is something completely different, the old name
was a tiny bit non-obvious.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
controllers/reports: Remove code duplication

When the exact same code is included in an if and it's else, we can just
put it below.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
reports: Make description helptext refer to *this* description

Not the scheduling description.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
summary: Fix Some Bugs™

Because js addition was spread out throughout the method in different,
interesting ways, it was very hard to figure out which files and method
calls were missing from the generate method that caused the javascript
calendars to fail miserably, while they worked on the index page.

After moving the code about a bit, a couple of interesting lines were
added, but the moving about was kept around to simplify this type of
debugging the next time.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
Report_options: Make it possible to set host/services to "all" constant

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
css: Remove a bit of trends code

I killed the trend reports, so kill the trend CSS

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
Summary_options: Add all extra options from alert history

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
Add events to "recent alerts" summary, port alert history to that

This fixes bug #5627.

It's a bit ugly in places still - for example, the "save report" button
on alert history views is not really supposed to be there - but it seems
to work.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
report_options: Handle '*' as a shortcut for all services w/o choking

We errored out if the shortcut wasn't handled properly.

Signed-off-by: Carl Helmertz <chelmertz@op5.com>
scheduling_queue-view: Prettify the fallback texts for check output

Signed-off-by: Carl Helmertz <chelmertz@op5.com>
mysql: Fix collation for merlin.ninja_report_comments

Otherwise it's very hard to join with otherwise collated table rows (by
default, my collation is latin1_swedish_ci, of some reason).

Signed-off-by: Carl Helmertz <chelmertz@op5.com>
janitor: Doxygen complaints

Signed-off-by: Carl Helmertz <chelmertz@op5.com>
reports: Remove event log view

Soon to be replaced by a proper alert history.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
alert_history: Move SQL queries out of controller

Boo, stupid Robin is stupid.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
reports: Call set_global for type once

Because global really means global, a sub-report could override this for
the master report, resulting in badness.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
views/summary: Remove extra div wrapper

The extra div wrapper created double margins, which looked silly.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
Summary_options: Make forever reportperiod resolvable

I moved the reportperiod definition into the summary_options, but
forgot to move the code for resolving it as well.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>