New-StatusimoEvent Not Creating Incident JSON inside of Specified Folder

Aperta
#5 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
powershell
Ambito
devops

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
PowerShell
Stelle
110
Fork
13
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di EvotecIT/Statusimo

Tutte le issue di EvotecIT/Statusimo

Issue simili

Altre issue su DevOps

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.