(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-68b6"],{"2IY7":function(t,e,r){"use strict";r.r(e);var o=r("yXPU"),s=r.n(o),a=r("o0o1"),n=r.n(a),i=r("dpNl"),c=r("rIUS"),p=r("yrTF"),l={name:"ReportsShow",components:{ModerateUserDropdown:i.a,RebootButton:c.a,ReportContent:p.a},computed:{isMobile:function(){return"mobile"===this.$store.state.app.device},loading:function(){return this.$store.state.reports.loadingSingleReport},report:function(){return this.$store.state.reports.singleReport}},mounted:function(){this.$store.dispatch("NeedReboot"),this.$store.dispatch("GetNodeInfo"),this.$store.dispatch("FetchSingleReport",this.$route.params.id),this.$store.dispatch("FetchTagPolicySetting")},methods:{capitalizeFirstLetter:function(t){return t.charAt(0).toUpperCase()+t.slice(1)},changeReportState:function(t,e){var r=this;return s()(n.a.mark(function o(){return n.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,r.$store.dispatch("ChangeReportState",[{state:t,id:e}]);case 2:r.$store.dispatch("FetchSingleReport",e);case 3:case"end":return o.stop()}},o)}))()},getStateType:function(t){switch(t){case"closed":return"info";case"resolved":return"success";default:return"primary"}},propertyExists:function(t,e,r){return r?t[e]&&t[r]:t[e]}}},d=(r("pE88"),r("KHd+")),u=Object(d.a)(l,function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.loading?t._e():r("div",{staticClass:"report-show-page-container"},[r("header",{staticClass:"report-page-header-container"},[r("div",{staticClass:"report-page-header"},[t.propertyExists(t.report.account,"nickname")?r("div",{staticClass:"avatar-name-container"},[r("h1",[t._v(t._s(t.$t("reports.reportOn")))]),t._v(" "),t.propertyExists(t.report.account,"avatar")?r("el-avatar",{staticClass:"report-page-avatar",attrs:{src:t.report.account.avatar,size:t.isMobile?"small":"large"}}):t._e(),t._v(" "),r("h1",[t._v(t._s(t.report.account.nickname))]),t._v(" "),t.propertyExists(t.report.account,"url")?r("a",{attrs:{href:t.report.account.url,target:"_blank"}},[r("i",{staticClass:"el-icon-top-right",attrs:{title:t.$t("userProfile.openAccountInInstance")}})]):t._e()],1):r("h1",[t._v(t._s(t.$t("reports.report")))])]),t._v(" "),r("div",{staticClass:"report-actions-container"},[r("el-tag",{staticClass:"report-tag",attrs:{type:t.getStateType(t.report.state)}},[t._v(t._s(t.capitalizeFirstLetter(t.report.state)))]),t._v(" "),r("el-dropdown",{attrs:{trigger:"click"}},[r("el-button",{staticClass:"report-actions-button",attrs:{size:t.isMobile?"small":"medium",plain:"",icon:"el-icon-edit"}},[t._v("\n          "+t._s(t.$t("reports.changeState"))),r("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),t._v(" "),r("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},["resolved"!==t.report.state?r("el-dropdown-item",{nativeOn:{click:function(e){return t.changeReportState("resolved",t.report.id)}}},[t._v(t._s(t.$t("reports.resolve")))]):t._e(),t._v(" "),"open"!==t.report.state?r("el-dropdown-item",{nativeOn:{click:function(e){return t.changeReportState("open",t.report.id)}}},[t._v(t._s(t.$t("reports.reopen")))]):t._e(),t._v(" "),"closed"!==t.report.state?r("el-dropdown-item",{nativeOn:{click:function(e){return t.changeReportState("closed",t.report.id)}}},[t._v(t._s(t.$t("reports.close")))]):t._e()],1)],1),t._v(" "),t.propertyExists(t.report.account,"nickname")?r("moderate-user-dropdown",{attrs:{account:t.report.account,"report-id":t.report.id,"rendered-from":"showPage"}}):t._e(),t._v(" "),r("reboot-button")],1)]),t._v(" "),t.propertyExists(t.report.account,"id")?r("h4",{staticClass:"id"},[t._v(t._s(t.$t("reports.id"))+": "+t._s(t.report.id))]):t._e(),t._v(" "),r("div",{staticClass:"report-card-container"},[r("el-card",{staticClass:"report"},[r("report-content",{attrs:{report:t.report}})],1)],1)])},[],!1,null,null,null);u.options.__file="show.vue";e.default=u.exports},pE88:function(t,e,r){"use strict";var o=r("yZ2X");r.n(o).a},yZ2X:function(t,e,r){}}]);
//# sourceMappingURL=chunk-68b6.4347fd87.js.map