diff --git a/ui-ngx/src/app/shared/components/time/datetime-period.component.html b/ui-ngx/src/app/shared/components/time/datetime-period.component.html index fd6c1cf853..b846e58914 100644 --- a/ui-ngx/src/app/shared/components/time/datetime-period.component.html +++ b/ui-ngx/src/app/shared/components/time/datetime-period.component.html @@ -15,35 +15,17 @@ limitations under the License. --> -
-
- - datetime.date-from - - +
+ + datetime.from + + - - datetime.time-from - - - - -
-
- - datetime.date-to - - + + datetime.to + + - - datetime.time-to - - - - -
diff --git a/ui-ngx/src/app/shared/components/time/datetime-period.component.scss b/ui-ngx/src/app/shared/components/time/datetime-period.component.scss index 7f2c84ee0a..6fa2806335 100644 --- a/ui-ngx/src/app/shared/components/time/datetime-period.component.scss +++ b/ui-ngx/src/app/shared/components/time/datetime-period.component.scss @@ -13,14 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@import '../../../../scss/constants'; -:host ::ng-deep { - .mat-mdc-form-field-infix { - width: 100px; - - @media #{$mat-xs} { - width: 100%; - } +:host { + .tb-form-row { + gap: 8px; } } diff --git a/ui-ngx/src/app/shared/components/time/datetime-period.component.ts b/ui-ngx/src/app/shared/components/time/datetime-period.component.ts index 69c3b55bae..c0fbaea21e 100644 --- a/ui-ngx/src/app/shared/components/time/datetime-period.component.ts +++ b/ui-ngx/src/app/shared/components/time/datetime-period.component.ts @@ -17,6 +17,7 @@ import { Component, forwardRef, Input, OnInit } from '@angular/core'; import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; import { FixedWindow } from '@shared/models/time/time.models'; +import { MatFormFieldAppearance, SubscriptSizing } from '@angular/material/form-field'; @Component({ selector: 'tb-datetime-period', @@ -34,6 +35,12 @@ export class DatetimePeriodComponent implements OnInit, ControlValueAccessor { @Input() disabled: boolean; + @Input() + subscriptSizing: SubscriptSizing = 'fixed'; + + @Input() + appearance: MatFormFieldAppearance = 'fill'; + modelValue: FixedWindow; startDate: Date; diff --git a/ui-ngx/src/app/shared/components/time/timewindow-panel.component.html b/ui-ngx/src/app/shared/components/time/timewindow-panel.component.html index 7aa8cf9db8..03be25a760 100644 --- a/ui-ngx/src/app/shared/components/time/timewindow-panel.component.html +++ b/ui-ngx/src/app/shared/components/time/timewindow-panel.component.html @@ -23,11 +23,10 @@
-
+
{{ 'timewindow.time-range' | translate }}
- +
@@ -69,11 +68,10 @@
-
+
{{ 'timewindow.time-range' | translate }}
- +
@@ -97,6 +95,8 @@ @@ -126,7 +126,7 @@
{{ 'aggregation.aggregation' | translate }}
- + {{ aggregationTypesTranslations.get(aggregationTypes[aggregation]) | translate }} diff --git a/ui-ngx/src/app/shared/components/time/timewindow-panel.component.scss b/ui-ngx/src/app/shared/components/time/timewindow-panel.component.scss index aaa861c131..64b35e9592 100644 --- a/ui-ngx/src/app/shared/components/time/timewindow-panel.component.scss +++ b/ui-ngx/src/app/shared/components/time/timewindow-panel.component.scss @@ -35,19 +35,6 @@ overflow: hidden; } - .mat-padding { - padding: 0 16px; - } - - .hide-label { - margin-bottom: 5px; - margin-right: 5px; - } - - tb-timeinterval[ng-reflect-fxe-show="true"] { - margin-bottom: -16px; - } - .limit-slider-container { .limit-slider-value { margin-left: 16px; @@ -60,9 +47,6 @@ } @media #{$mat-gt-sm} { - .history-time-input { - min-width: 364px; - } .limit-slider-container { > label { margin-right: 16px; @@ -75,15 +59,6 @@ } :host ::ng-deep { - .mat-mdc-radio-button { - display: block; - .mdc-form-field { - align-items: start; - > label { - padding-top: 10px; - } - } - } .mat-mdc-tab-group:not(.tb-headless) { height: 100%; } diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json index 6347ea381d..cbd9be152b 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -1078,7 +1078,9 @@ "date-from": "Date from", "time-from": "Time from", "date-to": "Date to", - "time-to": "Time to" + "time-to": "Time to", + "from": "From", + "to": "To" }, "dashboard": { "dashboard": "Dashboard", diff --git a/ui-ngx/src/form.scss b/ui-ngx/src/form.scss index 661f4bccc7..c91f575e40 100644 --- a/ui-ngx/src/form.scss +++ b/ui-ngx/src/form.scss @@ -265,6 +265,12 @@ gap: 8px; &.no-flex { flex: none; + &.flex-xs { + @media #{$mat-xs} { + width: auto; + flex: 1; + } + } } &.row { flex-direction: row;