mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix rename with new route
This commit is contained in:
		
							parent
							
								
									946f9af733
								
							
						
					
					
						commit
						da5381fdf9
					
				@ -8,6 +8,9 @@ class ArchiveList extends Component {
 | 
			
		||||
 | 
			
		||||
    render () {
 | 
			
		||||
        const { archive, revive } = this.props;
 | 
			
		||||
        archive.forEach(e => {
 | 
			
		||||
            e.reviveName = e.name;
 | 
			
		||||
        });
 | 
			
		||||
        return (
 | 
			
		||||
            <div>
 | 
			
		||||
                <h6>Toggle Archive</h6>
 | 
			
		||||
@ -15,8 +18,8 @@ class ArchiveList extends Component {
 | 
			
		||||
                <DataTable
 | 
			
		||||
                    rows={archive}
 | 
			
		||||
                    style={{ width: '100%' }}>
 | 
			
		||||
                    <TableHeader style={{ width: '25px' }} name="strategies" cellFormatter={(name) => (
 | 
			
		||||
                        <IconButton colored name="undo" onClick={() => revive(name)} />
 | 
			
		||||
                    <TableHeader style={{ width: '25px' }} name="reviveName" cellFormatter={(reviveName) => (
 | 
			
		||||
                        <IconButton colored name="undo" onClick={() => revive(reviveName)} />
 | 
			
		||||
                    )}>Revive</TableHeader>
 | 
			
		||||
                    <TableHeader style={{ width: '25px' }} name="enabled" cellFormatter={(v) => (v ? 'Yes' : '-')}>Enabled</TableHeader>
 | 
			
		||||
                    <TableHeader name="name">Toggle name</TableHeader>
 | 
			
		||||
 | 
			
		||||
@ -8,11 +8,10 @@ function fetchAll () {
 | 
			
		||||
        .then(response => response.json());
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function revive (feature) {
 | 
			
		||||
    return fetch(`${URI}/revive`, {
 | 
			
		||||
function revive (featureName) {
 | 
			
		||||
    return fetch(`${URI}/revive/${featureName}`, {
 | 
			
		||||
        method: 'POST',
 | 
			
		||||
        headers,
 | 
			
		||||
        body: JSON.stringify(feature),
 | 
			
		||||
        credentials: 'include',
 | 
			
		||||
    }).then(throwIfNotSuccess);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user