Browse Source

Datasource: Support min time interval input in ms (#18719)

* Support min time interval input in ms in SQL datasource settings

* Enable ms in elastic min time interval setup
Dominik Prokop 6 years ago
parent
commit
90508cdbf2

+ 1 - 1
public/app/plugins/datasource/elasticsearch/partials/config.html

@@ -42,7 +42,7 @@
         ng-model="ctrl.current.jsonData.timeInterval"
         ng-model="ctrl.current.jsonData.timeInterval"
         spellcheck='false'
         spellcheck='false'
         placeholder="10s"
         placeholder="10s"
-        ng-pattern="/^\d+[Mwdhmsy]$/"
+        ng-pattern="/^\d+(ms|[Mwdhmsy])$/"
       ></input>
       ></input>
 			<info-popover mode="right-absolute">
 			<info-popover mode="right-absolute">
 				A lower limit for the auto group by time interval. Recommended to be set to write frequency,
 				A lower limit for the auto group by time interval. Recommended to be set to write frequency,

+ 1 - 1
public/app/plugins/datasource/mssql/partials/config.html

@@ -88,7 +88,7 @@
         ng-model="ctrl.current.jsonData.timeInterval"
         ng-model="ctrl.current.jsonData.timeInterval"
         spellcheck='false'
         spellcheck='false'
         placeholder="1m"
         placeholder="1m"
-        ng-pattern="/^\d+[Mwdhmsy]$/"
+        ng-pattern="/^\d+(ms|[Mwdhmsy])$/"
       ></input>
       ></input>
 			<info-popover mode="right-absolute">
 			<info-popover mode="right-absolute">
 				A lower limit for the auto group by time interval. Recommended to be set to write frequency,
 				A lower limit for the auto group by time interval. Recommended to be set to write frequency,

+ 1 - 1
public/app/plugins/datasource/mysql/partials/config.html

@@ -88,7 +88,7 @@
         ng-model="ctrl.current.jsonData.timeInterval"
         ng-model="ctrl.current.jsonData.timeInterval"
         spellcheck='false'
         spellcheck='false'
         placeholder="1m"
         placeholder="1m"
-        ng-pattern="/^\d+[Mwdhmsy]$/"
+        ng-pattern="/^\d+(ms|[Mwdhmsy])$/"
       ></input>
       ></input>
 			<info-popover mode="right-absolute">
 			<info-popover mode="right-absolute">
 				A lower limit for the auto group by time interval. Recommended to be set to write frequency,
 				A lower limit for the auto group by time interval. Recommended to be set to write frequency,

+ 1 - 1
public/app/plugins/datasource/postgres/partials/config.html

@@ -102,7 +102,7 @@
         ng-model="ctrl.current.jsonData.timeInterval"
         ng-model="ctrl.current.jsonData.timeInterval"
         spellcheck='false'
         spellcheck='false'
         placeholder="1m"
         placeholder="1m"
-        ng-pattern="/^\d+[Mwdhmsy]$/"
+        ng-pattern="/^\d+(ms|[Mwdhmsy])$/"
       ></input>
       ></input>
 			<info-popover mode="right-absolute">
 			<info-popover mode="right-absolute">
 				A lower limit for the auto group by time interval. Recommended to be set to write frequency,
 				A lower limit for the auto group by time interval. Recommended to be set to write frequency,