--- title: "Custom Widgets Migration" slug: "custom-widgets-migration" updated: 2025-01-01T11:42:08Z published: 2025-01-01T11:42:08Z canonical: "docs.biztalk360.com/custom-widgets-migration" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.biztalk360.com/llms.txt > Use this file to discover all available pages before exploring further. # Custom Widgets Migration In Dashboards, you can add multiple predefined widgets, and also you can create your own custom widgets to pin it in the respective dashboard. If you are migrating BizTalk360 from v9.1 to V10, your custom widgets may break because we have migrated our application from KnockoutJS to Angular. So basically, you need to migrate your custom widget script from KnockoutJS to pure JavaScript which will be rendered by our Angular application. In this article, we are going to mention some of the common code snippets that will be useful in migrating your KnockoutJS script to pure JavaScript Use *onclick="functionName()"* instead of *data-bind="click:functionName()"* ```markup (can be changed to) ``` You can directly use *forEach* with the array item rather than using *ko.utils.arrayForEach* ```javascript ko.utils.arrayForEach( items, function (item) { console.log("item"); } ); (can be changed to) items.forEach((item) => { console.log(item); }); ``` If you want to bind values, get the element using *document.getElementById* and assign the respective values ```markup
First name:
(can be changed to) ``` To make an API call, you can use XHR to do it in pure JS. But there are a lot of ways to do AJAX calls from JS. You can explore it at this [link](https://medium.com/@Sharad35386442/6-different-ways-to-do-ajax-calls-in-javascript-b47200fe7a38#:~:text=%206%20Different%20ways%20to%20do%20Ajax%20calls,the%20browser%20and%20in%20a%20node.js...%20More%20) ```javascript const Http = new XMLHttpRequest(); const url='http://yourdomain.com/'; Http.open("GET", url); Http.send(); Http.onreadystatechange=(e)=>{ console.log(Http.responseText) } ``` If you want to create tables with different rows, you can refer the below code snippet. You can use all the predefined classes which is available in [bootstrap](https://getbootstrap.com/docs/4.0/content/tables/) to design the table. ```markup| Country | Area |
|---|
BizTalk360
``` ## Custom Widget Script for Environment Status The below script covers the following functionalities - It will fetch all the environment details from the API and it will display in a table - This will be auto refreshed every 60 seconds - They can also refresh it manually, using that refresh button ```markup| Environment Name | Alarms Count | Unmapped Artifacts | BizTalk Servers | Host Instances | Suspended Service Instances |
|---|