text: webpackJsonp([256],{2126:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),r=(n.n(a),n(30)),o=n.n(r),l=n(2357),i=n(2361),s=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),c=this&&this.__assign||Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},p=this&&this.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&(n[a[r]]=e[a[r]]);return n},u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.location,n=e.profiles,a=e.router;if(t.query.key){var r=n.find(function(e){return e.key===t.query.key});r&&a.replace({pathname:t.pathname,query:{language:r.language,name:r.name}})}},t.prototype.render=function(){var e=this.props,t=e.organization,n=e.profiles,r=e.location,s=p(e,["organization","profiles","location"]),u=r.query,m=u.key,f=u.language,d=u.name;if(m){return n.find(function(e){return e.key===r.query.key})?null:a.createElement(l.a,{organization:t})}var h=n.find(function(e){return e.language===f&&e.name===d});if(!h)return a.createElement(l.a,{organization:t});var y=a.cloneElement(this.props.children,c({onRequestFail:this.props.onRequestFail,organization:t,profile:h,profiles:n},s));return a.createElement("div",{id:"quality-profile"},a.createElement(o.a,{title:h.name}),a.createElement(i.a,{onRequestFail:this.props.onRequestFail,organization:t,profile:h,updateProfiles:this.props.updateProfiles}),y)},t}(a.PureComponent);t.default=u},2166:function(e,t,n){"use strict";function a(e){var t=e.name,a=e.language,c=e.organization,p=e.children,u=s(e,["name","language","organization","children"]);return r.createElement(o.Link,i({to:n.i(l.a)(t,a,c),activeClassName:"link-no-underline"},u),p)}t.a=a;var r=n(0),o=(n.n(r),n(9)),l=n(387),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},s=this&&this.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&(n[a[r]]=e[a[r]]);return n}},2174:function(e,t,n){"use strict";function a(e){var t=e.className,a=e.tooltip,s=void 0===a||a,c=r.createElement("div",{className:o("outline-badge",t)},n.i(i.translate)("quality_profiles.built_in")),p=r.createElement("span",null,n.i(i.translate)("quality_profiles.built_in.description.1")," ",n.i(i.translate)("quality_profiles.built_in.description.2"));return s?r.createElement(l.a,{overlay:p},c):c}t.a=a;var r=n(0),o=(n.n(r),n(8)),l=(n.n(o),n(24)),i=n(2)},2212:function(e,t,n){"use strict";var a=n(0),r=(n.n(a),n(37)),o=n.n(r),l=n(699),i=n(2),s=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={loading:!1,name:null},t.handleCancelClick=function(e){e.preventDefault(),t.props.onClose()},t.handleNameChange=function(e){t.setState({name:e.currentTarget.value})},t.handleFormSubmit=function(e){e.preventDefault();var a=t.state.name;null!=a&&(t.setState({loading:!0}),n.i(l.s)(t.props.profile.key,a).then(function(e){return t.props.onCopy(e.name)},function(e){t.mounted&&t.setState({loading:!1}),t.props.onRequestFail(e)}))},t}return s(t,e),t.prototype.componentDidMount=function(){this.mounted=!0},t.prototype.componentWillUnmount=function(){this.mounted=!1},t.prototype.render=function(){var e=this.props.profile,t=n.i(i.translateWithParameters)("quality_profiles.copy_x_title",e.name,e.languageName),r=this.state.loading||!this.state.name||this.state.name===e.name;return a.createElement(o.a,{isOpen:!0,contentLabel:t,className:"modal",overlayClassName:"modal-overlay",onRequestClose:this.props.onClose},a.createElement("form",{id:"copy-profile-form",onSubmit:this.handleFormSubmit},a.createElement("div",{className:"modal-head"},a.createElement("h2",null,t)),a.createElement("div",{className:"modal-body"},a.createElement("div",{className:"modal-field"},a.createElement("label",{htmlFor:"copy-profile-name"},n.i(i.translate)("quality_profiles.copy_new_name"),a.createElement("em",{className:"mandatory"},"*")),a.createElement("input",{autoFocus:!0,id:"copy-profile-name",maxLength:100,name:"name",onChange:this.handleNameChange,required:!0,size:50,type:"text",value:null!=this.state.name?this.state.name:e.name}))),a.createElement("div",{className:"modal-foot"},this.state.loading&&a.createElement("i",{className:"spinner spacer-right"}),a.createElement("button",{disabled:r,id:"copy-profile-submit"},n.i(i.translate)("copy")),a.createElement("a",{href:"#",id:"copy-profile-cancel",onClick:this.handleCancelClick},n.i(i.translate)("cancel")))))},t}(a.PureComponent);t.a=c},2213:function(e,t,n){"use strict";var a=n(0),r=(n.n(a),n(37)),o=n.n(r),l=n(699),i=n(2),s=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={loading:!1,name:null},t.handleCancelClick=function(e){e.preventDefault(),t.props.onClose()},t.handleFormSubmit=function(e){e.preventDefault(),t.setState({loading:!0}),n.i(l.r)(t.props.profile.key).then(t.props.onDelete,function(e){t.mounted&&t.setState({loading:!1}),t.props.onRequestFail(e)})},t}return s(t,e),t.prototype.componentDidMount=function(){this.mounted=!0},t.prototype.componentWillUnmount=function(){this.mounted=!1},t.prototype.render=function(){var e=this.props.profile,t=n.i(i.translate)("quality_profiles.delete_confirm_title");return a.createElement(o.a,{isOpen:!0,contentLabel:t,className:"modal",overlayClassName:"modal-overlay",onRequestClose:this.props.onClose},a.createElement("form",{id:"delete-profile-form",onSubmit:this.handleFormSubmit},a.createElement("div",{className:"modal-head"},a.createElement("h2",null,t)),a.createElement("div",{className:"modal-body"},a.createElement("div",{className:"js-modal-messages"}),e.childrenCount>0?a.createElement("div",null,a.createElement("div",{className:"alert alert-warning"},n.i(i.translate)("quality_profiles.this_profile_has_descendants")),a.createElement("p",null,n.i(i.translateWithParameters)("quality_profiles.are_you_sure_want_delete_profile_x_and_descendants",e.name,e.languageName))):a.createElement("p",null,n.i(i.translateWithParameters)("quality_profiles.are_you_sure_want_delete_profile_x",e.name,e.languageName))),a.createElement("div",{className:"modal-foot"},this.state.loading&&a.createElement("i",{className:"spinner spacer-right"}),a.createElement("button",{className:"button-red",disabled:this.state.loading,id:"delete-profile-submit"},n.i(i.translate)("delete")),a.createElement("a",{href:"#",id:"delete-profile-cancel",onClick:this.handleCancelClick},n.i(i.translate)("cancel")))))},t}(a.PureComponent);t.a=c},2214:function(e,t,n){"use strict";var a=n(0),r=(n.n(a),n(6)),o=(n.n(r),n(9)),l=n(2216),i=n(2212),s=n(2213),c=n(2),p=n(34),u=n(699),m=n(387),f=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),d=function(e){function t(t){var a=e.call(this,t)||this;return a.handleRenameClick=function(e){e.preventDefault(),a.setState({renameFormOpen:!0})},a.handleProfileRename=function(e){a.closeRenameForm(),a.props.updateProfiles().then(function(){a.props.fromList||a.context.router.replace(n.i(m.a)(e,a.props.profile.language,a.props.organization))})},a.closeRenameForm=function(){a.setState({renameFormOpen:!1})},a.handleCopyClick=function(e){e.preventDefault(),a.setState({copyFormOpen:!0})},a.handleProfileCopy=function(e){a.props.updateProfiles().then(function(){a.context.router.push(n.i(m.a)(e,a.props.profile.language,a.props.organization))})},a.closeCopyForm=function(){a.setState({copyFormOpen:!1})},a.handleSetDefaultClick=function(e){e.preventDefault(),n.i(u.p)(a.props.profile.key).then(a.props.updateProfiles)},a.handleDeleteClick=function(e){e.preventDefault(),a.setState({deleteFormOpen:!0})},a.handleProfileDelete=function(){a.context.router.replace(n.i(m.e)(a.props.organization)),a.props.updateProfiles()},a.closeDeleteForm=function(){a.setState({deleteFormOpen:!1})},a.state={copyFormOpen:!1,deleteFormOpen:!1,renameFormOpen:!1},a}return f(t,e),t.prototype.render=function(){var e=this.props.profile,t=e.actions,r=void 0===t?{}:t,u=window.baseUrl+"/api/qualityprofiles/backup?profileKey="+encodeURIComponent(e.key),f=n.i(p.d)({qprofile:e.key,activation:"false"},this.props.organization);return a.createElement("ul",{className:"dropdown-menu dropdown-menu-right"},r.edit&&!e.isBuiltIn&&a.createElement("li",null,a.createElement(o.Link,{to:f},n.i(c.translate)("quality_profiles.activate_more_rules"))),!e.isBuiltIn&&a.createElement("li",null,a.createElement("a",{id:"quality-profile-backup",href:u},n.i(c.translate)("backup_verb"))),a.createElement("li",null,a.createElement(o.Link,{to:n.i(m.b)(e.name,e.language,this.props.organization),id:"quality-profile-compare"},n.i(c.translate)("compare"))),r.copy&&a.createElement("li",null,a.createElement("a",{id:"quality-profile-copy",href:"#",onClick:this.handleCopyClick},n.i(c.translate)("copy"))),r.edit&&!e.isBuiltIn&&a.createElement("li",null,a.createElement("a",{id:"quality-profile-rename",href:"#",onClick:this.handleRenameClick},n.i(c.translate)("rename"))),r.setAsDefault&&!e.isDefault&&a.createElement("li",null,a.createElement("a",{id:"quality-profile-set-as-default",href:"#",onClick:this.handleSetDefaultClick},n.i(c.translate)("set_as_default"))),r.edit&&!e.isDefault&&!e.isBuiltIn&&a.createElement("li",null,a.createElement("a",{id:"quality-profile-delete",href:"#",onClick:this.handleDeleteClick},n.i(c.translate)("delete"))),this.state.copyFormOpen&&a.createElement(i.a,{onClose:this.closeCopyForm,onCopy:this.handleProfileCopy,onRequestFail:this.props.onRequestFail,profile:e}),this.state.deleteFormOpen&&a.createElement(s.a,{onClose:this.closeDeleteForm,onDelete:this.handleProfileDelete,onRequestFail:this.props.onRequestFail,profile:e}),this.state.renameFormOpen&&a.createElement(l.a,{onClose:this.closeRenameForm,onRename:this.handleProfileRename,onRequestFail:this.props.onRequestFail,profile:e}))},t.contextTypes={router:r.object},t}(a.PureComponent);t.a=d},2215:function(e,t,n){"use strict";function a(e){var t=e.date;return t?r.createElement(i.a,{overlay:r.createElement(l.a,{date:t})},r.createElement("span",null,r.createElement(o.a,{date:t}))):r.createElement("span",null,n.i(s.translate)("never"))}t.a=a;var r=n(0),o=(n.n(r),n(202)),l=n(111),i=n(24),s=n(2)},2216:function(e,t,n){"use strict";var a=n(0),r=(n.n(a),n(37)),o=n.n(r),l=n(699),i=n(2),s=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={loading:!1,name:null},t.handleCancelClick=function(e){e.preventDefault(),t.props.onClose()},t.handleNameChange=function(e){t.setState({name:e.currentTarget.value})},t.handleFormSubmit=function(e){e.preventDefault();var a=t.state.name;null!=a&&(t.setState({loading:!0}),n.i(l.q)(t.props.profile.key,a).then(function(){return t.props.onRename(a)},function(e){t.mounted&&t.setState({loading:!1}),t.props.onRequestFail(e)}))},t}return s(t,e),t.prototype.componentDidMount=function(){this.mounted=!0},t.prototype.componentWillUnmount=function(){this.mounted=!1},t.prototype.render=function(){var e=this.props.profile,t=n.i(i.translateWithParameters)("quality_profiles.rename_x_title",e.name,e.languageName),r=this.state.loading||!this.state.name||this.state.name===e.name;return a.createElement(o.a,{isOpen:!0,contentLabel:t,className:"modal",overlayClassName:"modal-overlay",onRequestClose:this.props.onClose},a.createElement("form",{id:"rename-profile-form",onSubmit:this.handleFormSubmit},a.createElement("div",{className:"modal-head"},a.createElement("h2",null,t)),a.createElement("div",{className:"modal-body"},a.createElement("div",{className:"modal-field"},a.createElement("label",{htmlFor:"rename-profile-name"},n.i(i.translate)("quality_profiles.new_name"),a.createElement("em",{className:"mandatory"},"*")),a.createElement("input",{autoFocus:!0,id:"rename-profile-name",maxLength:100,name:"name",onChange:this.handleNameChange,required:!0,size:50,type:"text",value:null!=this.state.name?this.state.name:e.name}))),a.createElement("div",{className:"modal-foot"},this.state.loading&&a.createElement("i",{className:"spinner spacer-right"}),a.createElement("button",{disabled:r,id:"rename-profile-submit"},n.i(i.translate)("rename")),a.createElement("a",{href:"#",id:"rename-profile-cancel",onClick:this.handleCancelClick},n.i(i.translate)("cancel")))))},t}(a.PureComponent);t.a=c},2357:function(e,t,n){"use strict";function a(e){return r.createElement("div",{className:"quality-profile-not-found"},r.createElement("div",{className:"note spacer-bottom"},r.createElement(o.IndexLink,{to:n.i(i.e)(e.organization),className:"text-muted"},n.i(l.translate)("quality_profiles.page"))),r.createElement("div",null,n.i(l.translate)("quality_profiles.not_found")))}t.a=a;var r=n(0),o=(n.n(r),n(9)),l=n(2),i=n(387)},2361:function(e,t,n){"use strict";var a=n(0),r=(n.n(a),n(9)),o=n(2166),l=n(2214),i=n(2215),s=n(2174),c=n(2),p=n(387),u=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t.prototype.renderUpdateDate=function(){var e=this.props.profile,t=a.createElement("span",null,n.i(c.translate)("quality_profiles.updated_")," ",a.createElement(i.a,{date:e.userUpdatedAt}));return n.i(p.d)(e)&&(t=a.createElement("span",{className:"badge badge-normal-size badge-focus"},t)),a.createElement("li",{className:"small spacer-right"},t)},t.prototype.renderUsageDate=function(){var e=this.props.profile,t=a.createElement("span",null,n.i(c.translate)("quality_profiles.used_")," ",a.createElement(i.a,{date:e.lastUsed}));return e.lastUsed||(t=a.createElement("span",{className:"badge badge-normal-size badge-focus"},t)),a.createElement("li",{className:"small big-spacer-right"},t)},t.prototype.render=function(){var e=this.props,t=e.organization,i=e.profile;return a.createElement("header",{className:"page-header quality-profile-header"},a.createElement("div",{className:"note spacer-bottom"},a.createElement(r.IndexLink,{to:n.i(p.e)(t),className:"text-muted"},n.i(c.translate)("quality_profiles.page"))," / ",a.createElement(r.Link,{to:n.i(p.f)(i.language,t),className:"text-muted"},i.languageName)),a.createElement("h1",{className:"page-title"},a.createElement(o.a,{className:"link-base-color",language:i.language,name:i.name,organization:t},a.createElement("span",null,i.name)),i.isBuiltIn&&a.createElement(s.a,{className:"spacer-left",tooltip:!1})),a.createElement("div",{className:"pull-right"},a.createElement("ul",{className:"list-inline",style:{lineHeight:"24px"}},this.renderUpdateDate(),this.renderUsageDate(),a.createElement("li",null,a.createElement(r.Link,{to:n.i(p.c)(i.name,i.language,t),className:"button"},n.i(c.translate)("changelog"))),a.createElement("li",null,a.createElement("div",{className:"pull-left dropdown"},a.createElement("button",{className:"dropdown-toggle","data-toggle":"dropdown"},n.i(c.translate)("actions")," ",a.createElement("i",{className:"icon-dropdown"})),a.createElement(l.a,{onRequestFail:this.props.onRequestFail,organization:t,profile:i,updateProfiles:this.props.updateProfiles}))))),i.isBuiltIn&&a.createElement("div",{className:"page-description"},n.i(c.translate)("quality_profiles.built_in.description.1"),a.createElement("br",null),n.i(c.translate)("quality_profiles.built_in.description.2")))},t}(a.PureComponent);t.a=m}});
  //# sourceMappingURL=256.19e92dc6.chunk.js.map