Commit dd6f9095 authored by Laurent Wouters's avatar Laurent Wouters
Browse files

[fix] Changed priority for views

parent dd921099ded2
......@@ -37,14 +37,22 @@ export class CurrentTabDataSources extends React.Component<
renderTriplesCount(count: number): React.ReactNode {
if (count == -1) {
return (
<span className="badge badge-danger" title="Failed to load this source">
<span
className="badge badge-danger"
title="Failed to load this source"
style={{ marginRight: "5pt", marginLeft: "5pt" }}
>
error
</span>
);
}
if (count == 0) {
return (
<span className="badge badge-secondary" title="Not loaded">
<span
className="badge badge-secondary"
title="Not loaded"
style={{ marginRight: "5pt", marginLeft: "5pt" }}
>
0
</span>
);
......@@ -53,6 +61,7 @@ export class CurrentTabDataSources extends React.Component<
<span
className="badge badge-secondary"
title="Total loaded triples from this source"
style={{ marginRight: "5pt", marginLeft: "5pt" }}
>
{count}
</span>
......@@ -73,6 +82,7 @@ export class CurrentTabDataSources extends React.Component<
<span
className="badge badge-primary"
title="Total loaded triples from this URI"
style={{ marginRight: "5pt", marginLeft: "5pt" }}
>
{totalLoaded}
</span>
......
......@@ -64,13 +64,14 @@ export class CurrentTabViews extends React.Component<CurrentTabViewsProps, {}> {
return (
<div key={"evaluation-" + index} className="row">
<div className="col-12">
<span>{view.name}</span>
<span
title="Priority for this view"
className="badge badge-primary"
style={{ marginRight: "5pt" }}
>
{evaluation.priority}
</span>
<span>{view.name}</span>
</div>
</div>
);
......
......@@ -178,7 +178,7 @@ function evaluateViewsFor(
priority: implementations[id].priorityFor(store, target)
};
})
.filter((a: RenderingEvaluation) => a.priority >= 0)
.filter((a: RenderingEvaluation) => a.priority > 0)
.sort(
(x: RenderingEvaluation, y: RenderingEvaluation) =>
y.priority - x.priority
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment