Skip to content

Commit 025c56e

Browse files
committed
Merge branch 'support-additional-spec' of github.com:hypertrace/hypertrace-ui into support-additional-spec
2 parents bfdc125 + 110e7c5 commit 025c56e

File tree

12 files changed

+70
-26
lines changed

12 files changed

+70
-26
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: {
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { Model } from '@hypertrace/hyperdash';
2+
import { TableWidgetControlSelectOptionModel } from './table-widget-control-select-option.model';
3+
4+
@Model({
5+
type: 'table-widget-multi-select-option'
6+
})
7+
export class TableWidgetControlMultiSelectOptionModel extends TableWidgetControlSelectOptionModel {
8+
public readonly isMultiselect: boolean = true;
9+
}

projects/observability/src/shared/dashboard/widgets/table/table-widget-control-select-option.model.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import { TableWidgetControlModel } from './table-widget-control.model';
88
type: 'table-widget-select-option'
99
})
1010
export class TableWidgetControlSelectOptionModel extends TableWidgetControlModel<TableSelectControlOption> {
11+
public readonly isMultiselect: boolean = false;
12+
1113
@ModelProperty({
1214
key: 'placeholder',
1315
displayName: 'Placeholder',

0 commit comments

Comments
 (0)