text: webpackJsonp([0],{0:function(t,e,n){var a,i;a=[n("shim/jquery"),n("require/backbone"),n("splunkjs/mvc/headerview"),n(114),n(186),n(115)],i=function(t,e,a,i,o,r){var s=o.generatePublicPath,d=r.configManager,l=function(){var e=d.unifiedConfig.meta.name;n.p=s(e),new a({id:"header",section:"dashboards",el:t(".preload"),acceleratedAppNav:!0}).render(),document.title="Configuration",(new i).render()};d.init(l)}.apply(e,a),!(void 0!==i&&(t.exports=i))},114:function(t,e,n){function a(t){return t&&t.__esModule?t:{default:t}}var i,o,r=n(115),s=n(140),d=a(s);i=[n("shim/jquery"),n(116),n("require/backbone"),n(185),n(179)],o=function(t,e,n,a,i){return n.View.extend({initialize:function(t){var e=r.configManager.unifiedConfig.pages.configuration;this.stateModel=new n.Model({selectedTabId:this._generateTabId(e.tabs)})},render:function(){var o=this,s=r.configManager.unifiedConfig.pages.configuration,d=this._parseHeader(s);t(".addonContainer").append(e.template(a)(d)),t(".addonContainer").append(e.template(i));var l=this._parseTabs(s);this.renderTabs(l);var c=n.Router.extend({routes:{"*filter":"changeTab"},changeTab:function(e){null!==e&&(o.tabName=e,t(".nav-tabs li").removeClass("active"),t("#"+o.tabName+"-li").parent().addClass("active"),t(".tab-content div").removeClass("active"),t("#"+e+"-tab").addClass("active"),o.stateModel.set("selectedTabId","#"+e+"-tab"))}});new c;n.history.start()},_parseHeader:function(t){var e=t.title,n=t.description;return{title:e?e:"",description:n?n:"",enableButton:!1,enableHr:!1}},_generateTabToken:function(t,e){var n=(e||t[0].title).toLowerCase().replace(/\s/g,"-");return n},_generateTabId:function(t,e){e||(e=t[0].title);var n="#"+this._generateTabToken(t,e)+"-tab";return n},_parseTabs:function(t){var e=this,n=t.tabs;return n.map(function(t,a){var i=t.title,o=(i.toLowerCase().replace(/\s/g,"-"),d.default,new d.default({containerId:e._generateTabId(n,i),pageState:e.stateModel,props:t}));return{active:0===a,title:i,token:e._generateTabToken(n,i),view:o}}).filter(function(t){return!!t})},renderTabs:function(n){var a=this,i='\n                    <li <% if (active) { %> class="active" <% } %>>\n                        <a href="#<%- token %>" id="<%- token %>-li">\n                            <%- _(title).t() %>\n                        </a>\n                    </li>\n                ',o='\n                    <div id="<%- token %>-tab" class="tab-pane <% if (active){ %>active<% } %>">\n                    </div>\n                ';e.each(n,function(r){var s=r.title,d=r.token,l=r.view,c=void 0;a.tabName?a.tabName&&a.tabName===d&&(c=!0):c=r.active,t(".nav-tabs").append(e.template(i)({title:s,token:d,active:c})),t(".tab-content").append(e.template(o)({token:d,active:c})),t(a._generateTabId(n,s)).html(l.render().$el)})}})}.apply(e,i),!(void 0!==o&&(t.exports=o))},140:function(t,e,n){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},o=n("require/backbone"),r=a(o),s=n(141),d=n(123),l=n(145),c=a(l),u=n(159),f=a(u),p=n(144),h=a(p);e.default=r.default.View.extend({initialize:function(t){this.initOptions=t,this.isTableBasedView=!!t.props.table,this.props=t.props,this.submitBtnId="add"+this.props.title.replace(" ","")+"Btn",this.initDataBinding()},initDataBinding:function(){var t=this,e=this.props.name,n=h.default[e];if(this.isTableBasedView)this.dataStore=(0,s.generateCollection)(n?"":e,{endpointUrl:n});else{var a=this.props,i=a.entity,o=a.options,r=(0,d.generateValidators)(i);this.dataStore=new((0,s.generateModel)(n?void 0:"settings",{modelName:e,fields:i,endpointUrl:n,formDataValidatorRawStr:o?o.saveValidator:void 0,onLoadRawStr:o?o.onLoad:void 0,shouldInvokeOnload:!0,validators:r}))({name:e}),this.dataStore.attr_labels={},i.forEach(function(e){var n=e.field,a=e.label;t.dataStore.attr_labels[n]=a})}},render:function(){var t=this.dataStore,e=this.submitBtnId,n=void 0;return n=this.isTableBasedView?new f.default(i({},this.initOptions,{dataStore:t,submitBtnId:e})):new c.default(i({},this.initOptions,{dataStore:t,submitBtnId:e})),this.$el.html(n.render().$el),this}})},145:function(t,e,n){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},o=n("shim/jquery"),r=a(o),s=n(116),d=a(s),l=n("require/backbone"),c=a(l),u=n(146),f=a(u),p=n(147),h=a(p),v=n(155),b=n(118),g=n(120);e.default=c.default.View.extend({initialize:function(t){var e=this;this.props=t.props,this.submitBtnId=t.submitBtnId,this.dataStore=t.dataStore,this.msgContainerId=""+t.containerId,t.dataStore.on("invalid",function(t){(0,v.displayValidationError)(e.msgContainerId,t),(0,v.addClickListener)(e.msgContainerId,"msg-error")}),this.stateModel=new c.default.Model({}),this.stateModel.on("change",this.onStateChange.bind(this)),t.pageState.on("change",function(){t.pageState.get("selectedTabId")===t.containerId&&(e.refCollectionList||[]).map(function(t){return t.fetch()})})},onStateChange:function(){var t=this,e=d.default.get(this.props,["options","onChange"]);e&&!function(){var n=t.stateModel.changedAttributes(),a={},i=t.props,o=i.entity,r=i.name;(o||[]).forEach(function(t){a[t.field]="#"+r+"-"+t.field});var s=t.stateModel.toJSON(),d=(0,b.parseFuncRawStr)(e);d(s,n,a)}()},saveData:function(){var t=this;(0,v.removeErrorMsg)(this.msgContainerId),(0,v.addSavingMsg)(this.msgContainerId,(0,g.getFormattedMessage)(108)),(0,v.addClickListener)(this.msgContainerId,"msg-loading");var e=this.stateModel.toJSON();this.props.entity.forEach(function(t){void 0===e[t.field]&&(e[t.field]="")}),this.dataStore.entry.content.set(e),this.dataStore.save(null,{success:function(){return(0,v.removeSavingMsg)(t.msgContainerId)},error:function(e,n){(0,v.removeSavingMsg)(t.msgContainerId),(0,v.addErrorMsg)(t.msgContainerId,n,!0),(0,v.addClickListener)(t.msgContainerId,"msg-error")}})},render:function(){var t=this;return this.$el.html('<div class="loading-msg-icon">'+(0,g.getFormattedMessage)(115)+"</div>"),this.dataStore.fetch().done(function(){var e=(0,r.default)(d.default.template(f.default)({buttonId:t.submitBtnId}));e.find("input[type=submit]").on("click",t.saveData.bind(t)),t.$el.html(e);var n=t.dataStore.entry.content,a=t.props,o=a.entity,s=a.name,l=[];o.forEach(function(e){void 0===n.get(e.field)&&e.defaultValue?t.stateModel.set(e.field,e.defaultValue):n.get(e.field)&&t.stateModel.set(e.field,n.get(e.field));var a=i({},e.options,{model:t.stateModel,modelAttribute:e.field,password:!!e.encrypted,elementId:s+"-"+e.field});d.default.extend(a,e.options);var o=new h.default(i({},e,{controlOptions:a}));o.collection&&l.push(o.collection),t.$(".modal-body").append(o.render().$el),e.encrypted&&t.$(".modal-body").prepend('<input type="password" id="'+e.field+'" style="display: none"/>')}),t.refCollectionList=l}),this}})},146:function(t,e){t.exports='<form class="form form-horizontal" role="form" onsubmit="return false;" autocomplete="off">\n    <div class="modal-body">\n    </div>\n    <div class="panel-footer">\n        <div class="form-horizontal form-small">\n            <div class="form-group control-group">\n                <div class="col-sm-10 controls control-placeholder">\n                    <input type="submit" id="<%- buttonId %>" class="btn btn-primary submit-btn" value=<%- _("Save").t() %> >\n                </div>\n            </div>\n        </div>\n    </div>\n</form>\n'},159:function(t,e,n){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n("shim/jquery"),o=a(i),r=n(116),s=a(r),d=n("require/backbone"),l=a(d),c=n("views/shared/tablecaption/Master"),u=a(c),f=n(171),p=a(f),h=n(174),v=a(h),b=n(183),g=a(b),m=n(141),y=n(184),M=n(120);e.default=l.default.View.extend({initialize:function(t){var e=this;this.containerId=t.containerId,this.submitBtnId=t.submitBtnId,this.props=t.props,this.dataStore=t.dataStore,this.stateModel=new l.default.Model({sortKey:"name",sortDirection:"asc",count:10,offset:0,fetching:!0}),this.listenTo(this.stateModel,"change:search change:sortDirection change:sortKey",s.default.debounce(function(){e.fetchListCollection(e.dataStore,e.stateModel)},0)),this.listenTo(this.stateModel,"change:offset",s.default.debounce(function(){void 0!==e.stateModel.changed.offset&&e.fetchListCollection(e.dataStore,e.stateModel)},0));var n=(0,m.fetchRefCollections)(t.props.name),a=n.deferred,i=n.collectionObjList,r=(0,m.fetchConfigurationModels)(),d=r.deferred,c=r.modelObjList,u=[d];a&&u.push(a),s.default.extend(this,{entitiesDeferred:o.default.when.apply(o.default,u),serviceCollectionObjList:i,configModelObjList:c})},render:function(){var t=this,e={buttonId:this.submitBtnId,buttonValue:"Add"},n=this.props,a=this.entitiesDeferred,i=this.serviceCollectionObjList,r=this.configModelObjList,d=this.fetchListCollection(this.dataStore,this.stateModel);this.$el.html('<div class="loading-msg-icon">'+(0,M.getFormattedMessage)(115)+"</div>");var l=function(){t.$el.html("");var a=new u.default({countLabel:(0,M.getFormattedMessage)(107),model:{state:t.stateModel},collection:t.dataStore,noFilterButtons:!0,filterKey:s.default.map(n.entity,function(t){return t.field})}),i=new p.default({stateModel:t.stateModel,collection:t.dataStore,showActions:!0,enableMoreInfo:!!n.table.moreInfo,component:n});t.$el.append(a.render().$el),t.$el.append(i.render().$el),(0,o.default)(t.containerId+" .table-caption-inner").prepend((0,o.default)(s.default.template(g.default)(e))),(0,o.default)("#"+t.submitBtnId).on("click",function(){new v.default({el:(0,o.default)(".dialog-placeholder"),collection:t.dataStore,component:n,isInput:!1}).render().modal()})};return d.done(function(){a?a.done(function(){(0,y.setCollectionRefCount)(t.dataStore,i,r,n.name),l()}):l()}),this},fetchListCollection:function(t,e){return e.set("fetching",!0),t.fetch({data:{sort_dir:e.get("sortDirection"),sort_key:e.get("sortKey").split(","),search:e.get("search")?e.get("search"):"",count:e.get("count"),offset:e.get("offset")},success:function(){e.set("fetching",!1)}.bind(this)})}})},183:function(t,e){t.exports='<div class="add-button">\n    <div class="btn-group btn-group-sm">\n        <button type="button" class="btn add-button btn-primary" id="<%- buttonId %>">\n            <%- _(buttonValue).t() %>\n        </button>\n    </div>\n</div>\n'},184:function(t,e,n){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}function i(t,e,n,a){t.models.forEach(function(t){var i=0;(e||[]).forEach(function(e){var n=e.value,o=e.dependencyList;n.models.forEach(function(e){var n=r.default.get(r.default.find(o,function(t){return t.referenceName===a}),"targetField");n&&t.entry.attributes.name===e.entry.content.attributes[n]&&i++})}),(n||[]).forEach(function(e){var n=e.value,o=e.dependencyList,s=r.default.get(r.default.find(o,function(t){return t.referenceName===a}),"targetField");s&&t.entry.attributes.name===n.entry.content.attributes[s]&&i++}),t.entry.content.attributes.refCount=i})}Object.defineProperty(e,"__esModule",{value:!0}),e.setCollectionRefCount=i;var o=n(116),r=a(o)},185:function(t,e){t.exports='<div class ="tool-bar">\n  <div class ="tool-title">\n    <span class="icon-tasks"></span><%- _(title).t() %>\n  </div>\n  <% if (enableButton) { %>\n    <div class = "tool-button">\n      <div class="dropdown add-button">\n        <button  id="<%= buttonId%>" class="btn btn-primary" type="button">\n           <%- _(buttonValue).t() %>\n          <% if (!singleInput) { %>\n            <span class="caret"></span>\n          <% } %>\n        </button>\n      </div>\n    </div>\n  <% } %>\n\n    <div class= "tool-description">\n        <%- _(description).t() %>\n    </div>\n</div>\n<% if(enableHr){ %>\n<hr>\n<% } %>\n'}});