File tree Expand file tree Collapse file tree
src/features/Events/factories Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " @linode/manager " : Fixed
3+ ---
4+
5+ Make ` linode_resize ` started event generic ([ #12252 ] ( https://github.com/linode/manager/pull/12252 ) )
Original file line number Diff line number Diff line change 1- import { useLinodeQuery } from '@linode/queries' ;
2- import { formatStorageUnits } from '@linode/utilities' ;
31import * as React from 'react' ;
42
53import { Link } from 'src/components/Link' ;
6- import { useTypeQuery } from 'src/queries/types' ;
74
85import { EventLink } from '../EventLink' ;
96
107import type { PartialEventMap } from '../types' ;
11- import type { Event } from '@linode/api-v4' ;
128
139export const linode : PartialEventMap < 'linode' > = {
1410 linode_addip : {
@@ -488,7 +484,12 @@ export const linode: PartialEventMap<'linode'> = {
488484 < strong > resizing</ strong > .
489485 </ >
490486 ) ,
491- started : ( e ) => < LinodeResizeStartedMessage event = { e } /> ,
487+ started : ( e ) => (
488+ < >
489+ Linode < EventLink event = { e } to = "entity" /> is < strong > resizing</ strong > { ' ' }
490+ to the selected plan.
491+ </ >
492+ ) ,
492493 } ,
493494 linode_resize_create : {
494495 notification : ( e ) => (
@@ -571,26 +572,3 @@ export const linode: PartialEventMap<'linode'> = {
571572 ) ,
572573 } ,
573574} ;
574-
575- const LinodeResizeStartedMessage = ( { event } : { event : Event } ) => {
576- const { data : linode } = useLinodeQuery ( event . entity ?. id ?? - 1 ) ;
577- const type = useTypeQuery ( linode ?. type ?? '' ) ;
578-
579- return (
580- < >
581- Linode < EventLink event = { event } to = "entity" /> is{ ' ' }
582- < strong > resizing</ strong >
583- { type && (
584- < >
585- { ' ' }
586- to the{ ' ' }
587- { type . data ?. label && (
588- < strong > { formatStorageUnits ( type . data . label ) } </ strong >
589- ) } { ' ' }
590- Plan
591- </ >
592- ) }
593- .
594- </ >
595- ) ;
596- } ;
You can’t perform that action at this time.
0 commit comments