Question about tables
I have the following table. But I would like the backup_date to appear as a column and show the result of each server on each date. It's possible?
7 Replies
And what is the issue?
Btw. you could also just use a
server()
relationship on the backup and load that one.I may have explained wrong or I may not be doing something right. This is just a hobby for me.. According to the attached photo, the photo above is what I currently have and the photo below is where I want to go. ignore the colors in the table below
Sure. If you have the same data for every server: It's a for-loop to create the columns. Then use
->getStateUSing()
to get the correct backup status for each columnThanks Dennis. I have reached this point where something is missing me because the result is not correct. Can someone help me see where the error could be? I see the same result on all servers for the day
https://gist.github.com/mendizalea/bb103f20f39f7265c29cd6e7cba5c0d6
Not sure why you are looping over the servers? They already are the rows. You just needs to loop over backups. Like "Last 5 backups"
Thank you for everything but I have reached a point of blockage, I can't find the solution. I'm going to try to redo everything I have, because I have gone through the shared code several times but I can't quite see the result.
Finally, once writing everything again I have achieved the necessary result. How could I modify the $month variable from the filter?
https://gist.github.com/mendizalea/74a647bc0a92aa702843fbc6678ca2d6