Set appropiate log levels
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
This commit is contained in:
parent
9ebce8e0bb
commit
6ba1d39d31
@ -71,7 +71,7 @@ export class MapEffects {
|
|||||||
startSearch$: Observable<Action> = this.actions$.pipe(
|
startSearch$: Observable<Action> = this.actions$.pipe(
|
||||||
ofType(mapActions.STARTSEARCH),
|
ofType(mapActions.STARTSEARCH),
|
||||||
switchMap((action: mapActions.StartSearch) => {
|
switchMap((action: mapActions.StartSearch) => {
|
||||||
console.log("Start search");
|
console.debug("Start search");
|
||||||
var startDate = action.queryState.startDate;
|
var startDate = action.queryState.startDate;
|
||||||
var endDate = action.queryState.endDate;
|
var endDate = action.queryState.endDate;
|
||||||
var newAction;
|
var newAction;
|
||||||
|
@ -268,7 +268,7 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
|
|||||||
}
|
}
|
||||||
var selectedBaseLayer: IItemLayer = null;
|
var selectedBaseLayer: IItemLayer = null;
|
||||||
var mapState = tassign(state.mapState);
|
var mapState = tassign(state.mapState);
|
||||||
console.log(`Base layerload: ${mapState.baseLayerCode}`)
|
console.debug(`Base layerload: ${mapState.baseLayerCode}`)
|
||||||
if (baseLayers.length > 0 && mapState.baseLayerCode != "") {
|
if (baseLayers.length > 0 && mapState.baseLayerCode != "") {
|
||||||
selectedBaseLayer = baseLayers.filter(layer => layer.item.code === mapState.baseLayerCode)[0];
|
selectedBaseLayer = baseLayers.filter(layer => layer.item.code === mapState.baseLayerCode)[0];
|
||||||
selectedBaseLayer.visible = true;
|
selectedBaseLayer.visible = true;
|
||||||
|
@ -24,7 +24,7 @@ export class GeolocationService {
|
|||||||
observer.next(position);
|
observer.next(position);
|
||||||
},
|
},
|
||||||
(error: PositionError) => {
|
(error: PositionError) => {
|
||||||
console.log('Geolocation service: ' + error.message);
|
console.debug('Geolocation service: ' + error.message);
|
||||||
observer.error(error);
|
observer.error(error);
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -51,7 +51,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
getActionFromEvent(event: IEventMessage): Action {
|
getActionFromEvent(event: IEventMessage): Action {
|
||||||
var action: Action = null;
|
var action: Action = null;
|
||||||
console.log(`${event.eventType} Event received`);
|
console.debug(`${event.eventType} Event received`);
|
||||||
switch (event.eventType) {
|
switch (event.eventType) {
|
||||||
case "ItemChanged": {
|
case "ItemChanged": {
|
||||||
action = new commonActions.ItemChangedEvent(event.itemCode, event.attributes);
|
action = new commonActions.ItemChangedEvent(event.itemCode, event.attributes);
|
||||||
|
@ -106,7 +106,7 @@ export class AppCommonEffects {
|
|||||||
ofType(appCommonActions.FAIL),
|
ofType(appCommonActions.FAIL),
|
||||||
map((action) => {
|
map((action) => {
|
||||||
let failAction = action as appCommonActions.Fail;
|
let failAction = action as appCommonActions.Fail;
|
||||||
console.log(failAction.payload)
|
console.debug(failAction.payload)
|
||||||
return null;
|
return null;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -21,13 +21,13 @@ export function appConfigFactory(injector:Injector, appConfig: AppConfig, oauthS
|
|||||||
return (): Promise<any> => {
|
return (): Promise<any> => {
|
||||||
return appConfig.load().then(() => {
|
return appConfig.load().then(() => {
|
||||||
oauthService.events.subscribe((event) => {
|
oauthService.events.subscribe((event) => {
|
||||||
console.log(event.type);
|
console.debug(event.type);
|
||||||
if (event.type == 'token_error' || event.type == 'silent_refresh_timeout') {
|
if (event.type == 'token_error' || event.type == 'silent_refresh_timeout') {
|
||||||
let e = event as OAuthErrorEvent;
|
let e = event as OAuthErrorEvent;
|
||||||
let p = e.params as any;
|
let p = e.params as any;
|
||||||
if (event.type == 'silent_refresh_timeout' || (p.error && p.error == 'login_required')) {
|
if (event.type == 'silent_refresh_timeout' || (p.error && p.error == 'login_required')) {
|
||||||
let router = injector.get(Router);
|
let router = injector.get(Router);
|
||||||
console.log("Session expired");
|
console.debug("Session expired");
|
||||||
router.navigate(['loggedout'], { queryParams: { redirectTo: router.url } });
|
router.navigate(['loggedout'], { queryParams: { redirectTo: router.url } });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ export class AppConfig {
|
|||||||
|
|
||||||
public getConfig(key: any) {
|
public getConfig(key: any) {
|
||||||
if (!this.config.hasOwnProperty(key)) {
|
if (!this.config.hasOwnProperty(key)) {
|
||||||
console.log(`Config key ${key} not set`);
|
console.error(`Config key ${key} not set`);
|
||||||
}
|
}
|
||||||
return this.config[key];
|
return this.config[key];
|
||||||
}
|
}
|
||||||
|
@ -23,10 +23,4 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!--<div class="card menu-card">
|
|
||||||
<ul class="navbar-nav">
|
|
||||||
<li class="nav-item py-0"><a class="nav-link" href="#" (click)="handlePredefinedQuery($event,{itemType:'vnd.farmmaps.itemtype.croppingscheme'})"><span i18n>Farms</span></a></li>
|
|
||||||
<li class="nav-item py-0"><a class="nav-link" href="#" (click)="handlePredefinedQuery($event,{itemType:'vnd.farmmaps.itemtype.layer'})"><span i18n>Layers</span></a></li>
|
|
||||||
</ul>
|
|
||||||
</div>-->
|
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user