def graph(self, id): investigation = get_object_or_404(Investigation, id=id) if group_user_permission(investigation): return render_template( "{}/graph.html".format(self.klass.__name__.lower()), investigation=bson_renderer(investigation.info())) abort(403)
def import_from(self, id): investigation = get_object_or_404(Investigation, id=id) observables = Observable.from_string(investigation.import_text) return render_template( "{}/import_from.html".format(self.klass.__name__.lower()), investigation=investigation, observables=bson_renderer(observables))
def graph_node(klass, id): if klass == 'entity': node = get_object_or_404(Entity, id=id) else: node = get_object_or_404(Observable, id=id) investigation = Investigation().save() investigation.add([], [node]) return render_template("graph.html", investigation=bson_renderer(investigation.info()))
def graph_node(self, klass, id): if klass == 'entity': node = get_object_or_404(Entity, id=id) elif klass == 'indicator': node = get_object_or_404(Indicator, id=id) else: node = get_object_or_404(Observable, id=id) investigation = Investigation(created_by=current_user.username).save() investigation.add([], [node]) return render_template( "{}/graph.html".format(self.klass.__name__.lower()), investigation=bson_renderer(investigation.info()))
def graph(id): investigation = get_object_or_404(Investigation, id=id) return render_template("graph.html", investigation=bson_renderer(investigation.info()))
def graph(self, id): investigation = get_object_or_404(Investigation, id=id) return render_template( "{}/graph.html".format(self.klass.__name__.lower()), investigation=bson_renderer(investigation.info()))
def graph_node(self, klass, id): if klass == 'entity': node = get_object_or_404(Entity, id=id) elif klass == 'indicator': node = get_object_or_404(Indicator, id=id) else: node = get_object_or_404(Observable, id=id) investigation = Investigation().save() investigation.add([], [node]) return render_template("{}/graph.html".format(self.klass.__name__.lower()), investigation=bson_renderer(investigation.info()))
def graph(self, id): investigation = get_object_or_404(Investigation, id=id) return render_template("{}/graph.html".format(self.klass.__name__.lower()), investigation=bson_renderer(investigation.info()))