diff --git a/.gitignore b/.gitignore index 539a427..9c61bc7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,50 +1,55 @@ +#Specific +frontend/treeview/db.sqlite3 +frontend/treeview/treeview_app/migrations/ +frontend/treeview/treeview/static/ + .vscode debug nohup* *swp # Binaries for programs and plugins *.exe *.dll *.so *.dylib # Test binary, build with `go test -c` *.test # Output of the go coverage tool, specifically when used with LiteIDE *.out # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 .glide/ node_modules/ public/api *.idea/* *.idea* ../.idea/ *.vscode *.log .travis.yml *.bak .tern-project public/build *.tmpl.js public/coverage *.swp frontend/public/assets/* #django *.egg-info *.pot *.py[co] .tox/ __pycache__ MANIFEST dist/ docs/_build/ docs/locale/ node_modules/ tests/coverage_html/ tests/.coverage build/ tests/report/ diff --git a/frontend/treeview/db.sqlite3 b/frontend/treeview/db.sqlite3 index a28e03c..ab519a8 100644 Binary files a/frontend/treeview/db.sqlite3 and b/frontend/treeview/db.sqlite3 differ diff --git a/frontend/treeview/treeview/settings.py b/frontend/treeview/treeview/settings.py index 6c25ce4..a37b13e 100644 --- a/frontend/treeview/treeview/settings.py +++ b/frontend/treeview/treeview/settings.py @@ -1,126 +1,128 @@ """ Django settings for treeview project. Generated by 'django-admin startproject' using Django 1.11.3. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'h!khjr!+%c_7v5-^w)*x2*sy5e#0g^3dmzyt1@y0wtr6^x)uiq' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = [ '.akapustin.me', # Allow domain and subdomains 'localhost', '127.0.0.1' ] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'treeview_app', 'graphos', 'django_tables2' ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] ROOT_URLCONF = 'treeview.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [os.path.join(BASE_DIR, 'templates')], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'treeview.wsgi.application' # Database # https://docs.djangoproject.com/en/1.11/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } } # Password validation # https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, { 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', }, { 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', }, { 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', }, ] # Internationalization # https://docs.djangoproject.com/en/1.11/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'Europe/Moscow' USE_I18N = True USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.11/howto/static-files/ STATIC_URL = '/static/' +PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) +STATIC_ROOT = os.path.join(PROJECT_DIR, 'static') diff --git a/frontend/treeview/treeview_app/static/treeview_app/css/jsontree.css b/frontend/treeview/treeview_app/static/treeview_app/css/jsontree.css index 0e8345c..27b4e25 100644 --- a/frontend/treeview/treeview_app/static/treeview_app/css/jsontree.css +++ b/frontend/treeview/treeview_app/static/treeview_app/css/jsontree.css @@ -1,45 +1,45 @@ .jstValue { white-space: pre-wrap; font-size: 20px; font-weight: 400; font-family: "Lucida Console", Monaco, monospace; } .jstComma { white-space: pre-wrap; } .jstProperty { - color: #666; + color: #F9EFEF; word-wrap: break-word; } .jstBracket { white-space: pre-wrap;; } .jstBool { color: #2525CC; } .jstNum { color: #D036D0; } .jstNull { color: gray; } .jstStr { color: #2DB669; } .jstFold:after { content: ' -'; cursor: pointer; } .jstExpand { white-space: normal; } .jstExpand:after { content: ' +'; cursor: pointer; } .jstFolded { white-space: normal !important; } .jstHiddenBlock { display: none; } diff --git a/frontend/treeview/treeview_app/tables.py b/frontend/treeview/treeview_app/tables.py index 03e7f85..f930f12 100644 --- a/frontend/treeview/treeview_app/tables.py +++ b/frontend/treeview/treeview_app/tables.py @@ -1,24 +1,24 @@ import django_tables2 as tables from .models import Tools from .models import ToolsActivate from .models import Actions class ToolsTable(tables.Table): class Meta: model = Tools # add class="paleblue" to tag order_by = '-countUse' - attrs = {'class': 'paleblue'} + attrs = {'class': 'paleblue table'} class ToolsActivateTable(tables.Table): class Meta: model = ToolsActivate order_by = '-countUse' # add class="paleblue" to
tag - attrs = {'class': 'paleblue'} + attrs = {'class': 'paleblue table'} class ActionsTable(tables.Table): class Meta: model = Actions order_by = '-countUse' - attrs = {'class': 'paleblue'} \ No newline at end of file + attrs = {'class': 'paleblue table'} \ No newline at end of file diff --git a/frontend/treeview/treeview_app/templates/treeview_app/actions_info.html b/frontend/treeview/treeview_app/templates/treeview_app/actions_info.html index b96ca4b..38ecf32 100644 --- a/frontend/treeview/treeview_app/templates/treeview_app/actions_info.html +++ b/frontend/treeview/treeview_app/templates/treeview_app/actions_info.html @@ -1,21 +1,20 @@ - +{% extends 'treeview_app/base.html' %} {% load staticfiles %} - - json tree example - - - - +{% block script %} +json tree example + + +{% endblock %} +{%block content %} -
+
- - \ No newline at end of file +{% endblock %} \ No newline at end of file diff --git a/frontend/treeview/treeview_app/templates/treeview_app/actions_table.html b/frontend/treeview/treeview_app/templates/treeview_app/actions_table.html index f6c364e..b352609 100644 --- a/frontend/treeview/treeview_app/templates/treeview_app/actions_table.html +++ b/frontend/treeview/treeview_app/templates/treeview_app/actions_table.html @@ -1,19 +1,16 @@ - -{% load render_table from django_tables2 %} {% load staticfiles %} +{% extends 'treeview_app/base.html' %} +{% load render_table from django_tables2 %} +{% load staticfiles %} - - - - - - - - Actions {% render_table actions %} - - - \ No newline at end of file +{% block script %} + + +{% endblock %} +{% block content %} +Actions {% render_table actions %} +{% endblock %} \ No newline at end of file diff --git a/frontend/treeview/treeview_app/templates/treeview_app/asserts_info.html b/frontend/treeview/treeview_app/templates/treeview_app/asserts_info.html index 89b41e6..075b854 100644 --- a/frontend/treeview/treeview_app/templates/treeview_app/asserts_info.html +++ b/frontend/treeview/treeview_app/templates/treeview_app/asserts_info.html @@ -1,21 +1,21 @@ -assertsInfo -{% load staticfiles %} - - - json tree example - - +{% extends 'treeview_app/base.html' %} - +{% load staticfiles %} +{% block script %} + + +{% endblock %} +{% block title %} +Asserts +{% endblock %} - -

