|
@@ -0,0 +1,127 @@
|
|
|
+import { axios } from '@/utils/request'
|
|
|
+import { stringify } from 'qs'
|
|
|
+
|
|
|
+/**
|
|
|
+ * page func
|
|
|
+ * parameter: { }
|
|
|
+ * @param parameter
|
|
|
+ * @returns {*}
|
|
|
+ */
|
|
|
+export function getInfluxDBPage (parameter) {
|
|
|
+ return axios({
|
|
|
+ url: '/influxDB/page?' + stringify(parameter),
|
|
|
+ method: 'get',
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/json;charset=UTF-8'
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * add func
|
|
|
+ * parameter: { }
|
|
|
+ * @param parameter
|
|
|
+ * @returns {*}
|
|
|
+ */
|
|
|
+export function addInfluxDB (parameter) {
|
|
|
+ return axios({
|
|
|
+ url: '/influxDB',
|
|
|
+ method: 'POST',
|
|
|
+ headers: {
|
|
|
+ 'Accept': 'application/json',
|
|
|
+ 'Content-Type': 'application/json;charset=UTF-8'
|
|
|
+ },
|
|
|
+ data: parameter
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * update func
|
|
|
+ * parameter: { }
|
|
|
+ * @param parameter
|
|
|
+ * @returns {*}
|
|
|
+ */
|
|
|
+export function updateInfluxDB (parameter) {
|
|
|
+ return axios({
|
|
|
+ url: '/influxDB/' + parameter.id,
|
|
|
+ method: 'PUT',
|
|
|
+ data: parameter
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * fetch single func
|
|
|
+ * parameter: { }
|
|
|
+ * @param parameter
|
|
|
+ * @returns {*}
|
|
|
+ */
|
|
|
+export function fetchInfluxDB (parameter) {
|
|
|
+ return axios({
|
|
|
+ url: '/influxDB/' + parameter.id,
|
|
|
+ method: 'get',
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/json;charset=UTF-8'
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * query list func
|
|
|
+ * parameter: { }
|
|
|
+ * @param parameter
|
|
|
+ * @returns {*}
|
|
|
+ */
|
|
|
+export function queryInfluxDB (parameter) {
|
|
|
+ return axios({
|
|
|
+ url: '/influxDB?' + stringify(parameter),
|
|
|
+ method: 'get',
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/json;charset=UTF-8'
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * delete batch func
|
|
|
+ * parameter: { }
|
|
|
+ * @param parameter
|
|
|
+ * @returns {*}
|
|
|
+ */
|
|
|
+export function deleteInfluxDBs (parameter) {
|
|
|
+ return axios({
|
|
|
+ url: '/influxDB',
|
|
|
+ method: 'DELETE',
|
|
|
+ data: parameter
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * delete single func
|
|
|
+ * parameter: { }
|
|
|
+ * @param parameter
|
|
|
+ * @returns {*}
|
|
|
+ */
|
|
|
+export function deleteInfluxDB (parameter) {
|
|
|
+ return axios({
|
|
|
+ url: '/influxDB/' + parameter.id,
|
|
|
+ method: 'DELETE',
|
|
|
+ data: parameter
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * export file
|
|
|
+ * parameter: { }
|
|
|
+ * @param parameter :
|
|
|
+ * @returns {*}
|
|
|
+ */
|
|
|
+export function exportInfluxDB (parameter) {
|
|
|
+ return axios({
|
|
|
+ url: '/influxDB/export?' + stringify(parameter),
|
|
|
+ method: 'get',
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/json;charset=UTF-8'
|
|
|
+ },
|
|
|
+ responseType: 'blob'
|
|
|
+ })
|
|
|
+}
|