From be4e366215eb67739b48d5336715edda535ec0df Mon Sep 17 00:00:00 2001 From: Billy Vong Date: Mon, 22 Jul 2019 12:03:01 -0700 Subject: [PATCH 1/3] feat(ui): Add basic templates for Incident Rules in settings This just adds some placeholder views, routes, and tests for the new Incident Rules feature. These will change as we develop the feature. --- .../app/components/charts/baseChart.jsx | 2 +- src/sentry/static/sentry/app/routes.jsx | 33 + .../organization/navigationConfiguration.jsx | 11 +- .../organizationIncidentRules/create.jsx | 1452 +++++++++++++++++ .../organizationIncidentRules/details.jsx | 34 + .../organizationIncidentRules/index.jsx | 11 + .../organizationIncidentRules/list.jsx | 54 + .../organizationIncidentRules/create.spec.jsx | 18 + .../details.spec.jsx | 18 + .../organizationIncidentRules/list.spec.jsx | 18 + 10 files changed, 1648 insertions(+), 3 deletions(-) create mode 100644 src/sentry/static/sentry/app/views/settings/organizationIncidentRules/create.jsx create mode 100644 src/sentry/static/sentry/app/views/settings/organizationIncidentRules/details.jsx create mode 100644 src/sentry/static/sentry/app/views/settings/organizationIncidentRules/index.jsx create mode 100644 src/sentry/static/sentry/app/views/settings/organizationIncidentRules/list.jsx create mode 100644 tests/js/spec/views/settings/organizationIncidentRules/create.spec.jsx create mode 100644 tests/js/spec/views/settings/organizationIncidentRules/details.spec.jsx create mode 100644 tests/js/spec/views/settings/organizationIncidentRules/list.spec.jsx diff --git a/src/sentry/static/sentry/app/components/charts/baseChart.jsx b/src/sentry/static/sentry/app/components/charts/baseChart.jsx index 0482e8ea123f..0c57d2747fb2 100644 --- a/src/sentry/static/sentry/app/components/charts/baseChart.jsx +++ b/src/sentry/static/sentry/app/components/charts/baseChart.jsx @@ -108,7 +108,7 @@ class BaseChart extends React.Component { onFinished: PropTypes.func, // Forwarded Ref - forwardedRef: PropTypes.object, + forwardedRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), // Custom chart props that are implemented by us (and not a feature of eCharts) /** diff --git a/src/sentry/static/sentry/app/routes.jsx b/src/sentry/static/sentry/app/routes.jsx index ca47744b1788..c040f4b9c874 100644 --- a/src/sentry/static/sentry/app/routes.jsx +++ b/src/sentry/static/sentry/app/routes.jsx @@ -603,6 +603,7 @@ function routes() { component={errorHandler(LazyLoad)} /> + @@ -627,6 +628,38 @@ function routes() { component={errorHandler(LazyLoad)} /> + + + import(/* webpackChunkName: "OrganizationIncidentRules" */ 'app/views/settings/organizationIncidentRules') + } + component={errorHandler(LazyLoad)} + > + + import(/* webpackChunkName: "IncidentRulesList" */ 'app/views/settings/organizationIncidentRules/list') + } + component={errorHandler(LazyLoad)} + /> + + import(/* webpackChunkName: "IncidentRulesCreate" */ 'app/views/settings/organizationIncidentRules/create') + } + component={errorHandler(LazyLoad)} + /> + + import(/* webpackChunkName: "IncidentRulesDetails" */ 'app/views/settings/organizationIncidentRules/details') + } + component={errorHandler(LazyLoad)} + /> + ); diff --git a/src/sentry/static/sentry/app/views/settings/organization/navigationConfiguration.jsx b/src/sentry/static/sentry/app/views/settings/organization/navigationConfiguration.jsx index 4dbe977b621c..34d654111557 100644 --- a/src/sentry/static/sentry/app/views/settings/organization/navigationConfiguration.jsx +++ b/src/sentry/static/sentry/app/views/settings/organization/navigationConfiguration.jsx @@ -29,7 +29,7 @@ const organizationNavigation = [ path: `${pathPrefix}/members/`, title: t('Members'), // eslint-disable-next-line no-shadow - badge: ({organization, access, features}) => { + badge: ({organization, access}) => { if (!access.has('org:write')) { return null; } @@ -76,6 +76,13 @@ const organizationNavigation = [ description: t('Manage repositories connected to the organization'), id: 'repos', }, + { + path: `${pathPrefix}/incident-rules/`, + title: t('Incident Rules'), + show: ({features}) => features.has('incidents'), + description: t('Manage Incident Rules'), + id: 'incident-rules', + }, { path: `${pathPrefix}/integrations/`, title: t('Integrations'), @@ -87,7 +94,7 @@ const organizationNavigation = [ { path: `${pathPrefix}/developer-settings/`, title: t('Developer Settings'), - show: ({access, features}) => features.has('sentry-apps'), + show: ({features}) => features.has('sentry-apps'), description: t('Manage developer applications'), id: 'developer-settings', }, diff --git a/src/sentry/static/sentry/app/views/settings/organizationIncidentRules/create.jsx b/src/sentry/static/sentry/app/views/settings/organizationIncidentRules/create.jsx new file mode 100644 index 000000000000..f815978a9d75 --- /dev/null +++ b/src/sentry/static/sentry/app/views/settings/organizationIncidentRules/create.jsx @@ -0,0 +1,1452 @@ +import React from 'react'; + +import {t} from 'app/locale'; +import Form from 'app/views/settings/components/forms/form'; +import Graphic from 'app/components/charts/components/graphic'; +import JsonForm from 'app/views/settings/components/forms/jsonForm'; +import LineChart from 'app/components/charts/lineChart'; +import SettingsPageHeader from 'app/views/settings/components/settingsPageHeader'; + +const data = [ + [1560895200, []], + [1560897000, []], + [1560898800, []], + [1560900600, []], + [1560902400, []], + [1560904200, []], + [1560906000, []], + [1560907800, []], + [1560909600, []], + [1560911400, []], + [1560913200, []], + [1560915000, []], + [1560916800, []], + [1560918600, []], + [1560920400, []], + [1560922200, []], + [1560924000, []], + [1560925800, []], + [1560927600, []], + [1560929400, []], + [1560931200, []], + [1560933000, []], + [1560934800, []], + [1560936600, []], + [1560938400, []], + [1560940200, []], + [1560942000, []], + [1560943800, []], + [1560945600, []], + [1560947400, []], + [1560949200, []], + [1560951000, []], + [1560952800, []], + [1560954600, []], + [1560956400, []], + [1560958200, []], + [1560960000, []], + [1560961800, []], + [1560963600, []], + [1560965400, []], + [1560967200, []], + [1560969000, []], + [1560970800, []], + [1560972600, []], + [1560974400, []], + [1560976200, []], + [1560978000, []], + [1560979800, []], + [1560981600, []], + [1560983400, []], + [1560985200, []], + [1560987000, []], + [1560988800, []], + [1560990600, []], + [1560992400, []], + [1560994200, []], + [1560996000, []], + [1560997800, []], + [1560999600, []], + [1561001400, []], + [1561003200, []], + [1561005000, []], + [1561006800, []], + [1561008600, []], + [1561010400, []], + [1561012200, []], + [1561014000, []], + [1561015800, []], + [1561017600, []], + [1561019400, []], + [1561021200, []], + [1561023000, []], + [1561024800, []], + [1561026600, []], + [1561028400, []], + [1561030200, []], + [1561032000, []], + [1561033800, []], + [1561035600, []], + [1561037400, []], + [1561039200, []], + [1561041000, []], + [1561042800, []], + [1561044600, []], + [1561046400, []], + [1561048200, []], + [1561050000, []], + [1561051800, []], + [1561053600, []], + [1561055400, []], + [1561057200, []], + [1561059000, []], + [1561060800, []], + [1561062600, []], + [1561064400, []], + [1561066200, []], + [1561068000, []], + [1561069800, []], + [1561071600, []], + [1561073400, []], + [1561075200, []], + [1561077000, []], + [1561078800, []], + [1561080600, []], + [1561082400, []], + [1561084200, []], + [1561086000, []], + [1561087800, []], + [1561089600, []], + [1561091400, []], + [1561093200, []], + [1561095000, []], + [1561096800, []], + [1561098600, []], + [1561100400, []], + [1561102200, []], + [1561104000, []], + [1561105800, []], + [1561107600, []], + [1561109400, []], + [1561111200, []], + [1561113000, []], + [1561114800, []], + [1561116600, []], + [1561118400, []], + [1561120200, []], + [1561122000, []], + [1561123800, []], + [1561125600, []], + [1561127400, []], + [1561129200, []], + [1561131000, []], + [1561132800, []], + [1561134600, []], + [1561136400, []], + [1561138200, []], + [1561140000, []], + [1561141800, []], + [1561143600, []], + [1561145400, []], + [1561147200, []], + [1561149000, []], + [1561150800, []], + [1561152600, []], + [1561154400, []], + [1561156200, []], + [1561158000, []], + [1561159800, []], + [1561161600, []], + [1561163400, []], + [1561165200, []], + [1561167000, []], + [1561168800, []], + [1561170600, []], + [1561172400, []], + [1561174200, []], + [1561176000, []], + [1561177800, []], + [1561179600, []], + [1561181400, []], + [1561183200, []], + [1561185000, []], + [1561186800, []], + [1561188600, []], + [1561190400, []], + [1561192200, []], + [1561194000, []], + [1561195800, []], + [1561197600, []], + [1561199400, []], + [1561201200, []], + [1561203000, []], + [1561204800, []], + [1561206600, []], + [1561208400, []], + [1561210200, []], + [1561212000, []], + [1561213800, []], + [1561215600, []], + [1561217400, []], + [1561219200, []], + [1561221000, []], + [1561222800, []], + [1561224600, []], + [1561226400, []], + [1561228200, []], + [1561230000, []], + [1561231800, []], + [1561233600, []], + [1561235400, []], + [1561237200, []], + [1561239000, []], + [1561240800, []], + [1561242600, []], + [1561244400, []], + [1561246200, []], + [1561248000, []], + [1561249800, []], + [1561251600, []], + [1561253400, []], + [1561255200, []], + [1561257000, []], + [1561258800, []], + [1561260600, []], + [1561262400, []], + [1561264200, []], + [1561266000, []], + [1561267800, []], + [1561269600, []], + [1561271400, []], + [1561273200, []], + [1561275000, []], + [1561276800, []], + [1561278600, []], + [1561280400, []], + [1561282200, []], + [1561284000, []], + [1561285800, []], + [1561287600, []], + [1561289400, []], + [1561291200, []], + [1561293000, []], + [1561294800, []], + [1561296600, []], + [1561298400, []], + [1561300200, []], + [1561302000, []], + [1561303800, []], + [1561305600, []], + [1561307400, []], + [1561309200, []], + [1561311000, []], + [1561312800, []], + [1561314600, []], + [1561316400, []], + [1561318200, []], + [1561320000, []], + [1561321800, []], + [1561323600, []], + [1561325400, []], + [1561327200, []], + [1561329000, []], + [1561330800, []], + [1561332600, []], + [1561334400, []], + [1561336200, []], + [1561338000, []], + [1561339800, []], + [1561341600, []], + [1561343400, []], + [1561345200, []], + [1561347000, []], + [1561348800, []], + [1561350600, []], + [1561352400, []], + [1561354200, []], + [1561356000, []], + [1561357800, []], + [1561359600, []], + [1561361400, []], + [1561363200, []], + [1561365000, []], + [1561366800, []], + [1561368600, []], + [1561370400, []], + [1561372200, []], + [1561374000, []], + [1561375800, []], + [1561377600, []], + [1561379400, []], + [1561381200, []], + [1561383000, []], + [1561384800, []], + [1561386600, []], + [1561388400, []], + [1561390200, []], + [1561392000, []], + [1561393800, []], + [1561395600, []], + [1561397400, []], + [1561399200, []], + [1561401000, []], + [1561402800, []], + [1561404600, []], + [1561406400, []], + [1561408200, []], + [1561410000, []], + [1561411800, []], + [1561413600, []], + [1561415400, []], + [1561417200, []], + [1561419000, []], + [1561420800, []], + [1561422600, []], + [1561424400, []], + [1561426200, []], + [1561428000, []], + [1561429800, []], + [1561431600, []], + [1561433400, []], + [1561435200, []], + [1561437000, []], + [1561438800, []], + [1561440600, []], + [1561442400, []], + [1561444200, []], + [1561446000, []], + [1561447800, []], + [1561449600, []], + [1561451400, []], + [1561453200, []], + [1561455000, []], + [1561456800, []], + [1561458600, []], + [1561460400, []], + [1561462200, []], + [1561464000, []], + [1561465800, []], + [1561467600, []], + [1561469400, []], + [1561471200, []], + [1561473000, []], + [1561474800, []], + [1561476600, []], + [1561478400, []], + [1561480200, []], + [1561482000, []], + [1561483800, []], + [1561485600, []], + [1561487400, []], + [1561489200, []], + [1561491000, []], + [1561492800, []], + [1561494600, []], + [1561496400, []], + [1561498200, []], + [1561500000, []], + [1561501800, []], + [1561503600, []], + [1561505400, []], + [1561507200, []], + [1561509000, []], + [1561510800, []], + [1561512600, []], + [1561514400, []], + [1561516200, []], + [1561518000, []], + [1561519800, []], + [1561521600, []], + [1561523400, []], + [1561525200, []], + [1561527000, []], + [1561528800, []], + [1561530600, []], + [1561532400, []], + [1561534200, []], + [1561536000, []], + [1561537800, []], + [1561539600, []], + [1561541400, []], + [1561543200, []], + [1561545000, []], + [1561546800, []], + [1561548600, []], + [1561550400, []], + [1561552200, []], + [1561554000, []], + [1561555800, []], + [1561557600, []], + [1561559400, []], + [1561561200, []], + [1561563000, []], + [1561564800, []], + [1561566600, []], + [1561568400, []], + [1561570200, []], + [1561572000, []], + [1561573800, []], + [1561575600, []], + [1561577400, []], + [1561579200, []], + [1561581000, []], + [1561582800, []], + [1561584600, []], + [1561586400, []], + [1561588200, []], + [1561590000, []], + [1561591800, []], + [1561593600, []], + [1561595400, []], + [1561597200, []], + [1561599000, []], + [1561600800, []], + [1561602600, []], + [1561604400, []], + [1561606200, []], + [1561608000, []], + [1561609800, []], + [1561611600, []], + [1561613400, []], + [1561615200, []], + [1561617000, []], + [1561618800, []], + [1561620600, []], + [1561622400, []], + [1561624200, []], + [1561626000, []], + [1561627800, []], + [1561629600, []], + [1561631400, []], + [1561633200, []], + [1561635000, []], + [1561636800, []], + [1561638600, []], + [1561640400, []], + [1561642200, []], + [1561644000, []], + [1561645800, []], + [1561647600, []], + [1561649400, []], + [1561651200, []], + [1561653000, []], + [1561654800, []], + [1561656600, []], + [1561658400, []], + [1561660200, []], + [1561662000, []], + [1561663800, []], + [1561665600, []], + [1561667400, []], + [1561669200, []], + [1561671000, []], + [1561672800, []], + [1561674600, []], + [1561676400, []], + [1561678200, []], + [1561680000, []], + [1561681800, []], + [1561683600, []], + [1561685400, []], + [1561687200, []], + [1561689000, []], + [1561690800, []], + [1561692600, []], + [1561694400, []], + [1561696200, []], + [1561698000, []], + [1561699800, []], + [1561701600, []], + [1561703400, []], + [1561705200, []], + [1561707000, []], + [1561708800, []], + [1561710600, []], + [1561712400, []], + [1561714200, []], + [1561716000, []], + [1561717800, []], + [1561719600, []], + [1561721400, []], + [1561723200, []], + [1561725000, []], + [1561726800, []], + [1561728600, []], + [1561730400, []], + [1561732200, []], + [1561734000, []], + [1561735800, []], + [1561737600, []], + [1561739400, []], + [1561741200, []], + [1561743000, []], + [1561744800, []], + [1561746600, []], + [1561748400, []], + [1561750200, []], + [1561752000, []], + [1561753800, []], + [1561755600, []], + [1561757400, []], + [1561759200, []], + [1561761000, []], + [1561762800, []], + [1561764600, []], + [1561766400, []], + [1561768200, []], + [1561770000, []], + [1561771800, []], + [1561773600, []], + [1561775400, []], + [1561777200, []], + [1561779000, []], + [1561780800, []], + [1561782600, []], + [1561784400, []], + [1561786200, []], + [1561788000, []], + [1561789800, []], + [1561791600, []], + [1561793400, []], + [1561795200, []], + [1561797000, []], + [1561798800, []], + [1561800600, []], + [1561802400, []], + [1561804200, []], + [1561806000, []], + [1561807800, []], + [1561809600, []], + [1561811400, []], + [1561813200, []], + [1561815000, []], + [1561816800, []], + [1561818600, []], + [1561820400, []], + [1561822200, []], + [1561824000, []], + [1561825800, []], + [1561827600, []], + [1561829400, []], + [1561831200, []], + [1561833000, []], + [1561834800, []], + [1561836600, []], + [1561838400, []], + [1561840200, []], + [1561842000, []], + [1561843800, []], + [1561845600, []], + [1561847400, []], + [1561849200, []], + [1561851000, []], + [1561852800, []], + [1561854600, []], + [1561856400, []], + [1561858200, []], + [1561860000, []], + [1561861800, []], + [1561863600, []], + [1561865400, []], + [1561867200, []], + [1561869000, []], + [1561870800, []], + [1561872600, []], + [1561874400, []], + [1561876200, []], + [1561878000, []], + [1561879800, []], + [1561881600, []], + [1561883400, []], + [1561885200, []], + [1561887000, []], + [1561888800, []], + [1561890600, []], + [1561892400, []], + [1561894200, []], + [1561896000, []], + [1561897800, []], + [1561899600, []], + [1561901400, []], + [1561903200, []], + [1561905000, []], + [1561906800, []], + [1561908600, []], + [1561910400, []], + [1561912200, []], + [1561914000, []], + [1561915800, []], + [1561917600, []], + [1561919400, []], + [1561921200, []], + [1561923000, []], + [1561924800, []], + [1561926600, []], + [1561928400, []], + [1561930200, []], + [1561932000, []], + [1561933800, []], + [1561935600, []], + [1561937400, []], + [1561939200, []], + [1561941000, []], + [1561942800, []], + [1561944600, []], + [1561946400, []], + [1561948200, []], + [1561950000, []], + [1561951800, []], + [1561953600, []], + [1561955400, []], + [1561957200, []], + [1561959000, []], + [1561960800, []], + [1561962600, []], + [1561964400, []], + [1561966200, []], + [1561968000, []], + [1561969800, []], + [1561971600, []], + [1561973400, []], + [1561975200, []], + [1561977000, []], + [1561978800, []], + [1561980600, []], + [1561982400, []], + [1561984200, []], + [1561986000, []], + [1561987800, []], + [1561989600, []], + [1561991400, []], + [1561993200, []], + [1561995000, []], + [1561996800, []], + [1561998600, []], + [1562000400, []], + [1562002200, []], + [1562004000, []], + [1562005800, []], + [1562007600, []], + [1562009400, []], + [1562011200, []], + [1562013000, []], + [1562014800, []], + [1562016600, []], + [1562018400, []], + [1562020200, []], + [1562022000, []], + [1562023800, []], + [1562025600, []], + [1562027400, []], + [1562029200, []], + [1562031000, []], + [1562032800, []], + [1562034600, []], + [1562036400, []], + [1562038200, []], + [1562040000, []], + [1562041800, []], + [1562043600, []], + [1562045400, []], + [1562047200, []], + [1562049000, []], + [1562050800, []], + [1562052600, []], + [1562054400, []], + [1562056200, []], + [1562058000, []], + [1562059800, []], + [1562061600, []], + [1562063400, []], + [1562065200, []], + [1562067000, []], + [1562068800, []], + [1562070600, []], + [1562072400, []], + [1562074200, []], + [1562076000, []], + [1562077800, []], + [1562079600, []], + [1562081400, []], + [1562083200, []], + [1562085000, []], + [1562086800, []], + [1562088600, []], + [1562090400, []], + [1562092200, []], + [1562094000, []], + [1562095800, [{count: 30}]], + [1562097600, []], + [1562099400, []], + [1562101200, []], + [1562103000, []], + [1562104800, []], + [1562106600, []], + [1562108400, []], + [1562110200, []], + [1562112000, []], + [1562113800, []], + [1562115600, []], + [1562117400, []], + [1562119200, []], + [1562121000, []], + [1562122800, []], + [1562124600, []], + [1562126400, []], + [1562128200, []], + [1562130000, []], + [1562131800, []], + [1562133600, []], + [1562135400, []], + [1562137200, []], + [1562139000, []], + [1562140800, []], + [1562142600, []], + [1562144400, []], + [1562146200, []], + [1562148000, []], + [1562149800, []], + [1562151600, []], + [1562153400, []], + [1562155200, []], + [1562157000, []], + [1562158800, []], + [1562160600, []], + [1562162400, []], + [1562164200, []], + [1562166000, []], + [1562167800, []], + [1562169600, []], + [1562171400, []], + [1562173200, []], + [1562175000, []], + [1562176800, []], + [1562178600, []], + [1562180400, []], + [1562182200, []], + [1562184000, []], + [1562185800, []], + [1562187600, []], + [1562189400, []], + [1562191200, []], + [1562193000, []], + [1562194800, []], + [1562196600, []], + [1562198400, []], + [1562200200, []], + [1562202000, []], + [1562203800, []], + [1562205600, []], + [1562207400, []], + [1562209200, []], + [1562211000, []], + [1562212800, []], + [1562214600, []], + [1562216400, []], + [1562218200, []], + [1562220000, []], + [1562221800, []], + [1562223600, []], + [1562225400, []], + [1562227200, []], + [1562229000, []], + [1562230800, []], + [1562232600, []], + [1562234400, []], + [1562236200, []], + [1562238000, []], + [1562239800, []], + [1562241600, []], + [1562243400, []], + [1562245200, []], + [1562247000, []], + [1562248800, []], + [1562250600, []], + [1562252400, []], + [1562254200, []], + [1562256000, []], + [1562257800, []], + [1562259600, []], + [1562261400, []], + [1562263200, []], + [1562265000, []], + [1562266800, []], + [1562268600, []], + [1562270400, []], + [1562272200, []], + [1562274000, []], + [1562275800, []], + [1562277600, []], + [1562279400, []], + [1562281200, []], + [1562283000, []], + [1562284800, []], + [1562286600, []], + [1562288400, []], + [1562290200, []], + [1562292000, []], + [1562293800, []], + [1562295600, []], + [1562297400, []], + [1562299200, []], + [1562301000, []], + [1562302800, []], + [1562304600, []], + [1562306400, []], + [1562308200, []], + [1562310000, []], + [1562311800, []], + [1562313600, []], + [1562315400, []], + [1562317200, []], + [1562319000, []], + [1562320800, []], + [1562322600, []], + [1562324400, []], + [1562326200, []], + [1562328000, []], + [1562329800, []], + [1562331600, []], + [1562333400, []], + [1562335200, []], + [1562337000, []], + [1562338800, []], + [1562340600, []], + [1562342400, []], + [1562344200, []], + [1562346000, []], + [1562347800, []], + [1562349600, []], + [1562351400, []], + [1562353200, []], + [1562355000, []], + [1562356800, []], + [1562358600, []], + [1562360400, []], + [1562362200, []], + [1562364000, []], + [1562365800, []], + [1562367600, []], + [1562369400, []], + [1562371200, []], + [1562373000, []], + [1562374800, []], + [1562376600, []], + [1562378400, []], + [1562380200, []], + [1562382000, []], + [1562383800, []], + [1562385600, []], + [1562387400, []], + [1562389200, []], + [1562391000, []], + [1562392800, []], + [1562394600, []], + [1562396400, []], + [1562398200, []], + [1562400000, []], + [1562401800, []], + [1562403600, []], + [1562405400, []], + [1562407200, []], + [1562409000, []], + [1562410800, []], + [1562412600, []], + [1562414400, []], + [1562416200, []], + [1562418000, []], + [1562419800, []], + [1562421600, []], + [1562423400, []], + [1562425200, []], + [1562427000, []], + [1562428800, []], + [1562430600, []], + [1562432400, []], + [1562434200, []], + [1562436000, []], + [1562437800, []], + [1562439600, []], + [1562441400, []], + [1562443200, []], + [1562445000, []], + [1562446800, []], + [1562448600, []], + [1562450400, []], + [1562452200, []], + [1562454000, []], + [1562455800, []], + [1562457600, []], + [1562459400, []], + [1562461200, []], + [1562463000, []], + [1562464800, []], + [1562466600, []], + [1562468400, []], + [1562470200, []], + [1562472000, []], + [1562473800, []], + [1562475600, []], + [1562477400, []], + [1562479200, []], + [1562481000, []], + [1562482800, []], + [1562484600, []], + [1562486400, []], + [1562488200, []], + [1562490000, []], + [1562491800, []], + [1562493600, []], + [1562495400, []], + [1562497200, []], + [1562499000, []], + [1562500800, []], + [1562502600, []], + [1562504400, []], + [1562506200, []], + [1562508000, []], + [1562509800, []], + [1562511600, []], + [1562513400, []], + [1562515200, []], + [1562517000, []], + [1562518800, []], + [1562520600, []], + [1562522400, []], + [1562524200, []], + [1562526000, []], + [1562527800, []], + [1562529600, []], + [1562531400, []], + [1562533200, []], + [1562535000, []], + [1562536800, []], + [1562538600, []], + [1562540400, []], + [1562542200, []], + [1562544000, []], + [1562545800, []], + [1562547600, []], + [1562549400, []], + [1562551200, []], + [1562553000, []], + [1562554800, []], + [1562556600, []], + [1562558400, []], + [1562560200, []], + [1562562000, []], + [1562563800, []], + [1562565600, []], + [1562567400, []], + [1562569200, []], + [1562571000, []], + [1562572800, []], + [1562574600, []], + [1562576400, []], + [1562578200, []], + [1562580000, []], + [1562581800, []], + [1562583600, []], + [1562585400, []], + [1562587200, []], + [1562589000, []], + [1562590800, []], + [1562592600, []], + [1562594400, []], + [1562596200, []], + [1562598000, []], + [1562599800, []], + [1562601600, []], + [1562603400, []], + [1562605200, []], + [1562607000, []], + [1562608800, []], + [1562610600, []], + [1562612400, []], + [1562614200, []], + [1562616000, []], + [1562617800, []], + [1562619600, []], + [1562621400, []], + [1562623200, []], + [1562625000, []], + [1562626800, []], + [1562628600, []], + [1562630400, []], + [1562632200, []], + [1562634000, []], + [1562635800, []], + [1562637600, []], + [1562639400, []], + [1562641200, []], + [1562643000, []], + [1562644800, []], + [1562646600, []], + [1562648400, []], + [1562650200, []], + [1562652000, []], + [1562653800, []], + [1562655600, []], + [1562657400, []], + [1562659200, []], + [1562661000, []], + [1562662800, []], + [1562664600, []], + [1562666400, []], + [1562668200, []], + [1562670000, []], + [1562671800, []], + [1562673600, []], + [1562675400, []], + [1562677200, []], + [1562679000, []], + [1562680800, []], + [1562682600, []], + [1562684400, []], + [1562686200, []], + [1562688000, []], + [1562689800, []], + [1562691600, []], + [1562693400, []], + [1562695200, []], + [1562697000, []], + [1562698800, []], + [1562700600, []], + [1562702400, []], + [1562704200, []], + [1562706000, []], + [1562707800, []], + [1562709600, []], + [1562711400, []], + [1562713200, []], + [1562715000, []], + [1562716800, []], + [1562718600, []], + [1562720400, []], + [1562722200, []], + [1562724000, []], + [1562725800, []], + [1562727600, []], + [1562729400, []], + [1562731200, []], + [1562733000, []], + [1562734800, []], + [1562736600, []], + [1562738400, []], + [1562740200, []], + [1562742000, []], + [1562743800, []], + [1562745600, []], + [1562747400, []], + [1562749200, []], + [1562751000, []], + [1562752800, []], + [1562754600, []], + [1562756400, []], + [1562758200, []], + [1562760000, []], + [1562761800, []], + [1562763600, []], + [1562765400, []], + [1562767200, []], + [1562769000, []], + [1562770800, []], + [1562772600, []], + [1562774400, []], + [1562776200, []], + [1562778000, []], + [1562779800, []], + [1562781600, []], + [1562783400, []], + [1562785200, []], + [1562787000, []], + [1562788800, []], + [1562790600, []], + [1562792400, []], + [1562794200, []], + [1562796000, []], + [1562797800, []], + [1562799600, []], + [1562801400, []], + [1562803200, []], + [1562805000, []], + [1562806800, []], + [1562808600, []], + [1562810400, []], + [1562812200, []], + [1562814000, []], + [1562815800, []], + [1562817600, []], + [1562819400, []], + [1562821200, []], + [1562823000, []], + [1562824800, []], + [1562826600, []], + [1562828400, []], + [1562830200, []], + [1562832000, []], + [1562833800, []], + [1562835600, []], + [1562837400, []], + [1562839200, []], + [1562841000, []], + [1562842800, []], + [1562844600, []], + [1562846400, []], + [1562848200, []], + [1562850000, []], + [1562851800, []], + [1562853600, []], + [1562855400, []], + [1562857200, []], + [1562859000, []], + [1562860800, []], + [1562862600, []], + [1562864400, []], + [1562866200, []], + [1562868000, []], + [1562869800, []], + [1562871600, []], + [1562873400, []], + [1562875200, []], + [1562877000, []], + [1562878800, []], + [1562880600, []], + [1562882400, []], + [1562884200, []], + [1562886000, []], + [1562887800, []], + [1562889600, []], + [1562891400, []], + [1562893200, []], + [1562895000, []], + [1562896800, []], + [1562898600, []], + [1562900400, []], + [1562902200, []], + [1562904000, []], + [1562905800, []], + [1562907600, []], + [1562909400, []], + [1562911200, []], + [1562913000, []], + [1562914800, []], + [1562916600, []], + [1562918400, []], + [1562920200, []], + [1562922000, []], + [1562923800, []], + [1562925600, []], + [1562927400, []], + [1562929200, []], + [1562931000, []], + [1562932800, []], + [1562934600, []], + [1562936400, []], + [1562938200, []], + [1562940000, []], + [1562941800, []], + [1562943600, []], + [1562945400, []], + [1562947200, []], + [1562949000, []], + [1562950800, []], + [1562952600, []], + [1562954400, []], + [1562956200, []], + [1562958000, []], + [1562959800, []], + [1562961600, []], + [1562963400, []], + [1562965200, []], + [1562967000, []], + [1562968800, []], + [1562970600, []], + [1562972400, []], + [1562974200, []], + [1562976000, []], + [1562977800, []], + [1562979600, []], + [1562981400, []], + [1562983200, []], + [1562985000, []], + [1562986800, []], + [1562988600, []], + [1562990400, []], + [1562992200, []], + [1562994000, []], + [1562995800, []], + [1562997600, []], + [1562999400, []], + [1563001200, []], + [1563003000, []], + [1563004800, []], + [1563006600, []], + [1563008400, []], + [1563010200, []], + [1563012000, []], + [1563013800, []], + [1563015600, []], + [1563017400, []], + [1563019200, []], + [1563021000, []], + [1563022800, []], + [1563024600, []], + [1563026400, []], + [1563028200, []], + [1563030000, []], + [1563031800, []], + [1563033600, []], + [1563035400, []], + [1563037200, []], + [1563039000, []], + [1563040800, []], + [1563042600, []], + [1563044400, []], + [1563046200, []], + [1563048000, []], + [1563049800, []], + [1563051600, []], + [1563053400, []], + [1563055200, []], + [1563057000, []], + [1563058800, []], + [1563060600, []], + [1563062400, []], + [1563064200, []], + [1563066000, []], + [1563067800, []], + [1563069600, []], + [1563071400, []], + [1563073200, []], + [1563075000, []], + [1563076800, []], + [1563078600, []], + [1563080400, []], + [1563082200, []], + [1563084000, []], + [1563085800, []], + [1563087600, []], + [1563089400, []], + [1563091200, []], + [1563093000, []], + [1563094800, []], + [1563096600, []], + [1563098400, []], + [1563100200, []], + [1563102000, []], + [1563103800, []], + [1563105600, []], + [1563107400, []], + [1563109200, []], + [1563111000, []], + [1563112800, []], + [1563114600, []], + [1563116400, []], + [1563118200, []], + [1563120000, []], + [1563121800, []], + [1563123600, []], + [1563125400, []], + [1563127200, []], + [1563129000, []], + [1563130800, []], + [1563132600, []], + [1563134400, []], + [1563136200, []], + [1563138000, []], + [1563139800, []], + [1563141600, []], + [1563143400, []], + [1563145200, []], + [1563147000, []], + [1563148800, []], + [1563150600, []], + [1563152400, []], + [1563154200, []], + [1563156000, []], + [1563157800, []], + [1563159600, []], + [1563161400, []], + [1563163200, []], + [1563165000, []], + [1563166800, []], + [1563168600, []], + [1563170400, []], + [1563172200, []], + [1563174000, []], + [1563175800, []], + [1563177600, []], + [1563179400, []], + [1563181200, []], + [1563183000, []], + [1563184800, []], + [1563186600, []], + [1563188400, []], + [1563190200, []], + [1563192000, []], + [1563193800, []], + [1563195600, []], + [1563197400, []], + [1563199200, []], + [1563201000, []], + [1563202800, []], + [1563204600, []], + [1563206400, []], + [1563208200, []], + [1563210000, []], + [1563211800, []], + [1563213600, []], + [1563215400, []], + [1563217200, []], + [1563219000, []], + [1563220800, []], + [1563222600, []], + [1563224400, []], + [1563226200, [{count: 30}]], + [1563228000, []], + [1563229800, []], + [1563231600, []], + [1563233400, []], + [1563235200, []], + [1563237000, []], + [1563238800, []], + [1563240600, []], + [1563242400, []], + [1563244200, []], + [1563246000, []], + [1563247800, []], + [1563249600, []], + [1563251400, []], + [1563253200, []], + [1563255000, []], + [1563256800, []], + [1563258600, []], + [1563260400, []], + [1563262200, []], + [1563264000, []], + [1563265800, []], + [1563267600, []], + [1563269400, []], + [1563271200, []], + [1563273000, []], + [1563274800, []], + [1563276600, []], + [1563278400, []], + [1563280200, []], + [1563282000, []], + [1563283800, []], + [1563285600, []], + [1563287400, []], + [1563289200, []], + [1563291000, []], + [1563292800, []], + [1563294600, []], + [1563296400, []], + [1563298200, []], + [1563300000, []], + [1563301800, []], + [1563303600, []], + [1563305400, []], + [1563307200, []], + [1563309000, []], + [1563310800, []], + [1563312600, []], + [1563314400, []], + [1563316200, []], +]; +class IncidentRulesCreate extends React.Component { + state = { + width: null, + }; + + handleUpperBoundDrag = () => {}; + + handleLowerBoundDrag = () => {}; + + render() { + const {orgId} = this.props.params; + + return ( +
+ + { + if (e && typeof e.getEchartsInstance === 'function') { + const width = e.getEchartsInstance().getWidth(); + if (width !== this.state.width) { + this.setState({width}); + } + } + }} + graphic={Graphic({ + elements: [ + { + type: 'line', + draggable: true, + shape: {y1: 1, y2: 1, x1: 0, x2: this.state.width}, + ondrag: () => {}, + }, + ], + })} + series={[ + { + seriesName: 'Test', + dataArray: data.map(([ts, val]) => { + return [ + ts * 1000, + val.length + ? val.reduce((acc, {count} = {count: 0}) => acc + count, 0) + : 0, + ]; + }), + }, + ]} + /> +
+ + +
+ ); + } +} + +export default IncidentRulesCreate; diff --git a/src/sentry/static/sentry/app/views/settings/organizationIncidentRules/details.jsx b/src/sentry/static/sentry/app/views/settings/organizationIncidentRules/details.jsx new file mode 100644 index 000000000000..6d1d171c5679 --- /dev/null +++ b/src/sentry/static/sentry/app/views/settings/organizationIncidentRules/details.jsx @@ -0,0 +1,34 @@ +import React from 'react'; + +import AsyncView from 'app/views/asyncView'; +import {Panel, PanelBody, PanelHeader} from 'app/components/panels'; +import SentryTypes from 'app/sentryTypes'; +import SettingsPageHeader from 'app/views/settings/components/settingsPageHeader'; +import {t} from 'app/locale'; + +class IncidentRulesDetails extends AsyncView { + static propTypes = { + organization: SentryTypes.Organization.isRequired, + }; + + getEndpoints() { + return []; + // const {orgId, incidentRuleId} = this.props.params; + + // return [['rule', `/organizations/${orgId}/incident-rules/${ incidentRuleId }/`]]; + } + + renderBody() { + return ( +
+ + + {t('Rule')} + TODO + +
+ ); + } +} + +export default IncidentRulesDetails; diff --git a/src/sentry/static/sentry/app/views/settings/organizationIncidentRules/index.jsx b/src/sentry/static/sentry/app/views/settings/organizationIncidentRules/index.jsx new file mode 100644 index 000000000000..674eff4836d8 --- /dev/null +++ b/src/sentry/static/sentry/app/views/settings/organizationIncidentRules/index.jsx @@ -0,0 +1,11 @@ +import React from 'react'; + +import Feature from 'app/components/acl/feature'; + +export default function OrganizationIncidentRules({children}) { + return ( + + {children} + + ); +} diff --git a/src/sentry/static/sentry/app/views/settings/organizationIncidentRules/list.jsx b/src/sentry/static/sentry/app/views/settings/organizationIncidentRules/list.jsx new file mode 100644 index 000000000000..86e3afe134c1 --- /dev/null +++ b/src/sentry/static/sentry/app/views/settings/organizationIncidentRules/list.jsx @@ -0,0 +1,54 @@ +import React from 'react'; + +import AsyncView from 'app/views/asyncView'; +import Button from 'app/components/button'; +import EmptyMessage from 'app/views/settings/components/emptyMessage'; +import {Panel, PanelBody, PanelHeader} from 'app/components/panels'; +import SentryTypes from 'app/sentryTypes'; +import SettingsPageHeader from 'app/views/settings/components/settingsPageHeader'; +import {t} from 'app/locale'; + +class IncidentRulesList extends AsyncView { + static propTypes = { + organization: SentryTypes.Organization.isRequired, + }; + + getEndpoints() { + return []; + // const {orgId} = this.props.params; + + // return [['rules', `/organizations/${orgId}/incident-rules/`]]; + } + + renderBody() { + const {orgId} = this.props.params; + const action = ( + + ); + + const isEmpty = true; + + return ( +
+ + + {t('Rules')} + + {!isEmpty ? null : ( + {t('No Incident rules have been created yet.')} + )} + + +
+ ); + } +} + +export default IncidentRulesList; diff --git a/tests/js/spec/views/settings/organizationIncidentRules/create.spec.jsx b/tests/js/spec/views/settings/organizationIncidentRules/create.spec.jsx new file mode 100644 index 000000000000..0b2ae0118ec3 --- /dev/null +++ b/tests/js/spec/views/settings/organizationIncidentRules/create.spec.jsx @@ -0,0 +1,18 @@ +import {mount} from 'enzyme'; +import React from 'react'; + +import {initializeOrg} from 'app-test/helpers/initializeOrg'; +import IncidentRulesCreate from 'app/views/settings/organizationIncidentRules/create'; + +describe('Incident Rules Create', function() { + it('renders', function() { + const {organization, routerContext} = initializeOrg(); + mount( + , + routerContext + ); + }); +}); diff --git a/tests/js/spec/views/settings/organizationIncidentRules/details.spec.jsx b/tests/js/spec/views/settings/organizationIncidentRules/details.spec.jsx new file mode 100644 index 000000000000..563be4af61f1 --- /dev/null +++ b/tests/js/spec/views/settings/organizationIncidentRules/details.spec.jsx @@ -0,0 +1,18 @@ +import {mount} from 'enzyme'; +import React from 'react'; + +import {initializeOrg} from 'app-test/helpers/initializeOrg'; +import IncidentRulesDetails from 'app/views/settings/organizationIncidentRules/details'; + +describe('Incident Rules Details', function() { + it('renders', function() { + const {organization, routerContext} = initializeOrg(); + mount( + , + routerContext + ); + }); +}); diff --git a/tests/js/spec/views/settings/organizationIncidentRules/list.spec.jsx b/tests/js/spec/views/settings/organizationIncidentRules/list.spec.jsx new file mode 100644 index 000000000000..b337643bf574 --- /dev/null +++ b/tests/js/spec/views/settings/organizationIncidentRules/list.spec.jsx @@ -0,0 +1,18 @@ +import {mount} from 'enzyme'; +import React from 'react'; + +import {initializeOrg} from 'app-test/helpers/initializeOrg'; +import IncidentRulesList from 'app/views/settings/organizationIncidentRules/list'; + +describe('Incident Rules List', function() { + it('renders', function() { + const {organization, routerContext} = initializeOrg(); + mount( + , + routerContext + ); + }); +}); From 7bd0a1f7ee376bce18068a3e86a4a8abc490736c Mon Sep 17 00:00:00 2001 From: Billy Vong Date: Mon, 22 Jul 2019 18:02:10 -0700 Subject: [PATCH 2/3] remove test data --- .../organizationIncidentRules/create.jsx | 1375 +---------------- 1 file changed, 10 insertions(+), 1365 deletions(-) diff --git a/src/sentry/static/sentry/app/views/settings/organizationIncidentRules/create.jsx b/src/sentry/static/sentry/app/views/settings/organizationIncidentRules/create.jsx index f815978a9d75..7fcec04c077e 100644 --- a/src/sentry/static/sentry/app/views/settings/organizationIncidentRules/create.jsx +++ b/src/sentry/static/sentry/app/views/settings/organizationIncidentRules/create.jsx @@ -1,3 +1,4 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {t} from 'app/locale'; @@ -7,1362 +8,18 @@ import JsonForm from 'app/views/settings/components/forms/jsonForm'; import LineChart from 'app/components/charts/lineChart'; import SettingsPageHeader from 'app/views/settings/components/settingsPageHeader'; -const data = [ - [1560895200, []], - [1560897000, []], - [1560898800, []], - [1560900600, []], - [1560902400, []], - [1560904200, []], - [1560906000, []], - [1560907800, []], - [1560909600, []], - [1560911400, []], - [1560913200, []], - [1560915000, []], - [1560916800, []], - [1560918600, []], - [1560920400, []], - [1560922200, []], - [1560924000, []], - [1560925800, []], - [1560927600, []], - [1560929400, []], - [1560931200, []], - [1560933000, []], - [1560934800, []], - [1560936600, []], - [1560938400, []], - [1560940200, []], - [1560942000, []], - [1560943800, []], - [1560945600, []], - [1560947400, []], - [1560949200, []], - [1560951000, []], - [1560952800, []], - [1560954600, []], - [1560956400, []], - [1560958200, []], - [1560960000, []], - [1560961800, []], - [1560963600, []], - [1560965400, []], - [1560967200, []], - [1560969000, []], - [1560970800, []], - [1560972600, []], - [1560974400, []], - [1560976200, []], - [1560978000, []], - [1560979800, []], - [1560981600, []], - [1560983400, []], - [1560985200, []], - [1560987000, []], - [1560988800, []], - [1560990600, []], - [1560992400, []], - [1560994200, []], - [1560996000, []], - [1560997800, []], - [1560999600, []], - [1561001400, []], - [1561003200, []], - [1561005000, []], - [1561006800, []], - [1561008600, []], - [1561010400, []], - [1561012200, []], - [1561014000, []], - [1561015800, []], - [1561017600, []], - [1561019400, []], - [1561021200, []], - [1561023000, []], - [1561024800, []], - [1561026600, []], - [1561028400, []], - [1561030200, []], - [1561032000, []], - [1561033800, []], - [1561035600, []], - [1561037400, []], - [1561039200, []], - [1561041000, []], - [1561042800, []], - [1561044600, []], - [1561046400, []], - [1561048200, []], - [1561050000, []], - [1561051800, []], - [1561053600, []], - [1561055400, []], - [1561057200, []], - [1561059000, []], - [1561060800, []], - [1561062600, []], - [1561064400, []], - [1561066200, []], - [1561068000, []], - [1561069800, []], - [1561071600, []], - [1561073400, []], - [1561075200, []], - [1561077000, []], - [1561078800, []], - [1561080600, []], - [1561082400, []], - [1561084200, []], - [1561086000, []], - [1561087800, []], - [1561089600, []], - [1561091400, []], - [1561093200, []], - [1561095000, []], - [1561096800, []], - [1561098600, []], - [1561100400, []], - [1561102200, []], - [1561104000, []], - [1561105800, []], - [1561107600, []], - [1561109400, []], - [1561111200, []], - [1561113000, []], - [1561114800, []], - [1561116600, []], - [1561118400, []], - [1561120200, []], - [1561122000, []], - [1561123800, []], - [1561125600, []], - [1561127400, []], - [1561129200, []], - [1561131000, []], - [1561132800, []], - [1561134600, []], - [1561136400, []], - [1561138200, []], - [1561140000, []], - [1561141800, []], - [1561143600, []], - [1561145400, []], - [1561147200, []], - [1561149000, []], - [1561150800, []], - [1561152600, []], - [1561154400, []], - [1561156200, []], - [1561158000, []], - [1561159800, []], - [1561161600, []], - [1561163400, []], - [1561165200, []], - [1561167000, []], - [1561168800, []], - [1561170600, []], - [1561172400, []], - [1561174200, []], - [1561176000, []], - [1561177800, []], - [1561179600, []], - [1561181400, []], - [1561183200, []], - [1561185000, []], - [1561186800, []], - [1561188600, []], - [1561190400, []], - [1561192200, []], - [1561194000, []], - [1561195800, []], - [1561197600, []], - [1561199400, []], - [1561201200, []], - [1561203000, []], - [1561204800, []], - [1561206600, []], - [1561208400, []], - [1561210200, []], - [1561212000, []], - [1561213800, []], - [1561215600, []], - [1561217400, []], - [1561219200, []], - [1561221000, []], - [1561222800, []], - [1561224600, []], - [1561226400, []], - [1561228200, []], - [1561230000, []], - [1561231800, []], - [1561233600, []], - [1561235400, []], - [1561237200, []], - [1561239000, []], - [1561240800, []], - [1561242600, []], - [1561244400, []], - [1561246200, []], - [1561248000, []], - [1561249800, []], - [1561251600, []], - [1561253400, []], - [1561255200, []], - [1561257000, []], - [1561258800, []], - [1561260600, []], - [1561262400, []], - [1561264200, []], - [1561266000, []], - [1561267800, []], - [1561269600, []], - [1561271400, []], - [1561273200, []], - [1561275000, []], - [1561276800, []], - [1561278600, []], - [1561280400, []], - [1561282200, []], - [1561284000, []], - [1561285800, []], - [1561287600, []], - [1561289400, []], - [1561291200, []], - [1561293000, []], - [1561294800, []], - [1561296600, []], - [1561298400, []], - [1561300200, []], - [1561302000, []], - [1561303800, []], - [1561305600, []], - [1561307400, []], - [1561309200, []], - [1561311000, []], - [1561312800, []], - [1561314600, []], - [1561316400, []], - [1561318200, []], - [1561320000, []], - [1561321800, []], - [1561323600, []], - [1561325400, []], - [1561327200, []], - [1561329000, []], - [1561330800, []], - [1561332600, []], - [1561334400, []], - [1561336200, []], - [1561338000, []], - [1561339800, []], - [1561341600, []], - [1561343400, []], - [1561345200, []], - [1561347000, []], - [1561348800, []], - [1561350600, []], - [1561352400, []], - [1561354200, []], - [1561356000, []], - [1561357800, []], - [1561359600, []], - [1561361400, []], - [1561363200, []], - [1561365000, []], - [1561366800, []], - [1561368600, []], - [1561370400, []], - [1561372200, []], - [1561374000, []], - [1561375800, []], - [1561377600, []], - [1561379400, []], - [1561381200, []], - [1561383000, []], - [1561384800, []], - [1561386600, []], - [1561388400, []], - [1561390200, []], - [1561392000, []], - [1561393800, []], - [1561395600, []], - [1561397400, []], - [1561399200, []], - [1561401000, []], - [1561402800, []], - [1561404600, []], - [1561406400, []], - [1561408200, []], - [1561410000, []], - [1561411800, []], - [1561413600, []], - [1561415400, []], - [1561417200, []], - [1561419000, []], - [1561420800, []], - [1561422600, []], - [1561424400, []], - [1561426200, []], - [1561428000, []], - [1561429800, []], - [1561431600, []], - [1561433400, []], - [1561435200, []], - [1561437000, []], - [1561438800, []], - [1561440600, []], - [1561442400, []], - [1561444200, []], - [1561446000, []], - [1561447800, []], - [1561449600, []], - [1561451400, []], - [1561453200, []], - [1561455000, []], - [1561456800, []], - [1561458600, []], - [1561460400, []], - [1561462200, []], - [1561464000, []], - [1561465800, []], - [1561467600, []], - [1561469400, []], - [1561471200, []], - [1561473000, []], - [1561474800, []], - [1561476600, []], - [1561478400, []], - [1561480200, []], - [1561482000, []], - [1561483800, []], - [1561485600, []], - [1561487400, []], - [1561489200, []], - [1561491000, []], - [1561492800, []], - [1561494600, []], - [1561496400, []], - [1561498200, []], - [1561500000, []], - [1561501800, []], - [1561503600, []], - [1561505400, []], - [1561507200, []], - [1561509000, []], - [1561510800, []], - [1561512600, []], - [1561514400, []], - [1561516200, []], - [1561518000, []], - [1561519800, []], - [1561521600, []], - [1561523400, []], - [1561525200, []], - [1561527000, []], - [1561528800, []], - [1561530600, []], - [1561532400, []], - [1561534200, []], - [1561536000, []], - [1561537800, []], - [1561539600, []], - [1561541400, []], - [1561543200, []], - [1561545000, []], - [1561546800, []], - [1561548600, []], - [1561550400, []], - [1561552200, []], - [1561554000, []], - [1561555800, []], - [1561557600, []], - [1561559400, []], - [1561561200, []], - [1561563000, []], - [1561564800, []], - [1561566600, []], - [1561568400, []], - [1561570200, []], - [1561572000, []], - [1561573800, []], - [1561575600, []], - [1561577400, []], - [1561579200, []], - [1561581000, []], - [1561582800, []], - [1561584600, []], - [1561586400, []], - [1561588200, []], - [1561590000, []], - [1561591800, []], - [1561593600, []], - [1561595400, []], - [1561597200, []], - [1561599000, []], - [1561600800, []], - [1561602600, []], - [1561604400, []], - [1561606200, []], - [1561608000, []], - [1561609800, []], - [1561611600, []], - [1561613400, []], - [1561615200, []], - [1561617000, []], - [1561618800, []], - [1561620600, []], - [1561622400, []], - [1561624200, []], - [1561626000, []], - [1561627800, []], - [1561629600, []], - [1561631400, []], - [1561633200, []], - [1561635000, []], - [1561636800, []], - [1561638600, []], - [1561640400, []], - [1561642200, []], - [1561644000, []], - [1561645800, []], - [1561647600, []], - [1561649400, []], - [1561651200, []], - [1561653000, []], - [1561654800, []], - [1561656600, []], - [1561658400, []], - [1561660200, []], - [1561662000, []], - [1561663800, []], - [1561665600, []], - [1561667400, []], - [1561669200, []], - [1561671000, []], - [1561672800, []], - [1561674600, []], - [1561676400, []], - [1561678200, []], - [1561680000, []], - [1561681800, []], - [1561683600, []], - [1561685400, []], - [1561687200, []], - [1561689000, []], - [1561690800, []], - [1561692600, []], - [1561694400, []], - [1561696200, []], - [1561698000, []], - [1561699800, []], - [1561701600, []], - [1561703400, []], - [1561705200, []], - [1561707000, []], - [1561708800, []], - [1561710600, []], - [1561712400, []], - [1561714200, []], - [1561716000, []], - [1561717800, []], - [1561719600, []], - [1561721400, []], - [1561723200, []], - [1561725000, []], - [1561726800, []], - [1561728600, []], - [1561730400, []], - [1561732200, []], - [1561734000, []], - [1561735800, []], - [1561737600, []], - [1561739400, []], - [1561741200, []], - [1561743000, []], - [1561744800, []], - [1561746600, []], - [1561748400, []], - [1561750200, []], - [1561752000, []], - [1561753800, []], - [1561755600, []], - [1561757400, []], - [1561759200, []], - [1561761000, []], - [1561762800, []], - [1561764600, []], - [1561766400, []], - [1561768200, []], - [1561770000, []], - [1561771800, []], - [1561773600, []], - [1561775400, []], - [1561777200, []], - [1561779000, []], - [1561780800, []], - [1561782600, []], - [1561784400, []], - [1561786200, []], - [1561788000, []], - [1561789800, []], - [1561791600, []], - [1561793400, []], - [1561795200, []], - [1561797000, []], - [1561798800, []], - [1561800600, []], - [1561802400, []], - [1561804200, []], - [1561806000, []], - [1561807800, []], - [1561809600, []], - [1561811400, []], - [1561813200, []], - [1561815000, []], - [1561816800, []], - [1561818600, []], - [1561820400, []], - [1561822200, []], - [1561824000, []], - [1561825800, []], - [1561827600, []], - [1561829400, []], - [1561831200, []], - [1561833000, []], - [1561834800, []], - [1561836600, []], - [1561838400, []], - [1561840200, []], - [1561842000, []], - [1561843800, []], - [1561845600, []], - [1561847400, []], - [1561849200, []], - [1561851000, []], - [1561852800, []], - [1561854600, []], - [1561856400, []], - [1561858200, []], - [1561860000, []], - [1561861800, []], - [1561863600, []], - [1561865400, []], - [1561867200, []], - [1561869000, []], - [1561870800, []], - [1561872600, []], - [1561874400, []], - [1561876200, []], - [1561878000, []], - [1561879800, []], - [1561881600, []], - [1561883400, []], - [1561885200, []], - [1561887000, []], - [1561888800, []], - [1561890600, []], - [1561892400, []], - [1561894200, []], - [1561896000, []], - [1561897800, []], - [1561899600, []], - [1561901400, []], - [1561903200, []], - [1561905000, []], - [1561906800, []], - [1561908600, []], - [1561910400, []], - [1561912200, []], - [1561914000, []], - [1561915800, []], - [1561917600, []], - [1561919400, []], - [1561921200, []], - [1561923000, []], - [1561924800, []], - [1561926600, []], - [1561928400, []], - [1561930200, []], - [1561932000, []], - [1561933800, []], - [1561935600, []], - [1561937400, []], - [1561939200, []], - [1561941000, []], - [1561942800, []], - [1561944600, []], - [1561946400, []], - [1561948200, []], - [1561950000, []], - [1561951800, []], - [1561953600, []], - [1561955400, []], - [1561957200, []], - [1561959000, []], - [1561960800, []], - [1561962600, []], - [1561964400, []], - [1561966200, []], - [1561968000, []], - [1561969800, []], - [1561971600, []], - [1561973400, []], - [1561975200, []], - [1561977000, []], - [1561978800, []], - [1561980600, []], - [1561982400, []], - [1561984200, []], - [1561986000, []], - [1561987800, []], - [1561989600, []], - [1561991400, []], - [1561993200, []], - [1561995000, []], - [1561996800, []], - [1561998600, []], - [1562000400, []], - [1562002200, []], - [1562004000, []], - [1562005800, []], - [1562007600, []], - [1562009400, []], - [1562011200, []], - [1562013000, []], - [1562014800, []], - [1562016600, []], - [1562018400, []], - [1562020200, []], - [1562022000, []], - [1562023800, []], - [1562025600, []], - [1562027400, []], - [1562029200, []], - [1562031000, []], - [1562032800, []], - [1562034600, []], - [1562036400, []], - [1562038200, []], - [1562040000, []], - [1562041800, []], - [1562043600, []], - [1562045400, []], - [1562047200, []], - [1562049000, []], - [1562050800, []], - [1562052600, []], - [1562054400, []], - [1562056200, []], - [1562058000, []], - [1562059800, []], - [1562061600, []], - [1562063400, []], - [1562065200, []], - [1562067000, []], - [1562068800, []], - [1562070600, []], - [1562072400, []], - [1562074200, []], - [1562076000, []], - [1562077800, []], - [1562079600, []], - [1562081400, []], - [1562083200, []], - [1562085000, []], - [1562086800, []], - [1562088600, []], - [1562090400, []], - [1562092200, []], - [1562094000, []], - [1562095800, [{count: 30}]], - [1562097600, []], - [1562099400, []], - [1562101200, []], - [1562103000, []], - [1562104800, []], - [1562106600, []], - [1562108400, []], - [1562110200, []], - [1562112000, []], - [1562113800, []], - [1562115600, []], - [1562117400, []], - [1562119200, []], - [1562121000, []], - [1562122800, []], - [1562124600, []], - [1562126400, []], - [1562128200, []], - [1562130000, []], - [1562131800, []], - [1562133600, []], - [1562135400, []], - [1562137200, []], - [1562139000, []], - [1562140800, []], - [1562142600, []], - [1562144400, []], - [1562146200, []], - [1562148000, []], - [1562149800, []], - [1562151600, []], - [1562153400, []], - [1562155200, []], - [1562157000, []], - [1562158800, []], - [1562160600, []], - [1562162400, []], - [1562164200, []], - [1562166000, []], - [1562167800, []], - [1562169600, []], - [1562171400, []], - [1562173200, []], - [1562175000, []], - [1562176800, []], - [1562178600, []], - [1562180400, []], - [1562182200, []], - [1562184000, []], - [1562185800, []], - [1562187600, []], - [1562189400, []], - [1562191200, []], - [1562193000, []], - [1562194800, []], - [1562196600, []], - [1562198400, []], - [1562200200, []], - [1562202000, []], - [1562203800, []], - [1562205600, []], - [1562207400, []], - [1562209200, []], - [1562211000, []], - [1562212800, []], - [1562214600, []], - [1562216400, []], - [1562218200, []], - [1562220000, []], - [1562221800, []], - [1562223600, []], - [1562225400, []], - [1562227200, []], - [1562229000, []], - [1562230800, []], - [1562232600, []], - [1562234400, []], - [1562236200, []], - [1562238000, []], - [1562239800, []], - [1562241600, []], - [1562243400, []], - [1562245200, []], - [1562247000, []], - [1562248800, []], - [1562250600, []], - [1562252400, []], - [1562254200, []], - [1562256000, []], - [1562257800, []], - [1562259600, []], - [1562261400, []], - [1562263200, []], - [1562265000, []], - [1562266800, []], - [1562268600, []], - [1562270400, []], - [1562272200, []], - [1562274000, []], - [1562275800, []], - [1562277600, []], - [1562279400, []], - [1562281200, []], - [1562283000, []], - [1562284800, []], - [1562286600, []], - [1562288400, []], - [1562290200, []], - [1562292000, []], - [1562293800, []], - [1562295600, []], - [1562297400, []], - [1562299200, []], - [1562301000, []], - [1562302800, []], - [1562304600, []], - [1562306400, []], - [1562308200, []], - [1562310000, []], - [1562311800, []], - [1562313600, []], - [1562315400, []], - [1562317200, []], - [1562319000, []], - [1562320800, []], - [1562322600, []], - [1562324400, []], - [1562326200, []], - [1562328000, []], - [1562329800, []], - [1562331600, []], - [1562333400, []], - [1562335200, []], - [1562337000, []], - [1562338800, []], - [1562340600, []], - [1562342400, []], - [1562344200, []], - [1562346000, []], - [1562347800, []], - [1562349600, []], - [1562351400, []], - [1562353200, []], - [1562355000, []], - [1562356800, []], - [1562358600, []], - [1562360400, []], - [1562362200, []], - [1562364000, []], - [1562365800, []], - [1562367600, []], - [1562369400, []], - [1562371200, []], - [1562373000, []], - [1562374800, []], - [1562376600, []], - [1562378400, []], - [1562380200, []], - [1562382000, []], - [1562383800, []], - [1562385600, []], - [1562387400, []], - [1562389200, []], - [1562391000, []], - [1562392800, []], - [1562394600, []], - [1562396400, []], - [1562398200, []], - [1562400000, []], - [1562401800, []], - [1562403600, []], - [1562405400, []], - [1562407200, []], - [1562409000, []], - [1562410800, []], - [1562412600, []], - [1562414400, []], - [1562416200, []], - [1562418000, []], - [1562419800, []], - [1562421600, []], - [1562423400, []], - [1562425200, []], - [1562427000, []], - [1562428800, []], - [1562430600, []], - [1562432400, []], - [1562434200, []], - [1562436000, []], - [1562437800, []], - [1562439600, []], - [1562441400, []], - [1562443200, []], - [1562445000, []], - [1562446800, []], - [1562448600, []], - [1562450400, []], - [1562452200, []], - [1562454000, []], - [1562455800, []], - [1562457600, []], - [1562459400, []], - [1562461200, []], - [1562463000, []], - [1562464800, []], - [1562466600, []], - [1562468400, []], - [1562470200, []], - [1562472000, []], - [1562473800, []], - [1562475600, []], - [1562477400, []], - [1562479200, []], - [1562481000, []], - [1562482800, []], - [1562484600, []], - [1562486400, []], - [1562488200, []], - [1562490000, []], - [1562491800, []], - [1562493600, []], - [1562495400, []], - [1562497200, []], - [1562499000, []], - [1562500800, []], - [1562502600, []], - [1562504400, []], - [1562506200, []], - [1562508000, []], - [1562509800, []], - [1562511600, []], - [1562513400, []], - [1562515200, []], - [1562517000, []], - [1562518800, []], - [1562520600, []], - [1562522400, []], - [1562524200, []], - [1562526000, []], - [1562527800, []], - [1562529600, []], - [1562531400, []], - [1562533200, []], - [1562535000, []], - [1562536800, []], - [1562538600, []], - [1562540400, []], - [1562542200, []], - [1562544000, []], - [1562545800, []], - [1562547600, []], - [1562549400, []], - [1562551200, []], - [1562553000, []], - [1562554800, []], - [1562556600, []], - [1562558400, []], - [1562560200, []], - [1562562000, []], - [1562563800, []], - [1562565600, []], - [1562567400, []], - [1562569200, []], - [1562571000, []], - [1562572800, []], - [1562574600, []], - [1562576400, []], - [1562578200, []], - [1562580000, []], - [1562581800, []], - [1562583600, []], - [1562585400, []], - [1562587200, []], - [1562589000, []], - [1562590800, []], - [1562592600, []], - [1562594400, []], - [1562596200, []], - [1562598000, []], - [1562599800, []], - [1562601600, []], - [1562603400, []], - [1562605200, []], - [1562607000, []], - [1562608800, []], - [1562610600, []], - [1562612400, []], - [1562614200, []], - [1562616000, []], - [1562617800, []], - [1562619600, []], - [1562621400, []], - [1562623200, []], - [1562625000, []], - [1562626800, []], - [1562628600, []], - [1562630400, []], - [1562632200, []], - [1562634000, []], - [1562635800, []], - [1562637600, []], - [1562639400, []], - [1562641200, []], - [1562643000, []], - [1562644800, []], - [1562646600, []], - [1562648400, []], - [1562650200, []], - [1562652000, []], - [1562653800, []], - [1562655600, []], - [1562657400, []], - [1562659200, []], - [1562661000, []], - [1562662800, []], - [1562664600, []], - [1562666400, []], - [1562668200, []], - [1562670000, []], - [1562671800, []], - [1562673600, []], - [1562675400, []], - [1562677200, []], - [1562679000, []], - [1562680800, []], - [1562682600, []], - [1562684400, []], - [1562686200, []], - [1562688000, []], - [1562689800, []], - [1562691600, []], - [1562693400, []], - [1562695200, []], - [1562697000, []], - [1562698800, []], - [1562700600, []], - [1562702400, []], - [1562704200, []], - [1562706000, []], - [1562707800, []], - [1562709600, []], - [1562711400, []], - [1562713200, []], - [1562715000, []], - [1562716800, []], - [1562718600, []], - [1562720400, []], - [1562722200, []], - [1562724000, []], - [1562725800, []], - [1562727600, []], - [1562729400, []], - [1562731200, []], - [1562733000, []], - [1562734800, []], - [1562736600, []], - [1562738400, []], - [1562740200, []], - [1562742000, []], - [1562743800, []], - [1562745600, []], - [1562747400, []], - [1562749200, []], - [1562751000, []], - [1562752800, []], - [1562754600, []], - [1562756400, []], - [1562758200, []], - [1562760000, []], - [1562761800, []], - [1562763600, []], - [1562765400, []], - [1562767200, []], - [1562769000, []], - [1562770800, []], - [1562772600, []], - [1562774400, []], - [1562776200, []], - [1562778000, []], - [1562779800, []], - [1562781600, []], - [1562783400, []], - [1562785200, []], - [1562787000, []], - [1562788800, []], - [1562790600, []], - [1562792400, []], - [1562794200, []], - [1562796000, []], - [1562797800, []], - [1562799600, []], - [1562801400, []], - [1562803200, []], - [1562805000, []], - [1562806800, []], - [1562808600, []], - [1562810400, []], - [1562812200, []], - [1562814000, []], - [1562815800, []], - [1562817600, []], - [1562819400, []], - [1562821200, []], - [1562823000, []], - [1562824800, []], - [1562826600, []], - [1562828400, []], - [1562830200, []], - [1562832000, []], - [1562833800, []], - [1562835600, []], - [1562837400, []], - [1562839200, []], - [1562841000, []], - [1562842800, []], - [1562844600, []], - [1562846400, []], - [1562848200, []], - [1562850000, []], - [1562851800, []], - [1562853600, []], - [1562855400, []], - [1562857200, []], - [1562859000, []], - [1562860800, []], - [1562862600, []], - [1562864400, []], - [1562866200, []], - [1562868000, []], - [1562869800, []], - [1562871600, []], - [1562873400, []], - [1562875200, []], - [1562877000, []], - [1562878800, []], - [1562880600, []], - [1562882400, []], - [1562884200, []], - [1562886000, []], - [1562887800, []], - [1562889600, []], - [1562891400, []], - [1562893200, []], - [1562895000, []], - [1562896800, []], - [1562898600, []], - [1562900400, []], - [1562902200, []], - [1562904000, []], - [1562905800, []], - [1562907600, []], - [1562909400, []], - [1562911200, []], - [1562913000, []], - [1562914800, []], - [1562916600, []], - [1562918400, []], - [1562920200, []], - [1562922000, []], - [1562923800, []], - [1562925600, []], - [1562927400, []], - [1562929200, []], - [1562931000, []], - [1562932800, []], - [1562934600, []], - [1562936400, []], - [1562938200, []], - [1562940000, []], - [1562941800, []], - [1562943600, []], - [1562945400, []], - [1562947200, []], - [1562949000, []], - [1562950800, []], - [1562952600, []], - [1562954400, []], - [1562956200, []], - [1562958000, []], - [1562959800, []], - [1562961600, []], - [1562963400, []], - [1562965200, []], - [1562967000, []], - [1562968800, []], - [1562970600, []], - [1562972400, []], - [1562974200, []], - [1562976000, []], - [1562977800, []], - [1562979600, []], - [1562981400, []], - [1562983200, []], - [1562985000, []], - [1562986800, []], - [1562988600, []], - [1562990400, []], - [1562992200, []], - [1562994000, []], - [1562995800, []], - [1562997600, []], - [1562999400, []], - [1563001200, []], - [1563003000, []], - [1563004800, []], - [1563006600, []], - [1563008400, []], - [1563010200, []], - [1563012000, []], - [1563013800, []], - [1563015600, []], - [1563017400, []], - [1563019200, []], - [1563021000, []], - [1563022800, []], - [1563024600, []], - [1563026400, []], - [1563028200, []], - [1563030000, []], - [1563031800, []], - [1563033600, []], - [1563035400, []], - [1563037200, []], - [1563039000, []], - [1563040800, []], - [1563042600, []], - [1563044400, []], - [1563046200, []], - [1563048000, []], - [1563049800, []], - [1563051600, []], - [1563053400, []], - [1563055200, []], - [1563057000, []], - [1563058800, []], - [1563060600, []], - [1563062400, []], - [1563064200, []], - [1563066000, []], - [1563067800, []], - [1563069600, []], - [1563071400, []], - [1563073200, []], - [1563075000, []], - [1563076800, []], - [1563078600, []], - [1563080400, []], - [1563082200, []], - [1563084000, []], - [1563085800, []], - [1563087600, []], - [1563089400, []], - [1563091200, []], - [1563093000, []], - [1563094800, []], - [1563096600, []], - [1563098400, []], - [1563100200, []], - [1563102000, []], - [1563103800, []], - [1563105600, []], - [1563107400, []], - [1563109200, []], - [1563111000, []], - [1563112800, []], - [1563114600, []], - [1563116400, []], - [1563118200, []], - [1563120000, []], - [1563121800, []], - [1563123600, []], - [1563125400, []], - [1563127200, []], - [1563129000, []], - [1563130800, []], - [1563132600, []], - [1563134400, []], - [1563136200, []], - [1563138000, []], - [1563139800, []], - [1563141600, []], - [1563143400, []], - [1563145200, []], - [1563147000, []], - [1563148800, []], - [1563150600, []], - [1563152400, []], - [1563154200, []], - [1563156000, []], - [1563157800, []], - [1563159600, []], - [1563161400, []], - [1563163200, []], - [1563165000, []], - [1563166800, []], - [1563168600, []], - [1563170400, []], - [1563172200, []], - [1563174000, []], - [1563175800, []], - [1563177600, []], - [1563179400, []], - [1563181200, []], - [1563183000, []], - [1563184800, []], - [1563186600, []], - [1563188400, []], - [1563190200, []], - [1563192000, []], - [1563193800, []], - [1563195600, []], - [1563197400, []], - [1563199200, []], - [1563201000, []], - [1563202800, []], - [1563204600, []], - [1563206400, []], - [1563208200, []], - [1563210000, []], - [1563211800, []], - [1563213600, []], - [1563215400, []], - [1563217200, []], - [1563219000, []], - [1563220800, []], - [1563222600, []], - [1563224400, []], - [1563226200, [{count: 30}]], - [1563228000, []], - [1563229800, []], - [1563231600, []], - [1563233400, []], - [1563235200, []], - [1563237000, []], - [1563238800, []], - [1563240600, []], - [1563242400, []], - [1563244200, []], - [1563246000, []], - [1563247800, []], - [1563249600, []], - [1563251400, []], - [1563253200, []], - [1563255000, []], - [1563256800, []], - [1563258600, []], - [1563260400, []], - [1563262200, []], - [1563264000, []], - [1563265800, []], - [1563267600, []], - [1563269400, []], - [1563271200, []], - [1563273000, []], - [1563274800, []], - [1563276600, []], - [1563278400, []], - [1563280200, []], - [1563282000, []], - [1563283800, []], - [1563285600, []], - [1563287400, []], - [1563289200, []], - [1563291000, []], - [1563292800, []], - [1563294600, []], - [1563296400, []], - [1563298200, []], - [1563300000, []], - [1563301800, []], - [1563303600, []], - [1563305400, []], - [1563307200, []], - [1563309000, []], - [1563310800, []], - [1563312600, []], - [1563314400, []], - [1563316200, []], -]; class IncidentRulesCreate extends React.Component { - state = { - width: null, + static propTypes = { + data: PropTypes.array, }; - handleUpperBoundDrag = () => {}; + static defaultProps = { + data: [], + }; - handleLowerBoundDrag = () => {}; + state = { + width: null, + }; render() { const {orgId} = this.props.params; @@ -1390,19 +47,7 @@ class IncidentRulesCreate extends React.Component { }, ], })} - series={[ - { - seriesName: 'Test', - dataArray: data.map(([ts, val]) => { - return [ - ts * 1000, - val.length - ? val.reduce((acc, {count} = {count: 0}) => acc + count, 0) - : 0, - ]; - }), - }, - ]} + series={this.props.data} />
Date: Tue, 23 Jul 2019 09:39:52 -0700 Subject: [PATCH 3/3] add missing graphic --- .../app/components/charts/components/graphic.jsx | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/sentry/static/sentry/app/components/charts/components/graphic.jsx diff --git a/src/sentry/static/sentry/app/components/charts/components/graphic.jsx b/src/sentry/static/sentry/app/components/charts/components/graphic.jsx new file mode 100644 index 000000000000..02ff5b03a188 --- /dev/null +++ b/src/sentry/static/sentry/app/components/charts/components/graphic.jsx @@ -0,0 +1,10 @@ +import 'echarts/lib/component/graphic'; + +/** + * eCharts graphic + * + * See https://echarts.apache.org/en/option.html#graphic + */ +export default function Graphic(props) { + return props; +}