Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello Everyone,

I am new to Web API.

I need to design a web application which shows the status of different services in different servers.

The information of the services and server is given in the XML document (Please find the attached pic 1)

Now the number of services and the servers are dynamic i.e. these change as one change the XML document add/delete the servers/services

So I want the UI for the web application to be a matrix showing the status of these services in different servers(Please find the attached pic 2)

Now, I am able to render the data in the JSON format- dictionary<servername,dictionary><servicename,servicestatus>>.

Example: {"Server 1":{"Service 1":"Running","Service 2":"Running"},"Server2":{"Service 1":"Running","Service 2":"Running"}}

Now, I need to consume this JSON data in the View using Client side technologies JavaScript, JQuery etc.

Can you suggest me how to come up with the grid as the number of servers and service names are dynamic i.e. depend on the data provided in the XML

Thanks !!


Pic 1:
http://tinypic.com/r/25pqz5l/9[^]

Later Click on Zoom in this link

Pic 2:
<Services>
	<Service1>
		<Server1>IP Address</Server1>
		<Server2>IP Address</Server2>
	</Service1>
	<Service2>
		<Server1>IP Address</Server1>
		<Server2>IP Address</Server2>
	</Service2>
</Services>
Posted
Updated 18-Nov-15 9:43am
v5
Comments
Nathan Minier 19-Nov-15 8:37am    
I would highly suggest adding a method to your WebAPI that returns the breakdown by service rather than by server.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900