mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	added createdAt
This commit is contained in:
		
							parent
							
								
									1a7fe9f6c6
								
							
						
					
					
						commit
						02e10817aa
					
				| @ -3,7 +3,7 @@ | ||||
| const eventType = require('../event-type'); | ||||
| const logger = require('../logger'); | ||||
| const NotFoundError = require('../error/notfound-error'); | ||||
| const FEATURE_COLUMNS = ['name', 'description', 'enabled', 'strategies']; | ||||
| const FEATURE_COLUMNS = ['name', 'description', 'enabled', 'strategies', 'created_at']; | ||||
| 
 | ||||
| class FeatureToggleStore { | ||||
|     constructor (db, eventStore) { | ||||
| @ -49,6 +49,7 @@ class FeatureToggleStore { | ||||
|             description: row.description, | ||||
|             enabled: row.enabled > 0, | ||||
|             strategies: row.strategies, | ||||
|             createdAt: row.created_at, | ||||
|         }; | ||||
|     } | ||||
| 
 | ||||
|  | ||||
| @ -9,10 +9,12 @@ import Chip from 'react-toolbox/lib/chip'; | ||||
| import style from './feature.scss'; | ||||
| 
 | ||||
| const Feature = ({ feature, onFeatureClick, onFeatureRemove, metrics = { yes: 0, no: 0, hasData: false } }) => { | ||||
|     const { name, description, enabled, strategies } = feature; | ||||
|     const { name, description, enabled, strategies, createdAt } = feature; | ||||
|     const created = new Date(createdAt); | ||||
| 
 | ||||
|     const actions = [ | ||||
|         <div key="strategies">{strategies && strategies.map((s, i) => <Chip key={i}><small>{s.name}</small></Chip>)}</div>, | ||||
|         <div key="created"><small>({created.toLocaleDateString('nb-NO')})</small></div>, | ||||
|         <Link key="change" to={`/features/edit/${name}`} title={`Edit ${name}`}> | ||||
|             <FontIcon value="edit" className={style.action} /> | ||||
|         </Link>, | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user