Last 100 asserts

-
- +{% block content %} +

Last 100 asserts

+
+{% endblock %} - \ No newline at end of file diff --git a/frontend/treeview/treeview_app/templates/treeview_app/start_page.html b/frontend/treeview/treeview_app/templates/treeview_app/base.html similarity index 73% copy from frontend/treeview/treeview_app/templates/treeview_app/start_page.html copy to frontend/treeview/treeview_app/templates/treeview_app/base.html index 31ae7de..0b37dac 100644 --- a/frontend/treeview/treeview_app/templates/treeview_app/start_page.html +++ b/frontend/treeview/treeview_app/templates/treeview_app/base.html @@ -1,336 +1,302 @@ + +{% load staticfiles %} + + + {% block title %} Telemetry{% endblock%} + + {% block script %} + {% endblock %} + + -
-
- -

Krita Telemetry

-

**short description**

+{% block head %} +
+
+

Krita Telemetry

+

+ {% block description %} **short description** {% endblock %}

-
+
+{% endblock %} +{% block page %} +{% block content %} +{% endblock %} +{% endblock %} +{% block footer %} + +{% endblock %} - \ No newline at end of file + + diff --git a/frontend/treeview/treeview_app/templates/treeview_app/image_graphs.html b/frontend/treeview/treeview_app/templates/treeview_app/image_graphs.html index 7f5eee3..775425b 100644 --- a/frontend/treeview/treeview_app/templates/treeview_app/image_graphs.html +++ b/frontend/treeview/treeview_app/templates/treeview_app/image_graphs.html @@ -1,18 +1,15 @@ - +{% extends 'treeview_app/base.html' %} {% load staticfiles %} - - - - - +{% block script %} + + +{% endblock %} -{{ chart.as_html }} {{ chart2.as_html }} {{ chart4.as_html }} {{ chart6.as_html }} - {{ chart8.as_html }} - - - \ No newline at end of file +{% block content%}{{ chart.as_html }} {{ chart2.as_html }} {{ chart4.as_html }} {{ chart6.as_html }} +{{ chart8.as_html }} +{% endblock %} \ No newline at end of file diff --git a/frontend/treeview/treeview_app/templates/treeview_app/images_info.html b/frontend/treeview/treeview_app/templates/treeview_app/images_info.html index 9fa8eeb..92383c1 100644 --- a/frontend/treeview/treeview_app/templates/treeview_app/images_info.html +++ b/frontend/treeview/treeview_app/templates/treeview_app/images_info.html @@ -1,21 +1,20 @@ - +{% extends 'treeview_app/base.html' %} {% load staticfiles %} - - json tree example - - +{% block script %} + + +{% endblock %} +{% block title %}Tree image info {% endblock%} - - -
- +{%block content %} +
+ - - \ No newline at end of file +{% endblock %} diff --git a/frontend/treeview/treeview_app/templates/treeview_app/install_graphs.html b/frontend/treeview/treeview_app/templates/treeview_app/install_graphs.html index db6602f..2d569e8 100644 --- a/frontend/treeview/treeview_app/templates/treeview_app/install_graphs.html +++ b/frontend/treeview/treeview_app/templates/treeview_app/install_graphs.html @@ -1,17 +1,15 @@ - +{% extends 'treeview_app/base.html' %} {% load staticfiles %} - - - - - +{% block script %} + + +{% endblock %} -{{ chart.as_html }} {{ chart1.as_html }} {{ chart2.as_html }} {{ chart6.as_html }} {{ chart7.as_html }} - - - \ No newline at end of file +{% block content %} +{{ chart.as_html }} {{ chart1.as_html }} {{ chart2.as_html }} {{ chart6.as_html }} {{ chart7.as_html }} +{% endblock %} diff --git a/frontend/treeview/treeview_app/templates/treeview_app/install_info.html b/frontend/treeview/treeview_app/templates/treeview_app/install_info.html index 91a5625..e11b1dc 100644 --- a/frontend/treeview/treeview_app/templates/treeview_app/install_info.html +++ b/frontend/treeview/treeview_app/templates/treeview_app/install_info.html @@ -1,20 +1,21 @@ - +{% extends 'treeview_app/base.html' %} {% load staticfiles %} - - json tree example - - +{% block script %} + + +{% endblock %} +{% block title %} +Tree install info +{%endblock%} - - -
- +{% block content %} +
+ - - \ No newline at end of file +{% endblock %} diff --git a/frontend/treeview/treeview_app/templates/treeview_app/start_page.html b/frontend/treeview/treeview_app/templates/treeview_app/start_page.html index 31ae7de..7ed5370 100644 --- a/frontend/treeview/treeview_app/templates/treeview_app/start_page.html +++ b/frontend/treeview/treeview_app/templates/treeview_app/start_page.html @@ -1,336 +1,75 @@ - - - - - - - -
-
- -

