Skip to content

Commit 1cccebb

Browse files
ultimas alteracoes
1 parent 3f35128 commit 1cccebb

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

src/client/src/app/components/left-side-bar/area/area.component.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ <h6 class="card-upload-analysed-table-title">
8989
</div>
9090
</div>
9191
</mat-tab>
92-
<mat-tab *ngIf="validationMobile()">
92+
<mat-tab *ngIf="validationMobile()" disabled>
9393
<ng-template mat-tab-label>
9494
<mat-icon>upload</mat-icon>
9595
{{'area.upload_submit' | translate}}
@@ -99,7 +99,7 @@ <h6 class="card-upload-analysed-table-title">
9999

100100
<app-file-upload [tooltip]="'area.upload_tooltip' | translate"
101101
[maxSizeMsg]="'area.upload_max_size_msg' | translate" [loading]="layerFromUpload.loading"
102-
[app_origin]="'app-base'" [language]="lang" [ddarea]="layerFromUpload.dragArea"
102+
[app_origin]="'app-agrotoxicos'" [language]="lang" [ddarea]="layerFromUpload.dragArea"
103103
(complete)="onFileComplete($event)">
104104
</app-file-upload>
105105

src/client/src/assets/locales/pt.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -828,8 +828,8 @@
828828
"videos_drone": "Vídeos de Drone"
829829
},
830830
"wellcome": {
831-
"title": "Boas-vindas ao WEB ATLAS DOS AGROTÓXICOS",
832-
"p1": "O objetivo do WEB ATLAS DOS AGROTÓXICOS é apresentar, de maneira interativa, a correlação entre os diferentes cartogramas do Atlas “Geografia do Uso de Agrotóxicos no Brasil e Conexões com a União Europeia”, permitindo ao usuário, sempre que possível, sobrepor camadas.",
831+
"title": "Boas-vindas ao ATLAS BRASILEIRO DE AGROTÓXICOS",
832+
"p1": "O objetivo do ATLAS BRASILEIRO DE AGROTÓXICOS é apresentar, de maneira interativa, a correlação entre os diferentes cartogramas do Atlas “Geografia do Uso de Agrotóxicos no Brasil e Conexões com a União Europeia”, permitindo ao usuário, sempre que possível, sobrepor camadas.",
833833
"p2": "Com estas sobreposições, ficam ainda mais claras as interações entre diversos indicadores associados a problemas socioambientais, como, por exemplo: o aumento do desmatamento, os conflitos agrários, as intoxicações por agrotóxicos de uso agrícola, o avanço de algumas culturas e a diminuição da área destinada à produção de alguns alimentos que tradicionalmente compõem a dieta brasileira, dentre outros."
834834
}
835835
}

src/server/controllers/upload.js

+9-5
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ module.exports = function (app) {
2323

2424
/**
2525
Directory where the code will to put tmp files**/
26-
Internal.dirUpload = config.uploadDataDir;
26+
27+
Internal.dirUpload = config.uploadDir;
2728

2829
Internal.targetFilesName = null;
2930
Internal.dirTarget = null;
@@ -88,6 +89,7 @@ module.exports = function (app) {
8889
Internal.extractFiles = async function (zip, callback) {
8990
let countShps = 0;
9091
try {
92+
9193
for await (const entry of zip) {
9294
const arrayName = entry.path.split(".");
9395
const fileName = arrayName[0];
@@ -135,9 +137,9 @@ module.exports = function (app) {
135137
time +
136138
"." +
137139
extension;
138-
140+
139141
let file = fs.createWriteStream(target_path);
140-
142+
141143
entry.pipe(file);
142144

143145
if (Internal.spatialFiles.includes(extension)) {
@@ -152,7 +154,7 @@ module.exports = function (app) {
152154
console.error("FILE: ", Internal.targetFilesName, " | ERROR: ", e.stack);
153155
fs.unlinkSync(Internal.tmpPath);
154156
}
155-
157+
156158
if (!fs.existsSync(Internal.targetFilesName)) {
157159
Internal.response.status(400).send(languageJson['upload_messages']['no_spatial_file'][Internal.language]);
158160
fs.unlinkSync(Internal.tmpPath);
@@ -176,7 +178,7 @@ module.exports = function (app) {
176178
return;
177179
}
178180
let geoJson = JSON.parse(data)
179-
181+
180182
let token = Internal.saveToPostGis(geoJson);
181183
geoJson.token = token;
182184

@@ -258,6 +260,7 @@ module.exports = function (app) {
258260
}
259261

260262
Internal.saveToPostGis = function (geojson) {
263+
261264
let token = new Date().getTime()
262265
Internal.geojson = geojson;
263266
Internal.import_feature(token)
@@ -266,6 +269,7 @@ module.exports = function (app) {
266269
};
267270

268271
Internal.doRequest = function (request, response) {
272+
269273
/** Reset Variables */
270274
Internal.targetFilesName = null;
271275
Internal.dirTarget = null;

0 commit comments

Comments
 (0)