mirror of
https://github.com/grafana/grafana.git
synced 2026-07-30 08:18:10 -05:00
redesigning links editor
This commit is contained in:
@@ -40,7 +40,6 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<th>Tags</th>
|
||||
<th colspan="3"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -50,9 +49,6 @@
|
||||
<i class="fa fa-fw fa-external-link"></i>
|
||||
{{link.type}}
|
||||
</td>
|
||||
<td class="pointer">
|
||||
{{link.tags}}
|
||||
</td>
|
||||
<td style="width: 1%">
|
||||
<i ng-click="ctrl.moveLink($index, -1)" ng-hide="$first" class="pointer fa fa-arrow-up"></i>
|
||||
</td>
|
||||
@@ -130,7 +126,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-success" ng-if="ctrl.mode == 'new'" ng-click="ctrl.addLink(link.type, link.tags, link.url, link.title)">
|
||||
<button class="btn btn-success" ng-if="ctrl.mode == 'new'" ng-click="ctrl.addLink(link.type)">
|
||||
<i class="fa fa-plus"></i> Add</button>
|
||||
<button class="btn btn-success" ng-if="ctrl.mode == 'edit'" ng-click="ctrl.editLink()">
|
||||
<i class="fa fa-plus"></i> Edit</button>
|
||||
|
||||
@@ -39,9 +39,9 @@ export class DashLinkEditorCtrl {
|
||||
this.mode = 'edit';
|
||||
}
|
||||
|
||||
addLink(type, tags) {
|
||||
this.dashboard.links.push({ type: type, tags: tags, icon: 'external link' });
|
||||
this.dashboard.updateSubmenuVisibility();
|
||||
addLink(type) {
|
||||
this.dashboard.links.push({ type: type, icon: 'external link' });
|
||||
//this.dashboard.updateSubmenuVisibility();
|
||||
this.updated();
|
||||
this.mode = 'list';
|
||||
}
|
||||
@@ -61,7 +61,7 @@ export class DashLinkEditorCtrl {
|
||||
|
||||
deleteLink(index) {
|
||||
this.dashboard.links.splice(index, 1);
|
||||
this.dashboard.updateSubmenuVisibility();
|
||||
//this.dashboard.updateSubmenuVisibility();
|
||||
this.updated();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user