Changeset 7869


Ignore:
Timestamp:
Aug 1, 2018, 1:49:46 PM (13 months ago)
Author:
mabarracus
Message:

New render method with templates
Fix bug show graphs on last of month
Improved whitelist config visualization
Styled aperance with menu
Initial page is displayed by default

Location:
lliurex-analytics-server/trunk/fuentes
Files:
977 added
16 edited

Legend:

Unmodified
Added
Removed
  • lliurex-analytics-server/trunk/fuentes/debian/changelog

    r7820 r7869  
     1lliurex-analytics-server (0.5) xenial; urgency=medium
     2
     3  * New render method with templates
     4  * Fix bug show graphs on last of month
     5  * Improved whitelist config visualization
     6  * Styled aperance with menu
     7  * Initial page is displayed by default
     8
     9 -- M.Angel Juan <m.angel.juan@gmail.com>  Wed, 01 Aug 2018 13:38:55 +0200
     10
    111lliurex-analytics-server (0.4) xenial; urgency=medium
    212
  • lliurex-analytics-server/trunk/fuentes/lliurex-analytics-server/usr/lib/analytics-server/analytics/composer.json

    r350 r7869  
    11{
    22    "require": {
    3         "klein/klein": "^2.1"
     3        "klein/klein": "^2.1",
     4        "twig/twig": "~1.0"
    45    }
    56}
  • lliurex-analytics-server/trunk/fuentes/lliurex-analytics-server/usr/lib/analytics-server/analytics/composer.lock

    r350 r7869  
    55        "This file is @generated automatically"
    66    ],
    7     "hash": "d125c75242b7a7b63bed18f217040902",
     7    "hash": "4c81c589935a039d8218c8a84661f6d0",
    88    "packages": [
    99        {
     
    1212            "source": {
    1313                "type": "git",
    14                 "url": "https://github.com/chriso/klein.php.git",
     14                "url": "https://github.com/klein/klein.php.git",
    1515                "reference": "5dc073f05adb67ee09680545b4cc7b0590d2559e"
    1616            },
    1717            "dist": {
    1818                "type": "zip",
    19                 "url": "https://api.github.com/repos/chriso/klein.php/zipball/5dc073f05adb67ee09680545b4cc7b0590d2559e",
     19                "url": "https://api.github.com/repos/klein/klein.php/zipball/5dc073f05adb67ee09680545b4cc7b0590d2559e",
    2020                "reference": "5dc073f05adb67ee09680545b4cc7b0590d2559e",
    2121                "shasum": ""
     
    6262            ],
    6363            "time": "2014-11-07 07:35:23"
     64        },
     65        {
     66            "name": "symfony/polyfill-ctype",
     67            "version": "v1.8.0",
     68            "source": {
     69                "type": "git",
     70                "url": "https://github.com/symfony/polyfill-ctype.git",
     71                "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae"
     72            },
     73            "dist": {
     74                "type": "zip",
     75                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7cc359f1b7b80fc25ed7796be7d96adc9b354bae",
     76                "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae",
     77                "shasum": ""
     78            },
     79            "require": {
     80                "php": ">=5.3.3"
     81            },
     82            "type": "library",
     83            "extra": {
     84                "branch-alias": {
     85                    "dev-master": "1.8-dev"
     86                }
     87            },
     88            "autoload": {
     89                "psr-4": {
     90                    "Symfony\\Polyfill\\Ctype\\": ""
     91                },
     92                "files": [
     93                    "bootstrap.php"
     94                ]
     95            },
     96            "notification-url": "https://packagist.org/downloads/",
     97            "license": [
     98                "MIT"
     99            ],
     100            "authors": [
     101                {
     102                    "name": "Symfony Community",
     103                    "homepage": "https://symfony.com/contributors"
     104                },
     105                {
     106                    "name": "Gert de Pagter",
     107                    "email": "BackEndTea@gmail.com"
     108                }
     109            ],
     110            "description": "Symfony polyfill for ctype functions",
     111            "homepage": "https://symfony.com",
     112            "keywords": [
     113                "compatibility",
     114                "ctype",
     115                "polyfill",
     116                "portable"
     117            ],
     118            "time": "2018-04-30 19:57:29"
     119        },
     120        {
     121            "name": "twig/twig",
     122            "version": "v1.35.4",
     123            "source": {
     124                "type": "git",
     125                "url": "https://github.com/twigphp/Twig.git",
     126                "reference": "7e081e98378a1e78c29cc9eba4aefa5d78a05d2a"
     127            },
     128            "dist": {
     129                "type": "zip",
     130                "url": "https://api.github.com/repos/twigphp/Twig/zipball/7e081e98378a1e78c29cc9eba4aefa5d78a05d2a",
     131                "reference": "7e081e98378a1e78c29cc9eba4aefa5d78a05d2a",
     132                "shasum": ""
     133            },
     134            "require": {
     135                "php": ">=5.3.3",
     136                "symfony/polyfill-ctype": "^1.8"
     137            },
     138            "require-dev": {
     139                "psr/container": "^1.0",
     140                "symfony/debug": "^2.7",
     141                "symfony/phpunit-bridge": "^3.3"
     142            },
     143            "type": "library",
     144            "extra": {
     145                "branch-alias": {
     146                    "dev-master": "1.35-dev"
     147                }
     148            },
     149            "autoload": {
     150                "psr-0": {
     151                    "Twig_": "lib/"
     152                },
     153                "psr-4": {
     154                    "Twig\\": "src/"
     155                }
     156            },
     157            "notification-url": "https://packagist.org/downloads/",
     158            "license": [
     159                "BSD-3-Clause"
     160            ],
     161            "authors": [
     162                {
     163                    "name": "Fabien Potencier",
     164                    "email": "fabien@symfony.com",
     165                    "homepage": "http://fabien.potencier.org",
     166                    "role": "Lead Developer"
     167                },
     168                {
     169                    "name": "Armin Ronacher",
     170                    "email": "armin.ronacher@active-4.com",
     171                    "role": "Project Founder"
     172                },
     173                {
     174                    "name": "Twig Team",
     175                    "homepage": "https://twig.symfony.com/contributors",
     176                    "role": "Contributors"
     177                }
     178            ],
     179            "description": "Twig, the flexible, fast, and secure template language for PHP",
     180            "homepage": "https://twig.symfony.com",
     181            "keywords": [
     182                "templating"
     183            ],
     184            "time": "2018-07-13 07:12:17"
    64185        }
    65186    ],
  • lliurex-analytics-server/trunk/fuentes/lliurex-analytics-server/usr/lib/analytics-server/analytics/db.php

    r7820 r7869  
    8383        }
    8484    }
     85    function invalidate($key){
     86        global $USE_CACHE;
     87        if (! $USE_CACHE){
     88            return false;
     89        }
     90        if (! $this->process()){
     91            return false;
     92        }
     93        try{
     94            $data=$this->data;
     95            if ($data == null or ! is_array($data) or ! array_key_exists($key,$data))
     96                return false;
     97            if (array_key_exists($key,$this->data)){
     98                unset($this->data[$key]);
     99                return $this->newFile($this->data);
     100            }else{
     101                return false;
     102            }
     103        }catch(Exception $e){
     104            return false;
     105        }
     106    }
    85107    function store($obj,$key){
    86108        if (! $this->process()){
     
    125147         $this->dates=array();
    126148         $this->dates['today']=date("Y-m-d");
    127          $this->dates['first_current']=date("Y-m-").'01';
     149         $this->dates['first_current']=date("Y-m-01");
    128150         $this->dates['last_old']=date("Y-m-d",strtotime($this->dates['first_current']." -1 days"));
    129          $this->dates['first_old']=date("Y-m-",strtotime($this->dates['today']. "-1 months")).'01';
     151         $this->dates['first_old']=date("Y-m-01",strtotime($this->dates['last_old']));
    130152         $this->dates['last_very_old']=date("Y-m-d",strtotime($this->dates['first_old']." -1 days"));
    131          $this->dates['first_very_old']=date("Y-m-",strtotime($this->dates['first_old']." -1 days")).'01';
     153         $this->dates['first_very_old']=date("Y-m-01",strtotime($this->dates['last_very_old']));
    132154         $this->dates['date_current']="(date between '".$this->dates['first_current']."' and '".$this->dates['today']."')";
    133155         $this->dates['date_old']="(date between '".$this->dates['first_old']."' and '".$this->dates['last_old']."')";
     
    10201042         }
    10211043     }
     1044     function purge_whitelist($data){
     1045        $purged = array();
     1046        if (count($data) == 0){
     1047            return $purged;
     1048        }
     1049        $mode = NULL;
     1050        if (array_key_exists('string',$data[0])){
     1051            $mode = 'string';
     1052
     1053        }
     1054        if (array_key_exists('name',$data[0])){
     1055            $mode = 'name';
     1056        }
     1057        if ($mode == NULL){
     1058            return $purged;
     1059        }
     1060        foreach ($data as $item){
     1061            $i = strtolower($item[$mode]);
     1062            if (preg_match('/^[a-z0-9][a-z0-9_.+\-]+$/',$i)){
     1063                if (preg_match('/[.](png|zip|jpg|php|txt|desktop|sql|sb2|ts|bz2|docbook|mo|iso|json|swf|xcf|md|egg-info|skm|js|html|bmp|svg|install|zero|dll|so|app|exe|gif|doc|cpp|h|css|java|xsl|xml|ui|ko|notebook|ogg|mp3|mp4|avi|mpg|c|pdf|o|ps|a|gz|bz|ini)$/',$i)){
     1064                    $i = NULL;
     1065                }else{
     1066                    if (preg_match('/^(smart_|xvf|drivelist|geany_run)/',$i)){
     1067                        $i = NULL;
     1068                    }
     1069                }
     1070            }else{
     1071                $i = NULL;
     1072            }
     1073            if ($i != NULL){
     1074                if ($mode == 'string'){
     1075                    $purged[]=array($mode=>$i);
     1076                }else{
     1077                    $purged[]=array($mode=>$i,'status'=>$item['status']);
     1078                }
     1079            }
     1080        }
     1081        return $purged;
     1082     }
    10221083    function get_whitelist_form(){
     1084        $cache = new Cache();
     1085        $cache_key = 'whitelist';
     1086        $data = $cache->get($cache_key);
     1087        if ($data != false){
     1088            return $data;
     1089        }
    10231090        $sql = "select distinct `string` from `RecvPackages` order by `string` asc";
    10241091        $sql2 = "select `name`,`status` from `PackagesWhitelist`";
     
    10291096                $all_items[]=$row;
    10301097            }
     1098            if (count($all_items) > 10000){
     1099                $all_items = $this->purge_whitelist($all_items);
     1100            }
    10311101        }
    10321102        $whitelist=array();
     
    10351105            while($row=$result->fetch_array(MYSQLI_ASSOC)){
    10361106                $whitelist[] = $row;
     1107            }
     1108            if (count($whitelist) > 10000){
     1109                $whitelist = $this->purge_whitelist($whitelist);
    10371110            }
    10381111        }
     
    10561129            }
    10571130        }
     1131        $cache->store($classify,$cache_key);
    10581132        return $classify;
    10591133    }
  • lliurex-analytics-server/trunk/fuentes/lliurex-analytics-server/usr/lib/analytics-server/analytics/functions.php

    r7820 r7869  
    8181        }
    8282        $db->disconnect();
     83        $cache = new Cache();
     84        $cache->invalidate('whitelist');
    8385        return 'OK';
    8486    };
     
    118120
    119121function call_get_stats(){
    120         return function($request,$reponse,$service){
     122        return function($request,$response,$service){
    121123                $param = process_window_params($request);
    122124                $db = new DB;
     
    128130
    129131function call_get_lliurex_stats(){
    130         return function($request,$reponse,$service){
     132        return function($request,$response,$service){
    131133                $param = process_window_params($request);
    132134                $db = new DB;
     
    147149
    148150function call_get_extended_stats(){
    149         return function($request,$reponse,$service){
     151        return function($request,$response,$service){
    150152                $app=$request->param('app');
    151153                $db = new DB;
     
    157159
    158160function call_getlist(){
    159         return function($request,$reponse,$service){
     161        return function($request,$response,$service){
    160162                $list = array();
    161163                $the_file = 'blacklist.txt';
     
    175177        };
    176178}
    177 
    178 
     179require_once 'pages.php';
    179180
    180181function call_show_stats(){
    181 
    182 return function($request,$reponse,$service){
     182    return pages('show_stats');
     183}
     184function call_show_lliurex_stats(){
     185    return pages('show_lliurex_stats');
     186}
     187function call_show_system_stats(){
     188    return pages('show_system_stats');
     189}
     190function call_show_extended_stats(){
     191    return pages('show_extended_stats');
     192}
     193function call_configure_whitelist(){
     194    return pages('show_whitelist');
     195}
     196/*
     197function call_show_stats(){
     198
     199return function($request,$response,$service){
    183200
    184201echo '<html>
     
    268285}
    269286
     287
    270288function call_show_lliurex_stats(){
    271289
    272 return function($request,$reponse,$service){
     290return function($request,$response,$service){
    273291
    274292echo '<html>
     
    358376function call_show_system_stats(){
    359377
    360 return function($request,$reponse,$service){
     378return function($request,$response,$service){
    361379
    362380echo '<html>
     
    385403
    386404}
     405
     406
    387407function call_show_extended_stats(){
    388408
    389 return function($request,$reponse,$service){
     409return function($request,$response,$service){
    390410
    391411echo '<html>
     
    420440function call_configure_whitelist(){
    421441
    422 return function($request,$reponse,$service){
     442return function($request,$response,$service){
    423443
    424444echo "<html>
     
    471491
    472492}
    473 
     493*/
    474494
    475495?>
  • lliurex-analytics-server/trunk/fuentes/lliurex-analytics-server/usr/lib/analytics-server/analytics/graph.css

    r7577 r7869  
    11html{
    22    overflow-y:scroll;
     3    height: 100%;
    34}
     5body{
     6    height: 100%;
     7    margin: 0px;
     8}
     9
    410#loading{
    5     width: 95%;
    6     height: 90%;
    7     margin: auto;
     11    position: absolute;
     12    top: 0px;
     13    right:0px;
     14    width: 100%;
     15    height: 100%;
    816    background:url(load.png) center center no-repeat;
     17    z-index: -1;
    918}
    1019#stats_box{
     
    1928}
    2029#query_box{
    21     padding-top:10px;
     30    padding-top:20px;
    2231}
    2332#query_box>span{
     33    margin-left: -150px;
     34    margin-right: 20px;
     35}
     36#query_box>span ~ span {
    2437    margin-left: 20px;
    25     margin-right: 20px;
    2638}
    2739#query_box>button{
     
    2941}
    3042span.title{
    31     position: absolute;
    32     right:45%;
    33     top:10px;
    34     font-size: 4ex;
    35 }
    36 span.title>a,span.title>a:visited{
    37     margin-left:12px;
    38     font-size: medium;
    39     color: black;
    40     text-decoration: none;
    41 }
    42 span.title>a:hover{
    43     margin-left:12px;
    44     color: red;
     43    display: block;
     44    margin-bottom: 20px;
     45    font-size: 2.5ex;
    4546    text-decoration: underline;
    4647}
     
    5051    border-bottom: 1px solid black;
    5152}
     53#accordion{
     54    margin-left: 200px;
     55    padding-top: 10px;
     56    padding-right: 10px;
     57}
     58#navigation{
     59    float:left;
     60    margin-top: 70px;
     61    width: 150px;
     62    list-style: none;
     63    z-index: 2;
     64}
     65#navigation>li{
     66    margin-top: 5px;
     67}
     68#navigation>li>a{
     69    text-decoration: none;
     70    font-size: 2ex;
     71}
     72.ui-state-active .ui-icon,.ui-state-default ui-icon{
     73    background-image: url("ui/images/ui-icons_777777_256x240.png") !important;
     74}
     75.ui-accordion-header{
     76    background-color: lightblue;
     77}
     78.ui-widget-content,.ui-state-active{
     79    border-color: darkcyan;
     80}
     81#query_box>span>select,#query_box>button {
     82   width: 100px;
     83}
     84#query_box>span,#query_box{
     85   font-size: 1.8ex;
     86}
     87#query_box>span,#query_box,.ui-state-default,#stats_box,#navigation>li>a,#navigation>li>a:visited,span.title{
     88    color: darkslategrey;
     89}
     90body,.ui-widget-content{
     91    background-color:aliceblue;
     92}
     93#navigation>li>a,#header,span.title,#stats_box,#query_box>span,#query_box{
     94    font-family:sans-serif;
     95}
     96#chart_div{
     97    margin-left: 200px;
     98}
  • lliurex-analytics-server/trunk/fuentes/lliurex-analytics-server/usr/lib/analytics-server/analytics/graph.js

    r7820 r7869  
    2020                 },
    2121                chartArea:{left:'10%',right:'5%',top:'50',width:'100%',height:'100%'},
     22                backgroundColor: 'transparent',
    2223                };
    2324
     
    106107                    lineWidth: 5,
    107108                    tooltip: { textStyle: { fontSize: 10 } },
     109                    backgroundColor: 'transparent',
    108110                    };
    109111    return {data:data_table,options:options}
     
    158160                    lineWidth: 5,
    159161                    tooltip: { textStyle: { fontSize: 10 } },
     162                    backgroundColor: 'transparent',
    160163                    };
    161164    return {data:data_table,options:options}
     
    209212                    lineWidth: 5,
    210213                    tooltip: { textStyle: { fontSize: 10 } },
     214                    backgroundColor: 'transparent',
    211215                    };
    212216    return {data:data_table,options:options}
     
    266270                    lineWidth: 5,
    267271                    tooltip: { textStyle: { fontSize: 10 } },
     272                    backgroundColor: 'transparent',
    268273                    };
    269274    return {data:data_table,options:options}
     
    337342                    lineWidth: 5,
    338343                    tooltip: { textStyle: { fontSize: 9 } },
     344                    backgroundColor: 'transparent',
    339345                    };
    340346    return {data:data_table,options:options}
     
    397403                    lineWidth: 5,
    398404                    tooltip: { textStyle: { fontSize: 10 } },
     405                    backgroundColor: 'transparent',
    399406                    };
    400407    return {data:data_table,options:options}
     
    450457                    lineWidth: 5,
    451458                    tooltip: { textStyle: { fontSize: 10 } },
     459                    backgroundColor: 'transparent',
    452460                    };
    453461    return {data:data_table,options:options}
     
    527535                    lineWidth: 5,
    528536                    tooltip: { textStyle: { fontSize: 9 } },
     537                    backgroundColor: 'transparent',
    529538                    };
    530539    return {data:data_table,options:options}
     
    576585                    lineWidth: 5,
    577586                    tooltip: { textStyle: { fontSize: 10 } },
     587                    backgroundColor: 'transparent',
    578588                    };
    579589    return {data:data_table,options:options}
     
    627637                    lineWidth: 5,
    628638                    tooltip: { textStyle: { fontSize: 10 } },
     639                    backgroundColor: 'transparent',
    629640                    };
    630641    return {data:data_table,options:options}
     
    689700                    lineWidth: 5,
    690701                    tooltip: { textStyle: { fontSize: 10 } },
     702                    backgroundColor: 'transparent',
    691703                    };
    692704    return {data:data_table,options:options}
     
    742754                    lineWidth: 5,
    743755                    tooltip: { textStyle: { fontSize: 10 } },
     756                    backgroundColor: 'transparent',
    744757                    };
    745758    return {data:data_table,options:options}
     
    819832                    lineWidth: 5,
    820833                    tooltip: { textStyle: { fontSize: 9 } },
     834                    backgroundColor: 'transparent',
    821835                    };
    822836    return {data:data_table,options:options}
     
    848862                    lineWidth: 5,
    849863                    tooltip: { textStyle: { fontSize: 10 } },
     864                    backgroundColor: 'transparent',
    850865                    };
    851866    return {data:data_table,options:options}
  • lliurex-analytics-server/trunk/fuentes/lliurex-analytics-server/usr/lib/analytics-server/analytics/graph_min.js

    r7820 r7869  
    1 function drawChart(g,f,b,d){var c=.95*$("#"+b).parent().width();f={title:f,width:c,height:20*d,fontSize:10,legend:"none",hAxis:{viewWindow:{min:0}},chartArea:{left:"10%",right:"5%",top:"50",width:"100%",height:"100%"}};g=new google.visualization.DataView(g);g.setColumns([0,1,{calc:"stringify",sourceColumn:1,type:"string",role:"annotation"}]);b=new google.visualization.BarChart(document.getElementById(b));google.visualization.events.addListener(b,"ready",ready_charts);b.draw(g,f)}
    2 function get_sizes(g){g=.95*$("#"+g).parent().width();$(window).height();return{width:g,height:"auto"}}
     1function drawChart(g,f,b,d){var c=.95*$("#"+b).parent().width();f={title:f,width:c,height:20*d,fontSize:10,legend:"none",hAxis:{viewWindow:{min:0}},chartArea:{left:"10%",right:"5%",top:"50",width:"100%",height:"100%"},backgroundColor:"transparent"};g=new google.visualization.DataView(g);g.setColumns([0,1,{calc:"stringify",sourceColumn:1,type:"string",role:"annotation"}]);b=new google.visualization.BarChart(document.getElementById(b));google.visualization.events.addListener(b,"ready",ready_charts);
     2b.draw(g,f)}function get_sizes(g){g=.95*$("#"+g).parent().width();$(window).height();return{width:g,height:"auto"}}
    33function build_data_per_month_releases(g,f){var b=[];for(i=0;12>i;i++)if(b[i]={15:0,16:0,all:0},g[i]){for(rel in g[i]){if("15"==rel)for(fla in g[i][rel])b[i][rel]+=g[i][rel][fla];if("16"==rel)for(fla in g[i][rel])b[i][rel]+=g[i][rel][fla]}b[i].all=b[i]["15"]+b[i]["16"]}var d=[],c=new Date,e=new google.visualization.DataTable;e.addColumn({type:"date",role:"domain"},"Release");e.addColumn("number","Total Release 15");e.addColumn({type:"string",role:"style"},"Style Release 15");e.addColumn("number",
    44"Total Release 16");e.addColumn({type:"string",role:"style"},"Style Release 16");e.addColumn("number","Total ALL Releases");e.addColumn({type:"string",role:"style"},"Style ALL Releases");date_values=[];for(i=1;12>=i;i++)month=c.getMonth(),year=c.getFullYear(),date_to_add=new Date(year,month),d.push(date_to_add),date_values.push([date_to_add,b[i-1]["15"],"color:blue",b[i-1]["16"],"color:red",b[i-1].all,"color:grey"]),c.setMonth(month-1);e.addRows(date_values);return{data:e,options:{title:f,curveType:"function",
    5 isStacked:!1,hAxis:{title:"Months",ticks:d,format:"MMM"},vAxis:{title:"Num instances",viewWindow:{min:0},format:"#"},legend:{textStyle:{fontSize:10}},chartArea:{left:"5%",right:"10%"},focusTarget:"category",colors:["blue","red","grey"],lineWidth:5,tooltip:{textStyle:{fontSize:10}}}}}
     5isStacked:!1,hAxis:{title:"Months",ticks:d,format:"MMM"},vAxis:{title:"Num instances",viewWindow:{min:0},format:"#"},legend:{textStyle:{fontSize:10}},chartArea:{left:"5%",right:"10%"},focusTarget:"category",colors:["blue","red","grey"],lineWidth:5,tooltip:{textStyle:{fontSize:10}},backgroundColor:"transparent"}}}
    66function build_data_per_month_flavours(g,f){var b=[];for(i=0;12>i;i++)if(b[i]={server:0,client:0,desktop:0,other:0,all:0},g[i])for(rel in g[i])for(fla in g[i][rel])b[i][fla]+=g[i][rel][fla],b[i].all+=g[i][rel][fla];var d=[],c=new Date,e=new google.visualization.DataTable;e.addColumn({type:"date",role:"domain"},"Flavour");e.addColumn("number","Total Server");e.addColumn({type:"string",role:"style"},"Style Server");e.addColumn("number","Total Client");e.addColumn({type:"string",role:"style"},"Style Client");
    77e.addColumn("number","Total Desktop");e.addColumn({type:"string",role:"style"},"Style Desktop");e.addColumn("number","Total Other");e.addColumn({type:"string",role:"style"},"Style Other");e.addColumn("number","Total ALL Flavours");e.addColumn({type:"string",role:"style"},"Style Total ALL Flavours");date_values=[];for(i=1;12>=i;i++)month=c.getMonth(),year=c.getFullYear(),date_to_add=new Date(year,month),d.push(date_to_add),date_values.push([date_to_add,b[i-1].server,"color:purple",b[i-1].client,"color:teal",
    8 b[i-1].desktop,"color:gold",b[i-1].other,"color:olive",b[i-1].all,"color:grey"]),c.setMonth(month-1);e.addRows(date_values);return{data:e,options:{title:f,curveType:"function",isStacked:!1,hAxis:{title:"Months",ticks:d,format:"MMM"},vAxis:{title:"Num instances",viewWindow:{min:0},format:"#"},legend:{textStyle:{fontSize:10}},chartArea:{left:"5%",right:"10%"},focusTarget:"category",colors:["purple","teal","gold","olive","grey"],lineWidth:5,tooltip:{textStyle:{fontSize:10}}}}}
     8b[i-1].desktop,"color:gold",b[i-1].other,"color:olive",b[i-1].all,"color:grey"]),c.setMonth(month-1);e.addRows(date_values);return{data:e,options:{title:f,curveType:"function",isStacked:!1,hAxis:{title:"Months",ticks:d,format:"MMM"},vAxis:{title:"Num instances",viewWindow:{min:0},format:"#"},legend:{textStyle:{fontSize:10}},chartArea:{left:"5%",right:"10%"},focusTarget:"category",colors:["purple","teal","gold","olive","grey"],lineWidth:5,tooltip:{textStyle:{fontSize:10}},backgroundColor:"transparent"}}}
    99function build_data_per_month_arch(g,f){for(var b=[],d=0;12>d;d++)if(b[d]={i686:0,x86_64:0,unkn:0},g[d])for(var c in g[d])for(var e in g[d][c])for(var a in g[d][c][e])b[d][a]+=g[d][c][e][a];c=[];e=new Date;a=new google.visualization.DataTable;a.addColumn({type:"date",role:"domain"},"Date");a.addColumn("number","Total x86");a.addColumn({type:"string",role:"style"},"Style x86");a.addColumn("number","Total x86_64");a.addColumn({type:"string",role:"style"},"Style x86_64");a.addColumn("number","Total unknown");
    1010a.addColumn({type:"string",role:"style"},"Style unknown");date_values=[];for(d=1;12>=d;d++)month=e.getMonth(),year=e.getFullYear(),date_to_add=new Date(year,month),c.push(date_to_add),date_values.push([date_to_add,b[d-1].i686,"color:purple",b[d-1].x86_64,"color:gold",b[d-1].unkn,"color:grey"]),e.setMonth(month-1);a.addRows(date_values);return{data:a,options:{title:f,curveType:"function",isStacked:!1,hAxis:{title:"Months",ticks:c,format:"MMM"},vAxis:{title:"Num instances",viewWindow:{min:0},format:"#"},
    11 legend:{textStyle:{fontSize:10}},chartArea:{left:"5%",right:"10%"},focusTarget:"category",colors:["purple","gold","grey"],lineWidth:5,tooltip:{textStyle:{fontSize:10}}}}}
     11legend:{textStyle:{fontSize:10}},chartArea:{left:"5%",right:"10%"},focusTarget:"category",colors:["purple","gold","grey"],lineWidth:5,tooltip:{textStyle:{fontSize:10}},backgroundColor:"transparent"}}}
    1212function build_data_per_month_release_arch(g,f){for(var b=[],d=0;12>d;d++)if(b[d]={"15_i686":0,"15_x86_64":0,"15_unkn":0,"16_i686":0,"16_x86_64":0,"16_unkn":0},g[d])for(var c in g[d])for(var e in g[d][c])for(var a in g[d][c][e])b[d][c+"_"+a]+=g[d][c][e][a];c=[];e=new Date;a=new google.visualization.DataTable;a.addColumn({type:"date",role:"domain"},"Date");a.addColumn("number","Total 15 x86");a.addColumn({type:"string",role:"style"},"Style 15 x86");a.addColumn("number","Total 15 x86_64");a.addColumn({type:"string",
    1313role:"style"},"Style 15 x86_64");a.addColumn("number","Total 15 unknown");a.addColumn({type:"string",role:"style"},"Style 15 unknown");a.addColumn("number","Total 16 x86");a.addColumn({type:"string",role:"style"},"Style 16 x86");a.addColumn("number","Total 16 x86_64");a.addColumn({type:"string",role:"style"},"Style 16 x86_64");a.addColumn("number","Total 16 unkown");a.addColumn({type:"string",role:"style"},"Style 16 unknown");date_values=[];for(d=1;12>=d;d++)month=e.getMonth(),year=e.getFullYear(),
    1414date_to_add=new Date(year,month),c.push(date_to_add),date_values.push([date_to_add,b[d-1]["15_i686"],"color:purple",b[d-1]["15_x86_64"],"color:gold",b[d-1]["15_unkn"],"color:grey",b[d-1]["16_i686"],"color:teal",b[d-1]["16_x86_64"],"color:olive",b[d-1]["16_unkn"],"color:darkgrey"]),e.setMonth(month-1);a.addRows(date_values);return{data:a,options:{title:f,curveType:"function",isStacked:!1,hAxis:{title:"Months",ticks:c,format:"MMM"},vAxis:{title:"Num instances",viewWindow:{min:0},format:"#"},legend:{textStyle:{fontSize:10}},
    15 chartArea:{left:"5%",right:"10%"},focusTarget:"category",colors:["purple","gold","teal","olive"],lineWidth:5,tooltip:{textStyle:{fontSize:10}}}}}
     15chartArea:{left:"5%",right:"10%"},focusTarget:"category",colors:["purple","gold","teal","olive"],lineWidth:5,tooltip:{textStyle:{fontSize:10}},backgroundColor:"transparent"}}}
    1616function build_data_per_month_flavour_arch(g,f){for(var b=[],d=0;12>d;d++)if(b[d]={client_i686:0,client_x86_64:0,client_unkn:0,server_i686:0,server_x86_64:0,server_unkn:0,desktop_i686:0,desktop_x86_64:0,desktop_unkn:0,other_i686:0,other_x86_64:0,other_unkn:0},g[d])for(var c in g[d])for(var e in g[d][c])for(var a in g[d][c][e])b[d][e+"_"+a]+=g[d][c][e][a];c=[];e=new Date;a=new google.visualization.DataTable;a.addColumn({type:"date",role:"domain"},"Date");a.addColumn("number","Total client x86");a.addColumn({type:"string",
    1717role:"style"},"Style client x86");a.addColumn("number","Total client x86_64");a.addColumn({type:"string",role:"style"},"Style client x86_64");a.addColumn("number","Total client unknown");a.addColumn({type:"string",role:"style"},"Style client unknown");a.addColumn("number","Total server x86");a.addColumn({type:"string",role:"style"},"Style server x86");a.addColumn("number","Total server x86_64");a.addColumn({type:"string",role:"style"},"Style server x86_64");a.addColumn("number","Total server unknown");
     
    1919"Total other x86_64");a.addColumn({type:"string",role:"style"},"Style other x86_64");a.addColumn("number","Total other unknown");a.addColumn({type:"string",role:"style"},"Style other unknown");date_values=[];for(d=1;12>=d;d++)month=e.getMonth(),year=e.getFullYear(),date_to_add=new Date(year,month),c.push(date_to_add),date_values.push([date_to_add,b[d-1].client_i686,"color:goldenrod",b[d-1].client_x86_64,"color:gold",b[d-1].client_unkn,"color:lightgrey",b[d-1].server_i686,"color:darkviolet",b[d-1].server_x86_64,
    2020"color:deeppink",b[d-1].server_unkn,"color:grey",b[d-1].desktop_i686,"color:slateblue",b[d-1].desktop_x86_64,"color:skyblue",b[d-1].desktop_unkn,"color:darkgrey",b[d-1].other_i686,"color:plum",b[d-1].other_x86_64,"color:pink",b[d-1].other_unkn,"color:black"]),e.setMonth(month-1);a.addRows(date_values);return{data:a,options:{title:f,curveType:"function",isStacked:!1,hAxis:{title:"Months",ticks:c,format:"MMM"},vAxis:{title:"Num instances",viewWindow:{min:0},format:"#"},legend:{textStyle:{fontSize:10}},
    21 chartArea:{left:"5%",right:"10%"},focusTarget:"category",colors:"goldenrod gold lightgrey darkviolet deeppink grey slateblue skyblue darkgrey plum pink black".split(" "),lineWidth:5,tooltip:{textStyle:{fontSize:9}}}}}
     21chartArea:{left:"5%",right:"10%"},focusTarget:"category",colors:"goldenrod gold lightgrey darkviolet deeppink grey slateblue skyblue darkgrey plum pink black".split(" "),lineWidth:5,tooltip:{textStyle:{fontSize:9}},backgroundColor:"transparent"}}}
    2222function build_data_per_month_releases_mem(g,f){for(var b=[],d=["unkn","2G","4G","8G"],c=0;12>c;c++){b[c]={"15_2G":0,"15_4G":0,"15_8G":0,"15_unkn":0,"16_2G":0,"16_4G":0,"16_8G":0,"16_unkn":0};for(var e in d)if(g[d[e]][c])for(var a in g[d[e]][c])for(var h in g[d[e]][c][a])b[c][a+"_"+d[e]]+=g[d[e]][c][a][h]}d=[];e=new Date;a=new google.visualization.DataTable;a.addColumn({type:"date",role:"domain"},"Date");a.addColumn("number","Total 15 < 2G");a.addColumn({type:"string",role:"style"},"Style 15 < 2G");
    2323a.addColumn("number","Total 15 < 4G");a.addColumn({type:"string",role:"style"},"Style 15 < 4G");a.addColumn("number","Total 15 > 4G");a.addColumn({type:"string",role:"style"},"Style 15 > 4G");a.addColumn("number","Total 15 unknown");a.addColumn({type:"string",role:"style"},"Style 15 unknown");a.addColumn("number","Total 16 < 2G");a.addColumn({type:"string",role:"style"},"Style 16 < 2G");a.addColumn("number","Total 16 < 4G");a.addColumn({type:"string",role:"style"},"Style 16 < 4G");a.addColumn("number",
    2424"Total 16 > 4G");a.addColumn({type:"string",role:"style"},"Style 16 > 4G");a.addColumn("number","Total 16 unknown");a.addColumn({type:"string",role:"style"},"Style 16 unknown");date_values=[];for(c=1;12>=c;c++)month=e.getMonth(),year=e.getFullYear(),date_to_add=new Date(year,month),d.push(date_to_add),date_values.push([date_to_add,b[c-1]["15_2G"],"color:darkgoldenrod",b[c-1]["15_4G"],"color:goldenrod",b[c-1]["15_8G"],"color:gold",b[c-1]["15_unkn"],"color:lightgrey",b[c-1]["16_2G"],"color:darkviolet",
    2525b[c-1]["16_4G"],"color:deeppink",b[c-1]["16_8G"],"color:pink",b[c-1]["16_unkn"],"color:darkgrey"]),e.setMonth(month-1);a.addRows(date_values);return{data:a,options:{title:f,curveType:"function",isStacked:!1,hAxis:{title:"Months",ticks:d,format:"MMM"},vAxis:{title:"Num instances",viewWindow:{min:0},format:"#"},legend:{textStyle:{fontSize:10}},chartArea:{left:"5%",right:"10%"},focusTarget:"category",colors:"darkgoldenrod goldenrod gold lightgrey darkviolet deeppink pink darkgrey".split(" "),lineWidth:5,
    26 tooltip:{textStyle:{fontSize:10}}}}}
     26tooltip:{textStyle:{fontSize:10}},backgroundColor:"transparent"}}}
    2727function build_data_per_month_mem(g,f){for(var b=[],d=["unkn","2G","4G","8G"],c=0;12>c;c++){b[c]={unkn:0,"2G":0,"4G":0,"8G":0};for(var e in d)if(g[d[e]][c])for(var a in g[d[e]][c])for(var h in g[d[e]][c][a])b[c][d[e]]+=g[d[e]][c][a][h]}d=[];e=new Date;a=new google.visualization.DataTable;a.addColumn({type:"date",role:"domain"},"Date");a.addColumn("number","Total < 2G");a.addColumn({type:"string",role:"style"},"Style < 2G");a.addColumn("number","Total < 4G");a.addColumn({type:"string",role:"style"},
    2828"Style < 4G");a.addColumn("number","Total > 4G");a.addColumn({type:"string",role:"style"},"Style > 4G");a.addColumn("number","Total unknown");a.addColumn({type:"string",role:"style"},"Style unknown");date_values=[];for(c=1;12>=c;c++)month=e.getMonth(),year=e.getFullYear(),date_to_add=new Date(year,month),d.push(date_to_add),date_values.push([date_to_add,b[c-1]["2G"],"color:gold",b[c-1]["4G"],"color:red",b[c-1]["8G"],"color:blue",b[c-1].unkn,"color:grey"]),e.setMonth(month-1);a.addRows(date_values);
    29 return{data:a,options:{title:f,curveType:"function",isStacked:!1,hAxis:{title:"Months",ticks:d,format:"MMM"},vAxis:{title:"Num instances",viewWindow:{min:0},format:"#"},legend:{textStyle:{fontSize:10}},chartArea:{left:"5%",right:"10%"},focusTarget:"category",colors:["gold","red","blue","grey"],lineWidth:5,tooltip:{textStyle:{fontSize:10}}}}}
     29return{data:a,options:{title:f,curveType:"function",isStacked:!1,hAxis:{title:"Months",ticks:d,format:"MMM"},vAxis:{title:"Num instances",viewWindow:{min:0},format:"#"},legend:{textStyle:{fontSize:10}},chartArea:{left:"5%",right:"10%"},focusTarget:"category",colors:["gold","red","blue","grey"],lineWidth:5,tooltip:{textStyle:{fontSize:10}},backgroundColor:"transparent"}}}
    3030function build_data_per_month_flavours_mem(g,f){for(var b=[],d=["unkn","2G","4G","8G"],c=0;12>c;c++){b[c]={client_2G:0,client_4G:0,client_8G:0,client_unkn:0,server_2G:0,server_4G:0,server_8G:0,server_unkn:0,desktop_2G:0,desktop_4G:0,desktop_8G:0,desktop_unkn:0,other_2G:0,other_4G:0,other_8G:0,other_unkn:0};for(var e in d)if(g[d[e]][c])for(var a in g[d[e]][c])for(var h in g[d[e]][c][a])b[c][h+"_"+d[e]]+=g[d[e]][c][a][h]}d=[];e=new Date;a=new google.visualization.DataTable;a.addColumn({type:"date",
    3131role:"domain"},"Date");a.addColumn("number","Total client < 2G");a.addColumn({type:"string",role:"style"},"Style client < 2G");a.addColumn("number","Total client < 4G");a.addColumn({type:"string",role:"style"},"Style client < 4G");a.addColumn("number","Total client > 4G");a.addColumn({type:"string",role:"style"},"Style client > 4G");a.addColumn("number","Total client > unknown");a.addColumn({type:"string",role:"style"},"Style client unknown");a.addColumn("number","Total server < 2G");a.addColumn({type:"string",
     
    3434"Total other > 4G");a.addColumn({type:"string",role:"style"},"Style other > 4G");a.addColumn("number","Total other unknown");a.addColumn({type:"string",role:"style"},"Style other unknown");date_values=[];for(c=1;12>=c;c++)month=e.getMonth(),year=e.getFullYear(),date_to_add=new Date(year,month),d.push(date_to_add),date_values.push([date_to_add,b[c-1].client_2G,"color:darkgoldenrod",b[c-1].client_4G,"color:goldenrod",b[c-1].client_8G,"color:gold",b[c-1].client_unkn,"color:lightgrey",b[c-1].server_2G,
    3535"color:darkviolet",b[c-1].server_4G,"color:deeppink",b[c-1].server_8G,"color:pink",b[c-1].server_unkn,"color:grey",b[c-1].desktop_2G,"color:slateblue",b[c-1].desktop_4G,"color:skyblue",b[c-1].desktop_8G,"color:blue",b[c-1].desktop_unkn,"color:darkgrey",b[c-1].other_2G,"color:teal",b[c-1].other_4G,"color:darkkhaki",b[c-1].other_8G,"color:green",b[c-1].other_unkn,"color:black"]),e.setMonth(month-1);a.addRows(date_values);return{data:a,options:{title:f,curveType:"function",isStacked:!1,hAxis:{title:"Months",
    36 ticks:d,format:"MMM"},vAxis:{title:"Num instances",viewWindow:{min:0},format:"#"},legend:{textStyle:{fontSize:10}},chartArea:{left:"5%",right:"10%"},focusTarget:"category",colors:"darkgoldenrod goldenrod gold lightgrey darkviolet deeppink pink grey slateblue skyblue blue darkgrey teal darkkhaki green black".split(" "),lineWidth:5,tooltip:{textStyle:{fontSize:9}}}}}
     36ticks:d,format:"MMM"},vAxis:{title:"Num instances",viewWindow:{min:0},format:"#"},legend:{textStyle:{fontSize:10}},chartArea:{left:"5%",right:"10%"},focusTarget:"category",colors:"darkgoldenrod goldenrod gold lightgrey darkviolet deeppink pink grey slateblue skyblue blue darkgrey teal darkkhaki green black".split(" "),lineWidth:5,tooltip:{textStyle:{fontSize:9}},backgroundColor:"transparent"}}}
    3737function build_data_per_month_ltsp_usage(g,f){for(var b=[],d=0;36>d;d++){var c=Math.floor(d/3);g[d]&&(b[c]||(b[c]={0:0,1:0,unkn:0}),b[c][g[d][0]]=parseInt(g[d][1]))}c=[];var e=new Date,a=new google.visualization.DataTable;a.addColumn({type:"date",role:"domain"},"Date");a.addColumn("number","Total normal clients");a.addColumn({type:"string",role:"style"},"Total normal clients style");a.addColumn("number","Total ltsp clients");a.addColumn({type:"string",role:"style"},"Total ltsp clients style");a.addColumn("number",
    3838"Total unknown clients");a.addColumn({type:"string",role:"style"},"Total unknown clients style");date_values=[];for(d=1;12>=d;d++)month=e.getMonth(),year=e.getFullYear(),date_to_add=new Date(year,month),c.push(date_to_add),date_values.push([date_to_add,b[d-1][0],"color:purple",b[d-1][1],"color:gold",b[d-1].unkn,"color:grey"]),e.setMonth(month-1);a.addRows(date_values);return{data:a,options:{title:f,curveType:"function",isStacked:!1,hAxis:{title:"Months",ticks:c,format:"MMM"},vAxis:{title:"Num instances",
    39 viewWindow:{min:0},format:"#"},legend:{textStyle:{fontSize:10}},chartArea:{left:"5%",right:"10%"},focusTarget:"category",colors:["purple","gold","grey"],lineWidth:5,tooltip:{textStyle:{fontSize:10}}}}}
     39viewWindow:{min:0},format:"#"},legend:{textStyle:{fontSize:10}},chartArea:{left:"5%",right:"10%"},focusTarget:"category",colors:["purple","gold","grey"],lineWidth:5,tooltip:{textStyle:{fontSize:10}},backgroundColor:"transparent"}}}
    4040function build_data_per_month_ltsp_modes(g,f){for(var b=[],d=0;48>d;d++){var c=Math.floor(d/4);g[d]&&(b[c]||(b[c]={thin:0,semi:0,fat:0,unkn:0}),b[c][g[d][0]]=parseInt(g[d][1]))}c=[];var e=new Date,a=new google.visualization.DataTable;a.addColumn({type:"date",role:"domain"},"Date");a.addColumn("number","Total thin clients");a.addColumn({type:"string",role:"style"},"Total thin clients style");a.addColumn("number","Total semi clients");a.addColumn({type:"string",role:"style"},"Total semi clients style");
    4141a.addColumn("number","Total fat clients");a.addColumn({type:"string",role:"style"},"Total fat clients style");a.addColumn("number","Total unknown clients");a.addColumn({type:"string",role:"style"},"Total unknown clients style");date_values=[];for(d=1;12>=d;d++)month=e.getMonth(),year=e.getFullYear(),date_to_add=new Date(year,month),c.push(date_to_add),date_values.push([date_to_add,b[d-1].thin,"color:purple",b[d-1].semi,"color:gold",b[d-1].fat,"color:olive",b[d-1].unkn,"color:grey"]),e.setMonth(month-
    42 1);a.addRows(date_values);return{data:a,options:{title:f,curveType:"function",isStacked:!1,hAxis:{title:"Months",ticks:c,format:"MMM"},vAxis:{title:"Num instances",viewWindow:{min:0},format:"#"},legend:{textStyle:{fontSize:10}},chartArea:{left:"5%",right:"10%"},focusTarget:"category",colors:["purple","gold","olive","grey"],lineWidth:5,tooltip:{textStyle:{fontSize:10}}}}}
     421);a.addRows(date_values);return{data:a,options:{title:f,curveType:"function",isStacked:!1,hAxis:{title:"Months",ticks:c,format:"MMM"},vAxis:{title:"Num instances",viewWindow:{min:0},format:"#"},legend:{textStyle:{fontSize:10}},chartArea:{left:"5%",right:"10%"},focusTarget:"category",colors:["purple","gold","olive","grey"],lineWidth:5,tooltip:{textStyle:{fontSize:10}},backgroundColor:"transparent"}}}
    4343function build_data_per_month_releases_cpu(g,f){for(var b=[],d=["unkn","mono","dualquad","more"],c=0;12>c;c++){b[c]={"15_mono":0,"15_dualquad":0,"15_more":0,"15_unkn":0,"16_mono":0,"16_dualquad":0,"16_more":0,"16_unkn":0};for(var e in d)if(g[d[e]][c])for(var a in g[d[e]][c])for(var h in g[d[e]][c][a])b[c][a+"_"+d[e]]+=g[d[e]][c][a][h]}d=[];e=new Date;a=new google.visualization.DataTable;a.addColumn({type:"date",role:"domain"},"Date");a.addColumn("number","Total 15 mono processor");a.addColumn({type:"string",
    4444role:"style"},"Style 15 mono processor");a.addColumn("number","Total 15 dual or quad processor");a.addColumn({type:"string",role:"style"},"Style 15 dual or quad processor");a.addColumn("number","Total 15 more than quad processor");a.addColumn({type:"string",role:"style"},"Style 15 more than quad processor");a.addColumn("number","Total 15 unknown");a.addColumn({type:"string",role:"style"},"Style 15 unknown");a.addColumn("number","Total 16 mono processor");a.addColumn({type:"string",role:"style"},"Style 16 mono processor");
    4545a.addColumn("number","Total 16 dual or quad processor");a.addColumn({type:"string",role:"style"},"Style 16 dual or quad processor");a.addColumn("number","Total 16 more than quad processor");a.addColumn({type:"string",role:"style"},"Style 16 more than quad processor");a.addColumn("number","Total 16 unknown");a.addColumn({type:"string",role:"style"},"Style 16 unknown");date_values=[];for(c=1;12>=c;c++)month=e.getMonth(),year=e.getFullYear(),date_to_add=new Date(year,month),d.push(date_to_add),date_values.push([date_to_add,
    4646b[c-1]["15_mono"],"color:darkgoldenrod",b[c-1]["15_dualquad"],"color:goldenrod",b[c-1]["15_more"],"color:gold",b[c-1]["15_unkn"],"color:lightgrey",b[c-1]["16_mono"],"color:darkviolet",b[c-1]["16_dualquad"],"color:deeppink",b[c-1]["16_more"],"color:pink",b[c-1]["16_unkn"],"color:darkgrey"]),e.setMonth(month-1);a.addRows(date_values);return{data:a,options:{title:f,curveType:"function",isStacked:!1,hAxis:{title:"Months",ticks:d,format:"MMM"},vAxis:{title:"Num instances",viewWindow:{min:0},format:"#"},
    47 legend:{textStyle:{fontSize:10}},chartArea:{left:"5%",right:"10%"},focusTarget:"category",colors:"darkgoldenrod goldenrod gold lightgrey darkviolet deeppink pink darkgrey".split(" "),lineWidth:5,tooltip:{textStyle:{fontSize:10}}}}}
     47legend:{textStyle:{fontSize:10}},chartArea:{left:"5%",right:"10%"},focusTarget:"category",colors:"darkgoldenrod goldenrod gold lightgrey darkviolet deeppink pink darkgrey".split(" "),lineWidth:5,tooltip:{textStyle:{fontSize:10}},backgroundColor:"transparent"}}}
    4848function build_data_per_month_cpu(g,f){for(var b=[],d=["unkn","mono","dualquad","more"],c=0;12>c;c++){b[c]={unkn:0,mono:0,dualquad:0,more:0};for(var e in d)if(g[d[e]][c])for(var a in g[d[e]][c])for(var h in g[d[e]][c][a])b[c][d[e]]+=g[d[e]][c][a][h]}d=[];e=new Date;a=new google.visualization.DataTable;a.addColumn({type:"date",role:"domain"},"Date");a.addColumn("number","Total mono processor");a.addColumn({type:"string",role:"style"},"Style mono processor");a.addColumn("number","Total dual or quad processor");
    4949a.addColumn({type:"string",role:"style"},"Style dual or quad processor");a.addColumn("number","Total more than quad processor");a.addColumn({type:"string",role:"style"},"Style more than quad processor");a.addColumn("number","Total unknown");a.addColumn({type:"string",role:"style"},"Style unknown");date_values=[];for(c=1;12>=c;c++)month=e.getMonth(),year=e.getFullYear(),date_to_add=new Date(year,month),d.push(date_to_add),date_values.push([date_to_add,b[c-1].mono,"color:gold",b[c-1].dualquad,"color:red",
    50 b[c-1].more,"color:blue",b[c-1].unkn,"color:grey"]),e.setMonth(month-1);a.addRows(date_values);return{data:a,options:{title:f,curveType:"function",isStacked:!1,hAxis:{title:"Months",ticks:d,format:"MMM"},vAxis:{title:"Num instances",viewWindow:{min:0},format:"#"},legend:{textStyle:{fontSize:10}},chartArea:{left:"5%",right:"10%"},focusTarget:"category",colors:["gold","red","blue","grey"],lineWidth:5,tooltip:{textStyle:{fontSize:10}}}}}
     50b[c-1].more,"color:blue",b[c-1].unkn,"color:grey"]),e.setMonth(month-1);a.addRows(date_values);return{data:a,options:{title:f,curveType:"function",isStacked:!1,hAxis:{title:"Months",ticks:d,format:"MMM"},vAxis:{title:"Num instances",viewWindow:{min:0},format:"#"},legend:{textStyle:{fontSize:10}},chartArea:{left:"5%",right:"10%"},focusTarget:"category",colors:["gold","red","blue","grey"],lineWidth:5,tooltip:{textStyle:{fontSize:10}},backgroundColor:"transparent"}}}
    5151function build_data_per_month_flavours_cpu(g,f){for(var b=[],d=["unkn","mono","dualquad","more"],c=0;12>c;c++){b[c]={client_mono:0,client_dualquad:0,client_more:0,client_unkn:0,server_mono:0,server_dualquad:0,server_more:0,server_unkn:0,desktop_mono:0,desktop_dualquad:0,desktop_more:0,desktop_unkn:0,other_mono:0,other_dualquad:0,other_more:0,other_unkn:0};for(var e in d)if(g[d[e]][c])for(var a in g[d[e]][c])for(var h in g[d[e]][c][a])b[c][h+"_"+d[e]]+=g[d[e]][c][a][h]}d=[];e=new Date;a=new google.visualization.DataTable;
    5252a.addColumn({type:"date",role:"domain"},"Date");a.addColumn("number","Total client mono processor");a.addColumn({type:"string",role:"style"},"Style client mono processor");a.addColumn("number","Total client dual or quad processor");a.addColumn({type:"string",role:"style"},"Style client dual or quad processor");a.addColumn("number","Total client more than quad processor");a.addColumn({type:"string",role:"style"},"Style client more than quad processor");a.addColumn("number","Total client unknown processor");
     
    5656a.addColumn("number","Total other unknown processor");a.addColumn({type:"string",role:"style"},"Style other unknown processor");date_values=[];for(c=1;12>=c;c++)month=e.getMonth(),year=e.getFullYear(),date_to_add=new Date(year,month),d.push(date_to_add),date_values.push([date_to_add,b[c-1].client_mono,"color:darkgoldenrod",b[c-1].client_dualquad,"color:goldenrod",b[c-1].client_more,"color:gold",b[c-1].client_unkn,"color:lightgrey",b[c-1].server_mono,"color:darkviolet",b[c-1].server_dualquad,"color:deeppink",
    5757b[c-1].server_more,"color:pink",b[c-1].server_unkn,"color:grey",b[c-1].desktop_mono,"color:slateblue",b[c-1].desktop_dualquad,"color:skyblue",b[c-1].desktop_more,"color:blue",b[c-1].desktop_unkn,"color:darkgrey",b[c-1].other_mono,"color:teal",b[c-1].other_dualquad,"color:darkkhaki",b[c-1].other_more,"color:green",b[c-1].other_unkn,"color:black"]),e.setMonth(month-1);a.addRows(date_values);return{data:a,options:{title:f,curveType:"function",isStacked:!1,hAxis:{title:"Months",ticks:d,format:"MMM"},
    58 vAxis:{title:"Num instances",viewWindow:{min:0},format:"#"},legend:{textStyle:{fontSize:10}},chartArea:{left:"5%",right:"10%"},focusTarget:"category",colors:"darkgoldenrod goldenrod gold lightgrey darkviolet deeppink pink grey slateblue skyblue blue darkgrey teal darkkhaki green black".split(" "),lineWidth:5,tooltip:{textStyle:{fontSize:9}}}}}
     58vAxis:{title:"Num instances",viewWindow:{min:0},format:"#"},legend:{textStyle:{fontSize:10}},chartArea:{left:"5%",right:"10%"},focusTarget:"category",colors:"darkgoldenrod goldenrod gold lightgrey darkviolet deeppink pink grey slateblue skyblue blue darkgrey teal darkkhaki green black".split(" "),lineWidth:5,tooltip:{textStyle:{fontSize:9}},backgroundColor:"transparent"}}}
    5959function build_data_from_array(g,f){var b=[],d=new Date,c=new google.visualization.DataTable;c.addColumn({type:"date",role:"domain"},"Nhosts");c.addColumn("number",f);date_values=[];for(i=1;12>=i;i++)month=d.getMonth(),year=d.getFullYear(),date_to_add=new Date(year,month),b.push(date_to_add),date_values.push([date_to_add,g[i-1]]),d.setMonth(month-1);c.addRows(date_values);return{data:c,options:{title:f,curveType:"function",isStacked:!1,hAxis:{title:"Months",ticks:b,format:"MMM"},vAxis:{title:"Num hosts",
    60 minValue:0,maxValue:"automatic",viewWindowMode:"pretty",viewWindow:{min:0,max:"auto"},format:"#"},legend:{textStyle:{fontSize:10}},chartArea:{left:"5%",right:"10%"},focusTarget:"category",lineWidth:5,tooltip:{textStyle:{fontSize:10}}}}}
     60minValue:0,maxValue:"automatic",viewWindowMode:"pretty",viewWindow:{min:0,max:"auto"},format:"#"},legend:{textStyle:{fontSize:10}},chartArea:{left:"5%",right:"10%"},focusTarget:"category",lineWidth:5,tooltip:{textStyle:{fontSize:10}},backgroundColor:"transparent"}}}
    6161function doExtendedChart(){end_load_time=get_time();var g=window.location.search.substr(1);""!=g&&(g="?"+g);var f={};start_get_time=get_time();$("#accordion").append('<div id="loading"></div>');start_graph_time=end_get_time=0;$.ajax({datatype:"json",url:"./GetExtendedStats"+g,success:function(b){b=JSON.parse(b);start_graph_time=end_get_time=get_time();var d=null,c={machines_per_month:{},clients_per_month:{},freq_updates_per_month:{},change_releases:{},change_flavours:{},count_ltsp:{},count_mode:{},
    6262architectures:{},mem:{},cpu:{}},e;for(e in b){if("clients"==e)for(var a in c)if(b[e][a])switch(a){case "machines_per_month":f.clients_per_month||(f.clients_per_month={});f.clients_per_month.hosts||(f.clients_per_month.hosts={});f.clients_per_month.title="Machines";f.clients_per_month.hosts.graph=build_data_from_array(b[e][a],"Number of unique machines used");f.clients_per_month.hosts.title="Number of unique machines used";break;case "clients_per_month":f.clients_per_month||(f.clients_per_month={});
  • lliurex-analytics-server/trunk/fuentes/lliurex-analytics-server/usr/lib/analytics-server/analytics/reports.php

    r6876 r7869  
    1111$klein = new \Klein\Klein();
    1212$request = \Klein\Request::createFromGlobals();
    13 
    1413
    1514$klein->respond('GET','/ShowStats',call_show_stats());
  • lliurex-analytics-server/trunk/fuentes/lliurex-analytics-server/usr/lib/analytics-server/analytics/sysstats.js

    r6767 r7869  
    120120function init_system_stats(){
    121121    //$('#header').append($('<button onClick=initialize()>PUSH</button>'));
     122
    122123    initialize();
    123124}
     
    133134var initialized = false;
    134135function initialize(){
     136    //$('body').append("<div id='loading'></div>");
    135137    if (initialized)
    136138        return true;
     
    143145            init_google_data();
    144146            gen_google_data();
     147            $('#loading').remove();
    145148            view_google_graphs();
    146149        })
     
    234237    var margin_left = 75;
    235238    var margin_right = 200;
    236     var properties = { title: '', height: (window.innerHeight - header) / size, legend : true, chartArea: {left:margin_left,width:window.innerWidth-(margin_left+margin_right)}, fontSize: 10 ,hAxis:{textPosition:'none'},vAxis :{ viewWindow : {min:0}}};
     239    var properties = { title: '', height: (window.innerHeight - header) / size, legend : true, backgroundColor: 'transparent', chartArea: {left:margin_left,width:window.innerWidth-(margin_left+margin_right)}, fontSize: 10 ,hAxis:{textPosition:'none'},vAxis :{ viewWindow : {min:0}}};
    237240    for (var parameter in graphs){
    238241        if (parameter in cfg.groups){
  • lliurex-analytics-server/trunk/fuentes/lliurex-analytics-server/usr/lib/analytics-server/analytics/sysstats_min.js

    r6767 r7869  
    33function get_cfg(a,c){for(var b in a)try{a[b].group?(cfg.groups[b]={title:a[b].title,members:{}},cfg.divs[b]={title:a[b].title},get_cfg(a[b].members,b)):(cfg.watched[b]={title:a[b].title},c?cfg.groups[c].members[b]={title:a[b].title}:cfg.divs[b]={title:a[b].title})}catch(d){}}get_cfg(show);
    44function get_data(a){$.getJSON("./SystemStats",function(c){for(var b in c)if(b in cfg.watched||"keepalive"==b){var d=c[b];b in stats?(stats[b].length>max_items-1&&stats[b].splice(0,1),stats[b].push(d)):stats[b]=[d]}a&&a()})}function show_data(a){$("#accordion").empty();var c="",b;for(b in stats){var d=b+" = ";for(var e in stats[b])c+=d+stats[b][e],d=", ";c+="\n"}$("#accordion").append("<pre>"+c+"</pre>");a&&a()}function init_system_stats(){initialize()}
    5 function loop(){for(var a=0;a<arguments.length;a++)f=arguments[a],f(),window.setTimeout(function(){loop(f)},1E3*timeout)}var initialized=!1;function initialize(){if(initialized)return!0;initialized=!0;get_data(make_divs);loop(function(){get_data(function(){init_google_data();gen_google_data();view_google_graphs()})})}function make_divs(a){$(parent).empty();for(var c in cfg.divs)$(parent).append($('<div id="chart_'+c+'"> </div>'));a&&a()}
     5function loop(){for(var a=0;a<arguments.length;a++)f=arguments[a],f(),window.setTimeout(function(){loop(f)},1E3*timeout)}var initialized=!1;function initialize(){if(initialized)return!0;initialized=!0;get_data(make_divs);loop(function(){get_data(function(){init_google_data();gen_google_data();$("#loading").remove();view_google_graphs()})})}function make_divs(a){$(parent).empty();for(var c in cfg.divs)$(parent).append($('<div id="chart_'+c+'"> </div>'));a&&a()}
    66function timestamp_to_string(a){var c=new Date(1E3*a);a=c.getHours();var b=c.getMinutes();c=c.getSeconds();10>a&&(a="0"+a.toString());10>b&&(b="0"+b.toString());10>c&&(c="0"+c.toString());return a+":"+b+":"+c}function get_current_divs(){var a={};$(parent+">div").each(function(){a[this.id.substring(6)]={}});return a}
    77function init_google_data(a){for(var c in get_current_divs())if(graphs[c]=new google.visualization.DataTable,graphs[c].addColumn("string","Time"),c in cfg.watched)graphs[c].addColumn("number",cfg.watched[c].title);else for(var b in cfg.groups[c].members)graphs[c].addColumn("number",cfg.groups[c].members[b].title);a&&a()}
    88function gen_google_data(a){for(var c in get_current_divs())if(c in cfg.groups)graphs[c].addRows(make_google_array(stats.keepalive,cfg.groups[c].members));else{var b={};b[c]={};graphs[c].addRows(make_google_array(stats.keepalive,b))}a&&a()}function make_google_array(a,c){for(var b=[],d=0;d<a.length;d++){var e=[timestamp_to_string(Number(a[d]))],g;for(g in c)e.push(Number(stats[g][d]));b.push(e)}return b}
    9 function view_google_graphs(){var a=0,c;for(c in cfg.divs)a+=1;a={title:"",height:(window.innerHeight-10)/a,legend:!0,chartArea:{left:75,width:window.innerWidth-275},fontSize:10,hAxis:{textPosition:"none"},vAxis:{viewWindow:{min:0}}};for(var b in graphs)b in cfg.groups&&(a.isStacked="absolute"),a.title=cfg.divs[b].title,charts[b]=new google.visualization.AreaChart(document.getElementById("chart_"+b)),charts[b].draw(graphs[b],a)};
     9function view_google_graphs(){var a=0,c;for(c in cfg.divs)a+=1;a={title:"",height:(window.innerHeight-10)/a,legend:!0,backgroundColor:"transparent",chartArea:{left:75,width:window.innerWidth-275},fontSize:10,hAxis:{textPosition:"none"},vAxis:{viewWindow:{min:0}}};for(var b in graphs)b in cfg.groups&&(a.isStacked="absolute"),a.title=cfg.divs[b].title,charts[b]=new google.visualization.AreaChart(document.getElementById("chart_"+b)),charts[b].draw(graphs[b],a)};
  • lliurex-analytics-server/trunk/fuentes/lliurex-analytics-server/usr/lib/analytics-server/analytics/vendor/composer/autoload_namespaces.php

    r350 r7869  
    77
    88return array(
     9    'Twig_' => array($vendorDir . '/twig/twig/lib'),
    910);
  • lliurex-analytics-server/trunk/fuentes/lliurex-analytics-server/usr/lib/analytics-server/analytics/vendor/composer/autoload_psr4.php

    r350 r7869  
    77
    88return array(
     9    'Twig\\' => array($vendorDir . '/twig/twig/src'),
     10    'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
    911    'Klein\\' => array($vendorDir . '/klein/klein/src/Klein'),
    1012);
  • lliurex-analytics-server/trunk/fuentes/lliurex-analytics-server/usr/lib/analytics-server/analytics/vendor/composer/autoload_real.php

    r350 r7869  
    4141        $loader->register(true);
    4242
     43        $includeFiles = require __DIR__ . '/autoload_files.php';
     44        foreach ($includeFiles as $file) {
     45            composerRequire9f3c954298faaf8df3ced9c38f4f8234($file);
     46        }
     47
    4348        return $loader;
    4449    }
  • lliurex-analytics-server/trunk/fuentes/lliurex-analytics-server/usr/lib/analytics-server/analytics/vendor/composer/installed.json

    r350 r7869  
    66        "source": {
    77            "type": "git",
    8             "url": "https://github.com/chriso/klein.php.git",
     8            "url": "https://github.com/klein/klein.php.git",
    99            "reference": "5dc073f05adb67ee09680545b4cc7b0590d2559e"
    1010        },
    1111        "dist": {
    1212            "type": "zip",
    13             "url": "https://api.github.com/repos/chriso/klein.php/zipball/5dc073f05adb67ee09680545b4cc7b0590d2559e",
     13            "url": "https://api.github.com/repos/klein/klein.php/zipball/5dc073f05adb67ee09680545b4cc7b0590d2559e",
    1414            "reference": "5dc073f05adb67ee09680545b4cc7b0590d2559e",
    1515            "shasum": ""
     
    5757            "sinatra"
    5858        ]
     59    },
     60    {
     61        "name": "symfony/polyfill-ctype",
     62        "version": "v1.8.0",
     63        "version_normalized": "1.8.0.0",
     64        "source": {
     65            "type": "git",
     66            "url": "https://github.com/symfony/polyfill-ctype.git",
     67            "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae"
     68        },
     69        "dist": {
     70            "type": "zip",
     71            "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7cc359f1b7b80fc25ed7796be7d96adc9b354bae",
     72            "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae",
     73            "shasum": ""
     74        },
     75        "require": {
     76            "php": ">=5.3.3"
     77        },
     78        "time": "2018-04-30 19:57:29",
     79        "type": "library",
     80        "extra": {
     81            "branch-alias": {
     82                "dev-master": "1.8-dev"
     83            }
     84        },
     85        "installation-source": "dist",
     86        "autoload": {
     87            "psr-4": {
     88                "Symfony\\Polyfill\\Ctype\\": ""
     89            },
     90            "files": [
     91                "bootstrap.php"
     92            ]
     93        },
     94        "notification-url": "https://packagist.org/downloads/",
     95        "license": [
     96            "MIT"
     97        ],
     98        "authors": [
     99            {
     100                "name": "Symfony Community",
     101                "homepage": "https://symfony.com/contributors"
     102            },
     103            {
     104                "name": "Gert de Pagter",
     105                "email": "BackEndTea@gmail.com"
     106            }
     107        ],
     108        "description": "Symfony polyfill for ctype functions",
     109        "homepage": "https://symfony.com",
     110        "keywords": [
     111            "compatibility",
     112            "ctype",
     113            "polyfill",
     114            "portable"
     115        ]
     116    },
     117    {
     118        "name": "twig/twig",
     119        "version": "v1.35.4",
     120        "version_normalized": "1.35.4.0",
     121        "source": {
     122            "type": "git",
     123            "url": "https://github.com/twigphp/Twig.git",
     124            "reference": "7e081e98378a1e78c29cc9eba4aefa5d78a05d2a"
     125        },
     126        "dist": {
     127            "type": "zip",
     128            "url": "https://api.github.com/repos/twigphp/Twig/zipball/7e081e98378a1e78c29cc9eba4aefa5d78a05d2a",
     129            "reference": "7e081e98378a1e78c29cc9eba4aefa5d78a05d2a",
     130            "shasum": ""
     131        },
     132        "require": {
     133            "php": ">=5.3.3",
     134            "symfony/polyfill-ctype": "^1.8"
     135        },
     136        "require-dev": {
     137            "psr/container": "^1.0",
     138            "symfony/debug": "^2.7",
     139            "symfony/phpunit-bridge": "^3.3"
     140        },
     141        "time": "2018-07-13 07:12:17",
     142        "type": "library",
     143        "extra": {
     144            "branch-alias": {
     145                "dev-master": "1.35-dev"
     146            }
     147        },
     148        "installation-source": "dist",
     149        "autoload": {
     150            "psr-0": {
     151                "Twig_": "lib/"
     152            },
     153            "psr-4": {
     154                "Twig\\": "src/"
     155            }
     156        },
     157        "notification-url": "https://packagist.org/downloads/",
     158        "license": [
     159            "BSD-3-Clause"
     160        ],
     161        "authors": [
     162            {
     163                "name": "Fabien Potencier",
     164                "email": "fabien@symfony.com",
     165                "homepage": "http://fabien.potencier.org",
     166                "role": "Lead Developer"
     167            },
     168            {
     169                "name": "Armin Ronacher",
     170                "email": "armin.ronacher@active-4.com",
     171                "role": "Project Founder"
     172            },
     173            {
     174                "name": "Twig Team",
     175                "homepage": "https://twig.symfony.com/contributors",
     176                "role": "Contributors"
     177            }
     178        ],
     179        "description": "Twig, the flexible, fast, and secure template language for PHP",
     180        "homepage": "https://twig.symfony.com",
     181        "keywords": [
     182            "templating"
     183        ]
    59184    }
    60185]
  • lliurex-analytics-server/trunk/fuentes/lliurex-analytics-server/usr/lib/analytics-server/analytics/whitelist.css

    r6889 r7869  
    1 html,body,#nonwhitelist,#unknown_state_whitelist,#inwhitelist,span,#btn_right,#btn_left {
     1#nonwhitelist,#unknown_state_whitelist,#inwhitelist,span,#btn_right,#btn_left {
    22    height: 100%;
    3 }
    4 #loading{
    5     width: 95%;
    6     height: 90%;
    7     margin: auto;
    8     background:url(load.gif) center center no-repeat;
    93}
    104html,body,#header,#configure_whitelist,select,span,#btn_right,#btn_left{
     
    126    padding: 0px;
    137}
    14 #header{
    15     text-align: center;
    16     text-decoration: underline;
    17     height: 4em;
    18 }
    19 #header>span{
    20     font-size: 2em;
    21     line-height: 2em;
    22     display:block;
    23 }
    248#configure_whitelist{
    259    height: 80%;
    2610    padding: 0px 10px;
     11    padding-top: 50px;
    2712    display: flex;
    2813    align-items: flex-end;
    2914}
    30 #header,#configure_whitelist,#nonwhitelist,#unknown_state_whitelist,#inwhitelist,span,#btn_left,#btn_right{
     15/*#header,#configure_whitelist,#nonwhitelist,#unknown_state_whitelist,#inwhitelist,span,#btn_left,#btn_right{
    3116    border: 0px solid red; /* some value */
    3217    margin: -0px; /*minus some value */
    33 }
     18}*/
    3419#nonwhitelist,#unknown_state_whitelist,#inwhitelist{
    3520    margin: 0px;
     
    5035}
    5136button{
     37    color: darkslategrey;
    5238    clear: both;
    5339    width: 6ex;
     
    6248}
    6349#configure_whitelist span{
    64     font-size: 4ex;
    65     line-height: 1em;
     50    font-size: 3ex;
     51    color: darkslategrey;
     52    line-height: 3em;
    6653    font-style: italic;
    6754    text-decoration: underline;
     55    font-family: sans-serif;
    6856}
    6957.filter{
     
    7159    font-size: 3ex;
    7260    font-style: italic;
     61    color: darkslategrey;
    7362    border: 1px;
    7463    display: inline-flex;
     
    7665select{
    7766    margin-top: 10px;
    78     border: 2px dotted black;
     67    border: 2px dotted darkslategrey;
    7968}
    8069select>*{
    81     font-size: 3ex;
     70    color: darkslategrey;
     71    font-size: 2ex;
    8272    margin-left: 10px;
    8373    margin-right: 10px;
     
    8878#send{
    8979    margin-top: 10px;
     80    margin-left: 200px;
    9081    display: flex;
    9182    justify-content:center;
     
    9485    width: 300px;
    9586    height: 3ex;
    96     font-size: 4ex;
     87    font-size: 3ex;
     88    color: darkslategrey;
    9789}
    9890textarea{
Note: See TracChangeset for help on using the changeset viewer.