mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	Improvements on log view
This commit is contained in:
		
							parent
							
								
									69ecd65da5
								
							
						
					
					
						commit
						cf3eaefb46
					
				| @ -1,5 +1,5 @@ | ||||
| var knex          = require('./dbPool'); | ||||
| var EVENT_COLUMNS = ['id', 'type', 'created_by', 'data']; | ||||
| var EVENT_COLUMNS = ['id', 'type', 'created_by', 'created_at', 'data']; | ||||
| 
 | ||||
| function storeEvent(event) { | ||||
|     return knex('events').insert({ | ||||
| @ -31,6 +31,7 @@ function rowToEvent(row) { | ||||
|         id: row.id, | ||||
|         type: row.type, | ||||
|         createdBy: row.created_by, // jshint ignore:line
 | ||||
|         createdAt: row.created_at, // jshint ignore:line
 | ||||
|         data: row.data | ||||
|     }; | ||||
| } | ||||
|  | ||||
| @ -6,10 +6,19 @@ var LogEntry = React.createClass({ | ||||
|     }, | ||||
| 
 | ||||
|     render: function() { | ||||
|         var d = new Date(this.props.event.createdAt); | ||||
|         return ( | ||||
|             <tr> | ||||
|                 <td>{this.props.event.data.name}</td> | ||||
|                 <td>{this.props.event.type}</td> | ||||
|                 <td> | ||||
|                     {d.getDate() + "." + d.getMonth() + "." + d.getFullYear()}<br /> | ||||
|                     kl. {d.getHours() + "." + d.getMinutes()} | ||||
|                 </td> | ||||
|                 <td> | ||||
|                     {this.props.event.type} | ||||
|                 </td> | ||||
|                 <td> | ||||
|                     <code className='JSON'>{JSON.stringify(this.props.event.data)}</code> | ||||
|                 </td> | ||||
|                 <td>{this.props.event.createdBy}</td> | ||||
|             </tr> | ||||
|         ); | ||||
|  | ||||
| @ -15,8 +15,9 @@ var LogEntryList = React.createClass({ | ||||
|                 <table className='outerborder'> | ||||
|                     <thead> | ||||
|                         <tr> | ||||
|                             <th>Feature</th> | ||||
|                             <th>When</th> | ||||
|                             <th>Action</th> | ||||
|                             <th>Data</th> | ||||
|                             <th>Author</th> | ||||
|                         </tr> | ||||
|                     </thead> | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user