Commit 6010bc3d authored by delanoe's avatar delanoe

Merge branch 'refactoring' into refactoring-dev

Merge to dev
parents 9e4e1631 df0bff06
from django.contrib.auth import models from django.contrib.auth import models
from gargantext.util.db import * from gargantext.util.db import *
from datetime import datetime
__all__ = ['User'] __all__ = ['User']
class User(Base): class User(Base):
# Do not change!
# The properties below are a reflection of Django's auth module's models. # The properties below are a reflection of Django's auth module's models.
__tablename__ = models.User._meta.db_table __tablename__ = models.User._meta.db_table
id = Column(Integer, primary_key=True) id = Column(Integer, primary_key=True)
password = Column(String(128)) password = Column(String(128))
last_login = DateTime(timezone=False)
is_superuser = Column(Boolean(), default=False) is_superuser = Column(Boolean(), default=False)
username = Column(String(30)) is_staff = Column(Boolean(), default=False)
first_name = Column(String(30)) username = Column(String(30))
last_name = Column(String(30)) first_name = Column(String(30), default="")
email = Column(String(75)) last_name = Column(String(30), default="")
is_staff = Column(Boolean()) email = Column(String(75))
is_active = Column(Boolean()) is_active = Column(Boolean(), default=True)
date_joined = DateTime(timezone=False) last_login = Column(DateTime(timezone=False))
date_joined = Column(DateTime(timezone=False), default=datetime.now)
def contacts(self): def contacts(self):
"""get all contacts in relation with the user""" """get all contacts in relation with the user"""
......
...@@ -13,7 +13,6 @@ from django.conf.urls import include, url ...@@ -13,7 +13,6 @@ from django.conf.urls import include, url
from django.contrib import admin from django.contrib import admin
import gargantext.views.api.urls import gargantext.views.api.urls
import gargantext.views.generated.urls
import gargantext.views.pages.urls import gargantext.views.pages.urls
# Module Annotation # Module Annotation
...@@ -30,7 +29,6 @@ from graphExplorer.views import explorer ...@@ -30,7 +29,6 @@ from graphExplorer.views import explorer
from scrapers import urls as scrapers_urls from scrapers import urls as scrapers_urls
urlpatterns = [ url(r'^admin/' , admin.site.urls ) urlpatterns = [ url(r'^admin/' , admin.site.urls )
, url(r'^generated/' , include( gargantext.views.generated.urls ))
, url(r'^api/' , include( gargantext.views.api.urls ) ) , url(r'^api/' , include( gargantext.views.api.urls ) )
, url(r'^' , include( gargantext.views.pages.urls ) ) , url(r'^' , include( gargantext.views.pages.urls ) )
......
...@@ -12,9 +12,10 @@ def get_engine(): ...@@ -12,9 +12,10 @@ def get_engine():
url = 'postgresql+psycopg2://{USER}:{PASSWORD}@{HOST}:{PORT}/{NAME}'.format( url = 'postgresql+psycopg2://{USER}:{PASSWORD}@{HOST}:{PORT}/{NAME}'.format(
**settings.DATABASES['default'] **settings.DATABASES['default']
) )
return create_engine(url, return create_engine( url
use_native_hstore = True, , use_native_hstore = True
json_serializer = json_dumps, , json_serializer = json_dumps
, pool_size=20, max_overflow=0
) )
engine = get_engine() engine = get_engine()
......
...@@ -11,7 +11,7 @@ class RISParser(Parser): ...@@ -11,7 +11,7 @@ class RISParser(Parser):
# #super(Parser, self).__init__() # #super(Parser, self).__init__()
# #super(Parser, self).__init__() # #super(Parser, self).__init__()
# self._languages_cache = LanguagesCache() if language_cache is None else language_cache # self._languages_cache = LanguagesCache() if language_cache is None else language_cache
_begin = 6 _begin = 6
_parameters = { _parameters = {
...@@ -29,13 +29,13 @@ class RISParser(Parser): ...@@ -29,13 +29,13 @@ class RISParser(Parser):
} }
def parse(self, file): def parse(self, file):
hyperdata = {} hyperdata = {}
last_key = None last_key = None
last_values = [] last_values = []
# browse every line of the file # browse every line of the file
for line in file: for line in file:
if len(line) > 2: if len(line) > 2 :
# extract the parameter key # extract the parameter key
parameter_key = line[:2] parameter_key = line[:2]
if parameter_key != b' ' and parameter_key != last_key: if parameter_key != b' ' and parameter_key != last_key:
...@@ -60,11 +60,4 @@ class RISParser(Parser): ...@@ -60,11 +60,4 @@ class RISParser(Parser):
print(error) print(error)
# if a hyperdata object is left in memory, yield it as well # if a hyperdata object is left in memory, yield it as well
if hyperdata: if hyperdata:
# try:
# if hyperdata['date_to_parse']:
# print(hyperdata['date_to_parse'])
# except:
# pass
#
#print(hyperdata['title'])
yield hyperdata yield hyperdata
...@@ -3,6 +3,7 @@ import dateutil.parser ...@@ -3,6 +3,7 @@ import dateutil.parser
import zipfile import zipfile
import re import re
import dateparser as date_parser
from gargantext.util.languages import languages from gargantext.util.languages import languages
...@@ -50,7 +51,7 @@ class Parser: ...@@ -50,7 +51,7 @@ class Parser:
default=DEFAULT_DATE default=DEFAULT_DATE
).strftime("%Y-%m-%d %H:%M:%S") ).strftime("%Y-%m-%d %H:%M:%S")
except Exception as error: except Exception as error:
print(error, 'Parser Zotero, Date not parsed for:', date_string) print(error, 'Date not parsed for:', date_string)
hyperdata['publication_date'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") hyperdata['publication_date'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
...@@ -75,8 +76,21 @@ class Parser: ...@@ -75,8 +76,21 @@ class Parser:
date_string += ":" + hyperdata[key] date_string += ":" + hyperdata[key]
try: try:
hyperdata[prefix + "_date"] = dateutil.parser.parse(date_string).strftime("%Y-%m-%d %H:%M:%S") hyperdata[prefix + "_date"] = dateutil.parser.parse(date_string).strftime("%Y-%m-%d %H:%M:%S")
except: except Exception as error:
pass try:
print(error, date_string)
# Date format: 1994 NOV-DEC
hyperdata[prefix + "_date"] = date_parser.parse(str(date_string)[:8]).strftime("%Y-%m-%d %H:%M:%S")
except Exception as error:
try:
print(error)
# FIXME Date format: 1994 SPR
# By default, we take the year only
hyperdata[prefix + "_date"] = date_parser.parse(str(date_string)[:4]).strftime("%Y-%m-%d %H:%M:%S")
except Exception as error:
print(error)
else: else:
print("WARNING: Date unknown at _Parser level, using now()") print("WARNING: Date unknown at _Parser level, using now()")
hyperdata['publication_date'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") hyperdata['publication_date'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
......
...@@ -297,6 +297,85 @@ class ListChange(APIView): ...@@ -297,6 +297,85 @@ class ListChange(APIView):
return(base_list, change_list) return(base_list, change_list)
class MapListGlance(APIView):
"""
Fast infos about the maplist only
HOST/api/ngramlists/glance?corpus=2
HOST/api/ngramlists/glance?maplist=92
REST Parameters:
"maplist=92"
the maplist to retrieve
"corpus=ID"
alternatively, the corpus to which the maplist belongs
"""
def get(self, request):
parameters = get_parameters(request)
maplist_id = None
scores_id = None
if "corpus" in parameters:
corpus_id = parameters['corpus']
corpus = cache.Node[corpus_id]
maplist_id = corpus.children('MAPLIST').first().id
# with a corpus_id, the explicit scoring pointer is optional
if "scoring" in parameters:
scores_id = parameters['scoring']
else:
scores_id = corpus.children('OCCURRENCES').first().id
elif "maplist" in parameters and "scoring" in parameters:
maplist_id = int(parameters['mainlist'])
scores_id = int(parameters['scoring'])
else:
raise ValidationException("A 'corpus' id or 'maplist' id is required, and a 'scoring' for occurences counts")
ngraminfo = {} # ngram details sorted per ngram id
listmembers = {'maplist':[]} # ngram ids sorted per list name
# infos for all ngrams from maplist
map_ngrams = _query_list(maplist_id, details=True,
scoring_metric_id= scores_id).all()
# ex: [(8805, 'mean age', 4.0),
# (1632, 'activity', 4.0),
# (8423, 'present', 2.0),
# (2928, 'objective', 2.0)]
# shortcut to useful function during loop
add_to_members = listmembers['maplist'].append
for ng in map_ngrams:
ng_id = ng[0]
ngraminfo[ng_id] = ng[1:]
# maplist ngrams will already be <=> ngraminfos
# but the client side expects a membership lookup
# as when there are multiple lists or some groupings
add_to_members(ng_id)
return JsonHttpResponse({
'ngraminfos' : ngraminfo,
'listmembers' : listmembers,
'links' : {}, # no grouping links sent during glance (for speed)
'nodeids' : {
'mainlist': None,
'maplist' : maplist_id,
'stoplist': None,
'groups': None,
'scores': None,
}
})
class ListFamily(APIView): class ListFamily(APIView):
""" """
Compact combination of *multiple* list info Compact combination of *multiple* list info
...@@ -320,7 +399,7 @@ class ListFamily(APIView): ...@@ -320,7 +399,7 @@ class ListFamily(APIView):
REST Parameters: REST Parameters:
"head=20" "head=20"
use pagination to only load the k top ngrams of the mainlist use pagination to only load the k top ngrams of the mainlist
(useful for fast loading of terms view) (useful for fast loading of terms view) [CURRENTLY NOT USED]
"corpus=ID" "corpus=ID"
the corpus id to retrieve all 4 lists the corpus id to retrieve all 4 lists
"scoring=ID" "scoring=ID"
......
...@@ -21,10 +21,13 @@ urlpatterns = [ url(r'^nodes$' , nodes.NodeListResource.as_view() ...@@ -21,10 +21,13 @@ urlpatterns = [ url(r'^nodes$' , nodes.NodeListResource.as_view()
# post data looks like : {"767":[209,640],"779":[436,265,385]}" # post data looks like : {"767":[209,640],"779":[436,265,385]}"
, url(r'^ngramlists/family$' , ngramlists.ListFamily.as_view()) , url(r'^ngramlists/family$' , ngramlists.ListFamily.as_view())
# entire combination of lists from a corpus # entire combination of lists from a corpus, dedicated to termtable
# (or any combination of lists that go together : # (or any combination of lists that go together :
# - a mainlist # - a mainlist
# - an optional stoplist # - an optional stoplist
# - an optional maplist # - an optional maplist
# - an optional grouplist # - an optional grouplist
, url(r'^ngramlists/maplist$' , ngramlists.MapListGlance.as_view())
# fast access to maplist, similarly formatted for termtable
] ]
from gargantext.util.http import *
def bootstrap(request):
template = get_template('generated/css/bootstrap.css')
css = dict()
group = "mines"
#group = "cnrs"
if group == "mines":
css['color'] = '#666666'
css['background'] = '#f8f8f7'
css['a'] = '#bd2525'
css['focus'] = '#7d1818'
css['hr'] = '#eaafae'
css['text'] = '#a2a3a2'
css['form'] = '#a5817f'
css['help'] = '#a6a6a6'
else:
css['color'] = '#E2E7EB'
css['background'] = '#8C9DAD' #container background
css['a'] = '#093558'
css['focus'] = '#556F86'
css['hr'] = '#426A8A'
css['text'] = '#214A6D'
css['form'] = '#093558'
css['help'] = '#093558'
css_data = template.render({
'css': css,
})
return HttpResponse(css_data, content_type="text/css")
from gargantext.util.http import *
def logo(request):
template = get_template('generated/img/logo.svg')
group = 'mines'
#group = 'cnrs'
if group == 'cnrs':
color = '#093558'
else:
# color of the css adapted to the logo
color = '#5A9AFF'
svg_data = template.render({
'color': color,
})
return HttpResponse(svg_data, content_type='image/svg+xml')
from django.conf.urls import include, url
from . import css, img
urlpatterns = [
url(r'^img/logo\.svg$', img.logo),
url(r'^css/bootstrap\.css', css.bootstrap),
]
from gargantext.util.http import * from django.contrib.auth import authenticate, login, logout
from django.core.urlresolvers import reverse_lazy
from django.views.generic import FormView
from django.shortcuts import redirect
from gargantext.models.users import User
from django import forms
from django.contrib import auth from gargantext.views.pages.projects import overview
from gargantext.views.pages.forms import AuthenticationForm
def login(request): class LoginView(FormView):
"""Performs user login form_class = AuthenticationForm
""" success_url = reverse_lazy(overview) #A la place de profile_view, choisir n'importe quelle vue
auth.logout(request) template_name = 'pages/main/login.html'
# if the user send her authentication data to the page
if request.method == "POST":
# /!\ pass is sent clear in POST data: use SSL
user = auth.authenticate(
username = request.POST['username'],
password = request.POST['password']
)
if user is not None and user.is_active:
auth.login(request, user)
# if "next" forwarded from the GET via the template form
if 'the_next_page' in request.POST:
return redirect(request.POST['the_next_page'])
else:
return redirect('/projects/')
# if the user wants to access the login form def form_valid(self, form):
additional_context = {} username = form.cleaned_data['username']
# if for exemple: auth/?next=/project/5/corpus/554/document/556/ password = form.cleaned_data['password']
# => we'll forward ?next="..." into template with form user = authenticate(username=username, password=password)
if 'next' in request.GET:
additional_context = {'next_page':request.GET['next']}
return render( if user is not None and user.is_active:
template_name = 'pages/auth/login.html', login(self.request, user)
request = request, return super(LoginView, self).form_valid(form)
context = additional_context, else:
) return self.form_invalid(form)
def logout(request): def out(request):
"""Logout the user, and redirect to main page """Logout the user, and redirect to main page
""" """
auth.logout(request) logout(request)
return redirect('/') return redirect('/')
from django import forms
from django.contrib.auth import (
authenticate, get_user_model, password_validation,
)
from django.contrib.auth.hashers import (
UNUSABLE_PASSWORD_PREFIX, identify_hasher,
)
from django.utils.html import format_html, format_html_join
from django.utils.text import capfirst
from django.utils.translation import ugettext, ugettext_lazy as _
from gargantext.models.users import User
class AuthenticationForm(forms.Form):
"""
Base class for authenticating users. Extend this to get a form that accepts
username/password logins.
"""
username = forms.CharField(max_length=254, widget=forms.TextInput(attrs={'class':"form-control", 'placeholder': "username"}))
password = forms.CharField(label=_("Password"), strip=False, widget=forms.PasswordInput(attrs={'class':'form-control', 'placeholder': 'Password'}))
error_messages = {
'invalid_login': _("Please enter a correct %(username)s and password. "
"Note that both fields may be case-sensitive."),
'inactive': _("This account is inactive."),
}
def __init__(self, request=None, *args, **kwargs):
"""
The 'request' parameter is set for custom auth use by subclasses.
The form data comes in via the standard 'data' kwarg.
"""
self.request = request
self.user_cache = None
super(AuthenticationForm, self).__init__(*args, **kwargs)
# Set the label for the "username" field.
UserModel = get_user_model()
self.username_field = UserModel._meta.get_field(UserModel.USERNAME_FIELD)
if self.fields['username'].label is None:
self.fields['username'].label = capfirst(self.username_field.verbose_name)
def clean(self):
username = self.cleaned_data.get('username')
password = self.cleaned_data.get('password')
if username and password:
self.user_cache = authenticate(username=username,
password=password)
if self.user_cache is None:
raise forms.ValidationError(
'Invalid data'
)
else:
self.confirm_login_allowed(self.user_cache)
return self.cleaned_data
def confirm_login_allowed(self, user):
"""
Controls whether the given User may log in. This is a policy setting,
independent of end-user authentication. This default behavior is to
allow login by active users, and reject login by inactive users.
If the given user cannot log in, this method should raise a
``forms.ValidationError``.
If the given user may log in, this method should return None.
"""
if not user.is_active:
raise forms.ValidationError(
'Compte Inactif'
)
def get_user_id(self):
if self.user_cache:
return self.user_cache.id
return None
def get_user(self):
return self.user_cache
...@@ -10,6 +10,7 @@ from gargantext.util.toolchain import parse_extract_indexhyperdata ...@@ -10,6 +10,7 @@ from gargantext.util.toolchain import parse_extract_indexhyperdata
from datetime import datetime from datetime import datetime
from collections import defaultdict from collections import defaultdict
from django.utils.translation import ugettext_lazy
import re import re
...@@ -57,7 +58,6 @@ def overview(request): ...@@ -57,7 +58,6 @@ def overview(request):
) )
from django.utils.translation import ugettext_lazy
class NewCorpusForm(forms.Form): class NewCorpusForm(forms.Form):
type = forms.ChoiceField( type = forms.ChoiceField(
choices = enumerate(resource_type['name'] for resource_type in RESOURCETYPES), choices = enumerate(resource_type['name'] for resource_type in RESOURCETYPES),
......
from django.conf.urls import url from django.conf.urls import url
from . import main, auth from . import main
from . import projects, corpora, terms from . import projects, corpora, terms
from .auth import LoginView, out
urlpatterns = [ urlpatterns = [
...@@ -12,8 +13,8 @@ urlpatterns = [ ...@@ -12,8 +13,8 @@ urlpatterns = [
# maintenance mode # maintenance mode
url(r'^maintenance/?$', main.maintenance), url(r'^maintenance/?$', main.maintenance),
# authentication # authentication
url(r'^auth/login/?$', auth.login), url(r'^auth/login/?$' , LoginView.as_view()),
url(r'^auth/logout/?$', auth.logout), url(r'^auth/logout/?$', out),
# projects # projects
url(r'^projects/?$' , projects.overview), url(r'^projects/?$' , projects.overview),
......
#!/usr/bin/env python
import sys
import os
dirname = os.path.dirname(os.path.realpath(__file__))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gargantext.settings")
# initialize Django application
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
from django.contrib.auth import password_validation
from django.contrib.auth.hashers import ( check_password
, is_password_usable
, make_password
)
from django.db import models
from django.utils.crypto import get_random_string, salted_hmac
# retrieve Django models
import django.apps
django_models = django.apps.apps.get_models()
django_models_names = set(model._meta.db_table for model in django_models)
from gargantext.util.db import session
from gargantext.models.users import User
from django.core.mail import send_mail
def make_random_password(length=10
, allowed_chars='abcdefghjkmnpqrstuvwxyz'
'ABCDEFGHJKLMNPQRSTUVWXYZ'
'0123456789'):
"""
Generate a random password with the given length and given
allowed_chars. The default value of allowed_chars does not have "I" or
"O" or letters and digits that look similar -- just to avoid confusion.
(source: django/contrib/auth)
"""
return get_random_string(length, allowed_chars)
def notify_user(username, email, password):
message = '''
Bonjour,
votre compte vient d'être créé.
Vous pouvez désormais vous connecter ici:
http://gargantext.org
Votre login est: %s
Votre mot de passe est : %s
Bientôt, il y aura une formation Gargantext (gratuite).
Inscription obligatoire pour les dernière places:
http://iscpif.fr/
Nous restons à votre disposition pour tout complément d'information.
Cordialement
--
L'équipe de Gargantext (CNRS)
''' % (username, password)
send_mail('[Gargantext] Votre accès à la plateforme', message, 'alexandre.delanoe@iscpif.fr', [email], fail_silently=False )
# add option for mass sending email
def create_user(username, email, user=None, password=None, active=False, notify=True):
if user is None:
user = User()
user.username = username
user.email = email
user.is_active = True
if password is None or password == "":
password = make_random_password()
user.password = make_password(password)
session.add(user)
session.commit()
if notify == True:
pass
#notify_user(username, email, password)
return user
def delete_user(username):
session.query(User).filter(User.username == username).delete()
def active_user(username, active=True):
'''
To get inactive, active=False
'''
user = session.query(User).filter(User.username == username).first()
user.is_active = True
user.save()
def mass_account_creation(fichier=None,init=False):
if fichier is None:
fichier = "/tmp/comptes.csv"
accounts = open(fichier, "r")
for line in accounts.readlines():
username, email, password, fin = line.split(',')
try:
user = session.query(User).filter(User.username == username).first()
print("User %s does exist already" % (username))
if init == True:
create_user(username, email, user=user, password=password, active=True, notify=True)
print("User %s updated" % (username))
except:
print("User %s does not exist already" % (username))
create_user(username, email, password=password, active=True, notify=True)
#delete_user(username)
accounts.close()
if __name__ == "__main__":
mass_account_creation(fichier=sys.argv[1], init=True)
Gargantext Gargantext
========== ==========
Install Instructions for Gargantext (CNRS).
## Install Instructions 1. [SETUP](##SETUP)
2. [INSTALL](##INSTALL)
3. [RUN](##RUN)
1) Docker way (directory install/docker) ## Support needed ?
2) Debian way (directory install/debian) See http://gargantext.org/about and tools for the community
For each solution, you need to install: ## Setup
- Debian GNU/Linux dependencies Prepare your environnement
- Configure PostgreSql
- Install Python environment
- Get the libs that need to live in /srv/gargantext_lib
Build your OS dependencies inside a docker
## Help needed ?
See http://gargantext.org/about and tools for the community ``` bash
cd /srv/gargantext/install/docker/dev
./build
```
## INSTALL
### Enter docker container
``` bash
/srv/gargantext/install/docker/enterGargantextImage
```
### Create the directories you need
``` bash
for dir in "/srv/gargantext"
"/srv/gargantext_lib"
"/srv/gargantext_static"
"/srv/gargantext_media"
"/srv/env_3-5"; do
sudo mkdir -p $dir ;
sudo chown gargantua:gargantua $dir ;
done
```
You should see:
```bash
$tree /srv
/srv
├── gargantext
├── gargantext_lib
├── gargantext_media
│   └── srv
│   └── env_3-5
└── gargantext_static
```
## Get the source code of Gargantext
```bash
cp ~/.ssh/id_rsa.pub id_rsa.pub
`
git clone ssh://gitolite@delanoe.org:1979/gargantext /srv/gargantext \
&& cd /srv/gargantext \
&& git fetch origin refactoring \
&& git checkout refactoring \
```
TODO (soon) : git clone https://gogs.iscpif.fr/gargantext.git
## Install Python environment
Inside the docker image, execute as root:
``` bash
/srv/gargantext/install/python/configure
```
## Configure PostgreSql
Inside the docker image, execute as root:
``` bash
/srv/gargantext/install/postgres/configure
```
## Get main librairies
Can be long, so be patient :)
``` bash
wget http://dl.gargantext.org/gargantext_lib.tar.bz2 \
&& sudo tar xvjf gargantext_lib.tar.bz2 --directory /srv/gargantext_lib \
&& sudo chown -R gargantua:gargantua /srv/gargantext_lib \
&& echo "Libs installed"
```
## Configure && Launch Gargantext
### Inside docker container configure the database
``` bash
service postgresql start
su gargantua
source /srv/env_3-5/bin/activate
python /srv/gargantext/dbmigrate.py
/srv/gargantext/manage.py migrate
python /srv/gargantext/dbmigrate.py
python /srv/gargantext/dbmigrate.py
python /srv/gargantext/init_accounts.py /srv/gargantext/install/init/account.csv
```
FIXME: dbmigrate need to launched several times since tables are
ordered with alphabetical order (and not dependencies order)
## RUN
Inside docker container launch Gargantext
``` bash
service postgresql start
su gargantua
source /srv/env_3-5/bin/activate
/srv/gargantext/manage.py runserver 0.0.0.0:8000
```
### Outside docker container launch browser
``` bash
chromium http://127.0.0.1:8000/
```
Click on Test Gargantext
Login : gargantua
Password : autnagrag
Enjoy :)
#A quick way to recover space (assuming site is running)
sudo docker rm `docker ps -a | grep Exited | awk '{print $1 }'`
sudo docker rmi `docker images -aq`
# list all containers
docker ps -a
# remove a container
docker rm $container_id
Docker installation # Gargantext Installation
## OS
## Debian Stretch
See install/debian
If you do not have a Debian environment, then install docker and
execute /srv/gargantext/install/docker/dev/install.sh
You need a docker image.
All the steps are explained in docker/dev/install.sh (not automatic yet).
Bug reports are welcome.
For dev: cd dev and run install
Fro prod : install dev-version, cd prod and run install
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# \____|\__,_|_| \____|\__,_|_| |_|_|\___/_/\_\\__| # # \____|\__,_|_| \____|\__,_|_| |_|_|\___/_/\_\\__| #
# # # #
########################################################### ###########################################################
# https://docs.docker.com/compose/django/
###################################################################### ######################################################################
FROM debian:stretch FROM debian:stretch
#FROM gargantext #FROM gargantext
...@@ -17,10 +17,10 @@ USER root ...@@ -17,10 +17,10 @@ USER root
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y \ apt-get install -y \
apt-utils ca-certificates locales \ apt-utils ca-certificates locales man dialog\
sudo aptitude gcc g++ wget git postgresql-9.5 vim sudo aptitude gcc g++ wget git postgresql-9.5 vim
## Configure timezone and locale ### Configure timezone and locale
RUN echo "Europe/Paris" > /etc/timezone && \ RUN echo "Europe/Paris" > /etc/timezone && \
dpkg-reconfigure -f noninteractive tzdata && \ dpkg-reconfigure -f noninteractive tzdata && \
sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen && \ sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen && \
...@@ -29,8 +29,8 @@ RUN echo "Europe/Paris" > /etc/timezone && \ ...@@ -29,8 +29,8 @@ RUN echo "Europe/Paris" > /etc/timezone && \
dpkg-reconfigure --frontend=noninteractive locales && \ dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=fr_FR.UTF-8 update-locale LANG=fr_FR.UTF-8
## Install Database, main dependencies and Python ### Install Database, main dependencies and Python
## (installing some Debian version before pip to get dependencies) ### (installing some Debian version before pip to get dependencies)
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
postgresql-server-dev-9.5 libpq-dev libxml2 \ postgresql-server-dev-9.5 libpq-dev libxml2 \
libxml2-dev xml-core libgfortran-5-dev \ libxml2-dev xml-core libgfortran-5-dev \
...@@ -41,83 +41,26 @@ RUN apt-get update && apt-get install -y \ ...@@ -41,83 +41,26 @@ RUN apt-get update && apt-get install -y \
# ^for numpy, pandas # ^for numpy, pandas
python3-numexpr \ python3-numexpr \
# ^ for numpy performance # ^ for numpy performance
libxml2-dev libxslt-dev libxml2-dev libxslt-dev \
# ^ for lxml # ^ for lxml
bzip2
# ^ for the Gargantext librairies
## PROD VERSION OF GARGANTEXT ONLY ### PROD VERSION OF GARGANTEXT ONLY
#RUN apt-get install -y uwsgi nginx uwsgi-plugin-python rabbitmq-server #RUN apt-get install -y uwsgi nginx uwsgi-plugin-python rabbitmq-server
#
# ## CREATE USER and adding it to sudo ## ## CREATE USER and adding it to sudo
# ## TODO ask user for password ## ## TODO ask user for password
RUN adduser --disabled-password --gecos "" gargantua RUN adduser --disabled-password --gecos "" gargantua
RUN apt-get install -y sudo && adduser gargantua sudo \ RUN apt-get install -y sudo && adduser gargantua sudo \
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# FIXME, it depends on postgres configuration #####################################################################
VOLUME ["/srv","/var"] # CONFIGURE POSTGRESQL
#####################################################################
# Create directories in /srv
# FIXME: not tested
RUN for dir in "/srv/gargantext"\
"/srv/gargantext_lib"\
"/srv/gargantext_static"\
"/srv/gargantext_media"\
"/srv/env_3-5"\
"/var/www/gargantext"; do \
mkdir -p $dir ;\
chown gargantua:gargantua $dir ; \
done ;\
echo "Root: END of the installation of Gargantext by Root." ;
######################################################################
## CONFIGURE POSTGRESQL
######################################################################
USER postgres
RUN /etc/init.d/postgresql start &&\
psql -c "CREATE user gargantua WITH PASSWORD 'C8kdcUrAQy66U'" &&\
createdb -O gargantua gargandb \
&& echo "Root: END of the installation of Gargantexts Database by postgres."
######################################################################
## INSTALL MAIN DEPENDENCIES
######################################################################
#USER gargantua
#
#
## Installing pip version of python libs
## Possible FIXME : if `pip install -r requirements.txt` fails
## then: fixme >> maybe (split the list)
## else: enjoy
#
## TODO: user local file requirements with docker (and not wget)
#
#RUN wget http://dl.delanoe.org/requirements.txt -o /tmp/requirements.txt \
# && /usr/bin/virtualenv --py=/usr/bin/python3.5 env_3-5 \
# && /bin/bash -c 'source env_3-5/bin/activate' \
# && /bin/bash -c 'env_3-5/bin/pip install git+https://github.com/zzzeek/sqlalchemy.git@rel_1_1' \
# && /bin/bash -c 'env_3-5/bin/pip install -r /tmp/requirements.txt'
#
## GET CONFIG FILES (need update)
#WORKDIR /tmp
#RUN wget http://dl.gargantext.org/gargantext_lib.tar.bz2 \
# && tar xvjf gargantext_lib.tar.bz2 -o /srv/gargantext_lib \
# && chown -R gargantua:gargantua /srv/gargantext_lib \
# && echo "Root: END of the installation of Gargantexts Database by postgres."
# TODO script pour peupler la base
######################################################################
# Last step as user:
## TODO (soon) : git clone https://gogs.iscpif.fr/gargantext.git
#RUN git clone ssh://gitolite@delanoe.org:1979/gargantext /srv/gargantext \
# && cd /srv/gargantext \
# && git fetch origin refactoring \
# && git checkout refactoring
RUN sed -iP "s%^data_directory.*%data_directory = \'\/srv\/gargantext_data\'%" /etc/postgresql/9.5/main/postgresql.conf
###################################################################### #####################################################################
/bin/sh: 1: Syntax error: end of file unexpected (expecting "done")
INFO[0001] The command [/bin/sh -c for dir in "/srv/gargantext" "/srv/gargantext_lib" "/srv/gargantext_static" "/srv/gargantext_media" "/srv/env_3-5" "/var/www/gargantext"; do mkdir -p $dir chown gargantua:gargantua $dir done echo "Root: END of the installation of Gargantext by Root."] returned a non-zero code: 2
#!/bin/bash
#######################################################################
# ____ _
# | _ \ ___ ___| | _____ _ __
# | | | |/ _ \ / __| |/ / _ \ '__|
# | |_| | (_) | (__| < __/ |
# |____/ \___/ \___|_|\_\___|_|
#
######################################################################
sudo docker build -t gargantext .
# OR
# cd /tmp
# wget http://dl.gargantext.org/gargantext_docker_image.tar \
# && sudo docker import - gargantext:latest < gargantext_docker_image.tar
#!/bin/bash
sudo docker export $(sudo docker ps -l | awk '{print $1}' | grep -v CONTAINER | head -n 1) > /tmp/gargantext_docker_image.tar
# To import the docker
#sudo docker import - gargantext:latest < data.tar
#sudo cat data.tar | docker import - gargantext
#/bin/bash
# in progress
## Quick Manual
## Install docker.io && sudo
## sudo docker build -t gargantext .
## docker run -i -t gargantext /bin/bash
# Install Docker
# Debian/Ubuntu: apt-get install docker
# run turboparser port, with python 3.4
#docker run -d -p 8000:8000 -v /srv:/srv -t gargantext python /srv/gargantext/gargantext.py
# launch
#cd /srv/gargantext
#source /srv/env_3-5/bin/activate &&
#docker run -d -p 8000:8000 -v /srv:/srv -t gargantext python /srv/gargantext/gargantext.py
sudo docker build -t gargantext .
../../python/requirements.txt
\ No newline at end of file
#!/bin/bash
sudo docker run -i -p 8000:8000 \
-v /srv:/srv \
-t gargantext:latest \
/bin/bash
gargantua,contact@gargantext,autnagrag,
#!/bin/bash
#######################################################################
## ____ _
## | _ \ ___ ___| |_ __ _ _ __ ___ ___
## | |_) / _ \/ __| __/ _` | '__/ _ \/ __|
## | __/ (_) \__ \ || (_| | | | __/\__ \
## |_| \___/|___/\__\__, |_| \___||___/
## |___/
#######################################################################
su postgres -c 'pg_dropcluster 9.4 main --stop'
#rm -rf /srv/gargantext_data && mkdir /srv/gargantext_data && chown postgres:postgres /srv/gargantext_data
su postgres -c '/usr/lib/postgresql/9.5/bin/initdb -D /srv/gargantext_data/'
su postgres -c '/usr/lib/postgresql/9.5/bin/pg_ctl -D /srv/gargantext_data/ -l journal_applicatif start'
#su postgres -c 'pg_createcluster -D /srv/gargantext_data 9.5 main '
#su postgres -c 'pg_ctlcluster -D /srv/gargantext_data 9.5 main start '
#su postgres -c 'pg_ctlcluster 9.5 main start'
service postgresql start
su postgres -c "psql -c \"CREATE user gargantua WITH PASSWORD 'C8kdcUrAQy66U'\""
su postgres -c "createdb -O gargantua gargandb"
echo "Postgres configured"
#!/bin/bash
ENV="/srv/env_3-5"
/usr/bin/virtualenv --py=/usr/bin/python3.5 $ENV \
&& /bin/bash -c "source ${ENV}/bin/activate" \
&& /bin/bash -c "${ENV}/bin/pip install git+https://github.com/zzzeek/sqlalchemy.git@rel_1_1" \
&& /bin/bash -c "${ENV}/bin/pip install -r /srv/gargantext/install/python/requirements.txt"
#!/bin/bash
echo "Need to finish the dependencies. So soon... :)"
...@@ -1073,8 +1073,8 @@ body { ...@@ -1073,8 +1073,8 @@ body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px; font-size: 14px;
line-height: 1.42857; line-height: 1.42857;
color: #055B9A; color: #3D81B2;
background-color: #FEFEFE; } background-color: #FCFDFE; }
input, input,
button, button,
...@@ -1085,10 +1085,10 @@ textarea { ...@@ -1085,10 +1085,10 @@ textarea {
line-height: inherit; } line-height: inherit; }
a { a {
color: #E6A811; color: #7A5A0B;
text-decoration: none; } text-decoration: none; }
a:hover, a:focus { a:hover, a:focus {
color: #9f740c; color: #342605;
text-decoration: underline; } text-decoration: underline; }
a:focus { a:focus {
outline: thin dotted; outline: thin dotted;
...@@ -1112,7 +1112,7 @@ img { ...@@ -1112,7 +1112,7 @@ img {
.img-thumbnail { .img-thumbnail {
padding: 4px; padding: 4px;
line-height: 1.42857; line-height: 1.42857;
background-color: #FEFEFE; background-color: #FCFDFE;
border: 1px solid #ddd; border: 1px solid #ddd;
border-radius: 4px; border-radius: 4px;
-webkit-transition: all 0.2s ease-in-out; -webkit-transition: all 0.2s ease-in-out;
...@@ -1129,7 +1129,7 @@ hr { ...@@ -1129,7 +1129,7 @@ hr {
margin-top: 20px; margin-top: 20px;
margin-bottom: 20px; margin-bottom: 20px;
border: 0; border: 0;
border-top: 1px solid #A8C6DC; } border-top: 1px solid #A1C2D8; }
.sr-only { .sr-only {
position: absolute; position: absolute;
...@@ -1174,7 +1174,7 @@ h1, h2, h3, h4, h5, h6, ...@@ -1174,7 +1174,7 @@ h1, h2, h3, h4, h5, h6,
.h6 .small { .h6 .small {
font-weight: normal; font-weight: normal;
line-height: 1; line-height: 1;
color: #94B8D1; } color: #71A3C7; }
h1, .h1, h1, .h1,
h2, .h2, h2, .h2,
...@@ -1272,13 +1272,13 @@ mark, ...@@ -1272,13 +1272,13 @@ mark,
text-transform: capitalize; } text-transform: capitalize; }
.text-muted { .text-muted {
color: #94B8D1; } color: #71A3C7; }
.text-primary { .text-primary {
color: #E6A811; } color: #7A5A0B; }
a.text-primary:hover { a.text-primary:hover {
color: #b7850d; } color: #4b3707; }
.text-success { .text-success {
color: #3c763d; } color: #3c763d; }
...@@ -1308,10 +1308,10 @@ a.text-danger:hover { ...@@ -1308,10 +1308,10 @@ a.text-danger:hover {
color: #fff; } color: #fff; }
.bg-primary { .bg-primary {
background-color: #E6A811; } background-color: #7A5A0B; }
a.bg-primary:hover { a.bg-primary:hover {
background-color: #b7850d; } background-color: #4b3707; }
.bg-success { .bg-success {
background-color: #dff0d8; } background-color: #dff0d8; }
...@@ -1340,7 +1340,7 @@ a.bg-danger:hover { ...@@ -1340,7 +1340,7 @@ a.bg-danger:hover {
.page-header { .page-header {
padding-bottom: 9px; padding-bottom: 9px;
margin: 40px 0 20px; margin: 40px 0 20px;
border-bottom: 1px solid #A8C6DC; } border-bottom: 1px solid #A1C2D8; }
ul, ul,
ol { ol {
...@@ -1399,7 +1399,7 @@ dd { ...@@ -1399,7 +1399,7 @@ dd {
abbr[title], abbr[title],
abbr[data-original-title] { abbr[data-original-title] {
cursor: help; cursor: help;
border-bottom: 1px dotted #94B8D1; } border-bottom: 1px dotted #71A3C7; }
.initialism { .initialism {
font-size: 90%; } font-size: 90%; }
...@@ -1408,7 +1408,7 @@ blockquote { ...@@ -1408,7 +1408,7 @@ blockquote {
padding: 10px 20px; padding: 10px 20px;
margin: 0 0 20px; margin: 0 0 20px;
font-size: 17.5px; font-size: 17.5px;
border-left: 5px solid #A8C6DC; } border-left: 5px solid #A1C2D8; }
blockquote p:last-child, blockquote p:last-child,
blockquote ul:last-child, blockquote ul:last-child,
blockquote ol:last-child { blockquote ol:last-child {
...@@ -1419,7 +1419,7 @@ blockquote { ...@@ -1419,7 +1419,7 @@ blockquote {
display: block; display: block;
font-size: 80%; font-size: 80%;
line-height: 1.42857; line-height: 1.42857;
color: #94B8D1; } color: #71A3C7; }
blockquote footer:before, blockquote footer:before,
blockquote small:before, blockquote small:before,
blockquote .small:before { blockquote .small:before {
...@@ -1429,7 +1429,7 @@ blockquote { ...@@ -1429,7 +1429,7 @@ blockquote {
blockquote.pull-right { blockquote.pull-right {
padding-right: 15px; padding-right: 15px;
padding-left: 0; padding-left: 0;
border-right: 5px solid #A8C6DC; border-right: 5px solid #A1C2D8;
border-left: 0; border-left: 0;
text-align: right; } text-align: right; }
.blockquote-reverse footer:before, .blockquote-reverse footer:before,
...@@ -1486,7 +1486,7 @@ pre { ...@@ -1486,7 +1486,7 @@ pre {
line-height: 1.42857; line-height: 1.42857;
word-break: break-all; word-break: break-all;
word-wrap: break-word; word-wrap: break-word;
color: #055B9A; color: #3D81B2;
background-color: #f5f5f5; background-color: #f5f5f5;
border: 1px solid #ccc; border: 1px solid #ccc;
border-radius: 4px; } border-radius: 4px; }
...@@ -2178,7 +2178,7 @@ table { ...@@ -2178,7 +2178,7 @@ table {
caption { caption {
padding-top: 8px; padding-top: 8px;
padding-bottom: 8px; padding-bottom: 8px;
color: #94B8D1; color: #71A3C7;
text-align: left; } text-align: left; }
th { th {
...@@ -2197,10 +2197,10 @@ th { ...@@ -2197,10 +2197,10 @@ th {
padding: 8px; padding: 8px;
line-height: 1.42857; line-height: 1.42857;
vertical-align: top; vertical-align: top;
border-top: 1px solid #055B9A; } border-top: 1px solid #3D81B2; }
.table > thead > tr > th { .table > thead > tr > th {
vertical-align: bottom; vertical-align: bottom;
border-bottom: 2px solid #055B9A; } border-bottom: 2px solid #3D81B2; }
.table > caption + thead > tr:first-child > th, .table > caption + thead > tr:first-child > th,
.table > caption + thead > tr:first-child > td, .table > caption + thead > tr:first-child > td,
.table > colgroup + thead > tr:first-child > th, .table > colgroup + thead > tr:first-child > th,
...@@ -2209,9 +2209,9 @@ th { ...@@ -2209,9 +2209,9 @@ th {
.table > thead:first-child > tr:first-child > td { .table > thead:first-child > tr:first-child > td {
border-top: 0; } border-top: 0; }
.table > tbody + tbody { .table > tbody + tbody {
border-top: 2px solid #055B9A; } border-top: 2px solid #3D81B2; }
.table .table { .table .table {
background-color: #FEFEFE; } background-color: #FCFDFE; }
.table-condensed > thead > tr > th, .table-condensed > thead > tr > th,
.table-condensed > thead > tr > td, .table-condensed > thead > tr > td,
...@@ -2222,14 +2222,14 @@ th { ...@@ -2222,14 +2222,14 @@ th {
padding: 5px; } padding: 5px; }
.table-bordered { .table-bordered {
border: 1px solid #055B9A; } border: 1px solid #3D81B2; }
.table-bordered > thead > tr > th, .table-bordered > thead > tr > th,
.table-bordered > thead > tr > td, .table-bordered > thead > tr > td,
.table-bordered > tbody > tr > th, .table-bordered > tbody > tr > th,
.table-bordered > tbody > tr > td, .table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > th, .table-bordered > tfoot > tr > th,
.table-bordered > tfoot > tr > td { .table-bordered > tfoot > tr > td {
border: 1px solid #055B9A; } border: 1px solid #3D81B2; }
.table-bordered > thead > tr > th, .table-bordered > thead > tr > th,
.table-bordered > thead > tr > td { .table-bordered > thead > tr > td {
border-bottom-width: 2px; } border-bottom-width: 2px; }
...@@ -2340,7 +2340,7 @@ table th[class*="col-"] { ...@@ -2340,7 +2340,7 @@ table th[class*="col-"] {
margin-bottom: 15px; margin-bottom: 15px;
overflow-y: hidden; overflow-y: hidden;
-ms-overflow-style: -ms-autohiding-scrollbar; -ms-overflow-style: -ms-autohiding-scrollbar;
border: 1px solid #055B9A; } border: 1px solid #3D81B2; }
.table-responsive > .table { .table-responsive > .table {
margin-bottom: 0; } margin-bottom: 0; }
.table-responsive > .table > thead > tr > th, .table-responsive > .table > thead > tr > th,
...@@ -2385,7 +2385,7 @@ legend { ...@@ -2385,7 +2385,7 @@ legend {
margin-bottom: 20px; margin-bottom: 20px;
font-size: 21px; font-size: 21px;
line-height: inherit; line-height: inherit;
color: #055B9A; color: #3D81B2;
border: 0; border: 0;
border-bottom: 1px solid #e5e5e5; } border-bottom: 1px solid #e5e5e5; }
...@@ -2429,7 +2429,7 @@ output { ...@@ -2429,7 +2429,7 @@ output {
padding-top: 7px; padding-top: 7px;
font-size: 14px; font-size: 14px;
line-height: 1.42857; line-height: 1.42857;
color: #5F97C0; } color: #508EBA; }
.form-control { .form-control {
display: block; display: block;
...@@ -2438,7 +2438,7 @@ output { ...@@ -2438,7 +2438,7 @@ output {
padding: 6px 12px; padding: 6px 12px;
font-size: 14px; font-size: 14px;
line-height: 1.42857; line-height: 1.42857;
color: #5F97C0; color: #508EBA;
background-color: #fff; background-color: #fff;
background-image: none; background-image: none;
border: 1px solid #ccc; border: 1px solid #ccc;
...@@ -2461,7 +2461,7 @@ output { ...@@ -2461,7 +2461,7 @@ output {
.form-control::-webkit-input-placeholder { .form-control::-webkit-input-placeholder {
color: #999; } color: #999; }
.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control { .form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {
background-color: #A8C6DC; background-color: #A1C2D8;
opacity: 1; } opacity: 1; }
.form-control[disabled], fieldset[disabled] .form-control { .form-control[disabled], fieldset[disabled] .form-control {
cursor: not-allowed; } cursor: not-allowed; }
...@@ -2781,7 +2781,7 @@ select[multiple].input-lg, ...@@ -2781,7 +2781,7 @@ select[multiple].input-lg,
display: block; display: block;
margin-top: 5px; margin-top: 5px;
margin-bottom: 10px; margin-bottom: 10px;
color: #279ff8; } color: #94bdda; }
@media (min-width: 768px) { @media (min-width: 768px) {
.form-inline .form-group { .form-inline .form-group {
...@@ -2912,19 +2912,19 @@ select[multiple].input-lg, ...@@ -2912,19 +2912,19 @@ select[multiple].input-lg,
.btn-primary { .btn-primary {
color: #fff; color: #fff;
background-color: #E6A811; background-color: #7A5A0B;
border-color: #ce970f; } border-color: #634909; }
.btn-primary:hover, .btn-primary:focus, .btn-primary.focus, .btn-primary:active, .btn-primary.active, .open > .btn-primary.dropdown-toggle { .btn-primary:hover, .btn-primary:focus, .btn-primary.focus, .btn-primary:active, .btn-primary.active, .open > .btn-primary.dropdown-toggle {
color: #fff; color: #fff;
background-color: #b7850d; background-color: #4b3707;
border-color: #956d0b; } border-color: #2a1f04; }
.btn-primary:active, .btn-primary.active, .open > .btn-primary.dropdown-toggle { .btn-primary:active, .btn-primary.active, .open > .btn-primary.dropdown-toggle {
background-image: none; } background-image: none; }
.btn-primary.disabled, .btn-primary.disabled:hover, .btn-primary.disabled:focus, .btn-primary.disabled.focus, .btn-primary.disabled:active, .btn-primary.disabled.active, .btn-primary[disabled], .btn-primary[disabled]:hover, .btn-primary[disabled]:focus, .btn-primary[disabled].focus, .btn-primary[disabled]:active, .btn-primary[disabled].active, fieldset[disabled] .btn-primary, fieldset[disabled] .btn-primary:hover, fieldset[disabled] .btn-primary:focus, fieldset[disabled] .btn-primary.focus, fieldset[disabled] .btn-primary:active, fieldset[disabled] .btn-primary.active { .btn-primary.disabled, .btn-primary.disabled:hover, .btn-primary.disabled:focus, .btn-primary.disabled.focus, .btn-primary.disabled:active, .btn-primary.disabled.active, .btn-primary[disabled], .btn-primary[disabled]:hover, .btn-primary[disabled]:focus, .btn-primary[disabled].focus, .btn-primary[disabled]:active, .btn-primary[disabled].active, fieldset[disabled] .btn-primary, fieldset[disabled] .btn-primary:hover, fieldset[disabled] .btn-primary:focus, fieldset[disabled] .btn-primary.focus, fieldset[disabled] .btn-primary:active, fieldset[disabled] .btn-primary.active {
background-color: #E6A811; background-color: #7A5A0B;
border-color: #ce970f; } border-color: #634909; }
.btn-primary .badge { .btn-primary .badge {
color: #E6A811; color: #7A5A0B;
background-color: #fff; } background-color: #fff; }
.btn-success { .btn-success {
...@@ -2996,7 +2996,7 @@ select[multiple].input-lg, ...@@ -2996,7 +2996,7 @@ select[multiple].input-lg,
background-color: #fff; } background-color: #fff; }
.btn-link { .btn-link {
color: #E6A811; color: #7A5A0B;
font-weight: normal; font-weight: normal;
border-radius: 0; } border-radius: 0; }
.btn-link, .btn-link:active, .btn-link.active, .btn-link[disabled], fieldset[disabled] .btn-link { .btn-link, .btn-link:active, .btn-link.active, .btn-link[disabled], fieldset[disabled] .btn-link {
...@@ -3006,11 +3006,11 @@ select[multiple].input-lg, ...@@ -3006,11 +3006,11 @@ select[multiple].input-lg,
.btn-link, .btn-link:hover, .btn-link:focus, .btn-link:active { .btn-link, .btn-link:hover, .btn-link:focus, .btn-link:active {
border-color: transparent; } border-color: transparent; }
.btn-link:hover, .btn-link:focus { .btn-link:hover, .btn-link:focus {
color: #9f740c; color: #342605;
text-decoration: underline; text-decoration: underline;
background-color: transparent; } background-color: transparent; }
.btn-link[disabled]:hover, .btn-link[disabled]:focus, fieldset[disabled] .btn-link:hover, fieldset[disabled] .btn-link:focus { .btn-link[disabled]:hover, .btn-link[disabled]:focus, fieldset[disabled] .btn-link:hover, fieldset[disabled] .btn-link:focus {
color: #94B8D1; color: #71A3C7;
text-decoration: none; } text-decoration: none; }
.btn-lg, .btn-group-lg > .btn { .btn-lg, .btn-group-lg > .btn {
...@@ -3124,22 +3124,22 @@ tbody.collapse.in { ...@@ -3124,22 +3124,22 @@ tbody.collapse.in {
clear: both; clear: both;
font-weight: normal; font-weight: normal;
line-height: 1.42857; line-height: 1.42857;
color: #055B9A; color: #3D81B2;
white-space: nowrap; } white-space: nowrap; }
.dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus { .dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus {
text-decoration: none; text-decoration: none;
color: #044c81; color: #36739f;
background-color: #f5f5f5; } background-color: #f5f5f5; }
.dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus { .dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus {
color: #fff; color: #fff;
text-decoration: none; text-decoration: none;
outline: 0; outline: 0;
background-color: #E6A811; } background-color: #7A5A0B; }
.dropdown-menu > .disabled > a, .dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus { .dropdown-menu > .disabled > a, .dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus {
color: #94B8D1; } color: #71A3C7; }
.dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus { .dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus {
text-decoration: none; text-decoration: none;
background-color: transparent; background-color: transparent;
...@@ -3165,7 +3165,7 @@ tbody.collapse.in { ...@@ -3165,7 +3165,7 @@ tbody.collapse.in {
padding: 3px 20px; padding: 3px 20px;
font-size: 12px; font-size: 12px;
line-height: 1.42857; line-height: 1.42857;
color: #94B8D1; color: #71A3C7;
white-space: nowrap; } white-space: nowrap; }
.dropdown-backdrop { .dropdown-backdrop {
...@@ -3395,9 +3395,9 @@ tbody.collapse.in { ...@@ -3395,9 +3395,9 @@ tbody.collapse.in {
font-size: 14px; font-size: 14px;
font-weight: normal; font-weight: normal;
line-height: 1; line-height: 1;
color: #5F97C0; color: #508EBA;
text-align: center; text-align: center;
background-color: #A8C6DC; background-color: #A1C2D8;
border: 1px solid #ccc; border: 1px solid #ccc;
border-radius: 4px; } border-radius: 4px; }
.input-group-addon.input-sm, .input-group-addon.input-sm,
...@@ -3477,17 +3477,17 @@ tbody.collapse.in { ...@@ -3477,17 +3477,17 @@ tbody.collapse.in {
padding: 10px 15px; } padding: 10px 15px; }
.nav > li > a:hover, .nav > li > a:focus { .nav > li > a:hover, .nav > li > a:focus {
text-decoration: none; text-decoration: none;
background-color: #A8C6DC; } background-color: #A1C2D8; }
.nav > li.disabled > a { .nav > li.disabled > a {
color: #94B8D1; } color: #71A3C7; }
.nav > li.disabled > a:hover, .nav > li.disabled > a:focus { .nav > li.disabled > a:hover, .nav > li.disabled > a:focus {
color: #94B8D1; color: #71A3C7;
text-decoration: none; text-decoration: none;
background-color: transparent; background-color: transparent;
cursor: not-allowed; } cursor: not-allowed; }
.nav .open > a, .nav .open > a:hover, .nav .open > a:focus { .nav .open > a, .nav .open > a:hover, .nav .open > a:focus {
background-color: #A8C6DC; background-color: #A1C2D8;
border-color: #E6A811; } border-color: #7A5A0B; }
.nav .nav-divider { .nav .nav-divider {
height: 1px; height: 1px;
margin: 9px 0; margin: 9px 0;
...@@ -3507,10 +3507,10 @@ tbody.collapse.in { ...@@ -3507,10 +3507,10 @@ tbody.collapse.in {
border: 1px solid transparent; border: 1px solid transparent;
border-radius: 4px 4px 0 0; } border-radius: 4px 4px 0 0; }
.nav-tabs > li > a:hover { .nav-tabs > li > a:hover {
border-color: #A8C6DC #A8C6DC #ddd; } border-color: #A1C2D8 #A1C2D8 #ddd; }
.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus { .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
color: #5F97C0; color: #508EBA;
background-color: #FEFEFE; background-color: #FCFDFE;
border: 1px solid #ddd; border: 1px solid #ddd;
border-bottom-color: transparent; border-bottom-color: transparent;
cursor: default; } cursor: default; }
...@@ -3523,7 +3523,7 @@ tbody.collapse.in { ...@@ -3523,7 +3523,7 @@ tbody.collapse.in {
margin-left: 2px; } margin-left: 2px; }
.nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus { .nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus {
color: #fff; color: #fff;
background-color: #E6A811; } background-color: #7A5A0B; }
.nav-stacked > li { .nav-stacked > li {
float: none; } float: none; }
...@@ -3568,7 +3568,7 @@ tbody.collapse.in { ...@@ -3568,7 +3568,7 @@ tbody.collapse.in {
.nav-tabs.nav-justified > .active > a:hover, .nav-tabs.nav-justified > .active > a:hover,
.nav-tabs-justified > .active > a:focus, .nav-tabs-justified > .active > a:focus,
.nav-tabs.nav-justified > .active > a:focus { .nav-tabs.nav-justified > .active > a:focus {
border-bottom-color: #FEFEFE; } } border-bottom-color: #FCFDFE; } }
.tab-content > .tab-pane { .tab-content > .tab-pane {
display: none; } display: none; }
...@@ -3913,23 +3913,23 @@ tbody.collapse.in { ...@@ -3913,23 +3913,23 @@ tbody.collapse.in {
color: #ccc; } color: #ccc; }
.navbar-inverse { .navbar-inverse {
background-color: #003C88; background-color: #065E9C;
border-color: #002555; } border-color: #04406b; }
.navbar-inverse .navbar-brand { .navbar-inverse .navbar-brand {
color: #cadbe8; } color: #a8c7dd; }
.navbar-inverse .navbar-brand:hover, .navbar-inverse .navbar-brand:focus { .navbar-inverse .navbar-brand:hover, .navbar-inverse .navbar-brand:focus {
color: #fff; color: #fff;
background-color: transparent; } background-color: transparent; }
.navbar-inverse .navbar-text { .navbar-inverse .navbar-text {
color: #cadbe8; } color: #a8c7dd; }
.navbar-inverse .navbar-nav > li > a { .navbar-inverse .navbar-nav > li > a {
color: #cadbe8; } color: #a8c7dd; }
.navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:focus { .navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:focus {
color: #fff; color: #fff;
background-color: transparent; } background-color: transparent; }
.navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:focus { .navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:focus {
color: #fff; color: #fff;
background-color: #002555; } background-color: #04406b; }
.navbar-inverse .navbar-nav > .disabled > a, .navbar-inverse .navbar-nav > .disabled > a:hover, .navbar-inverse .navbar-nav > .disabled > a:focus { .navbar-inverse .navbar-nav > .disabled > a, .navbar-inverse .navbar-nav > .disabled > a:hover, .navbar-inverse .navbar-nav > .disabled > a:focus {
color: #444; color: #444;
background-color: transparent; } background-color: transparent; }
...@@ -3941,32 +3941,32 @@ tbody.collapse.in { ...@@ -3941,32 +3941,32 @@ tbody.collapse.in {
background-color: #fff; } background-color: #fff; }
.navbar-inverse .navbar-collapse, .navbar-inverse .navbar-collapse,
.navbar-inverse .navbar-form { .navbar-inverse .navbar-form {
border-color: #002c64; } border-color: #05497a; }
.navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a:hover, .navbar-inverse .navbar-nav > .open > a:focus { .navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a:hover, .navbar-inverse .navbar-nav > .open > a:focus {
background-color: #002555; background-color: #04406b;
color: #fff; } color: #fff; }
@media (max-width: 767px) { @media (max-width: 767px) {
.navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header { .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {
border-color: #002555; } border-color: #04406b; }
.navbar-inverse .navbar-nav .open .dropdown-menu .divider { .navbar-inverse .navbar-nav .open .dropdown-menu .divider {
background-color: #002555; } background-color: #04406b; }
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a { .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
color: #cadbe8; } color: #a8c7dd; }
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus { .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
color: #fff; color: #fff;
background-color: transparent; } background-color: transparent; }
.navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus { .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {
color: #fff; color: #fff;
background-color: #002555; } background-color: #04406b; }
.navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus { .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {
color: #444; color: #444;
background-color: transparent; } } background-color: transparent; } }
.navbar-inverse .navbar-link { .navbar-inverse .navbar-link {
color: #cadbe8; } color: #a8c7dd; }
.navbar-inverse .navbar-link:hover { .navbar-inverse .navbar-link:hover {
color: #fff; } color: #fff; }
.navbar-inverse .btn-link { .navbar-inverse .btn-link {
color: #cadbe8; } color: #a8c7dd; }
.navbar-inverse .btn-link:hover, .navbar-inverse .btn-link:focus { .navbar-inverse .btn-link:hover, .navbar-inverse .btn-link:focus {
color: #fff; } color: #fff; }
.navbar-inverse .btn-link[disabled]:hover, .navbar-inverse .btn-link[disabled]:focus, fieldset[disabled] .navbar-inverse .btn-link:hover, fieldset[disabled] .navbar-inverse .btn-link:focus { .navbar-inverse .btn-link[disabled]:hover, .navbar-inverse .btn-link[disabled]:focus, fieldset[disabled] .navbar-inverse .btn-link:hover, fieldset[disabled] .navbar-inverse .btn-link:focus {
...@@ -3985,7 +3985,7 @@ tbody.collapse.in { ...@@ -3985,7 +3985,7 @@ tbody.collapse.in {
padding: 0 5px; padding: 0 5px;
color: #ccc; } color: #ccc; }
.breadcrumb > .active { .breadcrumb > .active {
color: #94B8D1; } color: #71A3C7; }
.pagination { .pagination {
display: inline-block; display: inline-block;
...@@ -4001,7 +4001,7 @@ tbody.collapse.in { ...@@ -4001,7 +4001,7 @@ tbody.collapse.in {
padding: 6px 12px; padding: 6px 12px;
line-height: 1.42857; line-height: 1.42857;
text-decoration: none; text-decoration: none;
color: #E6A811; color: #7A5A0B;
background-color: #fff; background-color: #fff;
border: 1px solid #ddd; border: 1px solid #ddd;
margin-left: -1px; } margin-left: -1px; }
...@@ -4017,8 +4017,8 @@ tbody.collapse.in { ...@@ -4017,8 +4017,8 @@ tbody.collapse.in {
.pagination > li > a:hover, .pagination > li > a:focus, .pagination > li > a:hover, .pagination > li > a:focus,
.pagination > li > span:hover, .pagination > li > span:hover,
.pagination > li > span:focus { .pagination > li > span:focus {
color: #9f740c; color: #342605;
background-color: #A8C6DC; background-color: #A1C2D8;
border-color: #ddd; } border-color: #ddd; }
.pagination > .active > a, .pagination > .active > a:hover, .pagination > .active > a:focus, .pagination > .active > a, .pagination > .active > a:hover, .pagination > .active > a:focus,
.pagination > .active > span, .pagination > .active > span,
...@@ -4026,8 +4026,8 @@ tbody.collapse.in { ...@@ -4026,8 +4026,8 @@ tbody.collapse.in {
.pagination > .active > span:focus { .pagination > .active > span:focus {
z-index: 2; z-index: 2;
color: #fff; color: #fff;
background-color: #E6A811; background-color: #7A5A0B;
border-color: #E6A811; border-color: #7A5A0B;
cursor: default; } cursor: default; }
.pagination > .disabled > span, .pagination > .disabled > span,
.pagination > .disabled > span:hover, .pagination > .disabled > span:hover,
...@@ -4035,7 +4035,7 @@ tbody.collapse.in { ...@@ -4035,7 +4035,7 @@ tbody.collapse.in {
.pagination > .disabled > a, .pagination > .disabled > a,
.pagination > .disabled > a:hover, .pagination > .disabled > a:hover,
.pagination > .disabled > a:focus { .pagination > .disabled > a:focus {
color: #94B8D1; color: #71A3C7;
background-color: #fff; background-color: #fff;
border-color: #ddd; border-color: #ddd;
cursor: not-allowed; } cursor: not-allowed; }
...@@ -4088,7 +4088,7 @@ tbody.collapse.in { ...@@ -4088,7 +4088,7 @@ tbody.collapse.in {
.pager li > a:hover, .pager li > a:hover,
.pager li > a:focus { .pager li > a:focus {
text-decoration: none; text-decoration: none;
background-color: #A8C6DC; } background-color: #A1C2D8; }
.pager .next > a, .pager .next > a,
.pager .next > span { .pager .next > span {
float: right; } float: right; }
...@@ -4099,7 +4099,7 @@ tbody.collapse.in { ...@@ -4099,7 +4099,7 @@ tbody.collapse.in {
.pager .disabled > a:hover, .pager .disabled > a:hover,
.pager .disabled > a:focus, .pager .disabled > a:focus,
.pager .disabled > span { .pager .disabled > span {
color: #94B8D1; color: #71A3C7;
background-color: #fff; background-color: #fff;
cursor: not-allowed; } cursor: not-allowed; }
...@@ -4126,14 +4126,14 @@ a.label:hover, a.label:focus { ...@@ -4126,14 +4126,14 @@ a.label:hover, a.label:focus {
cursor: pointer; } cursor: pointer; }
.label-default { .label-default {
background-color: #94B8D1; } background-color: #71A3C7; }
.label-default[href]:hover, .label-default[href]:focus { .label-default[href]:hover, .label-default[href]:focus {
background-color: #70a0c2; } background-color: #4c8bb9; }
.label-primary { .label-primary {
background-color: #E6A811; } background-color: #7A5A0B; }
.label-primary[href]:hover, .label-primary[href]:focus { .label-primary[href]:hover, .label-primary[href]:focus {
background-color: #b7850d; } background-color: #4b3707; }
.label-success { .label-success {
background-color: #5cb85c; } background-color: #5cb85c; }
...@@ -4166,7 +4166,7 @@ a.label:hover, a.label:focus { ...@@ -4166,7 +4166,7 @@ a.label:hover, a.label:focus {
vertical-align: baseline; vertical-align: baseline;
white-space: nowrap; white-space: nowrap;
text-align: center; text-align: center;
background-color: #94B8D1; background-color: #71A3C7;
border-radius: 10px; } border-radius: 10px; }
.badge:empty { .badge:empty {
display: none; } display: none; }
...@@ -4177,7 +4177,7 @@ a.label:hover, a.label:focus { ...@@ -4177,7 +4177,7 @@ a.label:hover, a.label:focus {
top: 0; top: 0;
padding: 1px 5px; } padding: 1px 5px; }
.list-group-item.active > .badge, .nav-pills > .active > a > .badge { .list-group-item.active > .badge, .nav-pills > .active > a > .badge {
color: #E6A811; color: #7A5A0B;
background-color: #fff; } background-color: #fff; }
.list-group-item > .badge { .list-group-item > .badge {
float: right; } float: right; }
...@@ -4195,7 +4195,7 @@ a.badge:hover, a.badge:focus { ...@@ -4195,7 +4195,7 @@ a.badge:hover, a.badge:focus {
padding: 30px 15px; padding: 30px 15px;
margin-bottom: 30px; margin-bottom: 30px;
color: inherit; color: inherit;
background-color: #A8C6DC; } background-color: #A1C2D8; }
.jumbotron h1, .jumbotron h1,
.jumbotron .h1 { .jumbotron .h1 {
color: inherit; } color: inherit; }
...@@ -4204,7 +4204,7 @@ a.badge:hover, a.badge:focus { ...@@ -4204,7 +4204,7 @@ a.badge:hover, a.badge:focus {
font-size: 21px; font-size: 21px;
font-weight: 200; } font-weight: 200; }
.jumbotron > hr { .jumbotron > hr {
border-top-color: #84aecd; } border-top-color: #7dabc9; }
.container .jumbotron, .container-fluid .jumbotron { .container .jumbotron, .container-fluid .jumbotron {
border-radius: 6px; } border-radius: 6px; }
.jumbotron .container { .jumbotron .container {
...@@ -4224,7 +4224,7 @@ a.badge:hover, a.badge:focus { ...@@ -4224,7 +4224,7 @@ a.badge:hover, a.badge:focus {
padding: 4px; padding: 4px;
margin-bottom: 20px; margin-bottom: 20px;
line-height: 1.42857; line-height: 1.42857;
background-color: #FEFEFE; background-color: #FCFDFE;
border: 1px solid #ddd; border: 1px solid #ddd;
border-radius: 4px; border-radius: 4px;
-webkit-transition: border 0.2s ease-in-out; -webkit-transition: border 0.2s ease-in-out;
...@@ -4239,12 +4239,12 @@ a.badge:hover, a.badge:focus { ...@@ -4239,12 +4239,12 @@ a.badge:hover, a.badge:focus {
margin-right: auto; } margin-right: auto; }
.thumbnail .caption { .thumbnail .caption {
padding: 9px; padding: 9px;
color: #055B9A; } color: #3D81B2; }
a.thumbnail:hover, a.thumbnail:hover,
a.thumbnail:focus, a.thumbnail:focus,
a.thumbnail.active { a.thumbnail.active {
border-color: #E6A811; } border-color: #7A5A0B; }
.alert { .alert {
padding: 15px; padding: 15px;
...@@ -4335,7 +4335,7 @@ a.thumbnail.active { ...@@ -4335,7 +4335,7 @@ a.thumbnail.active {
line-height: 20px; line-height: 20px;
color: #fff; color: #fff;
text-align: center; text-align: center;
background-color: #E6A811; background-color: #7A5A0B;
-webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
-webkit-transition: width 0.6s ease; -webkit-transition: width 0.6s ease;
...@@ -4456,18 +4456,18 @@ a.list-group-item { ...@@ -4456,18 +4456,18 @@ a.list-group-item {
background-color: #f5f5f5; } background-color: #f5f5f5; }
.list-group-item.disabled, .list-group-item.disabled:hover, .list-group-item.disabled:focus { .list-group-item.disabled, .list-group-item.disabled:hover, .list-group-item.disabled:focus {
background-color: #A8C6DC; background-color: #A1C2D8;
color: #94B8D1; color: #71A3C7;
cursor: not-allowed; } cursor: not-allowed; }
.list-group-item.disabled .list-group-item-heading, .list-group-item.disabled:hover .list-group-item-heading, .list-group-item.disabled:focus .list-group-item-heading { .list-group-item.disabled .list-group-item-heading, .list-group-item.disabled:hover .list-group-item-heading, .list-group-item.disabled:focus .list-group-item-heading {
color: inherit; } color: inherit; }
.list-group-item.disabled .list-group-item-text, .list-group-item.disabled:hover .list-group-item-text, .list-group-item.disabled:focus .list-group-item-text { .list-group-item.disabled .list-group-item-text, .list-group-item.disabled:hover .list-group-item-text, .list-group-item.disabled:focus .list-group-item-text {
color: #94B8D1; } color: #71A3C7; }
.list-group-item.active, .list-group-item.active:hover, .list-group-item.active:focus { .list-group-item.active, .list-group-item.active:hover, .list-group-item.active:focus {
z-index: 2; z-index: 2;
color: #fff; color: #fff;
background-color: #E6A811; background-color: #7A5A0B;
border-color: #E6A811; } border-color: #7A5A0B; }
.list-group-item.active .list-group-item-heading, .list-group-item.active .list-group-item-heading,
.list-group-item.active .list-group-item-heading > small, .list-group-item.active .list-group-item-heading > small,
.list-group-item.active .list-group-item-heading > .small, .list-group-item.active:hover .list-group-item-heading, .list-group-item.active .list-group-item-heading > .small, .list-group-item.active:hover .list-group-item-heading,
...@@ -4477,7 +4477,7 @@ a.list-group-item { ...@@ -4477,7 +4477,7 @@ a.list-group-item {
.list-group-item.active:focus .list-group-item-heading > .small { .list-group-item.active:focus .list-group-item-heading > .small {
color: inherit; } color: inherit; }
.list-group-item.active .list-group-item-text, .list-group-item.active:hover .list-group-item-text, .list-group-item.active:focus .list-group-item-text { .list-group-item.active .list-group-item-text, .list-group-item.active:hover .list-group-item-text, .list-group-item.active:focus .list-group-item-text {
color: #fbecc8; } color: #f1c760; }
.list-group-item-success { .list-group-item-success {
color: #3c763d; color: #3c763d;
...@@ -4687,7 +4687,7 @@ a.list-group-item-danger { ...@@ -4687,7 +4687,7 @@ a.list-group-item-danger {
.panel > .panel-body + .table-responsive, .panel > .panel-body + .table-responsive,
.panel > .table + .panel-body, .panel > .table + .panel-body,
.panel > .table-responsive + .panel-body { .panel > .table-responsive + .panel-body {
border-top: 1px solid #055B9A; } border-top: 1px solid #3D81B2; }
.panel > .table > tbody:first-child > tr:first-child th, .panel > .table > tbody:first-child > tr:first-child th,
.panel > .table > tbody:first-child > tr:first-child td { .panel > .table > tbody:first-child > tr:first-child td {
border-top: 0; } border-top: 0; }
...@@ -4762,30 +4762,30 @@ a.list-group-item-danger { ...@@ -4762,30 +4762,30 @@ a.list-group-item-danger {
.panel-default { .panel-default {
border-color: #ddd; } border-color: #ddd; }
.panel-default > .panel-heading { .panel-default > .panel-heading {
color: #055B9A; color: #3D81B2;
background-color: #f5f5f5; background-color: #f5f5f5;
border-color: #ddd; } border-color: #ddd; }
.panel-default > .panel-heading + .panel-collapse > .panel-body { .panel-default > .panel-heading + .panel-collapse > .panel-body {
border-top-color: #ddd; } border-top-color: #ddd; }
.panel-default > .panel-heading .badge { .panel-default > .panel-heading .badge {
color: #f5f5f5; color: #f5f5f5;
background-color: #055B9A; } background-color: #3D81B2; }
.panel-default > .panel-footer + .panel-collapse > .panel-body { .panel-default > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: #ddd; } border-bottom-color: #ddd; }
.panel-primary { .panel-primary {
border-color: #E6A811; } border-color: #7A5A0B; }
.panel-primary > .panel-heading { .panel-primary > .panel-heading {
color: #fff; color: #fff;
background-color: #E6A811; background-color: #7A5A0B;
border-color: #E6A811; } border-color: #7A5A0B; }
.panel-primary > .panel-heading + .panel-collapse > .panel-body { .panel-primary > .panel-heading + .panel-collapse > .panel-body {
border-top-color: #E6A811; } border-top-color: #7A5A0B; }
.panel-primary > .panel-heading .badge { .panel-primary > .panel-heading .badge {
color: #E6A811; color: #7A5A0B;
background-color: #fff; } background-color: #fff; }
.panel-primary > .panel-footer + .panel-collapse > .panel-body { .panel-primary > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: #E6A811; } border-bottom-color: #7A5A0B; }
.panel-success { .panel-success {
border-color: #d6e9c6; } border-color: #d6e9c6; }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -1756,6 +1756,10 @@ function MainTableAndCharts( data , initial , search_filter) { ...@@ -1756,6 +1756,10 @@ function MainTableAndCharts( data , initial , search_filter) {
} }
} }
// and set this filter's initial status to 'maplist' (aka state == 1)
MyTable.data('dynatable').settings.dataset.queries['my_state_filter'] = 1 ;
MyTable.data('dynatable').process();
// moves pagination over table // moves pagination over table
if ( $(".imadiv").length>0 ) return 1; if ( $(".imadiv").length>0 ) return 1;
$('<br><br><div class="imadiv"></div>').insertAfter(".dynatable-per-page") $('<br><br><div class="imadiv"></div>').insertAfter(".dynatable-per-page")
...@@ -1897,9 +1901,18 @@ $("#corpusdisplayer").hide() ...@@ -1897,9 +1901,18 @@ $("#corpusdisplayer").hide()
// NEW AJAX // NEW AJAX x 2
var prefetch_url = window.location.origin+"/api/ngramlists/maplist?corpus="+corpus_id ;
var new_url = window.location.origin+"/api/ngramlists/family?corpus="+corpus_id ; var new_url = window.location.origin+"/api/ngramlists/family?corpus="+corpus_id ;
GET_(new_url, function(res) {
// faster call: just the maplist, will return first
GET_(prefetch_url, HandleAjax);
// longer call (full list of terms) to return when ready and refresh all data
GET_(new_url, HandleAjax)
function HandleAjax(res) {
if (res && res.ngraminfos) { if (res && res.ngraminfos) {
main_ngrams_objects = {} main_ngrams_objects = {}
...@@ -1955,8 +1968,7 @@ GET_(new_url, function(res) { ...@@ -1955,8 +1968,7 @@ GET_(new_url, function(res) {
$("input#groups_id").val(res.nodeids['groups']) $("input#groups_id").val(res.nodeids['groups'])
$("input#scores_id").val(res.nodeids['scores']) $("input#scores_id").val(res.nodeids['scores'])
AfterAjax() ; AfterAjax() ;
}); }
function AfterAjax() { function AfterAjax() {
// ------------------------------------------------------------------- // -------------------------------------------------------------------
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="48px"
height="48px"
id="svg4362"
version="1.1"
inkscape:version="0.48.5 r10040"
sodipodi:docname="logo.svg">
<defs
id="defs4364" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.6897594"
inkscape:cx="-11.235831"
inkscape:cy="3.8560006"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="881"
inkscape:window-height="762"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0" />
<metadata
id="metadata4367">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<rect
style="fill:#fffcfc;fill-opacity:1;stroke:none"
id="rect3755"
width="29.70249"
height="31.108515"
x="0"
y="-0.1566938"
inkscape:export-filename="/srv/gargantext/static/img/logo.png"
inkscape:export-xdpi="454.50735"
inkscape:export-ydpi="454.50735" />
<g
inkscape:export-ydpi="454.50735"
inkscape:export-xdpi="454.50735"
inkscape:export-filename="/srv/gargantext/static/img/logo.png"
style="fill:{{color}};fill-opacity:0.82014388"
id="g3835"
transform="matrix(0.2422549,0,0,0.23374214,-49.789462,-7.9055988)">
<path
inkscape:export-ydpi="100"
inkscape:export-xdpi="100"
inkscape:export-filename="/home/alexandre/projets/gargantext.py/gargantext_core/shared/LogoSimple.png"
id="path3837"
d="m 206.24721,35.28586 0,129.5 67.78125,0 0,-8.625 c -9.86526,-0.47262 -18.57934,-2.63259 -25.5625,-6.28125 -18.65918,-9.74237 -29.875,-28.26535 -29.875,-49.1875 0,-31.71741 21.11877,-52.8149 55.4375,-55.1875 l 0,-10.21875 -67.78125,0 z m 67.78125,10.21875 0,8.5 c 1.74191,-0.16369 3.53543,-0.28125 5.37499,-0.28125 6.91081,0 13.295,1.44116 19.6875,4.15625 l 2.40625,2.875 2.59375,14.53125 9.6875,0 0,-25.375 c -11.40283,-3.03451 -22.61727,-4.65625 -33.15625,-4.65625 -2.24526,0 -4.44959,0.10177 -6.59374,0.25 z m 0,8.5 c -23.28864,2.18852 -37.65625,18.81513 -37.65625,45.562503 0,27.600037 14.44681,45.025437 37.65625,47.812497 l 0,-93.375 z m 0,93.375 0,8.78125 c 1.36224,0.0653 2.75177,0.0937 4.15624,0.0937 10.19344,0 22.1324,-1.88915 35.78125,-5.5625 l 0,-38.1875 2.9375,-2.21875 9.5,-0.8125 0,-6.5625 -43.21875,0 0,6.5625 12.28125,0.8125 2.9375,2.21875 0,33.21875 c -6.73804,1.4374 -12.61466,2.09375 -17.625,2.09375 -2.32322,0 -4.57592,-0.17643 -6.74999,-0.4375 z"
style="font-size:166.11251831px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:{{color}};fill-opacity:0.82014388;stroke:none;font-family:Bitstream Charter;-inkscape-font-specification:Bitstream Charter"
inkscape:connector-curvature="0" />
<path
inkscape:export-ydpi="100"
inkscape:export-xdpi="100"
transform="translate(611.62306,-400.10238)"
sodipodi:open="true"
sodipodi:end="6.1660663"
sodipodi:start="0"
d="m -312.87112,480.17926 c 0,4.97881 -4.03612,9.01493 -9.01493,9.01493 -4.97881,0 -9.01493,-4.03612 -9.01493,-9.01493 0,-4.97881 4.03612,-9.01493 9.01493,-9.01493 4.57131,0 8.41901,3.42153 8.95317,7.96152"
sodipodi:ry="9.0149298"
sodipodi:rx="9.0149298"
sodipodi:cy="480.17926"
sodipodi:cx="-321.88605"
id="path3839"
style="fill:{{color}};fill-opacity:0.82014388;stroke:none"
sodipodi:type="arc" />
</g>
</g>
</svg>
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<a class="navbar-brand" style="line-height:15px; height:10px; padding: 10px 10px;" href="/"><img src="/generated/img/logo.svg" title="Back to home."></a> <a class="navbar-brand" style="line-height:15px; height:10px; padding: 10px 10px;" href="/"><img src="{% static "img/logoSmall.png"%}" title="Back to home."></a>
</div> </div>
......
...@@ -18,21 +18,19 @@ ...@@ -18,21 +18,19 @@
{% block content %} {% block content %}
<div class="container"> <div class="container">
<div class="jumbotron"> <div class="col-md-3 col-md-offset-2">
<div class="row"> <div id="monthly-move-chart">
<div id="monthly-move-chart"> <center>
<center> Select a frequency group in the chart with blue bars to zoom in
Select a frequency group in the chart with blue bars to zoom in <p align="center">
<p align="center"> <a class="btn btn-xs btn-default" role="button" href="/chart/corpus/{{ corpus.id }}/data.csv">Save</a>
<a class="btn btn-xs btn-default" role="button" href="/chart/corpus/{{ corpus.id }}/data.csv">Save</a> <a class="btn btn-xs btn-default" href="javascript:volumeChart.filterAll();dc.redrawAll();">Reset</a></p>
<a class="btn btn-xs btn-default" href="javascript:volumeChart.filterAll();dc.redrawAll();">Reset</a></p> <!-- <p style="font-size:70%">
<!-- <p style="font-size:70%"> <b>x</b>: amount of documents for the journal
<b>x</b>: amount of documents for the journal <b>y</b>: number of journals with that amount
<b>y</b>: number of journals with that amount </p> -->
</p> --> <div class="clearfix"></div>
<div class="clearfix"></div> </center>
</center>
</div>
</div> </div>
<div class="row"> <div class="row">
...@@ -46,32 +44,40 @@ ...@@ -46,32 +44,40 @@
</center> </center>
<br> <br>
</div> </div>
</div>
</div>
<div class="row">
<div class="panel panel-default">
<div class="panel-heading"> <div class="container">
<h4 class="panel-title"> <div class="jumbotron">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne"> <div class="row">
<!-- Final_UpdateTable redraws the dynatable if necessary --> <div class="panel panel-default">
<p id="corpusdisplayer" onclick='Final_UpdateTable("click")' class="btn btn-primary btn-lg">Journals
</p> <div class="panel-heading">
</a> <h4 class="panel-title">
</h4> <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
</div> <!-- Final_UpdateTable redraws the dynatable if necessary -->
<p id="corpusdisplayer" onclick='Final_UpdateTable("click")' class="btn btn-primary btn-lg">Journals
<div id="journal_table" class="panel-collapse collapse in no-transition" role="tabpanel"> </p>
<div class="panel-body"> </a>
<div id="div-table"> </h4>
<!-- (table id="my-ajax-table") dynamically set by Journals_dyna_chart_and_table -->
</div>
</div> </div>
</div> <!-- /div panel-collapse -->
</div> <!-- /div panel --> <div id="journal_table" class="panel-collapse collapse in no-transition" role="tabpanel">
</div> <!-- /row with the dynatable panels --> <div class="panel-body">
<div id="div-table">
<!-- (table id="my-ajax-table") dynamically set by Journals_dyna_chart_and_table -->
</div>
</div>
</div> <!-- /div panel-collapse -->
</div> <!-- /div panel -->
</div> <!-- /row with the dynatable panels -->
</div> <!-- /jumbotron --> </div> <!-- /jumbotron -->
</div> <!-- Alignment -->
</div> <!-- /container --> </div> <!-- /container -->
......
...@@ -18,8 +18,7 @@ ...@@ -18,8 +18,7 @@
{% block content %} {% block content %}
<div class="container"> <div class="container">
<div class="jumbotron"> <div class="col-md-3 col-md-offset-2">
<div class="row">
<div id="monthly-move-chart"> <div id="monthly-move-chart">
<center> <center>
Select a score/frequency range in the chart with blue bars to zoom in Select a score/frequency range in the chart with blue bars to zoom in
...@@ -29,10 +28,11 @@ ...@@ -29,10 +28,11 @@
<div class="clearfix"></div> <div class="clearfix"></div>
</center> </center>
</div> </div>
</div>
<div class="row"> <div class="row">
<div id="monthly-volume-chart"></div> <div id="monthly-volume-chart"></div>
</div> </div>
<div id="content_loader"> <div id="content_loader">
<br> <br>
<center> <center>
...@@ -40,7 +40,10 @@ ...@@ -40,7 +40,10 @@
</center> </center>
<br> <br>
</div> </div>
</div>
</div>
<div class="container">
<!-- (values set by js) caching our DB ids (handy for list update commands) --> <!-- (values set by js) caching our DB ids (handy for list update commands) -->
<input type="hidden" id="mainlist_id" value=""></input> <input type="hidden" id="mainlist_id" value=""></input>
<input type="hidden" id="maplist_id" value=""></input> <input type="hidden" id="maplist_id" value=""></input>
...@@ -48,52 +51,55 @@ ...@@ -48,52 +51,55 @@
<input type="hidden" id="groups_id" value=""></input> <input type="hidden" id="groups_id" value=""></input>
<input type="hidden" id="scores_id" value=""></input> <input type="hidden" id="scores_id" value=""></input>
<div class="row"> <div class="jumbotron">
<div class="panel panel-default"> <div class="row">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title"> <div class="panel-heading">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne"> <h4 class="panel-title">
<!-- Final_UpdateTable redraws the dynatable if necessary --> <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
<p id="corpusdisplayer" onclick='Final_UpdateTable("click")' class="btn btn-primary btn-lg"> <!-- Final_UpdateTable redraws the dynatable if necessary -->
Close term list <p id="corpusdisplayer" onclick='Final_UpdateTable("click")' class="btn btn-primary btn-lg">
</p> Close term list
<!-- <button title='run test function' onclick="doATest()"> </p>
TEST <!-- <button title='run test function' onclick="doATest()">
</button> --> TEST
</a> </button> -->
</a>
<!-- see in javascript function queries.functions['my_state_filter'] -->
<div class="pull-left" style="margin-top:1.85em;"> <!-- see in javascript function queries.functions['my_state_filter'] -->
Filter: <div class="pull-left" style="margin-top:1.85em;">
<select id="picklistmenu" name="my_state_filter"> Filter:
<option value='reset' selected="selected" >All terms</option> <select id="picklistmenu" name="my_state_filter">
<option value='0'>Mainlist only</option> <option value='reset'>All terms</option>
<option value='1'>Maplist only</option> <option value='0'>Candidates only</option>
<option value='2'>Stoplist only</option> <!-- <option value='1' selected="selected">Map terms only</option> -->
</select> <option value='1'>Map terms only</option>
<option value='2'>New stopwords only</option>
</select>
</div>
</h4>
</div> </div>
</h4>
</div>
<div id="terms_table" class="panel-collapse collapse in no-transition" role="tabpanel"> <div id="terms_table" class="panel-collapse collapse in no-transition" role="tabpanel">
<div class="panel-body"> <div class="panel-body">
<div id="div-table"> <div id="div-table">
<!-- (table id="my-ajax-table") dynamically set by Ngrams_dyna_chart_and_table --> <!-- (table id="my-ajax-table") dynamically set by Ngrams_dyna_chart_and_table -->
</div> </div>
<!-- under the table --> <!-- under the table -->
<p align="right"> <p align="right">
<button id="Save_All" class="btn btn-primary">Save changes permanently</button> <button id="Save_All" class="btn btn-primary">Save changes permanently</button>
</p> </p>
</div> </div>
</div> <!-- /div panel-collapse --> </div> <!-- /div panel-collapse -->
</div> <!-- /div panel --> </div> <!-- /div panel -->
</div> <!-- /row with the dynatable panels --> </div> <!-- /row with the dynatable panels -->
</div> </div> <!-- /jumbotron -->
</div> <!-- Alignment -->
<!-- /jumbotron <!-- /jumbotron
<button id="ImportList" onclick="GetUserPortfolio();" class="btn btn-warning"> <button id="ImportList" onclick="GetUserPortfolio();" class="btn btn-warning">
......
...@@ -19,31 +19,33 @@ ...@@ -19,31 +19,33 @@
{% block content %} {% block content %}
<div class="container"> <div class="container">
<div class="jumbotron"> <div class="col-md-3 col-md-offset-2">
<div class="row"> <div id="monthly-move-chart">
<div id="monthly-move-chart"> <center>
<center> Select a time range in the chart with blue bars to zoom in
Select a time range in the chart with blue bars to zoom in <p align="center">
<p align="center"> <a class="btn btn-xs btn-default" role="button" href="/chart/corpus/{{ corpus.id }}/data.csv">Save</a>
<a class="btn btn-xs btn-default" role="button" href="/chart/corpus/{{ corpus.id }}/data.csv">Save</a> <a class="btn btn-xs btn-default" href="javascript:volumeChart.filterAll();dc.redrawAll();">Reset</a></p>
<a class="btn btn-xs btn-default" href="javascript:volumeChart.filterAll();dc.redrawAll();">Reset</a></p>
<div class="clearfix"></div>
<div class="clearfix"></div> </center>
</center>
</div>
</div>
<div class="row">
<div id="monthly-volume-chart"></div>
</div> </div>
</div>
</div>
<div class="container">
<div class="col-md-3 col-md-offset-2">
<div id="monthly-volume-chart"></div>
<div id="content_loader"> <div id="content_loader">
<br> <br>
<center> <center>
<img width="10%" src="{% static "img/ajax-loader.gif"%}"></img> <img width="10%" src="{% static "img/ajax-loader.gif"%}"></img>
</center> </center>
<br> <br>
</div> </div>
</div>
</div>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<li> <li>
Version 3.0.0 Version 3.0.0
<ul> <ul>
<li>[NAME] Blue Mustard</li> <li>[NAME] Blue Jasmine</li>
<li>[CODE] Refactored</li> <li>[CODE] Refactored</li>
<li>[DATABASE] New schema</li> <li>[DATABASE] New schema</li>
</ul> </ul>
......
<!DOCTYPE html>
<html>
{% load staticfiles %}
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Login | Gargantext</title>
<!-- Prevent the demo from appearing in search engines (REMOVE THIS) -->
<meta name="robots" content="noindex">
<!-- Material Design Icons -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!-- Roboto Web Font -->
<link href="https://fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&amp;lang=en" rel="stylesheet">
<!-- App CSS -->
<link type="text/css" href="{% static "css/login.min.css" %}" rel="stylesheet">
</head>
<body class="login">
<div class="row">
<div class="col-sm-10 col-sm-push-1 col-md-6 col-md-push-3 col-lg-6 col-lg-push-3">
<h2 class="text-primary center m-a-2">
<i class="material-icons md-36">control_point</i> <span class="icon-text">Gargantext</span>
</h2>
<div class="card-group">
<div class="card">
<div class="card-block">
<div class="center">
<h4 class="m-b-0"><span class="icon-text">Connexion</span></h4>
<p class="text-muted">Login to your account</p>
</div>
{% if form.errors %}
<div class="alert alert-danger fade in">
<a href="#" class="close" data-dismiss="alert" aria-label="close" title="close">×</a>
<strong>{{form.non_field_errors}}</strong>
</div>
{% endif %}
<form action="" method="post">
{% csrf_token %}
<div class="form-group">
{{form.username}}
</div>
<div class="form-group">
{{form.password}}
<div class="clearfix"></div>
</div>
<div class="center">
<button type="submit" class="btn btn-primary btn-rounded">Login</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- jQuery -->
<script src="{% static "js/jquery/jquery.min.js" %}"></script>
<!-- Bootstrap -->
<script src="{% static "js/bootstrap/bootstrap.min.js" %}"></script>
</body>
</html>
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