add PREFIX for http url

This commit is contained in:
Fine 2025-05-30 15:23:33 +08:00
parent 7dcc67f455
commit b53edd4ecc
2 changed files with 14 additions and 6 deletions

View File

@ -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`,
};

View File

@ -21,7 +21,11 @@ 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 || {})[item.value] < 0
? "N/A"
: (settingsStore.configTTL?.metrics || {})[item.value]
}}
</el-table-column>
</el-table>
<div class="label">{{ t("recordsTTL") }}</div>
@ -31,7 +35,11 @@ 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 || {})[item.value] < 0
? "N/A"
: (settingsStore.configTTL?.records || {})[item.value]
}}
</el-table-column>
</el-table>
</div>