Skip to content
This repository was archived by the owner on Sep 2, 2023. It is now read-only.

Conversation

@EdwinBetanc0urt
Copy link
Member

@EdwinBetanc0urt EdwinBetanc0urt commented Apr 18, 2023

List Window Chart

Request

curl --location 'http://localhost:8085/api/adempiere/dashboard/window/charts?id=102&page_size=15&language=es&ts=1681759182029&window_id=0&tab_id=0' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIxMDAwODg5IiwiQURfQ2xpZW50X0lEIjoxMSwiQURfT3JnX0lEIjo1MDAwNiwiQURfUm9sZV9JRCI6MTAyLCJBRF9Vc2VyX0lEIjoxMDEsIk1fV2FyZWhvdXNlX0lEIjo1MDAwNiwiQURfTGFuZ3VhZ2UiOiJlc19NWCIsImlhdCI6MTY4MTc1NjU1OSwiZXhwIjoxNjgxODQyOTU5fQ.NuP5FhAQlouOxZmm6CMjuvZL6Wt9mWX1ClZW9OdykIM'

Response

{
    "code": 200,
    "result": {
        "record_count": 0,
        "next_page_token": "",
        "records": [
            {
                "id": 105,
                "uuid": "d476e1e4-0927-11e9-a58f-7a0060f0aa01",
                "name": "Total Open Service Requests",
                "description": "Open Service Requests by Status",
                "sequence": 0,
                "is_collapsible": true,
                "is_open_by_default": true,
                "dashboard_type": "chart",
                "chart_type": "BC",
                "context_column_names": []
            },
            {
                "id": 101,
                "uuid": "d46a76e8-0927-11e9-a58f-7a0060f0aa01",
                "name": "Invoice Revenue",
                "description": "100k in Revenue",
                "sequence": 0,
                "is_collapsible": true,
                "is_open_by_default": true,
                "dashboard_type": "chart",
                "chart_type": "BC",
                "context_column_names": []
            },
            {
                "id": 102,
                "uuid": "d4705b4e-0927-11e9-a58f-7a0060f0aa01",
                "name": "Open Invoices",
                "description": "Open Invoices max $1000",
                "sequence": 0,
                "is_collapsible": true,
                "is_open_by_default": true,
                "dashboard_type": "chart",
                "chart_type": "BC",
                "context_column_names": []
            },
            {
                "id": 104,
                "uuid": "d472dfd6-0927-11e9-a58f-7a0060f0aa01",
                "name": "Service Requests (Quarter)",
                "description": "Open Service Requests in Time",
                "sequence": 0,
                "is_collapsible": true,
                "is_open_by_default": true,
                "dashboard_type": "chart",
                "chart_type": "BC",
                "context_column_names": []
            }
        ]
    }
}

Get Window Metrics

Request

curl --location 'http://localhost:8085/api/adempiere/dashboard/window/metrics?page_size=15&language=es&ts=1681759182029' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIxMDAwODg5IiwiQURfQ2xpZW50X0lEIjoxMSwiQURfT3JnX0lEIjo1MDAwNiwiQURfUm9sZV9JRCI6MTAyLCJBRF9Vc2VyX0lEIjoxMDEsIk1fV2FyZWhvdXNlX0lEIjo1MDAwNiwiQURfTGFuZ3VhZ2UiOiJlc19NWCIsImlhdCI6MTY4MTc1NjU1OSwiZXhwIjoxNjgxODQyOTU5fQ.NuP5FhAQlouOxZmm6CMjuvZL6Wt9mWX1ClZW9OdykIM' \
--data '{
    "id": 102,
    "table_name": "C_Invoice",
    "record_id": 0,
    "record_uuid": "",
    "context_attributes": []
}
'

Response

{
    "code": 200,
    "result": {
        "id": 102,
        "uuid": "d4705b4e-0927-11e9-a58f-7a0060f0aa01",
        "name": "Open Invoices",
        "description": "Open Invoices max $1000",
        "x_axis_label": "Mes",
        "y_axis_label": "Open Invoices",
        "measure_target": 1000,
        "series": [
            {
                "name": "2020",
                "data_set": [
                    {
                        "name": "01/2020",
                        "value": 0
                    },
                    {
                        "name": "07/2020",
                        "value": 161.12
                    }
                ]
            },
            {
                "name": "2021",
                "data_set": [
                    {
                        "name": "01/2021",
                        "value": 285.83
                    }
                ]
            },
            {
                "name": "2023",
                "data_set": [
                    {
                        "name": "03/2023",
                        "value": 893
                    },
                    {
                        "name": "04/2023",
                        "value": 790.4
                    },
                    {
                        "name": "08/2023",
                        "value": -0.67
                    }
                ]
            }
        ],
        "color_schemas": [
            {
                "name": "",
                "color": "#00FF00",
                "percent": 50
            },
            {
                "name": "",
                "color": "#FFFF00",
                "percent": 100
            },
            {
                "name": "",
                "color": "#FF0000",
                "percent": 9999
            },
            {
                "name": "",
                "color": "",
                "percent": 0
            }
        ]
    }
}

Additional context

fixes https://github.com/solop-develop/frontend-core/issues/959

@EdwinBetanc0urt EdwinBetanc0urt added the enhancement New feature or request label Apr 18, 2023
@EdwinBetanc0urt EdwinBetanc0urt self-assigned this Apr 18, 2023
@EdwinBetanc0urt EdwinBetanc0urt merged commit c003f79 into solop-develop:experimental Apr 18, 2023
@EdwinBetanc0urt EdwinBetanc0urt deleted the feature/window-chart branch May 8, 2023 18:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crear tableros en Ventanas de dimensiones (SDN, Producto, etc)

1 participant