Krita Telemetry

-

**short description**

- +{% extends 'treeview_app/base.html' %} +{% block page %} +{% block content %} +
+ + +
+
+

Tools

-
- -
-
-

Tools

-
-
- -
- - - + -
-
-

Install

-
+
+
+

Install

+
-
- - +
+ + +
- -
-
-

Actions

-
+
+
+

Actions

+
-
- - +
+ + +
- -
-
-

Image info

-
+
+
+

Image info

+
-
- - +
+ + +
+
+
+

Asserts

-
-
-

Asserts

-
-
- -
- -
-
-
-

2017. Alexey Kapustin

+ +
+ -
- +
+
- \ No newline at end of file +{% endblock %} {% endblock %} \ No newline at end of file diff --git a/frontend/treeview/treeview_app/templates/treeview_app/tools_info.html b/frontend/treeview/treeview_app/templates/treeview_app/tools_info.html index 2a66b84..f9677e7 100644 --- a/frontend/treeview/treeview_app/templates/treeview_app/tools_info.html +++ b/frontend/treeview/treeview_app/templates/treeview_app/tools_info.html @@ -1,20 +1,17 @@ - +{% extends 'treeview_app/base.html' %} {% load staticfiles %} - - json tree example - - +{% block script %} +json tree example + + +{% endblock %} - - - -
- +{% block content %} +
- - \ No newline at end of file +{% endblock %} \ No newline at end of file diff --git a/frontend/treeview/treeview_app/templates/treeview_app/tools_table.html b/frontend/treeview/treeview_app/templates/treeview_app/tools_table.html index 1aadeb2..6ee5ed0 100644 --- a/frontend/treeview/treeview_app/templates/treeview_app/tools_table.html +++ b/frontend/treeview/treeview_app/templates/treeview_app/tools_table.html @@ -1,19 +1,18 @@ - -{% load render_table from django_tables2 %} {% load staticfiles %} - +{% extends 'treeview_app/base.html' %} +{% load render_table from django_tables2 %} +{% load staticfiles %} - - - - - - Tools {% render_table tools %} - +{%block script%} + + +{% endblock %} - \ No newline at end of file +{% block content %} +Tools {% render_table tools %} +{% endblock %} \ No newline at end of file