aboutsummaryrefslogtreecommitdiff
path: root/src/client/northstar
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/northstar')
-rw-r--r--src/client/northstar/dash-nodes/HistogramBox.tsx8
-rw-r--r--src/client/northstar/operations/HistogramOperation.ts5
2 files changed, 7 insertions, 6 deletions
diff --git a/src/client/northstar/dash-nodes/HistogramBox.tsx b/src/client/northstar/dash-nodes/HistogramBox.tsx
index 765ecf8f0..5e7b867b3 100644
--- a/src/client/northstar/dash-nodes/HistogramBox.tsx
+++ b/src/client/northstar/dash-nodes/HistogramBox.tsx
@@ -117,15 +117,15 @@ export class HistogramBox extends React.Component<FieldViewProps> {
runInAction(() => {
this.HistoOp = histoOp ? histoOp.HistoOp : HistogramOperation.Empty;
if (this.HistoOp !== HistogramOperation.Empty) {
- reaction(() => Cast(this.props.Document.linkedFromDocs, listSpec(Doc), []), (docs) => this.HistoOp.Links.splice(0, this.HistoOp.Links.length, ...docs), { fireImmediately: true });
+ reaction(() => Cast(this.props.Document.linkedFromDocs, listSpec(Doc), []).filter(d => d).map(d => d as Doc), (docs) => this.HistoOp.Links.splice(0, this.HistoOp.Links.length, ...docs), { fireImmediately: true });
reaction(() => Cast(this.props.Document.brushingDocs, listSpec(Doc), []).length,
() => {
- let brushingDocs = Cast(this.props.Document.brushingDocs, listSpec(Doc), []);
+ let brushingDocs = Cast(this.props.Document.brushingDocs, listSpec(Doc), []).filter(d => d).map(d => d as Doc);
const proto = this.props.Document.proto;
if (proto) {
this.HistoOp.BrushLinks.splice(0, this.HistoOp.BrushLinks.length, ...brushingDocs.map((brush, i) => {
- brush.bckgroundColor = StyleConstants.BRUSH_COLORS[i % StyleConstants.BRUSH_COLORS.length];
- let brushed = Cast(brush.brushingDocs, listSpec(Doc), []);
+ brush.backgroundColor = StyleConstants.BRUSH_COLORS[i % StyleConstants.BRUSH_COLORS.length];
+ let brushed = Cast(brush.brushingDocs, listSpec(Doc), []).filter(d => d).map(d => d as Doc);
return { l: brush, b: brushed[0][Id] === proto[Id] ? brushed[1] : brushed[0] };
}));
}
diff --git a/src/client/northstar/operations/HistogramOperation.ts b/src/client/northstar/operations/HistogramOperation.ts
index 5c9c832c0..78b206bdc 100644
--- a/src/client/northstar/operations/HistogramOperation.ts
+++ b/src/client/northstar/operations/HistogramOperation.ts
@@ -65,7 +65,7 @@ export class HistogramOperation extends BaseOperation implements IBaseFilterCons
@computed
public get FilterString(): string {
if (this.OverridingFilters.length > 0) {
- return "(" + this.OverridingFilters.filter(fm => fm != null).map(fm => fm.ToPythonString()).join(" || ") + ")";
+ return "(" + this.OverridingFilters.filter(fm => fm !== null).map(fm => fm.ToPythonString()).join(" || ") + ")";
}
let filterModels: FilterModel[] = [];
return FilterModel.GetFilterModelsRecursive(this, new Set<IBaseFilterProvider>(), filterModels, true);
@@ -89,8 +89,9 @@ export class HistogramOperation extends BaseOperation implements IBaseFilterCons
@action
public DrillDown(up: boolean) {
if (!up) {
- if (!this.BarFilterModels.length)
+ if (!this.BarFilterModels.length) {
return;
+ }
this._stackedFilters.push(this.BarFilterModels.map(f => f));
this.OverridingFilters.length = 0;
this.OverridingFilters.push(...this._stackedFilters[this._stackedFilters.length - 1]);