# bijoe - BI dashboard
# Copyright (C) 2015  Entr'ouvert
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from django.conf.urls import url

from . import views

urlpatterns = [
    url(r'^$',
        views.visualizations, name='visualizations'),
    url(r'^json/$',
        views.visualizations_json, name='visualizations-json'),
    url(r'^warehouse/(?P<warehouse>[^/]*)/$', views.warehouse, name='warehouse'),
    url(r'^warehouse/(?P<warehouse>[^/]*)/(?P<cube>[^/]*)/$', views.cube, name='cube'),
    url(r'^warehouse/(?P<warehouse>[^/]*)/(?P<cube>[^/]*)/iframe/$', views.cube_iframe,
        name='cube-iframe'),
    url(r'warehouse/(?P<warehouse>[^/]*)/(?P<cube>[^/]*)/save/$',
        views.create_visualization, name='create-visualization'),
    url(r'(?P<pk>\d+)/$', views.visualization, name='visualization'),
    url(r'(?P<pk>\d+)/json/$', views.visualization_json, name='visualization-json'),
    url(r'(?P<pk>\d+)/geojson/$', views.visualization_geojson, name='visualization-geojson'),
    url(r'(?P<pk>\d+)/iframe/$', views.visualization_iframe, name='visualization-iframe'),
    url(r'(?P<pk>\d+)/ods/$', views.visualization_ods, name='visualization-ods'),
    url(r'(?P<pk>\d+)/rename/$', views.rename_visualization, name='rename-visualization'),
    url(r'(?P<pk>\d+)/delete/$', views.delete_visualization, name='delete-visualization'),
]
