Skip to content

Commit

Permalink
Merge pull request #422 from cmu-sei/v8
Browse files Browse the repository at this point in the history
fixes up #418
  • Loading branch information
sei-dupdyke authored Oct 8, 2024
2 parents 681b03f + cd64f43 commit 60ed333
Show file tree
Hide file tree
Showing 4 changed files with 1,785 additions and 1,786 deletions.
8 changes: 4 additions & 4 deletions src/Ghosts.Api/Controllers/Api/TimelinesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public TimelinesController(ITimelineService timelineService, IMachineTimelinesSe
/// <returns>MachineTimelines</returns>
[ProducesResponseType(typeof(MachineTimeline), 200)]
[SwaggerOperation("TimelinesGetByMachineId")]
[HttpGet("timelines/{machineId}")]
[HttpGet("{machineId}")]
public async Task<IActionResult> TimelinesGetByMachineId([FromRoute] Guid machineId, CancellationToken ct)
{
return Ok(await _machineTimelinesService.GetByMachineIdAsync(machineId, ct));
Expand All @@ -52,7 +52,7 @@ public async Task<IActionResult> TimelinesGetByMachineId([FromRoute] Guid machin
/// <returns>MachineTimeline</returns>
[ProducesResponseType(typeof(MachineTimeline), 200)]
[SwaggerOperation("TimelinesGetByMachineIdAndTimelineId")]
[HttpGet("timelines/{machineId}/{timelineId}")]
[HttpGet("{machineId}/{timelineId}")]
public async Task<IActionResult> TimelinesGetByMachineIdAndTimelineId([FromRoute] Guid machineId, [FromRoute] Guid timelineId, CancellationToken ct)
{
return Ok(await _machineTimelinesService.GetByMachineIdAndTimelineIdAsync(machineId, timelineId, ct));
Expand All @@ -64,7 +64,7 @@ public async Task<IActionResult> TimelinesGetByMachineIdAndTimelineId([FromRoute
/// <param name="machineUpdate">The update to send</param>
/// <param name="ct">Cancellation token</param>
/// <returns>204 No content</returns>
[HttpPost("timelines")]
[HttpPost]
// [ProducesResponseType(typeof(IActionResult), (int) HttpStatusCode.NoContent)] Swagger hates this https://stackoverflow.com/questions/35605427/swagger-ui-freezes-after-api-fetch-and-browser-crashes
[SwaggerOperation("TimelinesCreate")]
public async Task<IActionResult> TimelinesCreate([FromBody] MachineUpdateViewModel machineUpdate, CancellationToken ct)
Expand All @@ -73,7 +73,7 @@ public async Task<IActionResult> TimelinesCreate([FromBody] MachineUpdateViewMod
return NoContent();
}

[HttpPost("timelines/{machineId}/{timelineId}/stop")]
[HttpPost("{machineId}/{timelineId}/stop")]
[SwaggerOperation("TimelinesStop")]
public async Task<IActionResult> TimelinesStop([FromRoute] Guid machineId, [FromRoute] Guid timelineId, CancellationToken ct)
{
Expand Down
95 changes: 47 additions & 48 deletions src/ghosts.ui/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,51 +19,50 @@ services:
# persist the timelines in the sqlite db
# volumes:
# - ./sqlite.db:/app/sqlite.db
# From here on this is the basic GHOSTS docker compose
# postgres:
# image: postgres
# container_name: ghosts-postgres
# environment:
# POSTGRES_DB: ghosts
# POSTGRES_USER: ghosts
# POSTGRES_PASSWORD: scotty@1
# volumes:
# - ./_db:/var/lib/postgresql/data
# logging:
# options:
# max-size: '100m'
# max-file: '5'
# ports:
# - '5432:5432'
# healthcheck:
# test: ['CMD-SHELL', 'pg_isready -U ghosts']
# interval: 10s
# timeout: 5s
# retries: 10
# networks:
# - ghosts-network
# restart: always
# ghosts-api:
# image: dustinupdyke/ghosts:latest
# container_name: ghosts-api
# depends_on:
# - postgres
# ports:
# - '5000:5000'
# networks:
# - ghosts-network
# restart: always
# grafana:
# image: grafana/grafana
# container_name: ghosts-grafana
# depends_on:
# - postgres
# ports:
# - '3000:3000'
# networks:
# - ghosts-network
# restart: always
# volumes:
# - ./_g:/var/lib/grafana
# user: root

# From here on this is the basic GHOSTS docker compose
# postgres:
# image: postgres
# container_name: ghosts-postgres
# environment:
# POSTGRES_DB: ghosts
# POSTGRES_USER: ghosts
# POSTGRES_PASSWORD: scotty@1
# volumes:
# - ./_db:/var/lib/postgresql/data
# logging:
# options:
# max-size: '100m'
# max-file: '5'
# ports:
# - '5432:5432'
# healthcheck:
# test: ['CMD-SHELL', 'pg_isready -U ghosts']
# interval: 10s
# timeout: 5s
# retries: 10
# networks:
# - ghosts-network
# restart: always
# ghosts-api:
# image: dustinupdyke/ghosts:latest
# container_name: ghosts-api
# depends_on:
# - postgres
# ports:
# - '5000:5000'
# networks:
# - ghosts-network
# restart: always
# grafana:
# image: grafana/grafana
# container_name: ghosts-grafana
# depends_on:
# - postgres
# ports:
# - '3000:3000'
# networks:
# - ghosts-network
# restart: always
# volumes:
# - ./_g:/var/lib/grafana
# user: root
Loading

0 comments on commit 60ed333

Please sign in to comment.