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

web-interface.assets.b999a7e7-59.9472d5d0a285679cf68d.js.map Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
{"version":3,"sources":["webpack:///./src/components/users/UserList.jsx","webpack:///./src/pages/UsersPage.jsx","webpack:///./src/components/users/UserList.css","webpack:///./src/components/users/UserList.css?fadc"],"names":["UsersStore","StoreProvider","getStore","RolesStore","ActiveIcon","styled","Icon","theme","color","variant","success","UserList","createReactClass","displayName","propTypes","currentUsername","PropTypes","string","isRequired","currentUser","object","mixins","PermissionsMixin","getInitialState","users","undefined","roles","componentDidMount","this","loadUsers","loadRoles","done","setState","map","role","name","_hasAdminRole","user","isPermitted","permissions","deleteUser","username","_deleteUserFunction","window","confirm","_headerCellFormatter","header","formattedHeaderCell","toLocaleLowerCase","className","popover","id","UserListStyle","sessionBadgeDetails","trigger","rootClose","placement","overlay","bsStyle","helpHeaderRow","fixedWidth","_userInfoFormatter","props","rowClass","userBadge","session_active","title","dateTime","last_activity","relative","client_address","roleBadges","key","roleBadgeFixes","actions","read_only","editTokensAction","to","Routes","SYSTEM","AUTHENTICATION","USERS","TOKENS","edit","encodeURIComponent","bsSize","tooltip","help","disabled","eventKey","deleteAction","onClick","actionDropDown","pullRight","editAction","full_name","email","limitedWide","render","state","headers","headerCellFormatter","sortByKey","rows","filterBy","filterSuggestions","dataRowFormatter","filterLabel","filterKeys","CurrentUserStore","UsersPage","Reflux","connect","subpage","CREATE","md","exports","module","push","i","locals","content","options","transform"],"mappings":"qWAkBMA,EAAaC,IAAcC,SAAS,SACpCC,EAAaF,IAAcC,SAAS,SAEpCE,EAAaC,kBAAOC,KAAV,2EAAGD,EAAa,gBAAGE,EAAH,EAAGA,MAAH,2BACrBA,EAAMC,MAAMC,QAAQC,QADC,UA4NjBC,EAxNEC,IAAiB,CAChCC,YAAa,WAEbC,UAAW,CACTC,gBAAiBC,IAAUC,OAAOC,WAClCC,YAAaH,IAAUI,OAAOF,YAGhCG,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ZC,WAhBE,CAAC,WAAY,YAAa,QAAS,qBAqB/C,kBAAC,IAAD,SC/NLC,EAAmB5G,IAAcC,SAAS,eAE1C4G,EAAYlG,IAAiB,CACjCC,YAAa,YACbQ,OAAQ,CAAC0F,IAAOC,QAAQH,GAAmBvF,KAE3C4E,OAJiC,WAK/B,OACE,kBAAC,IAAD,CAAehC,MAAM,SACnB,8BACE,kBAAC,IAAD,CAAYA,MAAM,gBAAgB+C,SAAO,GACvC,oKACC,KACD,8BACE,kBAAC,IAAD,CAAa1E,YAAY,cACvB,kBAAC,gBAAD,CAAesC,GAAIC,IAAOC,OAAOC,eAAeC,MAAMiC,QACpD,kBAAC,IAAD,CAAQxD,QAAQ,WAAhB,oBAMR,kBAAC,IAAD,KACE,kBAAC,IAAD,CAAKyD,GAAI,IACP,kBAAC,EAAD,CAAUpG,gBAAiBa,KAAKuE,MAAMhF,YAAYsB,SAAUtB,YAAaS,KAAKuE,MAAMhF,qBASnF2F,a,gCC/CfM,QAAUC,EAAOD,QAAU,EAAQ,WAAR,EAA4D,IAK/EE,KAAK,CAACD,EAAOE,EAAI,+ZAAga,KAGzbH,QAAQI,OAAS,CAChB,oBAAuB,0BACvB,eAAkB,0BAClB,YAAe,wBACf,QAAW,0BACX,KAAQ,0BACR,cAAiB,0BACjB,YAAe,4B,+BCdhB,IAAIC,EAAU,EAAQ,YAEA,iBAAZA,IAAsBA,EAAU,CAAC,CAACJ,EAAOE,EAAIE,EAAS,MAOhE,IAAIC,EAAU,CAAC,KAAM,EAErB,eAPIC,EAQJ,gBAAqBlG,GAER,EAAQ,WAAR,CAAgEgG,EAASC,GAEnFD,EAAQD,SAAQH,EAAOD,QAAUK,EAAQD","file":"b999a7e7-59.9472d5d0a285679cf68d.js","sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n// eslint-disable-next-line no-restricted-imports\nimport createReactClass from 'create-react-class';\nimport { LinkContainer } from 'react-router-bootstrap';\nimport styled from 'styled-components';\n\nimport PermissionsMixin from 'util/PermissionsMixin';\nimport Routes from 'routing/Routes';\n\nimport StoreProvider from 'injection/StoreProvider';\n\nimport { Button, OverlayTrigger, Popover, Tooltip, DropdownButton, MenuItem } from 'components/graylog';\nimport { DataTable, Spinner, Timestamp, Icon } from 'components/common';\n\n// eslint-disable-next-line import/no-webpack-loader-syntax\nimport UserListStyle from '!style!css!./UserList.css';\n\nconst UsersStore = StoreProvider.getStore('Users');\nconst RolesStore = StoreProvider.getStore('Roles');\n\nconst ActiveIcon = styled(Icon)(({ theme }) => `\n  color: ${theme.color.variant.success};\n`);\n\nconst UserList = createReactClass({\n  displayName: 'UserList',\n\n  propTypes: {\n    currentUsername: PropTypes.string.isRequired,\n    currentUser: PropTypes.object.isRequired,\n  },\n\n  mixins: [PermissionsMixin],\n\n  getInitialState() {\n    return {\n      users: undefined,\n      roles: undefined,\n    };\n  },\n\n  componentDidMount() {\n    this.loadUsers();\n    RolesStore.loadRoles().done((roles) => {\n      this.setState({ roles: roles.map((role) => role.name) });\n    });\n  },\n\n  loadUsers() {\n    const promise = UsersStore.loadUsers();\n    promise.done((users) => {\n      this.setState({\n        users: users,\n      });\n    });\n  },\n\n  _hasAdminRole(user) {\n    return this.isPermitted(user.permissions, ['*']);\n  },\n\n  deleteUser(username) {\n    const promise = UsersStore.deleteUser(username);\n\n    promise.done(() => {\n      this.loadUsers();\n    });\n  },\n\n  _deleteUserFunction(username) {\n    return () => {\n      if (window.confirm(`Do you really want to delete user ${username}?`)) {\n        this.deleteUser(username);\n      }\n    };\n  },\n\n  _headerCellFormatter(header) {\n    let formattedHeaderCell;\n\n    switch (header.toLocaleLowerCase()) {\n      case '':\n        formattedHeaderCell = {header};\n        break;\n      case 'client address': {\n        const popover = (\n          \n            

\n The address of the client used to initially establish the session, not necessarily its current address.\n

\n
\n );\n\n formattedHeaderCell = (\n \n {header}\n \n \n \n \n );\n break;\n }\n case 'actions':\n formattedHeaderCell = {header};\n break;\n default:\n formattedHeaderCell = {header};\n }\n\n return formattedHeaderCell;\n },\n\n _userInfoFormatter(user) {\n const { currentUser, currentUsername } = this.props;\n const rowClass = user.username === currentUsername ? 'active' : null;\n\n let userBadge = null;\n if (user.session_active) {\n const popover = (\n \n
Last activity:
\n
Client address: {user.client_address}
\n
\n );\n userBadge = (\n \n \n \n );\n }\n\n const roleBadges = user.roles.map((role) => {role});\n\n let actions = null;\n if (user.read_only) {\n const editTokensAction = (\n \n \n \n );\n\n const tooltip = System users can only be modified in the Graylog configuration file.;\n actions = (\n \n \n \n \n \n \n  \n {editTokensAction}\n \n );\n } else {\n const editTokensAction = (\n \n \n Edit tokens\n \n \n );\n\n const deleteAction = (\n \n Delete\n \n );\n\n const actionDropDown = (\n \n {editTokensAction}\n {deleteAction}\n \n );\n\n const editAction = (\n \n \n \n );\n\n actions = (\n
\n {this.isPermitted(currentUser.permissions, [`users:edit:${user.username}`]) ? editAction : null}\n  \n {actionDropDown}\n
\n );\n }\n\n return (\n \n {userBadge}\n {user.full_name}\n {user.username}\n {user.email}\n {user.client_address}\n {roleBadges}\n {actions}\n \n );\n },\n\n render() {\n const { roles, users } = this.state;\n const filterKeys = ['username', 'full_name', 'email', 'client_address'];\n const headers = ['', 'Name', 'Username', 'Email Address', 'Client Address', 'Role', 'Actions'];\n\n if (users && roles) {\n return (\n
\n \n
\n );\n }\n\n return ;\n },\n});\n\nexport default UserList;\n","import React from 'react';\nimport createReactClass from 'create-react-class';\nimport Reflux from 'reflux';\nimport { Row, Col, Button } from 'components/graylog';\nimport { LinkContainer } from 'react-router-bootstrap';\n\nimport PermissionsMixin from 'util/PermissionsMixin';\nimport Routes from 'routing/Routes';\n\nimport StoreProvider from 'injection/StoreProvider';\n\nimport { DocumentTitle, IfPermitted, PageHeader } from 'components/common';\nimport UserList from 'components/users/UserList';\n\nconst CurrentUserStore = StoreProvider.getStore('CurrentUser');\n\nconst UsersPage = createReactClass({\n displayName: 'UsersPage',\n mixins: [Reflux.connect(CurrentUserStore), PermissionsMixin],\n\n render() {\n return (\n \n \n \n Create as many users as you want next to the default administrator user here. You can also make changes to already existing users.\n {null}\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n );\n },\n});\n\nexport default UsersPage;\n","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"._1nMuMHVw4CwQEsDB2ZIcxA{font-size:12px}._2SzIWOlWbzCZsyFhwXvIMJ{margin-right:5px;margin-bottom:5px;display:inline-block;line-height:15px}.kC2umW87uww30Z_H44wv1{max-width:300px}._31-RlLhjKTlFeuqwxU3Z9Q{width:180px;max-width:180px}._1z326CnBfOJTcXiFkdkWyZ{cursor:help}._3jtB0mSKD0gEANdY1uXjBe{cursor:help;padding:0 0 0 2px;display:inline-flex}._2aWE0aeopfmpmaZeN6lQOS{min-width:auto}#user-list{overflow-x:visible}\", \"\"]);\n\n// exports\nexports.locals = {\n\t\"sessionBadgeDetails\": \"_1nMuMHVw4CwQEsDB2ZIcxA\",\n\t\"roleBadgeFixes\": \"_2SzIWOlWbzCZsyFhwXvIMJ\",\n\t\"limitedWide\": \"kC2umW87uww30Z_H44wv1\",\n\t\"actions\": \"_31-RlLhjKTlFeuqwxU3Z9Q\",\n\t\"help\": \"_1z326CnBfOJTcXiFkdkWyZ\",\n\t\"helpHeaderRow\": \"_3jtB0mSKD0gEANdY1uXjBe\",\n\t\"moreActions\": \"_2aWE0aeopfmpmaZeN6lQOS\"\n};","\nvar content = require(\"!!../../../node_modules/css-loader/index.js!./UserList.css\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../node_modules/css-loader/index.js!./UserList.css\", function() {\n\t\tvar newContent = require(\"!!../../../node_modules/css-loader/index.js!./UserList.css\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}"],"sourceRoot":""}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy