add isPublic to dashboard (#48012)

adds toggle to make a dashboard public

* config struct for public dashboard config
* api endpoints for public dashboard configuration
* ui for toggling public dashboard on and off
* load public dashboard config on share modal

Co-authored-by: Owen Smallwood <owen.smallwood@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
This commit is contained in:
Jeff Levin
2022-05-17 14:11:55 -08:00
committed by GitHub
co-authored by Owen Smallwood Torkel Ödegaard
parent 156e14e296
commit c7f8c2cc73
25 changed files with 607 additions and 108 deletions
@@ -1,4 +1,4 @@
// Code generated by mockery v2.10.0. DO NOT EDIT.
// Code generated by mockery v2.12.1. DO NOT EDIT.
package dashboards
@@ -7,6 +7,8 @@ import (
models "github.com/grafana/grafana/pkg/models"
mock "github.com/stretchr/testify/mock"
testing "testing"
)
// FakeDashboardProvisioning is an autogenerated mock type for the DashboardProvisioningService type
@@ -170,3 +172,13 @@ func (_m *FakeDashboardProvisioning) UnprovisionDashboard(ctx context.Context, d
return r0
}
// NewFakeDashboardProvisioning creates a new instance of FakeDashboardProvisioning. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
func NewFakeDashboardProvisioning(t testing.TB) *FakeDashboardProvisioning {
mock := &FakeDashboardProvisioning{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}