Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const data = [
- {
- "name":"0.LicenseClient",
- "id":1,
- "children":[
- {
- "name":"ProficyClient18_3_1436_0.exe",
- "id":"1.1"
- }
- ]
- },
- {
- "name":"CIMPLICITY",
- "id":2,
- "children":[
- {
- "name":"HMI-9.0.24485r.000031.exe",
- "id":"2.1"
- },
- {
- "name":"HMI-9.5.36749r.000017.exe",
- "id":"2.2"
- }
- ]
- },
- {
- "name":"Historian",
- "id":3,
- "children":[
- {
- "name":"historian_rest_api_reference_manual.chm",
- "id":"3.1"
- }
- ]
- },
- {
- "name":"Historian/Proficy_Historian_English_v7.0",
- "id":4,
- "children":[
- {
- "name":"GettingStartedSP5.pdf",
- "id":"4.1"
- },
- {
- "name":"Gold_SP5_Historian-7.0.1904.0.iso",
- "id":"4.2"
- },
- {
- "name":"HistorianIPISP5.pdf",
- "id":"4.3"
- },
- {
- "name":"Historian_REST_APIs_SP5.pdf",
- "id":"4.4"
- }
- ]
- },
- {
- "name":"Historian/Proficy_Historian_English_v7.0/\u8865\u4e01",
- "id":5,
- "children":[
- {
- "name":"Historian-7.0.29.0-SP5-SIM1.iso",
- "id":"5.1"
- }
- ]
- },
- {
- "name":"Historian/SP6help",
- "id":6,
- "children":[
- {
- "name":"Collector - S2D.chm",
- "id":"6.1"
- },
- {
- "name":"Collector - WPC.chm",
- "id":"6.2"
- },
- {
- "name":"Glossary.chm",
- "id":"6.3"
- },
- {
- "name":"historian_rest_api_reference_manual.chm",
- "id":"6.4"
- },
- {
- "name":"ihadmin.chm",
- "id":"6.5"
- },
- {
- "name":"ihexcel.chm",
- "id":"6.6"
- },
- {
- "name":"iHistAdv.chm",
- "id":"6.7"
- },
- {
- "name":"iHistAE.chm",
- "id":"6.8"
- },
- {
- "name":"iHistClientAccessAPI.chm",
- "id":"6.9"
- },
- {
- "name":"iHistCollMaster.chm",
- "id":"6.10"
- },
- {
- "name":"iHistCOLTK.chm",
- "id":"6.11"
- },
- {
- "name":"iHistDC.chm",
- "id":"6.12"
- },
- {
- "name":"iHistEXCEL.chm",
- "id":"6.13"
- },
- {
- "name":"iHistFFCOL.chm",
- "id":"6.14"
- },
- {
- "name":"ihistFLCOL.chm",
- "id":"6.15"
- },
- {
- "name":"iHistGS.chm",
- "id":"6.16"
- },
- {
- "name":"iHISTHDASrv.chm",
- "id":"6.17"
- },
- {
- "name":"iHistMG.chm",
- "id":"6.18"
- },
- {
- "name":"iHistODB.chm",
- "id":"6.19"
- },
- {
- "name":"iHISTOPCOL.chm",
- "id":"6.20"
- },
- {
- "name":"iHistOPCUADA.chm",
- "id":"6.21"
- },
- {
- "name":"iHISTOPCUAOL.chm",
- "id":"6.22"
- },
- {
- "name":"iHistOPC_HDA.chm",
- "id":"6.23"
- },
- {
- "name":"iHistorian.chm",
- "id":"6.24"
- },
- {
- "name":"iHistSICOL.chm",
- "id":"6.25"
- },
- {
- "name":"iHistViewCollector.chm",
- "id":"6.26"
- },
- {
- "name":"iHistWW.chm",
- "id":"6.27"
- },
- {
- "name":"ihPICollector.chm",
- "id":"6.28"
- },
- {
- "name":"ihPIDistributor.chm",
- "id":"6.29"
- },
- {
- "name":"ihsdk.chm",
- "id":"6.30"
- },
- {
- "name":"ihuserapi.chm",
- "id":"6.31"
- }
- ]
- },
- {
- "name":"iFIX5.8",
- "id":7,
- "children":[
- {
- "name":"iFIX58_DatabaseManager_005.exe",
- "id":"7.1"
- },
- {
- "name":"iFIX58_Networking_002.exe",
- "id":"7.2"
- },
- {
- "name":"iFIX58_SP2.exe",
- "id":"7.3"
- },
- {
- "name":"iFIX58_Workspace_030.exe",
- "id":"7.4"
- }
- ]
- },
- {
- "name":"iFIX5.9",
- "id":8,
- "children":[
- {
- "name":"iFIX59_Alarming_001.exe",
- "id":"8.1"
- },
- {
- "name":"iFIX59_Alarming_002.exe",
- "id":"8.2"
- },
- {
- "name":"iFIX59_AlarmSummaryOCX_001.exe",
- "id":"8.3"
- },
- {
- "name":"iFIX59_Blocks_001.exe",
- "id":"8.4"
- },
- {
- "name":"iFIX59_DatabaseManager_001.exe",
- "id":"8.5"
- },
- {
- "name":"iFIX59_DatabaseManager_002.exe",
- "id":"8.6"
- },
- {
- "name":"iFIX59_DataProvider_002.exe",
- "id":"8.7"
- },
- {
- "name":"iFIX59_Failover_001.exe",
- "id":"8.8"
- },
- {
- "name":"iFIX59_FixComponent_001.exe",
- "id":"8.9"
- },
- {
- "name":"iFIX59_SIM Tracking.xls",
- "id":"8.10"
- },
- {
- "name":"iFIX59_WorkSpace_003.exe",
- "id":"8.11"
- },
- {
- "name":"iFIX59_WorkSpace_006.exe",
- "id":"8.12"
- }
- ]
- },
- {
- "name":"IGS",
- "id":9,
- "children":[
- {
- "name":"IGS_7.63.exe",
- "id":"9.1"
- }
- ]
- },
- {
- "name":"WebSpace4.8",
- "id":10,
- "children":[
- {
- "name":"ProficyWebSpace_v4.8_Chinese.iso",
- "id":"10.1"
- },
- {
- "name":"ProficyWebSpace_v4.8_English.iso",
- "id":"10.2"
- },
- {
- "name":"PWS48_CompatibilityUpdate_006_x64.exe",
- "id":"10.3"
- },
- {
- "name":"PWS48_CompatibilityUpdate_007_x86.exe",
- "id":"10.4"
- }
- ]
- },
- {
- "name":"WebSpace5.0",
- "id":11,
- "children":[
- {
- "name":"ProficyWebSpace_v5_02_348English.iso",
- "id":"11.1"
- }
- ]
- }
- ];
- const files = document.getElementById('files');
- const phoneNumber = 123456789;
- const smsCode = 123;
- function createFileTree(data){
- const parent = document.createElement('li');
- const children = document.createElement('ul');
- parent.textContent = data.name;
- parent.appendChild(children);
- data.children.forEach(child=>{
- const li = document.createElement('li');
- const a = document.createElement('a');
- const href = `http://dl.sep18.xyz:8008/download?phonenumber=${phoneNumber}&code=${smsCode}&file=${child.name}`;
- li.appendChild(a);
- a.textContent = child.name;
- a.href = href;
- children.appendChild(li);
- let details = document.createElement('details');
- let summary = document.createElement('summary');
- summary.textContent = data.name;
- details.append(summary);
- // details.append(children);
- });
- files.append(parent);
- }
- data.forEach(createFileTree);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement