mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Refactor: EmptyListCTA (#18516)
* Rewrite EmptyListCTA props and start removing css classes * Add watchDepth onClick * EmptyListCTA with React in annotaitons/editor * Begin conversion of DashLinks editor EmptyListCTA * Use React component in DashLinks, Variables and TeamGroupSync * Remove scss file and add emotion styles * Update snapshot * Remove style import * Fix feedback * Update snapshot
This commit is contained in:
@@ -18,6 +18,19 @@ export class DashLinksEditorCtrl {
|
||||
mode: any;
|
||||
link: any;
|
||||
|
||||
emptyListCta = {
|
||||
title: 'There are no dashboard links added yet',
|
||||
buttonIcon: 'gicon gicon-link',
|
||||
buttonTitle: 'Add Dashboard Link',
|
||||
infoBox: {
|
||||
__html: `<p>
|
||||
Dashboard Links allow you to place links to other dashboards and web sites directly in below the dashboard
|
||||
header.
|
||||
</p>`,
|
||||
},
|
||||
infoBoxTitle: 'What are Dashboard Links?',
|
||||
};
|
||||
|
||||
/** @ngInject */
|
||||
constructor($scope: any, $rootScope: any) {
|
||||
this.iconMap = iconMap;
|
||||
@@ -33,10 +46,10 @@ export class DashLinksEditorCtrl {
|
||||
this.mode = 'list';
|
||||
}
|
||||
|
||||
setupNew() {
|
||||
setupNew = () => {
|
||||
this.mode = 'new';
|
||||
this.link = { type: 'dashboards', icon: 'external link' };
|
||||
}
|
||||
};
|
||||
|
||||
addLink() {
|
||||
this.dashboard.links.push(this.link);
|
||||
|
||||
Reference in New Issue
Block a user