File tree Expand file tree Collapse file tree 9 files changed +26
-12
lines changed Expand file tree Collapse file tree 9 files changed +26
-12
lines changed Original file line number Diff line number Diff line change 20
20
height : 32px ;
21
21
color : inherit ;
22
22
text-decoration : none ;
23
+ align-items : center ;
23
24
24
25
& .collapsed {
25
26
justify-content : center ;
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ export const NavPath = (props: Props) => {
19
19
< nav className = { cn ( styles . root , props . className ) } >
20
20
{ props . routes . map ( ( route , i ) => {
21
21
const isLast = ( i + 1 ) === props . routes . length
22
+ const nameWithIndent = route . name . replace ( '/' , ' / ' )
22
23
23
24
return (
24
25
< React . Fragment key = { i } >
@@ -28,7 +29,7 @@ export const NavPath = (props: Props) => {
28
29
className = { styles . link }
29
30
activeClassName = { styles . active }
30
31
>
31
- { route . name }
32
+ { nameWithIndent }
32
33
</ NavLink >
33
34
{ ! isLast && < span className = { styles . divider } > /</ span > }
34
35
</ React . Fragment >
Original file line number Diff line number Diff line change 6
6
*/
7
7
8
8
import cn from 'classnames'
9
- import { useState } from 'react'
9
+ import { useEffect , useState } from 'react'
10
10
import copy from 'copy-to-clipboard'
11
11
import { makeStyles } from '@material-ui/core'
12
12
import { useHistory } from 'react-router-dom'
@@ -72,7 +72,7 @@ export const BranchesTable = ({
72
72
73
73
const [ state , setState ] = useState ( {
74
74
sortByParent : 'desc' ,
75
- branches : branchesData ?? [ ] ,
75
+ branches : [ ] as GetBranchesResponseType [ ] ,
76
76
} )
77
77
const [ branchId , setBranchId ] = useState ( '' )
78
78
const [ isOpenDestroyModal , setIsOpenDestroyModal ] = useState ( false )
@@ -94,6 +94,13 @@ export const BranchesTable = ({
94
94
} )
95
95
}
96
96
97
+ useEffect ( ( ) => {
98
+ setState ( {
99
+ sortByParent : 'desc' ,
100
+ branches : branchesData ?? [ ] ,
101
+ } )
102
+ } , [ branchesData ] )
103
+
97
104
if ( ! state . branches . length ) {
98
105
return < p className = { classes . marginTop } > { emptyTableText } </ p >
99
106
}
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ export const Branches = observer((): React.ReactElement => {
102
102
103
103
{ ! branchesList . length && (
104
104
< Tooltip content = "No existing branch" >
105
- < div >
105
+ < div style = { { display : 'flex' } } >
106
106
< InfoIcon className = { classes . infoIcon } />
107
107
</ div >
108
108
</ Tooltip >
Original file line number Diff line number Diff line change @@ -252,7 +252,7 @@ export const CreateBranchPage = observer(
252
252
form, copy the command below and paste it into your terminal.
253
253
</ p >
254
254
< SyntaxHighlight
255
- content = { getCliCreateBranchCommand ( formik . values . branchName ) }
255
+ content = { getCliCreateBranchCommand ( formik . values . branchName , formik . values . baseBranch ) }
256
256
/>
257
257
< SectionTitle
258
258
className = { classes . marginTop }
Original file line number Diff line number Diff line change 1
- export const getCliCreateBranchCommand = ( branchName : string ) => {
2
- return `dblab branch create ${ branchName ? branchName : `<BRANCH_NAME>` } `
1
+ export const getCliCreateBranchCommand = (
2
+ branchName : string ,
3
+ parentBranchName : string ,
4
+ ) => {
5
+ return `dblab branch create ${ branchName ? branchName : `<BRANCH_NAME>` } ${
6
+ parentBranchName !== `master` ? parentBranchName : ``
7
+ } `
3
8
}
4
9
5
10
export const getCliBranchListCommand = ( ) => {
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ export const Clones = observer((props: ClonesProps) => {
110
110
111
111
{ ! hasSnapshots && (
112
112
< Tooltip content = "No snapshots" >
113
- < div >
113
+ < div style = { { display : 'flex' } } >
114
114
< InfoIcon className = { classes . infoIcon } />
115
115
</ div >
116
116
</ Tooltip >
Original file line number Diff line number Diff line change @@ -62,9 +62,9 @@ export const Status = observer(() => {
62
62
) }
63
63
{ uiVersion && < Property name = "UI version" > { `v${ uiVersion } ` } </ Property > }
64
64
{ version && < Property name = "Engine version" > { version } </ Property > }
65
- { config ?. dockerImage && (
66
- < Property name = "Docker image" > { config ?. dockerImage } </ Property >
67
- ) }
65
+ { config ?. dockerPath && (
66
+ < Property name = "Docker image" > { config ?. dockerPath } </ Property >
67
+ ) }
68
68
69
69
{ ! isStatusOk && (
70
70
< div className = { styles . controls } >
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ export const Snapshots = observer(() => {
98
98
99
99
{ ! hasClones && (
100
100
< Tooltip content = "No clones" >
101
- < div >
101
+ < div style = { { display : 'flex' } } >
102
102
< InfoIcon className = { classes . infoIcon } />
103
103
</ div >
104
104
</ Tooltip >
You can’t perform that action at this time.
0 commit comments