Browse Source

Grafana: Create new playlist/dashboard/channel card is not visible when there are no items in the list (#18890)

Ivana Huckova 6 years ago
parent
commit
803699ea88

+ 10 - 10
public/app/core/components/manage_dashboards/manage_dashboards.html

@@ -114,14 +114,14 @@
 </div>
 </div>
 
 
 <div ng-if="ctrl.canSave && ctrl.folderId && !ctrl.hasFilters && ctrl.sections.length === 0">
 <div ng-if="ctrl.canSave && ctrl.folderId && !ctrl.hasFilters && ctrl.sections.length === 0">
-  <empty-list-cta model="{
-    title: 'This folder doesn\'t have any dashboards yet',
-    buttonIcon: 'gicon gicon-dashboard-new',
-    buttonLink: 'dashboard/new?folderId={{ctrl.folderId}}',
-    buttonTitle: 'Create Dashboard',
-    proTip: 'Add/move dashboards to your folder at ->',
-    proTipLink: 'dashboards',
-    proTipLinkTitle: 'Manage dashboards',
-    proTipTarget: ''
-  }" />
+  <empty-list-cta 
+    title="'This folder doesn\'t have any dashboards yet'"
+    buttonIcon="'gicon gicon-dashboard-new'" 
+    buttonLink="'dashboard/new?folderId={{ctrl.folderId}}'"
+    buttonTitle="'Create Dashboard'"  
+    proTip="'Add/move dashboards to your folder at ->'" 
+    proTipLink="'dashboards'" 
+    proTipLinkTitle="'Manage dashboards'" 
+    proTipTarget=""
+  />
 </div>
 </div>

+ 10 - 10
public/app/features/alerting/partials/notifications_list.html

@@ -45,15 +45,15 @@
     </table>
     </table>
   </div>
   </div>
   <div ng-if="ctrl.notifications.length === 0">
   <div ng-if="ctrl.notifications.length === 0">
-    <empty-list-cta model="{
-      title: 'There are no notification channels defined yet',
-      buttonIcon: 'gicon gicon-alert-notification-channel',
-      buttonLink: 'alerting/notification/new',
-      buttonTitle: 'Add channel',
-      proTip: 'You can include images in your alert notifications.',
-      proTipLink: 'http://docs.grafana.org/alerting/notifications/',
-      proTipLinkTitle: 'Learn more',
-      proTipTarget: '_blank'
-    }" />
+    <empty-list-cta
+    title= "'There are no notification channels defined yet'"
+    buttonIcon= "'gicon gicon-alert-notification-channel'"
+    buttonLink= "'alerting/notification/new'"
+    buttonTitle= "'Add channel'"
+    proTip= "'You can include images in your alert notifications.'"
+    proTipLink= "'http://docs.grafana.org/alerting/notifications/'"
+    proTipLinkTitle= "'Learn more'"
+    proTipTarget= "'_blank'"
+    />
   </div>
   </div>
 </div>
 </div>

+ 9 - 10
public/app/features/playlist/partials/playlists.html

@@ -53,15 +53,14 @@
     </table>
     </table>
   </div>
   </div>
   <div ng-if="ctrl.playlists.length === 0">
   <div ng-if="ctrl.playlists.length === 0">
-    <empty-list-cta model="{
-      title: 'There are no playlists created yet',
-      buttonIcon: 'fa fa-plus',
-      buttonLink: 'playlists/create',
-      buttonTitle: ' Create Playlist',
-      proTip: 'You can use playlists to cycle dashboards on TVs without user control',
-      proTipLink: 'http://docs.grafana.org/reference/playlist/',
-      proTipLinkTitle: 'Learn more',
-      proTipTarget: '_blank'
-    }" />
+    <empty-list-cta
+      title="'There are no playlists created yet'"
+      buttonIcon="'fa fa-plus'"
+      buttonLink="'playlists/create'"
+      buttonTitle="'Create Playlist'" 
+      proTip="'You can use playlists to cycle dashboards on TVs without user control'"
+      proTipLink="'http://docs.grafana.org/reference/playlist/'" 
+      proTipLinkTitle="'Learn more'"
+      proTipTarget="'_blank'" />
   </div>
   </div>
 </div>
 </div>