Move dashboard into stackalytics
Installing a global module called dashboard is bad form as it pollutes the global namespace. Change-Id: I4b7ff8a4bbcb34a24f751d874c5f1894e75ae10c Closes-Bug: #1320133
@ -18,8 +18,9 @@ classifier =
|
||||
|
||||
[files]
|
||||
packages =
|
||||
dashboard
|
||||
stackalytics
|
||||
data_files =
|
||||
share/stackalytics = stackalytics/dashboard/static/*
|
||||
|
||||
[build_sphinx]
|
||||
all_files = 1
|
||||
@ -29,5 +30,5 @@ source-dir = doc/source
|
||||
[entry_points]
|
||||
console_scripts =
|
||||
stackalytics-dump = stackalytics.processor.dump:main
|
||||
stackalytics-dashboard = dashboard.web:main
|
||||
stackalytics-dashboard = stackalytics.dashboard.web:main
|
||||
stackalytics-processor = stackalytics.processor.main:main
|
||||
|
@ -20,9 +20,9 @@ import flask
|
||||
import six
|
||||
from werkzeug import exceptions
|
||||
|
||||
from dashboard import helpers
|
||||
from dashboard import parameters
|
||||
from dashboard import vault
|
||||
from stackalytics.dashboard import helpers
|
||||
from stackalytics.dashboard import parameters
|
||||
from stackalytics.dashboard import vault
|
||||
from stackalytics.openstack.common import log as logging
|
||||
from stackalytics.processor import utils
|
||||
from stackalytics import version as stackalytics_version
|
@ -18,8 +18,8 @@ import re
|
||||
|
||||
import six
|
||||
|
||||
from dashboard import parameters
|
||||
from dashboard import vault
|
||||
from stackalytics.dashboard import parameters
|
||||
from stackalytics.dashboard import vault
|
||||
from stackalytics.processor import utils
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
import flask
|
||||
|
||||
from dashboard import decorators
|
||||
from stackalytics.dashboard import decorators
|
||||
|
||||
|
||||
blueprint = flask.Blueprint('kpi', __name__, url_prefix='/kpi')
|
@ -17,7 +17,7 @@ import flask
|
||||
from oslo.config import cfg
|
||||
from six.moves.urllib import parse
|
||||
|
||||
from dashboard import vault
|
||||
from stackalytics.dashboard import vault
|
||||
from stackalytics.openstack.common import log as logging
|
||||
|
||||
|
@ -21,9 +21,9 @@ import time
|
||||
|
||||
import flask
|
||||
|
||||
from dashboard import decorators
|
||||
from dashboard import helpers
|
||||
from dashboard import vault
|
||||
from stackalytics.dashboard import decorators
|
||||
from stackalytics.dashboard import helpers
|
||||
from stackalytics.dashboard import vault
|
||||
from stackalytics.processor import utils
|
||||
|
||||
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 212 B After Width: | Height: | Size: 212 B |
Before Width: | Height: | Size: 208 B After Width: | Height: | Size: 208 B |
Before Width: | Height: | Size: 335 B After Width: | Height: | Size: 335 B |
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 207 B |
Before Width: | Height: | Size: 262 B After Width: | Height: | Size: 262 B |
Before Width: | Height: | Size: 262 B After Width: | Height: | Size: 262 B |
Before Width: | Height: | Size: 332 B After Width: | Height: | Size: 332 B |
Before Width: | Height: | Size: 280 B After Width: | Height: | Size: 280 B |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 613 B After Width: | Height: | Size: 613 B |
Before Width: | Height: | Size: 845 B After Width: | Height: | Size: 845 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
@ -22,7 +22,7 @@ import itertools
|
||||
from oslo.config import cfg
|
||||
import six
|
||||
|
||||
from dashboard import memory_storage
|
||||
from stackalytics.dashboard import memory_storage
|
||||
from stackalytics.openstack.common import log as logging
|
||||
from stackalytics.processor import runtime_storage
|
||||
from stackalytics.processor import utils
|
@ -23,12 +23,12 @@ import flask
|
||||
from oslo.config import cfg
|
||||
import six
|
||||
|
||||
from dashboard import decorators
|
||||
from dashboard import helpers
|
||||
from dashboard import kpi
|
||||
from dashboard import parameters
|
||||
from dashboard import reports
|
||||
from dashboard import vault
|
||||
from stackalytics.dashboard import decorators
|
||||
from stackalytics.dashboard import helpers
|
||||
from stackalytics.dashboard import kpi
|
||||
from stackalytics.dashboard import parameters
|
||||
from stackalytics.dashboard import reports
|
||||
from stackalytics.dashboard import vault
|
||||
from stackalytics.openstack.common import log as logging
|
||||
from stackalytics.processor import config
|
||||
from stackalytics.processor import utils
|
||||
@ -601,7 +601,7 @@ def main():
|
||||
else:
|
||||
conf(project='stackalytics')
|
||||
|
||||
logging.setup('dashboard')
|
||||
logging.setup('stackalytics.dashboard')
|
||||
|
||||
app.run(cfg.CONF.listen_host, cfg.CONF.listen_port)
|
||||
|
@ -21,7 +21,7 @@ import mock
|
||||
import six
|
||||
import testtools
|
||||
|
||||
from dashboard import web
|
||||
from stackalytics.dashboard import web
|
||||
from stackalytics.processor import runtime_storage
|
||||
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
import mock
|
||||
import testtools
|
||||
|
||||
from dashboard import helpers
|
||||
from dashboard import parameters
|
||||
from stackalytics.dashboard import helpers
|
||||
from stackalytics.dashboard import parameters
|
||||
|
||||
|
||||
class TestWebUtils(testtools.TestCase):
|
||||
@ -83,8 +83,8 @@ Implements Blueprint ''' + (
|
||||
self.assertEqual(expected, observed,
|
||||
'Commit message should be processed correctly')
|
||||
|
||||
@mock.patch('dashboard.vault.get_vault')
|
||||
@mock.patch('dashboard.vault.get_user_from_runtime_storage')
|
||||
@mock.patch('stackalytics.dashboard.vault.get_vault')
|
||||
@mock.patch('stackalytics.dashboard.vault.get_user_from_runtime_storage')
|
||||
def test_make_page_title(self, user_patch, vault_patch):
|
||||
memory_storage_mock = mock.Mock()
|
||||
memory_storage_mock.get_original_company_name = mock.Mock(
|
||||
@ -107,7 +107,7 @@ Implements Blueprint ''' + (
|
||||
'Mirantis', 'John Doe', 'neutron', 'Havana'))
|
||||
|
||||
@mock.patch('flask.request')
|
||||
@mock.patch('dashboard.parameters.get_default')
|
||||
@mock.patch('stackalytics.dashboard.parameters.get_default')
|
||||
def test_parameters_get_parameter(self, get_default, flask_request):
|
||||
|
||||
flask_request.args = mock.Mock()
|
||||
|