EVOLUTION-MANAGER
Edit File: ApiKeysPage.4d0490a94b199a11f40c.js
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{"1LJY":function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(e){return e.timeZone}},EKT6:function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n("q1tI"),a=n.n(r),o=n("Obii"),i=Object(r.forwardRef)(function(e,t){return a.a.createElement("label",{className:e.labelClassName},a.a.createElement("input",{ref:t,type:"text",className:e.inputClassName,value:Object(o.unEscapeStringFromRegex)(e.value),onChange:function(t){return e.onChange(Object(o.escapeStringForRegex)(t.target.value))},placeholder:e.placeholder?e.placeholder:null}),a.a.createElement("i",{className:"gf-form-input-icon fa fa-search"}))})},IDhZ:function(e,t,n){"use strict"; /** @license React v16.12.0 * react-dom-server.browser.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var r=n("MgzW"),a=n("q1tI");function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i="function"==typeof Symbol&&Symbol.for,l=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,c=i?Symbol.for("react.strict_mode"):60108,u=i?Symbol.for("react.profiler"):60114,f=i?Symbol.for("react.provider"):60109,p=i?Symbol.for("react.context"):60110,d=i?Symbol.for("react.concurrent_mode"):60111,h=i?Symbol.for("react.forward_ref"):60112,m=i?Symbol.for("react.suspense"):60113,y=i?Symbol.for("react.suspense_list"):60120,v=i?Symbol.for("react.memo"):60115,g=i?Symbol.for("react.lazy"):60116,w=i?Symbol.for("react.fundamental"):60117,b=i?Symbol.for("react.scope"):60119,x=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case s:return"Fragment";case l:return"Portal";case u:return"Profiler";case c:return"StrictMode";case m:return"Suspense";case y:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case p:return"Context.Consumer";case f:return"Context.Provider";case h:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case v:return E(e.type);case g:if(e=1===e._status?e._result:null)return E(e)}return null}x.hasOwnProperty("ReactCurrentDispatcher")||(x.ReactCurrentDispatcher={current:null}),x.hasOwnProperty("ReactCurrentBatchConfig")||(x.ReactCurrentBatchConfig={suspense:null});var k={};function S(e,t){for(var n=0|e._threadCount;n<=t;n++)e[n]=e._currentValue2,e._threadCount=n+1}for(var N=new Uint16Array(16),_=0;15>_;_++)N[_]=_+1;N[15]=0;var C=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,A=Object.prototype.hasOwnProperty,F={},O={};function I(e){return!!A.call(O,e)||!A.call(F,e)&&(C.test(e)?O[e]=!0:(F[e]=!0,!1))}function D(e,t,n,r,a,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o}var K={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){K[e]=new D(e,0,!1,e,null,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];K[t]=new D(t,1,!1,e[1],null,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){K[e]=new D(e,2,!1,e.toLowerCase(),null,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){K[e]=new D(e,2,!1,e,null,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){K[e]=new D(e,3,!1,e.toLowerCase(),null,!1)}),["checked","multiple","muted","selected"].forEach(function(e){K[e]=new D(e,3,!0,e,null,!1)}),["capture","download"].forEach(function(e){K[e]=new D(e,4,!1,e,null,!1)}),["cols","rows","size","span"].forEach(function(e){K[e]=new D(e,6,!1,e,null,!1)}),["rowSpan","start"].forEach(function(e){K[e]=new D(e,5,!1,e.toLowerCase(),null,!1)});var j=/[\-:]([a-z])/g;function T(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(j,T);K[t]=new D(t,1,!1,e,null,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(j,T);K[t]=new D(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(j,T);K[t]=new D(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)}),["tabIndex","crossOrigin"].forEach(function(e){K[e]=new D(e,1,!1,e.toLowerCase(),null,!1)}),K.xlinkHref=new D("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach(function(e){K[e]=new D(e,1,!1,e.toLowerCase(),null,!0)});var M=/["'&<>]/;function L(e){if("boolean"==typeof e||"number"==typeof e)return""+e;e=""+e;var t=M.exec(e);if(t){var n,r="",a=0;for(n=t.index;n<e.length;n++){switch(e.charCodeAt(n)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}a!==n&&(r+=e.substring(a,n)),a=n+1,r+=t}e=a!==n?r+e.substring(a,n):r}return e}function P(e,t){var n,r=K.hasOwnProperty(e)?K[e]:null;return(n="style"!==e)&&(n=null!==r?0===r.type:2<e.length&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1])),n||function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(e,t,r,!1)?"":null!==r?(e=r.attributeName,3===(n=r.type)||4===n&&!0===t?e+'=""':(r.sanitizeURL&&(t=""+t),e+'="'+L(t)+'"')):I(e)?e+'="'+L(t)+'"':""}var R="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},z=null,V=null,W=null,U=!1,q=!1,H=null,$=0;function Q(){if(null===z)throw Error(o(321));return z}function B(){if(0<$)throw Error(o(312));return{memoizedState:null,queue:null,next:null}}function G(){return null===W?null===V?(U=!1,V=W=B()):(U=!0,W=V):null===W.next?(U=!1,W=W.next=B()):(U=!0,W=W.next),W}function Y(e,t,n,r){for(;q;)q=!1,$+=1,W=null,n=e(t,r);return V=z=null,$=0,W=H=null,n}function Z(e,t){return"function"==typeof t?t(e):t}function J(e,t,n){if(z=Q(),W=G(),U){var r=W.queue;if(t=r.dispatch,null!==H&&void 0!==(n=H.get(r))){H.delete(r),r=W.memoizedState;do{r=e(r,n.action),n=n.next}while(null!==n);return W.memoizedState=r,[r,t]}return[W.memoizedState,t]}return e=e===Z?"function"==typeof t?t():t:void 0!==n?n(t):t,W.memoizedState=e,e=(e=W.queue={last:null,dispatch:null}).dispatch=function(e,t,n){if(!(25>$))throw Error(o(301));if(e===z)if(q=!0,e={action:n,next:null},null===H&&(H=new Map),void 0===(n=H.get(t)))H.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}}.bind(null,z,e),[W.memoizedState,e]}function X(){}var ee=0,te={readContext:function(e){var t=ee;return S(e,t),e[t]},useContext:function(e){Q();var t=ee;return S(e,t),e[t]},useMemo:function(e,t){if(z=Q(),t=void 0===t?null:t,null!==(W=G())){var n=W.memoizedState;if(null!==n&&null!==t){e:{var r=n[1];if(null===r)r=!1;else{for(var a=0;a<r.length&&a<t.length;a++)if(!R(t[a],r[a])){r=!1;break e}r=!0}}if(r)return n[0]}}return e=e(),W.memoizedState=[e,t],e},useReducer:J,useRef:function(e){z=Q();var t=(W=G()).memoizedState;return null===t?(e={current:e},W.memoizedState=e):t},useState:function(e){return J(Z,e)},useLayoutEffect:function(){},useCallback:function(e){return e},useImperativeHandle:X,useEffect:X,useDebugValue:X,useResponder:function(e,t){return{props:t,responder:e}},useDeferredValue:function(e){return Q(),e},useTransition:function(){return Q(),[function(e){e()},!1]}},ne={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function re(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}var ae={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},oe=r({menuitem:!0},ae),ie={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},le=["Webkit","ms","Moz","O"];Object.keys(ie).forEach(function(e){le.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ie[t]=ie[e]})});var se=/([A-Z])/g,ce=/^ms-/,ue=a.Children.toArray,fe=x.ReactCurrentDispatcher,pe={listing:!0,pre:!0,textarea:!0},de=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,he={},me={};var ye=Object.prototype.hasOwnProperty,ve={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function ge(e,t){if(void 0===e)throw Error(o(152,E(t)||"Component"))}function we(e,t,n){function i(a,i){var l=i.prototype&&i.prototype.isReactComponent,s=function(e,t,n,r){if(r&&"object"==typeof(r=e.contextType)&&null!==r)return S(r,n),r[n];if(e=e.contextTypes){for(var a in n={},e)n[a]=t[a];t=n}else t=k;return t}(i,t,n,l),c=[],u=!1,f={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===c)return null},enqueueReplaceState:function(e,t){u=!0,c=[t]},enqueueSetState:function(e,t){if(null===c)return null;c.push(t)}};if(l){if(l=new i(a.props,s,f),"function"==typeof i.getDerivedStateFromProps){var p=i.getDerivedStateFromProps.call(null,a.props,l.state);null!=p&&(l.state=r({},l.state,p))}}else if(z={},l=i(a.props,s,f),null==(l=Y(i,a.props,l,s))||null==l.render)return void ge(e=l,i);if(l.props=a.props,l.context=s,l.updater=f,void 0===(f=l.state)&&(l.state=f=null),"function"==typeof l.UNSAFE_componentWillMount||"function"==typeof l.componentWillMount)if("function"==typeof l.componentWillMount&&"function"!=typeof i.getDerivedStateFromProps&&l.componentWillMount(),"function"==typeof l.UNSAFE_componentWillMount&&"function"!=typeof i.getDerivedStateFromProps&&l.UNSAFE_componentWillMount(),c.length){f=c;var d=u;if(c=null,u=!1,d&&1===f.length)l.state=f[0];else{p=d?f[0]:l.state;var h=!0;for(d=d?1:0;d<f.length;d++){var m=f[d];null!=(m="function"==typeof m?m.call(l,p,a.props,s):m)&&(h?(h=!1,p=r({},p,m)):r(p,m))}l.state=p}}else c=null;if(ge(e=l.render(),i),"function"==typeof l.getChildContext&&"object"==typeof(a=i.childContextTypes)){var y=l.getChildContext();for(var v in y)if(!(v in a))throw Error(o(108,E(i)||"Unknown",v))}y&&(t=r({},t,y))}for(;a.isValidElement(e);){var l=e,s=l.type;if("function"!=typeof s)break;i(l,s)}return{child:e,context:t}}var be=function(){function e(e,t){a.isValidElement(e)?e.type!==s?e=[e]:(e=e.props.children,e=a.isValidElement(e)?[e]:ue(e)):e=ue(e),e={type:null,domNamespace:ne.html,children:e,childIndex:0,context:k,footer:""};var n=N[0];if(0===n){var r=N,i=2*(n=r.length);if(!(65536>=i))throw Error(o(304));var l=new Uint16Array(i);for(l.set(r),(N=l)[0]=n+1,r=n;r<i-1;r++)N[r]=r+1;N[i-1]=0}else N[0]=N[n];this.threadID=n,this.stack=[e],this.exhausted=!1,this.currentSelectValue=null,this.previousWasTextNode=!1,this.makeStaticMarkup=t,this.suspenseDepth=0,this.contextIndex=-1,this.contextStack=[],this.contextValueStack=[]}var t=e.prototype;return t.destroy=function(){if(!this.exhausted){this.exhausted=!0,this.clearProviders();var e=this.threadID;N[e]=N[0],N[0]=e}},t.pushProvider=function(e){var t=++this.contextIndex,n=e.type._context,r=this.threadID;S(n,r);var a=n[r];this.contextStack[t]=n,this.contextValueStack[t]=a,n[r]=e.props.value},t.popProvider=function(){var e=this.contextIndex,t=this.contextStack[e],n=this.contextValueStack[e];this.contextStack[e]=null,this.contextValueStack[e]=null,this.contextIndex--,t[this.threadID]=n},t.clearProviders=function(){for(var e=this.contextIndex;0<=e;e--)this.contextStack[e][this.threadID]=this.contextValueStack[e]},t.read=function(e){if(this.exhausted)return null;var t=ee;ee=this.threadID;var n=fe.current;fe.current=te;try{for(var r=[""],a=!1;r[0].length<e;){if(0===this.stack.length){this.exhausted=!0;var i=this.threadID;N[i]=N[0],N[0]=i;break}var l=this.stack[this.stack.length-1];if(a||l.childIndex>=l.children.length){var s=l.footer;if(""!==s&&(this.previousWasTextNode=!1),this.stack.pop(),"select"===l.type)this.currentSelectValue=null;else if(null!=l.type&&null!=l.type.type&&l.type.type.$$typeof===f)this.popProvider(l.type);else if(l.type===m){this.suspenseDepth--;var c=r.pop();if(a){a=!1;var u=l.fallbackFrame;if(!u)throw Error(o(303));this.stack.push(u),r[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}r[this.suspenseDepth]+=c}r[this.suspenseDepth]+=s}else{var p=l.children[l.childIndex++],d="";try{d+=this.render(p,l.context,l.domNamespace)}catch(e){if(null!=e&&"function"==typeof e.then)throw Error(o(294));throw e}r.length<=this.suspenseDepth&&r.push(""),r[this.suspenseDepth]+=d}}return r[0]}finally{fe.current=n,ee=t}},t.render=function(e,t,n){if("string"==typeof e||"number"==typeof e)return""===(n=""+e)?"":this.makeStaticMarkup?L(n):this.previousWasTextNode?"\x3c!-- --\x3e"+L(n):(this.previousWasTextNode=!0,L(n));if(e=(t=we(e,t,this.threadID)).child,t=t.context,null===e||!1===e)return"";if(!a.isValidElement(e)){if(null!=e&&null!=e.$$typeof){if((n=e.$$typeof)===l)throw Error(o(257));throw Error(o(258,n.toString()))}return e=ue(e),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),""}var i=e.type;if("string"==typeof i)return this.renderDOM(e,t,n);switch(i){case c:case d:case u:case y:case s:return e=ue(e.props.children),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case m:throw Error(o(294))}if("object"==typeof i&&null!==i)switch(i.$$typeof){case h:z={};var x=i.render(e.props,e.ref);return x=Y(i.render,e.props,x,e.ref),x=ue(x),this.stack.push({type:null,domNamespace:n,children:x,childIndex:0,context:t,footer:""}),"";case v:return e=[a.createElement(i.type,r({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case f:return n={type:e,domNamespace:n,children:i=ue(e.props.children),childIndex:0,context:t,footer:""},this.pushProvider(e),this.stack.push(n),"";case p:i=e.type,x=e.props;var E=this.threadID;return S(i,E),i=ue(x.children(i[E])),this.stack.push({type:e,domNamespace:n,children:i,childIndex:0,context:t,footer:""}),"";case w:throw Error(o(338));case g:switch(function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then(function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)},function(t){0===e._status&&(e._status=2,e._result=t)})}}(i=e.type),i._status){case 1:return e=[a.createElement(i._result,r({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case 2:throw i._result;default:throw Error(o(295))}case b:throw Error(o(343))}throw Error(o(130,null==i?i:typeof i,""))},t.renderDOM=function(e,t,n){var i=e.type.toLowerCase();if(n===ne.html&&re(i),!he.hasOwnProperty(i)){if(!de.test(i))throw Error(o(65,i));he[i]=!0}var l=e.props;if("input"===i)l=r({type:void 0},l,{defaultChecked:void 0,defaultValue:void 0,value:null!=l.value?l.value:l.defaultValue,checked:null!=l.checked?l.checked:l.defaultChecked});else if("textarea"===i){var s=l.value;if(null==s){s=l.defaultValue;var c=l.children;if(null!=c){if(null!=s)throw Error(o(92));if(Array.isArray(c)){if(!(1>=c.length))throw Error(o(93));c=c[0]}s=""+c}null==s&&(s="")}l=r({},l,{value:void 0,children:""+s})}else if("select"===i)this.currentSelectValue=null!=l.value?l.value:l.defaultValue,l=r({},l,{value:void 0});else if("option"===i){c=this.currentSelectValue;var u=function(e){if(null==e)return e;var t="";return a.Children.forEach(e,function(e){null!=e&&(t+=e)}),t}(l.children);if(null!=c){var f=null!=l.value?l.value+"":u;if(s=!1,Array.isArray(c)){for(var p=0;p<c.length;p++)if(""+c[p]===f){s=!0;break}}else s=""+c===f;l=r({selected:void 0,children:void 0},l,{selected:s,children:u})}}if(s=l){if(oe[i]&&(null!=s.children||null!=s.dangerouslySetInnerHTML))throw Error(o(137,i,""));if(null!=s.dangerouslySetInnerHTML){if(null!=s.children)throw Error(o(60));if(!("object"==typeof s.dangerouslySetInnerHTML&&"__html"in s.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=s.style&&"object"!=typeof s.style)throw Error(o(62,""))}for(b in s=l,c=this.makeStaticMarkup,u=1===this.stack.length,f="<"+e.type,s)if(ye.call(s,b)){var d=s[b];if(null!=d){if("style"===b){p=void 0;var h="",m="";for(p in d)if(d.hasOwnProperty(p)){var y=0===p.indexOf("--"),v=d[p];if(null!=v){if(y)var g=p;else if(g=p,me.hasOwnProperty(g))g=me[g];else{var w=g.replace(se,"-$1").toLowerCase().replace(ce,"-ms-");g=me[g]=w}h+=m+g+":",m=p,h+=y=null==v||"boolean"==typeof v||""===v?"":y||"number"!=typeof v||0===v||ie.hasOwnProperty(m)&&ie[m]?(""+v).trim():v+"px",m=";"}}d=h||null}p=null;e:if(y=i,v=s,-1===y.indexOf("-"))y="string"==typeof v.is;else switch(y){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":y=!1;break e;default:y=!0}y?ve.hasOwnProperty(b)||(p=I(p=b)&&null!=d?p+'="'+L(d)+'"':""):p=P(b,d),p&&(f+=" "+p)}}c||u&&(f+=' data-reactroot=""');var b=f;s="",ae.hasOwnProperty(i)?b+="/>":(b+=">",s="</"+e.type+">");e:{if(null!=(c=l.dangerouslySetInnerHTML)){if(null!=c.__html){c=c.__html;break e}}else if("string"==typeof(c=l.children)||"number"==typeof c){c=L(c);break e}c=null}return null!=c?(l=[],pe[i]&&"\n"===c.charAt(0)&&(b+="\n"),b+=c):l=ue(l.children),e=e.type,n=null==n||"http://www.w3.org/1999/xhtml"===n?re(e):"http://www.w3.org/2000/svg"===n&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":n,this.stack.push({domNamespace:n,type:i,children:l,childIndex:0,context:t,footer:s}),this.previousWasTextNode=!1,b},e}(),xe={renderToString:function(e){e=new be(e,!1);try{return e.read(1/0)}finally{e.destroy()}},renderToStaticMarkup:function(e){e=new be(e,!0);try{return e.read(1/0)}finally{e.destroy()}},renderToNodeStream:function(){throw Error(o(207))},renderToStaticNodeStream:function(){throw Error(o(208))},version:"16.12.0"},Ee={default:xe},ke=Ee&&xe||Ee;e.exports=ke.default||ke},KAy6:function(e,t,n){"use strict";e.exports=n("IDhZ")},Q1xo:function(e,t,n){"use strict";n.d(t,"b",function(){return r}),n.d(t,"a",function(){return a});var r=function(e){return e.keys.length},a=function(e){var t=RegExp(e.searchQuery,"i");return e.keys.filter(function(e){return t.test(e.name)||t.test(e.role)})}},m0s0:function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"c",function(){return l}),n.d(t,"b",function(){return s});var r=n("mrSG"),a=n("NXk7"),o=n("Gz/h");function i(e,t,n){var i=this;return function(s){return Object(r.__awaiter)(i,void 0,void 0,function(){var i;return Object(r.__generator)(this,function(r){switch(r.label){case 0:return[4,Object(a.b)().post("/api/auth/keys",e)];case 1:return i=r.sent(),s(Object(o.c)("")),s(l(n)),t(i.key),[2]}})})}}function l(e){var t=this;return function(n){return Object(r.__awaiter)(t,void 0,void 0,function(){var t;return Object(r.__generator)(this,function(r){switch(r.label){case 0:return[4,Object(a.b)().get("/api/auth/keys?includeExpired="+e)];case 1:return t=r.sent(),n(Object(o.a)(t)),[2]}})})}}function s(e,t){var n=this;return function(o){return Object(r.__awaiter)(n,void 0,void 0,function(){return Object(r.__generator)(this,function(n){return Object(a.b)().delete("/api/auth/keys/"+e).then(o(l(t))),[2]})})}}},pSIq:function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"ApiKeysPage",function(){return I});var r,a,o=n("mrSG"),i=n("q1tI"),l=n.n(i),s=n("KAy6"),c=n.n(s),u=n("/MKj"),f=n("0cfB"),p=n("GQ3c"),d=n("lzJ5"),h=n("Q1xo"),m=n("m0s0"),y=n("ZGyg"),v=n("BVom"),g=n("qx0y"),w=n("ZFWI"),b=n("Xmxp"),x=n("QQVG"),E=n("kDLi"),k=n("Obii"),S=n("EKT6"),N=n("iODs"),_=n("PbtU"),C=n("1LJY"),A=n("Gz/h"),F=((r={})[E.EventsWithValidation.onBlur]=[{rule:function(e){if(!e)return!0;try{return _.a.interval_to_seconds(e),!0}catch(e){return!1}},errorMessage:"Not a valid duration"}],r);!function(e){e.Name="name",e.Role="role",e.SecondsToLive="secondsToLive"}(a||(a={}));var O={name:"",role:p.OrgRole.Viewer,secondsToLive:""},I=function(e){function t(t){var n=e.call(this,t)||this;return n.onSearchQueryChange=function(e){n.props.setSearchQuery(e)},n.onIncludeExpiredChange=function(e){n.setState({hasFetched:!1,includeExpired:e},n.fetchApiKeys)},n.onToggleAdding=function(){n.setState({isAdding:!n.state.isAdding})},n.onAddApiKey=function(e){return Object(o.__awaiter)(n,void 0,void 0,function(){var t,n;return Object(o.__generator)(this,function(r){return e.preventDefault(),t=function(e){var t=window.location.origin+w.b.appSubUrl,n=c.a.renderToString(l.a.createElement(g.a,{apiKey:e,rootPath:t}));b.b.emit(p.CoreEvents.showModal,{templateHtml:n})},n=this.state.newApiKey.secondsToLive,this.state.newApiKey.secondsToLive=n?_.a.interval_to_seconds(n):null,this.props.addApiKey(this.state.newApiKey,t,this.props.includeExpired),this.setState(function(e){return Object(o.__assign)(Object(o.__assign)({},e),{newApiKey:O,isAdding:!1})}),[2]})})},n.onApiKeyStateUpdate=function(e,t){var r=e.currentTarget.value;n.setState(function(e){var n=Object(o.__assign)({},e.newApiKey);return n[t]=r,Object(o.__assign)(Object(o.__assign)({},e),{newApiKey:n})})},n.state={isAdding:!1,newApiKey:O,includeExpired:!1},n}return Object(o.__extends)(t,e),t.prototype.componentDidMount=function(){this.fetchApiKeys()},t.prototype.fetchApiKeys=function(){return Object(o.__awaiter)(this,void 0,void 0,function(){return Object(o.__generator)(this,function(e){switch(e.label){case 0:return[4,this.props.loadApiKeys(this.state.includeExpired)];case 1:return e.sent(),[2]}})})},t.prototype.onDeleteApiKey=function(e){this.props.deleteApiKey(e.id,this.props.includeExpired)},t.prototype.renderEmptyList=function(){var e=this.state.isAdding;return l.a.createElement(l.a.Fragment,null,!e&&l.a.createElement(x.a,{title:"You haven't added any API Keys yet.",buttonIcon:"gicon gicon-apikeys",buttonLink:"#",onClick:this.onToggleAdding,buttonTitle:" New API Key",proTip:"Remember you can provide view-only API access to other applications."}),this.renderAddApiKeyForm())},t.prototype.formatDate=function(e,t){return e?(e=Object(k.isDateTime)(e)?e:Object(k.dateTime)(e),t=t||"YYYY-MM-DD HH:mm:ss","utc"===Object(C.a)(N.b.getState().user)?e.utc().format(t):e.format(t)):"No expiration date"},t.prototype.renderAddApiKeyForm=function(){var e=this,t=this.state,n=t.newApiKey,r=t.isAdding;return l.a.createElement(v.a,{in:r},l.a.createElement("div",{className:"cta-form"},l.a.createElement("button",{className:"cta-form__close btn btn-transparent",onClick:this.onToggleAdding},l.a.createElement("i",{className:"fa fa-close"})),l.a.createElement("h5",null,"Add API Key"),l.a.createElement("form",{className:"gf-form-group",onSubmit:this.onAddApiKey},l.a.createElement("div",{className:"gf-form-inline"},l.a.createElement("div",{className:"gf-form max-width-21"},l.a.createElement("span",{className:"gf-form-label"},"Key name"),l.a.createElement(E.Input,{type:"text",className:"gf-form-input",value:n.name,placeholder:"Name",onChange:function(t){return e.onApiKeyStateUpdate(t,a.Name)}})),l.a.createElement("div",{className:"gf-form"},l.a.createElement("span",{className:"gf-form-label"},"Role"),l.a.createElement("span",{className:"gf-form-select-wrapper"},l.a.createElement("select",{className:"gf-form-input gf-size-auto",value:n.role,onChange:function(t){return e.onApiKeyStateUpdate(t,a.Role)}},Object.keys(p.OrgRole).map(function(e){return l.a.createElement("option",{key:e,label:e,value:e},e)})))),l.a.createElement("div",{className:"gf-form max-width-21"},l.a.createElement(E.FormLabel,{tooltip:"The api key life duration. For example 1d if your key is going to last for one day. All the supported units are: s,m,h,d,w,M,y"},"Time to live"),l.a.createElement(E.Input,{type:"text",className:"gf-form-input",placeholder:"1d",validationEvents:F,value:n.secondsToLive,onChange:function(t){return e.onApiKeyStateUpdate(t,a.SecondsToLive)}})),l.a.createElement("div",{className:"gf-form"},l.a.createElement("button",{className:"btn gf-form-btn btn-primary"},"Add"))))))},t.prototype.renderApiKeyList=function(){var e=this,t=this.state.isAdding,n=this.props,r=n.apiKeys,a=n.searchQuery,o=n.includeExpired;return l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{className:"page-action-bar"},l.a.createElement("div",{className:"gf-form gf-form--grow"},l.a.createElement(S.a,{labelClassName:"gf-form--has-input-icon gf-form--grow",inputClassName:"gf-form-input",placeholder:"Search keys",value:a,onChange:this.onSearchQueryChange})),l.a.createElement("div",{className:"page-action-bar__spacer"}),l.a.createElement("button",{className:"btn btn-primary pull-right",onClick:this.onToggleAdding,disabled:t},"Add API key")),this.renderAddApiKeyForm(),l.a.createElement("h3",{className:"page-heading"},"Existing Keys"),l.a.createElement(E.Switch,{label:"Show expired",checked:o,onChange:function(t){e.onIncludeExpiredChange(t.target.checked)}}),l.a.createElement("table",{className:"filter-table"},l.a.createElement("thead",null,l.a.createElement("tr",null,l.a.createElement("th",null,"Name"),l.a.createElement("th",null,"Role"),l.a.createElement("th",null,"Expires"),l.a.createElement("th",{style:{width:"34px"}}))),r.length>0?l.a.createElement("tbody",null,r.map(function(t){return l.a.createElement("tr",{key:t.id},l.a.createElement("td",null,t.name),l.a.createElement("td",null,t.role),l.a.createElement("td",null,e.formatDate(t.expiration)),l.a.createElement("td",null,l.a.createElement(E.DeleteButton,{size:"sm",onConfirm:function(){return e.onDeleteApiKey(t)}})))})):null))},t.prototype.render=function(){var e=this.props,t=e.hasFetched,n=e.navModel,r=e.apiKeysCount;return l.a.createElement(y.a,{navModel:n},l.a.createElement(y.a.Contents,{isLoading:!t},t&&(r>0?this.renderApiKeyList():this.renderEmptyList())))},t}(i.PureComponent);var D={loadApiKeys:m.c,deleteApiKey:m.b,setSearchQuery:A.c,addApiKey:m.a};t.default=Object(f.hot)(e)(Object(u.connect)(function(e){return{navModel:Object(d.a)(e.navIndex,"apikeys"),apiKeys:Object(h.a)(e.apiKeys),searchQuery:e.apiKeys.searchQuery,includeExpired:e.includeExpired,apiKeysCount:Object(h.b)(e.apiKeys),hasFetched:e.apiKeys.hasFetched}},D)(I))}.call(this,n("3UD+")(e))},qx0y:function(e,t,n){"use strict";var r=n("q1tI"),a=n.n(r);t.a=function(e){return a.a.createElement("div",{className:"modal-body"},a.a.createElement("div",{className:"modal-header"},a.a.createElement("h2",{className:"modal-header-title"},a.a.createElement("i",{className:"fa fa-key"}),a.a.createElement("span",{className:"p-l-1"},"API Key Created")),a.a.createElement("a",{className:"modal-header-close","ng-click":"dismiss();"},a.a.createElement("i",{className:"fa fa-remove"}))),a.a.createElement("div",{className:"modal-content"},a.a.createElement("div",{className:"gf-form-group"},a.a.createElement("div",{className:"gf-form"},a.a.createElement("span",{className:"gf-form-label"},"Key"),a.a.createElement("span",{className:"gf-form-label"},e.apiKey))),a.a.createElement("div",{className:"grafana-info-box",style:{border:0}},"You will only be able to view this key here once! It is not stored in this form. So be sure to copy it now.",a.a.createElement("br",null),a.a.createElement("br",null),"You can authenticate request using the Authorization HTTP header, example:",a.a.createElement("br",null),a.a.createElement("br",null),a.a.createElement("pre",{className:"small"},'curl -H "Authorization: Bearer ',e.apiKey,'" ',e.rootPath,"/api/dashboards/home"))))}}}]); //# sourceMappingURL=ApiKeysPage.4d0490a94b199a11f40c.js.map