Commit 954c0e9f by Torkel Ödegaard

Merge branch 'master' into new-nav

parents dfcb82d2 f6a3b53f
...@@ -500,6 +500,64 @@ Proxies all calls to the actual datasource. ...@@ -500,6 +500,64 @@ Proxies all calls to the actual datasource.
"name":"Main Org." "name":"Main Org."
} }
### Get Organisation by Id
`GET /api/orgs/:orgId`
**Example Request**:
GET /api/orgs/1 HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
**Example Response**:
HTTP/1.1 200
Content-Type: application/json
{
"id":1,
"name":"Main Org.",
"address":{
"address1":"",
"address2":"",
"city":"",
"zipCode":"",
"state":"",
"country":""
}
}
### Get Organisation by Name
`GET /api/orgs/name/:orgName`
**Example Request**:
GET /api/orgs/name/Main%20Org%2E HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
**Example Response**:
HTTP/1.1 200
Content-Type: application/json
{
"id":1,
"name":"Main Org.",
"address":{
"address1":"",
"address2":"",
"city":"",
"zipCode":"",
"state":"",
"country":""
}
}
### Update current Organisation ### Update current Organisation
`PUT /api/org` `PUT /api/org`
......
...@@ -45,6 +45,7 @@ func Init() error { ...@@ -45,6 +45,7 @@ func Init() error {
} }
scan(path.Join(setting.StaticRootPath, "app/plugins")) scan(path.Join(setting.StaticRootPath, "app/plugins"))
scan(setting.PluginsPath)
checkPluginPaths() checkPluginPaths()
// checkDependencies() // checkDependencies()
return nil return nil
......
...@@ -40,9 +40,9 @@ class DynamicDirectiveSrv { ...@@ -40,9 +40,9 @@ class DynamicDirectiveSrv {
restrict: 'E', restrict: 'E',
scope: options.scope, scope: options.scope,
link: (scope, elem, attrs) => { link: (scope, elem, attrs) => {
if (options.watch) { if (options.watchPath) {
let childScope = null; let childScope = null;
scope.$watch(options.watch, () => { scope.$watch(options.watchPath, () => {
if (childScope) { if (childScope) {
childScope.$destroy(); childScope.$destroy();
} }
......
...@@ -9,7 +9,7 @@ function annotationsQueryEditor(dynamicDirectiveSrv) { ...@@ -9,7 +9,7 @@ function annotationsQueryEditor(dynamicDirectiveSrv) {
annotation: "=", annotation: "=",
datasource: "=" datasource: "="
}, },
watch: "datasource.type", watchPath: "datasource.type",
directive: scope => { directive: scope => {
return System.import(scope.datasource.meta.module).then(function(dsModule) { return System.import(scope.datasource.meta.module).then(function(dsModule) {
return { return {
......
...@@ -9,7 +9,7 @@ function dsConfigView(dynamicDirectiveSrv) { ...@@ -9,7 +9,7 @@ function dsConfigView(dynamicDirectiveSrv) {
dsMeta: "=", dsMeta: "=",
current: "=" current: "="
}, },
watch: "dsMeta.module", watchPath: "dsMeta.module",
directive: scope => { directive: scope => {
return System.import(scope.dsMeta.module).then(function(dsModule) { return System.import(scope.dsMeta.module).then(function(dsModule) {
return { return {
......
...@@ -5,7 +5,7 @@ import angular from 'angular'; ...@@ -5,7 +5,7 @@ import angular from 'angular';
/** @ngInject */ /** @ngInject */
function metricsQueryEditor(dynamicDirectiveSrv, datasourceSrv) { function metricsQueryEditor(dynamicDirectiveSrv, datasourceSrv) {
return dynamicDirectiveSrv.create({ return dynamicDirectiveSrv.create({
watch: "panel.datasource", watchPath: "panel.datasource",
directive: scope => { directive: scope => {
let datasource = scope.target.datasource || scope.panel.datasource; let datasource = scope.target.datasource || scope.panel.datasource;
return datasourceSrv.get(datasource).then(ds => { return datasourceSrv.get(datasource).then(ds => {
...@@ -29,7 +29,7 @@ function metricsQueryEditor(dynamicDirectiveSrv, datasourceSrv) { ...@@ -29,7 +29,7 @@ function metricsQueryEditor(dynamicDirectiveSrv, datasourceSrv) {
/** @ngInject */ /** @ngInject */
function metricsQueryOptions(dynamicDirectiveSrv, datasourceSrv) { function metricsQueryOptions(dynamicDirectiveSrv, datasourceSrv) {
return dynamicDirectiveSrv.create({ return dynamicDirectiveSrv.create({
watch: "panel.datasource", watchPath: "panel.datasource",
directive: scope => { directive: scope => {
return datasourceSrv.get(scope.panel.datasource).then(ds => { return datasourceSrv.get(scope.panel.datasource).then(ds => {
return System.import(ds.meta.module).then(dsModule => { return System.import(ds.meta.module).then(dsModule => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment