(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-04861752"],{
/***/"6ffa":
/***/function(e,t,a){
// extracted by mini-css-extract-plugin
/***/},
/***/7041:
/***/function(e,t,a){"use strict";
/* harmony import */a("6ffa");
/* harmony import */},
/***/e263b:
/***/function(e,t,a){"use strict";
// ESM COMPAT FLAG
a.r(t);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"411544a2-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/db/HisManager.vue?vue&type=template&id=1e811a1a&scoped=true
a("d3b7");var s=a("1d40"),o={i18n:a("89fe"),data:function(){return{messageShowLoad:!1,DbType:"1",OnceWriteHistoryCounts:100,PartitionType:1,td:{TDengineHost:"127.0.0.1",TDenginePassWord:"taosdata",TDenginePort:6041,TDengineUserName:"root"},ChickHouse:{ChickHousePort:9e3,ChickHouseHost:"",ChickHouseUserName:"",ChickHousePassWord:"",ChickHouseDataBase:"",ChickHouseConnectTimeout:"",ChickHouseReadTimeout:""},Influxdb:{InfluxdbUrl:"",InfluxdbToken:"",InfluxdbOrg:"",InfluxdbBucket:""},pg:{PGHost:"",PGPort:5432,PGDbName:"",PGUser:"",PGPassWord:""}}},components:{},mounted:function(){this.GetDbConfig()},methods:{chargeDb:function(e){this.DbType=e},GetDbConfig:function(){var e=this;this.messageShowLoad=!0,Object(s.k)({}).then((function(t){e.messageShowLoad=!1,e.OnceWriteHistoryCounts=t.data.result.OnceWriteHistoryCounts,e.DbType=t.data.result.HistoryRecordDbType,e.PartitionType=t.data.result.PartitionType,e.td.TDengineHost=t.data.result.TDengineHost,e.td.TDenginePassWord=t.data.result.TDenginePassWord,e.td.TDengineUserName=t.data.result.TDengineUserName,e.td.TDenginePort=t.data.result.TDenginePort,e.ChickHouse.ChickHousePort=t.data.result.ChickHousePort,e.ChickHouse.ChickHouseHost=t.data.result.ChickHouseHost,e.ChickHouse.ChickHouseUserName=t.data.result.ChickHouseUserName,e.ChickHouse.ChickHousePassWord=t.data.result.ChickHousePassWord,e.ChickHouse.ChickHouseDataBase=t.data.result.ChickHouseDataBase,e.ChickHouse.ChickHouseConnectTimeout=t.data.result.ChickHouseConnectTimeout,e.ChickHouse.ChickHouseReadTimeout=t.data.result.ChickHouseReadTimeout,e.Influxdb.InfluxdbUrl=t.data.result.InfluxdbUrl,e.Influxdb.InfluxdbToken=t.data.result.InfluxdbToken,e.Influxdb.InfluxdbOrg=t.data.result.InfluxdbOrg,e.Influxdb.InfluxdbBucket=t.data.result.InfluxdbBucket,e.pg.PGHost=t.data.result.PGHost,e.pg.PGPort=t.data.result.PGPort,e.pg.PGDbName=t.data.result.PGDbName,e.pg.PGUser=t.data.result.PGUser,e.pg.PGPassWord=t.data.result.PGPassWord})).catch((function(t){e.messageShowLoad=!1}))},SetDbConfig:function(){var e=this,t={HistoryRecordDbType:e.DbType,PartitionType:e.PartitionType,OnceWriteHistoryCounts:e.OnceWriteHistoryCounts,TDengineHost:e.td.TDengineHost,TDenginePassWord:e.td.TDenginePassWord,TDenginePort:e.td.TDenginePort,TDengineUserName:e.td.TDengineUserName,ChickHousePort:e.ChickHouse.ChickHousePort,ChickHouseHost:e.ChickHouse.ChickHouseHost,ChickHouseUserName:e.ChickHouse.ChickHouseUserName,ChickHousePassWord:e.ChickHouse.ChickHousePassWord,ChickHouseDataBase:e.ChickHouse.ChickHouseDataBase,ChickHouseConnectTimeout:e.ChickHouse.ChickHouseConnectTimeout,ChickHouseReadTimeout:e.ChickHouse.ChickHouseReadTimeout,InfluxdbUrl:e.Influxdb.InfluxdbUrl,InfluxdbToken:e.Influxdb.InfluxdbToken,InfluxdbOrg:e.Influxdb.InfluxdbOrg,InfluxdbBucket:e.Influxdb.InfluxdbBucket,PGHost:e.pg.PGHost,PGPort:e.pg.PGPort,PGDbName:e.pg.PGDbName,PGUser:e.pg.PGUser,PGPassWord:e.pg.PGPassWord};this.Configuring=!0,Object(s.v)(t).then((function(t){0==t.data.code?e.$message.success(e.$t("DbBack.ConfigureSuccess")):-3==t.data.code?e.$message.error(e.$t("DbBack.DbConnectError")):e.$message.error(e.$t("DbBack.ConfigureFailed"))})).finally((function(t){e.Configuring=!1}))}},watch:{}},n=(a("7041"),a("2877")),i=Object(n.a)(o,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"page-header-index-wide"},[t("a-card",{style:{height:"100%"},attrs:{bordered:!1,bodyStyle:{padding:"16px",height:"100%"}}},[t("a-tabs",{attrs:{"default-active-key":"3"}},[t("a-tab-pane",{key:"1",attrs:{tab:e.$t("DbBack.DbConfig")}},[t("a-spin",{attrs:{tip:e.$t("DbBack.Loading"),spinning:e.messageShowLoad}},[t("a-form",{attrs:{"label-col":{span:5},"wrapper-col":{span:12}}},[t("a-form-item",{attrs:{label:e.$t("DbBack.DbType")}},[t("a-select",{on:{select:e.chargeDb},model:{value:e.DbType,callback:function(t){e.DbType=t},expression:"DbType"}},[t("a-select-option",{attrs:{value:"1"}},[e._v(" 内置 ")]),t("a-select-option",{attrs:{value:"2"}},[e._v(" TDengine ")]),t("a-select-option",{attrs:{value:"3"}},[e._v(" ClickHouse ")]),t("a-select-option",{attrs:{value:"4"}},[e._v(" Influxdb ")]),t("a-select-option",{attrs:{value:"5"}},[e._v(" PostgreSQL ")])],1)],1),2==e.DbType?t("div",[t("a-form-item",{attrs:{label:e.$t("DbBack.DbServer")}},[t("a-input",{model:{value:e.td.TDengineHost,callback:function(t){e.$set(e.td,"TDengineHost",t)},expression:"td.TDengineHost"}})],1),t("a-form-item",{attrs:{label:e.$t("DbBack.DbServerPort")}},[t("a-input",{model:{value:e.td.TDenginePort,callback:function(t){e.$set(e.td,"TDenginePort",t)},expression:"td.TDenginePort"}})],1),t("a-form-item",{attrs:{label:e.$t("DbBack.DbUserName")}},[t("a-input",{model:{value:e.td.TDengineUserName,callback:function(t){e.$set(e.td,"TDengineUserName",t)},expression:"td.TDengineUserName"}})],1),t("a-form-item",{attrs:{label:e.$t("DbBack.DbPassword")}},[t("a-input",{model:{value:e.td.TDenginePassWord,callback:function(t){e.$set(e.td,"TDenginePassWord",t)},expression:"td.TDenginePassWord"}})],1)],1):e._e(),3==e.DbType?t("div",[t("a-form-item",{attrs:{label:e.$t("DbBack.DbServer")}},[t("a-input",{model:{value:e.ChickHouse.ChickHouseHost,callback:function(t){e.$set(e.ChickHouse,"ChickHouseHost",t)},expression:"ChickHouse.ChickHouseHost"}})],1),t("a-form-item",{attrs:{label:e.$t("DbBack.DbServerPort")}},[t("a-input",{model:{value:e.ChickHouse.ChickHousePort,callback:function(t){e.$set(e.ChickHouse,"ChickHousePort",t)},expression:"ChickHouse.ChickHousePort"}})],1),t("a-form-item",{attrs:{label:e.$t("DbBack.DbName")}},[t("a-input",{model:{value:e.ChickHouse.ChickHouseDataBase,callback:function(t){e.$set(e.ChickHouse,"ChickHouseDataBase",t)},expression:"ChickHouse.ChickHouseDataBase"}})],1),t("a-form-item",{attrs:{label:e.$t("DbBack.DbUserName")}},[t("a-input",{model:{value:e.ChickHouse.ChickHouseUserName,callback:function(t){e.$set(e.ChickHouse,"ChickHouseUserName",t)},expression:"ChickHouse.ChickHouseUserName"}})],1),t("a-form-item",{attrs:{label:e.$t("DbBack.DbPassword")}},[t("a-input",{model:{value:e.ChickHouse.ChickHousePassWord,callback:function(t){e.$set(e.ChickHouse,"ChickHousePassWord",t)},expression:"ChickHouse.ChickHousePassWord"}})],1),t("a-form-item",{attrs:{label:e.$t("DbBack.ConnOutTime")}},[t("a-input",{model:{value:e.ChickHouse.ChickHouseConnectTimeout,callback:function(t){e.$set(e.ChickHouse,"ChickHouseConnectTimeout",t)},expression:"ChickHouse.ChickHouseConnectTimeout"}})],1),t("a-form-item",{attrs:{label:e.$t("DbBack.ReadOutTime")}},[t("a-input",{model:{value:e.ChickHouse.ChickHouseReadTimeout,callback:function(t){e.$set(e.ChickHouse,"ChickHouseReadTimeout",t)},expression:"ChickHouse.ChickHouseReadTimeout"}})],1)],1):e._e(),4==e.DbType?t("div",[t("a-form-item",{attrs:{label:e.$t("DbBack.InfluxdbUrl")}},[t("a-input",{model:{value:e.Influxdb.InfluxdbUrl,callback:function(t){e.$set(e.Influxdb,"InfluxdbUrl",t)},expression:"Influxdb.InfluxdbUrl"}})],1),t("a-form-item",{attrs:{label:e.$t("DbBack.InfluxdbToken")}},[t("a-input",{model:{value:e.Influxdb.InfluxdbToken,callback:function(t){e.$set(e.Influxdb,"InfluxdbToken",t)},expression:"Influxdb.InfluxdbToken"}})],1),t("a-form-item",{attrs:{label:e.$t("DbBack.InfluxdbOrg")}},[t("a-input",{model:{value:e.Influxdb.InfluxdbOrg,callback:function(t){e.$set(e.Influxdb,"InfluxdbOrg",t)},expression:"Influxdb.InfluxdbOrg"}})],1),t("a-form-item",{attrs:{label:e.$t("DbBack.InfluxdbBucket")}},[t("a-input",{model:{value:e.Influxdb.InfluxdbBucket,callback:function(t){e.$set(e.Influxdb,"InfluxdbBucket",t)},expression:"Influxdb.InfluxdbBucket"}})],1)],1):e._e(),5==e.DbType?t("div",[t("a-form-item",{attrs:{label:e.$t("DbBack.DbServer")}},[t("a-input",{model:{value:e.pg.PGHost,callback:function(t){e.$set(e.pg,"PGHost",t)},expression:"pg.PGHost"}})],1),t("a-form-item",{attrs:{label:e.$t("DbBack.DbServerPort")}},[t("a-input",{model:{value:e.pg.PGPort,callback:function(t){e.$set(e.pg,"PGPort",t)},expression:"pg.PGPort"}})],1),t("a-form-item",{attrs:{label:e.$t("DbBack.DbName")}},[t("a-input",{model:{value:e.pg.PGDbName,callback:function(t){e.$set(e.pg,"PGDbName",t)},expression:"pg.PGDbName"}})],1),t("a-form-item",{attrs:{label:e.$t("DbBack.DbUserName")}},[t("a-input",{model:{value:e.pg.PGUser,callback:function(t){e.$set(e.pg,"PGUser",t)},expression:"pg.PGUser"}})],1),t("a-form-item",{attrs:{label:e.$t("DbBack.DbPassword")}},[t("a-input",{attrs:{type:"password"},model:{value:e.pg.PGPassWord,callback:function(t){e.$set(e.pg,"PGPassWord",t)},expression:"pg.PGPassWord"}})],1)],1):e._e(),t("a-form-item",{attrs:{"wrapper-col":{span:12,offset:5}}},[t("a-button",{attrs:{type:"primary","html-type":"submit"},on:{click:e.SetDbConfig}},[e._v(" "+e._s(e.$t("DbBack.Sure"))+" ")])],1)],1)],1)],1),t("a-tab-pane",{key:"2",attrs:{tab:e.$t("DbBack.Partition")}},[t("a-spin",{attrs:{tip:e.$t("DbBack.Loading"),spinning:e.messageShowLoad}},[t("a-form",{attrs:{"label-col":{span:5},"wrapper-col":{span:12}}},[t("a-form-item",{attrs:{label:e.$t("DbBack.OneWriteNumbers")}},[t("a-input",{model:{value:e.OnceWriteHistoryCounts,callback:function(t){e.OnceWriteHistoryCounts=t},expression:"OnceWriteHistoryCounts"}})],1),1==e.DbType||5==e.DbType?t("a-form-item",{attrs:{label:e.$t("DbBack.PartitionType")}},[t("a-select",{model:{value:e.PartitionType,callback:function(t){e.PartitionType=t},expression:"PartitionType"}},[t("a-select-option",{attrs:{value:"0"}},[e._v(" "+e._s(e.$t("DbBack.PartitionNo"))+" ")]),t("a-select-option",{attrs:{value:"1"}},[e._v(" "+e._s(e.$t("DbBack.PartitionYear"))+" ")]),t("a-select-option",{attrs:{value:"2"}},[e._v(" "+e._s(e.$t("DbBack.PartitionMonth"))+" ")]),t("a-select-option",{attrs:{value:"3"}},[e._v(" "+e._s(e.$t("DbBack.PartitionDay"))+" ")]),t("a-select-option",{attrs:{value:"4"}},[e._v(" "+e._s(e.$t("DbBack.PartitionHour"))+" ")])],1)],1):e._e(),t("a-form-item",{attrs:{"wrapper-col":{span:12,offset:5}}},[t("a-button",{attrs:{type:"primary","html-type":"submit"},on:{click:e.SetDbConfig}},[e._v(" "+e._s(e.$t("DbBack.Sure"))+" ")])],1)],1)],1)],1)],1)],1)],1)}),[],!1,null,"1e811a1a",null)
/* harmony default export */;t.default=i.exports}}]);