{"version":3,"sources":["webpack:///./src/ui/views/Project/Settings/Notification.vue","webpack:///./src/ui/views/Project/Settings/Notification.vue?770d","webpack:///./src/ui/views/Project/Settings/Notification.vue?b364","webpack:///./src/ui/views/Project/Settings/Notification.vue?d788","webpack:///./src/ui/views/Project/Settings/Notification.vue?fa50","webpack:///./src/ui/components/components/ConnectivityChecker.vue","webpack:///./src/ui/components/components/ConnectivityChecker.vue?f65d","webpack:///./src/ui/components/components/ConnectivityChecker.vue?580a","webpack:///./src/ui/components/components/ConnectivityChecker.vue?d954"],"names":["_c","_self","_setup","staticClass","_vm","staticStyle","staticRenderFns","Notification","Vue","Component","components","ConChecker","component","style","isInModal","$t","model","value","conModel","expression","attrs","on","_s","tag","render","constructor","actions","enabled","this","projectsState","project","handleChange","val","$emit","created","JSON","parse","stringify","connectivity","addAction","type","action","params","headers","method","body","url","recipients","subject","push","deleteActionByIndex","index","splice","localProject","updateProject","__decorate","Prop","default","State","Action","Watch","deep","email","EmailAction","webhook","WebhookAction","alert","AlertAction"],"mappings":"0IAA4CA,EAAOC,W,IAASC,EAAM,KAAuB,EAAOF,EAAG,SAAUG,EAAY,kB,OAAsC,EAAC,Q,YAAQ,iCAAE,OAAIH,KAAQ,KAA8C,CAACI,EAAG,MAAO,CAA6EC,YAAY,gC,CAAC,SAAU,uEAAM,aAAIL,QAAG,S,CAA2B,eAAa,CAAM,aAAI,aAAK,WAEnZM,M,yCCWJ,IAAqBC,EAArB,cAA0CC,SAArBD,EAAY,gBALhCE,eAAU,CACTC,WAAY,CACVC,sBAGiBJ,WCbwa,I,wBCQzbK,EAAY,eACd,EACA,EACAN,GACA,EACA,KACA,WACA,MAIa,aAAAM,E,2CCnBf,W,gECA4DV,EAAOE,WAAsB,MAAU,KAAOC,UAAY,GAAQ,EAAC,kB,OAAO,SAACQ,YAAWC,CAA+Ed,MAAQ,Q,OAAoC,IAAtB,YAAsB,qD,CAAC,QAAqB,aAAII,iBAAkBW,MAAwFZ,eAAY,S,CAAc,KA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AI5BC,aAAaC,GACXJ,KAAKK,MAAM,eAAgBD,GAG7BE,UACEN,KAAKV,SAAWiB,KAAKC,MAAMD,KAAKE,UAAUT,KAAKE,QAAQQ,eAOzDC,UAAUC,GACR,MAAMC,EAAS,CAAE,KAAQD,EAAME,OAAQ,IAEvC,OAAQF,GACN,IAAK,UACHC,EAAOC,OAAS,CACdC,QAAS,CACP,eAAgB,oBAElBC,OAAQ,OACRC,KAAM,GACNC,IAAK,IAEP,MACF,IAAK,QACHL,EAAOC,OAAS,CACdK,WAAY,CAAC,oBACbC,QAAS,GACTH,KAAM,IAER,MACF,IAAK,QACHJ,EAAOC,OAAS,CACdF,KAAM,EACNK,KAAM,IAER,MAGJjB,KAAKV,SAASQ,QAAQuB,KAAKR,GAO7BS,oBAAoBC,GAClBvB,KAAKV,SAASQ,QAAQ0B,OAAOD,EAAO,GAGtC,sBACE,MAAME,EAAelB,KAAKC,MAAMD,KAAKE,UAAUT,KAAKE,UACpDuB,EAAaf,aAAeV,KAAKV,eAC3BU,KAAK0B,cAAcD,KArEHE,gBAAzBC,eAAK,CAAEC,SAAS,KAAQ,gCACNF,gBAAlBG,eAAM,aAAW,oCACgBH,gBAAjCI,eAAO,2BAAyB,oCAY/BJ,gBADCK,eAAM,WAAY,CAAEC,MAAM,KAAO,iCAdjBlD,EAAU,gBAP9BF,eAAU,CACTC,WAAY,CACVoD,MAAOC,OACPC,QAASC,OACTC,MAAOC,WAGUxD,WCnB6Z,I,YCO9aC,EAAY,eACd,EACA,EACAN,GACA,EACA,KACA,KACA,MAIa,OAAAM,E","file":"js/chunk-300a6eb4.3073f7d2.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('v-card',{staticClass:\"primary notifications-settings\",attrs:{\"flat\":\"\"}},[_c('div',{staticClass:\"notifications-settings-title\"},[_vm._v(\" \"+_vm._s(_vm.$t('uiComponents.settings.notification.title'))+\" \")]),_c('div',{staticStyle:{\"display\":\"flex\"}},[_c('ConChecker',{staticStyle:{\"margin-top\":\"10px\"}})],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\nimport { Vue, Component } from 'vue-property-decorator';\nimport ConChecker\n from '@/ui/components/components/ConnectivityChecker.vue';\n\n/**\n * Component that shows Notification settings tab\n */\n@Component({\n components: {\n ConChecker,\n },\n})\nexport default class Notification extends Vue {\n}\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Notification.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Notification.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./Notification.vue?vue&type=template&id=312db740&scoped=true&\"\nimport script from \"./Notification.vue?vue&type=script&lang=ts&\"\nexport * from \"./Notification.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./Notification.vue?vue&type=style&index=0&id=312db740&prod&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"312db740\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Notification.vue?vue&type=style&index=0&id=312db740&prod&lang=scss&scoped=true&\"","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',{staticStyle:{\"width\":\"100%\"},style:(_vm.isInModal === false ? 'border:3px solid lightgray;border-radius: 15px' : '')},[_c('h3',{staticStyle:{\"padding-bottom\":\"5px\",\"padding-left\":\"10px\"}},[_vm._v(_vm._s(_vm.$t('uiComponents.settings.notification.connectivityChecker.title')))]),_c('v-checkbox',{staticClass:\"ml-9\",attrs:{\"label\":_vm.$t('uiComponents.settings.notification.connectivityChecker.active'),\"color\":\"blue\",\"true-value\":true,\"false-value\":false,\"hide-details\":\"\"},model:{value:(_vm.conModel.enabled),callback:function ($$v) {_vm.$set(_vm.conModel, \"enabled\", $$v)},expression:\"conModel.enabled\"}}),_c('div',{staticStyle:{\"padding\":\"15px\"}},[_c('p',{staticStyle:{\"width\":\"100%\",\"border-bottom\":\"1px solid black\"}},[_vm._v(_vm._s(_vm.$t('uiComponents.settings.notification.connectivityChecker.action')))]),_c('div',{staticClass:\"d-flex\"},[_c('v-btn',{staticClass:\"accent lynus-small-btn\",attrs:{\"elevation\":\"0\"},on:{\"click\":function($event){return _vm.addAction('email')}}},[_vm._v(\" \"+_vm._s(_vm.$t('uiComponents.settings.notification.connectivityChecker.addEmailAction'))+\" \")]),_c('v-btn',{staticClass:\"accent ml-2 lynus-small-btn\",attrs:{\"elevation\":\"0\"},on:{\"click\":function($event){return _vm.addAction('webhook')}}},[_vm._v(\" \"+_vm._s(_vm.$t('uiComponents.settings.notification.connectivityChecker.addWebhookAction'))+\" \")]),_c('v-btn',{staticClass:\"accent ml-2 lynus-small-btn\",attrs:{\"elevation\":\"0\"},on:{\"click\":function($event){return _vm.addAction('alert')}}},[_vm._v(\" \"+_vm._s(_vm.$t('uiComponents.settings.notification.connectivityChecker.addAlertAction'))+\" \")])],1),_vm._l((_vm.conModel.actions),function(item,index){return _c('div',{key:index,staticStyle:{\"padding-bottom\":\"10px\"}},[_c('h3',{staticStyle:{\"padding-top\":\"5px\"}},[_vm._v(_vm._s(_vm.$t('uiComponents.settings.notification.connectivityChecker.action'))+\" \"+_vm._s(item.type))]),_c(item.type,{tag:\"component\",staticClass:\"ml-2\",attrs:{\"params\":item.params,\"enableNoRecipients\":true}}),_c('v-btn',{staticClass:\"ml-2 mt-2 lynus-small-btn\",staticStyle:{\"background-color\":\"#f3454b\",\"color\":\"black\"},attrs:{\"elevation\":\"0\"},on:{\"click\":function($event){return _vm.deleteActionByIndex(index)}}},[_vm._v(\" \"+_vm._s(_vm.$t('uiComponents.settings.notification.connectivityChecker.deleteAction'))+\" \")])],1)}),(_vm.isInModal === false)?_c('div',{staticStyle:{\"margin-top\":\"15px\",\"border-top\":\"1px solid black\"}},[_c('v-btn',{staticClass:\"accent lynus-small-btn\",staticStyle:{\"margin-top\":\"10px\"},attrs:{\"elevation\":\"0\"},on:{\"click\":function($event){return _vm.submitChanges()}}},[_vm._v(\" \"+_vm._s(_vm.$t('uiComponents.settings.notification.connectivityChecker.submitChanges'))+\" \")])],1):_vm._e()],2)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\nimport { Vue, Component, Prop, Watch } from 'vue-property-decorator';\nimport EmailAction from '@/ui/components/modals/actions/EmailAction.vue';\nimport WebhookAction from '@/ui/components/modals/actions/WebhookAction.vue';\nimport AlertAction from '@/ui/components/modals/actions/AlertAction.vue';\nimport api from '@/services/api';\nimport { State, Action } from 'vuex-class';\nimport { IProjectsState } from '@/store/modules/projects/types';\n\n/**\n * Component that shows project connectivity status\n */\n@Component({\n components: {\n email: EmailAction,\n webhook: WebhookAction,\n alert: AlertAction,\n },\n})\nexport default class ConChecker extends Vue {\n @Prop({ default: false }) isInModal!: boolean;\n @State('projects') projectsState!: IProjectsState;\n @Action('projects/updateProject') updateProject!: (project: any) => Promise\n\n conModel: any = {\n actions: [],\n enabled: false,\n };\n\n get project() {\n return this.projectsState.project;\n }\n\n @Watch('conModel', { deep: true })\n handleChange(val: any) {\n this.$emit('changeObject', val);\n }\n\n created() {\n this.conModel = JSON.parse(JSON.stringify(this.project.connectivity));\n }\n\n /**\n * addAction pushes a new action for a specific type to the actions list\n * @param {string} type action type\n */\n addAction(type: string) {\n const action = { 'type': type, params: {} };\n\n switch (type) {\n case 'webhook':\n action.params = {\n headers: {\n 'content-type': 'application/json',\n },\n method: 'POST',\n body: '',\n url: '',\n };\n break;\n case 'email':\n action.params = {\n recipients: ['example@mail.com'],\n subject: '',\n body: '',\n };\n break;\n case 'alert':\n action.params = {\n type: 0,\n body: '',\n };\n break;\n }\n\n this.conModel.actions.push(action);\n }\n\n /**\n * delete the Action based on the Index passed from the Button\n * @param {number} index action index\n */\n deleteActionByIndex(index: number) {\n this.conModel.actions.splice(index, 1);\n }\n\n async submitChanges() {\n const localProject = JSON.parse(JSON.stringify(this.project));\n localProject.connectivity = this.conModel;\n await this.updateProject(localProject);\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ConnectivityChecker.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ConnectivityChecker.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./ConnectivityChecker.vue?vue&type=template&id=99b3c446&\"\nimport script from \"./ConnectivityChecker.vue?vue&type=script&lang=ts&\"\nexport * from \"./ConnectivityChecker.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}