Browse Source

UI fix.

pull/691/head
Sebastian 5 years ago
parent
commit
7d2688a5dc
  1. 10
      backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStore.cs
  2. 6
      backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStore_Reader.cs
  3. 2
      frontend/app/features/content/pages/content/content-history-page.component.html

10
backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStore.cs

@ -62,12 +62,12 @@ namespace Squidex.Infrastructure.EventSourcing
.Ascending(x => x.Timestamp)),
new CreateIndexModel<MongoEventCommit>(
Index
.Ascending(x => x.EventStream)
.Ascending(x => x.Timestamp)),
.Ascending(x => x.Timestamp)
.Ascending(x => x.EventStream)),
new CreateIndexModel<MongoEventCommit>(
Index
.Ascending(x => x.EventStream)
.Descending(x => x.Timestamp)),
.Descending(x => x.Timestamp)
.Ascending(x => x.EventStream)),
new CreateIndexModel<MongoEventCommit>(
Index
.Ascending(x => x.EventStream)
@ -84,4 +84,4 @@ namespace Squidex.Infrastructure.EventSourcing
CanUseChangeStreams = clustered && clusterVersion >= new Version("4.0");
}
}
}
}

6
backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStore_Reader.cs

@ -117,7 +117,7 @@ namespace Squidex.Infrastructure.EventSourcing
var find =
Collection.Find(filterDefinition, options: Batching.Options)
.Limit((int)take).Sort(Sort.Descending(TimestampField));
.Limit((int)take).Sort(Sort.Descending(TimestampField).Ascending(EventStreamField));
var taken = 0;
@ -157,7 +157,7 @@ namespace Squidex.Infrastructure.EventSourcing
var find =
Collection.Find(filterDefinition)
.Limit((int)take).Sort(Sort.Ascending(TimestampField));
.Limit((int)take).Sort(Sort.Ascending(TimestampField).Ascending(EventStreamField));
var taken = 0;
@ -201,4 +201,4 @@ namespace Squidex.Infrastructure.EventSourcing
return byPosition;
}
}
}
}

2
frontend/app/features/content/pages/content/content-history-page.component.html

@ -117,7 +117,7 @@
</button>
</ng-template>
<sqx-form-hint [marginTop="1"]>
<sqx-form-hint marginTop="1">
{{ 'contents.lastUpdatedLabel' | sqxTranslate }}: {{content.lastModified | sqxFromNow}}
</sqx-form-hint>
</div>

Loading…
Cancel
Save