@@ -11,15 +11,15 @@ interface Props {
11
11
}
12
12
13
13
interface State {
14
- decorate : boolean ;
14
+ prettify : boolean ;
15
15
}
16
16
17
17
export class JobShowComponent extends React . Component < Props , State > {
18
18
constructor ( props : Props ) {
19
19
super ( props ) ;
20
20
21
21
this . state = {
22
- decorate : true ,
22
+ prettify : true ,
23
23
} ;
24
24
}
25
25
@@ -30,18 +30,18 @@ export class JobShowComponent extends React.Component<Props, State> {
30
30
}
31
31
32
32
shouldComponentUpdate ( nextProps : Props , nextState : State ) {
33
- return this . state . decorate !== nextState . decorate ||
33
+ return this . state . prettify !== nextState . prettify ||
34
34
this . props . jobStatus === Status . InProgress ||
35
35
this . props . jobStatus !== nextProps . jobStatus ;
36
36
}
37
37
38
38
render ( ) {
39
39
let buffer : React . ReactElement < any > ;
40
- let canBeDecorated = this . props . job . canBeDecorated ( ) ;
41
- if ( this . props . job . interceptionResult && this . state . decorate ) {
40
+ let canBePrettified = this . props . job . canBePrettified ( ) ;
41
+ if ( this . props . job . interceptionResult && this . state . prettify ) {
42
42
buffer = this . props . job . interceptionResult ;
43
- } else if ( canBeDecorated && this . state . decorate ) {
44
- buffer = this . props . job . decorate ( ) ;
43
+ } else if ( canBePrettified && this . state . prettify ) {
44
+ buffer = this . props . job . prettify ( ) ;
45
45
} else {
46
46
buffer = < BufferComponent job = { this . props . job } /> ;
47
47
}
@@ -50,16 +50,16 @@ export class JobShowComponent extends React.Component<Props, State> {
50
50
< div className = { "job" } >
51
51
< JobHeaderComponent
52
52
job = { this . props . job }
53
- showDecorationToggle = { ! ! this . props . job . interceptionResult || canBeDecorated }
54
- decorateToggler = { ( ) => {
53
+ showPrettifyToggle = { ! ! this . props . job . interceptionResult || canBePrettified }
54
+ prettifyToggler = { ( ) => {
55
55
if ( this . props . job . interceptionResult ) {
56
56
// Re-execute without intercepting
57
57
this . props . job . execute ( { allowInterception : false } ) ;
58
58
}
59
- // Show non-decorated output
60
- this . setState ( { decorate : ! this . state . decorate } ) ;
59
+ // Show not prettified output
60
+ this . setState ( { prettify : ! this . state . prettify } ) ;
61
61
} }
62
- isDecorated = { this . state . decorate }
62
+ isPrettified = { this . state . prettify }
63
63
/>
64
64
{ buffer }
65
65
</ div >
0 commit comments