forked from ontoportal/ontoportal_web_ui
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add link to see result details of the url resolvability check * fix vizualization widget not showing code section * fix metrics graph evolution to use chart component * re-enforce the sparql query security for no admin users * fix collection show members using the wrong params name * remove unused history routes
- Loading branch information
1 parent
1312add
commit 570d9f0
Showing
11 changed files
with
46 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 4 additions & 24 deletions
28
app/views/ontologies/sections/metadata/_metrics_evolution_graph.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,6 @@ | ||
= turbo_frame_tag 'application_modal_content' do | ||
%canvas#metrics_evolution_chart | ||
:javascript | ||
- data = data.values.first.each_with_index.map{|x, i| ["Submission #{i + 1}", x]}.reject{|_, count| count.zero?}.to_h | ||
|
||
var metrics = #{raw data.to_json}; | ||
var key = Object.entries(metrics)[0][0] | ||
var numbers = Object.entries(metrics)[0][1] | ||
|
||
// Create a line chart | ||
var ctx = document.getElementById('metrics_evolution_chart').getContext('2d'); | ||
console.log(key, numbers) | ||
var metricsChart = new Chart(ctx, { | ||
type: 'line', | ||
data: { | ||
labels: numbers.map((_, index) => `Submission ${index + 1}`), | ||
datasets: [ | ||
{ | ||
label: key, | ||
data: numbers, | ||
borderColor: 'rgba(75, 192, 192, 1)', | ||
backgroundColor: 'rgba(75, 192, 192, 0.2)', | ||
} | ||
] | ||
}, | ||
options: {} | ||
}) | ||
= chart_component(title: '', type: 'line', | ||
labels: data.keys, | ||
datasets: visits_chart_dataset_array({ count: data.to_a}, fill: false)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters