Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nos Hs2023
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Språksamlingane
stadnamn
Nos Hs2023
Commits
1deb6edb
Commit
1deb6edb
authored
6 years ago
by
Esko Ikkala
Browse files
Options
Downloads
Patches
Plain Diff
Add spinner for result table
parent
00eae523
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/client/containers/MapApp.js
+40
-20
40 additions, 20 deletions
src/client/containers/MapApp.js
src/client/reducers/search.js
+8
-6
8 additions, 6 deletions
src/client/reducers/search.js
src/server/sparql/Datasets.js
+2
-2
2 additions, 2 deletions
src/server/sparql/Datasets.js
with
50 additions
and
28 deletions
src/client/containers/MapApp.js
+
40
−
20
View file @
1deb6edb
...
...
@@ -11,6 +11,8 @@ import LeafletMap from '../components/map/LeafletMap';
import
GMap
from
'
../components/map/GMap
'
;
import
Pie
from
'
../components/Pie
'
;
import
TopBar
from
'
../components/TopBar
'
;
import
CircularProgress
from
'
@material-ui/core/CircularProgress
'
;
import
purple
from
'
@material-ui/core/colors/purple
'
;
import
{
//getVisibleResults,
...
...
@@ -93,6 +95,11 @@ const styles = theme => ({
width
:
'
100%
'
,
height
:
'
100%
'
,
},
progress
:
{
display
:
'
flex
'
,
alignItems
:
'
center
'
,
justifyContent
:
'
center
'
,
},
footer
:
{
position
:
'
absolute
'
,
borderTop
:
'
4px solid
'
+
theme
.
palette
.
primary
.
main
,
...
...
@@ -137,33 +144,46 @@ let MapApp = (props) => {
// console.log('resultFormat', resultFormat)
// console.log('mapMode', mapMode)
//console.log(props.results)
console
.
log
(
manuscripts
)
//
console.log(manuscripts)
let
table
=
''
;
if
((
oneColumnView
&&
options
.
resultFormat
===
'
table
'
)
||
(
!
oneColumnView
))
{
if
(
search
.
fetchingManuscripts
)
{
const
tableClass
=
oneColumnView
?
classes
.
resultTableOneColumn
:
classes
.
resultTable
;
table
=
(
<
div
className
=
{
oneColumnView
?
classes
.
resultTableOneColumn
:
classes
.
resultTable
}
>
<
VirtualizedTable
list
=
{
Immutable
.
List
(
manuscripts
)}
resultValues
=
{
resultValues
}
search
=
{
search
}
sortResults
=
{
props
.
sortResults
}
updateResultsFilter
=
{
props
.
updateResultsFilter
}
updateQuery
=
{
props
.
updateQuery
}
fetchManuscripts
=
{
props
.
fetchManuscripts
}
clearManuscripts
=
{
props
.
clearManuscripts
}
fetchPlaces
=
{
props
.
fetchPlaces
}
clearPlaces
=
{
props
.
clearPlaces
}
fetchSuggestions
=
{
props
.
fetchSuggestions
}
clearSuggestions
=
{
props
.
clearSuggestions
}
bounceMarker
=
{
props
.
bounceMarker
}
openMarkerPopup
=
{
props
.
openMarkerPopup
}
removeTempMarker
=
{
props
.
removeTempMarker
}
/
>
<
div
className
=
{[
tableClass
,
classes
.
progress
].
join
(
'
'
)}
>
<
CircularProgress
style
=
{{
color
:
purple
[
500
]
}}
thickness
=
{
7
}
/
>
<
/div
>
);
}
else
{
if
((
oneColumnView
&&
options
.
resultFormat
===
'
table
'
)
||
(
!
oneColumnView
))
{
table
=
(
<
div
className
=
{
oneColumnView
?
classes
.
resultTableOneColumn
:
classes
.
resultTable
}
>
<
VirtualizedTable
list
=
{
Immutable
.
List
(
manuscripts
)}
resultValues
=
{
resultValues
}
search
=
{
search
}
sortResults
=
{
props
.
sortResults
}
updateResultsFilter
=
{
props
.
updateResultsFilter
}
updateQuery
=
{
props
.
updateQuery
}
fetchManuscripts
=
{
props
.
fetchManuscripts
}
clearManuscripts
=
{
props
.
clearManuscripts
}
fetchPlaces
=
{
props
.
fetchPlaces
}
clearPlaces
=
{
props
.
clearPlaces
}
fetchSuggestions
=
{
props
.
fetchSuggestions
}
clearSuggestions
=
{
props
.
clearSuggestions
}
bounceMarker
=
{
props
.
bounceMarker
}
openMarkerPopup
=
{
props
.
openMarkerPopup
}
removeTempMarker
=
{
props
.
removeTempMarker
}
/
>
<
/div
>
);
}
}
let
mapElement
=
''
;
if
((
oneColumnView
&&
options
.
resultFormat
===
'
map
'
)
||
(
!
oneColumnView
))
{
if
(
options
.
mapMode
===
'
heatmap
'
)
{
...
...
This diff is collapsed.
Click to expand it.
src/client/reducers/search.js
+
8
−
6
View file @
1deb6edb
...
...
@@ -48,7 +48,8 @@ export const INITIAL_STATE = {
sortDirection
:
'
asc
'
,
groupBy
:
'
label
'
,
resultsQuery
:
''
,
fetchingResults
:
false
,
fetchingPlaces
:
false
,
fetchingManuscripts
:
false
};
const
search
=
(
state
=
INITIAL_STATE
,
action
)
=>
{
...
...
@@ -71,8 +72,9 @@ const search = (state = INITIAL_STATE, action) => {
case
FETCH_SUGGESTIONS
:
return
{
...
state
,
fetchingSuggestions
:
true
};
case
FETCH_MANUSCRIPTS
:
return
{
...
state
,
fetchingManuscripts
:
true
};
case
FETCH_PLACES
:
return
{
...
state
,
fetching
Result
s
:
true
};
return
{
...
state
,
fetching
Place
s
:
true
};
case
CLEAR_SUGGESTIONS
:
return
{
...
state
,
...
...
@@ -92,28 +94,28 @@ const search = (state = INITIAL_STATE, action) => {
...
state
,
manuscripts
:
action
.
manuscripts
,
//resultsQuery: state.query,
fetching
Resul
ts
:
false
fetching
Manuscrip
ts
:
false
};
case
UPDATE_PLACES
:
return
{
...
state
,
places
:
action
.
places
,
//resultsQuery: state.query,
fetching
Result
s
:
false
fetching
Place
s
:
false
};
case
CLEAR_MANUSCRIPTS
:
return
{
...
state
,
'
manuscripts
'
:
[],
resultsQuery
:
''
,
fetching
Resul
ts
:
false
fetching
Manuscrip
ts
:
false
};
case
CLEAR_PLACES
:
return
{
...
state
,
'
places
'
:
{},
resultsQuery
:
''
,
fetching
Result
s
:
false
fetching
Place
s
:
false
};
case
UPDATE_RESULTS_FILTER
:
return
updateResultsFilter
(
state
,
action
);
...
...
This diff is collapsed.
Click to expand it.
src/server/sparql/Datasets.js
+
2
−
2
View file @
1deb6edb
...
...
@@ -4,8 +4,8 @@ module.exports = {
'
title
'
:
'
MMM
'
,
'
shortTitle
'
:
'
MMM
'
,
'
timePeriod
'
:
''
,
//
'endpoint': 'http://ldf.fi/mmm-sdbm-cidoc/sparql',
'
endpoint
'
:
'
http://localhost:3034/ds/sparql
'
,
'
endpoint
'
:
'
http://ldf.fi/mmm-sdbm-cidoc/sparql
'
,
//
'endpoint': 'http://localhost:3034/ds/sparql',
'
allQuery
'
:
`
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment