mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix: various fixes for new grid
This commit is contained in:
parent
88ceb19d96
commit
48c8e4d627
@ -240,16 +240,24 @@ func (hs *HttpServer) registerRoutes() {
|
||||
dashboardRoute.Get("/db/:slug", wrap(GetDashboard))
|
||||
dashboardRoute.Delete("/db/:slug", reqEditorRole, wrap(DeleteDashboard))
|
||||
|
||||
dashboardRoute.Get("/id/:dashboardId/versions", wrap(GetDashboardVersions))
|
||||
dashboardRoute.Get("/id/:dashboardId/versions/:id", wrap(GetDashboardVersion))
|
||||
dashboardRoute.Post("/id/:dashboardId/restore", reqEditorRole, bind(dtos.RestoreDashboardVersionCommand{}), wrap(RestoreDashboardVersion))
|
||||
|
||||
dashboardRoute.Post("/calculate-diff", bind(dtos.CalculateDiffOptions{}), wrap(CalculateDashboardDiff))
|
||||
|
||||
dashboardRoute.Post("/db", reqEditorRole, bind(m.SaveDashboardCommand{}), wrap(PostDashboard))
|
||||
dashboardRoute.Get("/home", wrap(GetHomeDashboard))
|
||||
dashboardRoute.Get("/tags", GetDashboardTags)
|
||||
dashboardRoute.Post("/import", bind(dtos.ImportDashboardCommand{}), wrap(ImportDashboard))
|
||||
|
||||
dashboardRoute.Group("/id/:dashboardId", func(dashIdRoute RouteRegister) {
|
||||
dashIdRoute.Get("/id/:dashboardId/versions", wrap(GetDashboardVersions))
|
||||
dashIdRoute.Get("/id/:dashboardId/versions/:id", wrap(GetDashboardVersion))
|
||||
dashIdRoute.Post("/id/:dashboardId/restore", reqEditorRole, bind(dtos.RestoreDashboardVersionCommand{}), wrap(RestoreDashboardVersion))
|
||||
|
||||
dashIdRoute.Group("/acl", func(aclRoute RouteRegister) {
|
||||
aclRoute.Get("/", wrap(GetDashboardAclList))
|
||||
aclRoute.Post("/", bind(dtos.UpdateDashboardAclCommand{}), wrap(UpdateDashboardAcl))
|
||||
aclRoute.Delete("/:aclId", wrap(DeleteDashboardAcl))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
// Dashboard snapshots
|
||||
|
@ -724,6 +724,5 @@ export class DashboardModel {
|
||||
yPos += rowGridHeight;
|
||||
}
|
||||
|
||||
console.log('panels', this.panels);
|
||||
}
|
||||
}
|
||||
|
@ -135,8 +135,8 @@ export class DashboardCtrl implements PanelContainer {
|
||||
}
|
||||
|
||||
init(dashboard) {
|
||||
this.$scope.onAppEvent('show-json-editor', this.$scope.showJsonEditor);
|
||||
this.$scope.onAppEvent('template-variable-value-updated', this.$scope.templateVariableUpdated);
|
||||
this.$scope.onAppEvent('show-json-editor', this.showJsonEditor.bind(this));
|
||||
this.$scope.onAppEvent('template-variable-value-updated', this.templateVariableUpdated.bind(this));
|
||||
this.setupDashboard(dashboard);
|
||||
}
|
||||
}
|
||||
|
@ -39,18 +39,8 @@ function (angular, _, $, config) {
|
||||
// dont want url changes like adding orgId to add browser history
|
||||
$location.replace();
|
||||
this.update(this.getQueryStringState());
|
||||
this.expandRowForPanel();
|
||||
}
|
||||
|
||||
DashboardViewState.prototype.expandRowForPanel = function() {
|
||||
if (!this.state.panelId) { return; }
|
||||
|
||||
var panelInfo = this.$scope.dashboard.getPanelInfoById(this.state.panelId);
|
||||
if (panelInfo) {
|
||||
panelInfo.row.collapse = false;
|
||||
}
|
||||
};
|
||||
|
||||
DashboardViewState.prototype.needsSync = function(urlState) {
|
||||
return _.isEqual(this.state, urlState) === false;
|
||||
};
|
||||
|
@ -194,7 +194,7 @@ export class PanelCtrl {
|
||||
|
||||
editPanelJson() {
|
||||
this.publishAppEvent('show-json-editor', {
|
||||
object: this.panel,
|
||||
object: this.panel.getSaveModel(),
|
||||
updateHandler: this.replacePanel.bind(this)
|
||||
});
|
||||
}
|
||||
|
@ -18,6 +18,8 @@ import * as heatmapPanel from 'app/plugins/panel/heatmap/module';
|
||||
import * as tablePanel from 'app/plugins/panel/table/module';
|
||||
import * as singlestatPanel from 'app/plugins/panel/singlestat/module';
|
||||
import * as gettingStartedPanel from 'app/plugins/panel/gettingstarted/module';
|
||||
import * as permissionListPlugin from 'app/plugins/panel/permissionlist/module';
|
||||
|
||||
import * as testDataAppPlugin from 'app/plugins/app/testdata/module';
|
||||
import * as testDataDSPlugin from 'app/plugins/app/testdata/datasource/module';
|
||||
|
||||
@ -35,6 +37,7 @@ const builtInPlugins = {
|
||||
"app/plugins/app/testdata/module": testDataAppPlugin,
|
||||
"app/plugins/app/testdata/datasource/module": testDataDSPlugin,
|
||||
|
||||
"app/plugins/panel/permissionlist/module": permissionListPlugin,
|
||||
"app/plugins/panel/text/module": textPanel,
|
||||
"app/plugins/panel/graph/module": graphPanel,
|
||||
"app/plugins/panel/dashlist/module": dashListPanel,
|
||||
|
@ -105,7 +105,7 @@ $tight-form-bg: $dark-3;
|
||||
$tight-form-func-bg: #333;
|
||||
$tight-form-func-highlight-bg: #444;
|
||||
|
||||
$modal-backdrop-bg: $dark-3;
|
||||
$modal-backdrop-bg: #3a4754;
|
||||
$code-tag-bg: $gray-1;
|
||||
$code-tag-border: lighten($code-tag-bg, 2%);
|
||||
|
||||
|
@ -206,7 +206,7 @@ $zindex-modal: 1050;
|
||||
//
|
||||
|
||||
$btn-padding-x: 1rem !default;
|
||||
$btn-padding-y: .8rem !default;
|
||||
$btn-padding-y: .7rem !default;
|
||||
$btn-line-height: 1 !default;
|
||||
$btn-font-weight: 500 !default;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
$gf-form-margin: 1px;
|
||||
$gf-form-margin: 3px;
|
||||
|
||||
.gf-form {
|
||||
margin-bottom: $gf-form-margin;
|
||||
@ -55,6 +55,7 @@ $gf-form-margin: 1px;
|
||||
|
||||
.gf-form-label {
|
||||
padding: $input-padding-y $input-padding-x;
|
||||
margin-right: $gf-form-margin;
|
||||
flex-shrink: 0;
|
||||
font-weight: $font-weight-semi-bold;
|
||||
|
||||
@ -107,6 +108,7 @@ $gf-form-margin: 1px;
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: $input-padding-y $input-padding-x;
|
||||
margin-right: $gf-form-margin;
|
||||
font-size: $font-size-base;
|
||||
line-height: $input-line-height;
|
||||
color: $input-color;
|
||||
@ -114,8 +116,6 @@ $gf-form-margin: 1px;
|
||||
background-image: none;
|
||||
background-clip: padding-box;
|
||||
border: 1px solid $input-border-color;
|
||||
border-bottom: none;
|
||||
border-left: none;
|
||||
@include border-radius($input-border-radius-sm);
|
||||
@include box-shadow($input-box-shadow);
|
||||
white-space: nowrap;
|
||||
|
@ -13,6 +13,9 @@
|
||||
.gf-tabs-link.active {
|
||||
background-color: $panel-bg;
|
||||
}
|
||||
.tabbed-view-body {
|
||||
min-height: 200px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,7 +49,6 @@
|
||||
|
||||
.tabbed-view-body {
|
||||
padding: $spacer*2 $spacer;
|
||||
min-height: 250px;
|
||||
|
||||
&--small {
|
||||
min-height: 0px;
|
||||
|
Loading…
Reference in New Issue
Block a user