[3.0] Minor fix (#2615)
* Improvement tenant setting from mobile view * Improvement timewindow setting from mobile view * Improvement entity-view setting from mobile view * Update license header and license config
This commit is contained in:
parent
88ff9f4d19
commit
612a8c7dd1
3
pom.xml
3
pom.xml
@ -320,12 +320,15 @@
|
|||||||
<exclude>docker/haproxy/**</exclude>
|
<exclude>docker/haproxy/**</exclude>
|
||||||
<exclude>docker/tb-node/**</exclude>
|
<exclude>docker/tb-node/**</exclude>
|
||||||
<exclude>ui/**</exclude>
|
<exclude>ui/**</exclude>
|
||||||
|
<exclude>src/browserslist</exclude>
|
||||||
|
<exclude>**/*.raw</exclude>
|
||||||
</excludes>
|
</excludes>
|
||||||
<mapping>
|
<mapping>
|
||||||
<proto>JAVADOC_STYLE</proto>
|
<proto>JAVADOC_STYLE</proto>
|
||||||
<cql>DOUBLEDASHES_STYLE</cql>
|
<cql>DOUBLEDASHES_STYLE</cql>
|
||||||
<scss>JAVADOC_STYLE</scss>
|
<scss>JAVADOC_STYLE</scss>
|
||||||
<jsx>SLASHSTAR_STYLE</jsx>
|
<jsx>SLASHSTAR_STYLE</jsx>
|
||||||
|
<tsx>SLASHSTAR_STYLE</tsx>
|
||||||
<conf>SCRIPT_STYLE</conf>
|
<conf>SCRIPT_STYLE</conf>
|
||||||
<gradle>JAVADOC_STYLE</gradle>
|
<gradle>JAVADOC_STYLE</gradle>
|
||||||
</mapping>
|
</mapping>
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
|
|
||||||
-->
|
-->
|
||||||
<div class="tb-details-buttons">
|
<div class="tb-details-buttons" fxLayout.xs="column">
|
||||||
<button mat-raised-button color="primary"
|
<button mat-raised-button color="primary"
|
||||||
[disabled]="(isLoading$ | async)"
|
[disabled]="(isLoading$ | async)"
|
||||||
(click)="onEntityAction($event, 'manageTenantAdmins')"
|
(click)="onEntityAction($event, 'manageTenantAdmins')"
|
||||||
@ -28,7 +28,7 @@
|
|||||||
[fxShow]="!hideDelete() && !isEdit">
|
[fxShow]="!hideDelete() && !isEdit">
|
||||||
{{'tenant.delete' | translate }}
|
{{'tenant.delete' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<div fxLayout="row">
|
<div fxLayout="row" fxLayout.xs="column">
|
||||||
<button mat-raised-button
|
<button mat-raised-button
|
||||||
ngxClipboard
|
ngxClipboard
|
||||||
(cbOnSuccess)="onTenantIdCopied($event)"
|
(cbOnSuccess)="onTenantIdCopied($event)"
|
||||||
|
|||||||
@ -18,11 +18,10 @@ import { Component, Inject } from '@angular/core';
|
|||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { AppState } from '@core/core.state';
|
import { AppState } from '@core/core.state';
|
||||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||||
import { Customer } from '@shared/models/customer.model';
|
import { Tenant } from '@app/shared/models/tenant.model';
|
||||||
import {Tenant} from '@app/shared/models/tenant.model';
|
import { ActionNotificationShow } from '@app/core/notification/notification.actions';
|
||||||
import {ActionNotificationShow} from '@app/core/notification/notification.actions';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import {TranslateService} from '@ngx-translate/core';
|
import { ContactBasedComponent } from '../../components/entity/contact-based.component';
|
||||||
import {ContactBasedComponent} from '../../components/entity/contact-based.component';
|
|
||||||
import { EntityTableConfig } from '@home/models/entity/entities-table-config.models';
|
import { EntityTableConfig } from '@home/models/entity/entities-table-config.models';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|||||||
@ -17,9 +17,9 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { SharedModule } from '@shared/shared.module';
|
import { SharedModule } from '@shared/shared.module';
|
||||||
import {TenantComponent} from '@modules/home/pages/tenant/tenant.component';
|
import { TenantComponent } from '@modules/home/pages/tenant/tenant.component';
|
||||||
import {TenantRoutingModule} from '@modules/home/pages/tenant/tenant-routing.module';
|
import { TenantRoutingModule } from '@modules/home/pages/tenant/tenant-routing.module';
|
||||||
import {HomeComponentsModule} from '@modules/home/components/home-components.module';
|
import { HomeComponentsModule } from '@modules/home/components/home-components.module';
|
||||||
import { TenantTabsComponent } from '@home/pages/tenant/tenant-tabs.component';
|
import { TenantTabsComponent } from '@home/pages/tenant/tenant-tabs.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|||||||
@ -27,14 +27,9 @@ import {
|
|||||||
import { TenantService } from '@core/http/tenant.service';
|
import { TenantService } from '@core/http/tenant.service';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { DatePipe } from '@angular/common';
|
import { DatePipe } from '@angular/common';
|
||||||
import {
|
import { EntityType, entityTypeResources, entityTypeTranslations } from '@shared/models/entity-type.models';
|
||||||
EntityType,
|
|
||||||
entityTypeResources,
|
|
||||||
entityTypeTranslations
|
|
||||||
} from '@shared/models/entity-type.models';
|
|
||||||
import { TenantComponent } from '@modules/home/pages/tenant/tenant.component';
|
import { TenantComponent } from '@modules/home/pages/tenant/tenant.component';
|
||||||
import { EntityAction } from '@home/models/entity/entity-component.models';
|
import { EntityAction } from '@home/models/entity/entity-component.models';
|
||||||
import { User } from '@shared/models/user.model';
|
|
||||||
import { TenantTabsComponent } from '@home/pages/tenant/tenant-tabs.component';
|
import { TenantTabsComponent } from '@home/pages/tenant/tenant-tabs.component';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
|
|||||||
@ -0,0 +1,21 @@
|
|||||||
|
/**
|
||||||
|
* Copyright © 2016-2020 The Thingsboard Authors
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
:host ::ng-deep {
|
||||||
|
.mat-form-field-infix {
|
||||||
|
width: auto;
|
||||||
|
min-width: 100px;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -30,7 +30,7 @@ import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'tb-entity-autocomplete',
|
selector: 'tb-entity-autocomplete',
|
||||||
templateUrl: './entity-autocomplete.component.html',
|
templateUrl: './entity-autocomplete.component.html',
|
||||||
styleUrls: [],
|
styleUrls: ['./entity-autocomplete.component.scss'],
|
||||||
providers: [{
|
providers: [{
|
||||||
provide: NG_VALUE_ACCESSOR,
|
provide: NG_VALUE_ACCESSOR,
|
||||||
useExisting: forwardRef(() => EntityAutocompleteComponent),
|
useExisting: forwardRef(() => EntityAutocompleteComponent),
|
||||||
|
|||||||
@ -14,14 +14,14 @@
|
|||||||
/// limitations under the License.
|
/// limitations under the License.
|
||||||
///
|
///
|
||||||
|
|
||||||
import {AfterViewInit, Component, forwardRef, Input, OnInit} from '@angular/core';
|
import { AfterViewInit, Component, forwardRef, Input, OnInit } from '@angular/core';
|
||||||
import {ControlValueAccessor, FormBuilder, FormGroup, NG_VALUE_ACCESSOR} from '@angular/forms';
|
import { ControlValueAccessor, FormBuilder, FormGroup, NG_VALUE_ACCESSOR } from '@angular/forms';
|
||||||
import {Store} from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import {AppState} from '@app/core/core.state';
|
import { AppState } from '@app/core/core.state';
|
||||||
import {TranslateService} from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import {AliasEntityType, EntityType, entityTypeTranslations} from '@app/shared/models/entity-type.models';
|
import { AliasEntityType, EntityType, entityTypeTranslations } from '@app/shared/models/entity-type.models';
|
||||||
import {EntityService} from '@core/http/entity.service';
|
import { EntityService } from '@core/http/entity.service';
|
||||||
import {coerceBooleanProperty} from '@angular/cdk/coercion';
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'tb-entity-type-select',
|
selector: 'tb-entity-type-select',
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2016-2019 The Thingsboard Authors
|
* Copyright © 2016-2020 The Thingsboard Authors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -13,7 +13,6 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import ThingsboardBaseComponent from './json-form-base-component';
|
import ThingsboardBaseComponent from './json-form-base-component';
|
||||||
import reactCSS from 'reactcss';
|
import reactCSS from 'reactcss';
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2016-2019 The Thingsboard Authors
|
* Copyright © 2016-2020 The Thingsboard Authors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2016-2019 The Thingsboard Authors
|
* Copyright © 2016-2020 The Thingsboard Authors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2016-2019 The Thingsboard Authors
|
* Copyright © 2016-2020 The Thingsboard Authors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2016-2019 The Thingsboard Authors
|
* Copyright © 2016-2020 The Thingsboard Authors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2016-2019 The Thingsboard Authors
|
* Copyright © 2016-2020 The Thingsboard Authors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2016-2019 The Thingsboard Authors
|
* Copyright © 2016-2020 The Thingsboard Authors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2016-2019 The Thingsboard Authors
|
* Copyright © 2016-2020 The Thingsboard Authors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@ -1,3 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* Copyright © 2016-2020 The Thingsboard Authors
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { JsonFormFieldProps, JsonFormFieldState } from '@shared/components/json-form/react/json-form.models';
|
import { JsonFormFieldProps, JsonFormFieldState } from '@shared/components/json-form/react/json-form.models';
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2016-2019 The Thingsboard Authors
|
* Copyright © 2016-2020 The Thingsboard Authors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2016-2019 The Thingsboard Authors
|
* Copyright © 2016-2020 The Thingsboard Authors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2016-2019 The Thingsboard Authors
|
* Copyright © 2016-2020 The Thingsboard Authors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2016-2019 The Thingsboard Authors
|
* Copyright © 2016-2020 The Thingsboard Authors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2016-2019 The Thingsboard Authors
|
* Copyright © 2016-2020 The Thingsboard Authors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@ -1,3 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* Copyright © 2016-2020 The Thingsboard Authors
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { JsonFormFieldProps, JsonFormFieldState } from '@shared/components/json-form/react/json-form.models';
|
import { JsonFormFieldProps, JsonFormFieldState } from '@shared/components/json-form/react/json-form.models';
|
||||||
import FormControlLabel from '@material-ui/core/FormControlLabel';
|
import FormControlLabel from '@material-ui/core/FormControlLabel';
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2016-2019 The Thingsboard Authors
|
* Copyright © 2016-2020 The Thingsboard Authors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -13,7 +13,6 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import ThingsboardBaseComponent from './json-form-base-component';
|
import ThingsboardBaseComponent from './json-form-base-component';
|
||||||
import Select, {Option} from 'rc-select';
|
import Select, {Option} from 'rc-select';
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2016-2019 The Thingsboard Authors
|
* Copyright © 2016-2020 The Thingsboard Authors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2016-2019 The Thingsboard Authors
|
* Copyright © 2016-2020 The Thingsboard Authors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@ -1,3 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* Copyright © 2016-2020 The Thingsboard Authors
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import {
|
import {
|
||||||
JsonFormFieldProps,
|
JsonFormFieldProps,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2016-2019 The Thingsboard Authors
|
* Copyright © 2016-2020 The Thingsboard Authors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
-->
|
-->
|
||||||
<section fxLayout="column" fxLayoutAlign="start start">
|
<section fxLayout="column" fxLayoutAlign="start start">
|
||||||
<section fxLayout="row" fxLayoutAlign="start start" fxLayoutGap="16px">
|
<section fxLayout="row" fxLayout.xs="row wrap" fxLayoutAlign="start start" fxLayoutGap="16px">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-placeholder translate>datetime.date-from</mat-placeholder>
|
<mat-placeholder translate>datetime.date-from</mat-placeholder>
|
||||||
<mat-datetimepicker-toggle [for]="startDatePicker" matPrefix></mat-datetimepicker-toggle>
|
<mat-datetimepicker-toggle [for]="startDatePicker" matPrefix></mat-datetimepicker-toggle>
|
||||||
@ -30,7 +30,7 @@
|
|||||||
<input matInput [disabled]="disabled" [(ngModel)]="startDate" [matDatetimepicker]="startTimePicker" (ngModelChange)="onStartDateChange()">
|
<input matInput [disabled]="disabled" [(ngModel)]="startDate" [matDatetimepicker]="startTimePicker" (ngModelChange)="onStartDateChange()">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</section>
|
</section>
|
||||||
<section fxLayout="row" fxLayoutAlign="start start" fxLayoutGap="16px">
|
<section fxLayout="row" fxLayout.xs="row wrap" fxLayoutAlign="start start" fxLayoutGap="16px">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-placeholder translate>datetime.date-to</mat-placeholder>
|
<mat-placeholder translate>datetime.date-to</mat-placeholder>
|
||||||
<mat-datetimepicker-toggle [for]="endDatePicker" matPrefix></mat-datetimepicker-toggle>
|
<mat-datetimepicker-toggle [for]="endDatePicker" matPrefix></mat-datetimepicker-toggle>
|
||||||
|
|||||||
@ -13,6 +13,8 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
@import '../../../../scss/constants';
|
||||||
|
|
||||||
:host ::ng-deep {
|
:host ::ng-deep {
|
||||||
.mat-form-field-wrapper {
|
.mat-form-field-wrapper {
|
||||||
padding-bottom: 8px;
|
padding-bottom: 8px;
|
||||||
@ -22,5 +24,9 @@
|
|||||||
}
|
}
|
||||||
.mat-form-field-infix {
|
.mat-form-field-infix {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
|
|
||||||
|
@media #{$mat-xs} {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
bottom: 8px;
|
bottom: 8px;
|
||||||
}
|
}
|
||||||
.mat-form-field-infix {
|
.mat-form-field-infix {
|
||||||
width: 150px;
|
width: auto;
|
||||||
|
min-width: 100px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,9 +14,9 @@
|
|||||||
/// limitations under the License.
|
/// limitations under the License.
|
||||||
///
|
///
|
||||||
|
|
||||||
import {Component, forwardRef, Input, OnInit} from '@angular/core';
|
import { Component, forwardRef, Input, OnInit } from '@angular/core';
|
||||||
import {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';
|
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
|
||||||
import {coerceBooleanProperty} from '@angular/cdk/coercion';
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'tb-datetime',
|
selector: 'tb-datetime',
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
</section>
|
</section>
|
||||||
<section class="interval-section" fxLayout="column" fxFlex [fxShow]="advanced && (isEdit || !hideFlag)">
|
<section class="interval-section" fxLayout="column" fxFlex [fxShow]="advanced && (isEdit || !hideFlag)">
|
||||||
<label class="tb-small interval-label" translate>{{ predefinedName }}</label>
|
<label class="tb-small interval-label" translate>{{ predefinedName }}</label>
|
||||||
<section fxLayout="row" fxLayoutAlign="start start" fxFlex fxLayoutGap="6px">
|
<section fxLayout="row wrap" fxLayoutAlign="start start" fxFlex fxLayoutGap="6px">
|
||||||
<mat-form-field class="number-input">
|
<mat-form-field class="number-input">
|
||||||
<mat-label translate>timeinterval.days</mat-label>
|
<mat-label translate>timeinterval.days</mat-label>
|
||||||
<input matInput [disabled]="hideFlag || disabled" type="number" step="1" min="0" [(ngModel)]="days" (ngModelChange)="onTimeInputChange('days')"/>
|
<input matInput [disabled]="hideFlag || disabled" type="number" step="1" min="0" [(ngModel)]="days" (ngModelChange)="onTimeInputChange('days')"/>
|
||||||
@ -44,7 +44,7 @@
|
|||||||
<section class="interval-section" fxLayout="row" fxFlex [fxShow]="!advanced && (isEdit || !hideFlag)">
|
<section class="interval-section" fxLayout="row" fxFlex [fxShow]="!advanced && (isEdit || !hideFlag)">
|
||||||
<mat-form-field fxFlex>
|
<mat-form-field fxFlex>
|
||||||
<mat-label translate>{{ predefinedName }}</mat-label>
|
<mat-label translate>{{ predefinedName }}</mat-label>
|
||||||
<mat-select matInput [disabled]="hideFlag || disabled" [(ngModel)]="intervalMs" (ngModelChange)="onIntervalMsChange()" style="min-width: 150px;">
|
<mat-select [disabled]="hideFlag || disabled" [(ngModel)]="intervalMs" (ngModelChange)="onIntervalMsChange()" style="min-width: 150px;">
|
||||||
<mat-option *ngFor="let interval of intervals" [value]="interval.value">
|
<mat-option *ngFor="let interval of intervals" [value]="interval.value">
|
||||||
{{ interval.name | translate:interval.translateParams }}
|
{{ interval.name | translate:interval.translateParams }}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
|
|||||||
@ -13,6 +13,8 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
@import '../../../../scss/constants';
|
||||||
|
|
||||||
:host {
|
:host {
|
||||||
min-width: 355px;
|
min-width: 355px;
|
||||||
|
|
||||||
@ -37,6 +39,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media #{$mat-xs} {
|
||||||
|
min-width: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:host ::ng-deep {
|
:host ::ng-deep {
|
||||||
|
|||||||
@ -14,15 +14,8 @@
|
|||||||
/// limitations under the License.
|
/// limitations under the License.
|
||||||
///
|
///
|
||||||
|
|
||||||
import { ChangeDetectorRef, Component, EventEmitter, forwardRef, Input, OnInit, Output } from '@angular/core';
|
import { Component, EventEmitter, forwardRef, Input, OnInit, Output } from '@angular/core';
|
||||||
import {
|
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
|
||||||
ControlValueAccessor,
|
|
||||||
FormControl,
|
|
||||||
NG_VALIDATORS,
|
|
||||||
NG_VALUE_ACCESSOR,
|
|
||||||
Validator
|
|
||||||
} from '@angular/forms';
|
|
||||||
import { Timewindow } from '@shared/models/time/time.models';
|
|
||||||
import { TimeInterval, TimeService } from '@core/services/time.service';
|
import { TimeInterval, TimeService } from '@core/services/time.service';
|
||||||
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
||||||
|
|
||||||
|
|||||||
@ -39,11 +39,12 @@
|
|||||||
<mat-checkbox [ngModelOptions]="{standalone: true}" [(ngModel)]="timewindow.hideInterval"
|
<mat-checkbox [ngModelOptions]="{standalone: true}" [(ngModel)]="timewindow.hideInterval"
|
||||||
(ngModelChange)="onHideIntervalChanged()"></mat-checkbox>
|
(ngModelChange)="onHideIntervalChanged()"></mat-checkbox>
|
||||||
</section>
|
</section>
|
||||||
<section fxLayout="column" [fxShow]="isEdit || !timewindow.hideInterval">
|
<section fxLayout="column" fxFlex [fxShow]="isEdit || !timewindow.hideInterval">
|
||||||
<div formGroupName="history" class="mat-content mat-padding" style="padding-top: 8px;">
|
<div formGroupName="history" class="mat-content mat-padding" style="padding-top: 8px;">
|
||||||
<mat-radio-group formControlName="historyType">
|
<mat-radio-group formControlName="historyType">
|
||||||
<mat-radio-button [value]="historyTypes.LAST_INTERVAL" color="primary">
|
<mat-radio-button [value]="historyTypes.LAST_INTERVAL" color="primary">
|
||||||
<section fxLayout="column">
|
<section fxLayout="column">
|
||||||
|
<span translate>timewindow.last</span>
|
||||||
<tb-timeinterval
|
<tb-timeinterval
|
||||||
formControlName="timewindowMs"
|
formControlName="timewindowMs"
|
||||||
predefinedName="timewindow.last"
|
predefinedName="timewindow.last"
|
||||||
@ -80,7 +81,7 @@
|
|||||||
<section fxFlex fxLayout="column" [fxShow]="isEdit || !timewindow.hideAggregation">
|
<section fxFlex fxLayout="column" [fxShow]="isEdit || !timewindow.hideAggregation">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-label translate>aggregation.function</mat-label>
|
<mat-label translate>aggregation.function</mat-label>
|
||||||
<mat-select matInput formControlName="type" style="min-width: 150px;">
|
<mat-select formControlName="type" style="min-width: 150px;">
|
||||||
<mat-option *ngFor="let aggregation of aggregations" [value]="aggregation">
|
<mat-option *ngFor="let aggregation of aggregations" [value]="aggregation">
|
||||||
{{ aggregationTypesTranslations.get(aggregationTypes[aggregation]) | translate }}
|
{{ aggregationTypesTranslations.get(aggregationTypes[aggregation]) | translate }}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
@ -138,8 +139,7 @@
|
|||||||
predefinedName="aggregation.group-interval">
|
predefinedName="aggregation.group-interval">
|
||||||
</tb-timeinterval>
|
</tb-timeinterval>
|
||||||
</div>
|
</div>
|
||||||
<div fxLayout="row" class="tb-panel-actions">
|
<div fxLayout="row" class="tb-panel-actions" fxLayoutAlign="end center">
|
||||||
<span fxFlex></span>
|
|
||||||
<button type="submit"
|
<button type="submit"
|
||||||
mat-raised-button
|
mat-raised-button
|
||||||
color="primary"
|
color="primary"
|
||||||
|
|||||||
@ -35,6 +35,10 @@
|
|||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tb-timeinterval[ng-reflect-fx-show="true"] {
|
||||||
|
margin-bottom: -16px;
|
||||||
|
}
|
||||||
|
|
||||||
.limit-slider-container {
|
.limit-slider-container {
|
||||||
>:first-child {
|
>:first-child {
|
||||||
margin-right: 16px;
|
margin-right: 16px;
|
||||||
|
|||||||
@ -14,28 +14,16 @@
|
|||||||
/// limitations under the License.
|
/// limitations under the License.
|
||||||
///
|
///
|
||||||
|
|
||||||
|
import { Component, Inject, InjectionToken, OnInit, ViewContainerRef } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
Component,
|
|
||||||
Inject,
|
|
||||||
InjectionToken,
|
|
||||||
OnInit,
|
|
||||||
ViewChild,
|
|
||||||
ViewContainerRef
|
|
||||||
} from '@angular/core';
|
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
|
||||||
import { MillisecondsToTimeStringPipe } from '@shared/pipe/milliseconds-to-time-string.pipe';
|
|
||||||
import {
|
|
||||||
Aggregation,
|
|
||||||
aggregationTranslations,
|
aggregationTranslations,
|
||||||
AggregationType, DAY,
|
AggregationType,
|
||||||
HistoryWindow,
|
DAY,
|
||||||
HistoryWindowType,
|
HistoryWindowType,
|
||||||
IntervalWindow,
|
|
||||||
Timewindow,
|
Timewindow,
|
||||||
TimewindowType
|
TimewindowType
|
||||||
} from '@shared/models/time/time.models';
|
} from '@shared/models/time/time.models';
|
||||||
import { DatePipe } from '@angular/common';
|
import { OverlayRef } from '@angular/cdk/overlay';
|
||||||
import { Overlay, OverlayRef } from '@angular/cdk/overlay';
|
|
||||||
import { PageComponent } from '@shared/components/page.component';
|
import { PageComponent } from '@shared/components/page.component';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { AppState } from '@core/core.state';
|
import { AppState } from '@core/core.state';
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<section *ngIf="!asButton" cdkOverlayOrigin #timewindowPanelOrigin="cdkOverlayOrigin"
|
<section *ngIf="!asButton" cdkOverlayOrigin #timewindowPanelOrigin="cdkOverlayOrigin"
|
||||||
class="tb-timewindow" fxLayout="row" fxLayoutAlign="start center">
|
class="tb-timewindow" fxLayout="row" fxLayoutAlign="start center">
|
||||||
<button *ngIf="direction === 'left'" [disabled]="timewindowDisabled" mat-button mat-icon-button class="tb-mat-32"
|
<button *ngIf="direction === 'left'" [disabled]="timewindowDisabled" mat-icon-button class="tb-mat-32"
|
||||||
type="button"
|
type="button"
|
||||||
(click)="openEditMode()"
|
(click)="openEditMode()"
|
||||||
matTooltip="{{ 'timewindow.edit' | translate }}"
|
matTooltip="{{ 'timewindow.edit' | translate }}"
|
||||||
@ -36,7 +36,7 @@
|
|||||||
[matTooltipPosition]="tooltipPosition">
|
[matTooltipPosition]="tooltipPosition">
|
||||||
{{innerValue?.displayValue}}
|
{{innerValue?.displayValue}}
|
||||||
</span>
|
</span>
|
||||||
<button *ngIf="direction === 'right'" [disabled]="timewindowDisabled" mat-button mat-icon-button class="tb-mat-32"
|
<button *ngIf="direction === 'right'" [disabled]="timewindowDisabled" mat-icon-button class="tb-mat-32"
|
||||||
type="button"
|
type="button"
|
||||||
(click)="openEditMode()"
|
(click)="openEditMode()"
|
||||||
matTooltip="{{ 'timewindow.edit' | translate }}"
|
matTooltip="{{ 'timewindow.edit' | translate }}"
|
||||||
|
|||||||
@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
:host {
|
:host {
|
||||||
min-width: 52px;
|
min-width: 52px;
|
||||||
|
margin: 8px 0;
|
||||||
section.tb-timewindow {
|
section.tb-timewindow {
|
||||||
min-height: 32px;
|
min-height: 32px;
|
||||||
padding: 0 6px;
|
padding: 0 6px;
|
||||||
|
|||||||
@ -14,32 +14,19 @@
|
|||||||
/// limitations under the License.
|
/// limitations under the License.
|
||||||
///
|
///
|
||||||
|
|
||||||
import {
|
import { Component, forwardRef, Inject, Input, OnDestroy, OnInit, ViewChild, ViewContainerRef } from '@angular/core';
|
||||||
ChangeDetectionStrategy,
|
|
||||||
Component,
|
|
||||||
forwardRef, Inject,
|
|
||||||
Input,
|
|
||||||
OnDestroy,
|
|
||||||
OnInit,
|
|
||||||
ViewChild,
|
|
||||||
ViewContainerRef
|
|
||||||
} from '@angular/core';
|
|
||||||
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
|
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { MillisecondsToTimeStringPipe } from '@shared/pipe/milliseconds-to-time-string.pipe';
|
import { MillisecondsToTimeStringPipe } from '@shared/pipe/milliseconds-to-time-string.pipe';
|
||||||
import {
|
import {
|
||||||
|
cloneSelectedTimewindow,
|
||||||
HistoryWindowType,
|
HistoryWindowType,
|
||||||
|
initModelFromDefaultTimewindow,
|
||||||
Timewindow,
|
Timewindow,
|
||||||
TimewindowType,
|
TimewindowType
|
||||||
initModelFromDefaultTimewindow, cloneSelectedTimewindow
|
|
||||||
} from '@shared/models/time/time.models';
|
} from '@shared/models/time/time.models';
|
||||||
import { DatePipe } from '@angular/common';
|
import { DatePipe, DOCUMENT } from '@angular/common';
|
||||||
import {
|
import { CdkOverlayOrigin, ConnectedPosition, Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';
|
||||||
Overlay,
|
|
||||||
CdkOverlayOrigin,
|
|
||||||
OverlayConfig,
|
|
||||||
OverlayPositionBuilder, ConnectedPosition, PositionStrategy, OverlayRef
|
|
||||||
} from '@angular/cdk/overlay';
|
|
||||||
import {
|
import {
|
||||||
TIMEWINDOW_PANEL_DATA,
|
TIMEWINDOW_PANEL_DATA,
|
||||||
TimewindowPanelComponent,
|
TimewindowPanelComponent,
|
||||||
@ -48,7 +35,6 @@ import {
|
|||||||
import { ComponentPortal, PortalInjector } from '@angular/cdk/portal';
|
import { ComponentPortal, PortalInjector } from '@angular/cdk/portal';
|
||||||
import { MediaBreakpoints } from '@shared/models/constants';
|
import { MediaBreakpoints } from '@shared/models/constants';
|
||||||
import { BreakpointObserver } from '@angular/cdk/layout';
|
import { BreakpointObserver } from '@angular/cdk/layout';
|
||||||
import { DOCUMENT } from '@angular/common';
|
|
||||||
import { WINDOW } from '@core/services/window.service';
|
import { WINDOW } from '@core/services/window.service';
|
||||||
import { TimeService } from '@core/services/time.service';
|
import { TimeService } from '@core/services/time.service';
|
||||||
import { TooltipPosition } from '@angular/material/tooltip';
|
import { TooltipPosition } from '@angular/material/tooltip';
|
||||||
@ -163,14 +149,14 @@ export class TimewindowComponent implements OnInit, OnDestroy, ControlValueAcces
|
|||||||
if (this.timewindowDisabled) {
|
if (this.timewindowDisabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const isGtSm = this.breakpointObserver.isMatched(MediaBreakpoints['gt-sm']);
|
const isGtXs = this.breakpointObserver.isMatched(MediaBreakpoints['gt-xs']);
|
||||||
const position = this.overlay.position();
|
const position = this.overlay.position();
|
||||||
const config = new OverlayConfig({
|
const config = new OverlayConfig({
|
||||||
panelClass: 'tb-timewindow-panel',
|
panelClass: 'tb-timewindow-panel',
|
||||||
backdropClass: 'cdk-overlay-transparent-backdrop',
|
backdropClass: 'cdk-overlay-transparent-backdrop',
|
||||||
hasBackdrop: isGtSm,
|
hasBackdrop: isGtXs,
|
||||||
});
|
});
|
||||||
if (isGtSm) {
|
if (isGtXs) {
|
||||||
config.minWidth = '417px';
|
config.minWidth = '417px';
|
||||||
config.maxHeight = '440px';
|
config.maxHeight = '440px';
|
||||||
const panelHeight = 375;
|
const panelHeight = 375;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user