ソースを参照

Merge pull request #3807 from raintank/apiPlugin

allow saving changes to appModel made by configView directive
Torkel Ödegaard 10 年 前
コミット
b150452db3
2 ファイル変更3 行追加0 行削除
  1. 1 0
      pkg/api/dtos/apps.go
  2. 2 0
      public/app/features/apps/partials/edit.html

+ 1 - 0
pkg/api/dtos/apps.go

@@ -31,6 +31,7 @@ func NewAppSettingsDto(def *plugins.AppPlugin, data *models.AppSettings) *AppSet
 		dto.Enabled = data.Enabled
 		dto.Enabled = data.Enabled
 		dto.Pinned = data.Pinned
 		dto.Pinned = data.Pinned
 		dto.Info = &def.Info
 		dto.Info = &def.Info
+		dto.JsonData = data.JsonData
 	}
 	}
 
 
 	return dto
 	return dto

+ 2 - 0
public/app/features/apps/partials/edit.html

@@ -98,6 +98,8 @@
 		<div class="simple-box-body">
 		<div class="simple-box-body">
 			<div ng-if="ctrl.appModel.appId">
 			<div ng-if="ctrl.appModel.appId">
 				<app-config-view app-model="ctrl.appModel"></app-config-view>
 				<app-config-view app-model="ctrl.appModel"></app-config-view>
+				<div class="clearfix"></div>
+				<button type="submit" class="btn btn-success" ng-click="ctrl.update()">Save</button>
 			</div>
 			</div>
 		</div>
 		</div>
 	</section>
 	</section>