This is an automated email from the ASF dual-hosted git repository.

jeffreyh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/doris-opentelemetry-demo.git


The following commit(s) were added to refs/heads/main by this push:
     new 1695c86  fix: fix generateUid works failed
1695c86 is described below

commit 1695c864980f921e54dae998ba5c1b9dba4e4cc8
Author: Jeffrey <[email protected]>
AuthorDate: Mon Aug 18 19:18:10 2025 +0800

    fix: fix generateUid works failed
---
 src/grafana/plugins/doris-app/892.js               |  78 +++++++++++++++++----
 src/grafana/plugins/doris-app/892.js.map           |   2 +-
 .../plugins/doris-app/gpx_doris-app_darwin_amd64   | Bin 25602304 -> 25602304 
bytes
 .../plugins/doris-app/gpx_doris-app_darwin_arm64   | Bin 24454450 -> 24454450 
bytes
 .../plugins/doris-app/gpx_doris-app_linux_amd64    | Bin 24740024 -> 24740024 
bytes
 .../plugins/doris-app/gpx_doris-app_linux_arm      | Bin 23199928 -> 23199928 
bytes
 .../plugins/doris-app/gpx_doris-app_linux_arm64    | Bin 23462072 -> 23462072 
bytes
 .../doris-app/gpx_doris-app_windows_amd64.exe      | Bin 25480192 -> 25480192 
bytes
 src/grafana/plugins/doris-app/module.js            |   4 +-
 src/grafana/plugins/doris-app/module.js.map        |   2 +-
 10 files changed, 69 insertions(+), 17 deletions(-)

diff --git a/src/grafana/plugins/doris-app/892.js 
b/src/grafana/plugins/doris-app/892.js
index 135df08..adbd4ac 100644
--- a/src/grafana/plugins/doris-app/892.js
+++ b/src/grafana/plugins/doris-app/892.js
@@ -3026,28 +3026,80 @@ function _async_to_generator(fn) {
         });
     };
 }
+function utils_define_property(obj, key, value) {
+    if (key in obj) {
+        Object.defineProperty(obj, key, {
+            value: value,
+            enumerable: true,
+            configurable: true,
+            writable: true
+        });
+    } else {
+        obj[key] = value;
+    }
+    return obj;
+}
+function utils_object_spread(target) {
+    for(var i = 1; i < arguments.length; i++){
+        var source = arguments[i] != null ? arguments[i] : {};
+        var ownKeys = Object.keys(source);
+        if (typeof Object.getOwnPropertySymbols === "function") {
+            ownKeys = 
ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
+                return Object.getOwnPropertyDescriptor(source, sym).enumerable;
+            }));
+        }
+        ownKeys.forEach(function(key) {
+            utils_define_property(target, key, source[key]);
+        });
+    }
+    return target;
+}
+function utils_ownKeys(object, enumerableOnly) {
+    var keys = Object.keys(object);
+    if (Object.getOwnPropertySymbols) {
+        var symbols = Object.getOwnPropertySymbols(object);
+        if (enumerableOnly) {
+            symbols = symbols.filter(function(sym) {
+                return Object.getOwnPropertyDescriptor(object, sym).enumerable;
+            });
+        }
+        keys.push.apply(keys, symbols);
+    }
+    return keys;
+}
+function utils_object_spread_props(target, source) {
+    source = source != null ? source : {};
+    if (Object.getOwnPropertyDescriptors) {
+        Object.defineProperties(target, 
Object.getOwnPropertyDescriptors(source));
+    } else {
+        utils_ownKeys(Object(source)).forEach(function(key) {
+            Object.defineProperty(target, key, 
Object.getOwnPropertyDescriptor(source, key));
+        });
+    }
+    return target;
+}
 function generateUid(obj) {
     return _async_to_generator(function*() {
-        // 将对象排序后转换为 JSON 字符串,以确保属性顺序不影响哈希结果
+        // 确保属性排序一致
         const jsonString = JSON.stringify(obj, Object.keys(obj).sort());
         // 编码为 UTF-8
-        const encoder = new TextEncoder();
-        const data = encoder.encode(jsonString);
-        // 计算 SHA-256 哈希值
-        const hashBuffer = yield crypto.subtle.digest('SHA-256', data);
-        // 将哈希值转换为十六进制字符串
-        const hashArray = Array.from(new Uint8Array(hashBuffer));
-        const hashHex = hashArray.map((b)=>b.toString(16).padStart(2, 
'0')).join('');
-        return hashHex;
+        const data = new TextEncoder().encode(jsonString);
+        // 显式使用浏览器的 crypto.subtle
+        const hashBuffer = yield window.crypto.subtle.digest('SHA-256', data);
+        // 转 hex
+        return Array.from(new 
Uint8Array(hashBuffer)).map((b)=>b.toString(16).padStart(2, '0')).join('');
     })();
 }
 function generateTableDataUID(items) {
     return _async_to_generator(function*() {
-        for (let item of items){
+        const result = [];
+        for (const item of items){
             const uid = yield generateUid(item._original);
-            item['_uid'] = uid;
+            result.push(utils_object_spread_props(utils_object_spread({}, 
item), {
+                _uid: uid
+            }));
         }
-        return items;
+        return result;
     })();
 }
 
@@ -4688,4 +4740,4 @@ function PageDiscover() {
 /***/ })
 
 }]);
