-
Notifications
You must be signed in to change notification settings - Fork 383
upcoming: [DPS-33112] Add Streams empty state and Create Stream views #12235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@linode/manager": Upcoming Features | ||
--- | ||
|
||
DataStream: add Streams empty state and Create Stream views ([#12235](https://github.com/linode/manager/pull/12235)) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { makeStyles } from 'tss-react/mui'; | ||
|
||
import type { Theme } from '@mui/material/styles'; | ||
|
||
export const useStyles = makeStyles()((theme: Theme) => ({ | ||
root: { | ||
'& .mlMain': { | ||
[theme.breakpoints.down('lg')]: { | ||
flexBasis: '100%', | ||
maxWidth: '100%', | ||
}, | ||
}, | ||
'& .mlSidebar': { | ||
[theme.breakpoints.down('lg')]: { | ||
background: theme.color.white, | ||
flexBasis: '100%', | ||
maxWidth: '100%', | ||
marginTop: theme.spacingFunction(16), | ||
padding: theme.spacingFunction(8), | ||
}, | ||
}, | ||
}, | ||
})); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { Stack } from '@linode/ui'; | ||
import Grid from '@mui/material/Grid'; | ||
import * as React from 'react'; | ||
|
||
import { DocumentTitleSegment } from 'src/components/DocumentTitle'; | ||
import { LandingHeader } from 'src/components/LandingHeader'; | ||
import { StreamCreateCheckoutBar } from 'src/features/DataStream/Streams/StreamCreate/StreamCreateCheckoutBar'; | ||
import { StreamCreateDataSet } from 'src/features/DataStream/Streams/StreamCreate/StreamCreateDataSet'; | ||
import { StreamCreateDelivery } from 'src/features/DataStream/Streams/StreamCreate/StreamCreateDelivery'; | ||
import { StreamCreateGeneralInfo } from 'src/features/DataStream/Streams/StreamCreate/StreamCreateGeneralInfo'; | ||
|
||
import { useStyles } from './StreamCreate.styles'; | ||
|
||
export const StreamCreate = () => { | ||
const { classes } = useStyles(); | ||
|
||
const landingHeaderProps = { | ||
breadcrumbProps: { | ||
pathname: '/datastream/streams/create', | ||
crumbOverrides: [ | ||
{ | ||
label: 'DataStream', | ||
position: 1, | ||
}, | ||
], | ||
}, | ||
removeCrumbX: 2, | ||
title: 'Create Stream', | ||
}; | ||
|
||
return ( | ||
<Grid className={classes.root} container> | ||
<DocumentTitleSegment segment="Create Stream" /> | ||
<LandingHeader {...landingHeaderProps} /> | ||
|
||
<Grid className="mlMain"> | ||
<Stack spacing={2}> | ||
<StreamCreateGeneralInfo /> | ||
<StreamCreateDataSet /> | ||
<StreamCreateDelivery /> | ||
</Stack> | ||
</Grid> | ||
<Grid className="mlSidebar"> | ||
<StreamCreateCheckoutBar /> | ||
</Grid> | ||
</Grid> | ||
); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Divider } from '@linode/ui'; | ||
import * as React from 'react'; | ||
|
||
import { CheckoutBar } from 'src/components/CheckoutBar/CheckoutBar'; | ||
|
||
export const StreamCreateCheckoutBar = () => { | ||
const onDeploy = () => {}; | ||
|
||
return ( | ||
<CheckoutBar | ||
disabled={true} | ||
heading="Stream Summary" | ||
onDeploy={onDeploy} | ||
priceSelectionText="Select Data Set and define a Destination to view pricing and create a stream." | ||
submitText="Create Stream" | ||
> | ||
<Divider dark spacingBottom={0} spacingTop={16} /> | ||
</CheckoutBar> | ||
); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Box, Paper, Typography } from '@linode/ui'; | ||
import React from 'react'; | ||
|
||
import { DocsLink } from 'src/components/DocsLink/DocsLink'; | ||
|
||
export const StreamCreateDataSet = () => { | ||
return ( | ||
<Paper> | ||
<Box display="flex" justifyContent="space-between"> | ||
<Typography variant="h2">Data Set</Typography> | ||
<DocsLink | ||
// TODO: Change the link when proper documentation is ready | ||
Check warning on line 12 in packages/manager/src/features/DataStream/Streams/StreamCreate/StreamCreateDataSet.tsx
|
||
href="https://techdocs.akamai.com/cloud-computing/docs" | ||
label="Docs" | ||
/> | ||
</Box> | ||
</Paper> | ||
); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Box, Paper, Typography } from '@linode/ui'; | ||
import React from 'react'; | ||
|
||
import { DocsLink } from 'src/components/DocsLink/DocsLink'; | ||
|
||
export const StreamCreateDelivery = () => { | ||
return ( | ||
<Paper> | ||
<Box display="flex" justifyContent="space-between"> | ||
<Typography variant="h2">Delivery</Typography> | ||
<DocsLink | ||
// TODO: Change the link when proper documentation is ready | ||
Check warning on line 12 in packages/manager/src/features/DataStream/Streams/StreamCreate/StreamCreateDelivery.tsx
|
||
href="https://techdocs.akamai.com/cloud-computing/docs" | ||
label="Docs" | ||
/> | ||
</Box> | ||
</Paper> | ||
); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Paper, Typography } from '@linode/ui'; | ||
import React from 'react'; | ||
|
||
export const StreamCreateGeneralInfo = () => { | ||
return ( | ||
<Paper> | ||
<Typography variant="h2">General Information</Typography> | ||
</Paper> | ||
); | ||
}; |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import * as React from 'react'; | ||
|
||
import { StreamsLandingEmptyState } from 'src/features/DataStream/Streams/StreamsLandingEmptyState'; | ||
|
||
export const StreamsLanding = () => { | ||
return <StreamsLandingEmptyState />; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { useNavigate } from '@tanstack/react-router'; | ||
import * as React from 'react'; | ||
|
||
import ComputeIcon from 'src/assets/icons/entityIcons/compute.svg'; | ||
import { DocumentTitleSegment } from 'src/components/DocumentTitle'; | ||
import { ResourcesSection } from 'src/components/EmptyLandingPageResources/ResourcesSection'; | ||
import { sendEvent } from 'src/utilities/analytics/utils'; | ||
|
||
import { | ||
gettingStartedGuides, | ||
headers, | ||
linkAnalyticsEvent, | ||
} from './StreamsLandingEmptyStateData'; | ||
|
||
export const StreamsLandingEmptyState = () => { | ||
const navigate = useNavigate(); | ||
|
||
return ( | ||
<> | ||
<DocumentTitleSegment segment="Streams" /> | ||
<ResourcesSection | ||
buttonProps={[ | ||
{ | ||
children: 'Create Stream', | ||
onClick: () => { | ||
sendEvent({ | ||
action: 'Click:button', | ||
category: linkAnalyticsEvent.category, | ||
label: 'Create Stream', | ||
}); | ||
navigate({ to: '/datastream/streams/create' }); | ||
}, | ||
}, | ||
]} | ||
gettingStartedGuidesData={gettingStartedGuides} | ||
headers={headers} | ||
icon={ComputeIcon} | ||
linkAnalyticsEvent={linkAnalyticsEvent} | ||
/> | ||
</> | ||
); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { | ||
docsLink, | ||
guidesMoreLinkText, | ||
} from 'src/utilities/emptyStateLandingUtils'; | ||
|
||
import type { | ||
ResourcesHeaders, | ||
ResourcesLinks, | ||
ResourcesLinkSection, | ||
} from 'src/components/EmptyLandingPageResources/ResourcesLinksTypes'; | ||
|
||
export const headers: ResourcesHeaders = { | ||
title: 'Streams', | ||
subtitle: '', | ||
description: 'Create a data stream and configure delivery of cloud logs', | ||
}; | ||
|
||
export const linkAnalyticsEvent: ResourcesLinks['linkAnalyticsEvent'] = { | ||
action: 'Click:link', | ||
category: 'Streams landing page empty', | ||
}; | ||
|
||
export const gettingStartedGuides: ResourcesLinkSection = { | ||
links: [ | ||
{ | ||
// TODO: Change the link and text when proper documentation is ready | ||
Check warning on line 26 in packages/manager/src/features/DataStream/Streams/StreamsLandingEmptyStateData.ts
|
||
text: 'Getting started guide', | ||
to: 'https://techdocs.akamai.com/cloud-computing/docs', | ||
}, | ||
], | ||
moreInfo: { | ||
text: guidesMoreLinkText, | ||
to: docsLink, | ||
}, | ||
title: 'Getting Started Guides', | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
import { createLazyRoute } from '@tanstack/react-router'; | ||
|
||
import { DataStreamLanding } from 'src/features/DataStream/DataStreamLanding'; | ||
import { StreamCreate } from 'src/features/DataStream/Streams/StreamCreate/StreamCreate'; | ||
|
||
export const dataStreamLandingLazyRoute = createLazyRoute('/datastream')({ | ||
component: DataStreamLanding, | ||
}); | ||
|
||
export const streamCreateLazyRoute = createLazyRoute( | ||
'/datastream/streams/create' | ||
)({ | ||
component: StreamCreate, | ||
}); |
Uh oh!
There was an error while loading. Please reload this page.