Implement hiding the graph and move elements out of boxes
This commit is contained in:
parent
be20fb7a52
commit
383278245e
|
@ -4,7 +4,7 @@ function loadJson(selector) {
|
|||
var jsonData = loadJson('#jsonData');
|
||||
var full_data = jsonData.map((item) => item);
|
||||
|
||||
var ctx = document.getElementById('volume').getContext("2d");
|
||||
var ctx = document.getElementById('sentiment-chart').getContext("2d");
|
||||
new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: {
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="options" class="box is-hidden">
|
||||
<div id="options" class="block is-hidden">
|
||||
<div class="columns is-multiline">
|
||||
<div class="column is-narrow">
|
||||
<div class="field has-addons">
|
||||
|
@ -321,6 +321,21 @@
|
|||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control">
|
||||
<div class="field">
|
||||
<input
|
||||
id="sentiment_graph_switch"
|
||||
type="checkbox"
|
||||
class="switch is-rounded is-info"
|
||||
name="show_sentiment"
|
||||
data-script="on click toggle .is-hidden on #sentiment-container">
|
||||
|
||||
<label
|
||||
for="sentiment_graph_switch">
|
||||
Show graph
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column is-narrow">
|
||||
<div id="date">
|
||||
|
|
|
@ -48,9 +48,9 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
{% if params.index != 'int' and params.index != 'meta' %}
|
||||
<div class="box">
|
||||
<div style="height: 30rem">
|
||||
<canvas id="volume"></canvas>
|
||||
<div>
|
||||
<div style="height: 30rem" id="sentiment-container" {% if params.show_sentiment is None %} class="is-hidden" {% endif %}>
|
||||
<canvas id="sentiment-chart"></canvas>
|
||||
</div>
|
||||
<script src="{% static 'chart.js' %}"></script>
|
||||
</div>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
{% load joinsep %}
|
||||
{% load urlsafe %}
|
||||
{% block table-wrapper %}
|
||||
<div id="drilldown-table" class="container box column-shifter-container" style="position:relative; z-index:1;">
|
||||
<div id="drilldown-table" class="container column-shifter-container" style="position:relative; z-index:1;">
|
||||
{% block table %}
|
||||
<div class="nowrap-parent">
|
||||
<div class="nowrap-child">
|
||||
|
|
|
@ -118,9 +118,7 @@ def obfuscate_list(user, data):
|
|||
Obfuscate data in a list of dictionaries.
|
||||
"""
|
||||
if user.has_perm("core.bypass_obfuscation"):
|
||||
print("USER HAS PERM")
|
||||
return
|
||||
print("NO HAVE PERM")
|
||||
for index, item in enumerate(data):
|
||||
for key, value in item.items():
|
||||
# Obfuscate a ratio of the field
|
||||
|
|
Loading…
Reference in New Issue