{ "version": 3, "sources": ["../ui/web_modules/ngx-clipboard.js", "../ui/app/mn.logs.collectInfo.service.js", "../ui/app/mn.server.groups.service.js"], "sourcesContent": ["import './common/tslib.es6-c4a4947b.js';\nimport { a as Subject } from './common/mergeMap-64c6f393.js';\nimport './common/merge-183efbc7.js';\nimport './common/share-d41e3509.js';\nimport { InjectionToken, Injectable, Inject, Optional, defineInjectable, inject, Directive, Input, Output, HostListener, ViewContainerRef, TemplateRef, EventEmitter, NgModule } from './@angular/core.js';\nimport { DOCUMENT, CommonModule } from './@angular/common.js';\n\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\r\n */\r\n/** @type {?} */\r\nvar WINDOW = new InjectionToken('WindowToken', typeof window !== 'undefined' && window.document ? { providedIn: 'root', factory: (/**\r\n * @return {?}\r\n */\r\n function () { return window; }) } : undefined);\n\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\r\n */\r\n/**\r\n * The following code is heavily copied from https://github.com/zenorocha/clipboard.js\r\n */\r\nvar ClipboardService = /** @class */ (function () {\r\n function ClipboardService(document, window) {\r\n this.document = document;\r\n this.window = window;\r\n this.copySubject = new Subject();\r\n this.copyResponse$ = this.copySubject.asObservable();\r\n this.config = {};\r\n }\r\n /**\r\n * @param {?} config\r\n * @return {?}\r\n */\r\n ClipboardService.prototype.configure = /**\r\n * @param {?} config\r\n * @return {?}\r\n */\r\n function (config) {\r\n this.config = config;\r\n };\r\n /**\r\n * @param {?} content\r\n * @return {?}\r\n */\r\n ClipboardService.prototype.copy = /**\r\n * @param {?} content\r\n * @return {?}\r\n */\r\n function (content) {\r\n if (!this.isSupported || !content) {\r\n return this.pushCopyResponse({ isSuccess: false, content: content });\r\n }\r\n /** @type {?} */\r\n var copyResult = this.copyFromContent(content);\r\n if (copyResult) {\r\n return this.pushCopyResponse({ content: content, isSuccess: copyResult });\r\n }\r\n return this.pushCopyResponse({ isSuccess: false, content: content });\r\n };\r\n Object.defineProperty(ClipboardService.prototype, \"isSupported\", {\r\n get: /**\r\n * @return {?}\r\n */\r\n function () {\r\n return !!this.document.queryCommandSupported && !!this.document.queryCommandSupported('copy') && !!this.window;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @param {?} element\r\n * @return {?}\r\n */\r\n ClipboardService.prototype.isTargetValid = /**\r\n * @param {?} element\r\n * @return {?}\r\n */\r\n function (element) {\r\n if (element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement) {\r\n if (element.hasAttribute('disabled')) {\r\n throw new Error('Invalid \"target\" attribute. Please use \"readonly\" instead of \"disabled\" attribute');\r\n }\r\n return true;\r\n }\r\n throw new Error('Target should be input or textarea');\r\n };\r\n /**\r\n * Attempts to copy from an input `targetElm`\r\n */\r\n /**\r\n * Attempts to copy from an input `targetElm`\r\n * @param {?} targetElm\r\n * @param {?=} isFocus\r\n * @return {?}\r\n */\r\n ClipboardService.prototype.copyFromInputElement = /**\r\n * Attempts to copy from an input `targetElm`\r\n * @param {?} targetElm\r\n * @param {?=} isFocus\r\n * @return {?}\r\n */\r\n function (targetElm, isFocus) {\r\n if (isFocus === void 0) { isFocus = true; }\r\n try {\r\n this.selectTarget(targetElm);\r\n /** @type {?} */\r\n var re = this.copyText();\r\n this.clearSelection(isFocus ? targetElm : undefined, this.window);\r\n return re && this.isCopySuccessInIE11();\r\n }\r\n catch (error) {\r\n return false;\r\n }\r\n };\r\n /**\r\n * This is a hack for IE11 to return `true` even if copy fails.\r\n */\r\n /**\r\n * This is a hack for IE11 to return `true` even if copy fails.\r\n * @return {?}\r\n */\r\n ClipboardService.prototype.isCopySuccessInIE11 = /**\r\n * This is a hack for IE11 to return `true` even if copy fails.\r\n * @return {?}\r\n */\r\n function () {\r\n /** @type {?} */\r\n var clipboardData = this.window['clipboardData'];\r\n if (clipboardData && clipboardData.getData) {\r\n if (!clipboardData.getData('Text')) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n /**\r\n * Creates a fake textarea element, sets its value from `text` property,\r\n * and makes a selection on it.\r\n */\r\n /**\r\n * Creates a fake textarea element, sets its value from `text` property,\r\n * and makes a selection on it.\r\n * @param {?} content\r\n * @param {?=} container\r\n * @return {?}\r\n */\r\n ClipboardService.prototype.copyFromContent = /**\r\n * Creates a fake textarea element, sets its value from `text` property,\r\n * and makes a selection on it.\r\n * @param {?} content\r\n * @param {?=} container\r\n * @return {?}\r\n */\r\n function (content, container) {\r\n if (container === void 0) { container = this.document.body; }\r\n // check if the temp textarea still belongs to the current container.\r\n // In case we have multiple places using ngx-clipboard, one is in a modal using container but the other one is not.\r\n if (this.tempTextArea && !container.contains(this.tempTextArea)) {\r\n this.destroy(this.tempTextArea.parentElement);\r\n }\r\n if (!this.tempTextArea) {\r\n this.tempTextArea = this.createTempTextArea(this.document, this.window);\r\n try {\r\n container.appendChild(this.tempTextArea);\r\n }\r\n catch (error) {\r\n throw new Error('Container should be a Dom element');\r\n }\r\n }\r\n this.tempTextArea.value = content;\r\n /** @type {?} */\r\n var toReturn = this.copyFromInputElement(this.tempTextArea, false);\r\n if (this.config.cleanUpAfterCopy) {\r\n this.destroy(this.tempTextArea.parentElement);\r\n }\r\n return toReturn;\r\n };\r\n /**\r\n * Remove temporary textarea if any exists.\r\n */\r\n /**\r\n * Remove temporary textarea if any exists.\r\n * @param {?=} container\r\n * @return {?}\r\n */\r\n ClipboardService.prototype.destroy = /**\r\n * Remove temporary textarea if any exists.\r\n * @param {?=} container\r\n * @return {?}\r\n */\r\n function (container) {\r\n if (container === void 0) { container = this.document.body; }\r\n if (this.tempTextArea) {\r\n container.removeChild(this.tempTextArea);\r\n // removeChild doesn't remove the reference from memory\r\n this.tempTextArea = undefined;\r\n }\r\n };\r\n /**\r\n * Select the target html input element.\r\n */\r\n /**\r\n * Select the target html input element.\r\n * @private\r\n * @param {?} inputElement\r\n * @return {?}\r\n */\r\n ClipboardService.prototype.selectTarget = /**\r\n * Select the target html input element.\r\n * @private\r\n * @param {?} inputElement\r\n * @return {?}\r\n */\r\n function (inputElement) {\r\n inputElement.select();\r\n inputElement.setSelectionRange(0, inputElement.value.length);\r\n return inputElement.value.length;\r\n };\r\n /**\r\n * @private\r\n * @return {?}\r\n */\r\n ClipboardService.prototype.copyText = /**\r\n * @private\r\n * @return {?}\r\n */\r\n function () {\r\n return this.document.execCommand('copy');\r\n };\r\n /**\r\n * Moves focus away from `target` and back to the trigger, removes current selection.\r\n */\r\n /**\r\n * Moves focus away from `target` and back to the trigger, removes current selection.\r\n * @private\r\n * @param {?} inputElement\r\n * @param {?} window\r\n * @return {?}\r\n */\r\n ClipboardService.prototype.clearSelection = /**\r\n * Moves focus away from `target` and back to the trigger, removes current selection.\r\n * @private\r\n * @param {?} inputElement\r\n * @param {?} window\r\n * @return {?}\r\n */\r\n function (inputElement, window) {\r\n inputElement && inputElement.focus();\r\n window.getSelection().removeAllRanges();\r\n };\r\n /**\r\n * Creates a fake textarea for copy command.\r\n */\r\n /**\r\n * Creates a fake textarea for copy command.\r\n * @private\r\n * @param {?} doc\r\n * @param {?} window\r\n * @return {?}\r\n */\r\n ClipboardService.prototype.createTempTextArea = /**\r\n * Creates a fake textarea for copy command.\r\n * @private\r\n * @param {?} doc\r\n * @param {?} window\r\n * @return {?}\r\n */\r\n function (doc, window) {\r\n /** @type {?} */\r\n var isRTL = doc.documentElement.getAttribute('dir') === 'rtl';\r\n /** @type {?} */\r\n var ta;\r\n ta = doc.createElement('textarea');\r\n // Prevent zooming on iOS\r\n ta.style.fontSize = '12pt';\r\n // Reset box model\r\n ta.style.border = '0';\r\n ta.style.padding = '0';\r\n ta.style.margin = '0';\r\n // Move element out of screen horizontally\r\n ta.style.position = 'absolute';\r\n ta.style[isRTL ? 'right' : 'left'] = '-9999px';\r\n // Move element to the same position vertically\r\n /** @type {?} */\r\n var yPosition = window.pageYOffset || doc.documentElement.scrollTop;\r\n ta.style.top = yPosition + 'px';\r\n ta.setAttribute('readonly', '');\r\n return ta;\r\n };\r\n /**\r\n * Pushes copy operation response to copySubject, to provide global access\r\n * to the response.\r\n */\r\n /**\r\n * Pushes copy operation response to copySubject, to provide global access\r\n * to the response.\r\n * @param {?} response\r\n * @return {?}\r\n */\r\n ClipboardService.prototype.pushCopyResponse = /**\r\n * Pushes copy operation response to copySubject, to provide global access\r\n * to the response.\r\n * @param {?} response\r\n * @return {?}\r\n */\r\n function (response) {\r\n this.copySubject.next(response);\r\n };\r\n /**\r\n * @deprecated use pushCopyResponse instead.\r\n */\r\n /**\r\n * @deprecated use pushCopyResponse instead.\r\n * @param {?} response\r\n * @return {?}\r\n */\r\n ClipboardService.prototype.pushCopyReponse = /**\r\n * @deprecated use pushCopyResponse instead.\r\n * @param {?} response\r\n * @return {?}\r\n */\r\n function (response) {\r\n this.pushCopyResponse(response);\r\n };\r\n ClipboardService.decorators = [\r\n { type: Injectable, args: [{ providedIn: 'root' },] }\r\n ];\r\n /** @nocollapse */\r\n ClipboardService.ctorParameters = function () { return [\r\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },\r\n { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [WINDOW,] }] }\r\n ]; };\r\n /** @nocollapse */ ClipboardService.ngInjectableDef = defineInjectable({ factory: function ClipboardService_Factory() { return new ClipboardService(inject(DOCUMENT), inject(WINDOW, 8)); }, token: ClipboardService, providedIn: \"root\" });\r\n return ClipboardService;\r\n}());\n\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\r\n */\r\nvar ClipboardDirective = /** @class */ (function () {\r\n function ClipboardDirective(clipboardSrv) {\r\n this.clipboardSrv = clipboardSrv;\r\n this.cbOnSuccess = new EventEmitter();\r\n this.cbOnError = new EventEmitter();\r\n }\r\n // tslint:disable-next-line:no-empty\r\n // tslint:disable-next-line:no-empty\r\n /**\r\n * @return {?}\r\n */\r\n ClipboardDirective.prototype.ngOnInit = \r\n // tslint:disable-next-line:no-empty\r\n /**\r\n * @return {?}\r\n */\r\n function () { };\r\n /**\r\n * @return {?}\r\n */\r\n ClipboardDirective.prototype.ngOnDestroy = /**\r\n * @return {?}\r\n */\r\n function () {\r\n this.clipboardSrv.destroy(this.container);\r\n };\r\n /**\r\n * @param {?} event\r\n * @return {?}\r\n */\r\n ClipboardDirective.prototype.onClick = /**\r\n * @param {?} event\r\n * @return {?}\r\n */\r\n function (event) {\r\n if (!this.clipboardSrv.isSupported) {\r\n this.handleResult(false, undefined, event);\r\n }\r\n else if (this.targetElm && this.clipboardSrv.isTargetValid(this.targetElm)) {\r\n this.handleResult(this.clipboardSrv.copyFromInputElement(this.targetElm), this.targetElm.value, event);\r\n }\r\n else if (this.cbContent) {\r\n this.handleResult(this.clipboardSrv.copyFromContent(this.cbContent, this.container), this.cbContent, event);\r\n }\r\n };\r\n /**\r\n * Fires an event based on the copy operation result.\r\n * @param succeeded\r\n */\r\n /**\r\n * Fires an event based on the copy operation result.\r\n * @private\r\n * @param {?} succeeded\r\n * @param {?} copiedContent\r\n * @param {?} event\r\n * @return {?}\r\n */\r\n ClipboardDirective.prototype.handleResult = /**\r\n * Fires an event based on the copy operation result.\r\n * @private\r\n * @param {?} succeeded\r\n * @param {?} copiedContent\r\n * @param {?} event\r\n * @return {?}\r\n */\r\n function (succeeded, copiedContent, event) {\r\n /** @type {?} */\r\n var response = {\r\n isSuccess: succeeded,\r\n event: event\r\n };\r\n if (succeeded) {\r\n response = Object.assign(response, {\r\n content: copiedContent,\r\n successMessage: this.cbSuccessMsg\r\n });\r\n this.cbOnSuccess.emit(response);\r\n }\r\n else {\r\n this.cbOnError.emit(response);\r\n }\r\n this.clipboardSrv.pushCopyResponse(response);\r\n };\r\n ClipboardDirective.decorators = [\r\n { type: Directive, args: [{\r\n selector: '[ngxClipboard]'\r\n },] }\r\n ];\r\n /** @nocollapse */\r\n ClipboardDirective.ctorParameters = function () { return [\r\n { type: ClipboardService }\r\n ]; };\r\n ClipboardDirective.propDecorators = {\r\n targetElm: [{ type: Input, args: ['ngxClipboard',] }],\r\n container: [{ type: Input }],\r\n cbContent: [{ type: Input }],\r\n cbSuccessMsg: [{ type: Input }],\r\n cbOnSuccess: [{ type: Output }],\r\n cbOnError: [{ type: Output }],\r\n onClick: [{ type: HostListener, args: ['click', ['$event.target'],] }]\r\n };\r\n return ClipboardDirective;\r\n}());\n\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\r\n */\r\nvar ClipboardIfSupportedDirective = /** @class */ (function () {\r\n function ClipboardIfSupportedDirective(_clipboardService, _viewContainerRef, _templateRef) {\r\n this._clipboardService = _clipboardService;\r\n this._viewContainerRef = _viewContainerRef;\r\n this._templateRef = _templateRef;\r\n }\r\n /**\r\n * @return {?}\r\n */\r\n ClipboardIfSupportedDirective.prototype.ngOnInit = /**\r\n * @return {?}\r\n */\r\n function () {\r\n if (this._clipboardService.isSupported) {\r\n this._viewContainerRef.createEmbeddedView(this._templateRef);\r\n }\r\n };\r\n ClipboardIfSupportedDirective.decorators = [\r\n { type: Directive, args: [{\r\n selector: '[ngxClipboardIfSupported]'\r\n },] }\r\n ];\r\n /** @nocollapse */\r\n ClipboardIfSupportedDirective.ctorParameters = function () { return [\r\n { type: ClipboardService },\r\n { type: ViewContainerRef },\r\n { type: TemplateRef }\r\n ]; };\r\n return ClipboardIfSupportedDirective;\r\n}());\n\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\r\n */\r\nvar ClipboardModule = /** @class */ (function () {\r\n function ClipboardModule() {\r\n }\r\n ClipboardModule.decorators = [\r\n { type: NgModule, args: [{\r\n imports: [CommonModule],\r\n declarations: [ClipboardDirective, ClipboardIfSupportedDirective],\r\n exports: [ClipboardDirective, ClipboardIfSupportedDirective]\r\n },] }\r\n ];\r\n return ClipboardModule;\r\n}());\n\nexport { ClipboardDirective, ClipboardIfSupportedDirective, ClipboardModule, ClipboardService };\n", "/*\nCopyright 2021-Present Couchbase, Inc.\n\nUse of this software is governed by the Business Source License included in\nthe file licenses/BSL-Couchbase.txt. As of the Change Date specified in that\nfile, in accordance with the Business Source License, use of this software will\nbe governed by the Apache License, Version 2.0, included in the file\nlicenses/APL2.txt.\n*/\n\nimport {Injectable} from '@angular/core';\nimport {BehaviorSubject, combineLatest} from 'rxjs';\nimport {map, pluck, switchMap, shareReplay, filter,\n distinctUntilChanged} from 'rxjs/operators';\nimport {HttpClient} from '@angular/common/http';\nimport {singletonGuard} from './mn.core.js';\n\nimport {MnHttpRequest} from './mn.http.request.js';\nimport {MnAdminService} from './mn.admin.service.js';\nimport {MnTasksService} from './mn.tasks.service.js';\nimport {MnPoolsService} from './mn.pools.service.js';\nimport {MnSecurityService} from './mn.security.service.js';\nimport {MnPermissions} from './ajs.upgraded.providers.js';\n\nexport {MnLogsCollectInfoService};\n\nclass MnLogsCollectInfoService {\n static get annotations() { return [\n new Injectable()\n ]}\n\n static get parameters() { return [\n HttpClient,\n MnAdminService,\n MnTasksService,\n MnSecurityService,\n MnPoolsService,\n MnPermissions\n ]}\n\n constructor(http, mnAdminService, mnTasksService, mnSecurityService, mnPoolsService, mnPermissions) {\n singletonGuard(MnLogsCollectInfoService);\n\n this.http = http;\n this.stream = {};\n\n let isEnterprise = mnPoolsService.stream.isEnterprise;\n let compatVersion55 = mnAdminService.stream.compatVersion55;\n let taskCollectInfo = mnTasksService.stream.taskCollectInfo;\n let permissionsStream = mnPermissions.stream;\n let settingsReadStream =\n permissionsStream.pipe(pluck('cluster','settings','read'),\n distinctUntilChanged());\n\n this.isEnterprise = isEnterprise;\n this.mnSecurityService = mnSecurityService;\n\n this.stream.nodesByCollectInfoStatus =\n combineLatest(mnAdminService.stream.nodesByOtp,\n taskCollectInfo.pipe(filter(taskCollectInfo => !!taskCollectInfo),\n pluck('perNode')))\n .pipe(map(this.prepareNodesByStatus.bind(this)),\n shareReplay({refCount: true, bufferSize: 1}));\n\n this.stream.nodesErrors =\n taskCollectInfo.pipe(filter(taskCollectInfo => !!taskCollectInfo),\n pluck('perNode'),\n map(this.prepareNodesErrors.bind(this)),\n shareReplay({refCount: true, bufferSize: 1}));\n\n this.stream.formData =\n combineLatest([isEnterprise,\n compatVersion55,\n settingsReadStream])\n .pipe(switchMap(this.formDataSources.bind(this)),\n map(this.unpackData.bind(this)),\n shareReplay({refCount: true, bufferSize: 1}));\n\n this.stream.startLogsCollection =\n new MnHttpRequest(this.startLogsCollection.bind(this))\n .addSuccess()\n .addError();\n\n this.stream.postCancelLogsCollection =\n new MnHttpRequest(this.postCancelLogsCollection.bind(this))\n .addSuccess()\n .addError();\n\n this.stream.clusterInfo =\n (new BehaviorSubject()).pipe(\n switchMap(this.getClusterInfo.bind(this)),\n shareReplay({refCount: true, bufferSize: 1}));\n }\n\n startLogsCollection(data) {\n return this.http.post(\"/controller/startLogsCollection\", data);\n }\n\n postCancelLogsCollection() {\n return this.http.post(\"/controller/cancelLogsCollection\");\n }\n\n getClusterInfo() {\n return this.http.get('/pools/default/terseClusterInfo?all=true');\n }\n\n formDataSources([isEnterprise, compatVersion55, serverGroupsRead]) {\n let sources = [\n this.isEnterprise\n ];\n if (isEnterprise && compatVersion55 && serverGroupsRead) {\n sources.push(this.mnSecurityService.stream.getLogRedaction);\n }\n return combineLatest(sources);\n }\n\n unpackData([isEnterprise, logRedaction]) {\n return {\n nodes: {},\n logs: {\n logRedactionLevel: logRedaction ? logRedaction.logRedactionLevel : null,\n enableTmpDir: null,\n tmpDir: null,\n enableLogDir: null,\n logDir: null\n },\n upload: {\n upload: null,\n uploadHost: isEnterprise ? \"uploads.couchbase.com\": null,\n customer: null,\n uploadProxy: null,\n bypassReachabilityChecks: null,\n ticket: null\n }\n }\n }\n\n prepareNodesByStatus([nodesByOtp, perNode]) {\n let nodesGroupedByStatus = {};\n Object.keys(perNode).forEach(nodeOtp => {\n let node = nodesByOtp[nodeOtp] && nodesByOtp[nodeOtp][0];\n perNode[nodeOtp].nodeName = node ? node.hostname : nodeOtp.replace(/^.*?@/, '');\n\n let status = perNode[nodeOtp].status;\n if (nodesGroupedByStatus[status]) {\n nodesGroupedByStatus[status].push(perNode[nodeOtp]);\n } else {\n nodesGroupedByStatus[status] = [perNode[nodeOtp]];\n }\n });\n return nodesGroupedByStatus;\n }\n\n prepareNodesErrors(perNode) {\n let errors;\n let addError = (nodeName, error) => {\n errors = errors || {};\n if (errors[nodeName]) {\n errors[nodeName].push({nodeName: nodeName, error: error});\n } else {\n errors[nodeName] = [{nodeName: nodeName, error: error}];\n }\n };\n Object.values(perNode).forEach(node => {\n if (node.uploadOutput) {\n addError(node.nodeName, node.uploadOutput);\n }\n if (node.collectionOutput) {\n addError(node.nodeName, node.collectionOutput);\n }\n });\n\n return errors;\n }\n}\n", "/*\nCopyright 2021-Present Couchbase, Inc.\n\nUse of this software is governed by the Business Source License included in\nthe file licenses/BSL-Couchbase.txt. As of the Change Date specified in that\nfile, in accordance with the Business Source License, use of this software will\nbe governed by the Apache License, Version 2.0, included in the file\nlicenses/APL2.txt.\n*/\n\nimport {BehaviorSubject, combineLatest, timer} from 'rxjs';\nimport {map, shareReplay, switchMap, pluck,\n distinctUntilChanged} from 'rxjs/operators';\nimport {Injectable} from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\n\nimport {MnPermissions} from './ajs.upgraded.providers.js';\nimport {MnAdminService} from './mn.admin.service.js';\nimport {singletonGuard} from './mn.core.js';\n\nexport {MnServerGroupsService}\n\nclass MnServerGroupsService {\n static get annotations() { return [\n new Injectable()\n ]}\n\n static get parameters() { return [\n HttpClient,\n MnAdminService,\n MnPermissions\n ]}\n\n constructor(http, mnAdminService, mnPermissions) {\n singletonGuard(MnServerGroupsService);\n this.http = http;\n let permissionsStream = mnPermissions.stream;\n\n this.stream = {};\n\n let getServerGroups =\n (new BehaviorSubject()).pipe(\n switchMap(this.getServerGroups.bind(this)));\n\n let nodesWithGroupName =\n combineLatest(getServerGroups,\n mnAdminService.stream.getNodes)\n .pipe(map(this.addGroupNameToNodes.bind(this)));\n\n let serverGroupsReadStream =\n permissionsStream.pipe(pluck('cluster','server_groups','read'),\n distinctUntilChanged());\n\n this.stream.maybeGetServersWithGroups =\n combineLatest(mnAdminService.stream.isGroupsAvailable,\n serverGroupsReadStream,\n timer(0, 10000))\n .pipe(switchMap(([isGroupsAvailable, serverGroupsRead,]) => {\n let hasGroups = isGroupsAvailable && serverGroupsRead;\n return hasGroups ? nodesWithGroupName : mnAdminService.stream.getNodes;\n }),\n shareReplay({refCount: true, bufferSize: 1}));\n }\n\n getServerGroups() {\n return this.http.get(\"/pools/default/serverGroups\");\n }\n\n addGroupNameToNodes([groups, nodes]) {\n let nodesMap = {};\n\n groups.groups.forEach(group =>\n group.nodes.forEach(node =>\n nodesMap[node.otpNode] = group.name));\n\n nodes.forEach(node =>\n node.groupName = nodesMap[node.otpNode]);\n\n return nodes;\n }\n}\n"], "mappings": "6tBAYA,GAAI,QAAS,GAAI,gBAAe,cAAe,MAAO,SAAW,aAAe,OAAO,SAAW,CAAE,WAAY,OAAQ,QAGpH,UAAY,CAAE,MAAO,UAAe,QASpC,iBAAkC,UAAY,CAC9C,2BAA0B,SAAU,QAAQ,CACxC,KAAK,SAAW,SAChB,KAAK,OAAS,QACd,KAAK,YAAc,GAAI,SACvB,KAAK,cAAgB,KAAK,YAAY,eACtC,KAAK,OAAS,GALT,oDAWT,kBAAiB,UAAU,UAI3B,SAAU,OAAQ,CACd,KAAK,OAAS,QAMlB,kBAAiB,UAAU,KAI3B,SAAU,QAAS,CACf,GAAI,CAAC,KAAK,aAAe,CAAC,QACtB,MAAO,MAAK,iBAAiB,CAAE,UAAW,GAAO,UAGrD,GAAI,YAAa,KAAK,gBAAgB,SACtC,MAAI,YACO,KAAK,iBAAiB,CAAE,QAAkB,UAAW,aAEzD,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