@@ -28,15 +28,15 @@ function (coreModule) {
coreModule.default.controller('NewDashboardCtrl', function($scope) {
$scope.initDashboard({
- meta: { canStar: false, canShare: false },
+ meta: { canStar: false, canShare: false, isNew: true },
dashboard: {
title: "New dashboard",
+ isNew: true,
rows: [
{
title: 'Dashboard Row',
height: '250px',
panels:[],
- isNew: true,
}
]
},
@@ -65,15 +65,14 @@ export class DashboardModel {
this.links = data.links || [];
this.gnetId = data.gnetId || null;
- if (this.id === null) {
- this.editMode = true;
- }
-
this.updateSchema(data);
this.initMeta(meta);
+
+ this.editMode = this.meta.isNew;
private initMeta(meta) {
+ console.log(meta);
meta = meta || {};
meta.canShare = meta.canShare !== false;
@@ -19,7 +19,7 @@ export class DashRowCtrl {
constructor(private $scope, private $rootScope, private $timeout, private uiSegmentSrv, private $q) {
this.row.title = this.row.title || 'Row title';
- if (this.row.isNew) {
+ if (this.dashboard.meta.isNew) {
this.dropView = 1;
delete this.row.isNew;
@@ -353,9 +353,9 @@ div.flot-text {
.dash-row-add-panel {
margin: 0;
padding: $panel-margin*2;
- display: flex;
- align-items: flex-start;
- position: relative;
+ // display: flex;
+ // align-items: flex-start;
+ // position: relative;
.add-panel-panels-scroll {