Skip to content

Commit

Permalink
Use base tag with $http routes
Browse files Browse the repository at this point in the history
  • Loading branch information
jbudz committed Apr 18, 2017
1 parent cf4a345 commit bce0100
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/core_plugins/metrics/public/lib/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default (
panels: [panel]
};

return $http.post('../api/metrics/vis/data', params)
return $http.post('./api/metrics/vis/data', params)
.success(resp => {
$scope.visData = resp;
})
Expand Down
2 changes: 1 addition & 1 deletion src/core_plugins/metrics/public/lib/fetch_fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default (
return $scope => (indexPatterns = ['*']) => {
if (!Array.isArray(indexPatterns)) indexPatterns = [indexPatterns];
return Promise.all(indexPatterns.map(pattern => {
return $http.get(`../api/metrics/fields?index=${pattern}`)
return $http.get(`./api/metrics/fields?index=${pattern}`)
.success(resp => {
if (!$scope.fields) $scope.fields = {};
if (resp.length && pattern) {
Expand Down
2 changes: 1 addition & 1 deletion src/core_plugins/timelion/public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ app.controller('timelion', function (
$scope.state.save();
$scope.running = true;

$http.post('../api/timelion/run', {
$http.post('./api/timelion/run', {
sheet: $scope.state.sheet,
time: _.extend(timefilter.time, {
interval: $scope.state.interval,
Expand Down
4 changes: 2 additions & 2 deletions src/core_plugins/timelion/public/directives/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ define(function (require) {
}

function getFunctions() {
return $http.get('../api/timelion/functions').then(function (resp) {
return $http.get('./api/timelion/functions').then(function (resp) {
$scope.functions.list = resp.data;
});
}
Expand All @@ -37,7 +37,7 @@ define(function (require) {
};

function checkElasticsearch() {
return $http.get('../api/timelion/validate/es').then(function (resp) {
return $http.get('./api/timelion/validate/es').then(function (resp) {
if (resp.data.ok) {

$scope.es.valid = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ app.directive('timelionExpression', function ($compile, $http, $timeout, $rootSc
});

$elem.after($compile(template)($scope));
$http.get('../api/timelion/functions').then(function (resp) {
$http.get('./api/timelion/functions').then(function (resp) {
functionReference.byName = _.indexBy(resp.data, 'name');
functionReference.list = resp.data;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ define(function (require) {
const expression = $scope.vis.params.expression;
if (!expression) return;

$http.post('../api/timelion/run', {
$http.post('./api/timelion/run', {
sheet: [expression],
extended: {
es: {
Expand Down
3 changes: 1 addition & 2 deletions src/optimize/base_optimizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ class BaseOptimizer {
path: this.env.workingDir,
filename: '[name].bundle.js',
sourceMapFilename: '[file].map',
devtoolModuleFilenameTemplate: '[absolute-resource-path]',
publicPath: './bundles/'
devtoolModuleFilenameTemplate: '[absolute-resource-path]'
},

recordsPath: resolve(this.env.workingDir, 'webpack.records'),
Expand Down
1 change: 1 addition & 0 deletions src/ui/views/ui_app.jade
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ block content
| #{i18n('UI-WELCOME_MESSAGE')}

script.
window.__webpack_public_path__ = './bundles/';
window.onload = function () {
var buildNum = #{kibanaPayload.buildNum};
var cacheParam = buildNum ? '?v=' + buildNum : '';
Expand Down

0 comments on commit bce0100

Please sign in to comment.