feat: add no link

This commit is contained in:
Fine 2023-01-03 15:32:15 +08:00
parent 1d4fce9632
commit 78e96f887f
4 changed files with 19 additions and 2 deletions

View File

@ -179,6 +179,7 @@ const msg = {
when4xx: "Sample HTTP requests and responses with tracing when response code between 400 and 499",
when5xx: "Sample HTTP requests and responses with tracing when response code between 500 and 599",
taskTitle: "HTTP request and response collecting rules",
iframeWidgetTip: "Add a link to a widget",
seconds: "Seconds",
hourTip: "Select Hour",
minuteTip: "Select Minute",

View File

@ -162,6 +162,7 @@ const msg = {
latency: "Retraso",
metricValues: "Valor métrico",
legendValues: "Valor de la leyenda",
iframeWidgetTip: "Añadir enlaces a los gadgets",
seconds: "Segundos",
hourTip: "Seleccione Hora",
minuteTip: "Seleccione Minuto",

View File

@ -176,6 +176,7 @@ const msg = {
when4xx: "当响应代码介于400和499之间时带有跟踪的HTTP请求和响应示例",
when5xx: "当响应代码介于500和599之间时带有跟踪的HTTP请求和响应示例",
taskTitle: "HTTP请求和响应收集规则",
iframeWidgetTip: "添加widget的链接",
seconds: "秒",
hourTip: "选择小时",
minuteTip: "选择分钟",

View File

@ -30,7 +30,15 @@ limitations under the License. -->
</el-popover>
</div>
<div class="body">
<iframe :src="widget.url" width="100%" height="100%" scrolling="no" style="border: none"></iframe>
<iframe
v-if="widget.url"
:src="widget.url"
width="100%"
height="100%"
scrolling="no"
style="border: none"
></iframe>
<div v-else class="tips">{{ t("iframeWidgetTip") }}</div>
</div>
</div>
</template>
@ -78,7 +86,6 @@ limitations under the License. -->
}
.body {
padding: 0 20px 0 10px;
width: 100%;
height: 100%;
cursor: pointer;
@ -99,4 +106,11 @@ limitations under the License. -->
background-color: #eee;
}
}
.tips {
font-size: 14px;
color: #888;
width: 100%;
text-align: center;
}
</style>