Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
{"version":3,"file":"325e2d4b-6731.7fa6a164b58219e10d69.js","mappings":"iVA2BA,MAkEA,EAlEkBA,IAAiB,CACjCC,YAAa,YACbC,OAAQ,CAACC,IAAAA,QAAeC,EAAAA,GAAmBD,IAAAA,SAAgBE,EAAAA,EAAqB,2BAEhFC,gBAAe,KACN,CACLC,oBAAgBC,IAIpBC,oBACEC,EAAAA,EAAAA,YACAN,EAAAA,EAAAA,QACD,EAEDO,qBACOC,KAAKC,cACRD,KAAKE,sBAER,EAEDC,uBAAuBC,GACrBJ,KAAKK,SAAS,CAAEV,eAAgBS,EAAME,QACvC,EAEDC,UAAUC,GACRC,EAAAA,EAAAA,QAAgBD,EACjB,EAEDN,uBACE,MAAQQ,aAAa,UAAEC,EAAF,YAAaC,GAA5B,eAA2CjB,GAAmBK,KAAKI,MAGrES,EAAAA,GAAAA,YAA6BD,EAAa,CAAC,mBACzCjB,EAAemB,KACjBd,KAAKO,UAAUQ,EAAAA,GAAAA,iBAOD,OAAdJ,GAAsBK,OAAOC,KAAKN,GAAWO,OAAS,EACjC,WAAnBP,EAAUQ,KACZnB,KAAKO,UAAUQ,EAAAA,GAAAA,cAAqBJ,EAAUS,KAE9CpB,KAAKO,UAAUQ,EAAAA,GAAAA,eAAsBJ,EAAUS,KAMnDpB,KAAKO,UAAUQ,EAAAA,GAAAA,OAChB,EAEDd,aACE,MAAM,YAAES,EAAF,eAAef,GAAmBK,KAAKI,MAE7C,OAAQM,IAAgBf,CACzB,EAED0B,OAAM,IACG,gBAAC,KAAD,O,6IClEJ,MAAMvB,GAAwBwB,EAAAA,EAAAA,IACnC,uBACA,IAAM/B,IAAAA,cAAqB,CACzBgC,UAAW,CAAEC,aAAa,GAC1BC,QAAS,CAAED,aAAa,OAIf/B,GAAsBiC,EAAAA,EAAAA,IACjC,uBACA,IAAMnC,IAAAA,YAAmB,CACvBoC,YAAa,CAAC7B,GACd8B,UAAW,yBACXtB,YAAQV,EAERiC,OACE7B,KAAKuB,WACN,EAED7B,kBACE,MAAO,CAAEY,OAAQN,KAAKM,OACvB,EAEDwB,MACE,OAAO9B,KAAKM,MACb,EAEDiB,YACE,MAAMQ,GAAUC,EAAAA,EAAAA,IAAM,MAAOC,EAAAA,GAAoBjC,KAAK4B,YAEtDG,EACGG,MACEC,IACCnC,KAAKM,OAAS6B,EACdnC,KAAKoC,QAAQ,CAAE9B,OAAQN,KAAKM,SAErB6B,KAERE,GAAUC,QAAQD,MAAMA,KAG7BvC,EAAsByB,UAAUQ,QAAQA,EACzC,EAEDN,UACE,MAAMM,GAAUC,EAAAA,EAAAA,IAAM,OAAQC,EAAAA,GAAqB,GAAEjC,KAAK4B,qBAAsB,MAEhFG,EACGG,MACEC,IACCnC,KAAKuB,YAEEY,KAERE,IACCE,EAAAA,EAAAA,MAAwB,wDAAuDF,IAC7E,0BADF,IAKNvC,EAAsB2B,QAAQM,QAAQA,EACvC,K","sources":["webpack://graylog-web-interface/./src/pages/StartPage.jsx","webpack://graylog-web-interface/./src/stores/gettingstarted/GettingStartedStore.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 from 'react';\nimport createReactClass from 'create-react-class';\nimport Reflux from 'reflux';\n\nimport { Spinner } from 'components/common';\nimport Routes from 'routing/Routes';\nimport history from 'util/History';\nimport PermissionsMixin from 'util/PermissionsMixin';\nimport { CurrentUserStore } from 'stores/users/CurrentUserStore';\nimport { GettingStartedActions, GettingStartedStore } from 'stores/gettingstarted/GettingStartedStore';\n\nconst StartPage = createReactClass({\n displayName: 'StartPage',\n mixins: [Reflux.connect(CurrentUserStore), Reflux.listenTo(GettingStartedStore, 'onGettingStartedUpdate')],\n\n getInitialState() {\n return {\n gettingStarted: undefined,\n };\n },\n\n componentDidMount() {\n GettingStartedActions.getStatus();\n CurrentUserStore.reload();\n },\n\n componentDidUpdate() {\n if (!this._isLoading()) {\n this._redirectToStartpage();\n }\n },\n\n onGettingStartedUpdate(state) {\n this.setState({ gettingStarted: state.status });\n },\n\n _redirect(page) {\n history.replace(page);\n },\n\n _redirectToStartpage() {\n const { currentUser: { startpage, permissions }, gettingStarted } = this.state;\n\n // Show getting started page if user is an admin and getting started wasn't dismissed\n if (PermissionsMixin.isPermitted(permissions, ['inputs:create'])) {\n if (gettingStarted.show) {\n this._redirect(Routes.GETTING_STARTED);\n\n return;\n }\n }\n\n // Show custom startpage if it was set\n if (startpage !== null && Object.keys(startpage).length > 0) {\n if (startpage.type === 'stream') {\n this._redirect(Routes.stream_search(startpage.id));\n } else {\n this._redirect(Routes.dashboard_show(startpage.id));\n }\n\n return;\n }\n\n this._redirect(Routes.SEARCH);\n },\n\n _isLoading() {\n const { currentUser, gettingStarted } = this.state;\n\n return !currentUser || !gettingStarted;\n },\n\n render() {\n return ;\n },\n});\n\nexport default StartPage;\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 fetch from 'logic/rest/FetchProvider';\nimport UserNotification from 'util/UserNotification';\nimport * as URLUtils from 'util/URLUtils';\nimport { singletonStore, singletonActions } from 'logic/singleton';\n\nexport const GettingStartedActions = singletonActions(\n 'core.GettingStarted',\n () => Reflux.createActions({\n getStatus: { asyncResult: true },\n dismiss: { asyncResult: true },\n }),\n);\n\nexport const GettingStartedStore = singletonStore(\n 'core.GettingStarted',\n () => Reflux.createStore({\n listenables: [GettingStartedActions],\n sourceUrl: '/system/gettingstarted',\n status: undefined,\n\n init() {\n this.getStatus();\n },\n\n getInitialState() {\n return { status: this.status };\n },\n\n get() {\n return this.status;\n },\n\n getStatus() {\n const promise = fetch('GET', URLUtils.qualifyUrl(this.sourceUrl));\n\n promise\n .then(\n (response) => {\n this.status = response;\n this.trigger({ status: this.status });\n\n return response;\n },\n (error) => console.error(error),\n );\n\n GettingStartedActions.getStatus.promise(promise);\n },\n\n dismiss() {\n const promise = fetch('POST', URLUtils.qualifyUrl(`${this.sourceUrl}/dismiss`), '{}');\n\n promise\n .then(\n (response) => {\n this.getStatus();\n\n return response;\n },\n (error) => {\n UserNotification.error(`Dismissing Getting Started Guide failed with status: ${error}`,\n 'Could not dismiss guide');\n },\n );\n\n GettingStartedActions.dismiss.promise(promise);\n },\n }),\n);\n"],"names":["createReactClass","displayName","mixins","Reflux","CurrentUserStore","GettingStartedStore","getInitialState","gettingStarted","undefined","componentDidMount","GettingStartedActions","componentDidUpdate","this","_isLoading","_redirectToStartpage","onGettingStartedUpdate","state","setState","status","_redirect","page","history","currentUser","startpage","permissions","PermissionsMixin","show","Routes","Object","keys","length","type","id","render","singletonActions","getStatus","asyncResult","dismiss","singletonStore","listenables","sourceUrl","init","get","promise","fetch","URLUtils","then","response","trigger","error","console","UserNotification"],"sourceRoot":""}