mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
ux: working on how to show form in popover
This commit is contained in:
@@ -22,4 +22,5 @@ define([
|
||||
'./ad_hoc_filters',
|
||||
'./row/row_ctrl',
|
||||
'./repeat_option/repeat_option',
|
||||
'./event_editor',
|
||||
], function () {});
|
||||
|
||||
22
public/app/features/dashboard/event_editor.ts
Normal file
22
public/app/features/dashboard/event_editor.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
///<reference path="../../headers/common.d.ts" />
|
||||
|
||||
import _ from 'lodash';
|
||||
import coreModule from 'app/core/core_module';
|
||||
|
||||
export class EventEditorCtrl {
|
||||
/** @ngInject */
|
||||
constructor() {
|
||||
}
|
||||
}
|
||||
|
||||
export function eventEditor() {
|
||||
return {
|
||||
restrict: 'E',
|
||||
controller: EventEditorCtrl,
|
||||
bindToController: true,
|
||||
controllerAs: 'ctrl',
|
||||
templateUrl: 'public/app/features/dashboard/partials/event_editor.html',
|
||||
};
|
||||
}
|
||||
|
||||
coreModule.directive('eventEditor', eventEditor);
|
||||
27
public/app/features/dashboard/partials/event_editor.html
Normal file
27
public/app/features/dashboard/partials/event_editor.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<div class="gf-form-group">
|
||||
<h5 class="section-heading">Add annotation event</h5>
|
||||
|
||||
<div class="gf-form">
|
||||
<span class="gf-form-label width-8">Title</span>
|
||||
<input type="text" ng-model="ctrl.event.title" class="gf-form-input max-width-20">
|
||||
</div>
|
||||
<div class="gf-form">
|
||||
<span class="gf-form-label width-8">Time</span>
|
||||
<input type="text" ng-model="ctrl.event.time" class="gf-form-input max-width-20">
|
||||
</div>
|
||||
<div class="gf-form" ng-if="ctrl.event.isRegion">
|
||||
<span class="gf-form-label width-8">To</span>
|
||||
<input type="text" ng-model="ctrl.event.endTime" class="gf-form-input max-width-20">
|
||||
</div>
|
||||
<div class="gf-form gf-form--v-stretch">
|
||||
<span class="gf-form-label width-7">Description</span>
|
||||
<textarea class="gf-form-input width-25" rows="3" ng-model="ctrl.event.description" placeholder="Panel description, supports markdown & links"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="gf-form-button-row">
|
||||
<button class="btn gf-form-btn width-10 btn-success" ng-click="ctrl.addAnnotation()">
|
||||
<i class="fa fa-pencil"></i>
|
||||
Add Annotation
|
||||
</button>
|
||||
</div>
|
||||
Reference in New Issue
Block a user