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

web-interface.assets.6e61897c-78.472622149827c1587209.js.map Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
{"version":3,"sources":["webpack:///./src/views/pages/DashboardsPage.tsx","webpack:///./src/views/components/views/View.tsx","webpack:///./src/views/components/views/ViewList.tsx"],"names":["handleSearch","query","page","perPage","DashboardsActions","search","handleViewDelete","view","window","confirm","title","ViewManagementActions","refreshDashboards","DashboardsPage","dashboards","list","pagination","useEffect","DocsHelper","PAGES","DASHBOARDS","text","permissions","to","Routes","pluginRoute","bsStyle","bsSize","className","md","views","propTypes","connect","DashboardsStore","formatTitle","id","disabled","OwnerTag","owner","currentUser","useContext","CurrentUserContext","username","PropTypes","string","isRequired","Description","description","createdAt","style","color","UserTimezoneTimestamp","dateTime","missingRequirements","requires","requirementsProvided","Object","entries","filter","require","includes","reduce","prev","key","value","isMissingRequirements","keys","length","MissingRequirement","plugin","href","url","target","rel","name","Requirements","missing","values","map","View","children","summary","titleSuffix","actions","node","objectOf","shape","arrayOf","defaultProps","withPluginEntities","reducer","state","action","payload","newQuery","newPage","newPerPage","type","ViewList","useReducer","dispatch","useState","viewToShare","setViewToShare","execSearch","useCallback","onViewDelete","then","items","created_at","entityId","entityType","onClick","pullRight","anyPermissions","onSelect","itemActionsFactory","EntityShareModal","ViewTypeLabel","entityTitle","onClose","undefined","onChange","activePage","totalItems","total","pageSize","pageSizes","marginBottom","onSearch","queryHelpComponent","QueryHelper","entityName","commonFields","onReset","topMargin","bsNoItemsStyle","noItemsText","object","number","func"],"mappings":"6GAAA,oMAkCMA,EAAe,SAACC,EAAOC,EAAMC,GAAd,OAA0BC,IAAkBC,OAAOJ,EAAOC,EAAMC,IAE/EG,EAAmB,SAACC,GAExB,OAAIC,OAAOC,QAAP,2CAAmDF,EAAKG,MAAxD,OACKC,IAAqB,OAAQJ,GAG/B,MAGHK,EAAoB,WACxBR,IAAkBC,UAGdQ,EAAiB,SAAC,GAAgD,QAA9C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6G,MACvBC,SAAU9G,EAAWb,QACrB4H,UAAW,CAAC,GAAI,GAAI,MACjC,yBAAK9E,MAAO,CAAE+E,aAAc,KAC1B,kBAAC,IAAD,CAAYC,SAAU,SAACnC,GAAD,OAAcM,EAAS,CAAEH,KAAM,SAAUJ,QAAS,CAAEC,eAC9DoC,mBAAoB,kBAACC,EAAA,EAAD,CAAaC,WAAW,YAAYC,aAAc,CAAC,KAAM,QAAS,cAAe,aACrGC,QAAS,kBAAMlC,EAAS,CAAEH,KAAM,iBAChCsC,UAAW,KAEzB,kBAAC,IAAD,CAAY3B,MAAOA,EACP4B,eAAe,UACfC,YAAY,uDAMhCvC,EAASnE,UAAY,CACnBD,MAAOa,IAAU4C,QAAQ5C,IAAU+F,QACnC1H,WAAY2B,IAAU2C,MAAM,CAC1BuC,MAAOlF,IAAUgG,OAAO9F,WACxB3C,KAAMyC,IAAUgG,OAAO9F,WACvB1C,QAASwC,IAAUgG,OAAO9F,aACzBA,WACH7C,aAAc2C,IAAUiG,KAAK/F,WAC7BvC,iBAAkBqC,IAAUiG,KAAK/F,YAGnCqD,EAASV,aAAe,CACtB1D,WAAO2F,GAGMvB","file":"6e61897c-78.472622149827c1587209.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 React, { useEffect } from 'react';\n\nimport { LinkContainer } from 'components/graylog/router';\nimport { Col, Row, Button } from 'components/graylog';\nimport connect from 'stores/connect';\nimport { DocumentTitle, PageHeader, IfPermitted } from 'components/common/index';\nimport Routes from 'routing/Routes';\nimport DocumentationLink from 'components/support/DocumentationLink';\nimport DocsHelper from 'util/DocsHelper';\nimport { DashboardsActions, DashboardsStore } from 'views/stores/DashboardsStore';\nimport type { DashboardsStoreState } from 'views/stores/DashboardsStore';\nimport ViewList from 'views/components/views/ViewList';\nimport { ViewManagementActions } from 'views/stores/ViewManagementStore';\n\ntype Props = {\n  dashboards: DashboardsStoreState,\n};\n\nconst handleSearch = (query, page, perPage) => DashboardsActions.search(query, page, perPage);\n\nconst handleViewDelete = (view) => {\n  // eslint-disable-next-line no-alert\n  if (window.confirm(`Are you sure you want to delete \"${view.title}\"?`)) {\n    return ViewManagementActions.delete(view);\n  }\n\n  return null;\n};\n\nconst refreshDashboards = () => {\n  DashboardsActions.search();\n};\n\nconst DashboardsPage = ({ dashboards: { list, pagination } }: Props) => {\n  useEffect(refreshDashboards, []);\n\n  return (\n    \n      \n        \n          \n            Use dashboards to create specific views on your messages. Create a new dashboard here and add any graph or\n            chart you create in other parts of Graylog with one click.\n          \n\n          \n            Take a look at the\n            {' '}{' '}\n            for lots of other useful tips.\n          \n\n          \n            \n              \n                \n              \n            \n          \n        \n\n        \n          \n            \n          \n        \n      \n    \n  );\n};\n\nDashboardsPage.propTypes = {};\n\nexport default connect(DashboardsPage, { dashboards: DashboardsStore });\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 React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { Link } from 'components/graylog/router';\nimport Routes from 'routing/Routes';\nimport { EntityListItem } from 'components/common';\nimport CurrentUserContext from 'contexts/CurrentUserContext';\nimport UserTimezoneTimestamp from 'views/components/common/UserTimezoneTimestamp';\nimport withPluginEntities from 'views/logic/withPluginEntities';\n\nconst formatTitle = (title, id, disabled = false) => (disabled\n  ? 

{title}

\n : {title});\n\nconst OwnerTag = ({ owner }) => {\n const currentUser = useContext(CurrentUserContext);\n\n if (!owner || owner === currentUser?.username) {\n return Last saved;\n }\n\n return Shared by {owner}, last saved;\n};\n\nOwnerTag.propTypes = {\n owner: PropTypes.string.isRequired,\n};\n\n// eslint-disable-next-line react/prop-types\nconst Description = ({ description, owner, createdAt }) => (\n <>\n
{description || No description given.}
\n
at
\n \n);\n\ntype Plugin = {\n name: string,\n url: string,\n};\n\ntype RequirementsList = { [key: string]: Plugin };\n\nconst missingRequirements = (requires, requirementsProvided): RequirementsList => Object.entries(requires)\n .filter(([require]) => !requirementsProvided.includes(require))\n .reduce((prev, [key, value]) => ({ ...prev, [key]: value }), {});\n\nconst isMissingRequirements = (requires, requirementsProvided) => Object.keys(missingRequirements(requires, requirementsProvided)).length > 0;\n\ntype RequirementsProps = {\n requires: RequirementsList,\n requirementsProvided: Array,\n};\n\ntype MissingRequirementProps = {\n plugin: Plugin,\n};\n\nconst MissingRequirement = ({ plugin }: MissingRequirementProps) => (\n {plugin.name}\n);\n\nconst Requirements = ({ requires, requirementsProvided }: RequirementsProps) => {\n const missing = missingRequirements(requires, requirementsProvided);\n\n return Object.keys(missing).length > 0\n ? (\n
\n Missing requirement(s): {Object.values(missing)\n .map((plugin: Plugin) => )}\n
\n )\n : null;\n};\n\nconst View = ({ children, id, title, summary, description, owner, requires, createdAt, requirementsProvided }) => (\n \n \n \n \n )}\n actions={children} />\n);\n\nView.propTypes = {\n children: PropTypes.node,\n id: PropTypes.string.isRequired,\n title: PropTypes.string,\n summary: PropTypes.string,\n description: PropTypes.string,\n owner: PropTypes.string.isRequired,\n createdAt: PropTypes.string.isRequired,\n requires: PropTypes.objectOf(PropTypes.shape({\n name: PropTypes.string.isRequired,\n url: PropTypes.string.isRequired,\n })).isRequired,\n requirementsProvided: PropTypes.arrayOf(PropTypes.string).isRequired,\n};\n\nView.defaultProps = {\n children: null,\n title: 'Unnamed View',\n summary: null,\n description: null,\n};\n\nexport default withPluginEntities(View, { requirementsProvided: 'views.requires.provided' });\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 React, { useEffect, useReducer, useState, useCallback } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { ButtonToolbar, DropdownButton, MenuItem } from 'components/graylog';\nimport { IfPermitted, PaginatedList, SearchForm, Spinner, EntityList, ShareButton } from 'components/common';\nimport EntityShareModal from 'components/permissions/EntityShareModal';\nimport QueryHelper from 'components/common/QueryHelper';\nimport ViewClass from 'views/logic/views/View';\n\nimport View from './View';\n\nimport ViewTypeLabel from '../ViewTypeLabel';\n\nconst itemActionsFactory = (view, onViewDelete, setViewToShare) => {\n return (\n \n setViewToShare(view)} />\n \n \n Delete\n \n \n \n );\n};\n\nconst reducer = (state, action) => {\n const { payload = {} } = action;\n const { newQuery, newPage, newPerPage } = payload;\n\n switch (action.type) {\n case 'search':\n return { ...state, query: newQuery, page: 1 };\n case 'searchReset':\n return { ...state, query: '', page: 1 };\n case 'pageChange':\n return { ...state, page: newPage, perPage: newPerPage };\n case 'viewDelete':\n return { ...state, page: 1 };\n default:\n return state;\n }\n};\n\nconst ViewList = ({ pagination, handleSearch, handleViewDelete, views }) => {\n const [{ query, page, perPage }, dispatch] = useReducer(reducer, { query: '', page: 1, perPage: 10 });\n const [viewToShare, setViewToShare] = useState();\n\n const execSearch = useCallback(() => handleSearch(query, page, perPage), [handleSearch, page, perPage, query]);\n\n useEffect(() => {\n execSearch();\n }, [query, page, perPage, execSearch]);\n\n const onViewDelete = (view) => () => {\n handleViewDelete(view).then(() => {\n dispatch({ type: 'viewDelete' });\n execSearch();\n });\n };\n\n if (!views) {\n return ;\n }\n\n const items = views.map((view) => (\n \n {itemActionsFactory(view, onViewDelete, setViewToShare)}\n \n ));\n\n return (\n <>\n {viewToShare && (\n setViewToShare(undefined)} />\n )}\n dispatch({ type: 'pageChange', payload: { newPage, newPerPage } })}\n activePage={pagination.page}\n totalItems={pagination.total}\n pageSize={pagination.perPage}\n pageSizes={[10, 50, 100]}>\n
\n dispatch({ type: 'search', payload: { newQuery } })}\n queryHelpComponent={}\n onReset={() => dispatch({ type: 'searchReset' })}\n topMargin={0} />\n
\n \n
\n \n );\n};\n\nViewList.propTypes = {\n views: PropTypes.arrayOf(PropTypes.object),\n pagination: PropTypes.shape({\n total: PropTypes.number.isRequired,\n page: PropTypes.number.isRequired,\n perPage: PropTypes.number.isRequired,\n }).isRequired,\n handleSearch: PropTypes.func.isRequired,\n handleViewDelete: PropTypes.func.isRequired,\n};\n\nViewList.defaultProps = {\n views: undefined,\n};\n\nexport default ViewList;\n"],"sourceRoot":""}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy