forked from linode/manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upcoming: [M3-7608]: Placement Groups Landing page empty state (linod…
…e#10075) * upcoming: [M3-7608]: Placement Groups Landing page empty state * upcoming: [M3-7608]: Add changeset and remove unnecessary file * fix docs link unit test
- Loading branch information
1 parent
4e78680
commit f845204
Showing
7 changed files
with
119 additions
and
12 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
packages/manager/.changeset/pr-10075-upcoming-features-1705615244383.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@linode/manager": Upcoming Features | ||
--- | ||
|
||
Placement Groups Landing Page empty state ([#10075](https://github.com/linode/manager/pull/10075)) |
3 changes: 2 additions & 1 deletion
3
packages/manager/src/assets/icons/entityIcons/placement-groups.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
.../src/features/PlacementGroups/PlacementGroupsLanding/PlacementGroupsLandingEmptyState.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import * as React from 'react'; | ||
|
||
import PlacementGroups from 'src/assets/icons/entityIcons/placement-groups.svg'; | ||
import { ResourcesSection } from 'src/components/EmptyLandingPageResources/ResourcesSection'; | ||
import { sendEvent } from 'src/utilities/analytics'; | ||
|
||
import { | ||
gettingStartedGuides, | ||
headers, | ||
linkAnalyticsEvent, | ||
} from './PlacementGroupsLandingEmptyStateData'; | ||
|
||
interface Props { | ||
openCreatePlacementGroupDrawer: () => void; | ||
} | ||
|
||
export const PlacementGroupsLandingEmptyState = (props: Props) => { | ||
const { openCreatePlacementGroupDrawer } = props; | ||
|
||
return ( | ||
<ResourcesSection | ||
buttonProps={[ | ||
{ | ||
children: 'Create Placement Groups', | ||
onClick: () => { | ||
sendEvent({ | ||
action: 'Click:button', | ||
category: linkAnalyticsEvent.category, | ||
label: 'Create Placement Group', | ||
}); | ||
openCreatePlacementGroupDrawer(); | ||
}, | ||
}, | ||
]} | ||
gettingStartedGuidesData={gettingStartedGuides} | ||
headers={headers} | ||
icon={PlacementGroups} | ||
linkAnalyticsEvent={linkAnalyticsEvent} | ||
/> | ||
); | ||
}; |
33 changes: 33 additions & 0 deletions
33
...c/features/PlacementGroups/PlacementGroupsLanding/PlacementGroupsLandingEmptyStateData.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { PLACEMENT_GROUP_LABEL } from 'src/features/PlacementGroups/constants'; | ||
|
||
import type { | ||
ResourcesHeaders, | ||
ResourcesLinkSection, | ||
ResourcesLinks, | ||
} from 'src/components/EmptyLandingPageResources/ResourcesLinksTypes'; | ||
|
||
export const headers: ResourcesHeaders = { | ||
description: | ||
'Control the physical placement or distribution of virtual machines (VMs) instances within a data center or availability zone.', | ||
subtitle: '', | ||
title: PLACEMENT_GROUP_LABEL, | ||
}; | ||
|
||
export const gettingStartedGuides: ResourcesLinkSection = { | ||
links: [ | ||
{ | ||
text: '', | ||
to: '', | ||
}, | ||
], | ||
moreInfo: { | ||
text: '', | ||
to: '', | ||
}, | ||
title: '', | ||
}; | ||
|
||
export const linkAnalyticsEvent: ResourcesLinks['linkAnalyticsEvent'] = { | ||
action: 'Click:link', | ||
category: 'Placement Groups landing page empty', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
// Labels | ||
export const PLACEMENT_GROUP_LABEL = 'Placement Groups'; | ||
|
||
export const MAX_NUMBER_OF_PLACEMENT_GROUPS = 5; |