Skip to content

Commit

Permalink
Merge pull request #72 from betonr/master
Browse files Browse the repository at this point in the history
prepare to release 0.4.0
  • Loading branch information
betonr authored Apr 16, 2021
2 parents 4f3205f + d9a39d8 commit aab52e1
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 45 deletions.
13 changes: 13 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changes

## Version 0.4.0 (2021-04-16)

- Allow search by tile_id in check-cube page - [`#27`](https://github.com/brazil-data-cube/dc-manager/issues/27).
- Create function to set indexes bands expressions - [`#42`](https://github.com/brazil-data-cube/dc-manager/issues/42).
- Add way to select tiles individually in Region step - create cube - [`#44`](https://github.com/brazil-data-cube/dc-manager/issues/44).
- Export metadata.json after creating a cube - [`#46`](https://github.com/brazil-data-cube/dc-manager/issues/46).
- Add field STAC_URL in update and reprocess data cube - [`#47`](https://github.com/brazil-data-cube/dc-manager/issues/47).
- Sort Tiles (path row number) in check_cube page - [`#54`](https://github.com/brazil-data-cube/dc-manager/issues/54).
- Add Drone CI support - [`#55`](https://github.com/brazil-data-cube/dc-manager/issues/55).
- Add option to pass access token while configuring STAC provider - [`#61`](https://github.com/brazil-data-cube/dc-manager/issues/61).
- Add option to customize cloud masking - [`#62`](https://github.com/brazil-data-cube/dc-manager/issues/62).


## Version 0.2.0 (2020-12-04)

- Add fully support to manage data cubes using Web based user interface.
Expand Down
21 changes: 0 additions & 21 deletions build.sh

This file was deleted.

2 changes: 1 addition & 1 deletion data-cube-manager/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion data-cube-manager/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "data-cube-manager",
"version": "0.2.0",
"version": "0.4.0",
"license": "MIT",
"scripts": {
"ng": "ng",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,21 @@ <h3 mat-dialog-title>{{ getTitle() }}</h3>
</mat-form-field>
</div>

<div class="col-lg-12 col-md-12 col-sm-12">
<div class="col-lg-12 col-md-12 col-sm-12" *ngIf="!isCloud()">
<mat-form-field appearance="outline">
<mat-label>Collections</mat-label>
<input matInput formControlName="collections">
</mat-form-field>
</div>

<div class="col-lg-12 col-md-12 col-sm-12">
<div class="col-lg-12 col-md-12 col-sm-12" *ngIf="!isCloud()">
<mat-form-field appearance="outline">
<mat-label>STAC</mat-label>
<input matInput formControlName="stac_url">
</mat-form-field>
</div>

<div class="col-lg-12 col-md-12 col-sm-12">
<div class="col-lg-12 col-md-12 col-sm-12" *ngIf="!isCloud()">
<mat-form-field appearance="outline">
<mat-label>Access Token</mat-label>
<input matInput formControlName="token">
Expand All @@ -54,6 +54,12 @@ <h3 mat-dialog-title>{{ getTitle() }}</h3>
<app-map-field [form]="form" [grid]="grid" [tiles]="data.tiles"></app-map-field>
</div>
</ng-template>

<div class="col-lg-12 col-md-12 col-sm-12" *ngIf="isCloud()">
<mat-checkbox color="primary" formControlName="indexes_only_regular_cube" style="margin-left: 15px;">
<span style="font-size: 1.3em; color: #666">Generate indexes only Regular Cube</span>
</mat-checkbox>
</div>
</div>
</form>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,18 @@ export class ReprocessDialogComponent implements OnInit {
token: [''],
});

if (window['__env'].environmentVersion === 'cloud') {
if (this.isCloud()) {
this.form.addControl('bucket', new FormControl({ value: '', disabled: !this.editable }, [Validators.required]));
}

if (this.data.collections && Array.isArray(this.data.collections)) {
this.data.collections = this.data.collections.join(',');
this.form.addControl('datacube_version', new FormControl({ value: '', disabled: !this.editable }, [Validators.required]));
this.form.addControl('indexes_only_regular_cube', new FormControl({ value: '', disabled: !this.editable }, [Validators.required]));
this.form.removeControl('collections');
this.form.removeControl('stac_url');
this.form.removeControl('token');

} else {
if (this.data.collections && Array.isArray(this.data.collections)) {
this.data.collections = this.data.collections.join(',');
}
}

if (this.data.tiles && Array.isArray(this.data.tiles)) {
Expand All @@ -83,28 +89,30 @@ export class ReprocessDialogComponent implements OnInit {
async dispatch() {
if (this.form.invalid) {
return;
}
}

this.store.dispatch(showLoading());
try {
this.store.dispatch(showLoading());

const data = this.form.getRawValue();
const data = this.form.getRawValue();

data.tiles = !Array.isArray(data.tiles) ? data.tiles.split(',') : data.tiles;
data.start_date = moment(data.start_date).utc().format('YYYY-MM-DD');
data.end_date = moment(data.end_date).utc().format('YYYY-MM-DD');
data.tiles = !Array.isArray(data.tiles) ? data.tiles.split(',') : data.tiles;
data.start_date = moment(data.start_date).utc().format('YYYY-MM-DD');
data.end_date = moment(data.end_date).utc().format('YYYY-MM-DD');

let collections = data.collections;
if (!this.isCloud()) {
let collections = data.collections;

if (!this.firstRun) {
collections = this.data.collections;
}
if (!this.firstRun) {
collections = this.data.collections;
}

data.collections = !Array.isArray(collections) ? collections.split(',') : collections;
data.collections = !Array.isArray(collections) ? collections.split(',') : collections;
}

data.datacube = data.datacube;
data.force = !!this.data.force;
data.datacube = data.datacube;
data.force = !!this.data.force;

try {
await this.service.start(data);

this.snackBar.open('Update datacube has been successfully triggered.', '', {
Expand Down Expand Up @@ -134,4 +142,8 @@ export class ReprocessDialogComponent implements OnInit {
}
}

isCloud() {
return window['__env'].environmentVersion === 'cloud'
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ export class CheckCubeComponent implements OnInit {
title: `Reprocess ${this.cube.name}`,
grid: this.cube.grid,
datacube: this.cube.name,
datacube_version: this.cube.version,
tiles: [item.tile_id],
editable: false,
start_date: item.start_date,
Expand Down
Empty file.
Empty file removed deploy/.gitkeep
Empty file.

0 comments on commit aab52e1

Please sign in to comment.