Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

Commit

Permalink
Reorganizing the website directories
Browse files Browse the repository at this point in the history
  • Loading branch information
apavlo committed Feb 4, 2018
1 parent a3284bd commit 208aae9
Show file tree
Hide file tree
Showing 94 changed files with 515 additions and 515 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions website/settings/common.py → oltpbench/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/var/www/example.com/static/"
STATIC_ROOT = join(PROJECT_ROOT, 'website', 'data', 'static')
STATIC_ROOT = join(PROJECT_ROOT, 'oltpbench', 'data', 'static')

# URL prefix for static files.
# Example: "http://example.com/static/", "http://static.example.com/"
Expand Down Expand Up @@ -129,7 +129,7 @@
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
# TEMPLATE_DIRS (use absolute paths)
join(PROJECT_ROOT, 'website', 'template')
join(PROJECT_ROOT, 'oltpbench', 'template')
],
'OPTIONS': {
'context_processors': [
Expand Down Expand Up @@ -186,7 +186,7 @@
# 'south',
'djcelery',
# 'django_celery_beat',
'website',
'oltpbench',
)

## ==============================================
Expand Down Expand Up @@ -215,7 +215,7 @@
## LOGGING CONFIGURATION
## ==============================================

# A website logging configuration. The only tangible logging
# A oltpbench logging configuration. The only tangible logging
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error when DEBUG=False.
# See http://docs.djangoproject.com/en/dev/topics/logging for
Expand Down Expand Up @@ -260,7 +260,7 @@
'level': 'DEBUG',
'propagate': False,
},
'website.views': {
'oltpbench.views': {
'handlers': ['console', 'logfile'],
'propagate': False,
'level': 'DEBUG',
Expand Down Expand Up @@ -291,14 +291,14 @@
## URL CONFIGURATION
## ==============================================

ROOT_URLCONF = 'website.urls'
ROOT_URLCONF = 'oltpbench.urls'

## ==============================================
## WSGI CONFIGURATION
## ==============================================

# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'website.wsgi.application'
WSGI_APPLICATION = 'oltpbench.wsgi.application'

## ==============================================
## PASSWORD VALIDATORS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@
## OTTERTUNE PATH CONFIGURATION
## ==============================================

LOG_FILE = '/path/to/website/log'
LOG_FILE = '/path/to/oltpbench/log'

OTTERTUNE_LIBS = '/path/to/ottertune/MLlibs'
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
from djcelery.models import TaskMeta
from sklearn.preprocessing import StandardScaler

from website.models import (DBMSCatalog, Hardware, KnobCatalog, PipelineResult,
from oltpbench.models import (DBMSCatalog, Hardware, KnobCatalog, PipelineResult,
Result, ResultData, WorkloadCluster)
from website.settings import PIPELINE_DIR
from website.types import KnobUnitType, PipelineTaskType, VarType
from website.utils import (ConversionUtil, DataUtil, DBMSUtil, JSONUtil,
from oltpbench.settings import PIPELINE_DIR
from oltpbench.types import KnobUnitType, PipelineTaskType, VarType
from oltpbench.utils import (ConversionUtil, DataUtil, DBMSUtil, JSONUtil,
MediaUtil,PostgresUtilImpl)


Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
82 changes: 82 additions & 0 deletions oltpbench/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
from django.conf.urls import include, url
from django.contrib import admin
from django.contrib.staticfiles.views import serve
from django.views.decorators.cache import never_cache

from oltpbench import settings
from oltpbench import views as oltpbench_views

admin.autodiscover()

urlpatterns = [
url(r'^signup/', oltpbench_views.signup_view, name='signup'),
url(r'^login/', oltpbench_views.login_view, name='login'),
url(r'^logout/$', oltpbench_views.logout_view, name='logout'),

url(r'^ajax_new/', oltpbench_views.ajax_new),
# url(r'^status/', oltpbench_views.ml_info),

url(r'^new_result/', oltpbench_views.new_result),
# url(r'^result/', oltpbench_views.result),
url(r'^get_result_data_file/', oltpbench_views.get_result_data_file),
url(r'^update_similar/', oltpbench_views.update_similar),

url(r'^$', oltpbench_views.redirect_home),
url(r'^projects/$', oltpbench_views.home, name='home'),

url(r'^projects/(?P<project_id>[0-9]+)/edit/$', oltpbench_views.update_project, name='edit_project'),
url(r'^projects/new/$', oltpbench_views.update_project, name='new_project'),
url(r'^projects/(?P<project_id>[0-9]+)/apps$', oltpbench_views.project, name='project'),
url(r'^projects/delete/$', oltpbench_views.delete_project, name="delete_project"),

# url(r'^edit_application/', oltpbench_views.update_application),
# url(r'^edit_application/(?P<project_id>[0-9]+)/$', oltpbench_views.update_application, name='edit_application'),
# url(r'^edit_application/(?P<app_id>[0-9]+)/$', oltpbench_views.update_application, name='edit_application'),
# url(r'^edit_application/(?P<project_id>[0-9]+)/(?P<app_id>[0-9]+)/$', oltpbench_views.update_application, name='edit_application'),
# url(r'^update_application/', oltpbench_views.update_application, name='update_application'),
# url(r'^application/', oltpbench_views.application, 'application'),
url(r'^projects/(?P<project_id>[0-9]+)/apps/(?P<app_id>[0-9]+)/$', oltpbench_views.application, name='application'),
# url(r'^project_info/', oltpbench_views.project_info),
url(r'^projects/(?P<project_id>[0-9]+)/apps/delete/$', oltpbench_views.delete_application, name='delete_application'),
url(r'^projects/(?P<project_id>[0-9]+)/apps/new/$', oltpbench_views.update_application, name='new_application'),
url(r'^projects/(?P<project_id>[0-9]+)/apps/(?P<app_id>[0-9]+)/edit/$', oltpbench_views.update_application, name='edit_application'),

url(r'^projects/(?P<project_id>[0-9]+)/apps/(?P<app_id>[0-9]+)/results/(?P<result_id>[0-9]+)/$', oltpbench_views.result, name='result'),
url(r'^projects/(?P<project_id>[0-9]+)/apps/(?P<app_id>[0-9]+)/bench_confs/(?P<bench_id>[0-9]+)/$', oltpbench_views.benchmark_configuration, name='bench_conf'),
url(r'^projects/(?P<project_id>[0-9]+)/apps/(?P<app_id>[0-9]+)/bench_confs/(?P<bench_id>[0-9]+)/edit/$', oltpbench_views.edit_benchmark_conf, name='edit_bench_conf'),
# url(r'^projects/(?P<project_id>[0-9]+)/apps/(?P<app_id>[0-9]+)/db_confs/(?P<dbconf_id>[0-9]+)/compare=(?P<compare>[0-9]+)/$', oltpbench_views.db_conf_view, name='db_confs_compare'),
url(r'^projects/(?P<project_id>[0-9]+)/apps/(?P<app_id>[0-9]+)/db_confs/(?P<dbconf_id>[0-9]+)/$', oltpbench_views.db_conf_view, name='db_confs'),
url(r'^projects/(?P<project_id>[0-9]+)/apps/(?P<app_id>[0-9]+)/db_metrics/(?P<dbmet_id>[0-9]+)/$', oltpbench_views.db_metrics_view, name='db_metrics'),
# url(r'^projects/(?P<project_id>[0-9]+)/apps/(?P<app_id>[0-9]+)/db_metrics/(?P<dbmet_id>[0-9]+)/\?compare=(?P<compare>[0-9]+)/$', oltpbench_views.db_metrics_view, name='db_metrics'),
url(r'^ref/(?P<dbms_name>.+)/(?P<version>.+)/params/(?P<param_name>.+)/$', oltpbench_views.db_conf_ref, name="dbconf_ref"),
url(r'^ref/(?P<dbms_name>.+)/(?P<version>.+)/metrics/(?P<metric_name>.+)/$', oltpbench_views.db_metrics_ref, name="dbmetrics_ref"),
url(r'^projects/(?P<project_id>[0-9]+)/apps/(?P<app_id>[0-9]+)/results/(?P<result_id>[0-9]+)/status$', oltpbench_views.ml_info, name="status"),

# url(r'^project/', oltpbench_views.project),
# url(r'^update_project/', oltpbench_views.update_project, name='update_project'),

# url(r'^benchmark_conf/', oltpbench_views.benchmark_configuration),
# url(r'^edit_benchmark_conf/', oltpbench_views.edit_benchmark_conf),
url(r'^get_benchmark_data/', oltpbench_views.get_benchmark_data),
url(r'^get_benchmark_conf_file/', oltpbench_views.get_benchmark_conf_file),
# url(r'^update_benchmark/', oltpbench_views.update_benchmark_conf),

# url(r'^db_conf/', oltpbench_views.db_conf_view),
# url(r'^db_conf_ref/', oltpbench_views.db_conf_ref),
# url(r'^dbms_metrics/', oltpbench_views.dbms_metrics_view),
# url(r'^dbms_metrics_ref/', oltpbench_views.dbms_metrics_ref),
url(r'^get_data/', oltpbench_views.get_timeline_data),

# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
url(r'^admin/', admin.site.urls),
]

if settings.DEBUG:
import debug_toolbar

urlpatterns = [
url(r'^__debug__/', include(debug_toolbar.urls)),
] + urlpatterns + [url(r'^static/(?P<path>.*)$', never_cache(serve)), ]
File renamed without changes.
2 changes: 1 addition & 1 deletion website/views.py → oltpbench/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from tasks import aggregate_target_results, map_workload, configuration_recommendation
from .types import DBMSType, KnobUnitType, MetricType, PipelineTaskType, StatsType, TaskType, VarType
from .utils import DBMSUtil, JSONUtil, LabelUtil, MediaUtil
from website.types import HardwareType
from oltpbench.types import HardwareType

log = logging.getLogger(__name__)

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion script/hardware/create_hardware_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
entries = []
for k,v in HW.iteritems():
entries.append({
"model": "website.Hardware",
"model": "oltpbench.Hardware",
'fields': v
})

Expand Down
Loading

0 comments on commit 208aae9

Please sign in to comment.