-//# sourceMappingURL=892.js.map?_cache=aeeb41a05e6bcc1f2772
\ No newline at end of file
+//# sourceMappingURL=892.js.map?_cache=24dff9e638b25a5f1233
\ No newline at end of file
diff --git a/src/grafana/plugins/doris-app/892.js.map 
b/src/grafana/plugins/doris-app/892.js.map
index 7f574a8..69577b2 100644
--- a/src/grafana/plugins/doris-app/892.js.map
+++ b/src/grafana/plugins/doris-app/892.js.map
@@ -1 +1 @@
-{"version":3,"file":"892.js?_cache=aeeb41a05e6bcc1f2772","mappings":";;;;;;;;;AAAO,MAAMA,UAAU;IACrBC,WAAW;QACTC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;IACV;IACAC,SAAS;QACPC,WAAW;QACXC,gBAAgB;IAClB;IACAC,SAAS;QACPF,WAAW;IACb;IACAG,WAAW;QACTH,WAAW;IACb;IACAI,UAAU;QACRJ,WAAW;QACXK,cAAc;IAChB;AACF,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACpBiC;AACE;AAE9B,MAAMG,uBAAuBD,yCAAMA,CAACE,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;AAsB/C,CAAC,CAAC;AAEK,MAAMC,2BAA2BH,yCAAMA,CAACE,GAAG,CAAC;;;;;;;;;;AAUnD,CAAC,CAAC;AAEK,MAAME,gBA
 [...]
\ No newline at end of file
+{"version":3,"file":"892.js?_cache=24dff9e638b25a5f1233","mappings":";;;;;;;;;AAAO,MAAMA,UAAU;IACrBC,WAAW;QACTC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;IACV;IACAC,SAAS;QACPC,WAAW;QACXC,gBAAgB;IAClB;IACAC,SAAS;QACPF,WAAW;IACb;IACAG,WAAW;QACTH,WAAW;IACb;IACAI,UAAU;QACRJ,WAAW;QACXK,cAAc;IAChB;AACF,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACpBiC;AACE;AAE9B,MAAMG,uBAAuBD,yCAAMA,CAACE,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;AAsB/C,CAAC,CAAC;AAEK,MAAMC,2BAA2BH,yCAAMA,CAACE,GAAG,CAAC;;;;;;;;;;AAUnD,CAAC,CAAC;AAEK,MAAME,gBA
 [...]
\ No newline at end of file
diff --git a/src/grafana/plugins/doris-app/gpx_doris-app_darwin_amd64 
b/src/grafana/plugins/doris-app/gpx_doris-app_darwin_amd64
index 5bad253..0487cd0 100755
Binary files a/src/grafana/plugins/doris-app/gpx_doris-app_darwin_amd64 and 
b/src/grafana/plugins/doris-app/gpx_doris-app_darwin_amd64 differ
diff --git a/src/grafana/plugins/doris-app/gpx_doris-app_darwin_arm64 
b/src/grafana/plugins/doris-app/gpx_doris-app_darwin_arm64
index 3bf8e96..7e99f9e 100755
Binary files a/src/grafana/plugins/doris-app/gpx_doris-app_darwin_arm64 and 
b/src/grafana/plugins/doris-app/gpx_doris-app_darwin_arm64 differ
diff --git a/src/grafana/plugins/doris-app/gpx_doris-app_linux_amd64 
b/src/grafana/plugins/doris-app/gpx_doris-app_linux_amd64
index 6afbb8d..6083e9f 100755
Binary files a/src/grafana/plugins/doris-app/gpx_doris-app_linux_amd64 and 
b/src/grafana/plugins/doris-app/gpx_doris-app_linux_amd64 differ
diff --git a/src/grafana/plugins/doris-app/gpx_doris-app_linux_arm 
b/src/grafana/plugins/doris-app/gpx_doris-app_linux_arm
index e1fbdd6..369e678 100755
Binary files a/src/grafana/plugins/doris-app/gpx_doris-app_linux_arm and 
b/src/grafana/plugins/doris-app/gpx_doris-app_linux_arm differ
diff --git a/src/grafana/plugins/doris-app/gpx_doris-app_linux_arm64 
b/src/grafana/plugins/doris-app/gpx_doris-app_linux_arm64
index 3a6f26c..7d4eac4 100755
Binary files a/src/grafana/plugins/doris-app/gpx_doris-app_linux_arm64 and 
b/src/grafana/plugins/doris-app/gpx_doris-app_linux_arm64 differ
diff --git a/src/grafana/plugins/doris-app/gpx_doris-app_windows_amd64.exe 
b/src/grafana/plugins/doris-app/gpx_doris-app_windows_amd64.exe
index 6829eb4..6081019 100755
Binary files a/src/grafana/plugins/doris-app/gpx_doris-app_windows_amd64.exe 
and b/src/grafana/plugins/doris-app/gpx_doris-app_windows_amd64.exe differ
diff --git a/src/grafana/plugins/doris-app/module.js 
b/src/grafana/plugins/doris-app/module.js
index b46c897..c753aeb 100644
--- a/src/grafana/plugins/doris-app/module.js
+++ b/src/grafana/plugins/doris-app/module.js
@@ -1192,7 +1192,7 @@ module.exports = domAPI;
 /******/               // This function allow to reference async chunks
 /******/               __webpack_require__.u = (chunkId) => {
 /******/                       // return url for filenames based on template
-/******/                       return "" + chunkId + ".js?_cache=" + 
{"35":"6d86e876a981760ae4a1","181":"ce826c664576171bad6c","202":"960b652c09389756ed7b","462":"5440070870454b81ce34","632":"20f9d65c2526bb592e0a","723":"cd85aac21ae242f5f0f2","892":"aeeb41a05e6bcc1f2772","906":"c5c71c22310462d0fa64"}[chunkId]
 + "";
+/******/                       return "" + chunkId + ".js?_cache=" + 
{"35":"6d86e876a981760ae4a1","181":"ce826c664576171bad6c","202":"960b652c09389756ed7b","462":"5440070870454b81ce34","632":"20f9d65c2526bb592e0a","723":"cd85aac21ae242f5f0f2","892":"24dff9e638b25a5f1233","906":"c5c71c22310462d0fa64"}[chunkId]
 + "";
 /******/               };
 /******/       })();
 /******/       
