Browse Source

feat(apps): minor progress to apps list

Torkel Ödegaard 10 năm trước cách đây
mục cha
commit
4da31291d2
2 tập tin đã thay đổi với 14 bổ sung5 xóa
  1. 5 4
      pkg/plugins/app_plugin.go
  2. 9 1
      public/app/features/apps/partials/list.html

+ 5 - 4
pkg/plugins/app_plugin.go

@@ -20,10 +20,11 @@ type AppPluginCss struct {
 
 type AppPlugin struct {
 	FrontendPluginBase
-	Enabled bool           `json:"enabled"`
-	Pinned  bool           `json:"pinned"`
-	Css     *AppPluginCss  `json:"css"`
-	Page    *AppPluginPage `json:"page"`
+	Css  *AppPluginCss  `json:"css"`
+	Page *AppPluginPage `json:"page"`
+
+	Pinned  bool `json:"-"`
+	Enabled bool `json:"-"`
 }
 
 func (p *AppPlugin) Load(decoder *json.Decoder, pluginDir string) error {

+ 9 - 1
public/app/features/apps/partials/list.html

@@ -26,7 +26,15 @@
 								</a>
               </div>
             </div>
-						<span class="filter-list-card-title">{{app.name}}</span>
+						<span class="filter-list-card-title">
+							<a href="apps/edit/{{app.appId}}">
+								{{app.name}}
+							</a>
+							&nbsp; &nbsp;
+							<span class="label label-info" ng-if="app.enabled">
+								enabled
+							</span>
+						</span>
             <span class="filter-list-card-status">
               <span class="filter-list-card-state">Dashboards: 1</span>
             </span>