@dexteel/mesf-core 4.8.5 → 4.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
package/dist/index.esm.js
CHANGED
|
@@ -10251,6 +10251,7 @@ var ButtonWithLoading = function (_a) {
|
|
|
10251
10251
|
children));
|
|
10252
10252
|
};
|
|
10253
10253
|
|
|
10254
|
+
var ihPath = localStorage.getItem('ihPath') || "[mssql2022].[IH_100020].[ih]";
|
|
10254
10255
|
var saveTagDefaults = function (TagId, Alias, Color, MinScale, MaxScale, Unit) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10255
10256
|
var apiService, parameters, resp;
|
|
10256
10257
|
return __generator(this, function (_a) {
|
|
@@ -10264,7 +10265,7 @@ var saveTagDefaults = function (TagId, Alias, Color, MinScale, MaxScale, Unit) {
|
|
|
10264
10265
|
parameters.push({ name: "MinScale", value: MinScale });
|
|
10265
10266
|
parameters.push({ name: "MaxScale", value: MaxScale });
|
|
10266
10267
|
parameters.push({ name: "Unit", value: Unit });
|
|
10267
|
-
return [4 /*yield*/, apiService.callV2("
|
|
10268
|
+
return [4 /*yield*/, apiService.callV2(ihPath + ".[SaveTagDefaults]", parameters)];
|
|
10268
10269
|
case 1:
|
|
10269
10270
|
resp = _a.sent();
|
|
10270
10271
|
return [2 /*return*/, resp];
|
|
@@ -10280,7 +10281,7 @@ var getViews = function (Search) { return __awaiter(void 0, void 0, void 0, func
|
|
|
10280
10281
|
apiService = new MESApiService();
|
|
10281
10282
|
parameters = [];
|
|
10282
10283
|
parameters.push({ name: "Search", value: Search });
|
|
10283
|
-
return [4 /*yield*/, apiService.callV2("
|
|
10284
|
+
return [4 /*yield*/, apiService.callV2(ihPath + ".[GetViews]", parameters)];
|
|
10284
10285
|
case 1:
|
|
10285
10286
|
resp = _a.sent();
|
|
10286
10287
|
return [2 /*return*/, resp];
|
|
@@ -10297,7 +10298,7 @@ var upsertView = function (ViewId, ViewName, isPublic) { return __awaiter(void 0
|
|
|
10297
10298
|
parameters.push({ name: "ViewId", value: ViewId });
|
|
10298
10299
|
parameters.push({ name: "ViewName", value: ViewName });
|
|
10299
10300
|
parameters.push({ name: "isPublic", value: isPublic });
|
|
10300
|
-
return [4 /*yield*/, apiService.callV2("
|
|
10301
|
+
return [4 /*yield*/, apiService.callV2(ihPath + ".[UpsertView]", parameters)];
|
|
10301
10302
|
case 1:
|
|
10302
10303
|
resp = _a.sent();
|
|
10303
10304
|
return [2 /*return*/, resp];
|
|
@@ -10312,7 +10313,7 @@ var deleteView = function (ViewId) { return __awaiter(void 0, void 0, void 0, fu
|
|
|
10312
10313
|
apiService = new MESApiService();
|
|
10313
10314
|
parameters = [];
|
|
10314
10315
|
parameters.push({ name: "ViewId", value: ViewId });
|
|
10315
|
-
return [4 /*yield*/, apiService.callV2("
|
|
10316
|
+
return [4 /*yield*/, apiService.callV2(ihPath + ".[DeleteView]", parameters)];
|
|
10316
10317
|
case 1:
|
|
10317
10318
|
resp = _a.sent();
|
|
10318
10319
|
return [2 /*return*/, resp];
|
|
@@ -10328,7 +10329,7 @@ var getViewTags = function (ViewId) { return __awaiter(void 0, void 0, void 0, f
|
|
|
10328
10329
|
apiService = new MESApiService();
|
|
10329
10330
|
parameters = [];
|
|
10330
10331
|
parameters.push({ name: "ViewId", value: ViewId });
|
|
10331
|
-
return [4 /*yield*/, apiService.callV2("
|
|
10332
|
+
return [4 /*yield*/, apiService.callV2(ihPath + ".[GetViewTags]", parameters)];
|
|
10332
10333
|
case 1:
|
|
10333
10334
|
resp = _a.sent();
|
|
10334
10335
|
return [2 /*return*/, resp];
|
|
@@ -10350,7 +10351,7 @@ var upsertViewTag = function (ViewId, TagId, Color, MinScale, MaxScale, IsVisibl
|
|
|
10350
10351
|
parameters.push({ name: "IsVisible", value: IsVisible });
|
|
10351
10352
|
parameters.push({ name: "IsAutoScale", value: IsAutoScale });
|
|
10352
10353
|
parameters.push({ name: "Unit", value: Unit });
|
|
10353
|
-
return [4 /*yield*/, apiService.callV2("
|
|
10354
|
+
return [4 /*yield*/, apiService.callV2(ihPath + ".[UpsertViewTag]", parameters)];
|
|
10354
10355
|
case 1:
|
|
10355
10356
|
resp = _a.sent();
|
|
10356
10357
|
return [2 /*return*/, resp];
|
|
@@ -10365,7 +10366,7 @@ var deleteAllViewTagsFromView = function (ViewId) { return __awaiter(void 0, voi
|
|
|
10365
10366
|
apiService = new MESApiService();
|
|
10366
10367
|
parameters = [];
|
|
10367
10368
|
parameters.push({ name: "ViewId", value: ViewId });
|
|
10368
|
-
return [4 /*yield*/, apiService.callV2("
|
|
10369
|
+
return [4 /*yield*/, apiService.callV2(ihPath + ".[DeleteAllViewTagsFromView]", parameters)];
|
|
10369
10370
|
case 1:
|
|
10370
10371
|
resp = _a.sent();
|
|
10371
10372
|
return [2 /*return*/, resp];
|
|
@@ -11903,6 +11904,28 @@ var TrendingsPage = function (props) {
|
|
|
11903
11904
|
};
|
|
11904
11905
|
|
|
11905
11906
|
var index = function () {
|
|
11907
|
+
var _a = useState(false), ihPathLoaded = _a[0], setIhPathLoaded = _a[1];
|
|
11908
|
+
useEffect(function () {
|
|
11909
|
+
var getIhPath = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
11910
|
+
var resp;
|
|
11911
|
+
return __generator(this, function (_a) {
|
|
11912
|
+
switch (_a.label) {
|
|
11913
|
+
case 0: return [4 /*yield*/, axiosInstance.get('/backend/ih-path')];
|
|
11914
|
+
case 1:
|
|
11915
|
+
resp = _a.sent();
|
|
11916
|
+
localStorage.setItem('ihPath', resp.data);
|
|
11917
|
+
setIhPathLoaded(true);
|
|
11918
|
+
return [2 /*return*/];
|
|
11919
|
+
}
|
|
11920
|
+
});
|
|
11921
|
+
}); };
|
|
11922
|
+
getIhPath().then(function () {
|
|
11923
|
+
console.log('ih path loaded');
|
|
11924
|
+
});
|
|
11925
|
+
}, []);
|
|
11926
|
+
if (!ihPathLoaded) {
|
|
11927
|
+
return (React__default.createElement("div", { className: 'd-flex justify-content-center align-items-center' }, "Loading..."));
|
|
11928
|
+
}
|
|
11906
11929
|
return (React__default.createElement(TrendingProvider, null,
|
|
11907
11930
|
React__default.createElement(TrendingsPage, null)));
|
|
11908
11931
|
};
|