{"size": 1900, "ext": "js", "max_stars_repo_path": "target/jira/webapp/includes/admin/customfieldsView-min.js", "max_stars_repo_name": "PramodhMDT/ATPluginAll", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "target/jira/webapp/includes/admin/customfieldsView-min.js", "max_issues_repo_name": "PramodhMDT/ATPluginAll", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "target/jira/webapp/includes/admin/customfieldsView-min.js", "max_forks_repo_name": "PramodhMDT/ATPluginAll", "max_forks_repo_forks_event_min_datetime": "2021-08-06T21:26:46.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-06T21:26:46.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 1900.0, "max_line_length": 1900, "alphanum_fraction": 0.8010526316}
define("jira/customfields/customfieldsView",["jquery","jira/marionette-3.1","jira/customfields/customfieldsCollection","jira/customfields/customfieldsTableView","jira/customfields/customfieldsEmptyView","jira/message","jira/dialog/error-dialog"],function(e,i,s,t,n,o,a){"use strict";return i.View.extend({template:e.noop,initialize:function(){this.collection=new s,this.fetchData().done(this.render).fail(this.handleErrorResponse.bind(this))},ui:{container:"#customfields-container",progressIndicator:"#custom-fields-loading-indicator"},regions:{container:"@ui.container"},childViewEvents:{"navigate:start":"displayLoadingIndicator","navigate:end":"hideLoadingIndicator","navigate:error":"handleErrorResponse","search:start":"displayLoadingIndicator","search:end":"hideLoadingIndicator"},onRender:function(){this.collection.length?this.showChildView("container",new t({collection:this.collection})):this.showChildView("container",new n)},fetchData:function(){return this.displayLoadingIndicator(),this.collection.getFirstPage().done(this.hideLoadingIndicator.bind(this))},displayLoadingIndicator:function(){this.getUI("container").addClass("active").spin("large")},hideLoadingIndicator:function(){this.getUI("container").removeClass("active").spinStop()},handleErrorResponse:function(e){var i=e.status,s=e.responseText,t=this._parseResponse(s),n=JIRA.Templates.Admin.Customfields.applicationAccessError({messages:t,status:i});switch(i){case 401:case 403:var o=JIRA.Templates.Admin.Customfields.applicationAccessErrorHeading({status:i});this._showErrorDialogue(n,o);break;default:this._showErrorMessage(n)}},_parseResponse:function(e){try{var i=JSON.parse(e),s=i.errorMessages,t=i.message;if(s)return s;if(t)return[t]}catch(e){return null}},_showErrorMessage:function(e){o.showErrorMsg(e,{closeable:!0})},_showErrorDialogue:function(e,i){return new a({heading:i,message:e,mode:"warning"}).show()}})});