Project

General

Profile

Download (2.86 KB) Statistics
| Branch: | Revision:

git_sitools_idoc / webstatDev / idoc_Maison / webstat / libStatSitoolsConstante.py~ @ master

1 9791e4f3 Marc Nicolas
#!/usr/bin/env python
2
#-*-coding:utf-8-*-
3
4
__version__ = "0.1"
5
__license__ = "GPL"
6
__author__ = "Marc NICOLAS"
7
__credit__ = "Marc NICOLAS"
8
__maintainer__ = "Marc NICOLAS"
9
__email__ = "marc.nicolas@ias.u-psud.fr"
10
11
12
def defCst(app):
13
14
    dico_cst = {}
15
16
    dico_cst["time_format"] = "%Y-%m-%d %H:%M:%S"
17
    dico_cst["time_format_for_by_month"] = "%Y-%m-%d"
18
19
    dico_cst["pattern_Fits"] = ".fits"
20
    dico_cst["pattern_Tar"] = ".tar"
21
    dico_cst["pattern_download"] = [".fits", ".tar"]
22
    dico_cst["pattern_http_method"] = "GET"
23
    dico_cst["pattern_code_retour"] = "200"
24
    dico_cst["patternBot"] = "bot.html"
25
    dico_cst["patternYahoo"] = "http://help.yahoo.com"
26
27
    dico_cst["CutFits"] = "Cut"
28
29
    dico_cst["dico_max_per_cent"] = {"is_access_access_by_country": 0.01, "is_down_stat_by_project": 0.01,
30
                                     "is_down_stat_by_country": 0.01, "is_down_stat_by_ip": 0.01,
31
                                     "is_access_access_by_ip": 0.01, "is_access_access_by_country": 0.01}
32
33
    if app == "SZCLUSTER":
34
        dico_cst["listPathLogs"] = {"/home/sitools2/log/logSZ/"}
35
        dico_cst["patternAccessToSeek"] = "/sitools/client-user/SZCLUSTER_DATABASE/project-index.html"
36
        dico_cst["patternVoConeSearchToSeek"] = "/global_dataset/plugin/conesearch"
37
        dico_cst["patternVoSiaToSeek"] = ""
38
        dico_cst["listIpToExclude"] = ["129.175.64.124", "129.175.65.119", "129.175.64.65", "129.175.67.137",
39
                                       "129.175.64.230", "172.18.60.17", "129.175.65.131", "129.175.65.82",
40
                                       "129.175.66.42", "127.0.0.1", "129.175.66.43", "129.175.66.248"]
41
        dico_cst["dicoProject"] ={}
42
    elif app == "HESIOD":
43
         dico_cst["listPathLogs"] = {"/home/sitools2/log/logH/", "/home/sitools2/log/logH_0.9.1/", "/home/sitools2/log/logH_1.0/"}
44
        dico_cst["patternAccessToSeek"] = "/sitools/client-user/"
45
        dico_cst["patternVoConeSearchToSeek"] = ""
46
        dico_cst["patternVoSiaToSeek"] = ""
47
        dico_cst["listIpToExclude"] = ["129.175.64.124", "129.175.65.119", "129.175.64.65", "129.175.67.137",
48
                                       "129.175.64.230", "172.18.60.17", "129.175.65.131", "129.175.65.82",
49
                                       "129.175.66.42", "127.0.0.1", "129.175.66.43", "129.175.66.248"]
50
        dico_cst["dicoProject"] = {"sag-4": "SAG-4", "herschel":"Herschel", "cluster-low-z":"Cluster-Low-Z", "sag-3": "SAG-3", "ddt_mustdo_4":"DDT_MustDo_4", "lens_malhotra":"Lens_Malhotra","ot1_atielens":"OT1_atielens", "ot2_ehabart":"OT2_ehabart", "ot1_lho":"OT1_lho", "ot1_mmiville":"OT1_mmiville", "sag-1":"SAG-1", "h-atlas":"H-ATLAS", "ot2_hdole":"Planck-High-z", "ot1_lmontier":"Planck-High-z", "ddt_mustdo_5":"Planck-High-z", "planck%20high-z":"Planck-High-z", "herschel%20private" : "Herschel-Private", "herschel-private" : "Herschel-Private" , "others":"Others"}
51
    return dico_cst