Esempio n. 1
0
        public void DeleteTimeline(int id)
        {
            Timeline timeline = TimelineService.GetTimeline(id);

            if (timeline == null)
            {
                SendUpdate("Unable to find a timeline with that id");
                return;
            }

            TimelineService.DeleteTimeline(timeline);

            SendUpdate(string.Format("Timeline entry has been deleted: {0}: \"{1}\" at {2}", timeline.Id, timeline.Label, timeline.TimeStamp));
        }
Esempio n. 2
0
        public async Task <ActionResult <TimelineResponse> > GetTimeline(TimelineRequest request)
        {
            Stopwatch sw = new Stopwatch();

            sw.Start();
            TimelineResponse response;

            if (request.Filter == null || request.Filter.isDefault)
            {
                response = await TimelineService.GetTimelineFromTimeResults(context, request);
            }
            else
            {
                response = await TimelineService.GetTimeline(context, request);
            }
            sw.Stop();
            logger.LogInformation($"Get Timeline in {sw.ElapsedMilliseconds} ms");
            return(response);
        }