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":"b6fe2bb5-6731.4bb978af9548be85b3b1.js","mappings":"iVA6FA,QAlEkBA,GAAAA,CAAiB,CACjCC,YAAa,YACbC,OAAQ,CAACC,IAAAA,QAAeC,EAAAA,GAAmBD,IAAAA,SAAgBE,EAAAA,EAAqB,2BAEhFC,gBAJiC,WAK/B,MAAO,CACLC,oBAAgBC,IAIpBC,kBAViC,WAW/BC,EAAAA,EAAAA,YACAN,EAAAA,EAAAA,UAGFO,mBAfiC,WAgB1BC,KAAKC,cACRD,KAAKE,wBAITC,uBArBiC,SAqBVC,GACrBJ,KAAKK,SAAS,CAAEV,eAAgBS,EAAME,UAGxCC,UAzBiC,SAyBvBC,GACRC,EAAAA,EAAAA,QAAgBD,IAGlBN,qBA7BiC,WA8B/B,MAAoEF,KAAKI,MAAzE,IAAQM,YAAeC,EAAvB,EAAuBA,UAAWC,EAAlC,EAAkCA,YAAejB,EAAjD,EAAiDA,eAG7CkB,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,SAGjBd,WAvDiC,WAwD/B,MAAwCD,KAAKI,MAArCM,EAAR,EAAQA,YAAaf,EAArB,EAAqBA,eAErB,OAAQe,IAAgBf,GAG1B0B,OA7DiC,WA8D/B,OAAO,gBAAC,KAAD,U,2IClEEvB,GAAwBwB,EAAAA,EAAAA,IACnC,uBACA,kBAAM/B,IAAAA,cAAqB,CACzBgC,UAAW,CAAEC,aAAa,GAC1BC,QAAS,CAAED,aAAa,QAIf/B,GAAsBiC,EAAAA,EAAAA,IACjC,uBACA,kBAAMnC,IAAAA,YAAmB,CACvBoC,YAAa,CAAC7B,GACd8B,UAAW,yBACXtB,YAAQV,EAERiC,KALuB,WAMrB7B,KAAKuB,aAGP7B,gBATuB,WAUrB,MAAO,CAAEY,OAAQN,KAAKM,SAGxBwB,IAbuB,WAcrB,OAAO9B,KAAKM,QAGdiB,UAjBuB,WAiBX,WACJQ,GAAUC,EAAAA,EAAAA,IAAM,MAAOC,EAAAA,GAAoBjC,KAAK4B,YAEtDG,EACGG,MACC,SAACC,GAIC,OAHA,EAAK7B,OAAS6B,EACd,EAAKC,QAAQ,CAAE9B,OAAQ,EAAKA,SAErB6B,KAET,SAACE,GAAD,OAAWC,QAAQD,MAAMA,MAG7BvC,EAAsByB,UAAUQ,QAAQA,IAG1CN,QAlCuB,WAkCb,WACFM,GAAUC,EAAAA,EAAAA,IAAM,OAAQC,EAAAA,GAAA,UAAuBjC,KAAK4B,UAA5B,aAAkD,MAEhFG,EACGG,MACC,SAACC,GAGC,OAFA,EAAKZ,YAEEY,KAET,SAACE,GACCE,EAAAA,EAAAA,MAAA,+DAA+EF,GAC7E,8BAIRvC,EAAsB2B,QAAQM,QAAQA","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":""}