merge branch 'feat96-date-format-iso8601' into internal

pull/119/head
Anthony Lapenna 8 years ago
commit 75466cb57f

@ -84,7 +84,7 @@
<tbody>
<tr>
<td>Created</td>
<td>{{ container.Created | date: 'medium' }}</td>
<td>{{ container.Created|getisodate }}</td>
</tr>
<tr>
<td>Path</td>
@ -186,7 +186,8 @@
<tbody>
<tr ng-repeat="(key, val) in container.State">
<td>{{key}}</td>
<td>{{ val }}</td>
<td ng-if="key === 'StartedAt' || key === 'FinishedAt'">{{val|getisodate}}</td>
<td ng-if="key !== 'StartedAt' && key !== 'FinishedAt'">{{val}}</td>
</tr>
</tbody>
</table>

@ -50,7 +50,7 @@
</thead>
<tbody>
<tr ng-repeat="event in (events | filter:state.filter | orderBy:sortType:sortReverse)">
<td>{{ event.Time|getdatefromtimestamp }}</td>
<td>{{ event.Time|getisodatefromtimestamp }}</td>
<td>{{ event.Type }}</td>
<td>{{ event.Details }}</td>
</tr>

@ -154,15 +154,7 @@ angular.module('uifordocker.filters', [])
return [];
};
})
.filter('getdate', function () {
'use strict';
return function (data) {
//Multiply by 1000 for the unix format
var date = new Date(data * 1000);
return date.toDateString();
};
})
.filter('getdatefromtimestamp', function () {
.filter('getisodatefromtimestamp', function () {
'use strict';
return function (timestamp) {
return moment.unix(timestamp).format('YYYY-MM-DD HH:mm:ss');

@ -134,12 +134,6 @@ describe('filters', function () {
}));
});
describe('getdate', function () {
it('should convert the Docker date to a human readable form', inject(function (getdateFilter) {
expect(getdateFilter(1420424998)).toBe('Sun Jan 04 2015');
}));
});
describe('errorMsgFilter', function () {
it('should convert the $resource object to a string message',
inject(function (errorMsgFilter) {

Loading…
Cancel
Save