Browse Source

嵌入iframe修改,部分遗漏的模板补充

jie 11 months ago
parent
commit
e3ff7af9a5

+ 3 - 3
application.properties

@@ -76,7 +76,7 @@ datasource.driverClassName=com.mysql.cj.jdbc.Driver
 datasource.url=jdbc:mysql://localhost:3306/newdg?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
 datasource.username=root
 #datasource.password=123456
-datasource.password=123456
+datasource.password=root
 
 #datasource.driverClassName=com.mysql.cj.jdbc.Driver
 #datasource.url=jdbc:mysql://localhost:3306/newdg?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
@@ -112,6 +112,6 @@ dashboardSharePassword.authFailPastMinutes=60
 server.port=50401
 server.servlet.session.cookie.name=qinnamin
 
-lab2=https://blog.csdn.net/weixin_41129148/article/details/121208602
-#lab2=http://49.235.67.21/bdm/#/metaData-term
+#lab2=https://blog.csdn.net/weixin_41129148/article/details/121208602
+lab2=http://localhost:8080/#/metaData-term
 #-----------------------------------------

+ 37 - 0
datagear-web/src/main/java/org/datagear/web/controller/GetIpControllerForDataSet.java

@@ -0,0 +1,37 @@
+package org.datagear.web.controller;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.datagear.web.controller.AbstractController.CONTENT_TYPE_JSON;
+
+@Controller
+@RequestMapping("/dataSet/getIp")
+public class GetIpControllerForDataSet {
+    @Value("${lab2}")
+    String ip;
+
+    @RequestMapping(value ="/getIp")
+    @ResponseBody
+    public Object getIp(){
+        Map map=new HashMap();
+        map.put("ip",ip);
+        return map;
+    }
+//    @RequestMapping(value = "/changeLocale", produces = CONTENT_TYPE_JSON)
+//    @ResponseBody
+//    public Object changeLocale(HttpServletRequest request, HttpServletResponse response)
+//    {
+//        Map<String, Object> map = new HashMap<>();
+//        map.put("status", "ok");
+//        return map;
+//    }
+}

+ 1 - 1
datagear-web/src/main/resources/org/datagear/web/templates/chart/chart_form.ftl

@@ -34,7 +34,7 @@ readonly 是否只读操作,允许为null
 					<label><@spring.message code='chart.name' /></label>
 				</div>
 				<div class="form-item-value">
-					<input type="text" name="name" value="${(chart.name)!''}" class="ui-widget ui-widget-content ui-corner-all" />
+					<input type="text" name="name" maxlength="15" placeholder="名称长度应小于16" value="${(chart.name)!''}" class="ui-widget ui-widget-content ui-corner-all" />
 				</div>
 				<#include "../include/analysisProjectAware_form_select.ftl" >
 			</div>

+ 2 - 2
datagear-web/src/main/resources/org/datagear/web/templates/dataSet/generated.ftl

@@ -8,9 +8,9 @@
 </head>
 <body>
 
-<div id="app">
+<div id="app" style="height: 100%; width:100%">
     <iframe
-            :src="ip" width="1000px" height="600px">
+            :src="ip" width="100%" height="100%">
     </iframe>
 </div>
 <script>