Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

157 lines
5.3 KiB

  1. <HTML>
  2. <HEAD>
  3. <STYLE>
  4. BODY { font-family:Verdana; font-size:9pt; margin:0px; color:teal; }
  5. .instructions { font-style:italic; text-align:right; color:gray; margin-left:.5em; }
  6. .headline { background-color:teal; color:white; font-family:Arial Black; font-size:16pt;
  7. text-align:center; padding-top:1em; }
  8. .group { font-family:Arial Black; font-size:14pt; margin-top:.5em; margin-left:.5em;
  9. margin-bottom:.5em; }
  10. .button { font-family:Verdana; font-size:10pt; font-weight:bold; text-align:right;
  11. color:gray; }
  12. .arrow { font-family:Webdings; }
  13. </STYLE>
  14. </HEAD>
  15. <SCRIPT>
  16. var source;
  17. var style;
  18. var theRequest;
  19. var sourceURL;
  20. var styleURL;
  21. var oldXSLitem;
  22. // ----- Scripts to control XSL Processing ------
  23. function update(xmlDocument)
  24. {
  25. parent.results.display(xmlDocument.transformNode(style));
  26. }
  27. function changeXSL(xsldoc)
  28. {
  29. styleURL = xsldoc;
  30. style.load(styleURL);
  31. update();
  32. }
  33. // ----- Scripts to activate buttons ------
  34. function over(item)
  35. {
  36. item.style.color = "black";
  37. }
  38. function out(item) {
  39. item.style.color = "gray";
  40. }
  41. function select(group, item) {
  42. oldXSLitem.style.textDecoration = "";
  43. oldXSLitem = item;
  44. item.style.textDecoration = "underline";
  45. }
  46. // called by parent frame when the whole frameset is ready
  47. function init()
  48. {
  49. style = new ActiveXObject("Microsoft.XMLDOM");
  50. style.async = false;
  51. theRequest = new ActiveXObject("Microsoft.XMLHTTP");
  52. oldXSLitem = document.all.item("first-XSL-item");
  53. select("xsl", oldXSLitem);
  54. }
  55. function GetClass()
  56. {
  57. var theBody;
  58. theRequest.open("M-POST", document.all.urlbox.value, false);
  59. theRequest.setRequestHeader("Content-Type", "application/xml;charset=\"utf-8\"");
  60. theRequest.setRequestHeader("Man", "http://www.dmtf.org/cim/operation;ns=73");
  61. theRequest.setRequestHeader("73-CIMOperation", "MethodCall");
  62. theRequest.setRequestHeader("73-CIMMethod", "GetClass");
  63. theRequest.setRequestHeader("73-CIMObject", document.all.namespacebox.value);
  64. theBody = "<?xml version=\"1.0\" ?>" +
  65. "<CIM CIMVERSION=\"2.0\" DTDVERSION=\"2.0\">" +
  66. "<MESSAGE ID=\"877\" PROTOCOLVERSION=\"1.0\">" +
  67. "<SIMPLEREQ>" +
  68. "<IMETHODCALL NAME=\"GetClass\">" +
  69. "<LOCALNAMESPACEPATH> <NAMESPACE NAME=\"" +
  70. "root\\cimv2" + "\" />" +
  71. "</LOCALNAMESPACEPATH>" +
  72. "<PARAMVALUE NAME=\"ClassName\">" +
  73. document.all.classbox.value + "</PARAMVALUE>" +
  74. "<PARAMVALUE NAME=\"LocalOnly\">FALSE</PARAMVALUE>" +
  75. "</IMETHODCALL>" +
  76. "</SIMPLEREQ>" +
  77. "</MESSAGE>" +
  78. "</CIM>";
  79. ShowResults(theRequest, theBody);
  80. }
  81. function ShowResults(theXMLRequest, theXMLBody)
  82. {
  83. // RequestXMLBox.Text = xmlBody
  84. document.all.querybox.value = theXMLBody
  85. theXMLRequest.send (theXMLBody)
  86. update(theXMLRequest.responseXML);
  87. }
  88. </SCRIPT>
  89. <BODY>
  90. <DIV CLASS="headline">XML Client</DIV>
  91. <DIV CLASS="instructions">
  92. Use this client to perform CIM Operations </DIV>
  93. <DIV CLASS="group">
  94. <LABEL>CIM Server URL</LABEL><INPUT ID="urlbox" SIZE=35 VALUE="http://rajeshr31/cimhttp/cim2xml.dll"/>
  95. <BR>
  96. <LABEL>Namespace</LABEL><INPUT ID="namespacebox" VALUE="root\cimv2"/>
  97. <HR>
  98. <LABEL>Class</LABEL><INPUT ID="classbox" VALUE="Win32_Processor"/>
  99. <BUTTON id="getclassButton" onClick='GetClass()'> Get Class </BUTTON>
  100. <HR>
  101. <LABEL>Query</LABEL><TEXTAREA ID="querybox" ROWS=5>select * from win32_processor</TEXTAREA>
  102. <BUTTON id="execQueryButton" onClick='ExecQuery()'> ExecuteQuery </BUTTON>
  103. </DIV>
  104. <DIV CLASS="instructions">
  105. The XML data displayed here is
  106. taken from live data captured from Microsoft's implementation of CIM. </DIV>
  107. <DIV CLASS="group">XSL Stylesheets
  108. <DIV CLASS="button" ID="first-XSL-item"
  109. onMouseOver="over(this)"
  110. onMouseOut="out(this)"
  111. onClick='changeXSL("raw-xml.xsl"); select("xsl",this)'>
  112. <SPAN CLASS="arrow"><FONT face=Verdana>Raw
  113. XML</FONT>4</SPAN> </DIV>
  114. <DIV CLASS="button"
  115. onMouseOver="over(this)"
  116. onMouseOut="out(this)"
  117. onClick='changeXSL("wmimof.xsl"); select("xsl",this)'>
  118. <SPAN CLASS="arrow"><FONT face=Verdana>Managed
  119. Object Format (MOF)</FONT>4</SPAN> </DIV>
  120. <DIV CLASS="button"
  121. onMouseOver="over(this)"
  122. onMouseOut="out(this)"
  123. onClick='changeXSL("property-table.xsl"); select("xsl",this)'>
  124. <SPAN CLASS="arrow"><FONT face=Verdana>Property Type Table</FONT>4</SPAN> </DIV>
  125. <DIV CLASS="button"
  126. onMouseOver="over(this)"
  127. onMouseOut="out(this)"
  128. onClick='changeXSL("value-table.xsl"); select("xsl",this)'>
  129. <SPAN CLASS="arrow"><FONT face=Verdana>Property Value Table</FONT>4</SPAN> </DIV>
  130. <DIV CLASS="button"
  131. onMouseOver="over(this)"
  132. onMouseOut="out(this)"
  133. onClick='changeXSL("summary.xsl"); select("xsl",this)'>
  134. <SPAN CLASS="arrow"><FONT face=Verdana>At-a-Glance</FONT>4</SPAN> </DIV>
  135. <DIV CLASS="button"
  136. onMouseOver="over(this)"
  137. onMouseOut="out(this)"
  138. onClick='changeXSL("price-graph.xsl"); select("xsl",this)'>&nbsp;</DIV></DIV>
  139. </BODY>
  140. </HTML>