Skip to content

Commit 1f4bdfd

Browse files
authored
Merge branch 'main' into AddingFilterURLService
2 parents 624b992 + 0d793a2 commit 1f4bdfd

17 files changed

+229
-58
lines changed

package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"d3-transition": "^1.2.0",
6161
"d3-zoom": "^1.8.3",
6262
"graphql": "^15.6.1",
63-
"graphql-tag": "^2.12.5",
63+
"graphql-tag": "^2.12.6",
6464
"iso8601-duration": "^1.3.0",
6565
"lodash-es": "^4.17.21",
6666
"mixpanel-browser": "^2.41.0",

projects/components/src/table/controls/table-controls-api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export interface TablePropertyControlOption {
3737

3838
export interface TableSelectControl {
3939
placeholder: string;
40+
isMultiSelect: boolean;
4041
options: TableSelectControlOption[];
4142
}
4243

projects/components/src/table/controls/table-controls.component.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ describe('Table Controls component', () => {
6262
selectControls: [
6363
{
6464
placeholder: 'test1',
65+
isMultiSelect: true,
6566
options: [
6667
{
6768
label: 'first1',
@@ -88,6 +89,7 @@ describe('Table Controls component', () => {
8889
selectControls: [
8990
{
9091
placeholder: 'test1',
92+
isMultiSelect: true,
9193
options: [
9294
{
9395
label: 'first1',

projects/components/src/table/controls/table-controls.component.ts

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,39 @@ import {
4343
></ht-search-box>
4444
4545
<!-- Selects -->
46-
<ht-multi-select
47-
*ngFor="let selectControl of this.selectControls"
48-
[selected]="this.appliedFilters(selectControl)"
49-
[placeholder]="selectControl.placeholder"
50-
class="control select"
51-
showBorder="true"
52-
searchMode="${MultiSelectSearchMode.CaseInsensitive}"
53-
(selectedChange)="this.onMultiSelectChange(selectControl, $event)"
54-
>
55-
<ht-select-option
56-
*ngFor="let option of selectControl.options"
57-
[label]="option.label"
58-
[value]="option"
59-
></ht-select-option>
60-
</ht-multi-select>
46+
<ng-container *ngFor="let selectControl of this.selectControls">
47+
<ht-multi-select
48+
*ngIf="selectControl.isMultiSelect"
49+
[selected]="this.appliedFilters(selectControl)"
50+
[placeholder]="selectControl.placeholder"
51+
class="control select"
52+
showBorder="true"
53+
searchMode="${MultiSelectSearchMode.CaseInsensitive}"
54+
(selectedChange)="this.onMultiSelectChange(selectControl, $event)"
55+
>
56+
<ht-select-option
57+
*ngFor="let option of selectControl.options"
58+
[label]="option.label"
59+
[value]="option"
60+
></ht-select-option>
61+
</ht-multi-select>
62+
63+
<ht-select
64+
*ngIf="!selectControl.isMultiSelect"
65+
[selected]="this.appliedFilters(selectControl)"
66+
[placeholder]="selectControl.placeholder"
67+
class="control select"
68+
showBorder="true"
69+
searchMode="${MultiSelectSearchMode.CaseInsensitive}"
70+
(selectedChange)="this.onMultiSelectChange(selectControl, $event)"
71+
>
72+
<ht-select-option
73+
*ngFor="let option of selectControl.options"
74+
[label]="option.label"
75+
[value]="option"
76+
></ht-select-option>
77+
</ht-select>
78+
</ng-container>
6179
</div>
6280
6381
<!-- Right -->

projects/components/src/table/table.component.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ $header-height: 32px;
110110
border-bottom: unset;
111111
}
112112

113+
&.hide-divider {
114+
border-bottom: unset;
115+
}
116+
113117
.data-cell-renderer {
114118
display: block;
115119
height: 100%;

projects/components/src/table/table.component.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ import { TableColumnConfigExtended, TableService } from './table.service';
106106
[style.margin-left]="index === 0 ? this.calcLeftMarginIndent(row) : 0"
107107
[style.margin-right]="index === 1 ? this.calcRightMarginIndent(row, columnDef) : 0"
108108
[ngClass]="{
109-
'detail-expanded': this.isDetailExpanded(row)
109+
'detail-expanded': this.isDetailExpanded(row),
110+
'hide-divider': this.isDetailList()
110111
}"
111112
class="data-cell"
112113
>
@@ -699,6 +700,10 @@ export class TableComponent
699700
return this.isDetailType() || this.isTreeType();
700701
}
701702

703+
public isDetailList(): boolean {
704+
return this.isDetailType() && this.display === TableStyle.List;
705+
}
706+
702707
public isDetailExpanded(row: StatefulTableRow): boolean {
703708
return this.isDetailType() && row.$$state.expanded;
704709
}

projects/observability/src/pages/apis/endpoints/endpoint-list.dashboard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const endpointListDashboard: DashboardDefaultConfiguration = {
2222
searchAttribute: 'name',
2323
'select-control-options': [
2424
{
25-
type: 'table-widget-select-option',
25+
type: 'table-widget-multi-select-option',
2626
'unique-values': true,
2727
placeholder: 'Services',
2828
data: {

projects/observability/src/pages/explorer/explorer.component.scss

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@import 'font';
2+
@import 'layout';
23

34
.explorer {
45
display: flex;
@@ -11,21 +12,19 @@
1112
}
1213

1314
.explorer-content {
15+
@include scrollable-container(24px);
1416
display: flex;
1517
flex-direction: column;
16-
padding: 24px 24px 0;
17-
flex: 1;
18-
min-height: 0;
1918
}
2019

2120
.explorer-data-toggle {
2221
flex: 0;
23-
padding-bottom: 16px;
22+
padding: 24px 24px 16px;
2423
}
2524

2625
.explorer-filter-bar {
2726
flex: 0;
28-
padding-bottom: 8px;
27+
padding: 0 24px 8px;
2928
}
3029

3130
.panel-title {
@@ -49,14 +48,9 @@
4948

5049
.results-panel {
5150
flex: 1;
52-
overflow: hidden;
5351

5452
.label {
5553
@include body-1-medium;
5654
}
57-
58-
.results-panel-content {
59-
padding-top: 12px;
60-
}
6155
}
6256
}

projects/observability/src/pages/explorer/explorer.component.ts

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,20 @@ import {
2323
template: `
2424
<div class="explorer">
2525
<ht-page-header class="explorer-header"></ht-page-header>
26+
<ht-toggle-group
27+
class="explorer-data-toggle"
28+
[items]="this.contextItems"
29+
[activeItem]="this.activeContextItem$ | async"
30+
(activeItemChange)="this.onContextUpdated($event.value)"
31+
></ht-toggle-group>
32+
33+
<ht-filter-bar
34+
class="explorer-filter-bar"
35+
[attributes]="this.attributes$ | async"
36+
[syncWithUrl]="true"
37+
(filtersChange)="this.onFiltersUpdated($event)"
38+
></ht-filter-bar>
2639
<div class="explorer-content">
27-
<ht-toggle-group
28-
class="explorer-data-toggle"
29-
[items]="this.contextItems"
30-
[activeItem]="this.activeContextItem$ | async"
31-
(activeItemChange)="this.onContextUpdated($event.value)"
32-
></ht-toggle-group>
33-
34-
<ht-filter-bar
35-
class="explorer-filter-bar"
36-
[attributes]="this.attributes$ | async"
37-
[syncWithUrl]="true"
38-
(filtersChange)="this.onFiltersUpdated($event)"
39-
></ht-filter-bar>
40-
4140
<ht-panel class="visualization-panel" [(expanded)]="this.visualizationExpanded">
4241
<ht-panel-header>
4342
<ht-panel-title [expanded]="this.visualizationExpanded"

0 commit comments

Comments
 (0)