diff --git a/src/app/modules/core/core.module.ts b/src/app/modules/core/core.module.ts index f1369a1e..dd3fa52c 100644 --- a/src/app/modules/core/core.module.ts +++ b/src/app/modules/core/core.module.ts @@ -34,9 +34,10 @@ import { ContactComponent } from './contact/contact.component'; import { NewVisContainerComponent } from './new-vis-container/new-vis-container.component'; import { NewVisComponent } from './new-vis/new-vis.component'; import { VisFormComponent } from './vis-form/vis-form.component'; +import { DownloadComponent } from './filter/download/download.component'; @NgModule({ - declarations: [FilterContainerComponent, SearchComponent, SearchContainerComponent, PhenomenonComponent, NavContainerComponent, NavRightComponent, BottomBarContainerComponent, DatepickerComponent, FilterSwitcherComponent, FilterComponent, ImpressumComponent, PhenoInfoComponent, PhenoInfoModalComponent, VisContainerComponent, VisComponent, FilterContainerValuesComponent, FilterValuesComponent, DatetimeModalContainerComponent, DatetimeModalComponent, SidebarMenuComponent, SidebarMenuItemsComponent, AboutComponent, PrivacyComponent, SidebarBreadcrumbsComponent, ContactComponent, NewVisContainerComponent, NewVisComponent, VisFormComponent], + declarations: [FilterContainerComponent, SearchComponent, SearchContainerComponent, PhenomenonComponent, NavContainerComponent, NavRightComponent, BottomBarContainerComponent, DatepickerComponent, FilterSwitcherComponent, FilterComponent, ImpressumComponent, PhenoInfoComponent, PhenoInfoModalComponent, VisContainerComponent, VisComponent, FilterContainerValuesComponent, FilterValuesComponent, DatetimeModalContainerComponent, DatetimeModalComponent, SidebarMenuComponent, SidebarMenuItemsComponent, AboutComponent, PrivacyComponent, SidebarBreadcrumbsComponent, ContactComponent, NewVisContainerComponent, NewVisComponent, VisFormComponent, DownloadComponent], imports: [ CommonModule, RouterModule, diff --git a/src/app/modules/core/filter/download/download.component.html b/src/app/modules/core/filter/download/download.component.html new file mode 100644 index 00000000..f004c038 --- /dev/null +++ b/src/app/modules/core/filter/download/download.component.html @@ -0,0 +1,171 @@ +
+
+ + Primar lorem ipsum dolor sit amet, consectetur + adipiscing elit lorem ipsum dolor. Pellentesque risus mi, tempus quis placerat ut, porta nec nulla. + Vestibulum rhoncus ac ex sit amet fringilla. Nullam gravida purus diam, et dictum felis venenatis efficitur. +
+
+ + + +
+ +
+
+ +
+
+
+ +
+ +
+
+ +
+
+
+ +
+ +
+
+ +
+
+
+ +
+ +
+ +
+ +
+
+ + +
+
+
+ + +
+
\ No newline at end of file diff --git a/src/app/modules/core/filter/download/download.component.scss b/src/app/modules/core/filter/download/download.component.scss new file mode 100644 index 00000000..459587c6 --- /dev/null +++ b/src/app/modules/core/filter/download/download.component.scss @@ -0,0 +1,32 @@ +@import '../../../../../styles/variables.scss'; + +.download-container { + height: 75vh; + overflow: auto; +} + +.panel-header { + display: flex; +} + +.panel-header-text { + flex-grow: 1; +} + +.options-container { + width: 100%; + + .options-row { + width: 100%; + display: flex; + justify-content: space-around; + + .option-item { + flex-grow: 1; + } + } +} + +.grow { + flex-grow: 1; +} \ No newline at end of file diff --git a/src/app/modules/core/filter/download/download.component.spec.ts b/src/app/modules/core/filter/download/download.component.spec.ts new file mode 100644 index 00000000..ad71a7ca --- /dev/null +++ b/src/app/modules/core/filter/download/download.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DownloadComponent } from './download.component'; + +describe('DownloadComponent', () => { + let component: DownloadComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ DownloadComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(DownloadComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/modules/core/filter/download/download.component.ts b/src/app/modules/core/filter/download/download.component.ts new file mode 100644 index 00000000..b89f1be4 --- /dev/null +++ b/src/app/modules/core/filter/download/download.component.ts @@ -0,0 +1,45 @@ +import { Component, Input, OnInit } from '@angular/core'; + +@Component({ + selector: 'osem-download', + templateUrl: './download.component.html', + styleUrls: ['./download.component.scss'] +}) +export class DownloadComponent { + + collapsed: boolean = false; + + downloadDetails = { + window: 'raw', + operation: 'arithmeticMean', + boxId: true, + lat: true, + lng: true, + height: false, + boxName: true, + exposure: false, + unit: true, + value: true, + createdAt: true, + phenomenon: false, + sensorId: false, + sensorType: false, + format: 'csv' + }; + + windows = ['raw', '10m', '1h', '1d']; + operations = ['arithmeticMean', 'harmonicMean', 'geometricMean', 'min', 'max', 'mode', 'median', 'variance', 'rootMeanSquare', 'standardDeviation', 'sum']; + + expand() { + this.collapsed = !this.collapsed; + } + + selectFormat(format: string) { + this.downloadDetails.format = format; + } + + download() { + alert(JSON.stringify(this.downloadDetails, null, 2)); + } + +} diff --git a/src/app/modules/core/filter/filter-container/filter-container.component.scss b/src/app/modules/core/filter/filter-container/filter-container.component.scss index 49854ccc..33da6f8e 100644 --- a/src/app/modules/core/filter/filter-container/filter-container.component.scss +++ b/src/app/modules/core/filter/filter-container/filter-container.component.scss @@ -1,7 +1,7 @@ @import '../../../../../styles/variables.scss'; .filter-container { - + height: 100vh; .filter-inner { background: var(--background-primary-full); box-shadow: var(--box-shadow-basic); diff --git a/src/app/modules/core/filter/filter-switcher/filter-switcher.component.html b/src/app/modules/core/filter/filter-switcher/filter-switcher.component.html index ece068ae..176e1ceb 100644 --- a/src/app/modules/core/filter/filter-switcher/filter-switcher.component.html +++ b/src/app/modules/core/filter/filter-switcher/filter-switcher.component.html @@ -6,12 +6,18 @@ {{'PHENOMENA' | translate}} -
  • +
  • {{'FILTER' | translate}}
  • +
  • + + + {{'DATADOWNLOAD' | translate}} + +