diff --git a/scripts/univcloud-geo2idp.py b/scripts/univcloud-geo2idp.py index ce3dcf8..fb59e82 100755 --- a/scripts/univcloud-geo2idp.py +++ b/scripts/univcloud-geo2idp.py @@ -49,7 +49,7 @@ for idp in get_idp_list_sorted(): entity_id = idp['entity_id'] name = idp['name'] geo = geo_idps.get(entity_id, {}).get('geo', { 'lat': 47.0 + 2.0*math.sin(n), 'lon': 2.5 + 3.0*math.cos(n) }) - href = '/sso?' + urllib.urlencode([('entity_id', entity_id)]) + href = '/authsaml2/sso?' + urllib.urlencode([('entity_id', entity_id)]) li = u'
  • %s
  • ' % \ (href, geo['lat'], geo['lon'], entity_id, name, name) print li.encode('utf-8') diff --git a/scripts/univcloud-update-map.sh b/scripts/univcloud-update-map.sh index 61e4eca..31d5179 100755 --- a/scripts/univcloud-update-map.sh +++ b/scripts/univcloud-update-map.sh @@ -4,6 +4,7 @@ GEOURLS="https://static.discojuice.org/feeds/renater http://isos.univnautes.entr GEODIR="/var/tmp/univcloud-geo/" VIRTUAL_ENV="/home/thomas/univcloud/venv/" PYTHONPATH="/home/thomas/univcloud/" +LOGINHTML="/home/thomas/univcloud/univcloud/templates/univcloud/idplist.html" if [ -r /etc/univcloud.conf ] then @@ -52,6 +53,6 @@ then fi # create indexhtml -python univcloud-geo2idp.py $GEOFILES +python univcloud-geo2idp.py $GEOFILES > $LOGINHTML exit 0 diff --git a/univcloud/profile/fixtures/initial_data.json b/univcloud/profile/fixtures/initial_data.json new file mode 100644 index 0000000..1cd8b42 --- /dev/null +++ b/univcloud/profile/fixtures/initial_data.json @@ -0,0 +1,25 @@ +[ + { + "model": "saml.idpoptionssppolicy", + "pk": 1, + "fields": { + "enable_http_method_for_defederation_request": false, + "name": "Default", + "http_method_for_defederation_request": 5, + "binding_for_sso_response": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST", + "enabled": true, + "allow_create": true, + "want_authn_request_signed": false, + "enable_http_method_for_slo_request": false, + "requested_name_id_format": "persistent", + "no_nameid_policy": false, + "http_method_for_slo_request": 4, + "want_is_passive_authn_request": false, + "enable_binding_for_sso_response": true, + "want_force_authn_request": false, + "handle_persistent": "AUTHSAML2_UNAUTH_PERSISTENT_CREATE_USER_PSEUDONYMOUS", + "handle_transient": "AUTHSAML2_UNAUTH_TRANSIENT_OPEN_SESSION", + "back_url": "/" + } + } +] diff --git a/univcloud/settings.py b/univcloud/settings.py index 26dc207..aeac299 100644 --- a/univcloud/settings.py +++ b/univcloud/settings.py @@ -144,7 +144,17 @@ LOGGING = { 'level': 'ERROR', 'filters': ['require_debug_false'], 'class': 'django.utils.log.AdminEmailHandler' - } + }, + 'console': { + 'level': 'DEBUG', + 'class': 'logging.StreamHandler', + }, + 'file': { + 'level': 'DEBUG', + 'class': 'logging.FileHandler', + 'filename': '/var/tmp/univcloud.log', + }, + }, 'loggers': { 'django.request': { @@ -152,6 +162,10 @@ LOGGING = { 'level': 'ERROR', 'propagate': True, }, + '': { + 'handlers': ['file'] + (['console'] if DEBUG else []), + 'level': 'INFO', + } } } @@ -160,10 +174,11 @@ LOGIN_REDIRECT_URL = '/' AUTH_PROFILE_MODULE = 'profile.UserProfile' AUTH_FRONTENDS = ('authentic2.authsaml2.frontend.AuthSAML2Frontend',) + AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', - 'authentic2.authsaml2.backends.AuthSAML2PersistentBackend', - 'authentic2.authsaml2.backends.AuthSAML2TransientBackend') + 'authentic2.authsaml2.backends.AuthSAML2PersistentBackend') + SAML_SIGNATURE_PUBLIC_KEY = '''-----BEGIN CERTIFICATE----- MIIDIzCCAgugAwIBAgIJANUBoick1pDpMA0GCSqGSIb3DQEBBQUAMBUxEzARBgNV diff --git a/univcloud/static/css/MarkerCluster.Default.css b/univcloud/static/css/MarkerCluster.Default.css new file mode 100644 index 0000000..90558dd --- /dev/null +++ b/univcloud/static/css/MarkerCluster.Default.css @@ -0,0 +1,38 @@ +.marker-cluster-small { + background-color: rgba(181, 226, 140, 0.6); + } +.marker-cluster-small div { + background-color: rgba(110, 204, 57, 0.6); + } + +.marker-cluster-medium { + background-color: rgba(241, 211, 87, 0.6); + } +.marker-cluster-medium div { + background-color: rgba(240, 194, 12, 0.6); + } + +.marker-cluster-large { + background-color: rgba(253, 156, 115, 0.6); + } +.marker-cluster-large div { + background-color: rgba(241, 128, 23, 0.6); + } + +.marker-cluster { + background-clip: padding-box; + border-radius: 20px; + } +.marker-cluster div { + width: 30px; + height: 30px; + margin-left: 5px; + margin-top: 5px; + + text-align: center; + border-radius: 15px; + font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif; + } +.marker-cluster span { + line-height: 30px; + } \ No newline at end of file diff --git a/univcloud/static/css/MarkerCluster.Default.ie.css b/univcloud/static/css/MarkerCluster.Default.ie.css new file mode 100644 index 0000000..1d0de51 --- /dev/null +++ b/univcloud/static/css/MarkerCluster.Default.ie.css @@ -0,0 +1,22 @@ + /* IE 6-8 fallback colors */ +.marker-cluster-small { + background-color: rgb(181, 226, 140); + } +.marker-cluster-small div { + background-color: rgb(110, 204, 57); + } + +.marker-cluster-medium { + background-color: rgb(241, 211, 87); + } +.marker-cluster-medium div { + background-color: rgb(240, 194, 12); + } + +.marker-cluster-large { + background-color: rgb(253, 156, 115); + } +.marker-cluster-large div { + background-color: rgb(241, 128, 23); +} + diff --git a/univcloud/static/css/MarkerCluster.css b/univcloud/static/css/MarkerCluster.css new file mode 100644 index 0000000..dbfab7d --- /dev/null +++ b/univcloud/static/css/MarkerCluster.css @@ -0,0 +1,6 @@ +.leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow { + -webkit-transition: -webkit-transform 0.2s ease-out, opacity 0.2s ease-in; + -moz-transition: -moz-transform 0.2s ease-out, opacity 0.2s ease-in; + -o-transition: -o-transform 0.2s ease-out, opacity 0.2s ease-in; + transition: transform 0.2s ease-out, opacity 0.2s ease-in; + } diff --git a/univcloud/static/css/style.css b/univcloud/static/css/style.css index a35b75a..a04e054 100644 --- a/univcloud/static/css/style.css +++ b/univcloud/static/css/style.css @@ -30,7 +30,7 @@ div.gridster > ul > li { list-style: none; overflow: hidden; background: white; - border-radius: 1em; + border-radius: 0em; box-shadow: 0 0 5px black; } @@ -147,11 +147,11 @@ iframe { } #login { - background: white; + background: #f5f5f5; width: 50%; padding: 5px 10px 15px 10px; - margin-top: 10%; - border-radius: 10px; + margin-top: 2%; + border-radius: 0px; box-shadow: 0 0 5px black; } @@ -197,3 +197,43 @@ li:hover .close { display: inline-block; width: 6em; } + +#map-and-idplist { + height: 700px; +} + +#idplist { + float: right; + width: 24%; + height: 100%; + background-color: #f5f5f5; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: 0 0 5px black; +} + +#idplist ul { + height: 90%; + overflow-y: scroll; + overflow-x: hidden; + white-space: nowrap; +} + +#idplist ul li { + list-style-type: none; + margin-left: -30px; +} + +input#search { + margin: 10px 10px; + height: 1.5em; + font-size: 1.2em; +} + +#map { + float: left; + width: 74%; + height: 100%; + box-shadow: 0 0 5px black; +} diff --git a/univcloud/static/js/leaflet.markercluster.js b/univcloud/static/js/leaflet.markercluster.js new file mode 100644 index 0000000..efaff3b --- /dev/null +++ b/univcloud/static/js/leaflet.markercluster.js @@ -0,0 +1,6 @@ +/* + Leaflet.markercluster, Provides Beautiful Animated Marker Clustering functionality for Leaflet, a JS library for interactive maps. + https://github.com/Leaflet/Leaflet.markercluster + (c) 2012-2013, Dave Leaver, smartrak +*/ +!function(t,e){L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.on(L.FeatureGroup.EVENTS,this._propagateEvent,this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.on(L.FeatureGroup.EVENTS,this._propagateEvent,this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null},addLayer:function(t){if(t instanceof L.LayerGroup){var e=[];for(var i in t._layers)e.push(t._layers[i]);return this.addLayers(e)}if(!t.getLatLng)return this._nonPointGroup.addLayer(t),this;if(!this._map)return this._needsClustering.push(t),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom);var n=t,s=this._map.getZoom();if(t.__parent)for(;n.__parent._zoom>=s;)n=n.__parent;return this._currentShownBounds.contains(n.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,n):this._animationAddLayerNonAnimated(t,n)),this},removeLayer:function(t){return t.getLatLng?this._map?t.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),this._featureGroup.hasLayer(t)&&(this._featureGroup.removeLayer(t),t.setOpacity&&t.setOpacity(1)),this):this:(!this._arraySplice(this._needsClustering,t)&&this.hasLayer(t)&&this._needsRemoving.push(t),this):(this._nonPointGroup.removeLayer(t),this)},addLayers:function(t){var e,i,n,s=this._map,r=this._featureGroup,o=this._nonPointGroup;for(e=0,i=t.length;i>e;e++)if(n=t[e],n.getLatLng){if(!this.hasLayer(n))if(s){if(this._addLayer(n,this._maxZoom),n.__parent&&2===n.__parent.getChildCount()){var a=n.__parent.getAllChildMarkers(),h=a[0]===n?a[1]:a[0];r.removeLayer(h)}}else this._needsClustering.push(n)}else o.addLayer(n);return s&&(r.eachLayer(function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()}),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)),this},removeLayers:function(t){var e,i,n,s=this._featureGroup,r=this._nonPointGroup;if(!this._map){for(e=0,i=t.length;i>e;e++)n=t[e],this._arraySplice(this._needsClustering,n),r.removeLayer(n);return this}for(e=0,i=t.length;i>e;e++)n=t[e],n.__parent?(this._removeLayer(n,!0,!0),s.hasLayer(n)&&(s.removeLayer(n),n.setOpacity&&n.setOpacity(1))):r.removeLayer(n);return this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),s.eachLayer(function(t){t instanceof L.MarkerCluster&&t._updateIcon()}),this},clearLayers:function(){return this._map||(this._needsClustering=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(t){delete t.__parent}),this._map&&this._generateInitialClusters(),this},getBounds:function(){var t=new L.LatLngBounds;if(this._topClusterLevel)t.extend(this._topClusterLevel._bounds);else for(var e=this._needsClustering.length-1;e>=0;e--)t.extend(this._needsClustering[e].getLatLng());var i=this._nonPointGroup.getBounds();return i.isValid()&&t.extend(i),t},eachLayer:function(t,e){var i,n=this._needsClustering.slice();for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(n),i=n.length-1;i>=0;i--)t.call(e,n[i]);this._nonPointGroup.eachLayer(t,e)},hasLayer:function(t){if(!t)return!1;var e,i=this._needsClustering;for(e=i.length-1;e>=0;e--)if(i[e]===t)return!0;for(i=this._needsRemoving,e=i.length-1;e>=0;e--)if(i[e]===t)return!1;return!(!t.__parent||t.__parent._group!==this)||this._nonPointGroup.hasLayer(t)},zoomToShowLayer:function(t,e){var i=function(){if((t._icon||t.__parent._icon)&&!this._inZoomAnimation)if(this._map.off("moveend",i,this),this.off("animationend",i,this),t._icon)e();else if(t.__parent._icon){var n=function(){this.off("spiderfied",n,this),e()};this.on("spiderfied",n,this),t.__parent.spiderfy()}};t._icon?e():t.__parent._zoome;e++)n=this._needsRemoving[e],this._removeLayer(n,!0);for(this._needsRemoving=[],e=0,i=this._needsClustering.length;i>e;e++)n=this._needsClustering[e],n.getLatLng?n.__parent||this._addLayer(n,this._maxZoom):this._featureGroup.addLayer(n);this._needsClustering=[],this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),this._zoom=this._map.getZoom(),this._currentShownBounds=this._getExpandedVisibleBounds(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)},onRemove:function(t){t.off("zoomend",this._zoomEnd,this),t.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),this._featureGroup.onRemove(t),this._nonPointGroup.onRemove(t),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(t){for(var e=t;null!==e&&!e._icon;)e=e.__parent;return e},_arraySplice:function(t,e){for(var i=t.length-1;i>=0;i--)if(t[i]===e)return t.splice(i,1),!0},_removeLayer:function(t,e,i){var n=this._gridClusters,s=this._gridUnclustered,r=this._featureGroup,o=this._map;if(e)for(var a=this._maxZoom;a>=0&&s[a].removeObject(t,o.project(t.getLatLng(),a));a--);var h,_=t.__parent,u=_._markers;for(this._arraySplice(u,t);_&&(_._childCount--,!(_._zoom<0));)e&&_._childCount<=1?(h=_._markers[0]===t?_._markers[1]:_._markers[0],n[_._zoom].removeObject(_,o.project(_._cLatLng,_._zoom)),s[_._zoom].addObject(h,o.project(h.getLatLng(),_._zoom)),this._arraySplice(_.__parent._childClusters,_),_.__parent._markers.push(h),h.__parent=_.__parent,_._icon&&(r.removeLayer(_),i||r.addLayer(h))):(_._recalculateBounds(),i&&_._icon||_._updateIcon()),_=_.__parent;delete t.__parent},_propagateEvent:function(t){t.layer instanceof L.MarkerCluster&&(t.type="cluster"+t.type),this.fire(t.type,t)},_defaultIconCreateFunction:function(t){var e=t.getChildCount(),i=" marker-cluster-";return i+=10>e?"small":100>e?"medium":"large",new L.DivIcon({html:"
    "+e+"
    ",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick;(e||n)&&this.on("clusterclick",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),t.on("zoomend",this._hideCoverage,this),t.on("layerremove",this._hideCoverageOnRemove,this))},_zoomOrSpiderfy:function(t){var e=this._map;e.getMaxZoom()===e.getZoom()?this.options.spiderfyOnMaxZoom&&t.layer.spiderfy():this.options.zoomToBoundsOnClick&&t.layer.zoomToBounds()},_showCoverage:function(t){var e=this._map;this._inZoomAnimation||(this._shownPolygon&&e.removeLayer(this._shownPolygon),t.layer.getChildCount()>2&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_hideCoverageOnRemove:function(t){t.layer===this&&this._hideCoverage()},_unbindEvents:function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this._map;(t||i)&&this.off("clusterclick",this._zoomOrSpiderfy,this),e&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),n.off("zoomend",this._hideCoverage,this),n.off("layerremove",this._hideCoverageOnRemove,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=this._map._zoom,this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var t=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,t),this._currentShownBounds=t}},_generateInitialClusters:function(){var t=this._map.getMaxZoom(),e=this.options.maxClusterRadius;this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var i=t;i>=0;i--)this._gridClusters[i]=new L.DistanceGrid(e),this._gridUnclustered[i]=new L.DistanceGrid(e);this._topClusterLevel=new L.MarkerCluster(this,-1)},_addLayer:function(t,e){var i,n,s=this._gridClusters,r=this._gridUnclustered;for(this.options.singleMarkerMode&&(t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}}));e>=0;e--){i=this._map.project(t.getLatLng(),e);var o=s[e].getNearObject(i);if(o)return o._addChild(t),t.__parent=o,void 0;if(o=r[e].getNearObject(i)){var a=o.__parent;a&&this._removeLayer(o,!1);var h=new L.MarkerCluster(this,e,o,t);s[e].addObject(h,this._map.project(h._cLatLng,e)),o.__parent=h,t.__parent=h;var _=h;for(n=e-1;n>a._zoom;n--)_=new L.MarkerCluster(this,n,_),s[n].addObject(_,this._map.project(o.getLatLng(),n));for(a._addChild(_),n=e;n>=0&&r[n].removeObject(o,this._map.project(o.getLatLng(),n));n--);return}r[e].addObject(t,i)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_mergeSplitClusters:function(){this._zoomthis._map._zoom?(this._animationStart(),this._animationZoomOut(this._zoom,this._map._zoom)):this._moveEnd()},_getExpandedVisibleBounds:function(){if(!this.options.removeOutsideVisibleBounds)return this.getBounds();var t=this._map,e=t.getBounds(),i=e._southWest,n=e._northEast,s=L.Browser.mobile?0:Math.abs(i.lat-n.lat),r=L.Browser.mobile?0:Math.abs(i.lng-n.lng);return new L.LatLngBounds(new L.LatLng(i.lat-s,i.lng-r,!0),new L.LatLng(n.lat+s,n.lng+r,!0))},_animationAddLayerNonAnimated:function(t,e){if(e===t)this._featureGroup.addLayer(t);else if(2===e._childCount){e._addToMap();var i=e.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else e._updateIcon()}}),L.MarkerClusterGroup.include(L.DomUtil.TRANSITION?{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_animationZoomIn:function(t,e){var i,n=this,s=this._getExpandedVisibleBounds(),r=this._featureGroup;this._topClusterLevel._recursively(s,t,0,function(n){var o,a=n._latlng,h=n._markers;for(s.contains(a)||(a=null),n._isSingleParent()&&t+1===e?(r.removeLayer(n),n._recursivelyAddChildrenToMap(null,e,s)):(n.setOpacity(0),n._recursivelyAddChildrenToMap(a,e,s)),i=h.length-1;i>=0;i--)o=h[i],s.contains(o._latlng)||r.removeLayer(o)}),this._forceLayout(),n._topClusterLevel._recursivelyBecomeVisible(s,e),r.eachLayer(function(t){t instanceof L.MarkerCluster||!t._icon||t.setOpacity(1)}),n._topClusterLevel._recursively(s,t,e,function(t){t._recursivelyRestoreChildPositions(e)}),setTimeout(function(){n._topClusterLevel._recursively(s,t,0,function(t){r.removeLayer(t),t.setOpacity(1)}),n._animationEnd()},200)},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,t,this._getExpandedVisibleBounds())},_animationZoomOutSingle:function(t,e,i){var n=this._getExpandedVisibleBounds();t._recursivelyAnimateChildrenInAndAddSelfToMap(n,e+1,i);var s=this;this._forceLayout(),t._recursivelyBecomeVisible(n,i),setTimeout(function(){if(1===t._childCount){var r=t._markers[0];r.setLatLng(r.getLatLng()),r.setOpacity(1)}else t._recursively(n,i,0,function(t){t._recursivelyRemoveChildrenFromMap(n,e+1)});s._animationEnd()},200)},_animationAddLayer:function(t,e){var i=this,n=this._featureGroup;n.addLayer(t),e!==t&&(e._childCount>2?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.setOpacity(0),setTimeout(function(){n.removeLayer(t),t.setOpacity(1),i._animationEnd()},200)):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(e,this._map.getMaxZoom(),this._map.getZoom())))},_forceLayout:function(){L.Util.falseFn(e.body.offsetWidth)}}:{_animationStart:function(){},_animationZoomIn:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds())},_animationZoomOut:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds())},_animationAddLayer:function(t,e){this._animationAddLayerNonAnimated(t,e)}}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)},L.MarkerCluster=L.Marker.extend({initialize:function(t,e,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(t){t=t||[];for(var e=this._childClusters.length-1;e>=0;e--)this._childClusters[e].getAllChildMarkers(t);for(var i=this._markers.length-1;i>=0;i--)t.push(this._markers[i]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(){this._group._map.fitBounds(this._bounds)},getBounds:function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._expandBounds(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_expandBounds:function(t){var e,i=t._wLatLng||t._latlng;t instanceof L.MarkerCluster?(this._bounds.extend(t._bounds),e=t._childCount):(this._bounds.extend(i),e=1),this._cLatLng||(this._cLatLng=t._cLatLng||i);var n=this._childCount+e;this._wLatLng?(this._wLatLng.lat=(i.lat*e+this._wLatLng.lat*this._childCount)/n,this._wLatLng.lng=(i.lng*e+this._wLatLng.lng*this._childCount)/n):this._latlng=this._wLatLng=new L.LatLng(i.lat,i.lng)},_addToMap:function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(t,e,i){this._recursively(t,0,i-1,function(t){var i,n,s=t._markers;for(i=s.length-1;i>=0;i--)n=s[i],n._icon&&(n._setPos(e),n.setOpacity(0))},function(t){var i,n,s=t._childClusters;for(i=s.length-1;i>=0;i--)n=s[i],n._icon&&(n._setPos(e),n.setOpacity(0))})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,e,i){this._recursively(t,i,0,function(n){n._recursivelyAnimateChildrenIn(t,n._group._map.latLngToLayerPoint(n.getLatLng()).round(),e),n._isSingleParent()&&e-1===i?(n.setOpacity(1),n._recursivelyRemoveChildrenFromMap(t,e)):n.setOpacity(0),n._addToMap()})},_recursivelyBecomeVisible:function(t,e){this._recursively(t,0,e,null,function(t){t.setOpacity(1)})},_recursivelyAddChildrenToMap:function(t,e,i){this._recursively(i,-1,e,function(n){if(e!==n._zoom)for(var s=n._markers.length-1;s>=0;s--){var r=n._markers[s];i.contains(r._latlng)&&(t&&(r._backupLatlng=r.getLatLng(),r.setLatLng(t),r.setOpacity&&r.setOpacity(0)),n._group._featureGroup.addLayer(r))}},function(e){e._addToMap(t)})},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;e>=0;e--){var i=this._markers[e];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(t-1===this._zoom)for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n]._restorePosition();else for(var s=this._childClusters.length-1;s>=0;s--)this._childClusters[s]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,i){var n,s;this._recursively(t,-1,e-1,function(t){for(s=t._markers.length-1;s>=0;s--)n=t._markers[s],i&&i.contains(n._latlng)||(t._group._featureGroup.removeLayer(n),n.setOpacity&&n.setOpacity(1))},function(t){for(s=t._childClusters.length-1;s>=0;s--)n=t._childClusters[s],i&&i.contains(n._latlng)||(t._group._featureGroup.removeLayer(n),n.setOpacity&&n.setOpacity(1))})},_recursively:function(t,e,i,n,s){var r,o,a=this._childClusters,h=this._zoom;if(e>h)for(r=a.length-1;r>=0;r--)o=a[r],t.intersects(o._bounds)&&o._recursively(t,e,i,n,s);else if(n&&n(this),s&&this._zoom===i&&s(this),i>h)for(r=a.length-1;r>=0;r--)o=a[r],t.intersects(o._bounds)&&o._recursively(t,e,i,n,s)},_recalculateBounds:function(){var t,e=this._markers,i=this._childClusters;for(this._bounds=new L.LatLngBounds,delete this._wLatLng,t=e.length-1;t>=0;t--)this._expandBounds(e[t]);for(t=i.length-1;t>=0;t--)this._expandBounds(i[t])},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var i=this._getCoord(e.x),n=this._getCoord(e.y),s=this._grid,r=s[n]=s[n]||{},o=r[i]=r[i]||[],a=L.Util.stamp(t);this._objectPoint[a]=e,o.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var i,n,s=this._getCoord(e.x),r=this._getCoord(e.y),o=this._grid,a=o[r]=o[r]||{},h=a[s]=a[s]||[];for(delete this._objectPoint[L.Util.stamp(t)],i=0,n=h.length;n>i;i++)if(h[i]===t)return h.splice(i,1),1===n&&delete a[s],!0},eachObject:function(t,e){var i,n,s,r,o,a,h,_=this._grid;for(i in _){o=_[i];for(n in o)for(a=o[n],s=0,r=a.length;r>s;s++)h=t.call(e,a[s]),h&&(s--,r--)}},getNearObject:function(t){var e,i,n,s,r,o,a,h,_=this._getCoord(t.x),u=this._getCoord(t.y),l=this._objectPoint,d=this._sqCellSize,p=null;for(e=u-1;u+1>=e;e++)if(s=this._grid[e])for(i=_-1;_+1>=i;i++)if(r=s[i])for(n=0,o=r.length;o>n;n++)a=r[n],h=this._sqDist(l[L.Util.stamp(a)],t),d>h&&(d=h,p=a);return p},_getCoord:function(t){return Math.floor(t/this._cellSize)},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}},function(){L.QuickHull={getDistant:function(t,e){var i=e[1].lat-e[0].lat,n=e[0].lng-e[1].lng;return n*(t.lat-e[0].lat)+i*(t.lng-e[0].lng)},findMostDistantPointFromBaseLine:function(t,e){var i,n,s,r=0,o=null,a=[];for(i=e.length-1;i>=0;i--)n=e[i],s=this.getDistant(n,t),s>0&&(a.push(n),s>r&&(r=s,o=n));return{maxPoint:o,newPoints:a}},buildConvexHull:function(t,e){var i=[],n=this.findMostDistantPointFromBaseLine(t,e);return n.maxPoint?(i=i.concat(this.buildConvexHull([t[0],n.maxPoint],n.newPoints)),i=i.concat(this.buildConvexHull([n.maxPoint,t[1]],n.newPoints))):[t]},getConvexHull:function(t){var e,i=!1,n=!1,s=null,r=null;for(e=t.length-1;e>=0;e--){var o=t[e];(i===!1||o.lat>i)&&(s=o,i=o.lat),(n===!1||o.lat=0;i--)e=n[i].getLatLng(),s.push(e);for(t=L.QuickHull.getConvexHull(s),i=t.length-1;i>=0;i--)r.push(t[i][0]);return r}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:Math.PI/6,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var t,e=this.getAllChildMarkers(),i=this._group,n=i._map,s=n.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,e.length>=this._circleSpiralSwitchover?t=this._generatePointsSpiral(e.length,s):(s.y+=10,t=this._generatePointsCircle(e.length,s)),this._animationSpiderfy(e,t)}},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var i,n,s=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t),r=s/this._2PI,o=this._2PI/t,a=[];for(a.length=t,i=t-1;i>=0;i--)n=this._circleStartAngle+i*o,a[i]=new L.Point(e.x+r*Math.cos(n),e.y+r*Math.sin(n))._round();return a},_generatePointsSpiral:function(t,e){var i,n=this._group.options.spiderfyDistanceMultiplier*this._spiralLengthStart,s=this._group.options.spiderfyDistanceMultiplier*this._spiralFootSeparation,r=this._group.options.spiderfyDistanceMultiplier*this._spiralLengthFactor,o=0,a=[];for(a.length=t,i=t-1;i>=0;i--)o+=s/n+5e-4*i,a[i]=new L.Point(e.x+n*Math.cos(o),e.y+n*Math.sin(o))._round(),n+=this._2PI*r/o;return a},_noanimationUnspiderfy:function(){var t,e,i=this._group,n=i._map,s=i._featureGroup,r=this.getAllChildMarkers();for(this.setOpacity(1),e=r.length-1;e>=0;e--)t=r[e],s.removeLayer(t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset&&t.setZIndexOffset(0),t._spiderLeg&&(n.removeLayer(t._spiderLeg),delete t._spiderLeg)}}),L.MarkerCluster.include(L.DomUtil.TRANSITION?{SVG_ANIMATION:function(){return e.createElementNS("http://www.w3.org/2000/svg","animate").toString().indexOf("SVGAnimate")>-1}(),_animationSpiderfy:function(t,i){var n,s,r,o,a=this,h=this._group,_=h._map,u=h._featureGroup,l=_.latLngToLayerPoint(this._latlng);for(n=t.length-1;n>=0;n--)s=t[n],s.setOpacity?(s.setZIndexOffset(1e6),s.setOpacity(0),u.addLayer(s),s._setPos(l)):u.addLayer(s);h._forceLayout(),h._animationStart();var d=L.Path.SVG?0:.3,p=L.Path.SVG_NS;for(n=t.length-1;n>=0;n--)if(o=_.layerPointToLatLng(i[n]),s=t[n],s._preSpiderfyLatlng=s._latlng,s.setLatLng(o),s.setOpacity&&s.setOpacity(1),r=new L.Polyline([a._latlng,o],{weight:1.5,color:"#222",opacity:d}),_.addLayer(r),s._spiderLeg=r,L.Path.SVG&&this.SVG_ANIMATION){var c=r._path.getTotalLength();r._path.setAttribute("stroke-dasharray",c+","+c);var m=e.createElementNS(p,"animate");m.setAttribute("attributeName","stroke-dashoffset"),m.setAttribute("begin","indefinite"),m.setAttribute("from",c),m.setAttribute("to",0),m.setAttribute("dur",.25),r._path.appendChild(m),m.beginElement(),m=e.createElementNS(p,"animate"),m.setAttribute("attributeName","stroke-opacity"),m.setAttribute("attributeName","stroke-opacity"),m.setAttribute("begin","indefinite"),m.setAttribute("from",0),m.setAttribute("to",.5),m.setAttribute("dur",.25),r._path.appendChild(m),m.beginElement()}if(a.setOpacity(.3),L.Path.SVG)for(this._group._forceLayout(),n=t.length-1;n>=0;n--)s=t[n]._spiderLeg,s.options.opacity=.5,s._path.setAttribute("stroke-opacity",.5);setTimeout(function(){h._animationEnd(),h.fire("spiderfied")},200)},_animationUnspiderfy:function(t){var e,i,n,s=this._group,r=s._map,o=s._featureGroup,a=t?r._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):r.latLngToLayerPoint(this._latlng),h=this.getAllChildMarkers(),_=L.Path.SVG&&this.SVG_ANIMATION;for(s._animationStart(),this.setOpacity(1),i=h.length-1;i>=0;i--)e=h[i],e._preSpiderfyLatlng&&(e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng,e.setOpacity?(e._setPos(a),e.setOpacity(0)):o.removeLayer(e),_&&(n=e._spiderLeg._path.childNodes[0],n.setAttribute("to",n.getAttribute("from")),n.setAttribute("from",0),n.beginElement(),n=e._spiderLeg._path.childNodes[1],n.setAttribute("from",.5),n.setAttribute("to",0),n.setAttribute("stroke-opacity",0),n.beginElement(),e._spiderLeg._path.setAttribute("stroke-opacity",0)));setTimeout(function(){var t=0;for(i=h.length-1;i>=0;i--)e=h[i],e._spiderLeg&&t++;for(i=h.length-1;i>=0;i--)e=h[i],e._spiderLeg&&(e.setOpacity&&(e.setOpacity(1),e.setZIndexOffset(0)),t>1&&o.removeLayer(e),r.removeLayer(e._spiderLeg),delete e._spiderLeg);s._animationEnd()},200)}}:{_animationSpiderfy:function(t,e){var i,n,s,r,o=this._group,a=o._map,h=o._featureGroup;for(i=t.length-1;i>=0;i--)r=a.layerPointToLatLng(e[i]),n=t[i],n._preSpiderfyLatlng=n._latlng,n.setLatLng(r),n.setZIndexOffset&&n.setZIndexOffset(1e6),h.addLayer(n),s=new L.Polyline([this._latlng,r],{weight:1.5,color:"#222"}),a.addLayer(s),n._spiderLeg=s;this.setOpacity(.3),o.fire("spiderfied")},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerClusterGroup.include({_spiderfied:null,_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation?this._map.on("zoomstart",this._unspiderfyZoomStart,this):this._map.on("zoomend",this._unspiderfyWrapper,this),L.Path.SVG&&!L.Browser.touch&&this._map._initPathRoot()},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.setOpacity(1),t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}})}(window,document); \ No newline at end of file diff --git a/univcloud/static/js/univcloud.js b/univcloud/static/js/univcloud.js new file mode 100644 index 0000000..1614f7f --- /dev/null +++ b/univcloud/static/js/univcloud.js @@ -0,0 +1,166 @@ +$(function() { + +var start_bounds = [[41.1, -5.53], [51.5, 9.91]]; +var start_zoom = 6; +var mapstyle = '997'; +var mapkey = 'BC9A493B41014CAABB98F0471D759707' + +var start_lat = (start_bounds[0][0] + start_bounds[1][0])/2; +var start_lon = (start_bounds[0][1] + start_bounds[1][1])/2; +var start_center = [start_lat, start_lon]; + +var redirectTimeout; +var refreshmarkersTimeout; +var redirectLink = ''; +var searchinput = $('input#search'); +var markers = new L.MarkerClusterGroup({ + spiderfyOnMaxZoom: true, + showCoverageOnHover: false, + zoomToBoundsOnClick: true, + animateAddingMarkers: false, + disableClusteringAtZoom: 50, + maxClusterRadius: 25, + spiderfyDistanceMultiplier: 3, + singleMarkerMode: true, +}); +var map = L.map('map', { + center: start_center, + zoom: start_zoom, + maxZoom: 16, +}); + +L.tileLayer('http://{s}.tile.cloudmade.com/' + mapkey + '/' + mapstyle + '/256/{z}/{x}/{y}.png', {}).addTo(map); +L.control.scale( { 'imperial': false, 'updateWhenIdle': true } ).addTo(map); + +map.attributionControl.setPrefix(''); +map.attributionControl.addAttribution('Données © les contributeurs d’OpenStreetMap CC-BY-SA — Imagerie © CloudMade + Leaflet'); + +function redirectTo(e) { + map.closePopup(); + if (redirectLink != '') { + window.location = redirectLink; + } +} + +function onIdPClick(e) { + if (typeof disco_set != 'undefined') disco_set(e.target.entityid); + redirectLink = '/authsaml2/sso?entity_id=' + e.target.entityid; + redirectTimeout = setTimeout(redirectTo, 2000); +} + +function noRedirect(e) { + map.closePopup(); + clearTimeout(redirectTimeout); +} + +$('a.idplink').click(function() { + var a = $(this); + if (typeof disco_set != 'undefined') disco_set(a.data('entityid')); + setTimeout(function () { window.location.href = a.attr('href'); }, 2000); + return false; +}); + +map.on('mousedown click popupclose', noRedirect); + +function refreshmarkers() { + var listItems = $('ul#idps').children(); + var searchValue = $('input#search').val().toLowerCase(); + var new_markers = new Array(); + for ( var i = listItems.length - 1; i >= 0; i-- ) { + item = $(listItems[i]); + idp = item.children('a'); + text = idp.data('filtertext'); + eid = idp.data('entityid'); + lat = idp.data('lat'); + lon = idp.data('lon'); + latlon = new L.LatLng(lat, lon); + if (searchValue.length > 2) { + if (text.toLowerCase().indexOf(searchValue) < 0) { + // filtered by input#search : hide it and don't add to markers + item.hide(); + item.addClass('hidden'); + continue; + } + } else if (! map.getBounds().contains(latlon)) { + // marker is not on the map, hide it and don't add to markers + item.hide(); + item.addClass('hidden'); + continue; + } + item.show(); + item.removeClass('hidden'); + marker = new L.Marker(latlon, { title: text, + icon: new L.DivIcon({ + html: '
    ', + className: 'marker-cluster marker-cluster-one', + iconSize: new L.Point(40, 40) + }) + }); + marker.entityid = eid; + marker.on('click', onIdPClick); + marker.bindPopup('

    ' + text + '

    Connexion dans 2 secondes…

    '); + new_markers.push(marker); + } + markers.clearLayers(); + markers.addLayers(new_markers); +} + +function delayRefresh(e) { + clearTimeout(refreshmarkersTimeout); + refreshmarkersTimeout = setTimeout(refreshmarkers, 500); +} + +map.fitBounds(start_bounds); +map.addLayer(markers); +refreshmarkers(); +map.on('moveend', delayRefresh); +searchinput.on('keyup webkitspeechchange speechchange', delayRefresh); + +searchinput.focus(); + +// handle up/page-up and down/page-down keys + +$('a#preferedidp').on('keydown', function(e) { + if ((e.which == 40) || (e.which == 34)) { // down & page-down + e.preventDefault(); + searchinput.focus(); + }; + if ((e.which == 38) || (e.which == 33)) { // up && page-up + e.preventDefault(); + $('ul#idps li:not(.hidden):last a').focus(); + }; +}); + +searchinput.on('keydown', function(e) { + if ((e.which == 40) || (e.which == 34)) { // down & page-down + e.preventDefault(); + $('ul#idps li:not(.hidden):first a').focus(); + } + if ((e.which == 38) || (e.which == 33)) { // up && page-up + e.preventDefault(); + $('a#preferedidp').focus(); + } +}); + +$('ul#idps').on('keydown', function(e) { + if ((e.which == 40) || (e.which == 34)) { // down & page-down + e.preventDefault(); + a = $('ul#idps a:focus').parent().nextAll('li:not(.hidden)').first().find('a'); + if (a.length == 0) { + $('a#preferedidp').focus(); + } else { + a.focus(); + } + }; + if ((e.which == 38) || (e.which == 33)) { // up && page-up + e.preventDefault(); + a = $('ul#idps a:focus').parent().prevAll('li:not(.hidden)').first().find('a'); + if (a.length == 0) { + searchinput.focus(); + } else { + a.focus(); + } + }; +}); + +}); diff --git a/univcloud/templates/base.html b/univcloud/templates/base.html new file mode 100644 index 0000000..926cdcd --- /dev/null +++ b/univcloud/templates/base.html @@ -0,0 +1,42 @@ +{% load url from future %} +{% load i18n %} + + + + + {% block page-title %}Univcloud{% endblock %} + + {% block extrascripts %} + {% endblock %} + + + + + + {% block wrapper %} +
    + {% endblock %} + {% if not popup %} + + {% endif %} +
    + {% if messages %} +
      + {% for message in messages %} + {{ message }} + {% endfor %} +
    + {% endif %} + {% block beforecontent %} + {% endblock %} + {% block content %} + {% endblock %} +
    +
    + {% block page-end %} + {% endblock %} + + diff --git a/univcloud/templates/registration/login.html b/univcloud/templates/registration/login.html index 480f4d3..1dcd307 100644 --- a/univcloud/templates/registration/login.html +++ b/univcloud/templates/registration/login.html @@ -2,6 +2,15 @@ {% load i18n %} {% load url from future %} +{% block extrascripts %} + + + + + + +{% endblock %} + {% block wrapper %}
    {% endblock %} @@ -11,9 +20,19 @@ {% block content %} +
    +
    +
    + +
      + {% include "univcloud/idplist.html" %} +
    +
    +
    +
    -

    Connexion

    +

    Connexion locale

    {% if form.errors %}

    {% trans 'Mot de passe incorrect.' %}

    @@ -37,4 +56,6 @@
    + + {% endblock %} diff --git a/univcloud/templates/univcloud/idplist.html b/univcloud/templates/univcloud/idplist.html new file mode 100644 index 0000000..48a2e6c --- /dev/null +++ b/univcloud/templates/univcloud/idplist.html @@ -0,0 +1,248 @@ +
  • A Université de Provence - Test
  • +
  • ABES
  • +
  • ADUNEO - TEST IDP
  • +
  • AGROCAMPUS TOUEST
  • +
  • Agropolis International
  • +
  • Authentic2
  • +
  • Autoformation jcvirtual1
  • +
  • CC.IN2P3
  • +
  • CERIST - ARN
  • +
  • CIRAD - IDP de test
  • +
  • CIRIL
  • +
  • CNOUS
  • +
  • CNOUS Personnels
  • +
  • CNRS - LPO - Test AttriProvider
  • +
  • CNRS - minte - ShibIdP
  • +
  • CPE Lyon
  • +
  • CRIHAN
  • +
  • CROUS Aix Marseille Test
  • +
  • CROUS Amiens Picardie
  • +
  • CROUS Besançon IdP3
  • +
  • CROUS Clermont-Ferrand
  • +
  • CROUS Nancy-Metz
  • +
  • CROUS de REIMS - TEST
  • +
  • CROUS de Toulouse - Test
  • +
  • CRU - tests rafael
  • +
  • CRU - testshib2 - idp2.2.1
  • +
  • Comptes CRU
  • +
  • Crous de Grenoble - étudiants
  • +
  • Crous de Montpellier
  • +
  • Crous de Poitiers
  • +
  • Crous de Versailles VM
  • +
  • Crous-Cnous - Tests
  • +
  • Crous-poitiers-cas.fr
  • +
  • EHESS
  • +
  • ENIM
  • +
  • ENISE-TEST2
  • +
  • ENIT
  • +
  • ENITA de Bordeaux
  • +
  • ENS Lettres et Sciences humaines
  • +
  • ENS de Cachan Test
  • +
  • ENS de Lyon
  • +
  • ENS de Rennes
  • +
  • ENSAI - Test
  • +
  • ENSAIT /Test
  • +
  • ENSEA
  • +
  • ENSICAEN
  • +
  • ENSIIE TEST
  • +
  • ENSSIB
  • +
  • ENSTA Bretagne - Ecole Nationale Supérieure des Techniques Avancées
  • +
  • ENSTA ParisTech
  • +
  • ENTPE - Test
  • +
  • ESPCI ParisTech
  • +
  • ESPCI ParisTech (saml20)
  • +
  • ETRS
  • +
  • ETRS 2
  • +
  • Ecole Centrale de LILLE - TEST
  • +
  • Ecole Centrale de Lyon TEST
  • +
  • Ecole Centrale de Nantes
  • +
  • Ecole Nationale Polytechnique d'Alger
  • +
  • Ecole Nationale Supérieure d'Ingénieurs de Bourges
  • +
  • Ecole Nationale Vétérinaire de Toulouse (ENVT)
  • +
  • Ecole Nationale des Chartes
  • +
  • Ecole des Mines Albi-Carmaux
  • +
  • Ecole des Mines d'Ales
  • +
  • FNSP TEST
  • +
  • Fédération Education-Recherche - IdP de Test (Shibboleth 2.x)
  • +
  • Grenoble INP
  • +
  • IDP Alyotech Pelican
  • +
  • IDP test ETRS
  • +
  • IFMA - Institut Français de Mécanique Avancée
  • +
  • ILL test FP
  • +
  • INALCO - TEST
  • +
  • INPL Lorraine Test
  • +
  • INRIA - idp
  • +
  • INRIA TEST
  • +
  • INRIA TEST 2
  • +
  • INRP test
  • +
  • INRP test 2
  • +
  • INRP test 3
  • +
  • INSA Toulouse
  • +
  • INSA de Lyon
  • +
  • INSA de Rennes
  • +
  • INSA de Rouen
  • +
  • INSA de Strasbourg
  • +
  • INSHEA
  • +
  • IPB - Institut Polytechnique de Bordeaux
  • +
  • IUFM de Bourgogne
  • +
  • IUFM de Bretagne
  • +
  • IUFM de Bretagne TEST (python.bretagne.iufm.fr)
  • +
  • IdP de test Nuxeo
  • +
  • IdP test Limoges
  • +
  • Ifremer-test
  • +
  • Ifsttar
  • +
  • Institut de Physique du Globe de Paris
  • +
  • JFC-CUFR-Rebirth
  • +
  • MINES ParisTech - idp de TEST
  • +
  • Mathrice - Test LF
  • +
  • Montpellier Supagro
  • +
  • Muséum National d'Histoire Naturelle (idptest)
  • +
  • Observatoire de Paris - Préproduction
  • +
  • Observatoire de Paris - Test
  • +
  • Observatoire de la Côte d'Azur
  • +
  • PELICAN Identity Provider
  • +
  • PELICAN Identity Provider (preprod)
  • +
  • PRES Normandie Université
  • +
  • PRES université de Bordeaux
  • +
  • RENATER - dev-shibboleth.cru.fr
  • +
  • RENATER - Test HA
  • +
  • SIMSU test IEP
  • +
  • SIMSU test INP
  • +
  • Sciences Po Bordeaux - Test PR
  • +
  • TD/shibboleth05
  • +
  • TEST - IDP IRSTEA
  • +
  • TEST EMSE
  • +
  • TEST Université de Poitiers (Test idp v2)
  • +
  • TEST Université de Versailles - Saint Quentin en Yvelines
  • +
  • TP / shib-04.cnous.fr
  • +
  • TP / DR10-FORM05.c-strasbourg.fr
  • +
  • TP / DR10-FORM06.c-strasbourg.fr
  • +
  • TP / DR10-FORM07.c-strasbourg.fr
  • +
  • TP / DR10-FORM09.c-strasbourg.fr
  • +
  • TP / DR10-FORM10.c-strasbourg.fr
  • +
  • TP / DR10-FORM11.c-strasbourg.fr
  • +
  • TP / eleve6.cines.fr
  • +
  • TP / eleve7.cines.fr
  • +
  • TP / eleve8
  • +
  • TP / idp.cnrst.ma
  • +
  • TP / idp.enib.fr
  • +
  • TP / idp.iufm-martinique.fr
  • +
  • TP / idp.univ-ag.fr
  • +
  • TP / mplsvrap0007.ird.fr
  • +
  • TP / recette-sso.ird.fr
  • +
  • TP / shib-02.cnous.fr
  • +
  • TP / shib-03.cnous.fr
  • +
  • TP / shib-05.cnous.fr
  • +
  • TP / shib-07.cnous.fr
  • +
  • TP / shib-10.cnous.fr
  • +
  • TP / shib-11.cnous.fr
  • +
  • TP / shib-12.cnous.fr
  • +
  • TP / shibboleth
  • +
  • TP / sp6.iufm-martinique.fr EDWIN
  • +
  • TP / toufikexp.arn.dz
  • +
  • TP Shib-09
  • +
  • Telecom Lille1
  • +
  • Telecom et Management SudParis v2.3.3
  • +
  • Test - Pentila - Igor
  • +
  • Test - Pentila - Preprod
  • +
  • Test IDP Rectorat de Bordeaux
  • +
  • Test IDP Université de Caen
  • +
  • Test IPB - Ne pas utiliser
  • +
  • Test Idp Université de franche comté
  • +
  • Test Shibboleth SBEL
  • +
  • Test UPMF remplacement IDP
  • +
  • Test noix de pécan
  • +
  • Toutatice
  • +
  • Télécom Bretagne
  • +
  • Télécom ParisTech
  • +
  • UBO TEST
  • +
  • UHP NANCY fed-idp
  • +
  • UJF-Preprod
  • +
  • UPJV - IdP test
  • +
  • UPMC Test
  • +
  • UTC shib2 test
  • +
  • Ubisecure
  • +
  • Universite Montpellier 1 - idp2 Test
  • +
  • Universite Toulouse 1 Capitole
  • +
  • Universite Toulouse 1 Sciences Sociales
  • +
  • Universite de Haute Alsace
  • +
  • Universite de Tours test
  • +
  • Université Angers - qualif Shibboleth
  • +
  • Université Bordeaux 1 Sciences et Techniques
  • +
  • Université Bordeaux 3 Test
  • +
  • Université Jean Monnet - TEST
  • +
  • Université Jean Moulin - Lyon 3 (test)
  • +
  • Université La Rochelle
  • +
  • Université Lille 3
  • +
  • Université Lille1 - Idp Test
  • +
  • Université Lille2: Test
  • +
  • Université Lyon 2 - Test
  • +
  • Université Montesquieu Bordeaux IV - IDPTEST
  • +
  • Université Montesquieu Bordeaux IV - TEST
  • +
  • Université Montpellier 2 TEST
  • +
  • Université Montpellier III - Idp v2
  • +
  • Université Nancy 2
  • +
  • Université Panthéon Assas ( Paris 2 ) - Test
  • +
  • Université Paris 1 Panthéon-Sorbonne TEST
  • +
  • Université Paris 12
  • +
  • Université Paris 13 - TEST
  • +
  • Université Paris 8 - Vincennes TEST
  • +
  • Université Paris Diderot - Paris 7 - dev
  • +
  • Université Paris-Sud 11 - Test
  • +
  • Université Paul Cézanne - Aix-Marseille III
  • +
  • Université Paul Verlaine - Metz (test)
  • +
  • Université Toulouse 2 - Mirail
  • +
  • Université Toulouse 3 - Paul Sabatier
  • +
  • Université Toulouse 3 - Paul Sabatier (idpups)
  • +
  • Université Toulouse 3 - Paul Sabatier (test shib 2.3.0)
  • +
  • Université d'Angers
  • +
  • Université d'Artois - Test
  • +
  • Université d'Avignon et des Pays de Vaucluse - TEST
  • +
  • Université d'Evry Val d'Essonne - idp TEST
  • +
  • Université d'Orléans - Test
  • +
  • Université de Bordeaux 2 - Victor Segalen - Développement
  • +
  • Université de Bordeaux 2 - Victor Segalen - Production
  • +
  • Université de Bourgogne
  • +
  • Université de Brest Test: federation2
  • +
  • Université de Bretagne Sud - TESTS
  • +
  • Université de Cergy Pontoise
  • +
  • Université de Corse - TEST
  • +
  • Université de Franche-Comté
  • +
  • Université de Grenoble 1 - Joseph Fourier
  • +
  • Université de Grenoble 2 UPMF - V2.1
  • +
  • Université de Grenoble 3 - Stendhal New-
  • +
  • Université de Grenoble 3 Stendhal-v2
  • +
  • Université de Lyon 1 Claud Bernard - Shib2.3.2
  • +
  • Université de Nantes
  • +
  • Université de Nice-Sophia Antipolis
  • +
  • Université de Nimes
  • +
  • Université de Paris 3 - Sorbonne Nouvelle ***TEST***
  • +
  • Université de Paris 4 Sorbonne - TEST
  • +
  • Université de Paris 5 - Paris Descartes - TEST
  • +
  • Université de Paris 9 - Dauphine
  • +
  • Université de Paris-Est Marne-la-Vallée TEST
  • +
  • Université de Pau et des Pays de l'Adour
  • +
  • Université de Picardie - Jules Verne
  • +
  • Université de Polynésie française
  • +
  • Université de Reims Champagne-Ardenne (test)
  • +
  • Université de Rennes 1
  • +
  • Université de Rouen
  • +
  • Université de Rouen (test)
  • +
  • Université de Rouen test idp
  • +
  • Université de Savoie
  • +
  • Université de Strasbourg - preprod
  • +
  • Université de Technologie de Belfort-Montbéliard
  • +
  • Université de Technologie de Troyes - TEST
  • +
  • Université de Toulouse
  • +
  • Université de Tours
  • +
  • Université de Valenciennes
  • +
  • Université du Havre - Futur IdP
  • +
  • Université du Maine - Test iq
  • +
  • Université du Sud Toulon Var
  • +
  • _UDL_test
  • +
  • aaa_test
  • +
  • educagri
  • +
  • http://sts.idmgt.demo/adfs/services/trust
  • +
  • https://ccfedo01.in2p3.fr:9181/opensso
  • +
  • shib-06.cnous.fr
  • +
  • testshib1.cru.fr
  • diff --git a/univcloud/urls.py b/univcloud/urls.py index e2bded0..108c382 100644 --- a/univcloud/urls.py +++ b/univcloud/urls.py @@ -30,4 +30,5 @@ urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), url(r'^accounts/logout/', 'django.contrib.auth.views.logout_then_login'), url(r'^accounts/', include('django.contrib.auth.urls')), + url(r'^authsaml2/', include('authentic2.authsaml2.urls')), )