Exemplo n.º 1
0
    def __init__(
        self, ims, shift, incidents_by_activity, template_name="shift"
    ):
        BaseElement.__init__(self, ims, template_name, str(shift))

        self.shift = shift
        self.incidents_by_activity = incidents_by_activity
Exemplo n.º 2
0
    def __init__(self, ims, number):
        BaseElement.__init__(
            self, ims, "incident",
            "Incident #{0}".format(number)
        )
        self.incident = self.ims.storage.read_incident_with_number(number)

        for attr_name in (
            "number",
            "priority",
            "created",
            "dispatched",
            "on_scene",
            "closed",
            "summary",
        ):
            @renderer
            def render_attr(request, tag, attr_name=attr_name):
                return tag(u"{0}".format(getattr(self.incident, attr_name)))

            setattr(self, attr_name, render_attr)
Exemplo n.º 3
0
 def __init__(self, ims):
     BaseElement.__init__(self, ims, "home", "Ranger Incident Management System")
Exemplo n.º 4
0
 def __init__(self, ims, name):
     BaseElement.__init__(self, ims, name, "Shift Change Report")
Exemplo n.º 5
0
 def __init__(self, ims, template_name="report_shift"):
     BaseElement.__init__(self, ims, template_name, "Shift Summary")
Exemplo n.º 6
0
 def __init__(self, ims, template_name="report_daily"):
     BaseElement.__init__(self, ims, template_name, "Daily Report")
Exemplo n.º 7
0
 def __init__(self, ims):
     BaseElement.__init__(self, ims, "queue", "Dispatch Queue")
Exemplo n.º 8
0
 def __init__(self, ims, name):
     BaseElement.__init__(self, ims, name, "Daily Report")