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 jsonData = loadJson('#jsonData');
|
||||||
var full_data = jsonData.map((item) => item);
|
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, {
|
new Chart(ctx, {
|
||||||
type: 'line',
|
type: 'line',
|
||||||
data: {
|
data: {
|
||||||
|
|
|
@ -109,7 +109,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="options" class="box is-hidden">
|
<div id="options" class="block is-hidden">
|
||||||
<div class="columns is-multiline">
|
<div class="columns is-multiline">
|
||||||
<div class="column is-narrow">
|
<div class="column is-narrow">
|
||||||
<div class="field has-addons">
|
<div class="field has-addons">
|
||||||
|
@ -321,6 +321,21 @@
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
||||||
<div class="column is-narrow">
|
<div class="column is-narrow">
|
||||||
<div id="date">
|
<div id="date">
|
||||||
|
|
|
@ -48,9 +48,9 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% if params.index != 'int' and params.index != 'meta' %}
|
{% if params.index != 'int' and params.index != 'meta' %}
|
||||||
<div class="box">
|
<div>
|
||||||
<div style="height: 30rem">
|
<div style="height: 30rem" id="sentiment-container" {% if params.show_sentiment is None %} class="is-hidden" {% endif %}>
|
||||||
<canvas id="volume"></canvas>
|
<canvas id="sentiment-chart"></canvas>
|
||||||
</div>
|
</div>
|
||||||
<script src="{% static 'chart.js' %}"></script>
|
<script src="{% static 'chart.js' %}"></script>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{% load joinsep %}
|
{% load joinsep %}
|
||||||
{% load urlsafe %}
|
{% load urlsafe %}
|
||||||
{% block table-wrapper %}
|
{% 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 %}
|
{% block table %}
|
||||||
<div class="nowrap-parent">
|
<div class="nowrap-parent">
|
||||||
<div class="nowrap-child">
|
<div class="nowrap-child">
|
||||||
|
|
|
@ -118,9 +118,7 @@ def obfuscate_list(user, data):
|
||||||
Obfuscate data in a list of dictionaries.
|
Obfuscate data in a list of dictionaries.
|
||||||
"""
|
"""
|
||||||
if user.has_perm("core.bypass_obfuscation"):
|
if user.has_perm("core.bypass_obfuscation"):
|
||||||
print("USER HAS PERM")
|
|
||||||
return
|
return
|
||||||
print("NO HAVE PERM")
|
|
||||||
for index, item in enumerate(data):
|
for index, item in enumerate(data):
|
||||||
for key, value in item.items():
|
for key, value in item.items():
|
||||||
# Obfuscate a ratio of the field
|
# Obfuscate a ratio of the field
|
||||||
|
|
Loading…
Reference in New Issue