Commit b86a3941 authored by PkSM3's avatar PkSM3

Merge branch 'dev' of ssh://delanoe.org:1979/gargantext into samuel

parents d93223f0 89e826ed
...@@ -509,6 +509,7 @@ class NodesList(APIView): ...@@ -509,6 +509,7 @@ class NodesList(APIView):
def get(self, request): def get(self, request):
query = (Node query = (Node
.query(Node.id, Node.name, NodeType.name.label('type')) .query(Node.id, Node.name, NodeType.name.label('type'))
.filter(Node.user_id == request.session._session_cache['_auth_user_id'])
.join(NodeType) .join(NodeType)
) )
if 'type' in request.GET: if 'type' in request.GET:
......
...@@ -32,13 +32,14 @@ urlpatterns = patterns('', ...@@ -32,13 +32,14 @@ urlpatterns = patterns('',
url(r'^project/(\d+)/corpus/(\d+)/$', views.corpus), url(r'^project/(\d+)/corpus/(\d+)/$', views.corpus),
url(r'^project/(\d+)/corpus/(\d+)/delete/$', views.delete_corpus), url(r'^project/(\d+)/corpus/(\d+)/delete/$', views.delete_corpus),
url(r'^project/(\d+)/corpus/(\d+)/corpus.csv$', views.corpus_csv), url(r'^project/(\d+)/corpus/(\d+)/corpus.csv$', views.corpus_csv),
url(r'^project/(\d+)/corpus/(tests_mvc_listdocuments+)/corpus.tests_mvc_listdocuments$', views.corpus_csv),
url(r'^project/(\d+)/corpus/(\d+)/timerange/(\d+)/(\d+)$', views.subcorpus), url(r'^project/(\d+)/corpus/(\d+)/timerange/(\d+)/(\d+)$', views.subcorpus),
# Visualizations # Visualizations
url(r'^project/(\d+)/corpus/(\d+)/chart$', views.chart), url(r'^project/(\d+)/corpus/(\d+)/chart$', views.chart),
url(r'^corpus/(\d+)/explorer$', views.graph), url(r'^project/(\d+)/corpus/(\d+)/explorer$', views.graph),
url(r'^corpus/(\d+)/matrix$', views.matrix), url(r'^project/(\d+)/corpus/(\d+)/matrix$', views.matrix),
# Data management # Data management
url(r'^chart/corpus/(\d+)/data.csv$', views.send_csv), url(r'^chart/corpus/(\d+)/data.csv$', views.send_csv),
...@@ -60,6 +61,7 @@ urlpatterns = patterns('', ...@@ -60,6 +61,7 @@ urlpatterns = patterns('',
url(r'^ngrams$', views.ngrams), url(r'^ngrams$', views.ngrams),
url(r'^nodeinfo/(\d+)$', views.nodeinfo), url(r'^nodeinfo/(\d+)$', views.nodeinfo),
url(r'^tests/mvc$', views.tests_mvc), url(r'^tests/mvc$', views.tests_mvc),
url(r'^tests/mvc-listdocuments$', views.tests_mvc_listdocuments),
) )
......
...@@ -27,7 +27,7 @@ from parsing.FileParsers import * ...@@ -27,7 +27,7 @@ from parsing.FileParsers import *
# SOME FUNCTIONS # SOME FUNCTIONS
from gargantext_web.settings import DEBUG
from django.http import * from django.http import *
from django.shortcuts import render_to_response,redirect from django.shortcuts import render_to_response,redirect
from django.template import RequestContext from django.template import RequestContext
...@@ -266,8 +266,12 @@ def project(request, project_id): ...@@ -266,8 +266,12 @@ def project(request, project_id):
) )
try: try:
corpus.workflow() #corpus.parse_and_extract_ngrams()
#corpus.workflow((), countdown=3) #corpus.parse_and_extract_ngrams.apply_async((), countdown=3)
if DEBUG is True:
corpus.workflow()
else:
corpus.workflow.apply_async((), countdown=3)
except Exception as error: except Exception as error:
print(error) print(error)
...@@ -547,38 +551,48 @@ def chart(request, project_id, corpus_id): ...@@ -547,38 +551,48 @@ def chart(request, project_id, corpus_id):
t = get_template('chart.html') t = get_template('chart.html')
user = request.user user = request.user
date = datetime.datetime.now() date = datetime.datetime.now()
project = Node.objects.get(id=project_id) project = Node.objects.get(id=project_id)
corpus = Node.objects.get(id=corpus_id)
html = t.render(Context({ html = t.render(Context({
'user': user, 'user' : user,
'date': date, 'date' : date,
'project' : project, 'project' : project,
'corpus' : corpus,
})) }))
return HttpResponse(html) return HttpResponse(html)
def matrix(request, corpus_id): def matrix(request, project_id, corpus_id):
t = get_template('matrix.html') t = get_template('matrix.html')
user = request.user user = request.user
date = datetime.datetime.now() date = datetime.datetime.now()
project = Node.objects.get(id=project_id)
corpus = Node.objects.get(id=corpus_id) corpus = Node.objects.get(id=corpus_id)
html = t.render(Context({\ html = t.render(Context({\
'user': user,\ 'user' : user,\
'date': date,\ 'date' : date,\
'corpus': corpus,\ 'corpus' : corpus,\
'project' : project,\
})) }))
return HttpResponse(html) return HttpResponse(html)
def graph(request, corpus_id): def graph(request, project_id, corpus_id):
t = get_template('explorer.html') t = get_template('explorer.html')
user = request.user user = request.user
date = datetime.datetime.now() date = datetime.datetime.now()
project = Node.objects.get(id=project_id)
corpus = Node.objects.get(id=corpus_id) corpus = Node.objects.get(id=corpus_id)
html = t.render(Context({\ html = t.render(Context({\
'user': user,\ 'user' : user,\
'date': date,\ 'date' : date,\
'corpus': corpus,\ 'corpus' : corpus,\
'project' : project,\
})) }))
return HttpResponse(html) return HttpResponse(html)
...@@ -728,6 +742,17 @@ def tests_mvc(request): ...@@ -728,6 +742,17 @@ def tests_mvc(request):
})) }))
return HttpResponse(html) return HttpResponse(html)
def tests_mvc_listdocuments(request):
'''Just a test page for Javascript MVC.'''
t = get_template('tests/mvc-listdocuments.html')
user = request.user
date = datetime.datetime.now()
html = t.render(Context({
'user': user,
'date': date,
}))
return HttpResponse(html)
def ngrams(request): def ngrams(request):
'''The ngrams list.''' '''The ngrams list.'''
t = get_template('ngrams.html') t = get_template('ngrams.html')
......
...@@ -87,7 +87,7 @@ var groupings = { ...@@ -87,7 +87,7 @@ var groupings = {
// Define the application // Define the application
var gargantext = angular.module('Gargantext', ['n3-charts.linechart', 'ngCookies']) var gargantext = angular.module('Gargantext', ['n3-charts.linechart', 'ngCookies']);
// Customize the application's scope // Customize the application's scope
...@@ -168,7 +168,7 @@ gargantext.controller("QueryController", function($scope, $http) { ...@@ -168,7 +168,7 @@ gargantext.controller("QueryController", function($scope, $http) {
// change view to loading mode // change view to loading mode
$scope.loading = true; $scope.loading = true;
// query parameters: columns // query parameters: columns
var retrieve = {type: 'fields', list: ['id', 'name']}; var retrieve = {type: 'fields', list: ['id', 'name', 'metadata.publication_date']};
// query parameters: pagination // query parameters: pagination
var pagination = $scope.pagination; var pagination = $scope.pagination;
// query parameters: sort // query parameters: sort
...@@ -200,13 +200,27 @@ gargantext.controller("QueryController", function($scope, $http) { ...@@ -200,13 +200,27 @@ gargantext.controller("QueryController", function($scope, $http) {
// send query to the server // send query to the server
$http.post(url, query).success(function(response){ $http.post(url, query).success(function(response){
$scope.resultsCount = response.pagination.total; $scope.resultsCount = response.pagination.total;
$scope.results = response.data; $scope.results = response.results;
$scope.columns = response.retrieve;
$scope.loading = false; $scope.loading = false;
}).error(function(response){ }).error(function(response){
console.error(response); console.error(response);
}); });
} }
} }
// change current page
$scope.decrement = function() {
if ($scope.pagination.offset > 0) {
$scope.pagination.offset--;
}
$scope.postQuery();
};
$scope.increment = function() {
if ($scope.pagination.offset < $scope.resultsCount) {
$scope.pagination.offset += $scope.pagination.limit;
}
$scope.postQuery();
};
}); });
// Controller for datasets // Controller for datasets
...@@ -220,10 +234,17 @@ gargantext.controller("DatasetController", function($scope, $http) { ...@@ -220,10 +234,17 @@ gargantext.controller("DatasetController", function($scope, $http) {
$scope.results = []; $scope.results = [];
$scope.resultsCount = undefined; $scope.resultsCount = undefined;
// corpus retrieval // corpus retrieval
$scope.projects = [];
$scope.corpora = []; $scope.corpora = [];
$http.get('/api/nodes?type=Corpus', {cache: true}).success(function(response){ $http.get('/api/nodes?type=Project', {cache: true}).success(function(response){
$scope.corpora = response.data; $scope.projects = response.data;
}); });
// update corpora according to the select parent project
$scope.updateCorpora = function() {
$http.get('/api/nodes?type=Corpus&parent=' + $scope.projectId, {cache: true}).success(function(response){
$scope.corpora = response.data;
});
};
// update entities depending on the selected corpus // update entities depending on the selected corpus
$scope.updateEntities = function() { $scope.updateEntities = function() {
var url = '/api/nodes/' + $scope.corpusId + '/children/metadata'; var url = '/api/nodes/' + $scope.corpusId + '/children/metadata';
...@@ -302,7 +323,7 @@ gargantext.controller("GraphController", function($scope, $http, $element) { ...@@ -302,7 +323,7 @@ gargantext.controller("GraphController", function($scope, $http, $element) {
options: { options: {
axes: { axes: {
x: {key: 'x', type: 'date'}, x: {key: 'x', type: 'date'},
y: {type: 'log'}, y: {type: 'linear', type: 'numeric'},
}, },
tension: 1.0, tension: 1.0,
lineMode: 'bundle', lineMode: 'bundle',
...@@ -363,15 +384,27 @@ gargantext.controller("GraphController", function($scope, $http, $element) { ...@@ -363,15 +384,27 @@ gargantext.controller("GraphController", function($scope, $http, $element) {
}); });
}); });
// Convert this object back to a sorted array // Convert this object back to a sorted array
var yMin, yMax;
var linearData = []; var linearData = [];
for (var x in dataObject) { for (var x in dataObject) {
var row = {x: convert(x)}; var row = {x: convert(x)};
var yList = dataObject[x]; var yList = dataObject[x];
for (var i=0; i<yList.length; i++) { for (var i=0; i<yList.length; i++) {
row['y' + i] = yList[i]; y = yList[i];
row['y' + i] = y;
if (yMax == undefined || y > yMax) {
yMax = y;
}
if (yMin == undefined || y < yMin) {
yMin = y;
}
} }
linearData.push(row); linearData.push(row);
} }
// Update the axis
$scope.graph.options.axes.y.min = yMin;
$scope.graph.options.axes.y.max = yMax;
$scope.graph.options.axes.y.ticks = 100;
// Finally, update the graph // Finally, update the graph
var series = []; var series = [];
for (var i=0, n=$scope.datasets.length; i<n; i++) { for (var i=0, n=$scope.datasets.length; i<n; i++) {
......
...@@ -13,8 +13,7 @@ ...@@ -13,8 +13,7 @@
<div class="container theme-showcase" role="main"> <div class="container theme-showcase" role="main">
<div class="jumbotron"> <div class="jumbotron">
<h1>{{ project.name }}</h1> <h1>Advanced charts</h1>
<p>Advanced charts</p>
</div> </div>
</div> </div>
...@@ -22,7 +21,7 @@ ...@@ -22,7 +21,7 @@
<div id="test-container"></div> <div id="test-container"></div>
</div> </div>
<!-- All the templates used by the Javascript framework --> <!-- All the templates used by the Javascript framework -->
{% verbatim %} {% verbatim %}
<!-- <!--
<script type="text/template" id="filter-template"> <script type="text/template" id="filter-template">
...@@ -227,10 +226,10 @@ ...@@ -227,10 +226,10 @@
<div class="corpus"> <div class="corpus">
<button ng-click="removeDataset($index)" title="remove this dataset">X</button> <button ng-click="removeDataset($index)" title="remove this dataset">X</button>
<select ng-model="mesured" style="background-color:{{ getColor($index, datasets.length) }}" ng-options="value as key for (key, value) in {'Documents count': 'nodes.count', 'Ngrams count': 'ngrams.count'}" ng-change="updateQuery()"></select> <select ng-model="mesured" style="background-color:{{ getColor($index, datasets.length) }}" ng-options="value as key for (key, value) in {'Documents count': 'nodes.count', 'Ngrams count': 'ngrams.count'}" ng-change="updateQuery()"></select>
in the corpus in the project
<select ng-model="corpusId" ng-change="updateEntities()"> <select ng-model="projectId" ng-change="updateCorpora()" ng-options="project.id as project.name for project in projects"></select>,
<option ng-repeat="corpus in corpora" value="{{corpus.id}}">{{corpus.name}}</option> corpus
</select> <select ng-model="corpusId" ng-change="updateEntities()" ng-options="corpus.id as corpus.name for corpus in corpora"></select>
</div> </div>
<div class="filters" ng-if="entities"> <div class="filters" ng-if="entities">
<ul> <ul>
...@@ -273,7 +272,7 @@ ...@@ -273,7 +272,7 @@
<br/> <br/>
Y-axis: use a Y-axis: use a
<select ng-model="graph.options.axes.y.type" ng-options="type for type in ['log', 'linear']"></select> <select ng-model="graph.options.axes.y.type" ng-options="type for type in ['linear', 'log']"></select>
scale scale
<br/> <br/>
...@@ -359,4 +358,3 @@ ...@@ -359,4 +358,3 @@
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
<div class="col-md-4"> <div class="col-md-4">
<div class="jumbotron"> <div class="jumbotron">
<h3><a href="/corpus/{{corpus.id}}/matrix">Matrix</a></h3> <h3><a href="/project/{{project.id}}/corpus/{{corpus.id}}/matrix">Matrix</a></h3>
<ol> <ol>
<li>Sort</li> <li>Sort</li>
<li>Group</li> <li>Group</li>
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
<div class="col-md-4"> <div class="col-md-4">
<div class="jumbotron"> <div class="jumbotron">
<h3><a href="/corpus/{{ corpus.id }}/explorer">Graph</a></h3> <h3><a href="/project/{{project.id}}/corpus/{{ corpus.id }}/explorer">Graph</a></h3>
<ol> <ol>
<li>Visualize</li> <li>Visualize</li>
<li>Explore</li> <li>Explore</li>
......
...@@ -22,9 +22,16 @@ ...@@ -22,9 +22,16 @@
<div class="navbar-collapse collapse"> <div class="navbar-collapse collapse">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li><a href="/admin/">Admin</a></li> <!-- <li><a href="/admin/">Admin/</a></li> --!>
<li><a href="/projects/">Projects</a></li> <li><a href="/projects/">Projects/</a></li>
<li><a href="/projects/">Corpus</a></li> {% if project %}
<li><a href="/project/{{project.id}}">{{project.name}}/</a></li>
{% endif %}
{% if corpus %}
<li><a href="/project/{{project.id}}/corpus/{{corpus.id}}">{{corpus.name}}/</a></li>
{% endif %}
</ul> </ul>
<ul class="nav pull-right"> <ul class="nav pull-right">
......
{% extends "menu.html" %}
{% block css %}
<!-- {% load staticfiles %} -->
<link rel="stylesheet" href="{% static "css/bootstrap.css" %}">
<link rel="stylesheet" href="{% static "css/bootstrap-theme.min.css" %}">
<title>GarganText: Analyze your data with graphs</title>
{% endblock %}
{% block content %}
<div class="container theme-showcase" role="main">
<div class="jumbotron">
<h1>MVC testing</h1>
<p>Implementation of the MVC architecture with various javascript frameworks.</p>
</div>
</div>
<div class="container">
<div id="test-container"></div>
</div>
<!-- All the templates used by the Javascript framework -->
{% verbatim %}
<!--
<script type="text/template" id="filter-template">
<span>...where</span>
<select name="entity">
<option value="metadata">metadata</option>
<option value="ngrams">ngrams</option>
</select>
<span class="entity metadata">
<select name="key"><% _.each(metadataList, function(metadata){ %>
<option><%= metadata.name %></option>
<% }); %></select>
</span>
<span class="entity ngrams">
<select name="key">
<option value="terms">terms</option>
<option value="n">terms count</option>
</select>
</span>
<select name="operator"></select>
<input name="value" />
<button class="remove">X</button>
</script>
<script type="text/template" id="filterlist-template">
<ul class="filters"></ul>
<button class="add">Add a filter...</button>
</script>
<script type="text/template" id="nodesquery-template">
<div ng-include="'filterlist-template'"></div>
</script>
-->
<!--
<script type="text/ejs" id="FilterView">
<li>
<span>...where the</span>
<select name="entity">
<option>metadata</option>
<option>ngrams</option>
</select>
<span class="entity metadata">
<select name="key"></select>
</span>
<span class="entity ngrams">
<select name="key">
<option value="terms">terms</option>
<option value="n">terms count</option>
</select>
</span>
</li>
</script>
<script type="text/ejs" id="FilterListView">
<div class="filters">
<ul class="filters"></ul>
<button class="create">Add a filter</button>
</div>
</script>
-->
{% endverbatim %}
<script type="text/javascript" src="{% static "js/jquery/jquery.min.js" %}"></script>
{% verbatim %}
<!--
<div ng-app="Gargantext" ng-controller="FilterListController">
<ul>
<li ng-repeat="(filterIndex, filter) in filters">
<span>...where the </span>
<select ng-model="filter.entity">
<option ng-repeat="(entityName, entityColumns) in entities" value="{{entityName}}">{{entityName}}</option>
</select>
<span ng-if="filter.entity">
<select ng-model="filter.column">
<option ng-repeat="column in entities[filter.entity] | orderBy:'key'" value="{{column.key}}">{{column.key}}</option>
</select>
<span ng-if="filter.column">
<span ng-repeat="column in entities[filter.entity] | filter : {'key':filter.column} : strict">
<select ng-model="filter.operator">
<option ng-repeat="operator in operators[column.type]" value="{{operator.key}}">{{operator.label}}</option>
</select>
<input type="text" ng-model="filter.value">
</span>
</span>
</span>
<button ng-click="removeFilter(filterIndex)" title="remove this filter">X</button>
</li>
</ul>
<button ng-click="addFilter()">Add a filter...</button>
</div>
-->
<style type="text/css">
div.corpus button:first-child+select {color:#FFF;}
div.list-results table {border-collapse: collapse;}
div.list-results th, div.list-results td {border: solid 1px #888; padding: 0.5em;}
div.list-results th {background: #444; color: #FFF}
div.list-results tr:nth-child(even) td {background: #FFF; color: #111}
div.list-results tr:nth-child(odd) td {background: #EEE; color: #000}
</style>
<!--
TODO: use inclusions
SEE: http://stackoverflow.com/questions/17801988/dynamically-loading-controllers-and-ng-include
-->
<div class="container">
<div ng-app="Gargantext" ng-controller="QueryController">
<div class="corpus">
Chosen corpus:
<select ng-model="corpusId" ng-change="updateEntities(); postQuery();">
<option ng-repeat="corpus in corpora" value="{{corpus.id}}">{{corpus.name}}</option>
</select>
</div>
<div class="filters" ng-if="corpusId">
<hr/>
<ul>
<li ng-repeat="(filterIndex, filter) in filters">
<span>...where the </span>
<select ng-model="filter.entity">
<option ng-repeat="(entityName, entityColumns) in entities" value="{{entityName}}">{{entityName}}</option>
</select>
<span ng-if="filter.entity">
<select ng-model="filter.column">
<option ng-repeat="column in entities[filter.entity] | orderBy:'key'" value="{{column.key}}">{{column.key}}</option>
</select>
<span ng-if="filter.column">
<span ng-repeat="column in entities[filter.entity] | filter : {'key':filter.column} : strict">
<select ng-model="filter.operator">
<option ng-repeat="operator in operators[column.type]" value="{{operator.key}}">{{operator.label}}</option>
</select>
<input type="text" ng-model="filter.value">
</span>
</span>
</span>
<button ng-click="removeFilter(filterIndex)" title="remove this filter">X</button>
</li>
</ul>
<button ng-click="addFilter()">Add a filter...</button>
</div>
<div class="results" ng-if="corpusId">
<hr/>
<button ng-if="corpusId" ng-click="postQuery()">Refresh results</button>
<div class="list">
<div class="list-pagination">
<select ng-model="pagination.limit" ng-options="limit for limit in [5, 10, 20, 50, 100]" ng-change="postQuery();"></select>
results per page
<span ng-if="resultsCount != undefined">
showing page
<button ng-click="decrement()">-</button>
<select ng-model="pagination.offset" ng-options="x as Math.round(1+x/pagination.limit) for x in range(0, resultsCount+1, pagination.limit)" ng-change="postQuery();"></select>
<button ng-click="increment()">+</button>
out of
{{ Math.ceil(resultsCount / pagination.limit) }}
<strong>({{resultsCount}}</strong> results found)
</span>
</div>
<div class="list-wait" ng-if="loading">
<em>Loading, please wait...</em>
</div>
<div class="list-results" ng-if="!loading &amp;&amp; resultsCount != undefined">
<div ng-if="!resultsCount">
<em>No results were found.</em>
</div>
<table ng-if="resultsCount">
<thead>
<tr>
<th ng-repeat="key in columns">{{key}}</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="result in results">
<td ng-repeat="value in result">{{value}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!--
<div ng-app="Gargantext" ng-controller="GraphController">
<ul class="datasets">
<button class="add" ng-click="addDataset()">Add a dataset...</button>
<li class="dataset" ng-controller="DatasetController" ng-repeat="dataset in datasets">
<hr/>
<div class="corpus">
<button ng-click="removeDataset($index)" title="remove this dataset">X</button>
<select ng-model="mesured" style="background-color:{{ getColor($index, datasets.length) }}" ng-options="value as key for (key, value) in {'Documents count': 'nodes.count', 'Ngrams count': 'ngrams.count'}" ng-change="updateQuery()"></select>
in the corpus
<select ng-model="corpusId" ng-change="updateEntities()">
<option ng-repeat="corpus in corpora" value="{{corpus.id}}">{{corpus.name}}</option>
</select>
</div>
<div class="filters" ng-if="entities">
<ul>
<li ng-repeat="filter in filters">
<button ng-click="removeFilter($index)" title="remove this filter">x</button>
<span>...where the </span>
<select ng-model="filter.entity">
<option ng-repeat="(entityName, entityColumns) in entities" value="{{entityName}}">{{entityName}}</option>
</select>
<span ng-if="filter.entity">
<select ng-model="filter.column">
<option ng-repeat="column in entities[filter.entity] | orderBy:'key'" value="{{column.key}}">{{column.key}}</option>
</select>
<span ng-if="filter.column" ng-repeat="column in entities[filter.entity]">
<span ng-if="column.key == filter.column">
<select ng-model="filter.operator">
<option ng-repeat="operator in operators[column.type]" value="{{operator.key}}">{{operator.label}}</option>
</select>
<input type="text" ng-model="filter.value" ng-change="updateQuery()">
</span>
</span>
</span>
</li>
</ul>
<button ng-click="addFilter()">Add a filter...</button>
</div>
</li>
</ul>
<hr/>
<button style="width:100%" class="refresh" ng-click="query()">Refresh results</button>
<div class="graph">
<linechart data="graph.data" options="graph.options"></linechart>
</div>
<div class="graph-parameters">
X-axis: groups the results by
<select ng-model="groupingKey" ng-options="key for key in ['day', 'month', 'year', 'decade', 'century']" ng-change="query()">
</select>
<br/>
Y-axis: use a
<select ng-model="graph.options.axes.y.type" ng-options="type for type in ['log', 'linear']"></select>
scale
<br/>
<hr/>
Represent data with
<select ng-model="seriesOptions.type" ng-options="type for type in ['line', 'area', 'column']" ng-change="query()"></select>
<span ng-show="seriesOptions.type == 'area'">
(<select ng-model="seriesOptions.striped" ng-options="value as key for (key, value) in {'with':true, 'without':false}" ng-change="query()"></select> stripes)
</span>
<span ng-show="seriesOptions.type == 'area' || seriesOptions.type == 'column'">
(<select ng-model="options.stacking" ng-options="value as key for (key, value) in {'with':true, 'without':false}" ng-change="query()"></select> stacking)
</span>
<br/>
<span ng-hide="seriesOptions.type == 'column'">
Line thickness:
<input ng-model="seriesOptions.thicknessNumber" type="range" min="1" max="8" ng-change="seriesOptions.thickness = seriesOptions.thicknessNumber + 'px'; query()" />
<br/>
Interpolation:
<select ng-model="graph.options.lineMode">
<option ng-repeat="mode in ['bundle', 'linear']" value="{{ mode }}">{{ mode }}</option>
</select>
<span ng-if="graph.options.lineMode != 'linear'">
with a tension of
<input type="text" disabled="disabled" ng-model="graph.options.tension" />
<input type="range" min="0" max="2" step=".1" ng-model="graph.options.tension" />
</span>
</span>
</div>
</div>
-->
</div>
<!--
<div ng-app="Gargantext" ng-controller="FilterController">
<span>...where the </span>
<select ng-model="entityName">
<option ng-repeat="(entityName, entityColumns) in entities" value="{{entityName}}">{{entityName}}</option>
</select>
<span ng-if="entityName">
<select ng-model="entityColumn.key">
<option ng-repeat="entityColumn in entities[entityName] | orderBy:'key'" value="{{entityColumn.key}}">{{entityColumn.key}}</option>
</select>
<span ng-if="entityColumn.key">
<span ng-repeat="entityColumn in entities[entityName] | filter : entityColumn : strict">
<select ng-model="operator.key">
<option ng-repeat="operator in operators[entityColumn.type]" value="{{operator.key}}">{{operator.label}}</option>
</select>
<input type="text">
</span>
</span>
</span>
</div>
-->
{% endverbatim %}
<script type="text/javascript" src="{% static "js/angular.min.js" %}"></script>
<script type="text/javascript" src="{% static "js/angular-cookies.min.js" %}"></script>
<script type="text/javascript" src="{% static "js/d3/d3.v2.min.js" %}"></script>
<script type="text/javascript" src="{% static "js/d3/n3.line-chart.min.js" %}"></script>
<!-- <script type="text/javascript" src="{% static "js/d3/angular-charts.js" %}"></script> -->
<script type="text/javascript" src="{% static "js/gargantext.angular.js" %}"></script>
<!--
<script type="text/javascript" src="{% static "js/underscore-min.js" %}"></script>
<script type="text/javascript" src="{% static "js/backbone.js" %}"></script>
<script type="text/javascript" src="{% static "js/gargantext.backbone.js" %}"></script>
<script type="text/javascript">
var filterList = new FilterListView({nodeId: 39576});
filterList.render().$el.appendTo('#test-container');
</script>
-->
<!--
<script type="text/javascript" src="{% static "js/can.custom.js" %}"></script>
<script type="text/javascript" src="{% static "js/gargantext.can.js" %}"></script>
<script type="text/javascript">
var f = new FilterListController('#test-container', {parent: 39576});
</script>
-->
{% endblock %}
...@@ -227,10 +227,10 @@ ...@@ -227,10 +227,10 @@
<div class="corpus"> <div class="corpus">
<button ng-click="removeDataset($index)" title="remove this dataset">X</button> <button ng-click="removeDataset($index)" title="remove this dataset">X</button>
<select ng-model="mesured" style="background-color:{{ getColor($index, datasets.length) }}" ng-options="value as key for (key, value) in {'Documents count': 'nodes.count', 'Ngrams count': 'ngrams.count'}" ng-change="updateQuery()"></select> <select ng-model="mesured" style="background-color:{{ getColor($index, datasets.length) }}" ng-options="value as key for (key, value) in {'Documents count': 'nodes.count', 'Ngrams count': 'ngrams.count'}" ng-change="updateQuery()"></select>
in the corpus in the project
<select ng-model="corpusId" ng-change="updateEntities()"> <select ng-model="projectId" ng-change="updateCorpora()" ng-options="project.id as project.name for project in projects"></select>,
<option ng-repeat="corpus in corpora" value="{{corpus.id}}">{{corpus.name}}</option> corpus
</select> <select ng-model="corpusId" ng-change="updateEntities()" ng-options="corpus.id as corpus.name for corpus in corpora"></select>
</div> </div>
<div class="filters" ng-if="entities"> <div class="filters" ng-if="entities">
<ul> <ul>
...@@ -273,7 +273,7 @@ ...@@ -273,7 +273,7 @@
<br/> <br/>
Y-axis: use a Y-axis: use a
<select ng-model="graph.options.axes.y.type" ng-options="type for type in ['log', 'linear']"></select> <select ng-model="graph.options.axes.y.type" ng-options="type for type in ['linear', 'log']"></select>
scale scale
<br/> <br/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment