mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	Merge pull request #165 from Kouzukii/master
Show tooltips and featuretoggle names in event history view
This commit is contained in:
		
						commit
						e469ea89c5
					
				@ -15,6 +15,7 @@ class HistoryList extends Component {
 | 
				
			|||||||
        settings: PropTypes.object,
 | 
					        settings: PropTypes.object,
 | 
				
			||||||
        location: PropTypes.object,
 | 
					        location: PropTypes.object,
 | 
				
			||||||
        updateSetting: PropTypes.func.isRequired,
 | 
					        updateSetting: PropTypes.func.isRequired,
 | 
				
			||||||
 | 
					        hideName: PropTypes.bool,
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    toggleShowDiff() {
 | 
					    toggleShowDiff() {
 | 
				
			||||||
@ -25,7 +26,7 @@ class HistoryList extends Component {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    render() {
 | 
					    render() {
 | 
				
			||||||
        const showData = this.props.settings.showData;
 | 
					        const showData = this.props.settings.showData;
 | 
				
			||||||
        const { history } = this.props;
 | 
					        const { history, hideName } = this.props;
 | 
				
			||||||
        if (!history || history.length < 0) {
 | 
					        if (!history || history.length < 0) {
 | 
				
			||||||
            return null;
 | 
					            return null;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@ -34,6 +35,7 @@ class HistoryList extends Component {
 | 
				
			|||||||
            <span
 | 
					            <span
 | 
				
			||||||
                className={commonStyles.truncate}
 | 
					                className={commonStyles.truncate}
 | 
				
			||||||
                style={{ display: 'inline-block', verticalAlign: 'middle', width: '100%' }}
 | 
					                style={{ display: 'inline-block', verticalAlign: 'middle', width: '100%' }}
 | 
				
			||||||
 | 
					                title={v}
 | 
				
			||||||
            >
 | 
					            >
 | 
				
			||||||
                {v}
 | 
					                {v}
 | 
				
			||||||
            </span>
 | 
					            </span>
 | 
				
			||||||
@ -51,6 +53,7 @@ class HistoryList extends Component {
 | 
				
			|||||||
                        Object.assign(
 | 
					                        Object.assign(
 | 
				
			||||||
                            {
 | 
					                            {
 | 
				
			||||||
                                diff: <HistoryItemDiff entry={entry} />,
 | 
					                                diff: <HistoryItemDiff entry={entry} />,
 | 
				
			||||||
 | 
					                                name: entry.data.name,
 | 
				
			||||||
                            },
 | 
					                            },
 | 
				
			||||||
                            entry
 | 
					                            entry
 | 
				
			||||||
                        )
 | 
					                        )
 | 
				
			||||||
@ -58,12 +61,19 @@ class HistoryList extends Component {
 | 
				
			|||||||
                    className={commonStyles.fullwidth}
 | 
					                    className={commonStyles.fullwidth}
 | 
				
			||||||
                    style={{ border: 0, tableLayout: 'fixed', minWidth: '840px' }}
 | 
					                    style={{ border: 0, tableLayout: 'fixed', minWidth: '840px' }}
 | 
				
			||||||
                >
 | 
					                >
 | 
				
			||||||
                    <TableHeader name="type" cellFormatter={truncateTableCell} style={{ width: '136px' }}>
 | 
					                    <TableHeader name="type" cellFormatter={truncateTableCell} style={{ width: '115px' }}>
 | 
				
			||||||
                        Type
 | 
					                        Type
 | 
				
			||||||
                    </TableHeader>
 | 
					                    </TableHeader>
 | 
				
			||||||
                    <TableHeader name="createdBy" cellFormatter={truncateTableCell} style={{ width: '115px' }}>
 | 
					                    <TableHeader name="createdBy" cellFormatter={truncateTableCell} style={{ width: '115px' }}>
 | 
				
			||||||
                        User
 | 
					                        User
 | 
				
			||||||
                    </TableHeader>
 | 
					                    </TableHeader>
 | 
				
			||||||
 | 
					                    {hideName ? (
 | 
				
			||||||
 | 
					                        []
 | 
				
			||||||
 | 
					                    ) : (
 | 
				
			||||||
 | 
					                        <TableHeader name="name" cellFormatter={truncateTableCell} style={{ width: '153px' }}>
 | 
				
			||||||
 | 
					                            Feature Toggle
 | 
				
			||||||
 | 
					                        </TableHeader>
 | 
				
			||||||
 | 
					                    )}
 | 
				
			||||||
                    <TableHeader name="diff">Diff</TableHeader>
 | 
					                    <TableHeader name="diff">Diff</TableHeader>
 | 
				
			||||||
                    <TableHeader
 | 
					                    <TableHeader
 | 
				
			||||||
                        numeric
 | 
					                        numeric
 | 
				
			||||||
 | 
				
			|||||||
@ -18,7 +18,7 @@ class HistoryListToggle extends Component {
 | 
				
			|||||||
            return <span>fetching..</span>;
 | 
					            return <span>fetching..</span>;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        const { history } = this.props;
 | 
					        const { history } = this.props;
 | 
				
			||||||
        return <HistoryList history={history} title="Change log" />;
 | 
					        return <HistoryList history={history} hideName title="Change log" />;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user