kytos-ng / maintenance

Kytos Maintenance Window NApp
https://kytos-ng.github.io/api/maintenance.html
0 stars 8 forks source link

List Maintenace Windows UI #43

Closed aduan002 closed 2 years ago

aduan002 commented 2 years ago

List Maintenance Windows UI No Windows List Maintenance Windows UI

rmotitsuki commented 2 years ago

Do you have some "real world" examples for the field "items"? An item can be a UNI, Link or Switch, and they won´t be rendered correctly with String.join

aduan002 commented 2 years ago

Do you have some "real world" examples for the field "items"? An item can be a UNI, Link or Switch, and they won´t be rendered correctly with String.join

I don't. I originally thought that an item could be anything, so I posted any string into items to test the GET and the table display. Can you give me an example of what a UNI, Link, or Switch would be? Then I can use that when testing the display.

viniarck commented 2 years ago

Do you have some "real world" examples for the field "items"? An item can be a UNI, Link or Switch, and they won´t be rendered correctly with String.join

I don't. I originally thought that an item could be anything, so I posted any string into items to test the GET and the table display. Can you give me an example of what a UNI, Link, or Switch would be? Then I can use that when testing the display.

@Aduan002, based on what we currently have in the OpenAPI spec, this would be a sample response from GET /maintenance with items that has a switch (str at the moment), UNI (also known as Endpoint), and Links:

[
    {
        "description": "some_mw_4",
        "end": "2022-03-06T17:38:01+0000",
        "id": "some_mw_4",
        "items": [
            {
                "endpoint_a": {
                    "interface_id": "00:00:00:00:00:00:00:03:2"
                },
                "endpoint_b": {
                    "interface_id": "00:00:00:00:00:00:00:02:3"
                },
                "id": "4d42dc0852278accac7d9df15418f6d921db160b13d674029a87cef1b5f67f30"
            },
            {
                "endpoint_a": {
                    "interface_id": "00:00:00:00:00:00:00:02:2"
                },
                "endpoint_b": {
                    "interface_id": "00:00:00:00:00:00:00:01:2"
                },
                "id": "cf0f4071be426b3f745027f5d22bc61f8312ae86293c9b28e7e66015607a9260"
            },
            {
                "interface_id": "00:00:00:00:00:00:00:01:3"
            },
            "00:00:00:00:00:00:00:03"
        ],
        "start": "2022-03-06T15:05:01+0000",
        "status": 0
    }
]

Feel free to use this object to test the display. In the future, in the back-end we might make it easier to identify each object type in the items list, but for now this is what we have implemented in this iteration.

2022-02-16-121258_1919x303_scrot

viniarck commented 2 years ago

@Aduan002 regarding the threads that I opened previously, I marked them as resolved, thanks for the commits you've pushed.

aduan002 commented 2 years ago

Ah, I see. In the API, it just had "string", but I get it now. I'll fix it. Thank you.

aduan002 commented 2 years ago

Thank you.