mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
feature: Show tooltips and featuretoggle names in event view
This commit is contained in:
parent
5c097daf45
commit
b2e05a8a6d
@ -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