This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% load divide timestamp_to_time %} | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<meta name="viewport" content="width=device-width, initial-scale=1"/> | |
<title>Lots of Logs, Alert Notification</title> | |
<style type="text/css"> | |
@import url(http://fonts.googleapis.com/css?family=Lato:400); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from esefpy.web.rest.viewsets import BaseModelWithPaginationViewSet | |
from rest_framework import serializers | |
from rest_framework.reverse import reverse | |
from esefpy.reporting.models import ReportExecution, SUCCESS | |
from esefpy.reporting.serializers.report_execution import ReportExecutionSerializer | |
__author__ = 'ismail' | |
class ReportExecutionViewSet(BaseModelWithPaginationViewSet): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import httplib2 | |
from river_io_python.decorators.river_io_client import river_io_client | |
from river_io_python.urls import OBJECT_COUNT_WAITING_FOR_APPROVAL_URL, OBJECTS_WAITING_FOR_APPROVAL_URL, REGISTER_OBJECT_URL, PROCESSES_TRANSITION__URL, IS_USER_AUTHORIZED_URL | |
__author__ = 'ahmetdal' | |
class RiverIORestClient(): | |
def __init__(self, base_url, auth_token): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT DISTINCT | |
ON (T . ID) T . ID, | |
ip. ID | |
FROM | |
bras_ip_pool T | |
INNER JOIN ip_vrf v1 ON (v1. ID = T .vrf_id) | |
INNER JOIN ip_vrfgroup vg1 ON (vg1. ID = v1.vrf_group_id) | |
INNER JOIN ip_prefix ip | |
LEFT OUTER JOIN ipannouncement ia on (ia.prefix_id=ip.id) | |
INNER JOIN ip_vrf v2 ON (v2. ID = ip.vrf_id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//maxRelationLevel is max relation level that you likely use. In your situation, this is 2. Cause, your levels are 1,2,null(ALL) | |
public String getQuery(String userId, List<String> userIds, Integer relationLevel, int maxRelationLevel) { | |
String startQuery = "start user1=node:node_auto_index(userId = %s), user2=node('name:(%s)')".format(userId, StringUtils.join(userIds,",")); | |
String whereQuery = "" | |
List<String> whereQueryList = new ArrayList<String>(); | |
if (null != relationLevel) { | |
for (i = 1; i <= relationLevel,i++){ | |
whereQueryList.add("(user1-[knows*%s]->(user2) AND user2.preferedLevel>=%s)".format(i, i); | |
} |
NewerOlder