Comment logging
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
parent
2a31771ac6
commit
b8f8f27794
@ -119,7 +119,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
||||
this.querySub = this.query$.pipe(skip(1), withLatestFrom(this.mapState$)).subscribe(([query,mapState]) =>{
|
||||
if(query && query.querystate) {
|
||||
let newQueryState = tassign(mapReducers.initialQueryState);
|
||||
console.debug(`Do Query`);
|
||||
//console.debug(`Do Query`);
|
||||
const urlparts=[];
|
||||
if (query.querystate.itemCode && query.querystate.itemCode != "") {
|
||||
if(query.querystate.itemType && query.querystate.itemType!= "") {
|
||||
@ -242,7 +242,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
||||
|
||||
ngOnInit() {
|
||||
this.initialized = false;
|
||||
console.debug("Init");
|
||||
//console.debug("Init");
|
||||
this.store.dispatch(new mapActions.Clear());
|
||||
this.selectedFeatures$.next({x:0,y:0,features:[]});
|
||||
this.selectedFeatures$.next(null);
|
||||
@ -314,7 +314,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
console.debug("View init");
|
||||
//console.debug("View init");
|
||||
this.noContent=true;
|
||||
this.route.children.forEach((entry) => {
|
||||
if(entry.outlet=="primary") {
|
||||
@ -348,7 +348,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
||||
})).subscribe((action) => {
|
||||
if(action) {
|
||||
this.zone.run(() => {
|
||||
console.debug("Url to state");
|
||||
//console.debug("Url to state");
|
||||
this.store.dispatch(action);
|
||||
});
|
||||
}
|
||||
@ -367,7 +367,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
||||
}
|
||||
})).subscribe((newUrlState) =>{
|
||||
if(newUrlState) {
|
||||
console.debug(`State to url`);
|
||||
//console.debug(`State to url`);
|
||||
this.replaceUrl(newUrlState.mapState,newUrlState.queryState,newUrlState.replaceUrl);
|
||||
}
|
||||
});
|
||||
@ -425,7 +425,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
||||
parts.push(mapState.baseLayerCode);
|
||||
parts.push( this.serializeService.serialize(queryState));
|
||||
|
||||
console.debug("Replace url",parts);
|
||||
//console.debug("Replace url",parts);
|
||||
this.router.navigate(parts, { replaceUrl: replace,relativeTo:this.route.parent });
|
||||
}
|
||||
}
|
||||
@ -434,7 +434,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
||||
handleOnMoveEnd(event) {
|
||||
if(this.initialized && this.viewEnabled) {
|
||||
this.zone.run(() =>{
|
||||
console.debug("Move end");
|
||||
//console.debug("Move end");
|
||||
const map = event.map;
|
||||
const view = map.getView();
|
||||
const rotation = view.getRotation();
|
||||
@ -443,7 +443,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
||||
const viewExtent = view.calculateExtent(this.map.instance.getSize());
|
||||
const mapState: IMapState = { xCenter: center[0], yCenter: center[1], zoom: zoom, rotation: rotation, baseLayerCode: null };
|
||||
const state = { mapState: mapState, viewExtent: viewExtent };
|
||||
console.debug("Center: ",center[0],center[1] );
|
||||
//console.debug("Center: ",center[0],center[1] );
|
||||
const source = from([state]);
|
||||
source.pipe(withLatestFrom(this.selectedBaseLayer$)).subscribe(([state, baselayer]) => {
|
||||
if (mapState && baselayer) { // do not react on first move
|
||||
|
@ -69,7 +69,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
|
||||
getActionFromEvent(event: IEventMessage): Action {
|
||||
let action: Action = null;
|
||||
console.debug(`${event.eventType} Event received`);
|
||||
//console.debug(`${event.eventType} Event received`);
|
||||
switch (event.eventType) {
|
||||
case "ItemChanged": {
|
||||
action = new commonActions.ItemChangedEvent(event.itemCode, event.attributes);
|
||||
@ -146,12 +146,12 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
private InstallAuthenticationEventHandler() {
|
||||
// auth event handler
|
||||
this.oauthService$.events.subscribe((event) => {
|
||||
console.debug(event.type);
|
||||
//console.debug(event.type);
|
||||
if (event.type == 'token_error' || event.type == 'silent_refresh_timeout' || event.type == 'logout') {
|
||||
const e = event as OAuthErrorEvent;
|
||||
const p = e.params as any;
|
||||
if (event.type == 'silent_refresh_timeout' || event.type == 'logout' || (p.error && p.error == 'login_required')) {
|
||||
console.debug("Session expired");
|
||||
//console.debug("Session expired");
|
||||
this.router.navigate(['loggedout'], { queryParams: { redirectTo: this.router.url } });
|
||||
}
|
||||
}
|
||||
|
@ -182,18 +182,18 @@ export class AppCommonEffects {
|
||||
ofType(appCommonActions.FAIL),
|
||||
map((action) => {
|
||||
const failAction = action as appCommonActions.Fail;
|
||||
console.debug(failAction.payload)
|
||||
//console.debug(failAction.payload)
|
||||
return null;
|
||||
})),{dispatch:false});
|
||||
|
||||
online$ = createEffect(() => this.actions$.pipe(
|
||||
ofType(appCommonActions.ONLINE),
|
||||
switchMap((action) => {
|
||||
console.debug("Online: Check token");
|
||||
//console.debug("Online: Check token");
|
||||
if(!this.oauthService$.hasValidAccessToken()) {
|
||||
console.debug("No valid token, try to refresh");
|
||||
//console.debug("No valid token, try to refresh");
|
||||
if(this.oauthService$.getRefreshToken() != null ) {
|
||||
console.debug("We have a refresh token");
|
||||
//console.debug("We have a refresh token");
|
||||
this.oauthService$.refreshToken();
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ export class PackagePreloadStrategy extends PreloadingStrategy {
|
||||
}
|
||||
if(route.data && route.data.package) {
|
||||
if(this.packageService$.hasPackage(route.data.package)) {
|
||||
console.debug(`Load module for package ${route.data.package}`)
|
||||
//console.debug(`Load module for package ${route.data.package}`)
|
||||
this.loading.add(route);
|
||||
return load()
|
||||
}
|
||||
|
@ -52,8 +52,8 @@ export function provideBootstrapEffects(effects: Type<any>[]) {
|
||||
// console.log all actions
|
||||
export function debug(reducer: ActionReducer<any>): ActionReducer<any> {
|
||||
return function(state, action) {
|
||||
console.debug('-- State', state);
|
||||
console.debug('-- Action', action);
|
||||
//console.debug('-- State', state);
|
||||
//console.debug('-- Action', action);
|
||||
|
||||
return reducer(state, action);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user