Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
SemWeb
libview
Commits
ffa3f402ae72
Commit
dd6f9095
authored
Oct 29, 2018
by
Laurent Wouters
Browse files
[fix] Changed priority for views
parent
dd921099ded2
Changes
3
Hide whitespace changes
Inline
Side-by-side
extension/src/common/config/CurrentTabDataSources.tsx
View file @
ffa3f402
...
...
@@ -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
>
...
...
extension/src/common/config/CurrentTabViews.tsx
View file @
ffa3f402
...
...
@@ -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
>
);
...
...
libview/src/view-impl.ts
View file @
ffa3f402
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment