-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1085 from geonetwork/wfs-dataset-limit
Datahub: Allow to set a feature limit for WFS
- Loading branch information
Showing
28 changed files
with
737 additions
and
326 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
apps/datahub/src/app/record/record-data-preview/record-data-preview.component.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* TODO(mdc-migration): The following rule targets internal classes of tabs that may no longer apply for the MDC version. */ | ||
::ng-deep .mat-mdc-tab-labels { | ||
/* move tabs on the right to let the title show */ | ||
margin-left: 140px; | ||
} | ||
::ng-deep .mat-mdc-tab.mdc-tab { | ||
letter-spacing: 0.88px; | ||
} | ||
::ng-deep .mat-mdc-tab.mdc-tab:hover .tab-header-label { | ||
color: var(--color-primary-darkest); | ||
} | ||
::ng-deep .mat-mdc-tab.mdc-tab.mdc-tab--active .tab-header-label { | ||
opacity: 100%; | ||
font-weight: bold; | ||
} | ||
::ng-deep .mdc-tab-indicator--active .mdc-tab-indicator__content { | ||
border: none !important; | ||
} | ||
::ng-deep .mdc-tab__ripple::before { | ||
background-color: transparent !important; | ||
} | ||
@media only screen and (max-width: 639px) { | ||
/* TODO(mdc-migration): The following rule targets internal classes of tabs that may no longer apply for the MDC version. */ | ||
::ng-deep .mat-mdc-tab-labels { | ||
margin-left: 0px; | ||
} | ||
::ng-deep .mat-mdc-tab.mdc-tab { | ||
padding: 0px !important; | ||
margin-right: 24px; | ||
justify-content: left !important; | ||
} | ||
/*hide chart tab on mobile*/ | ||
::ng-deep .mat-mdc-tab.mdc-tab:nth-child(3) { | ||
display: none; | ||
} | ||
} | ||
.tab-header-label { | ||
@apply uppercase text-sm text-primary opacity-75 hover:text-primary-darker; | ||
} |
93 changes: 93 additions & 0 deletions
93
apps/datahub/src/app/record/record-data-preview/record-data-preview.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<div | ||
style="height: 612px" | ||
*ngIf="(displayMap$ | async) || (displayData$ | async)" | ||
id="preview" | ||
> | ||
<div | ||
class="bg-primary-opacity-10 pt-8 overflow-visible sm:pt-5" | ||
style="height: 512px" | ||
> | ||
<div class="container-lg px-4 lg:mx-auto"> | ||
<div> | ||
<div | ||
class="text-[28px] text-title font-title transform sm:translate-y-10" | ||
translate | ||
> | ||
record.metadata.preview | ||
</div> | ||
<mat-tab-group | ||
(selectedIndexChange)="onTabIndexChange($event)" | ||
[selectedIndex]="(displayMap$ | async) ? 0 : 1" | ||
animationDuration="200ms" | ||
mat-stretch-tabs="false" | ||
mat-align-tabs="start" | ||
> | ||
<mat-tab [disabled]="(displayMap$ | async) === false"> | ||
<ng-template mat-tab-label> | ||
<span class="tab-header-label" translate>record.tab.map</span> | ||
</ng-template> | ||
<div | ||
class="block" | ||
style="height: 500px" | ||
*ngIf="displayMap$ | async" | ||
> | ||
<gn-ui-map-view | ||
[excludeWfs]="exceedsMaxFeatureCount$ | async" | ||
></gn-ui-map-view> | ||
</div> | ||
</mat-tab> | ||
<mat-tab [disabled]="(displayData$ | async) === false"> | ||
<ng-template mat-tab-label> | ||
<span class="tab-header-label" translate>record.tab.data</span> | ||
</ng-template> | ||
<div class="block" *ngIf="displayData$ | async"> | ||
<ng-container | ||
*ngIf="exceedsMaxFeatureCount$ | async; else tableView" | ||
> | ||
<gn-ui-popup-alert | ||
type="warning" | ||
icon="matErrorOutlineOutline" | ||
class="block h-12 p-1" | ||
> | ||
<span translate [translateParams]="{ count: maxFeatureCount }" | ||
>record.feature.limit</span | ||
> | ||
</gn-ui-popup-alert> | ||
</ng-container> | ||
<ng-template #tableView> | ||
<gn-ui-data-view mode="table"></gn-ui-data-view> | ||
</ng-template> | ||
</div> | ||
</mat-tab> | ||
<mat-tab [disabled]="(displayData$ | async) === false"> | ||
<ng-template mat-tab-label> | ||
<span class="tab-header-label" translate>record.tab.chart</span> | ||
</ng-template> | ||
<div class="block" *ngIf="displayData$ | async"> | ||
<ng-container | ||
*ngIf="exceedsMaxFeatureCount$ | async; else chartView" | ||
> | ||
<gn-ui-popup-alert | ||
type="warning" | ||
icon="matErrorOutlineOutline" | ||
class="block h-12 p-1" | ||
> | ||
<span translate [translateParams]="{ count: maxFeatureCount }" | ||
>record.feature.limit</span | ||
> | ||
</gn-ui-popup-alert> | ||
</ng-container> | ||
<ng-template #chartView> | ||
<gn-ui-data-view mode="chart"></gn-ui-data-view> | ||
</ng-template> | ||
</div> | ||
</mat-tab> | ||
</mat-tab-group> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<gn-ui-data-view-share | ||
*ngIf="displayViewShare$ | async" | ||
[viewType]="selectedView$ | async" | ||
></gn-ui-data-view-share> |
Oops, something went wrong.