@@ -1282,7 +1282,7 @@ module.exports = domAPI;
 /******/       
 /******/       /* webpack/runtime/compat */
 /******/       
-/******/       __webpack_require__.sriHashes = 
{"35":"sha256-8TWj0IuqCnw+QkYOR4eAnmDEKCIKywuChqXPt3S4FV0=","181":"sha256-jQioVDwy6+zI6R5tkOP1uFevBjj+G6LCx15ntqcO/8M=","202":"sha256-CN4kzTw1qZgwAinJ1/Yabb8xvpGp0KP+/BizIwiPgfQ=","462":"sha256-JS4wDqS1h7LXA99a07Iy4ej0It/6EsktYnxY1AhffHw=","632":"sha256-MW1oi1N0a/3ek7LCgIZcCVt3rVRNjLXJmSZD8oTGIZY=","723":"sha256-YDvp7Qjz8uu5Sk0fPOr2QrUrKd0OfhzUsNXFLgjBQwM=","892":"sha256-TZICkNlWQYXx+AVaBwmMrNvrr/X+81Dzn8xp4IWrK+E=","906":"sha256-tEhWWkd4HOGiN1BQ
 [...]
+/******/       __webpack_require__.sriHashes = 
{"35":"sha256-8TWj0IuqCnw+QkYOR4eAnmDEKCIKywuChqXPt3S4FV0=","181":"sha256-jQioVDwy6+zI6R5tkOP1uFevBjj+G6LCx15ntqcO/8M=","202":"sha256-CN4kzTw1qZgwAinJ1/Yabb8xvpGp0KP+/BizIwiPgfQ=","462":"sha256-JS4wDqS1h7LXA99a07Iy4ej0It/6EsktYnxY1AhffHw=","632":"sha256-MW1oi1N0a/3ek7LCgIZcCVt3rVRNjLXJmSZD8oTGIZY=","723":"sha256-YDvp7Qjz8uu5Sk0fPOr2QrUrKd0OfhzUsNXFLgjBQwM=","892":"sha256-NYdhd6aUU1lpWGlumdC48ds3z8Fa3UBeQ0eFx0qOXS0=","906":"sha256-tEhWWkd4HOGiN1BQ
 [...]
 /******/       
 /******/       /* webpack/runtime/jsonp chunk loading */
 /******/       (() => {
diff --git a/src/grafana/plugins/doris-app/module.js.map 
b/src/grafana/plugins/doris-app/module.js.map
index ca79f39..f4d1dd9 100644
--- a/src/grafana/plugins/doris-app/module.js.map
+++ b/src/grafana/plugins/doris-app/module.js.map
@@ -1 +1 @@
-{"version":3,"file":"module.js","mappings":";;;;;;;;AAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA,gDAAgD;AAChD;AACA;AACA,qFAAqF;AACrF;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,qBAAqB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,sFAAsF,qBAAqB;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV
 [...]
\ No newline at end of file
+{"version":3,"file":"module.js","mappings":";;;;;;;;AAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA,gDAAgD;AAChD;AACA;AACA,qFAAqF;AACrF;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,qBAAqB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,sFAAsF,qBAAqB;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV
 [...]
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to