File tree Expand file tree Collapse file tree 9 files changed +23
-16
lines changed
apps/wfo-ui-surf/components
WfoServiceTicketDetailPage
packages/orchestrator-ui-components/src Expand file tree Collapse file tree 9 files changed +23
-16
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' wfo-ui-surf ' : patch
3+ ' wfo-ui ' : patch
4+ ' @orchestrator-ui/orchestrator-ui-components ' : patch
5+ ---
6+
7+ - expand the root product block card by default
8+ - change tree icon of root product block
9+ - open other subscription detail page opens in new tab
10+ - use title of root product block in tree like the other product blocks
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ export const WfoImpactedCustomersTable = ({
6868 name : t ( 'customers' ) ,
6969 field : 'customer' ,
7070 render : ( customer ) => (
71- < EuiText size = { 's' } >
71+ < EuiText size = "s" >
7272 < b > { customer . customer_abbrev } </ b >
7373 </ EuiText >
7474 ) ,
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ export const WfoServiceTicketsList = ({
137137 < b > { formatDate ( date ) } </ b >
138138 </ EuiText >
139139 ) : (
140- < EuiText size = { 's' } > { formatDate ( date ) } </ EuiText >
140+ < EuiText size = "s" > { formatDate ( date ) } </ EuiText >
141141 ) ;
142142 } ,
143143 } ,
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export const WfoModifySettings: FC<WfoModifySettingsProps> = ({
2525 paddingSize = "l"
2626 css = { { width : '50%' } }
2727 >
28- < EuiText size = { 's' } >
28+ < EuiText size = "s" >
2929 < h4 > { t ( 'modifyEngine' ) } </ h4 >
3030 </ EuiText >
3131 < EuiSpacer size = "m" > </ EuiSpacer >
Original file line number Diff line number Diff line change @@ -86,7 +86,10 @@ export const WfoRelatedSubscriptions = ({
8686 field : 'description' ,
8787 name : t ( 'description' ) ,
8888 render : ( value , record ) => (
89- < Link href = { `/subscriptions/${ record . subscriptionId } ` } >
89+ < Link
90+ target = "_blank"
91+ href = { `/subscriptions/${ record . subscriptionId } ` }
92+ >
9093 { value }
9194 </ Link >
9295 ) ,
Original file line number Diff line number Diff line change @@ -12,10 +12,7 @@ import { getTokenName } from '../../utils/getTokenName';
1212import { WfoTree } from '../WfoTree' ;
1313import { getWfoTreeNodeDepth } from '../WfoTree' ;
1414import { WfoSubscriptionProductBlock } from './WfoSubscriptionProductBlock' ;
15- import {
16- getFieldFromProductBlockInstanceValues ,
17- getProductBlockTitle ,
18- } from './utils' ;
15+ import { getProductBlockTitle } from './utils' ;
1916
2017interface WfoSubscriptionDetailTreeProps {
2118 productBlockInstances : ProductBlockInstance [ ] ;
@@ -47,9 +44,8 @@ export const WfoSubscriptionDetailTree = ({
4744 // Does this node have a parent?
4845 if ( shallowCopy . parent === null ) {
4946 // Doesn't look like it, so this node is the root of the tree
50- shallowCopy . label = getFieldFromProductBlockInstanceValues (
47+ shallowCopy . label = getProductBlockTitle (
5148 shallowCopy . productBlockInstanceValues ,
52- 'name' ,
5349 ) ;
5450 shallowCopy . callback = ( ) => setSelectedTreeNode ( shallowCopy . id ) ;
5551 depthList . push ( 0 ) ; // First id is on root
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ export const WfoSubscriptionProductBlock = ({
8484 ) }
8585 </ h3 >
8686 </ EuiText >
87- < EuiText > { `${ t (
87+ < EuiText size = "s" > { `${ t (
8888 'subscriptionInstanceId' ,
8989 ) } : ${ subscriptionInstanceId } `} </ EuiText >
9090 </ EuiFlexItem >
@@ -131,6 +131,7 @@ export const WfoSubscriptionProductBlock = ({
131131 ) : (
132132 < a
133133 href = { `${ PATH_SUBSCRIPTIONS } /${ ownerSubscriptionId } ` }
134+ target = "_blank"
134135 >
135136 { ownerSubscriptionId }
136137 </ a >
Original file line number Diff line number Diff line change @@ -44,10 +44,7 @@ export const WfoTreeNode: FC<WfoTreeNodeProps> = ({
4444 const expanded = expandedIds . includes ( item . id ) ;
4545 const selected = selectedIds . includes ( item . id ) ;
4646
47- let expandIcon = expanded ? 'arrowDown' : 'arrowRight' ;
48- if ( item . id === 0 ) {
49- expandIcon = expanded ? 'folderOpen' : 'folderClosed' ;
50- }
47+ const expandIcon = expanded ? 'arrowDown' : 'arrowRight' ;
5148
5249 return (
5350 < div style = { { paddingLeft : `${ level * parseInt ( theme . size . m ) } px` } } >
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export type TreeProviderProps = {
2323
2424export const TreeProvider : React . FC < TreeProviderProps > = ( { children } ) => {
2525 const [ depths , setDepths ] = React . useState < number [ ] > ( [ ] ) ;
26- const [ selectedIds , setSelectedIds ] = React . useState < number [ ] > ( [ ] ) ;
26+ const [ selectedIds , setSelectedIds ] = React . useState < number [ ] > ( [ 0 ] ) ;
2727 const [ expandedIds , setExpandedIds ] = React . useState < number [ ] > ( [ 0 ] ) ;
2828
2929 const toggleSelectedId = ( id : number ) => {
You can’t perform that action at this time.
0 commit comments