Commit 4819e504 by Torkel Ödegaard

newgrid: fixes to default home dashboard

parent 1aa5ed0c
...@@ -275,18 +275,19 @@ func GetHomeDashboard(c *middleware.Context) Response { ...@@ -275,18 +275,19 @@ func GetHomeDashboard(c *middleware.Context) Response {
} }
func addGettingStartedPanelToHomeDashboard(dash *simplejson.Json) { func addGettingStartedPanelToHomeDashboard(dash *simplejson.Json) {
rows := dash.Get("rows").MustArray() panels := dash.Get("panels").MustArray()
row := simplejson.NewFromAny(rows[0])
newpanel := simplejson.NewFromAny(map[string]interface{}{ newpanel := simplejson.NewFromAny(map[string]interface{}{
"type": "gettingstarted", "type": "gettingstarted",
"id": 123123, "id": 123123,
"span": 12, "x": 0,
"y": 3,
"width": 12,
"height": 4,
}) })
panels := row.Get("panels").MustArray()
panels = append(panels, newpanel) panels = append(panels, newpanel)
row.Set("panels", panels) dash.Set("panels", panels)
} }
// GetDashboardVersions returns all dashboard versions as JSON // GetDashboardVersions returns all dashboard versions as JSON
......
<div class="dashlist" ng-if="ctrl.checksDone"> <div class="dashlist" ng-if="ctrl.checksDone">
<div class="dashlist-section"> <div class="dashlist-section">
<h6 class="dashlist-section-header"> <button class="dashlist-cta-close-btn" ng-click="ctrl.dismiss()">
Getting Started with Grafana <i class="fa fa-remove"></i>
<button class="dashlist-cta-close-btn" ng-click="ctrl.dismiss()"> </button>
<i class="fa fa-remove"></i> <ul class="progress-tracker">
</button> <li class="progress-step" ng-repeat="step in ctrl.steps" ng-class="step.cssClass">
</h6> <a class="progress-link" ng-href="{{step.href}}" target="{{step.target}}" title="{{step.note}}">
<ul class="progress-tracker"> <span class="progress-marker" ng-class="step.cssClass"><i class="{{step.icon}}"></i></span>
<li class="progress-step" ng-repeat="step in ctrl.steps" ng-class="step.cssClass"> <span class="progress-text" ng-href="{{step.href}}" target="{{step.target}}">{{step.title}}</span>
<a class="progress-link" ng-href="{{step.href}}" target="{{step.target}}" title="{{step.note}}"> </a>
<span class="progress-marker" ng-class="step.cssClass"><i class="{{step.icon}}"></i></span> <a class="btn progress-step-cta" ng-href="{{step.href}}" target="{{step.target}}">{{step.cta}}</a>
<span class="progress-text" ng-href="{{step.href}}" target="{{step.target}}">{{step.title}}</span> </li>
</a> </ul>
<a class="btn progress-step-cta" ng-href="{{step.href}}" target="{{step.target}}">{{step.cta}}</a> </div>
</li>
</ul>
</div>
</div> </div>
{ {
"id": null, "annotations": {
"title": "Home", "list": []
"tags": [], },
"style": "dark",
"timezone": "browser",
"editable": true, "editable": true,
"folderId": null,
"gnetId": null,
"graphTooltip": 0,
"hideControls": true, "hideControls": true,
"sharedCrosshair": false, "id": null,
"rows": [ "links": [],
{ "panels": [
"title": "Home Dashboard", {
"collapse": false, "content": "<div class=\"text-center dashboard-header\">\n <span>Home Dashboard</span>\n</div>",
"editable": true, "editable": true,
"height": 150, "height": 2,
"panels": [ "id": 1,
{ "links": [],
"content": "<div class=\"text-center dashboard-header\">\n <span>Home Dashboard</span>\n</div>", "mode": "html",
"editable": true, "style": {},
"id": 1, "title": "",
"links": [], "transparent": true,
"mode": "html", "type": "text",
"span": 12, "width": 12,
"style": {}, "x": 0,
"title": "", "y": 0
"transparent": true, },
"type": "text" {
} "folderId": 0,
] "headings": true,
}, "height": 17,
{ "id": 3,
"collapse": false, "limit": 4,
"links": [],
"query": "",
"recent": true,
"search": false,
"starred": true,
"tags": [],
"title": "",
"transparent": false,
"type": "dashlist",
"width": 7,
"x": 0,
"y": 6
},
{
"editable": true, "editable": true,
"height": "510px", "error": false,
"panels": [ "height": 17,
{ "id": 4,
"id": 3, "links": [],
"limit": 4, "title": "",
"links": [], "transparent": false,
"query": "", "type": "pluginlist",
"span": 7, "width": 5,
"tags": [], "x": 7,
"title": "", "y": 6
"transparent": false, }
"type": "dashlist", ],
"recent": true, "rows": [],
"search": false, "schemaVersion": 15,
"starred": true, "style": "dark",
"headings": true "tags": [],
}, "templating": {
{ "list": []
"editable": true, },
"error": false,
"id": 4,
"isNew": true,
"links": [],
"span": 5,
"title": "",
"transparent": false,
"type": "pluginlist"
}
],
"title": "Row"
}
],
"time": { "time": {
"from": "now-6h", "from": "now-6h",
"to": "now" "to": "now"
...@@ -94,13 +96,7 @@ ...@@ -94,13 +96,7 @@
], ],
"type": "timepicker" "type": "timepicker"
}, },
"templating": { "timezone": "browser",
"list": [] "title": "Home",
}, "version": 0
"annotations": {
"list": []
},
"schemaVersion": 12,
"version": 0,
"links": []
} }
...@@ -245,6 +245,7 @@ $menu-dropdown-shadow: 5px 5px 20px -5px $black; ...@@ -245,6 +245,7 @@ $menu-dropdown-shadow: 5px 5px 20px -5px $black;
// ------------------------- // -------------------------
$page-nav-bg: $black; $page-nav-bg: $black;
$page-nav-shadow: 5px 5px 20px -5px $black; $page-nav-shadow: 5px 5px 20px -5px $black;
$page-nav-breadcrumb-color: $gray-3;
// Pagination // Pagination
......
...@@ -197,6 +197,7 @@ $menu-dropdown-shadow: 5px 5px 20px -5px $gray-4; ...@@ -197,6 +197,7 @@ $menu-dropdown-shadow: 5px 5px 20px -5px $gray-4;
// ------------------------- // -------------------------
$page-nav-bg: $white; $page-nav-bg: $white;
$page-nav-shadow: 5px 5px 20px -5px $gray-4; $page-nav-shadow: 5px 5px 20px -5px $gray-4;
$page-nav-breadcrumb-color: $black;
// search // search
$search-shadow: 0 5px 30px 0 $gray-4; $search-shadow: 0 5px 30px 0 $gray-4;
......
...@@ -35,7 +35,7 @@ $path-position: $marker-size-half - ($path-height / 2); ...@@ -35,7 +35,7 @@ $path-position: $marker-size-half - ($path-height / 2);
// Container element // Container element
.progress-tracker { .progress-tracker {
display: flex; display: flex;
margin: 20px auto; margin: 0 auto;
padding: 0; padding: 0;
list-style: none; list-style: none;
} }
......
...@@ -140,7 +140,7 @@ $page-breadcrumb__angle-a: 30px; ...@@ -140,7 +140,7 @@ $page-breadcrumb__angle-a: 30px;
> a { > a {
color: $text-color-weak; color: $page-nav-breadcrumb-color;
font-size: $font-size-sm; font-size: $font-size-sm;
display: block; display: block;
padding: 0.6rem 1rem 0.6rem 3rem;; padding: 0.6rem 1rem 0.6rem 3rem;;
......
...@@ -246,6 +246,9 @@ div.flot-text { ...@@ -246,6 +246,9 @@ div.flot-text {
font-family: $headings-font-family; font-family: $headings-font-family;
font-size: $font-size-h3; font-size: $font-size-h3;
text-align: center; text-align: center;
overflow: hidden;
position: relative;
top: -10px;
span { span {
display: inline-block; display: inline-block;
@include brand-bottom-border(); @include brand-bottom-border();
......
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