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

web-interface.assets.b6fe2bb5-7319.756ce22b68b54e732534.js.map Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
{"version":3,"file":"b6fe2bb5-7319.756ce22b68b54e732534.js","mappings":"oNAsCA,QAZuB,SAAC,GAAD,QACrBA,KACEC,EAFmB,EAEnBA,KACAC,EAHmB,EAGnBA,YAHmB,OAMrB,gBAAC,IAAD,CAAkBC,MAAM,WACtB,gBAAC,KAAD,CAAmBC,MAAM,OAAOC,MAAOJ,IACvC,gBAAC,KAAD,CAAmBG,MAAM,cAAcC,MAAOH,O,0GCSlD,QAfwB,SAAC,GAAD,IAAGI,EAAH,EAAGA,OAAH,OACtB,gBAAC,KAAD,KACE,gBAAC,IAAD,CAAeC,GAAIC,EAAAA,GAAAA,OAAAA,WAAAA,KAA8BF,IAC/C,gBAAC,KAAD,CAAQG,QAAQ,WAAhB,iBAIF,gBAAC,IAAD,CAAeF,GAAIC,EAAAA,GAAAA,OAAAA,WAAAA,KAA8BF,IAC/C,gBAAC,KAAD,CAAQG,QAAQ,WAAhB,iB,uuCCAN,IAAMC,GAAeC,EAAAA,EAAAA,SAAOC,EAAAA,IAAV,iFAAGD,CAAH,uBAIZE,EAAeF,EAAAA,QAAAA,IAAAA,WAAH,sEAAGA,CAAH,mBAIZG,EAASH,EAAAA,QAAAA,IAAAA,WAAH,gEAAGA,EAAW,gBAAGI,EAAH,EAAGA,MAAH,OAAeC,EAAAA,EAAAA,KAAd,CAAD,0FAGfD,EAAME,OAAOC,QAAQC,WAW1BC,EAAeT,EAAAA,QAAAA,IAAAA,WAAH,sEAAGA,CAAH,sCAKZU,GAAeV,EAAAA,EAAAA,SAAOW,EAAAA,IAAV,iFAAGX,CAAH,aAIZY,EAAgB,SAAC,GAAD,IAAGnB,EAAH,EAAGA,MAAH,OACpB,gBAACgB,EAAD,KAAehB,IAqGjB,QAhGsB,SAAC,GAA8B,IAA5BJ,EAA4B,EAA5BA,KAAM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gBAAC,EAAD,CAAUT,KAAMM,KAAW+G,MAAAA,OAAL,EAAKA,EAAY5B,IAAK4B,OAAapD","sources":["webpack://graylog-web-interface/./src/components/roles/RoleDetails/ProfileSection.tsx","webpack://graylog-web-interface/./src/components/roles/navigation/RoleActionLinks.tsx","webpack://graylog-web-interface/./src/components/roles/RoleEdit/UsersSelector.tsx","webpack://graylog-web-interface/./src/components/roles/RoleEdit/UsersSection.tsx","webpack://graylog-web-interface/./src/components/roles/RoleEdit/TeamsSection.tsx","webpack://graylog-web-interface/./src/components/roles/RoleEdit/RoleEdit.tsx","webpack://graylog-web-interface/./src/components/roles/RoleEdit/index.ts","webpack://graylog-web-interface/./src/pages/RoleEditPage.tsx"],"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 * as React from 'react';\n\nimport type Role from 'logic/roles/Role';\nimport SectionComponent from 'components/common/Section/SectionComponent';\nimport { ReadOnlyFormGroup } from 'components/common';\n\ntype Props = {\n  role: Role,\n};\n\nconst ProfileSection = ({\n  role: {\n    name,\n    description,\n  },\n}: Props) => (\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 type { $PropertyType } from 'utility-types';\n\nimport { LinkContainer } from 'components/common/router';\nimport type Role from 'logic/roles/Role';\nimport Routes from 'routing/Routes';\nimport { ButtonToolbar, Button } from 'components/bootstrap';\n\ntype Props = {\n  roleId: $PropertyType,\n};\n\nconst RoleActionLinks = ({ roleId }: Props) => (\n  \n    \n      \n    \n    \n      \n    \n  \n);\n\nexport default RoleActionLinks;\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, useCallback } from 'react';\nimport { Formik, Form, Field } from 'formik';\nimport styled, { css } from 'styled-components';\nimport { compact } from 'lodash';\nimport * as Immutable from 'immutable';\n\nimport { AuthzRolesActions } from 'stores/roles/AuthzRolesStore';\nimport type Role from 'logic/roles/Role';\nimport type { PaginatedListType } from 'components/common/PaginatedItemOverview';\nimport type UserOverview from 'logic/users/UserOverview';\nimport UsersDomain from 'domainActions/users/UsersDomain';\nimport { Button } from 'components/bootstrap';\nimport { Select, ErrorAlert } from 'components/common';\n\ntype Props = {\n  onSubmit: (user: Immutable.Set) => Promise,\n  role: Role,\n};\n\nconst SubmitButton = styled(Button)`\n  margin-left: 15px;\n`;\n\nconst FormElements = styled.div`\n  display: flex;\n`;\n\nconst Errors = styled.div(({ theme }) => css`\n  width: 100%;\n  margin-top: 3px;\n  color: ${theme.colors.variant.danger};\n\n  > * {\n    margin-right: 5px;\n\n    :last-child {\n      margin-right: 0;\n    }\n  }\n`);\n\nconst SelectOption = styled.div`\n  display: flex;\n  align-items: center;\n`;\n\nconst StyledSelect = styled(Select)`\n  flex: 1;\n`;\n\nconst _renderOption = ({ label }: { label: string }) => (\n  {label}\n);\n\nconst _isRequired = (field) => (value) => (!value ? `The ${field} is required` : undefined);\n\nconst UsersSelector = ({ role, onSubmit }: Props) => {\n  const [users, setUsers] = useState>(Immutable.List.of());\n  const [options, setOptions] = useState([]);\n  const [error, setError] = useState();\n\n  const _loadUsers = useCallback(() => {\n    const getUnlimited = { page: 1, perPage: 0, query: '' };\n\n    UsersDomain.loadUsersPaginated(getUnlimited)\n      .then((paginatedUsers) => {\n        const resultUsers = paginatedUsers.list\n          .filter((u) => !u.roles.includes(role.name))\n          .map((u) => ({ label: u.name, value: u.name }))\n          .toArray();\n\n        setOptions(resultUsers);\n        setUsers(paginatedUsers.list);\n      });\n  }, [role]);\n\n  const onUpdate = ({ user }: { user: string }, { resetForm }) => {\n    if (!user) {\n      return;\n    }\n\n    const newUsers = user.split(',');\n    const userOverview: Immutable.Set = Immutable.Set(compact(newUsers.map((newUser) => {\n      return users.find((u) => u.username === newUser);\n    })));\n\n    if (!userOverview) {\n      setError(`This is an exceptional error! Unable to find user with name ${user} in ${users.map((u) => u.username).join(', ')}`);\n\n      return;\n    }\n\n    setError(undefined);\n    onSubmit(userOverview).then(() => { resetForm(); });\n  };\n\n  useEffect(() => {\n    _loadUsers();\n\n    const unlistenAddMember = AuthzRolesActions.addMembers.completed.listen(_loadUsers);\n    const unlistenRemoveMember = AuthzRolesActions.removeMember.completed.listen(_loadUsers);\n\n    return () => {\n      unlistenRemoveMember();\n      unlistenAddMember();\n    };\n  }, [role, _loadUsers]);\n\n  return (\n    
\n \n {error}\n \n \n {({ isSubmitting, isValid, errors }) => (\n
\n \n \n {({ field: { name, value, onChange } }) => (\n {\n onChange({ target: { value: user, name } });\n }}\n optionRenderer={_renderOption}\n multi\n options={options}\n placeholder=\"Search for users\"\n value={value} />\n )}\n \n \n Assign User\n \n \n {errors && (\n \n {Object.entries(errors).map(([fieldKey, value]: [string, unknown]) => (\n {String(value)}.\n ))}\n \n )}\n
\n )}\n
\n
\n );\n};\n\nexport default UsersSelector;\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 styled from 'styled-components';\nimport type * as Immutable from 'immutable';\n\nimport { ErrorAlert, PaginatedItemOverview } from 'components/common';\nimport AuthzRolesDomain from 'domainActions/roles/AuthzRolesDomain';\nimport type UserOverview from 'logic/users/UserOverview';\nimport { DEFAULT_PAGINATION } from 'components/common/PaginatedItemOverview';\nimport SectionComponent from 'components/common/Section/SectionComponent';\nimport type Role from 'logic/roles/Role';\nimport type { PaginatedList } from 'stores/PaginationTypes';\n\nimport UsersSelector from './UsersSelector';\n\ntype Props = {\n role: Role,\n};\n\nconst Container = styled.div`\n margin-top: 15px;\n margin-bottom: 15px;\n`;\n\nconst UsersSection = ({ role: { id, name }, role }: Props) => {\n const [loading, setLoading] = useState(false);\n const [paginatedUsers, setPaginatedUsers] = useState>();\n const [errors, setErrors] = useState();\n\n const _onLoad = useCallback((pagination) => {\n setLoading(true);\n\n return AuthzRolesDomain.loadUsersForRole(id, name, pagination)\n .then((paginatedRoles) => {\n setLoading(false);\n\n return paginatedRoles;\n });\n }, [id, name]);\n\n const _onAssignUser = (newUsers: Immutable.Set) => AuthzRolesDomain.addMembers(id,\n newUsers.map((u) => u.username).toSet()).then(() => _onLoad(DEFAULT_PAGINATION)\n .then((result) => {\n setPaginatedUsers(result);\n\n return result;\n }));\n\n const _onUnassignUser = (user) => {\n if ((role.name === 'Reader' || role.name === 'Admin')\n && (!user.roles.includes('Reader') || !user.roles.includes('Admin'))) {\n setErrors(`User '${user.name}' needs at least a Reader or Admin role.`);\n _onLoad(DEFAULT_PAGINATION).then(setPaginatedUsers);\n\n return;\n }\n\n setErrors(undefined);\n\n AuthzRolesDomain.removeMember(id, user.name).then(() => {\n _onLoad(DEFAULT_PAGINATION).then(setPaginatedUsers);\n });\n };\n\n return (\n \n

Assign Users

\n \n \n \n \n {errors}\n \n

Selected Users

\n \n \n \n
\n );\n};\n\nexport default UsersSection;\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 type Role from 'logic/roles/Role';\nimport { EnterprisePluginNotFound } from 'components/common';\nimport SectionComponent from 'components/common/Section/SectionComponent';\n\ntype Props = {\n role: Role,\n};\n\nconst TeamsSection = ({ role }: Props) => {\n const teamsPlugin = PluginStore.exports('teams');\n const RoleTeamsAssignment = teamsPlugin?.[0]?.RoleTeamsAssignment;\n\n return (\n \n {RoleTeamsAssignment ? : }\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';\n\nimport { Spinner, IfPermitted } from 'components/common';\nimport type Role from 'logic/roles/Role';\n\nimport UsersSection from './UsersSection';\nimport TeamsSection from './TeamsSection';\n\nimport ProfileSection from '../RoleDetails/ProfileSection';\nimport SectionGrid from '../../common/Section/SectionGrid';\n\ntype Props = {\n role: Role | null | undefined,\n};\n\nconst RoleEdit = ({ role }: Props) => {\n if (!role) {\n return ;\n }\n\n return (\n \n
\n \n
\n
\n \n \n \n \n
\n
\n );\n};\n\nexport default RoleEdit;\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 */\n\nimport RoleEdit from './RoleEdit';\n\nexport default RoleEdit;\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 withParams from 'routing/withParams';\nimport { LinkContainer } from 'components/common/router';\nimport RoleEdit from 'components/roles/RoleEdit';\nimport Routes from 'routing/Routes';\nimport RoleActionLinks from 'components/roles/navigation/RoleActionLinks';\nimport { Button } from 'components/bootstrap';\nimport { AuthzRolesActions } from 'stores/roles/AuthzRolesStore';\nimport DocsHelper from 'util/DocsHelper';\nimport { PageHeader, DocumentTitle } from 'components/common';\nimport DocumentationLink from 'components/support/DocumentationLink';\nimport type Role from 'logic/roles/Role';\n\ntype Props = {\n params: {\n roleId: string,\n },\n};\n\nconst PageTitle = ({ name }: { name: string | undefined | null }) => (\n <>\n Edit Role {name && (\n <>\n - {name}\n \n )}\n \n);\n\nconst RoleEditPage = ({ params }: Props) => {\n const [loadedRole, setLoadedRole] = useState();\n const roleId = params?.roleId;\n\n useEffect(() => {\n AuthzRolesActions.load(roleId).then(setLoadedRole);\n }, [roleId]);\n\n return (\n \n }\n subactions={}>\n \n You can assign the role to users.\n \n \n Learn more in the{' '}\n \n \n \n \n \n \n \n \n );\n};\n\nexport default withParams(RoleEditPage);\n"],"names":["role","name","description","title","label","value","roleId","to","Routes","bsStyle","SubmitButton","styled","Button","FormElements","Errors","theme","css","colors","variant","danger","SelectOption","StyledSelect","Select","_renderOption","onSubmit","useState","Immutable","users","setUsers","options","setOptions","error","setError","_loadUsers","useCallback","UsersDomain","page","perPage","query","then","paginatedUsers","resultUsers","list","filter","u","roles","includes","map","toArray","useEffect","unlistenAddMember","AuthzRolesActions","unlistenRemoveMember","onClose","runtimeError","Formik","user","resetForm","newUsers","split","userOverview","compact","newUser","find","username","undefined","join","initialValues","field","isSubmitting","isValid","errors","Form","Field","validate","onChange","inputProps","target","optionRenderer","multi","placeholder","disabled","type","Object","entries","fieldKey","key","String","Container","id","loading","setLoading","setPaginatedUsers","setErrors","_onLoad","pagination","AuthzRolesDomain","paginatedRoles","SectionComponent","showLoading","toSet","DEFAULT_PAGINATION","result","noDataText","onLoad","overrideList","onDeleteItem","teamsPlugin","PluginStore","RoleTeamsAssignment","featureName","SectionGrid","ProfileSection","permissions","PageTitle","withParams","params","loadedRole","setLoadedRole","subactions","RoleActionLinks","DocumentationLink","DocsHelper","text"],"sourceRoot":""}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy