All Downloads are FREE. Search and download functionalities are using the official Maven repository.

web-interface.assets.57e33c6c-40.11b9f72925818240e61d.js.map Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
{"version":3,"sources":["webpack:///./src/components/common/PaginatedItemOverview/index.tsx","webpack:///./src/components/common/Section/SectionGrid.tsx","webpack:///./src/components/users/PermissionsUpdateInfo.tsx","webpack:///./src/components/users/UserEdit/ReadOnlyWarning.tsx","webpack:///./src/components/users/StartpageFormGroup.tsx","webpack:///./src/components/users/UserEdit/SettingsSection.tsx","webpack:///./src/components/users/UserEdit/PasswordSection.tsx","webpack:///./src/components/users/UserEdit/ProfileUpdateInfo.tsx","webpack:///./src/components/users/UserEdit/ProfileSection.tsx","webpack:///./src/components/users/UserEdit/PreferencesSection.tsx","webpack:///./src/components/users/UserEdit/RolesSection.tsx","webpack:///./src/components/users/UserEdit/TeamsSection.tsx","webpack:///./src/components/users/UserEdit/UserEdit.tsx","webpack:///./src/components/users/UserEdit/index.js","webpack:///./src/pages/UserEditPage.tsx","webpack:///./src/components/users/navigation/UserActionLinks.tsx","webpack:///./src/actions/streams/StreamsActions.jsx","webpack:///./src/components/users/RolesQueryHelp.tsx","webpack:///./src/stores/streams/StreamsStore.ts"],"names":["PaginatedItemOverview","SectionGrid","styled","div","$columns","theme","css","breakpoints","max","md","PermissionsUpdateInfo","className","xs","bsStyle","name","page","DocsHelper","PAGES","PERMISSIONS","text","ReadOnlyWarning","fullName","Container","TypeSelect","Select","ValueSelect","ResetBtn","Button","UNLIMITED_ENTITY_SHARE_REQ","perPage","query","_grnOptionFormatter","grn","id","title","value","getValuesFromGRN","label","typeOptions","StartpageFormGroup","userId","permissions","useState","dashboards","setDashboards","streams","setStreams","useEffect","includes","DashboardsActions","search","then","list","map","StreamsActions","searchPaginated","streamsList","EntityShareDomain","loadUserSharesPaginated","additionalQueries","entity_type","toArray","field","onChange","type","options","error","findIndex","resetBtn","onClick","target","help","labelClassName","wrapperClassName","placeholder","newType","undefined","newId","Spinner","SettingsSection","user","timezone","sessionTimeoutMs","startpage","serviceAccount","onSubmit","SectionComponent","initialValues","session_timeout_ms","service_account","isSubmitting","isValid","TimeoutFormGroup","TimezoneFormGroup","ServiceAccountFormGroup","disabled","isCloud","AppConfig","oktaUserForm","PluginStore","exports","_validate","values","errors","password","passwordRepeat","password_repeat","validateCloudPasswords","validations","validatePasswords","_onSubmit","formData","data","UsersDomain","changePassword","PasswordSection","currentUser","useContext","CurrentUserContext","requiresOldPassword","isPermitted","validate","maxLength","required","CloudPasswordFormGroup","fields","minLength","_getPasswordGroup","ProfileUpdateInfo","StyledReadOnlyFormGroup","ReadOnlyFormGroup","ProfileSection","username","firstName","lastName","email","isOldUser","first_name","last_name","FirstNameFormGroup","LastNameFormGroup","EmailFormGroup","PreferencesActions","CombinedProvider","get","PreferencesSection","saveUserPreferences","preferences","formGroupClassName","PREFERENCES_THEME_MODE","RolesSection","loading","setLoading","paginatedRoles","setPaginatedRoles","setErrors","_onLoad","useCallback","pagination","DEFAULT_PAGINATION","AuthzRolesDomain","loadRolesForUser","newPaginatedRoles","onRolesUpdate","load","showLoading","RolesSelector","newRoles","userRoles","roles","newRoleNames","r","newUserRoles","union","toJS","assignedRolesIds","identifier","role","onClose","noDataText","onLoad","overrideList","onDeleteItem","Immutable","remove","queryHelper","RolesQueryHelp","TeamsSection","teamsPlugin","UserTeamsAssignment","featureName","CurrentUserStore","_updateUser","update","reload","UserEdit","readOnly","external","PageTitle","withParams","params","loadedUser","setLoadedUser","UsersActions","completed","listen","_updateUserOnLoad","userToEdit","subactions","UserActionLinks","userIsReadOnly","DocumentationLink","USERS_ROLES","UserOverviewLinks","to","Routes","SYSTEM","USERS","show","edit","TOKENS","singletonActions","Reflux","createActions","asyncResult","listStreams","pause","resume","cloneStream","save","removeOutput","addOutput","testMatch","rolesQueryHelpPopover","condensed","trigger","rootClose","placement","overlay","StreamsStore","singletonStore","createStore","listenables","callbacks","newPage","newPerPage","newQuery","url","PaginationURL","ApiRoutes","StreamsApiController","paginated","promise","fetch","qualifyUrl","response","count","total","per_page","errorThrown","UserNotification","result","callback","this","streamId","_emitChange","bind","stream","create","outputId","StreamOutputsApiController","add","outputs","message","push","forEach","unregister","lodash","pull"],"mappings":"6GAAA,wDA6BeA,MAAf,G,sCC7BA,oBAkBMC,EAAcC,UAAOC,IAAV,kEAAGD,EAAmC,gBAAGE,EAAH,EAAGA,SAAUC,EAAb,EAAaA,MAAb,OAAyBC,cAAxB,CAAD,kHAE5BF,UAAY,UAGhBC,EAAME,YAAYC,IAAIC,OAK9BR,O,sCC5Bf,oFAmCeS,IAZe,kBAC5B,gBAAC,IAAD,CAAKC,UAAU,WACb,gBAAC,IAAD,CAAKC,GAAI,IACP,gBAAC,IAAD,CAAOC,QAAQ,QACb,gBAAC,IAAD,CAAMC,KAAK,gBAAiB,IAAI,iDAA2B,2BAD7D,sMAGqC,yBAAG,gBAAC,IAAD,CAAMA,KAAK,cAAd,UAHrC,uGAG+K,gBAAC,IAAD,CAAmBC,KAAMC,IAAWC,MAAMC,YAAaC,KAAK,kBAH3O,S,iNCUSC,EAVS,SAAC,GAAD,IAAGC,EAAH,EAAGA,SAAH,OACtB,gBAAC,IAAD,CAAKV,UAAU,WACb,gBAAC,IAAD,CAAKC,GAAI,IACP,gBAAC,IAAD,CAAOC,QAAQ,UAAf,qBACqBQ,EADrB,wB,8zDCGN,IAAMC,EAAYpB,UAAOC,IAAV,8EAAGD,CAAH,sCAKTqB,EAAarB,kBAAOsB,KAAV,+EAAGtB,CAAH,mCAKVuB,EAAcvB,kBAAOsB,KAAV,gFAAGtB,CAAH,kBAIXwB,EAAWxB,kBAAOyB,KAAV,6EAAGzB,CAAH,sBAeR0B,EAA6B,CAAEb,KAAM,EAAGc,QAAS,IAAOC,MAAO,IAG/DC,EAAsB,SAAC,GAAD,IADbC,EACgBC,EAAH,EAAGA,GAAIC,EAAP,EAAOA,MAAP,MAA0C,CAAEC,OADzDH,EACsEC,EAD9DG,YAAiBJ,GAAKC,IA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tOsE,SAsO3Dd,GACTe,IAAOC,KAAKf,KAAKpB,UAAWmB,SAKjBvB","file":"57e33c6c-40.11b9f72925818240e61d.js","sourcesContent":["/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport PaginatedItemOverview, {\n  DEFAULT_PAGINATION,\n  PaginatedListType,\n  DescriptiveItem,\n} from './PaginatedItemOverview';\n\nexport type {\n  PaginatedListType,\n  DescriptiveItem,\n};\n\nexport { DEFAULT_PAGINATION };\n\nexport default PaginatedItemOverview;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport styled, { css } from 'styled-components';\n\nconst SectionGrid = styled.div<{ $columns?: string } >(({ $columns, theme }) => css`\n  display: grid;\n  grid-template-columns: ${$columns ?? '1fr 1fr'};\n  grid-column-gap: 40px;\n\n  @media (max-width: ${theme.breakpoints.max.md}) {\n    grid-template-columns: 1fr;\n  }\n`);\n\nexport default SectionGrid;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\n\nimport DocsHelper from 'util/DocsHelper';\nimport DocumentationLink from 'components/support/DocumentationLink';\nimport { Col, Row, Alert } from 'components/graylog';\nimport { Icon } from 'components/common';\n\nconst PermissionsUpdateInfo = () => (\n  \n    \n      \n        {' '}Granting Permissions
\n With Graylog 4.0, we've updated the permissions system. Granting permissions for an entity like streams and dashboards is no longer part of the user edit page.\n It can now be configured using the Share button of an entity. You can find the button e.g. on the entities overview page. Learn more in the .\n
\n \n
\n);\n\nexport default PermissionsUpdateInfo;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport { $PropertyType } from 'utility-types';\n\nimport { Alert, Col, Row } from 'components/graylog';\nimport User from 'logic/users/User';\n\ntype Props = {\n fullName: $PropertyType,\n};\n\nconst ReadOnlyWarning = ({ fullName }: Props) => (\n \n \n \n The selected user {fullName} can't be edited.\n \n \n \n);\n\nexport default ReadOnlyWarning;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport * as Immutable from 'immutable';\nimport { useState, useEffect } from 'react';\nimport { Field } from 'formik';\nimport styled from 'styled-components';\n\nimport { getValuesFromGRN } from 'logic/permissions/GRN';\nimport { Button, Alert } from 'components/graylog';\nimport { Input } from 'components/bootstrap';\nimport SharedEntity from 'logic/permissions/SharedEntity';\nimport EntityShareDomain from 'domainActions/permissions/EntityShareDomain';\nimport Spinner from 'components/common/Spinner';\nimport Select from 'components/common/Select';\nimport { DashboardsActions } from 'views/stores/DashboardsStore';\nimport { StreamsActions } from 'stores/streams/StreamsStore';\n\nconst Container = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst TypeSelect = styled(Select)`\n width: 200px;\n margin-right: 3px;\n`;\n\nconst ValueSelect = styled(Select)`\n width: 400px;\n`;\n\nconst ResetBtn = styled(Button)`\n margin-left: 5px;\n`;\n\ntype Props = {\n userId: string;\n permissions: Immutable.List;\n}\n\ntype Option = {\n value: string;\n label: string;\n}\n\n// We cannot ask for all since the backend did not implement something like this. So for now its 10000.\nconst UNLIMITED_ENTITY_SHARE_REQ = { page: 1, perPage: 10000, query: '' };\n\nconst grnId = (grn) => getValuesFromGRN(grn).id;\nconst _grnOptionFormatter = ({ id, title }: SharedEntity): Option => ({ value: grnId(id), label: title });\nconst typeOptions = [\n { value: 'dashboard', label: 'Dashboard' },\n { value: 'stream', label: 'Stream' },\n];\n\nconst ADMIN_PERMISSION = '*';\n\nconst StartpageFormGroup = ({ userId, permissions }: Props) => {\n const [dashboards, setDashboards] = useState();\n const [streams, setStreams] = useState();\n\n useEffect(() => {\n if (permissions.includes(ADMIN_PERMISSION)) {\n DashboardsActions.search('', 1, 0).then(({ list }) => setDashboards(list.map(({ id, title }) => ({ value: id, label: title }))));\n\n StreamsActions.searchPaginated(1, 0, '').then(({ streams: streamsList }) => setStreams(streamsList.map(({ id, title }) => ({ value: id, label: title }))));\n } else {\n EntityShareDomain.loadUserSharesPaginated(userId, {\n ...UNLIMITED_ENTITY_SHARE_REQ,\n additionalQueries: { entity_type: 'dashboard' },\n }).then(({ list }) => setDashboards(list.map(_grnOptionFormatter).toArray()))\n .then(() => EntityShareDomain.loadUserSharesPaginated(userId, {\n ...UNLIMITED_ENTITY_SHARE_REQ,\n additionalQueries: { entity_type: 'stream' },\n }).then(({ list }) => setStreams(list.map(_grnOptionFormatter).toArray())));\n }\n }, [permissions, userId]);\n\n if (!streams || !dashboards) {\n return ;\n }\n\n return (\n \n {({ field: { name, value, onChange } }) => {\n const type = value?.type ?? 'dashboard';\n const options = type === 'dashboard' ? dashboards : streams;\n\n const error = value?.id && options.findIndex(({ value: v }) => v === value.id) < 0\n ? User is missing permission for the configured page\n : null;\n\n const resetBtn = value?.type\n ? (\n onChange({ target: { name, value: {} } })}>\n Reset\n \n )\n : null;\n\n return (\n <>\n \n <>\n \n onChange({ target: { name, value: { type: newType, id: undefined } } })}\n value={value?.type} />\n onChange({ target: { name, value: { type: type, id: newId } } })}\n value={value?.id} />\n {resetBtn}\n \n {error}\n \n \n \n );\n }}\n \n );\n};\n\nexport default StartpageFormGroup;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport { Formik, Form } from 'formik';\nimport { $PropertyType } from 'utility-types';\n\nimport { Button, Row, Col } from 'components/graylog';\nimport User from 'logic/users/User';\nimport SectionComponent from 'components/common/Section/SectionComponent';\nimport { IfPermitted } from 'components/common';\n\nimport TimezoneFormGroup from '../UserCreate/TimezoneFormGroup';\nimport TimeoutFormGroup from '../UserCreate/TimeoutFormGroup';\nimport ServiceAccountFormGroup from '../UserCreate/ServiceAccountFormGroup';\nimport StartpageFormGroup from '../StartpageFormGroup';\n\ntype Props = {\n user: User,\n onSubmit: (payload: { timezone: $PropertyType }) => Promise,\n};\n\nconst SettingsSection = ({\n user: {\n id,\n timezone,\n sessionTimeoutMs,\n startpage,\n permissions,\n serviceAccount,\n },\n onSubmit,\n}: Props) => (\n \n \n {({ isSubmitting, isValid }) => (\n
\n \n \n \n \n \n \n \n \n\n \n \n
\n \n
\n \n
\n \n )}\n
\n
\n);\n\nexport default SettingsSection;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport { Formik, Form } from 'formik';\nimport { PluginStore } from 'graylog-web-plugin/plugin';\n\nimport AppConfig from 'util/AppConfig';\nimport UsersDomain from 'domainActions/users/UsersDomain';\nimport CurrentUserContext from 'contexts/CurrentUserContext';\nimport { Button, Row, Col } from 'components/graylog';\nimport User from 'logic/users/User';\nimport { isPermitted } from 'util/PermissionsMixin';\nimport SectionComponent from 'components/common/Section/SectionComponent';\nimport { FormikFormGroup } from 'components/common';\n\nimport { validatePasswords } from '../UserCreate/PasswordFormGroup';\n\nconst isCloud = AppConfig.isCloud();\n\nconst oktaUserForm = isCloud ? PluginStore.exports('cloud')[0].oktaUserForm : null;\ntype Props = {\n user: User,\n};\n\nconst _validate = (values) => {\n let errors = {};\n\n const { password, password_repeat: passwordRepeat } = values;\n\n if (isCloud && oktaUserForm) {\n const { validations: { password: validateCloudPasswords } } = oktaUserForm;\n\n errors = validateCloudPasswords(errors, password, passwordRepeat);\n } else {\n errors = validatePasswords(errors, password, passwordRepeat);\n }\n\n return errors;\n};\n\nconst _onSubmit = (formData, userId) => {\n const data = { ...formData };\n delete data.password_repeat;\n\n return UsersDomain.changePassword(userId, data);\n};\n\nconst PasswordSection = ({ user: { id } }: Props) => {\n const currentUser = useContext(CurrentUserContext);\n let requiresOldPassword = true;\n\n if (isPermitted(currentUser?.permissions, 'users:passwordchange:*')) {\n // Ask for old password if user is editing their own account\n requiresOldPassword = id === currentUser?.id;\n }\n\n const _getPasswordGroup = () => {\n if (isCloud && oktaUserForm) {\n const { fields: { password: CloudPasswordFormGroup } } = oktaUserForm;\n\n return ;\n }\n\n return (\n <>\n \n \n \n );\n };\n\n return (\n \n _onSubmit(formData, id)}\n validate={_validate}\n initialValues={{}}>\n {({ isSubmitting, isValid }) => (\n
\n {requiresOldPassword && (\n \n )}\n {_getPasswordGroup()}\n \n \n
\n \n
\n \n
\n \n )}\n
\n
\n );\n};\n\nexport default PasswordSection;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\n\nimport { Alert } from 'components/graylog';\nimport { Icon } from 'components/common';\n\nconst ProfileUpdateInfo = () => (\n \n {' '} First and Last Name
\n With Graylog 4.1, we've added distinct first and last name fields. These must be provided before the user’s profile can be saved.\n
\n);\n\nexport default ProfileUpdateInfo;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport { Formik, Form } from 'formik';\nimport { $PropertyType } from 'utility-types';\nimport styled from 'styled-components';\n\nimport { Button, Col, Row } from 'components/graylog';\nimport { ReadOnlyFormGroup } from 'components/common';\nimport User from 'logic/users/User';\nimport SectionComponent from 'components/common/Section/SectionComponent';\nimport AppConfig from 'util/AppConfig';\n\nimport ProfileUpdateInfo from './ProfileUpdateInfo';\n\nimport FirstNameFormGroup from '../UserCreate/FirstNameFormGroup';\nimport LastNameFormGroup from '../UserCreate/LastNameFormGroup';\nimport EmailFormGroup from '../UserCreate/EmailFormGroup';\n\nconst isCloud = AppConfig.isCloud();\ntype Props = {\n user: User,\n onSubmit: (payload: {\n first_name: $PropertyType,\n last_name: $PropertyType,\n email: $PropertyType,\n }) => Promise,\n};\nconst StyledReadOnlyFormGroup = styled(ReadOnlyFormGroup)`\n padding-bottom: 15px;\n`;\n\nconst ProfileSection = ({\n user,\n onSubmit,\n}: Props) => {\n const {\n username,\n fullName,\n firstName,\n lastName,\n email,\n } = user;\n\n const _getUserNameGroup = () => {\n if (isCloud) {\n return ;\n }\n\n return (\n <>\n \n \n );\n };\n\n const _getEmailGroup = () => {\n if (isCloud) {\n return null;\n }\n\n return (\n <>\n \n \n );\n };\n\n const isOldUser = () => {\n return fullName && (!firstName && !lastName);\n };\n\n return (\n \n {isOldUser() && }\n \n {({ isSubmitting, isValid }) => (\n
\n {isOldUser() && }\n \n \n {_getUserNameGroup()}\n {_getEmailGroup()}\n \n \n
\n \n
\n \n
\n \n )}\n
\n
\n );\n};\n\nexport default ProfileSection;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport { Formik, Form } from 'formik';\n\nimport { PREFERENCES_THEME_MODE } from 'theme/constants';\nimport { Button, Row, Col } from 'components/graylog';\nimport { Input } from 'components/bootstrap';\nimport { FormikFormGroup, ReadOnlyFormGroup } from 'components/common';\nimport SectionComponent from 'components/common/Section/SectionComponent';\nimport User from 'logic/users/User';\nimport CombinedProvider from 'injection/CombinedProvider';\n\nconst { PreferencesActions } = CombinedProvider.get('Preferences');\n\ntype Props = {\n user: User,\n};\n\nconst PreferencesSection = ({ user }: Props) => {\n const onSubmit = (data) => PreferencesActions.saveUserPreferences(user.username, data);\n\n return (\n \n \n {({ isSubmitting, isValid }) => (\n
\n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n\n \n\n \n \n
\n \n
\n \n
\n \n )}\n
\n
\n );\n};\n\nexport default PreferencesSection;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport { useState, useCallback } from 'react';\nimport * as Immutable from 'immutable';\nimport styled from 'styled-components';\n\nimport UsersDomain from 'domainActions/users/UsersDomain';\nimport AuthzRolesDomain from 'domainActions/roles/AuthzRolesDomain';\nimport { ErrorAlert } from 'components/common';\nimport User from 'logic/users/User';\nimport PaginatedItemOverview, {\n DEFAULT_PAGINATION,\n DescriptiveItem,\n} from 'components/common/PaginatedItemOverview';\nimport type { PaginatedRoles } from 'actions/roles/AuthzRolesActions';\nimport SectionComponent from 'components/common/Section/SectionComponent';\nimport RolesSelector from 'components/permissions/RolesSelector';\n\nimport RolesQueryHelp from '../RolesQueryHelp';\n\ntype Props = {\n user: User,\n onSubmit: (payload: { roles: string[] }) => Promise,\n};\n\nconst Container = styled.div`\n margin-top: 15px;\n margin-bottom: 15px;\n`;\n\nconst RolesSection = ({ user, onSubmit }: Props) => {\n const { username, id } = user;\n const [loading, setLoading] = useState(false);\n const [paginatedRoles, setPaginatedRoles] = useState();\n const [errors, setErrors] = useState();\n\n const _onLoad = useCallback((pagination = DEFAULT_PAGINATION) => {\n setLoading(true);\n\n return AuthzRolesDomain.loadRolesForUser(username, pagination).then((newPaginatedRoles) => {\n setLoading(false);\n\n return newPaginatedRoles;\n });\n }, [username]);\n\n const onRolesUpdate = (data: { roles: Array }) => onSubmit(data).then(() => {\n _onLoad().then(setPaginatedRoles);\n UsersDomain.load(id);\n });\n\n const _onAssignRole = (newRoles: Immutable.Set) => {\n const userRoles = user.roles;\n const newRoleNames = newRoles.map((r) => r.name);\n const newUserRoles = userRoles.union(newRoleNames).toJS();\n\n setErrors(undefined);\n\n return onRolesUpdate({ roles: newUserRoles });\n };\n\n const ensureReaderOrAdminRole = (newRoles) => {\n return newRoles.includes('Reader') || newRoles.includes('Admin');\n };\n\n const onDeleteRole = (role: DescriptiveItem) => {\n const newUserRoles = Immutable.Set(user.roles.toJS()).remove(role.name).toJS();\n\n if (ensureReaderOrAdminRole(newUserRoles)) {\n onRolesUpdate({ roles: newUserRoles });\n setErrors(undefined);\n } else {\n setErrors('Roles must at least contain Admin or Reader role.');\n _onLoad().then(setPaginatedRoles);\n }\n };\n\n return (\n \n

Assign Roles

\n \n role.name} />\n \n\n \n {errors}\n \n

Selected Roles

\n \n } />\n \n
\n );\n};\n\nexport default RolesSection;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport { PluginStore } from 'graylog-web-plugin/plugin';\n\nimport User from 'logic/users/User';\nimport { EnterprisePluginNotFound } from 'components/common';\nimport SectionComponent from 'components/common/Section/SectionComponent';\n\ntype Props = {\n user: User,\n};\n\nconst TeamsSection = ({ user }: Props) => {\n const teamsPlugin = PluginStore.exports('teams');\n const UserTeamsAssignment = teamsPlugin?.[0]?.UserTeamsAssignment;\n\n return (\n \n {UserTeamsAssignment ? : }\n \n );\n};\n\nexport default TeamsSection;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport { useContext } from 'react';\n\nimport UsersDomain from 'domainActions/users/UsersDomain';\nimport CurrentUserContext from 'contexts/CurrentUserContext';\nimport { Spinner, IfPermitted } from 'components/common';\nimport SectionComponent from 'components/common/Section/SectionComponent';\nimport { Alert } from 'components/graylog';\nimport User from 'logic/users/User';\nimport CombinedProvider from 'injection/CombinedProvider';\n\nimport ReadOnlyWarning from './ReadOnlyWarning';\nimport SettingsSection from './SettingsSection';\nimport PasswordSection from './PasswordSection';\nimport ProfileSection from './ProfileSection';\nimport PreferencesSection from './PreferencesSection';\nimport RolesSection from './RolesSection';\nimport TeamsSection from './TeamsSection';\n\nimport PermissionsUpdateInfo from '../PermissionsUpdateInfo';\nimport SectionGrid from '../../common/Section/SectionGrid';\n\nconst { CurrentUserStore } = CombinedProvider.get('CurrentUser');\n\ntype Props = {\n user: User,\n};\n\nconst _updateUser = (data, currentUser, userId, fullName) => {\n return UsersDomain.update(userId, data, fullName).then(() => {\n if (userId === currentUser?.id) {\n CurrentUserStore.reload();\n }\n });\n};\n\nconst UserEdit = ({ user }: Props) => {\n const currentUser = useContext(CurrentUserContext);\n\n if (!user) {\n return ;\n }\n\n if (user.readOnly) {\n return ;\n }\n\n return (\n \n \n
\n {user.external && (\n \n \n This user was synced from an external server, therefore neither\n the profile nor the password can be changed. Please contact your administrator for more information.\n \n \n )}\n {!user.external && (\n _updateUser(data, currentUser, user.id, user.fullName)} />\n )}\n _updateUser(data, currentUser, user.id, user.fullName)} />\n \n {!user.external && }\n \n \n
\n
\n \n \n _updateUser(data, currentUser, user.id, user.fullName)} />\n \n \n \n \n
\n
\n
\n );\n};\n\nexport default UserEdit;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport UserEdit from './UserEdit';\n\nexport default UserEdit;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport { useEffect, useState } from 'react';\n\nimport { UsersActions } from 'stores/users/UsersStore';\nimport withParams from 'routing/withParams';\nimport DocsHelper from 'util/DocsHelper';\nimport UsersDomain from 'domainActions/users/UsersDomain';\nimport { PageHeader, DocumentTitle } from 'components/common';\nimport UserEdit from 'components/users/UserEdit';\nimport DocumentationLink from 'components/support/DocumentationLink';\nimport UserOverviewLinks from 'components/users/navigation/UserOverviewLinks';\nimport UserActionLinks from 'components/users/navigation/UserActionLinks';\nimport User from 'logic/users/User';\n\ntype Props = {\n params: {\n userId: string,\n },\n};\n\nconst PageTitle = ({ fullName }: { fullName: string | null | undefined }) => (\n <>\n Edit User {fullName && (\n <>\n - {fullName}\n \n )}\n \n);\n\nconst _updateUserOnLoad = (setLoadedUser) => UsersActions.load.completed.listen(setLoadedUser);\n\nconst UserEditPage = ({ params }: Props) => {\n const [loadedUser, setLoadedUser] = useState();\n const userId = params?.userId;\n\n // We need to trigger a user state update in child components and do so by calling the load action\n // and by defining a listener for this action which updates the state.\n useEffect(() => _updateUserOnLoad(setLoadedUser), []);\n\n useEffect(() => {\n UsersDomain.load(userId);\n }, [userId]);\n\n const fullName = loadedUser?.fullName ?? '';\n const readOnly = loadedUser?.readOnly ?? false;\n const userToEdit = userId === loadedUser?.id ? loadedUser : undefined;\n\n return (\n \n }\n subactions={(\n \n )}>\n \n You can change the user details and password here and assign roles and teams.\n \n\n \n Learn more in the{' '}\n \n \n\n \n \n \n \n );\n};\n\nexport default withParams(UserEditPage);\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport { $PropertyType } from 'utility-types';\n\nimport { LinkContainer } from 'components/graylog/router';\nimport User from 'logic/users/User';\nimport Routes from 'routing/Routes';\nimport { ButtonToolbar, Button } from 'components/graylog';\n\ntype Props = {\n userId: $PropertyType,\n userIsReadOnly: boolean,\n};\n\nconst UserActionLinks = ({ userId, userIsReadOnly }: Props) => (\n \n \n \n \n {!userIsReadOnly && (\n \n \n \n )}\n \n \n \n \n);\n\nexport default UserActionLinks;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport Reflux from 'reflux';\n\nimport { singletonActions } from 'views/logic/singleton';\n\nconst StreamsActions = singletonActions('Streams', () => Reflux.createActions({\n searchPaginated: { asyncResult: true },\n listStreams: { asyncResult: true },\n load: { asyncResult: true },\n get: { asyncResult: true },\n remove: { asyncResult: true },\n pause: { asyncResult: true },\n resume: { asyncResult: true },\n cloneStream: { asyncResult: true },\n update: { asyncResult: true },\n save: { asyncResult: true },\n removeOutput: { asyncResult: true },\n addOutput: { asyncResult: true },\n testMatch: { asyncResult: true },\n}));\n\nexport default StreamsActions;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\n\nimport { OverlayTrigger, Popover, Table, Button } from 'components/graylog';\nimport { Icon } from 'components/common';\n\nconst rolesQueryHelpPopover = (\n \n

Available search fields

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FieldDescription
nameRole name
descriptionDescription of the Role
\n

Examples

\n

\n Find roles with a description containing creator:
\n description:creator
\n

\n
\n);\n\nconst RolesQueryHelp = () => (\n \n \n \n);\n\nexport default RolesQueryHelp;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport Reflux from 'reflux';\nimport lodash from 'lodash';\n\nimport fetch from 'logic/rest/FetchProvider';\nimport ApiRoutes from 'routing/ApiRoutes';\nimport { qualifyUrl } from 'util/URLUtils';\nimport UserNotification from 'util/UserNotification';\nimport CombinedProvider from 'injection/CombinedProvider';\nimport PaginationURL from 'util/PaginationURL';\nimport StreamsActions from 'actions/streams/StreamsActions';\nimport { singletonStore } from 'views/logic/singleton';\n\nconst { CurrentUserStore } = CombinedProvider.get('CurrentUser');\n\nexport type Stream = {\n id: string,\n title: string,\n description: string,\n remove_matches_from_default_stream: boolean,\n isDefaultStream: boolean,\n creatorUser: string,\n createdAt: number,\n};\n\ntype StreamRule = {\n id: string,\n type: string,\n value: string,\n inverted: boolean,\n stream_id: string,\n description: string,\n};\n\ntype OutputSummary = {\n id: string,\n title: string,\n type: string,\n creator_user_id: string,\n created_at: string,\n configuration: { [key: string]: string },\n};\n\ntype AlertConditionSummary = {\n id: string,\n type: string,\n creator_user_id: string,\n created_at: string,\n parameters: { [key: string]: any },\n in_grace: boolean | null | undefined,\n title: string | null | undefined,\n};\n\ntype AlertReceiver = {\n emails: string[],\n users: string[],\n};\n\nexport type StreamResponse = {\n id: string,\n creator_user_id: string,\n outputs: OutputSummary[],\n matching_type: string,\n description: string,\n created_at: string,\n disabled: boolean,\n rules: StreamRule[],\n alert_conditions: AlertConditionSummary[],\n alert_receivers: AlertReceiver\n title: string,\n is_default: boolean | null | undefined,\n is_editable: boolean,\n remove_matches_from_default_stream: boolean,\n index_set_id: string,\n}\n\ntype TestMatchResponse = {\n matches: boolean,\n rules: any,\n};\n\ntype Callback = {\n (): void,\n};\n\ntype StreamSummaryResponse = {\n total: number,\n streams: Array,\n};\n\ntype PaginatedResponse = {\n pagination: {\n count: number,\n total: number,\n page: number,\n per_page: number,\n },\n query: string,\n streams: Array,\n};\n\nconst StreamsStore = singletonStore('Streams', () => Reflux.createStore({\n listenables: [StreamsActions],\n\n callbacks: [],\n\n searchPaginated(newPage, newPerPage, newQuery) {\n const url = PaginationURL(ApiRoutes.StreamsApiController.paginated().url, newPage, newPerPage, newQuery);\n\n const promise = fetch('GET', qualifyUrl(url))\n .then((response: PaginatedResponse) => {\n const {\n streams,\n query,\n pagination: {\n count,\n total,\n page,\n per_page: perPage,\n },\n } = response;\n\n return {\n streams,\n pagination: {\n count,\n total,\n page,\n perPage,\n query,\n },\n };\n })\n .catch((errorThrown) => {\n UserNotification.error(`Loading streams failed with status: ${errorThrown}`,\n 'Could not load streams');\n });\n\n StreamsActions.searchPaginated.promise(promise);\n\n return promise;\n },\n listStreams() {\n const url = '/streams';\n\n const promise = fetch('GET', qualifyUrl(url))\n .then((result: StreamSummaryResponse) => result.streams)\n .catch((errorThrown) => {\n UserNotification.error(`Loading streams failed with status: ${errorThrown}`,\n 'Could not load streams');\n });\n\n StreamsActions.listStreams.promise(promise);\n\n return promise;\n },\n load(callback: ((streams: Array) => void)) {\n this.listStreams()\n .then((streams) => {\n callback(streams);\n });\n },\n get(streamId: string, callback: ((stream: Stream) => void)): Promise {\n const failCallback = (errorThrown) => {\n UserNotification.error(`Loading Stream failed with status: ${errorThrown}`,\n 'Could not retrieve Stream');\n };\n\n const { url } = ApiRoutes.StreamsApiController.get(streamId);\n\n const promise = fetch('GET', qualifyUrl(url))\n .then(callback, failCallback);\n\n StreamsActions.get.promise(promise);\n\n return promise;\n },\n remove(streamId: string, callback: (() => void)) {\n const failCallback = (errorThrown) => {\n UserNotification.error(`Removing Stream failed with status: ${errorThrown}`,\n 'Could not remove Stream');\n };\n\n const url = qualifyUrl(ApiRoutes.StreamsApiController.delete(streamId).url);\n\n const promise = fetch('DELETE', url)\n .then(callback, failCallback)\n .then(() => CurrentUserStore.reload()\n .then(this._emitChange.bind(this)));\n\n StreamsActions.remove.promise(promise);\n\n return promise;\n },\n pause(streamId: string, callback: (() => void)) {\n const failCallback = (errorThrown) => {\n UserNotification.error(`Pausing Stream failed with status: ${errorThrown}`,\n 'Could not pause Stream');\n };\n\n const url = qualifyUrl(ApiRoutes.StreamsApiController.pause(streamId).url);\n\n const promise = fetch('POST', url)\n .then(callback, failCallback)\n .then((response) => {\n this._emitChange();\n\n return response;\n });\n\n StreamsActions.pause.promise(promise);\n\n return promise;\n },\n resume(streamId: string, callback: (() => void)) {\n const failCallback = (errorThrown) => {\n UserNotification.error(`Resuming Stream failed with status: ${errorThrown}`,\n 'Could not resume Stream');\n };\n\n const url = qualifyUrl(ApiRoutes.StreamsApiController.resume(streamId).url);\n\n const promise = fetch('POST', url)\n .then(callback, failCallback)\n .then((response) => {\n this._emitChange();\n\n return response;\n });\n\n StreamsActions.resume.promise(promise);\n\n return promise;\n },\n save(stream: any, callback: ((streamId: string) => void)) {\n const failCallback = (errorThrown) => {\n UserNotification.error(`Saving Stream failed with status: ${errorThrown}`,\n 'Could not save Stream');\n };\n\n const url = qualifyUrl(ApiRoutes.StreamsApiController.create().url);\n\n const promise = fetch('POST', url, stream)\n .then(callback, failCallback)\n .then(() => CurrentUserStore.reload()\n .then(this._emitChange.bind(this)));\n\n StreamsActions.save.promise(promise);\n\n return promise;\n },\n update(streamId: string, data: any, callback: ((stream: Stream) => void)) {\n const failCallback = (errorThrown) => {\n UserNotification.error(`Updating Stream failed with status: ${errorThrown}`,\n 'Could not update Stream');\n };\n\n const url = qualifyUrl(ApiRoutes.StreamsApiController.update(streamId).url);\n\n const promise = fetch('PUT', url, data)\n .then(callback, failCallback)\n .then(this._emitChange.bind(this));\n\n StreamsActions.update.promise(promise);\n\n return promise;\n },\n cloneStream(streamId: string, data: any, callback: ((streamId: string) => void)) {\n const failCallback = (errorThrown) => {\n UserNotification.error(`Cloning Stream failed with status: ${errorThrown}`,\n 'Could not clone Stream');\n };\n\n const url = qualifyUrl(ApiRoutes.StreamsApiController.cloneStream(streamId).url);\n\n const promise = fetch('POST', url, data)\n .then(callback, failCallback)\n .then(() => CurrentUserStore.reload()\n .then(this._emitChange.bind(this)));\n\n StreamsActions.cloneStream.promise(promise);\n\n return promise;\n },\n removeOutput(streamId: string, outputId: string, callback: () => void) {\n const url = qualifyUrl(ApiRoutes.StreamOutputsApiController.delete(streamId, outputId).url);\n\n const promise = fetch('DELETE', url)\n .then(callback, (errorThrown) => {\n UserNotification.error(`Removing output from stream failed with status: ${errorThrown}`,\n 'Could not remove output from stream');\n })\n .then(this._emitChange.bind(this));\n\n StreamsActions.removeOutput.promise(promise);\n\n return promise;\n },\n addOutput(streamId: string, outputId: string, callback: (response: any) => void) {\n const url = qualifyUrl(ApiRoutes.StreamOutputsApiController.add(streamId).url);\n\n const promise = fetch('POST', url, { outputs: [outputId] })\n .then(callback, (errorThrown) => {\n UserNotification.error(`Adding output to stream failed with status: ${errorThrown}`,\n 'Could not add output to stream');\n })\n .then(this._emitChange.bind(this));\n\n StreamsActions.addOutput.promise(promise);\n\n return promise;\n },\n testMatch(streamId: string, message: any, callback: (response: TestMatchResponse) => void) {\n const url = qualifyUrl(ApiRoutes.StreamsApiController.testMatch(streamId).url);\n\n const promise = fetch('POST', url, message)\n .then(callback, (error) => {\n UserNotification.error(`Testing stream rules of stream failed with status: ${error.message}`,\n 'Could not test stream rules of stream');\n });\n\n StreamsActions.testMatch.promise(promise);\n\n return promise;\n },\n onChange(callback: Callback) {\n this.callbacks.push(callback);\n },\n _emitChange() {\n this.callbacks.forEach((callback) => callback());\n },\n unregister(callback: Callback) {\n lodash.pull(this.callbacks, callback);\n },\n}));\n\nexport { StreamsStore, StreamsActions };\nexport default StreamsStore;\n"],"sourceRoot":""}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy