Skip to content

Compatibility with Dirac WebApp #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ content/
*.kmz
*.zip
*.o
*.pyo
2 changes: 1 addition & 1 deletion dirac_script/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from utils.manager import Manager
from controllers.utilCLController import listSE
from DIRAC import gConfig
from DIRAC.AccountingSystem.Client.ReportsClient import ReportsClient
from DIRAC.AccountingSystem.Client.ReportsClient import ReportsClient
from datetime import date, time, datetime, timedelta
import math

Expand Down
5 changes: 2 additions & 3 deletions dirac_script/storage_sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
from pprint import pprint

from DIRAC.Core.Base import Script
Script.parseCommandLine()
from DIRAC.Core.DISET.RPCClient import RPCClient
from utils.manager import Manager
from controllers.utilCLController import listSE
#from controllers.utilCLController import listSE
from DIRAC import gConfig


Script.parseCommandLine()
service = RPCClient('DistributedDataManagement/StorageElementStatus')

def get_se_sites():
Expand Down
9 changes: 8 additions & 1 deletion src/kml_gen.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#! /usr/bin/env python

import matplotlib.pyplot as plt
#To use matplotlib without graphic enviroment
try:
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
except ImportError:
sys.exit("Error: Matplotlib package not found. Please install running 'pip install matplotlib'.")

from lxml import etree
import json, urllib2, math, pickle
import os
Expand Down
11 changes: 11 additions & 0 deletions web/b2gridmap.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
// Sites map v0.2 -- Michel

var imported = document.createElement('script');
imported.src = 'oms.min.js';
document.head.appendChild(imported);

google.load( 'visualization', '1', { packages:['corechart'] });

function ViewControl(controlDiv, map, name, latLng, zoom) {
Expand Down Expand Up @@ -92,6 +96,11 @@ var pointMap;


function initialize() {
// To show the pie plots
var iDiv = document.createElement('div');
iDiv.id = 'piechart';
iDiv.style= 'width: 50px; height: 50px; display: none;';
document.getElementsByTagName('body')[0].appendChild(iDiv);

var mapCanvas = document.getElementById('map');

Expand Down Expand Up @@ -135,6 +144,8 @@ function initialize() {
bandwidthDiv.innerHTML += '<br /><br /><b>Last updated: <br />'+ global_statistics['Updated'] + '</b>';
map.controls[google.maps.ControlPosition.TOP_LEFT].push(bandwidthDiv);



var ViewDiv = document.createElement('div');
var Asia = new ViewControl(ViewDiv, map, 'Asia', [37.6, 110.6], 4);
var Europe = new ViewControl(ViewDiv, map, 'Europe', [46.0, 14.5], 5);
Expand Down
3 changes: 1 addition & 2 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@

<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script src="oms.min.js"></script>
<script src="datagrid.js"></script>
<script src="b2gridmap.js"></script>
<style>
Expand All @@ -60,7 +59,7 @@
<!-- [END region_toolbar] -->
<div id="map"></div>

<div id='piechart' style="width: 50px; height: 50px; display: none;"></div>



</body>
Expand Down