From 338e209ced538d4e0d2992a14ad07fa97289fddf Mon Sep 17 00:00:00 2001 From: Celeste6666 Date: Fri, 3 Feb 2023 20:36:13 +0800 Subject: [PATCH] =?UTF-8?q?[API]=20=E6=9B=B4=E6=96=B0=20Forge=20=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E8=80=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Backend/Properties/launchSettings.json | 4 ++-- Backend/Views/BuildInfo/Index.cshtml | 8 +++++--- Backend/appsettings.Development.json | 4 ++-- Backend/appsettings.json | 4 ++-- Backend/wwwroot/forgeDemo.html | 4 +++- Frontend/_sysMonFloor.html | 9 +++++---- FrontendWebApi/ApiControllers/OAuthController.cs | 4 ++-- FrontendWebApi/ApiControllers/OSSController.cs | 2 +- FrontendWebApi/Properties/launchSettings.json | 4 ++-- 9 files changed, 24 insertions(+), 19 deletions(-) diff --git a/Backend/Properties/launchSettings.json b/Backend/Properties/launchSettings.json index 5fb22ee..6f40118 100644 --- a/Backend/Properties/launchSettings.json +++ b/Backend/Properties/launchSettings.json @@ -15,8 +15,8 @@ "ASPNETCORE_ENVIRONMENT": "Development", "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation", "FORGE_CALLBACK_URL": "http://localhost:3000/api/forge/callback/oauth", - "FORGE_CLIENT_ID": "TA3hqsFfzQbNOUXKpldKUKSew4SJ21w5", - "FORGE_CLIENT_SECRET": "D002f92d839144f8" + "FORGE_CLIENT_ID": "VeGoOgZcAVCBkiThYvLRSVrCTH6TTwyh", + "FORGE_CLIENT_SECRET": "Rl1KHJIAI8GSAfhK" } }, "Backend": { diff --git a/Backend/Views/BuildInfo/Index.cshtml b/Backend/Views/BuildInfo/Index.cshtml index 1c37699..54aa34e 100644 --- a/Backend/Views/BuildInfo/Index.cshtml +++ b/Backend/Views/BuildInfo/Index.cshtml @@ -278,7 +278,7 @@ var file = input3Dfile; var formData = new FormData(); formData.append('fileToUpload', file); - formData.append('bucketKey', "ta3hqsffzqbnouxkpldkuksew4sj21w5-bims_models");//forge上傳平台-資料夾 + formData.append('bucketKey', "vegoogzcavcbkithyvlrsvrcth6ttwyh-202302_ibms");//forge上傳平台-資料夾 $.ajax({ url: '/api/forge/oss/objects', @@ -454,7 +454,7 @@ var file = input3Dfile; var formData = new FormData(); formData.append('fileToUpload', file); - formData.append('bucketKey', "ta3hqsffzqbnouxkpldkuksew4sj21w5-bims_models");//forge上傳平台-資料夾 + formData.append('bucketKey', "vegoogzcavcbkithyvlrsvrcth6ttwyh-202302_ibms");//forge上傳平台-資料夾 $.ajax({ url: '/api/forge/oss/objects', @@ -484,6 +484,7 @@ //formData2.append("orgName_3D", file_names[0]); //formData2.append("extName_3D", file_names[1]); } + console.log("urn_3D", urn) formData2.append("urn_3D", urn); formData2.append("orgName_3D", m3d_names[0]); formData2.append("extName_3D", m3d_names[1]); @@ -961,7 +962,7 @@ function translateObject(urn) { $("#forgeViewer").empty(); //if (node == null) node = $('#appBuckets').jstree(true).get_selected(true)[0]; - var bucketKey = "ta3hqsffzqbnouxkpldkuksew4sj21w5-bims_models";//forge上傳平台-資料夾 + var bucketKey = "vegoogzcavcbkithyvlrsvrcth6ttwyh-202302_ibms";//forge上傳平台-資料夾 var objectKey = urn; jQuery.post({ @@ -969,6 +970,7 @@ contentType: 'application/json', data: JSON.stringify({ 'bucketKey': bucketKey, 'objectName': objectKey }), success: function (res) { + console.log("@@973", res) //$("#forgeViewer").html('Translation started! Please try again in a moment.'); }, }); diff --git a/Backend/appsettings.Development.json b/Backend/appsettings.Development.json index 4dca5d7..e02e024 100644 --- a/Backend/appsettings.Development.json +++ b/Backend/appsettings.Development.json @@ -16,8 +16,8 @@ "MySqlDBConfig": { "Server": "FYlY+w0XDIz+jmF2rlZWJw==", //0.201 "Port": "js2LutKe+rdjzdxMPQUrvQ==", - //"Database": "VJB2XC+lAtzuHObDGMVOAA==", //30 - "Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp + "Database": "VJB2XC+lAtzuHObDGMVOAA==", //30 + //"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp "Root": "SzdxEgaJJ7tcTCrUl2zKsA==", "Password": "FVAPxztxpY4gJJKQ/se4bQ==" } diff --git a/Backend/appsettings.json b/Backend/appsettings.json index 1087b28..2034e27 100644 --- a/Backend/appsettings.json +++ b/Backend/appsettings.json @@ -16,8 +16,8 @@ "MySqlDBConfig": { "Server": "FYlY+w0XDIz+jmF2rlZWJw==", //0.201 "Port": "js2LutKe+rdjzdxMPQUrvQ==", - // "Database": "VJB2XC+lAtzuHObDGMVOAA==", //三菱 - "Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp + "Database": "VJB2XC+lAtzuHObDGMVOAA==", //三菱 + //"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp "Root": "SzdxEgaJJ7tcTCrUl2zKsA==", "Password": "FVAPxztxpY4gJJKQ/se4bQ==" } diff --git a/Backend/wwwroot/forgeDemo.html b/Backend/wwwroot/forgeDemo.html index 866fb8d..3c82c9f 100644 --- a/Backend/wwwroot/forgeDemo.html +++ b/Backend/wwwroot/forgeDemo.html @@ -255,7 +255,9 @@ /*launchViewer("dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dGEzaHFzZmZ6cWJub3V4a3BsZGt1a3NldzRzajIxdzUtYmltc19tb2RlbHMvJUUzJTgwJTkwJUU1JThGJUIwJUU1JThDJTk3JUU0JUI4JUFEJUU4JThGJUIxJUU1JUE0JUE3JUU2JUE4JTkzJUUzJTgwJTkxQVJDJUU5JTlCJTk5JUU2JUE4JUExJUU1JUJDJThGK01FUCVFNiU4QiU4NiVFNyVCMyVCQiVFNyVCNSVCMV8wMTE5Lm53ZA")*/ /* 0201 更換好電梯順序 */ - launchViewer("dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dGEzaHFzZmZ6cWJub3V4a3BsZGt1a3NldzRzajIxdzUtYmltc19tb2RlbHMvJUUzJTgwJTkwJUU1JThGJUIwJUU1JThDJTk3JUU0JUI4JUFEJUU4JThGJUIxJUU1JUE0JUE3JUU2JUE4JTkzJUUzJTgwJTkxQVJDJUU5JTlCJTk5JUU2JUE4JUExJUU1JUJDJThGK01FUCVFNiU4QiU4NiVFNyVCMyVCQiVFNyVCNSVCMV8wMjAxLm53ZA") + /* launchViewer("dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dGEzaHFzZmZ6cWJub3V4a3BsZGt1a3NldzRzajIxdzUtYmltc19tb2RlbHMvJUUzJTgwJTkwJUU1JThGJUIwJUU1JThDJTk3JUU0JUI4JUFEJUU4JThGJUIxJUU1JUE0JUE3JUU2JUE4JTkzJUUzJTgwJTkxQVJDJUU5JTlCJTk5JUU2JUE4JUExJUU1JUJDJThGK01FUCVFNiU4QiU4NiVFNyVCMyVCQiVFNyVCNSVCMV8wMjAxLm53ZA")*/ + // 0202 將感測器新增到電梯內 + launchViewer("dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dmVnb29nemNhdmNia2l0aHl2bHJzdnJjdGg2dHR3eWgtMjAyMzAyX2libXMvJUUzJTgwJTkwJUU1JThGJUIwJUU1JThDJTk3JUU0JUI4JUFEJUU4JThGJUIxJUU1JUE0JUE3JUU2JUE4JTkzJUUzJTgwJTkxQVJDJUU5JTlCJTk5JUU2JUE4JUExJUU1JUJDJThGK01FUCVFNiU4QiU4NiVFNyVCMyVCQiVFNyVCNSVCMV8wMjAyLm53ZA==") //launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dnNjb2RlFX2ZvcmdlX3Rlc3QvJUUzJFTgwJTkwQVJDJUUzJTgwJTkxXzIwMjJfMTJfMTMubndk');//new ARC //launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dnNjb2RlX2ZvcmdlX3Rlc3QvJUUzJTgwJTkwTUVQJUUzJTgwJTkxXzIwMjJfMTJfMTMubndj');//new MEP //launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dnNjb2RlX2ZvcmdlX3Rlc3QvJUUzJTgwJTkwQVJDJUUzJTgwJTkxJUU1JTg1JUE4JUU2JUEzJTlGXzIwMjJfMTJfMTMubndj');//全棟 ARC diff --git a/Frontend/_sysMonFloor.html b/Frontend/_sysMonFloor.html index 013def5..3a12c22 100644 --- a/Frontend/_sysMonFloor.html +++ b/Frontend/_sysMonFloor.html @@ -1099,13 +1099,14 @@ devices: devices, } + if (pageAct.sysMainTag !== "LT") { heatMap = new ADHeatMaps(option); heatMap.onComplete = () => { - - $.each(currentData, (idx, dev) => { - heatMap.changeTemp(dev.device_number, dev._temp || 0); - }) + $.each(currentData, (idx, dev) => { + heatMap.changeTemp(dev.device_number, dev._temp || 0); + }) } + } } function getHotspotPoint(callback = null) { diff --git a/FrontendWebApi/ApiControllers/OAuthController.cs b/FrontendWebApi/ApiControllers/OAuthController.cs index 61b7f1f..96c6edd 100644 --- a/FrontendWebApi/ApiControllers/OAuthController.cs +++ b/FrontendWebApi/ApiControllers/OAuthController.cs @@ -49,8 +49,8 @@ namespace FrontendWebApi.ApiControllers TwoLeggedApi oauth = new TwoLeggedApi(); string grantType = "client_credentials"; dynamic bearer = await oauth.AuthenticateAsync( - "TA3hqsFfzQbNOUXKpldKUKSew4SJ21w5", - "D002f92d839144f8", + "VeGoOgZcAVCBkiThYvLRSVrCTH6TTwyh", + "Rl1KHJIAI8GSAfhK", grantType, scopes); return bearer; diff --git a/FrontendWebApi/ApiControllers/OSSController.cs b/FrontendWebApi/ApiControllers/OSSController.cs index 0dc1458..b3758e7 100644 --- a/FrontendWebApi/ApiControllers/OSSController.cs +++ b/FrontendWebApi/ApiControllers/OSSController.cs @@ -13,7 +13,7 @@ namespace FrontendWebApi.ApiControllers { private IWebHostEnvironment _env; public OSSController(IWebHostEnvironment env) { _env = env; } - string id = "TA3hqsFfzQbNOUXKpldKUKSew4SJ21w5"; + string id = "VeGoOgZcAVCBkiThYvLRSVrCTH6TTwyh"; public string ClientId { get { return id.ToLower(); } } /// diff --git a/FrontendWebApi/Properties/launchSettings.json b/FrontendWebApi/Properties/launchSettings.json index 7d29894..f1e9f15 100644 --- a/FrontendWebApi/Properties/launchSettings.json +++ b/FrontendWebApi/Properties/launchSettings.json @@ -15,8 +15,8 @@ "ASPNETCORE_ENVIRONMENT": "Development", "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation", "FORGE_CALLBACK_URL": "http://localhost:3000/api/forge/callback/oauth", - "FORGE_CLIENT_ID": "TA3hqsFfzQbNOUXKpldKUKSew4SJ21w5", - "FORGE_CLIENT_SECRET": "D002f92d839144f8", + "FORGE_CLIENT_ID": "VeGoOgZcAVCBkiThYvLRSVrCTH6TTwyh", + "FORGE_CLIENT_SECRET": "Rl1KHJIAI8GSAfhK", "ASPNETCORE_URLS": "http://localhost:5500" }, "applicationUrl": "https://localhost:5001;http://localhost:5000"