# Path: app/snapins/snapin.py
# class SnapinBase(object):
#     __metaclass__ = abc.ABCMeta
#     title = "snapin title"
#     description = "snapin description" 
#     version = "0.0"
#     name = "default snapin"
#     
#     @abc.abstractmethod
#     def context(self):
#         """Return some stuff to be used in the snapin template"""
#         return ""
# 
# Path: app/lib/livestatusconnection.py



from flask import Flask, request, session, g, redirect, url_for, abort, render_template, flash, Module, current_app
from flask.ext.babelex import Domain, gettext, ngettext
from ..snapin import SnapinBase
from app.lib.livestatusconnection import live
from os import path
import abc
        host_query = \
            "GET hosts\n" \
            "Stats: state >= 0\n" \
            "Stats: state > 0\n" \
            "Stats: scheduled_downtime_depth = 0\n" \
            "StatsAnd: 2\n" \
            "Stats: state > 0\n" \
            "Stats: scheduled_downtime_depth = 0\n" \
            "Stats: acknowledged = 0\n" \
            "StatsAnd: 3\n" \
            "Filter: custom_variable_names < _REALNAME\n"

        service_query = \
            "GET services\n" \
            "Stats: state >= 0\n" \
            "Stats: state > 0\n" \
            "Stats: scheduled_downtime_depth = 0\n" \
            "Stats: host_scheduled_downtime_depth = 0\n" \
            "Stats: host_state = 0\n" \
            "StatsAnd: 4\n" \
            "Stats: state > 0\n" \
            "Stats: scheduled_downtime_depth = 0\n" \
            "Stats: host_scheduled_downtime_depth = 0\n" \
            "Stats: acknowledged = 0\n" \
            "Stats: host_state = 0\n" \
            "StatsAnd: 5\n" \
            "Filter: host_custom_variable_names < _REALNAME\n"
        context['toggle_url'] = "sidebar_openclose.py?name=%s&state=" % 'tactical_overview' 

        context['hstdata'] = live.query_summed_stats(host_query)

# Path: app/snapins/snapin.py
# class SnapinBase(object):
#     __metaclass__ = abc.ABCMeta
#     title = "snapin title"
#     description = "snapin description" 
#     version = "0.0"
#     name = "default snapin"
#     
#     @abc.abstractmethod
#     def context(self):
#         """Return some stuff to be used in the snapin template"""
#         return ""
# 
# Path: app/lib/livestatusconnection.py



# Path: app/snapins/SnapinTacticalOverview/SnapinTacticalOverview.py
from flask import Flask, request, session, g, redirect, url_for, abort, render_template, flash, Module, current_app
from flask.ext.babelex import Domain, gettext, ngettext
from ..snapin import SnapinBase
from app.lib.livestatusconnection import live
from os import path
import abc

        host_query = \
            "GET hosts\n" \
            "Stats: state >= 0\n" \
            "Stats: state > 0\n" \
            "Stats: scheduled_downtime_depth = 0\n" \
            "StatsAnd: 2\n" \
            "Stats: state > 0\n" \
            "Stats: scheduled_downtime_depth = 0\n" \
            "Stats: acknowledged = 0\n" \
            "StatsAnd: 3\n" \
            "Filter: custom_variable_names < _REALNAME\n"

        service_query = \
            "GET services\n" \
            "Stats: state >= 0\n" \
            "Stats: state > 0\n" \
            "Stats: scheduled_downtime_depth = 0\n" \
            "Stats: host_scheduled_downtime_depth = 0\n" \
            "Stats: host_state = 0\n" \
            "StatsAnd: 4\n" \
            "Stats: state > 0\n" \
            "Stats: scheduled_downtime_depth = 0\n" \
            "Stats: host_scheduled_downtime_depth = 0\n" \
            "Stats: acknowledged = 0\n" \
            "Stats: host_state = 0\n" \
            "StatsAnd: 5\n" \
            "Filter: host_custom_variable_names < _REALNAME\n"
        context['toggle_url'] = "sidebar_openclose.py?name=%s&state=" % 'tactical_overview' 

        context['hstdata'] = live.query_summed_stats(host_query)

        context['svcdata'] = live.query_summed_stats(service_query)