Skip to content

Commit

Permalink
Merge pull request #68 from lapig-ufg/feature/statistics_improvements
Browse files Browse the repository at this point in the history
Feature/statistics improvements
  • Loading branch information
James-jamames authored Apr 4, 2024
2 parents e9f0ccf + 1f0c6e1 commit c2cd0cb
Show file tree
Hide file tree
Showing 25 changed files with 225 additions and 273 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export class FileUploadComponent implements OnInit {
ngOnInit() { }

onClick() {
// console.log(this.language)
// this.target = '/service/upload/spatial-file' + "?lang="
let self = this;

Expand Down Expand Up @@ -260,7 +259,6 @@ export class FileUploadComponent implements OnInit {
canCancel: true
});
}
// console.log('... file[' + i + '].name = ' + file.name);
}
}

Expand All @@ -277,18 +275,13 @@ export class FileUploadComponent implements OnInit {
canRetry: false,
canCancel: true
});
// console.log(
// '... file[' + i + '].name = ' + ev.dataTransfer.files[i].name
// );
}
}

this.uploadFiles();
}

dragOverHandler(ev: DragEvent) {
// console.log('File(s) in drop zone');

// Prevent default behavior (Prevent file from being opened)
ev.preventDefault();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -987,9 +987,8 @@ export class GeneralMapComponent implements OnInit, Ruler, AfterContentChecked {
}

changeLayerVisibility(ev) {

let { layer, updateSource } = ev;
//console.log('event: ' + JSON.stringify(layer))

const layerType: DescriptorType = layer;

if (updateSource) {
Expand All @@ -1015,7 +1014,7 @@ export class GeneralMapComponent implements OnInit, Ruler, AfterContentChecked {
this.handleLayersLegend(type);
}
});
//console.log(this.OlLayers, layerType.valueType)

this.OlLayers[layerType.valueType].setVisible(layerType.visible);

this.handleLayersLegend(layerType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import Map from 'ol/Map';
import { EventEmitter } from '@angular/core';
import TileLayer from 'ol/layer/Tile';
import { XYZ } from 'ol/source';
import { GeneralMapComponent } from '../general-map.component';

@Component({
selector: 'app-swipe',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,6 @@ export class AreaComponent implements OnInit {
let result = await this.areaService.getSavedAnalysis(params.join('&')).toPromise()

if (typeof result === 'object' && result !== null) {
//console.log('result ', result)
this.chartsArea = [...result.pasture, ...result.pasture_quality]
this.layerFromConsulta.analyzedArea = result;
}
Expand Down Expand Up @@ -567,7 +566,6 @@ export class AreaComponent implements OnInit {
this.job.token = data.token;
this.job.area = data.area;
this.areaService.saveJob(this.job).subscribe(result => {
//console.log(result)
this.displayFormJob = false;
if (data.features.length > 1) {
this.layerFromUpload.loading = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
</div>
<ul #leftSidebar class="nav-list">
<drag-scroll class="nav-list-drag" [scrollbar-hidden]="true" [drag-scroll-x-disabled]="true">
<!-- Filters Menu -->
<li (click)="onFilter()">
<div pRipple [pTooltip]="open ? '' : 'menu.filters_tooltip' | translate "
[class]="showFilter ? 'menu-active' : ''">
<i class='fg-map-search'></i>
<span class="links_namez">{{'menu.filters' | translate}}</span>
<span class="links_name">{{'menu.filters' | translate}}</span>
</div>
</li>
<!-- Others Menus -->
<li *ngFor="let item of menu">
<div pRipple [pTooltip]="open ? '' : 'menu.'+item.key+'_tooltip' | translate " (click)="handleMenu(item)"
[class]="handleMenuActive(item)">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,6 @@ export class LeftSideBarComponent implements AfterViewInit {
}

onChangeLimit(limit, event) {
//console.log("limit: ", limit);
//console.log("event: ", event);

this.limits.map((l) => {
l.checked = limit.get('key') === l.get('key');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,35 @@ <h5 class="chart-region inline"> {{selectRegion.text}}</h5>
</div>
</div>
<div *ngIf="cardsToDisplay.resumo">
<div [class]="expandGroups.resumo ? 'group-card group-card-active' :'group-card'">
<div (click)="expandGroups.resumo = !expandGroups.resumo" class="abstract">
<div [class]="expandGroups.summary ? 'group-card group-card-active' :'group-card'">
<div (click)="expandGroups.summary = !expandGroups.summary" class="abstract">
<span>
<i class='bx bx-trending-up'></i>
<div class="group-label">{{'right_sidebar.cards_titles.resumoTitle' | translate}}</div>
</span>
<i [class]="expandGroups.resumo ? 'bx bxs-up-arrow-circle' :'bx bxs-down-arrow-circle'"></i>
<i [class]="expandGroups.summary ? 'bx bxs-up-arrow-circle' :'bx bxs-down-arrow-circle'"></i>
</div>
<div class="details">
<div class="details-inner" *ngIf="infoResumo">
<div class="details-inner" *ngIf="infoSummary">
<div class="resumo-container">
<div class="resumo-card">
<div class="resumo-card-title">{{'right_sidebar.region_types.'+selectRegion.type | translate}}</div>
<div class="resumo-card-content">{{selectRegion.text}}</div>
</div>
<div class="resumo-card">
<div class="resumo-card-title">{{'right_sidebar.resumo_card.area_region' | translate}}</div>
<div class="resumo-card-content">{{infoResumo.region.area | number:'1.2-3' }} ha</div>
<div class="resumo-card-content">{{infoSummary.region.area | number:'1.2-3' }} ha</div>
</div>
<div class="resumo-card">
<div class="resumo-card-title">{{'right_sidebar.resumo_card.area_pastagem' | translate}}</div>
<div class="resumo-card-content">{{infoResumo.pasture.area | number:'1.2-3' }} ha
({{infoResumo.pasture.percentOfRegionArea}}
<div class="resumo-card-content">{{infoSummary.pasture.area | number:'1.2-3' }} ha
({{infoSummary.pasture.percentOfRegionArea}}
{{'right_sidebar.resumo_card.complement_text' | translate}} {{selectRegion.text}})</div>
</div>
<div class="resumo-card" *ngIf="infoResumo.pasture_quality.length > 0">
<div class="resumo-card" *ngIf="infoSummary.pasture_quality.length > 0">
<div class="resumo-card-title">{{'right_sidebar.resumo_card.pasture_quality_title' | translate}}</div>
<div class="resumo-card-content">
<div class="resumo-card-content" *ngFor="let cl of infoResumo.pasture_quality"
<div class="resumo-card-content" *ngFor="let cl of infoSummary.pasture_quality"
[style]="'border-radius: 5px; margin: 5px; background: ' + cl.color">
<div class="resumo-card-title-content">{{cl.classe}}</div>
<div class="resumo-card-content">{{cl.value | number:'1.2-3'}} ha ({{cl.percentAreaPasture}}
Expand All @@ -56,22 +56,22 @@ <h5 class="chart-region inline"> {{selectRegion.text}}</h5>
</div>
</div>
</div>
<div *ngIf="cardsToDisplay.area1">
<div [class]="expandGroups.area1 ? 'group-card group-card-active' :'group-card'">
<div (click)="expandGroups.area1 = !expandGroups.area1" class="abstract">
<div *ngIf="cardsToDisplay.pastureGraph">
<div [class]="expandGroups.pastureGraph ? 'group-card group-card-active' :'group-card'">
<div (click)="expandGroups.pastureGraph = !expandGroups.pastureGraph" class="abstract">
<span>
<i class='bx bx-trending-up'></i>
<div class="group-label">{{'right_sidebar.cards_titles.area1Title' | translate}}</div>
<div class="group-label">{{'right_sidebar.cards_titles.pastureGraphTitle' | translate}}</div>
</span>
<i [class]="expandGroups.area1 ? 'bx bxs-up-arrow-circle' :'bx bxs-down-arrow-circle'"></i>
<i [class]="expandGroups.pastureGraph ? 'bx bxs-up-arrow-circle' :'bx bxs-down-arrow-circle'"></i>
</div>
<div class="details">
<div class="details-inner">
<div *ngIf="chartsArea1.length! <= 0" class="loader-container">
<div *ngIf="pastureGraphCharts.length! <= 0" class="loader-container">
<div class="loader"></div>
</div>
<p-tabView *ngIf="chartsArea1.length! > 0">
<p-tabPanel header="{{chart.title}}" *ngFor="let chart of chartsArea1 ; let i = index" [selected]="i == 0"
<p-tabView *ngIf="pastureGraphCharts.length! > 0">
<p-tabPanel header="{{chart.title}}" *ngFor="let chart of pastureGraphCharts ; let i = index" [selected]="i == 0"
[disabled]="!chart.show" [headerStyle]="{'font-size': 'small'}">
<div class="margin">
<button class="matButton" color="primary" (click)="openCharts(chart)" mat-icon-button>
Expand Down
Loading

0 comments on commit c2cd0cb

Please sign in to comment.