{ "meta": { "version": "4.000.9103", "fileFormatVersion": "0.4", "date": "2024-12-02T20:48:32.011Z", "name": "webservice-post-input-triggered-py", "description": "HTTP POST using REST API dataNode with body from another Variable dataNode. Button triggered execution", "groupName": "Python", "tags": [ { "text": "DataNodes" }, { "text": "REST-API" }, { "text": "Widgets" }, { "text": "Slider" }, { "text": "Button" } ], "schedulerLogOff": true }, "data": { "datanodes": [ { "name": "Input", "type": "JSON_var_plugin", "settings": { "name": "Input", "json_var": "{\"length\":71,\"width\":44}" } }, { "name": "InputArgs", "type": "Python_plugin", "settings": { "name": "InputArgs", "autoStart": true, "explicitTrig": false, "content": "return { \n \"X\": dataNodes[\"Input\"][\"length\"], \n \"Y\": dataNodes[\"Input\"][\"width\"]\n}", "dockerImage": { "name": "Pyodide", "id": "__PYODIDE__" } } }, { "name": "Surface", "type": "REST_web-service_from_datasource", "settings": { "name": "Surface", "url": "https://compute20190425045435.azurewebsites.net/ComputeService.asmx/Surface", "use_xproxy": true, "sampleTime": 0, "autoStart": false, "explicitTrig": true, "req_data_type": "JSON", "resp_data_type": "JSON", "method": "POST", "body": "return dataNodes[\"InputArgs\"];\n", "headers": [ { "name": "Content-Type", "value": "application/json" } ], "proxyHash": "eyJBZGRyZXNzIjoiaHR0cHM6Ly9jb21wdXRlMjAxOTA0MjUwNDU0MzUuYXp1cmV3ZWJzaXRlcy5uZXQvQ29tcHV0ZVNlcnZpY2UuYXNteC9TdXJmYWNlIiwiSG9zdCI6InhkYXNoIn0=", "proxySig": "5TM10MtZYvnW/sf2ZrpNxroEC5/u3IzDOTvHwTGaJC7Ve8mvIFTHNTSRJC01sF4++1mTDAzHz2vWI03ypu1tkethTosHJxRjcAnrj3nUMMB9B3vlYUwnXguGTw5Y8ov0vbsaUirTTGvrJw68T2IC5A==" } } ] }, "libraries": { "pyodideStandard": [ "numpy", "pandas" ], "pyodideMicropip": [] }, "dashboard": { "flatUiHorizontalSliderA": { "layout": { "top": 4, "left": 4, "height": 38, "width": 367, "z-index": "1" }, "container": { "instanceId": "flatUiHorizontalSliderA", "modelJsonId": "flatUiHorizontalSlider" }, "modelParameters": { "label": "length", "inheritLabelFromData": true, "displayLabel": true, "labelFontSize": 0.5, "labelColor": "var(--widget-label-color)", "labelFontFamily": "var(--widget-font-family)", "rangeActuator": false, "min": 0, "max": 100, "step": 1, "displayValue": true, "validationOnFocusOut": true, "valueFontSize": 0.5, "valueFontFamily": "var(--widget-font-family)", "valueBorderColor": "var(--widget-border-color)", "labelWidthProportion": "20%", "sliderWidthProportion": "60%", "valueWidthProportion": "20%", "sliderRangeColor": "var(--widget-range-color)", "sliderSegmentColor": "var(--widget-segment-color)", "sliderHandleDefaultColor": "var(--widget-handle-default-color)", "sliderHandleHoverColor": "var(--widget-handle-hover-color)", "sliderHandleActiveColor": "var(--widget-handle-active-color)", "valueColor": "var(--widget-color)", "unit": "unitText", "displayUnit": false, "unitFontSize": 0.5, "showWidget": true, "enableWidget": true }, "modelHiddenParams": { "value": 0 } }, "flatUiHorizontalSliderB": { "layout": { "top": 65, "left": 4, "height": 38, "width": 367, "z-index": "2" }, "container": { "instanceId": "flatUiHorizontalSliderB", "modelJsonId": "flatUiHorizontalSlider" }, "modelParameters": { "label": "width", "inheritLabelFromData": true, "displayLabel": true, "labelFontSize": 0.5, "labelColor": "var(--widget-label-color)", "labelFontFamily": "var(--widget-font-family)", "rangeActuator": false, "min": 0, "max": 100, "step": 1, "displayValue": true, "validationOnFocusOut": true, "valueFontSize": 0.5, "valueFontFamily": "var(--widget-font-family)", "valueBorderColor": "var(--widget-border-color)", "labelWidthProportion": "20%", "sliderWidthProportion": "60%", "valueWidthProportion": "20%", "sliderRangeColor": "var(--widget-range-color)", "sliderSegmentColor": "var(--widget-segment-color)", "sliderHandleDefaultColor": "var(--widget-handle-default-color)", "sliderHandleHoverColor": "var(--widget-handle-hover-color)", "sliderHandleActiveColor": "var(--widget-handle-active-color)", "valueColor": "var(--widget-color)", "unit": "unitText", "displayUnit": false, "unitFontSize": 0.5, "showWidget": true, "enableWidget": true }, "modelHiddenParams": { "value": 0 } }, "kpiCardA": { "layout": { "top": 202, "left": 5, "height": 120, "width": 275, "z-index": "4" }, "container": { "instanceId": "kpiCardA", "modelJsonId": "kpiCard" }, "modelParameters": { "label": "surface", "inheritLabelFromData": false, "displayLabel": true, "labelFontSize": 0.5, "labelColor": "var(--widget-label-color)", "labelFontFamily": "var(--widget-font-family)", "valuePosition": "bottom", "valueFontSize": 2, "valueColor": "var(--widget-color)", "valueFontFamily": "var(--widget-font-family)", "decimalDigits": 3, "unit": "unitText", "displayUnit": false, "unitFontSize": 0.5, "unitColor": "var(--widget-label-color)", "borderShadow": false, "showWidget": true, "enableWidget": true }, "modelHiddenParams": { "value": "--" } }, "flatUiButtonA": { "layout": { "top": 123, "left": 184, "height": 63, "width": 187, "z-index": "5" }, "container": { "instanceId": "flatUiButtonA", "modelJsonId": "flatUiButton" }, "modelParameters": { "text": "Compute surface", "numberOfTriggers": 1, "fileInput": false, "binaryFileInput": false, "buttonFontSize": 0.3, "displayIcon": false, "fontAwesomeIcon": "", "buttonFontFamily": "var(--widget-font-family)", "buttonTextColor": "var(--widget-button-primary-text)", "buttonDefaultColor": "var(--widget-button-primary-color)", "buttonActiveColor": "var(--widget-button-active-color)", "buttonHoverColor": "var(--widget-button-hover-color)", "showWidget": true, "enableWidget": true }, "modelHiddenParams": {} } }, "connections": { "flatUiHorizontalSliderA": { "value": { "name": "value", "dataNode": "Input", "dataFields": [ "length" ] } }, "flatUiHorizontalSliderB": { "value": { "name": "value", "dataNode": "Input", "dataFields": [ "width" ] } }, "kpiCardA": { "value": { "name": "value", "dataNode": "Surface", "dataFields": [ "Msg" ] } }, "flatUiButtonA": {} }, "display": { "theme": "default", "backgroundColor": "var(--widget-color-0)", "inheritThemeBackgroundColor": true, "marginX": 10, "marginY": 10, "width": 1294, "height": 590, "enforceHeightLimit": false }, "navBarNotification": false }