diff --git a/public/app/core/components/switch.ts b/public/app/core/components/switch.ts
new file mode 100644
index 00000000000..72e54857e26
--- /dev/null
+++ b/public/app/core/components/switch.ts
@@ -0,0 +1,47 @@
+///
+
+import config from 'app/core/config';
+import _ from 'lodash';
+import $ from 'jquery';
+import coreModule from 'app/core/core_module';
+
+var template = `
+
+
+
+
+
+`;
+
+export class SwitchCtrl {
+ onChange: any;
+
+ internalOnChange() {
+ return new Promise(resolve => {
+ setTimeout(() => {
+ this.onChange();
+ resolve();
+ });
+ });
+ }
+
+}
+
+export function switchDirective() {
+ return {
+ restrict: 'E',
+ controller: SwitchCtrl,
+ controllerAs: 'ctrl',
+ bindToController: true,
+ scope: {
+ checked: "=",
+ label: "@",
+ labelClass: "@",
+ switchClass: "@",
+ onChange: "&",
+ },
+ template: template,
+ };
+}
+
+coreModule.directive('gfFormSwitch', switchDirective);
diff --git a/public/app/core/core.ts b/public/app/core/core.ts
index 2ab7ea01410..b0922af3f39 100644
--- a/public/app/core/core.ts
+++ b/public/app/core/core.ts
@@ -29,6 +29,7 @@ import {colorPicker} from './components/colorpicker';
import {navbarDirective} from './components/navbar/navbar';
import {arrayJoin} from './directives/array_join';
import {layoutSelector} from './components/layout_selector/layout_selector';
+import {switchDirective} from './components/switch';
import 'app/core/controllers/all';
import 'app/core/services/all';
import 'app/core/routes/routes';
@@ -44,5 +45,6 @@ export {
searchDirective,
colorPicker,
layoutSelector,
+ switchDirective,
infoPopover
};
diff --git a/public/app/features/panel/partials/panelTime.html b/public/app/features/panel/partials/panelTime.html
index 77a554faa86..4047558317f 100644
--- a/public/app/features/panel/partials/panelTime.html
+++ b/public/app/features/panel/partials/panelTime.html
@@ -23,15 +23,16 @@
ng-change="ctrl.refresh()" ng-model-onblur>
-
Misc options
@@ -75,20 +63,14 @@
Multiple Series
-
-
+
+
+
+