mirror of
https://github.com/grafana/grafana.git
synced 2025-02-15 10:03:33 -06:00
Small fixes
This commit is contained in:
parent
bee501da4a
commit
ea1164322b
@ -105,9 +105,12 @@ function (angular, _, config) {
|
|||||||
$scope.getCurrentDatasource().then(function(datasource) {
|
$scope.getCurrentDatasource().then(function(datasource) {
|
||||||
$scope.datasource = datasource;
|
$scope.datasource = datasource;
|
||||||
|
|
||||||
return $scope.refreshData($scope.datasource).then(function() {
|
var promise = $scope.refreshData($scope.datasource);
|
||||||
|
if (promise) {
|
||||||
|
promise.then(function() { $scope.panelMeta.loading = false; });
|
||||||
|
} else {
|
||||||
$scope.panelMeta.loading = false;
|
$scope.panelMeta.loading = false;
|
||||||
});
|
}
|
||||||
|
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
console.log('Panel data error:', err);
|
console.log('Panel data error:', err);
|
||||||
|
@ -61,9 +61,8 @@ function (angular, app, _, config, PanelMeta) {
|
|||||||
params.tag = $scope.panel.tag;
|
params.tag = $scope.panel.tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
backendSrv.get('/api/search', params).then(function(result) {
|
return backendSrv.search(params).then(function(result) {
|
||||||
$scope.dashList = result.dashboards;
|
$scope.dashList = result.dashboards;
|
||||||
$scope.panelMeta.loading = false;
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ function (angular, $, config, _) {
|
|||||||
|
|
||||||
var file_load = function(file) {
|
var file_load = function(file) {
|
||||||
return $http({
|
return $http({
|
||||||
url: "app/dashboards/"+file.replace(/\.(?!json)/,"/")+'?' + new Date().getTime(),
|
url: "/dashboards/"+file.replace(/\.(?!json)/,"/")+'?' + new Date().getTime(),
|
||||||
method: "GET",
|
method: "GET",
|
||||||
transformResponse: function(response) {
|
transformResponse: function(response) {
|
||||||
return renderTemplate(response,$routeParams);
|
return renderTemplate(response,$routeParams);
|
||||||
@ -63,7 +63,7 @@ function (angular, $, config, _) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
file_load(fileToLoad).then(function(result) {
|
file_load(fileToLoad).then(function(result) {
|
||||||
$scope.initDashboard(result, $scope);
|
$scope.initDashboard({meta: {}, model: result}, $scope);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -11,17 +11,11 @@
|
|||||||
<link rel="stylesheet" href="css/grafana.dark.min.css" title="Dark">
|
<link rel="stylesheet" href="css/grafana.dark.min.css" title="Dark">
|
||||||
<link rel="icon" type="image/png" href="img/fav32.png">
|
<link rel="icon" type="image/png" href="img/fav32.png">
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
window.grafanaBackend = false;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!-- build:js app/app.js -->
|
<!-- build:js app/app.js -->
|
||||||
<script src="vendor/require/require.js"></script>
|
<script src="vendor/require/require.js"></script>
|
||||||
<script src="app/components/require.standalone.js"></script>
|
<script src="app/components/require.standalone.js"></script>
|
||||||
<!-- endbuild -->
|
<!-- endbuild -->
|
||||||
|
|
||||||
<script>require(['app'], function (app) { app.boot(); })</script>
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body ng-cloak ng-controller="GrafanaCtrl">
|
<body ng-cloak ng-controller="GrafanaCtrl">
|
||||||
@ -41,4 +35,17 @@
|
|||||||
<div ng-view></div>
|
<div ng-view></div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
window.grafanaBackend = false;
|
||||||
|
window.grafanaBootData = {
|
||||||
|
user: {},
|
||||||
|
settings: {},
|
||||||
|
};
|
||||||
|
|
||||||
|
require(['app'], function (app) {
|
||||||
|
app.boot();
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user