PLT-5669: Change format of timestamp of access history (#5646)

Add new line for timestamp and forbid wrap for ip and sessionid of access history to
prevent unnecessary line wrap.
Этот коммит содержится в:
VeraLyu
2017-03-23 18:39:15 +08:00
коммит произвёл George Goldberg
родитель 41ebdb6441
Коммит 0326177253
2 изменённых файлов: 22 добавлений и 15 удалений

Просмотреть файл

@@ -229,12 +229,12 @@ class AuditTable extends React.Component {
let iContent; let iContent;
if (this.props.showIp) { if (this.props.showIp) {
iContent = <td className='word-break--all'>{auditInfo.ip}</td>; iContent = <td className='whitespace--nowrap word-break--all'>{auditInfo.ip}</td>;
} }
let sContent; let sContent;
if (this.props.showSession) { if (this.props.showSession) {
sContent = <td className='word-break--all'>{auditInfo.sessionId}</td>; sContent = <td className='whitespace--nowrap word-break--all'>{auditInfo.sessionId}</td>;
} }
const descStyle = {}; const descStyle = {};
@@ -244,7 +244,7 @@ class AuditTable extends React.Component {
accessList[i] = ( accessList[i] = (
<tr key={audit.id}> <tr key={audit.id}>
<td className='word-break--all'>{auditInfo.timestamp}</td> <td className='whitespace--nowrap word-break--all'>{auditInfo.timestamp}</td>
{uContent} {uContent}
<td <td
className='word-break--all' className='word-break--all'
@@ -615,18 +615,21 @@ export function formatAuditInfo(audit, formatMessage) {
const auditInfo = {}; const auditInfo = {};
auditInfo.timestamp = ( auditInfo.timestamp = (
<div> <div>
<FormattedDate <div>
value={date} <FormattedDate
day='2-digit' value={date}
month='short' day='2-digit'
year='numeric' month='short'
/> year='numeric'
{' - '} />
<FormattedTime </div>
value={date} <div>
hour='2-digit' <FormattedTime
minute='2-digit' value={date}
/> hour='2-digit'
minute='2-digit'
/>
</div>
</div> </div>
); );
auditInfo.userId = audit.user_id; auditInfo.userId = audit.user_id;

Просмотреть файл

@@ -26,6 +26,10 @@ body {
word-break: break-all; word-break: break-all;
} }
.whitespace--nowrap {
white-space: nowrap;
}
.overflow--ellipsis { .overflow--ellipsis {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;