(window.webpackJsonp=window.webpackJsonp||[]).push([[49],{519:function(e,t,r){"use strict";r.r(t);var o=r(3),l=(r(26),{data:function(){return{db:{dialect:"sqlite",storage:"./gancio.sqlite",host:"localhost",database:"gancio"},loading:!1}},methods:{checkDb:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.loading=!0,t.prev=1,t.next=4,e.$axios.$post("/setup/db",{db:e.db});case 4:e.$root.$message("DB Connection OK!",{color:"success"}),e.$emit("complete",e.db),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(1),e.$root.$message(t.t0.response.data,{color:"error"});case 11:e.loading=!1;case 12:case"end":return t.stop()}}),t,null,[[1,8]])})))()}}}),n=r(11),component=Object(n.a)(l,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("v-container",[r("v-card-title",{staticClass:"text-h5"},[e._v("Database"),r("v-card-text"),r("v-form",[r("v-btn-toggle",{attrs:{text:"",color:"primary"},model:{value:e.db.dialect,callback:function(t){e.$set(e.db,"dialect",t)},expression:"db.dialect"}},[r("v-btn",{attrs:{value:"sqlite",text:""}},[e._v("sqlite")]),r("v-btn",{attrs:{value:"postgres",text:""}},[e._v("postgres")]),r("v-btn",{attrs:{value:"mariadb",text:""}},[e._v("mariadb")])],1),"sqlite"===e.db.dialect?[r("v-text-field",{attrs:{label:"Path"},model:{value:e.db.storage,callback:function(t){e.$set(e.db,"storage",t)},expression:"db.storage"}})]:e._e(),"sqlite"!==e.db.dialect?[r("v-text-field",{attrs:{label:"Hostname",rules:[e.$validators.required("hostname")]},model:{value:e.db.host,callback:function(t){e.$set(e.db,"host",t)},expression:"db.host"}}),r("v-text-field",{attrs:{label:"Database",rules:[e.$validators.required("database")]},model:{value:e.db.database,callback:function(t){e.$set(e.db,"database",t)},expression:"db.database"}}),r("v-text-field",{attrs:{label:"Username",rules:[e.$validators.required("username")]},model:{value:e.db.username,callback:function(t){e.$set(e.db,"username",t)},expression:"db.username"}}),r("v-text-field",{attrs:{type:"password",label:"Password",rules:[e.$validators.required("password")]},model:{value:e.db.password,callback:function(t){e.$set(e.db,"password",t)},expression:"db.password"}})]:e._e()],2)],1),r("v-card-actions",[r("v-btn",{attrs:{text:"",color:"primary",loading:e.loading,disabled:e.loading},on:{click:e.checkDb}},[e._v(e._s(e.$t("common.next"))),r("v-icon",[e._v("mdi-arrow-right")])],1)],1)],1)}),[],!1,null,null,null);t.default=component.exports}}]);