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

qiuxiafan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-booster-ui.git


The following commit(s) were added to refs/heads/main by this push:
     new 1f651cf5 Fix: Add the prefix for http url (#471)
1f651cf5 is described below

commit 1f651cf528452537f4c378228eb95d055244c83f
Author: Fine0830 <fanxue0...@gmail.com>
AuthorDate: Fri May 30 15:37:27 2025 +0800

    Fix: Add the prefix for http url (#471)
---
 src/graphql/http/url.ts               |  8 ++++----
 src/views/settings/components/TTL.vue | 16 ++++++++++++++--
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/src/graphql/http/url.ts b/src/graphql/http/url.ts
index 695f1acd..7ed61e89 100644
--- a/src/graphql/http/url.ts
+++ b/src/graphql/http/url.ts
@@ -14,9 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
+const PREFIX = process.env.NODE_ENV === "development" || process.env.NODE_ENV 
=== "test" ? "/api" : "";
 export const HttpURL = {
-  ClusterNodes: `/api/status/cluster/nodes`,
-  ConfigTTL: `/api/status/config/ttl`,
-  DebuggingConfigDump: `/api/debugging/config/dump`,
+  ClusterNodes: `${PREFIX}/status/cluster/nodes`,
+  ConfigTTL: `${PREFIX}/status/config/ttl`,
+  DebuggingConfigDump: `${PREFIX}/debugging/config/dump`,
 };
diff --git a/src/views/settings/components/TTL.vue 
b/src/views/settings/components/TTL.vue
index 4e0ba92e..5e2a6ea8 100644
--- a/src/views/settings/components/TTL.vue
+++ b/src/views/settings/components/TTL.vue
@@ -21,7 +21,13 @@ limitations under the License. -->
       :row-style="{ backgroundColor: 'var(--layout-background)' }"
     >
       <el-table-column v-for="item in MetricsTTLRow" :prop="item.value" 
:label="item.label" :key="item.value">
-        <template #default="scope">{{ scope.row[item.value] < 0 ? "N/A" : 
scope.row[item.value] }}</template>
+        {{
+          settingsStore.configTTL?.metrics
+            ? settingsStore.configTTL.metrics[item.value] < 0
+              ? "N/A"
+              : (settingsStore.configTTL?.metrics ?? {})[item.value]
+            : "N/A"
+        }}
       </el-table-column>
     </el-table>
     <div class="label">{{ t("recordsTTL") }}</div>
@@ -31,7 +37,13 @@ limitations under the License. -->
       :row-style="{ backgroundColor: 'var(--layout-background)' }"
     >
       <el-table-column v-for="item in RecordsTTLRow" :prop="item.value" 
:label="item.label" :key="item.value">
-        <template #default="scope">{{ scope.row[item.value] < 0 ? "N/A" : 
scope.row[item.value] }}</template>
+        {{
+          settingsStore.configTTL?.records
+            ? settingsStore.configTTL?.records[item.value] < 0
+              ? "N/A"
+              : (settingsStore.configTTL?.records || {})[item.value]
+            : "N/A"
+        }}
       </el-table-column>
     </el-table>
   </div>

Reply via email to