home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2000 April / VPR0004B.BIN / DRIVER / COMPAQ / SP12255 / sp12255.exe / DMWEBC1.CAB / CFSYSINF.TPL < prev    next >
Text File  |  1999-04-16  |  10KB  |  343 lines

  1. <HTML>
  2. <!-- $Id: cf_sysinfo.tmpl 2.2 1998/01/06 20:12:13 cboeker Exp $ -->
  3. <!-- Copyright (C) 1997 Compaq Computer Corporation -->
  4.  
  5. <HEAD>
  6. <SCRIPT LANGUAGE="JavaScript">
  7. <!--
  8.  
  9. <!#TABLES.JS>
  10.  
  11. //-->
  12. </SCRIPT>
  13.  
  14. <!#CFSYSINF.JS>
  15.  
  16. </HEAD>
  17.  
  18. <SCRIPT LANGUAGE="JavaScript">
  19. <!*, DMTF|FRU|*, 1, FRUIndex>
  20. <!*, DMTF|Operational State|*, 1, OsIndex>
  21.  
  22.   writeTableLabel(sGeneralInformation);
  23.         writeTableHead();
  24.         
  25.     <!*, DMTF|ComponentID|*, 2, Newprodname, DMTF|Processor|*>;
  26.     <!*, DMTF|ComponentID|*, 3, Oldprodname, DMTF|Processor|*>;
  27.  
  28.     if (Newprodname == "Desktop Personal Computer" ||
  29.         Newprodname == "Portable Personal Computer" ||
  30.     Newprodname == "Notebook Personal Computer" ||
  31.     Newprodname == "Tower Personal Computer" ||
  32.     Newprodname == "Mini-tower Personal Computer" ||
  33.     Newprodname == "Rack-mount Personal Computer" ||
  34.     Newprodname == "Small Form Factor Personal Computer" ||
  35.     Newprodname == "Personal Computer")
  36.     prodname = Oldprodname;
  37.     else
  38.     prodname = Newprodname;
  39.  
  40.     finalProdName = sPC;
  41.     if (prodname[0] != null && prodname[0] != "")
  42.         finalProdName = prodname[0];
  43.     writeSingleTableRow(sProduct + ":", finalProdName);
  44.  
  45.     OSName = "<!*, DMTF|Operating System|*, 2>";
  46.     OSVer = "<!*, DMTF|Operating System|*, 3>";
  47.     writeSingleTableRowOrBlank(sOs + ":", OSName);
  48.     writeSingleTableRowOrBlank("", OSVer);
  49.  
  50.      <!*, DMTF|System Slot*, 2, ExpansionBus>
  51.  
  52.     slotEISA = false;
  53.     slotISA = false;
  54.     slotPCI = false;
  55.     for (i = 0; i < ExpansionBus.length; i++)
  56.     {
  57.         if (ExpansionBus[i] == 2 || ExpansionBus[i] == 3)
  58.             slotISA = true;
  59.         else if (ExpansionBus[i] == 4 || ExpansionBus[i] == 5)
  60.             slotEISA = true;
  61.         if (ExpansionBus[i] == 16 || ExpansionBus[i] == 17)
  62.             slotPCI = true;
  63.     }    
  64.     
  65.     ExpBus = "";             // Default
  66.  
  67.     if (slotISA == true)
  68.         ExpBus = "ISA";
  69.  
  70.     if (slotEISA == true)
  71.        if (ExpBus != "")
  72.         ExpBus = ExpBus + "/EISA";
  73.        else
  74.         ExpBus = "EISA";
  75.  
  76.     if (slotPCI == true)
  77.        if (ExpBus != "")
  78.         ExpBus = ExpBus + "/PCI";
  79.        else
  80.         ExpBus = "PCI";
  81.  
  82.     writeSingleTableRow(sExpansionBus + ":", ExpBus);
  83.         
  84.         writeTableTail(); 
  85.         
  86.   document.write("<BR>");
  87.  
  88.   writeTableLabel(sDescription);
  89.     writeTableHead();
  90.     sysname = "<!*, DMTF|General Information|*, 1>";
  91.  
  92.     writeSingleTableRowOrBlank(sSystemName + ":", sysname);
  93.  
  94.     bootTime = "<!*, DMTF|General Information|*, 5>";
  95.     if (bootTime != "")
  96.     {
  97.         year = bootTime.substring(0, 4);
  98.         month = bootTime.substring(4, 6);
  99.         day = bootTime.substring(6, 8);
  100.         hour = bootTime.substring(8, 10);
  101.         minute = bootTime.substring(10, 12);
  102.         rest = bootTime.substring(12, bootTime.length);
  103.         writeSingleTableRow(sSystemBootupTime + ":", year + "/" + month + "/" + day + " " + hour + ":" + minute + ":" + rest);
  104.     }
  105.     else
  106.     {
  107.         writeSingleTableRow(sSystemBootupTime + ":", "");
  108.     }
  109.     contactInfo = "<!*, DMTF|General Information|*, 3>";
  110.     if (contactInfo == "")
  111.             writeSingleTableRow(sContactInformation + ":", sNA);              
  112.     else
  113.             writeSingleTableRow(sContactInformation + ":", contactInfo);   
  114.        
  115.     syslocation = "<!*, DMTF|General Information|*, 2>";
  116.  
  117.     if (syslocation =="")
  118.             writeSingleTableRow(sLocation + ":", sNA);              
  119.     else
  120.             writeSingleTableRow(sLocation + ":", syslocation);
  121.  
  122.     writeTableTail();      
  123.     document.write("<BR>");
  124.  
  125. <!-- ASSET CONTROL INFORMATION -->
  126.     writeTableLabel(sAssetControlInformation);
  127.     writeTableHead();
  128.     writeColumnTableHeaderRow(sDeviceType, sModel, sSerialNumber, sAssetTag);
  129.  
  130.     <!*, DMTF|Physical Container Global Table|*, 1, globalContainer>;
  131.     <!*, DMTF|Physical Container Global Table|*, 2, assetTag>;
  132.     <!*, DMTF|ComponentID|*, 2, monitorProduct, DMTF|Monitor Resolutions|*>;
  133.     <!*, DMTF|ComponentID|*, 4, monitorSerNum, DMTF|Monitor Resolutions|*>;
  134.     PCType = globalContainer[0];
  135.  
  136.     // Display System asset information
  137.     <!*, DMTF|ComponentID|*, 4, cpqSysSerialNum, DMTF|Processor|*>;
  138.  
  139.     if (cpqSysSerialNum[0] == null)
  140.         cpqSysSerialNum[0] = "";
  141.  
  142.     DigitalSysSerialNum = "";
  143.     DigitalSysSerialNum = "<!*, Digital|System Board|*, 1>";
  144.     if (DigitalSysSerialNum != "" && DigitalSysSerialNum != null)
  145.         cpqSysSerialNum[0] = DigitalSysSerialNum;
  146.  
  147.     if (assetTag[0] == null)
  148.         assetTag[0] = "";
  149.     writeColumnTableDataRow("System", finalProdName, cpqSysSerialNum[0], assetTag[0]);
  150.     
  151.     // Display Monitor asset information
  152.     for(i = 0; i < monitorProduct.length; i++)
  153.     {
  154.         if ( (monitorProduct[i] != "") && (monitorSerNum[i] != "")  )
  155.             writeColumnTableDataRow("Monitor", monitorProduct[i], monitorSerNum);
  156.     }
  157.  
  158. </SCRIPT>
  159. <SCRIPT LANGUAGE="JavaScript">
  160.  
  161.     // Display IDE Disk asset information
  162.     <!*, DMTF|Disks|*, 3, dmiDriveIntType>
  163.     <!*, DMTF|Disks|*, 1, dmiDriveType>
  164.     <!*, DMTF|Disks|*, 20, DiskFRUIndex>
  165.         <!*, DMTF|Processor|*, 8, CpuFruIndex>
  166.     <!*, DMTF|FRU|*, 7, FRUSerialNumber>
  167.     <!*, DMTF|FRU|*, 5, FRUModel>
  168.  
  169.           for(i = 0; i < dmiDriveType.length; i++)
  170.           {
  171.            if (dmiDriveIntType[i] == "IDE" || dmiDriveIntType[i] == "Enhanced ATA/IDE")
  172.            {
  173.                 if (DiskFRUIndex[i] > 0)
  174.                 {
  175.                     ActualFRUIndex = -1;
  176.                     for (k = 0; k < FRUIndex.length; k++)
  177.                     {
  178.                                     if (DiskFRUIndex[i] == FRUIndex[k])
  179.                         {
  180.                             ActualFRUIndex = k;
  181.                             break;
  182.                         }
  183.                     }
  184.  
  185.                     if (ActualFRUIndex >= 0)
  186.                         if (FRUSerialNumber[ActualFRUIndex] != "" && FRUModel[ActualFRUIndex] != "")
  187.                             writeColumnTableDataRow(sIDEDisk, FRUModel[ActualFRUIndex],  FRUSerialNumber[ActualFRUIndex] );
  188.                 }
  189.            }
  190.           }
  191.  
  192.         // Display SCSI Disk asset information
  193.           for(i = 0; i < dmiDriveType.length; i++)
  194.           {
  195.            if ( (dmiDriveIntType[i] == "SCSI" ) )
  196.            {
  197.                if (DiskFRUIndex[i] > 0)
  198.                {
  199.                     ActualFRUIndex = -1;
  200.                     for (k = 0; k < FRUIndex.length; k++)
  201.                     {
  202.                         if (DiskFRUIndex[i] == FRUIndex[k])
  203.                         {
  204.                             ActualFRUIndex = k;
  205.                             break;
  206.                         }
  207.                     }
  208.  
  209.                     if (ActualFRUIndex >= 0)
  210.                         if (FRUSerialNumber[ActualFRUIndex] != "" && FRUModel[ActualFRUIndex] != "")
  211.                             writeColumnTableDataRow(sSCSIDisk, FRUModel[ActualFRUIndex], FRUSerialNumber[ActualFRUIndex]);
  212.                 }
  213.            }
  214.           }
  215.  
  216.  
  217.  
  218.  
  219.         // Display CPU asset information
  220.         //
  221.         for(i = 0; i < CpuFruIndex.length; i++)
  222.           {
  223.                    if (CpuFruIndex[i] > 0)
  224.         {
  225.             ActualFRUIndex = -1;
  226.             for (k = 0; k < FRUIndex.length; k++)
  227.             {
  228.                         if (CpuFruIndex[i] == FRUIndex[k])
  229.                 {
  230.                     ActualFRUIndex = k;
  231.                     break;
  232.                 }
  233.             }
  234.  
  235.             if (ActualFRUIndex >= 0)
  236.                 if (FRUSerialNumber[ActualFRUIndex] != "" && FRUModel[ActualFRUIndex] != "")
  237.                                 writeColumnTableDataRow(sCPU, FRUModel[ActualFRUIndex], FRUSerialNumber[ActualFRUIndex]);
  238.         }
  239.           }
  240.  
  241.  
  242.  
  243.  
  244. </SCRIPT>
  245. <SCRIPT LANGUAGE="JavaScript">
  246.         // Display Memory Assets for non-Portables (Portables do not support ECC)
  247.         //
  248.         // BUGBUG PCType is an integer, not a string!
  249.         //
  250.         if (PCType != "Portable" && PCType != "LapTop" && PCType != "Notebook")
  251.     {
  252.         <!*, DMTF|Memory Device|*, 22, memoryFRU>;
  253.             <!*, DMTF|Memory Device|*,  5, memorySize>;
  254.             <!*, DMTF|Memory Device|*,  6, memoryFormFactor>;
  255.  
  256.               for(i = 0; i < memoryFRU.length; i++)
  257.               {
  258.             if (memoryFRU[i] > 0)
  259.             {
  260.                 ActualFRUIndex = -1;
  261.                 for (k = 0; k < FRUIndex.length; k++)
  262.                 {
  263.                     if (memoryFRU[i] == FRUIndex[k])
  264.                     {
  265.                         ActualFRUIndex = k;
  266.                         break;
  267.                     }
  268.                 }
  269.                 if (ActualFRUIndex >= 0)
  270.                          {
  271.                                 if (FRUSerialNumber[ActualFRUIndex] != "" )
  272.                                 {
  273.                                     if (FRUModel[ActualFRUIndex] != "")
  274.                                         MemoryModel = FRUModel[ActualFRUIndex];
  275.                                     else
  276.                                     {
  277.                                         // Fabricate something reasonable. 1024*1024 = 1048576
  278.                                         MemoryModel = (memorySize[i] / 1048576) + "MB " + memoryFormFactor[i];
  279.                                          }
  280.  
  281.                                      writeColumnTableDataRow(sMemory, MemoryModel, FRUSerialNumber[ActualFRUIndex]);
  282.                                 }
  283.                             }
  284.             }
  285.               }
  286.     }
  287. </SCRIPT>
  288. <SCRIPT LANGUAGE="JavaScript">
  289.  
  290.     // Display PC Card assets
  291.     <!*, DMTF|System Slot|*, 6, slotCategory>
  292.     <!*, DMTF|System Slot|*, 4, slotUsage>
  293.     <!*, DMTF|System Slot|*, 5, slotDescription>
  294.     for(i = 0; i < slotCategory.length; i++)
  295.     {
  296.         // Is the slot a PCCARD slot that is in use?
  297.         if ((slotCategory[i] == "PCMCIA Slot" )  && (slotUsage[i] == "In Use"))
  298.             writeColumnTableDataRow(sPCCard, slotDescription[i]);
  299.             // TODO:  Add PC Card Asset Number and Serial Number when supported
  300.     }
  301.  
  302.  
  303. </SCRIPT>
  304. <SCRIPT LANGUAGE="JavaScript">
  305.     // Display Portable-specific information
  306.     if (PCType == "Portable" || PCType == "LapTop" || PCType == "Notebook")
  307.     {
  308.         <!*, DMTF|Portable Battery|*, Portable Battery Device Name, batteryModel>
  309.         <!*, DMTF|Portable Battery|*, Portable Battery Serial Number, batterySerNum>
  310.         <!*, DMTF|Physical Container Global Table|*, FRU Group Index, globalContainerFRU>;
  311.         <!*, DMTF|FRU|*, Asset Tag, FRUAssetTag>
  312.         
  313.         // Display Battery asset information 
  314.         for(i = 0; i < batteryModel.length; i++)
  315.         {
  316.             if ((batterySerNum[i] != "")  && (batteryModel[i] != ""))
  317.                 writeColumnTableDataRow(sBattery, batteryModel[i], batterySerNum[i]);
  318.         }
  319.  
  320.         // Display Docking Station asset information 
  321.         for(i = 0; i < globalContainer.length; i++)
  322.         {
  323.             // check if it is docked before displaying
  324.             if (globalContainer[i] == "Docking Station")
  325.             {
  326.                 dockingStationSerialNum = FRUSerialNumber[globalContainerFRU[i]-1];
  327.                 dockingStationModel = FRUModel[globalContainerFRU[i]-1];
  328.  
  329.                 if ((globalContainerFRU[i]-1) > FRUAssetTag.length)
  330.                     dockingStationAssetTag = "";
  331.                 else
  332.                     dockingStationAssetTag = FRUAssetTag[globalContainerFRU[i]-1];
  333.                 writeColumnTableDataRow(sDockingStation, dockingStationModel,
  334.                     dockingStationSerialNum, dockingStationAssetTag);
  335.             }
  336.         }
  337.     }
  338.  
  339.  
  340.    writeTableTail();
  341. </SCRIPT>
  342. </HTML>
  343.