2 lines
20 KiB
JavaScript
2 lines
20 KiB
JavaScript
|
(this.webpackJsonp=this.webpackJsonp||[]).push([[2],{33:function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(4),i=n(1),o=n(8);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=t.dataset,r=n.dismissEndpoint,i=n.featureId;this.container=t,this.dismissEndpoint=r,this.featureId=i,this.init()}var t,n,a;return t=e,(n=[{key:"init",value:function(){var e=this;this.container.querySelector(".js-close").addEventListener("click",function(t){return e.dismiss(t)})}},{key:"dismiss",value:function(e){var t=this;e.preventDefault(),r.a.post(this.dismissEndpoint,{feature_name:this.featureId}).then(function(){t.container.remove()}).catch(function(){Object(o.a)(Object(i.a)("An error occurred while dismissing the alert. Refresh the page and try again."))})}}])&&s(t.prototype,n),a&&s(t,a),e}()},40:function(e,t,n){"use strict";var r={};n.r(r),n.d(r,"setProject",function(){return y}),n.d(r,"setZone",function(){return _}),n.d(r,"setMachineType",function(){return w}),n.d(r,"setIsValidatingProjectBilling",function(){return O}),n.d(r,"fetchProjects",function(){return E}),n.d(r,"validateProjectBilling",function(){return P}),n.d(r,"fetchZones",function(){return S}),n.d(r,"fetchMachineTypes",function(){return T}),n.d(r,"default",function(){return I});var i={};n.r(i),n.d(i,"hasProject",function(){return C}),n.d(i,"hasZone",function(){return x}),n.d(i,"hasMachineType",function(){return k});var o=n(6),s=n(8),a=n(7),c=n.n(a),l=n(1),u=n(10),d={props:{placeholderText:{type:String,required:!0,default:Object(l.a)("Search")}},data:function(){return{searchQuery:this.value}},watch:{searchQuery:function(e){this.$emit("input",e)}}},h=n(2),p=Object(h.a)(d,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"dropdown-input"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.searchQuery,expression:"searchQuery"}],staticClass:"dropdown-input-field",attrs:{placeholder:e.placeholderText,type:"search",autocomplete:"off"},domProps:{value:e.searchQuery},on:{input:function(t){t.target.composing||(e.searchQuery=t.target.value)}}}),e._v(" "),n("i",{staticClass:"fa fa-search dropdown-input-search",attrs:{"aria-hidden":"true","data-hidden":"true"}}),e._v(" "),n("i",{staticClass:"fa fa-times dropdown-input-clear js-dropdown-input-clear",attrs:{"aria-hidden":"true","data-hidden":"true",role:"button"}})])},[],!1,null,null,null);p.options.__file="dropdown_search_input.vue";var g,f=p.exports,m=n(459),b=n(484),j=n(9),v=function(e){var t=e.resource,n=e.params,r=e.commit,i=e.mutation,o=e.payloadKey;return new Promise(function(e,s){return t.list(n).then(function(t){var n=t.result;r(i,n[o]),e()},function(e){s(e)})})},y=function(e,t){(0,e.commit)("SET_PROJECT",t)},_=function(e,t){(0,e.commit)("SET_ZONE",t)},w=function(e,t){(0,e.commit)("SET_MACHINE_TYPE",t)},O=function(e,t){(0,e.commit)("SET_IS_VALIDATING_PROJECT_BILLING",t)},E=function(e){var t=e.commit;return v({resource:gapi.client.cloudresourcemanager.projects,params:{},commit:t,mutation:"SET_PROJECTS",payloadKey:"projects"})},P=function(e){var t=e.dispatch,n=e.commit,r=e.state;return new Promise(function(e,i){var o=gapi.client.cloudbilling.projects.getBillingInfo({name:"projects/".concat(r.selectedProject.projectId)});return n("SET_ZONE",""),n("SET_MACHINE_TYPE",""),o.then(function(r){var i=r.result.billingEnabled;n("SET_PROJECT_BILLING_STATUS",!!i),t("setIsValidatingProjectBilling",!1),e()},function(e){t("setIsValidatingProjectBilling",!1),i(e)})})},S=function(e){var t=e.commit,n=e.state;return v({resource:gapi.client.compute.zones,params:{project:n.selectedProject.projectId},commit:t,mutation:"SET_ZONES",payloadKey:"items"})},T=function(e){var t=e.commit,n=e.state;return v({resource:gapi.client.compute.machineTypes,params:{project:n.selectedProject.projectId,zone:n.selectedZone},commit:t,mutation:"SET_MACHINE_TYPES",pay
|
||
|
//# sourceMappingURL=commons~pages.groups~pages.groups.activity~pages.groups.analytics.show~pages.groups.billings~pages.g~19c9979b.4b02a609.chunk.js.map
|