diff --git a/package.json b/package.json
index 7a358ce3e04..4b67aeefacb 100644
--- a/package.json
+++ b/package.json
@@ -50,7 +50,7 @@
"phantomjs": "^1.9.19",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.0",
- "systemjs": "0.19.6",
+ "systemjs": "0.19.20",
"zone.js": "0.5.10"
},
"engines": {
@@ -68,9 +68,9 @@
"grunt-jscs": "~1.5.x",
"grunt-sync": "^0.4.1",
"karma-sinon": "^1.0.3",
- "lodash": "^2.4.1",
+ "lodash": "^4.0.0",
"sinon": "1.16.1",
- "systemjs-builder": "^0.14.15",
+ "systemjs-builder": "^0.15.7",
"tslint": "^3.2.1",
"typescript": "^1.7.5"
}
diff --git a/pkg/api/dtos/index.go b/pkg/api/dtos/index.go
index 180ec767281..7c28d734be4 100644
--- a/pkg/api/dtos/index.go
+++ b/pkg/api/dtos/index.go
@@ -7,10 +7,7 @@ type IndexViewData struct {
AppSubUrl string
GoogleAnalyticsId string
GoogleTagManagerId string
-
- PluginCss []*PluginCss
- PluginModules []string
- MainNavLinks []*NavLink
+ MainNavLinks []*NavLink
}
type PluginCss struct {
diff --git a/pkg/api/index.go b/pkg/api/index.go
index 094511df1ea..11b1107674e 100644
--- a/pkg/api/index.go
+++ b/pkg/api/index.go
@@ -81,10 +81,6 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) {
}
for _, plugin := range enabledPlugins.Apps {
- if plugin.Css != nil {
- data.PluginCss = append(data.PluginCss, &dtos.PluginCss{Light: plugin.Css.Light, Dark: plugin.Css.Dark})
- }
-
if plugin.Pinned {
pageLink := &dtos.NavLink{
Text: plugin.Name,
diff --git a/pkg/plugins/app_plugin.go b/pkg/plugins/app_plugin.go
index 474b7354762..d59df9985a4 100644
--- a/pkg/plugins/app_plugin.go
+++ b/pkg/plugins/app_plugin.go
@@ -28,7 +28,6 @@ type AppIncludeInfo struct {
type AppPlugin struct {
FrontendPluginBase
- Css *AppPluginCss `json:"css"`
Pages []*AppPluginPage `json:"pages"`
Routes []*AppPluginRoute `json:"routes"`
Includes []*AppIncludeInfo `json:"-"`
@@ -68,11 +67,6 @@ func (app *AppPlugin) Load(decoder *json.Decoder, pluginDir string) error {
func (app *AppPlugin) initApp() {
app.initFrontendPlugin()
- if app.Css != nil {
- app.Css.Dark = evalRelativePluginUrlPath(app.Css.Dark, app.Id)
- app.Css.Light = evalRelativePluginUrlPath(app.Css.Light, app.Id)
- }
-
// check if we have child panels
for _, panel := range Panels {
if strings.HasPrefix(panel.PluginDir, app.PluginDir) {
diff --git a/public/app/plugins/sdk.ts b/public/app/plugins/sdk.ts
index a3616903908..854b8777766 100644
--- a/public/app/plugins/sdk.ts
+++ b/public/app/plugins/sdk.ts
@@ -2,6 +2,16 @@ import {PanelCtrl} from 'app/features/panel/panel_ctrl';
import {MetricsPanelCtrl} from 'app/features/panel/metrics_panel_ctrl';
import {QueryCtrl} from 'app/features/panel/query_ctrl';
+import config from 'app/core/config';
+
+export function loadPluginCss(options) {
+ if (config.bootData.user.lightTheme) {
+ System.import(options.light + '!css');
+ } else {
+ System.import(options.dark + '!css');
+ }
+}
+
export {
PanelCtrl,
MetricsPanelCtrl,
diff --git a/public/views/index.html b/public/views/index.html
index 724afd33f33..7c492c01480 100644
--- a/public/views/index.html
+++ b/public/views/index.html
@@ -10,14 +10,8 @@
[[if .User.LightTheme]]
- [[ range $css := .PluginCss ]]
-
- [[ end ]]
[[else]]
- [[ range $css := .PluginCss ]]
-
- [[ end ]]
[[end]]