New-StatusimoEvent Not Creating Incident JSON inside of Specified Folder

Đang mở
#5 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
powershell
Lĩnh vực
devops

Hướng nghiên cứu

Start with Examples/Add-Incident2.ps1 and run the provided New-StatusimoEvent splat using the same paths as the working maintenance example. Compare the event command's behavior with New-StatusimoMaintenance, then verify that a JSON file is created under the specified incidents folder and remains usable by New-StatusimoPage.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

I'm following the examples provided in the \Examples\Add-Incident2.ps1 file, and I cannot replicate/get my JSON file to create in the folder I've specified.

I tried New-StatusimoMaintenance and it created the file just fine and added into the statusimo status page. I've included both of my Splat's and Examples that I'm using below. Both Incident and Maintenance Examples provided are taken straight from the \Examples folder and modified to fit my test environment. All Variables point to the same folder, and Incidents/Maintenance are sub folders. Variables are populated with data. Just installed Statusimo today from the PSGallery

Get-Module Statusimo

ModuleType Version    Name                                ExportedCommands                                                                                                                                                                                  
---------- -------    ----                                ----------------                                                                                                                                                                                  
Script     0.6        Statusimo                           {New-StatusimoEvent, New-StatusimoMaintenance, New-StatusimoPage, Remove-StatusimoMaintenance...}    
$dashboard = "Path\To\page.html"
$incidents = "Path\To\Incidents\"
$maintenance = "Path\To\Maintenance\"

$incidentSplat = @{
    Date       = (Get-Date)
    Overview   = "Test"
    Title      = 'Test'
    Status     = 'Operational'
    Service    = 'Test'
    FolderPath = $incidents
}

New-StatusimoEvent @incidentSplat

$newStatusimoMaintenanceSplat = @{
    Title = 'Test'
    DateStart = (Get-Date).AddDays(5)
    DateEnd = (Get-Date).AddDays(6).AddHours(2)
    Service = 'Test'
    Overview = "Test"
    FolderPath = $maintenance
}
New-StatusimoMaintenance @newStatusimoMaintenanceSplat 
New-StatusimoPage -FilePath $dashboard -IncidentsPath $incidents -MaintenancePath $maintenance

I then go to my folder specified in $incidents and there is nothing there, but if I would check maintenance. There would be a valid JSON with a similar name to Test_CURRENT_DATE_random_string.json.

Ngôn ngữ chính
PowerShell
Star
110
Fork
13
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của EvotecIT/Statusimo

Tất cả issue của EvotecIT/Statusimo

Issue tương tự

Thêm issue về DevOps

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.