Commit 724428a3 authored by Bastien Zigmann's avatar Bastien Zigmann Committed by Vincent Dubois

Changement de l'affichage des severs pour que cela soit compréhensible par tout le monde

parent 6c19af58
......@@ -44,9 +44,10 @@ class Geocropping {
*/
/** index ofserver url interpreter used*/
_app_server_interpreter_index: number = 0;
_app_server_interpreter_index: string;
/** server url interpreter list*/
_app_server_interpreter_list: string[] = ["https://overpass-api.de/api/interpreter", "https://api.openstreetmap.fr/oapi/interpreter"];
_app_server_interpreter_list: IDictionary<string> = { Mondial:
"https://overpass-api.de/api/interpreter", Français: "https://api.openstreetmap.fr/oapi/interpreter"};
/** distance of the search (meter) */
_app_distance_search: number = 20;
......@@ -166,6 +167,7 @@ class Geocropping {
this._geoJSONLayers = L.geoJSON();
// vérifier si l'utilisateur est connecté et récuppérer ses informations
this.updateUserDetails();
this._app_server_interpreter_index = Object.keys(this._app_server_interpreter_list)[0];
/**
* Attach events
......@@ -916,10 +918,11 @@ class Geocropping {
error: function (jqXHR, textStatus, errorThrown) {
console.log(errorThrown);
this.notify.AutoServerChanged();
if (this._app_server_interpreter_index === this._app_server_interpreter_list.length - 1) {
this._app_server_interpreter_index = 0;
let keys = Object.keys(this._app_server_interpreter_list);
if (this._app_server_interpreter_index === keys[keys.length - 1]) {
this._app_server_interpreter_index = keys[0];
} else {
this._app_server_interpreter_index++;
this._app_server_interpreter_index = keys[keys.indexOf(this._app_server_interpreter_index) + 1];
}
$(this).trigger('urlInterpreterUpdated', [this._app_server_interpreter_index]);
}
......
......@@ -18,7 +18,7 @@ class OauthOsm {
get _useSession() { return true }
_baseUrl = "https://geocropping.xsalto.com/auth/";
_baseUrl = "";
_devApi = false;
......@@ -39,6 +39,8 @@ class OauthOsm {
// vérifier la connection
this.getUserDetails();
this._baseUrl = window.location.href + 'auth/';
}
......
......@@ -45,13 +45,14 @@ function openRightMenu(width?: number) {
let geocropping = new Geocropping();
$(document).ready(() => {
let $geocropping = $(geocropping)
geocropping._app_server_interpreter_list.forEach(element => {
$('#urlInterpreter').append(`<option value="${element}">${element}</option>`);
});
let $geocropping = $(geocropping);
for (var key in geocropping._app_server_interpreter_list) {
$('#urlInterpreter').append(`<option value="${key}">${key}</option>`);
}
$geocropping.on('urlInterpreterUpdated', (e, index) => {
$('#urlInterpreter').val(geocropping._app_server_interpreter_list[index]);
$('#urlInterpreter').val(index);
});
$('#userAction #login').click(() => {
......@@ -79,7 +80,7 @@ $(document).ready(() => {
}).prop("checked", geocropping._osm._devApi);
$('#menu #urlInterpreter').change(function (e) {
geocropping._app_server_interpreter_index = geocropping._app_server_interpreter_list.indexOf(this.value);
geocropping._app_server_interpreter_index = this.value;
geocropping.notify.ServerChanged();
});
......
......@@ -28,9 +28,9 @@ declare class Geocropping {
_map_minZoom: number;
_map_maxZoom: number;
/** index ofserver url interpreter used*/
_app_server_interpreter_index: number;
_app_server_interpreter_index: string;
/** server url interpreter list*/
_app_server_interpreter_list: string[];
_app_server_interpreter_list: IDictionary<string>;
/** distance of the search (meter) */
_app_distance_search: number;
/** distance to hide feature (meter) */
......
<?php
require_once ('OAuth.php');
require_once ('Array2XML.php');
require_once ('OsmConsumer.php');
class Geocropping
{
......@@ -15,14 +16,15 @@ class Geocropping
function __construct($type = 'PROD')
{
global $consumer;
if ($type === 'DEV') {
// DEV
$this->authUrl = 'https://master.apis.dev.openstreetmap.org';
$this->apiUrl = 'https://master.apis.dev.openstreetmap.org';
$this->oauth_consumer_key = 'iUOtp4VHumguYofpEF77sb0KemjNQj58KXP66hyz'; // récupéré sur osm
$this->oauth_secret = 'gIe6ExiFr7DR5XYy25ozPnFUaF92ZeuRyEYVeu9s'; // récupéré sur osm
$this->oauth_consumer_key = $consumer['DEV']['key']; // récupéré sur osm
$this->oauth_secret = $consumer['DEV']['secret']; // récupéré sur osm
}
elseif ($type === 'PROD') {
......@@ -30,8 +32,8 @@ class Geocropping
$this->authUrl = 'https://www.openstreetmap.org';
$this->apiUrl = 'https://www.openstreetmap.org';
$this->oauth_consumer_key = 'QGGYLkKz7Vt2yNgkWeE6adWNpDoBMYrUcFGwO217'; // récupéré sur osm
$this->oauth_secret = 'QhY0iqyTK7hLCRfF0ygbgOPPqteWh2pR10EeoYRA'; // récupéré sur osm
$this->oauth_consumer_key = $consumer['PROD']['key']; // récupéré sur osm
$this->oauth_secret = $consumer['PROD']['secret']; // récupéré sur osm
}
......
......@@ -23,13 +23,8 @@ var Geocropping = (function () {
*/
this._map_minZoom = 14;
this._map_maxZoom = 19;
/*
* APP SETTINGS
*/
/** index ofserver url interpreter used*/
this._app_server_interpreter_index = 0;
/** server url interpreter list*/
this._app_server_interpreter_list = ["https://overpass-api.de/api/interpreter", "https://api.openstreetmap.fr/oapi/interpreter"];
this._app_server_interpreter_list = { Mondial: "https://overpass-api.de/api/interpreter", Français: "https://api.openstreetmap.fr/oapi/interpreter" };
/** distance of the search (meter) */
this._app_distance_search = 20;
/** distance to hide feature (meter) */
......@@ -97,6 +92,7 @@ var Geocropping = (function () {
this._geoJSONLayers = L.geoJSON();
// vérifier si l'utilisateur est connecté et récuppérer ses informations
this.updateUserDetails();
this._app_server_interpreter_index = Object.keys(this._app_server_interpreter_list)[0];
/**
* Attach events
*/
......@@ -795,11 +791,12 @@ var Geocropping = (function () {
error: function (jqXHR, textStatus, errorThrown) {
console.log(errorThrown);
this.notify.AutoServerChanged();
if (this._app_server_interpreter_index === this._app_server_interpreter_list.length - 1) {
this._app_server_interpreter_index = 0;
var keys = Object.keys(this._app_server_interpreter_list);
if (this._app_server_interpreter_index === keys[keys.length - 1]) {
this._app_server_interpreter_index = keys[0];
}
else {
this._app_server_interpreter_index++;
this._app_server_interpreter_index = keys[keys.indexOf(this._app_server_interpreter_index) + 1];
}
$(this).trigger('urlInterpreterUpdated', [this._app_server_interpreter_index]);
}
......
This diff is collapsed.
......@@ -8,7 +8,7 @@
*/
var OauthOsm = (function () {
function OauthOsm() {
this._baseUrl = "https://geocropping.xsalto.com/auth/";
this._baseUrl = "";
this._devApi = false;
this._storage_token_key_name = "OauthOsm-key";
this._storage_token_secret_name = "OauthOsm-secret";
......@@ -21,6 +21,7 @@ var OauthOsm = (function () {
this._loadToken();
// vérifier la connection
this.getUserDetails();
this._baseUrl = window.location.href + 'auth/';
}
Object.defineProperty(OauthOsm.prototype, "_useSession", {
get: function () { return true; },
......
This diff is collapsed.
......@@ -43,11 +43,11 @@ function openRightMenu(width) {
var geocropping = new Geocropping();
$(document).ready(function () {
var $geocropping = $(geocropping);
geocropping._app_server_interpreter_list.forEach(function (element) {
$('#urlInterpreter').append("<option value=\"" + element + "\">" + element + "</option>");
});
for (var key in geocropping._app_server_interpreter_list) {
$('#urlInterpreter').append("<option value=\"" + key + "\">" + key + "</option>");
}
$geocropping.on('urlInterpreterUpdated', function (e, index) {
$('#urlInterpreter').val(geocropping._app_server_interpreter_list[index]);
$('#urlInterpreter').val(index);
});
$('#userAction #login').click(function () {
geocropping.connect();
......@@ -71,7 +71,7 @@ $(document).ready(function () {
localSave('devMode', '' + val);
}).prop("checked", geocropping._osm._devApi);
$('#menu #urlInterpreter').change(function (e) {
geocropping._app_server_interpreter_index = geocropping._app_server_interpreter_list.indexOf(this.value);
geocropping._app_server_interpreter_index = this.value;
geocropping.notify.ServerChanged();
});
var userConnected = function () {
......
{"version":3,"file":"index.js","sourceRoot":"","sources":["../.ts/index.ts"],"names":[],"mappings":";AAAA,yCAAyC;AACzC,2CAA2C;AAE3C;IACI,IAAI,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;IACpF,EAAE,CAAC,CAAC,WAAW,KAAK,CAAC,CAAC;QAClB,cAAc,EAAE,CAAC;IACrB,IAAI;QACA,aAAa,EAAE,CAAC;AACxB,CAAC;AAED;IACI,EAAE,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,oBAAoB,CAA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sd.d.ts\" />\n\nfunction toggleRightMenu() {\n let actualRight = $('body')[0].offsetWidth - $('.side-nav.fit-right')[0].offsetLeft;\n if (actualRight !== 0)\n closeRightMenu();\n else\n openRightMenu();\n}\n\nfunction toggleLeftMenu() {\n if ($('.side-nav.fit-left').position().left + $('.side-nav.fit-left').width() !== 0)\n closeLeftMenu();\n else\n openLeftMenu();\n}\n\nfunction closeLeftMenu() {\n openLeftMenu(0);\n}\nfunction openLeftMenu(width?: number) {\n (width === undefined) && (width = $('.side-nav.fit-left').width());\n if (width === 0)\n $('.side-nav.fit-left').css('left', -$('.side-nav.fit-left').width());\n else {\n $('.side-nav.fit-left').width(width);\n $('.side-nav.fit-left').css('left', 0);\n }\n $('#mapArea').css('left', width);\n}\nfunction closeRightMenu() {\n openRightMenu(0);\n}\nfunction openRightMenu(width?: number) {\n (width === undefined) && (width = $('.side-nav.fit-right').width());\n if (width === 0)\n $('.side-nav.fit-right').css('right', -$('.side-nav.fit-right').width());\n else {\n $('.side-nav.fit-right').width(width);\n $('.side-nav.fit-right').css('right', 0);\n }\n $('#mapArea').css('right', width);\n}\nlet geocropping = new Geocropping();\n$(document).ready(() => {\n\n let $geocropping = $(geocropping)\n geocropping._app_server_interpreter_list.forEach(element => {\n $('#urlInterpreter').append(`<option value=\"${element}\">${element}</option>`);\n });\n\n $geocropping.on('urlInterpreterUpdated', (e, index) => {\n $('#urlInterpreter').val(geocropping._app_server_interpreter_list[index]);\n });\n\n $('#userAction #login').click(() => {\n geocropping.connect();\n });\n $('#userAction #logout').click(() => {\n geocropping.userDisconnect();\n });\n\n $('#menu #clickPos').change(function (e) {\n let val = $(this).prop('checked');\n geocropping.setClickPosition(val);\n val ? geocropping.stopLocateUser() : geocropping.startLocateUser();\n }).prop(\"checked\", false);\n\n let devMode = localLoad('devMode');\n if (devMode) {\n geocropping._osm._devApi = devMode == \"true\";\n }\n $('#menu #devMode').change(function (e) {\n let val: boolean = $(this).prop('checked');\n geocropping.userDisconnect();\n geocropping._osm._devApi = val;\n localSave('devMode', '' + val);\n }).prop(\"checked\", geocropping._osm._devApi);\n\n $('#menu #urlInterpreter').change(function (e) {\n geocropping._app_server_interpreter_index = geocropping._app_server_interpreter_list.indexOf(this.value);\n geocropping.notify.ServerChanged();\n });\n\n let userConnected = () => {\n //console.trace('myGeocropping', 'connected');\n $('#userAction #login').hide();\n $('#userAction #logout').show();\n $('.map-menu-item:has(#userImage)').show();\n }\n let userDisconnected = () => {\n //console.trace('myGeocropping', 'disconnected');\n\n $('#userAction #logout').hide();\n $('#userAction #login').show();\n\n $('.map-menu-item:has(#userImage)').hide();\n $('#userInfo').hide();\n $('#userImage').attr('src', '');\n $('#userInfo #userName').text('');\n }\n\n $geocropping.on('userDisconnected', userDisconnected);\n\n $geocropping.on('userConnected', userConnected);\n\n let updateUserDetails = (e, data) => {\n //console.trace('myGeocropping', 'updateUserDetails', e);\n\n $('#userImage').show();\n $('#userImage').attr('src', data.img);\n $('#userInfo #userName').text(data.display_name);\n }\n $geocropping.on('userDetailsUpdated', updateUserDetails);\n\n //console.trace('myGeocropping', geocropping.isConnected);\n\n if (geocropping.isConnected) {\n //console.trace('myGeocropping', 'test ok', geocropping.getUserDetails());\n\n userConnected();\n //updateUserDetails(null, geocropping.getUserDetails());\n } else {\n userDisconnected();\n };\n\n geocropping.createMap('map');\n\n // pour permettre le redimentionnement après la crétion de la carte leaflet\n document.getElementById('mapArea').style.width = \"auto\";\n geocropping.startLocateUser();\n});"]}
\ No newline at end of file
{"version":3,"file":"index.js","sourceRoot":"","sources":["../.ts/index.ts"],"names":[],"mappings":";AAAA,yCAAyC;AACzC,2CAA2C;AAE3C;IACI,IAAI,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;IACpF,EAAE,CAAC,CAAC,WAAW,KAAK,CAAC,CAAC;QAClB,cAAc,EAAE,CA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,eAAe,EAAE,CAAC;AAClC,CAAC,CAAC,CAAC","sourcesContent":["/// <reference path=\"typings/tsd.d.ts\" />\n/// <reference path=\"myTypings/tsd.d.ts\" />\n\nfunction toggleRightMenu() {\n let actualRight = $('body')[0].offsetWidth - $('.side-nav.fit-right')[0].offsetLeft;\n if (actualRight !== 0)\n closeRightMenu();\n else\n openRightMenu();\n}\n\nfunction toggleLeftMenu() {\n if ($('.side-nav.fit-left').position().left + $('.side-nav.fit-left').width() !== 0)\n closeLeftMenu();\n else\n openLeftMenu();\n}\n\nfunction closeLeftMenu() {\n openLeftMenu(0);\n}\nfunction openLeftMenu(width?: number) {\n (width === undefined) && (width = $('.side-nav.fit-left').width());\n if (width === 0)\n $('.side-nav.fit-left').css('left', -$('.side-nav.fit-left').width());\n else {\n $('.side-nav.fit-left').width(width);\n $('.side-nav.fit-left').css('left', 0);\n }\n $('#mapArea').css('left', width);\n}\nfunction closeRightMenu() {\n openRightMenu(0);\n}\nfunction openRightMenu(width?: number) {\n (width === undefined) && (width = $('.side-nav.fit-right').width());\n if (width === 0)\n $('.side-nav.fit-right').css('right', -$('.side-nav.fit-right').width());\n else {\n $('.side-nav.fit-right').width(width);\n $('.side-nav.fit-right').css('right', 0);\n }\n $('#mapArea').css('right', width);\n}\nlet geocropping = new Geocropping();\n$(document).ready(() => {\n\n let $geocropping = $(geocropping);\n for (var key in geocropping._app_server_interpreter_list) {\n $('#urlInterpreter').append(`<option value=\"${key}\">${key}</option>`);\n } \n\n $geocropping.on('urlInterpreterUpdated', (e, index) => {\n $('#urlInterpreter').val(index);\n\n });\n\n $('#userAction #login').click(() => {\n geocropping.connect();\n });\n $('#userAction #logout').click(() => {\n geocropping.userDisconnect();\n });\n\n $('#menu #clickPos').change(function (e) {\n let val = $(this).prop('checked');\n geocropping.setClickPosition(val);\n val ? geocropping.stopLocateUser() : geocropping.startLocateUser();\n }).prop(\"checked\", false);\n\n let devMode = localLoad('devMode');\n if (devMode) {\n geocropping._osm._devApi = devMode == \"true\";\n }\n $('#menu #devMode').change(function (e) {\n let val: boolean = $(this).prop('checked');\n geocropping.userDisconnect();\n geocropping._osm._devApi = val;\n localSave('devMode', '' + val);\n }).prop(\"checked\", geocropping._osm._devApi);\n\n $('#menu #urlInterpreter').change(function (e) {\n geocropping._app_server_interpreter_index = this.value;\n geocropping.notify.ServerChanged();\n });\n\n let userConnected = () => {\n //console.trace('myGeocropping', 'connected');\n $('#userAction #login').hide();\n $('#userAction #logout').show();\n $('.map-menu-item:has(#userImage)').show();\n }\n let userDisconnected = () => {\n //console.trace('myGeocropping', 'disconnected');\n\n $('#userAction #logout').hide();\n $('#userAction #login').show();\n\n $('.map-menu-item:has(#userImage)').hide();\n $('#userInfo').hide();\n $('#userImage').attr('src', '');\n $('#userInfo #userName').text('');\n }\n\n $geocropping.on('userDisconnected', userDisconnected);\n\n $geocropping.on('userConnected', userConnected);\n\n let updateUserDetails = (e, data) => {\n //console.trace('myGeocropping', 'updateUserDetails', e);\n\n $('#userImage').show();\n $('#userImage').attr('src', data.img);\n $('#userInfo #userName').text(data.display_name);\n }\n $geocropping.on('userDetailsUpdated', updateUserDetails);\n\n //console.trace('myGeocropping', geocropping.isConnected);\n\n if (geocropping.isConnected) {\n //console.trace('myGeocropping', 'test ok', geocropping.getUserDetails());\n\n userConnected();\n //updateUserDetails(null, geocropping.getUserDetails());\n } else {\n userDisconnected();\n };\n\n geocropping.createMap('map');\n\n // pour permettre le redimentionnement après la crétion de la carte leaflet\n document.getElementById('mapArea').style.width = \"auto\";\n geocropping.startLocateUser();\n});"]}
\ No newline at end of file
......@@ -19,7 +19,7 @@
"password": "ohmudohDo6",
//"port": "22",
"remote_path": "/var/www/restricted/ssh/devvdubois/www/OSM/geocropping/",
"remote_path": "/var/www/restricted/ssh/devvdubois/www/OSM/geocropping-dev/",
"ignore_regexes": [
"\\.sublime-(project|workspace)", "sftp-config(-alt\\d?)?\\.json",
"sftp-settings\\.json", "/venv/", "\\.svn/", "\\.hg/", "\\.git/",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment