forked from github/dataease
Merge branch 'dev' of github.com:dataease/dataease into dev
This commit is contained in:
commit
ed8b17f8e6
@ -429,45 +429,45 @@
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.apache.maven.plugins</groupId>-->
|
||||
<!-- <artifactId>maven-antrun-plugin</artifactId>-->
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <?m2e execute onConfiguration?>-->
|
||||
<!-- <id>main-class-placement</id>-->
|
||||
<!-- <phase>generate-resources</phase>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <target>-->
|
||||
<!-- <move todir="src/main/resources/static">-->
|
||||
<!-- <fileset dir="../frontend/dist">-->
|
||||
<!-- <exclude name="*.html"/>-->
|
||||
<!-- </fileset>-->
|
||||
<!-- </move>-->
|
||||
<!-- <move todir="src/main/resources/templates">-->
|
||||
<!-- <fileset dir="../frontend/dist">-->
|
||||
<!-- <include name="*.html"/>-->
|
||||
<!-- </fileset>-->
|
||||
<!-- </move>-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<?m2e execute onConfiguration?>
|
||||
<id>main-class-placement</id>
|
||||
<phase>generate-resources</phase>
|
||||
<configuration>
|
||||
<target>
|
||||
<move todir="src/main/resources/static">
|
||||
<fileset dir="../frontend/dist">
|
||||
<exclude name="*.html"/>
|
||||
</fileset>
|
||||
</move>
|
||||
<move todir="src/main/resources/templates">
|
||||
<fileset dir="../frontend/dist">
|
||||
<include name="*.html"/>
|
||||
</fileset>
|
||||
</move>
|
||||
|
||||
<!-- <copy todir="src/main/resources/static/de-app">-->
|
||||
<!-- <fileset dir="../mobile/dist">-->
|
||||
<!-- <exclude name="*.html"/>-->
|
||||
<!-- </fileset>-->
|
||||
<!-- </copy>-->
|
||||
<copy todir="src/main/resources/static/de-app">
|
||||
<fileset dir="../mobile/dist">
|
||||
<exclude name="*.html"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
|
||||
<!-- <copy file="../mobile/dist/index.html" tofile="src/main/resources/templates/app.html" />-->
|
||||
<copy file="../mobile/dist/index.html" tofile="src/main/resources/templates/app.html" />
|
||||
|
||||
|
||||
<!-- </target>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>run</goal>-->
|
||||
<!-- </goals>-->
|
||||
<!-- </execution>-->
|
||||
<!-- </executions>-->
|
||||
<!-- </plugin>-->
|
||||
</target>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
@ -1,6 +1,5 @@
|
||||
package io.dataease.controller.panel.api;
|
||||
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.dataease.auth.annotation.DePermission;
|
||||
import io.dataease.commons.constants.DePermissionType;
|
||||
@ -19,7 +18,6 @@ import java.util.Map;
|
||||
@RequestMapping("/api/link")
|
||||
public interface LinkApi {
|
||||
|
||||
|
||||
@DePermission(type = DePermissionType.PANEL, value = "resourceId")
|
||||
@ApiOperation("重置密码")
|
||||
@PostMapping("/resetPwd")
|
||||
@ -45,7 +43,6 @@ public interface LinkApi {
|
||||
@PostMapping("/currentGenerate/{resourceId}")
|
||||
GenerateDto currentGenerate(String resourceId);
|
||||
|
||||
|
||||
@ApiOperation("验证访问")
|
||||
@PostMapping("/validate")
|
||||
ValidateDto validate(LinkValidateRequest request) throws Exception;
|
||||
@ -59,10 +56,11 @@ public interface LinkApi {
|
||||
Object resourceDetail(@PathVariable String resourceId);
|
||||
|
||||
@ApiOperation("视图详息")
|
||||
@PostMapping("/viewDetail/{viewId}")
|
||||
Object viewDetail(@PathVariable String viewId, @RequestBody ChartExtRequest requestList) throws Exception;
|
||||
@PostMapping("/viewDetail/{viewId}/{panelId}")
|
||||
Object viewDetail(@PathVariable("viewId") String viewId, @PathVariable("panelId") String panelId,
|
||||
@RequestBody ChartExtRequest requestList) throws Exception;
|
||||
|
||||
@ApiOperation("压缩链接")
|
||||
@PostMapping("/shortUrl")
|
||||
String shortUrl(@RequestBody Map<String,String> param);
|
||||
String shortUrl(@RequestBody Map<String, String> param);
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
package io.dataease.controller.panel.server;
|
||||
|
||||
|
||||
import com.auth0.jwt.JWT;
|
||||
import com.auth0.jwt.interfaces.DecodedJWT;
|
||||
import io.dataease.auth.filter.F2CLinkFilter;
|
||||
@ -25,18 +24,15 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import java.net.URLDecoder;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@RestController
|
||||
public class LinkServer implements LinkApi {
|
||||
|
||||
|
||||
@Autowired
|
||||
private PanelLinkService panelLinkService;
|
||||
|
||||
@Resource
|
||||
private ChartViewService chartViewService;
|
||||
|
||||
|
||||
@Override
|
||||
public void replacePwd(@RequestBody PasswordRequest request) {
|
||||
panelLinkService.password(request);
|
||||
@ -47,7 +43,6 @@ public class LinkServer implements LinkApi {
|
||||
panelLinkService.changeEnablePwd(request);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void resetOverTime(@RequestBody OverTimeRequest request) {
|
||||
panelLinkService.overTime(request);
|
||||
@ -96,8 +91,9 @@ public class LinkServer implements LinkApi {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object viewDetail(String viewId, ChartExtRequest requestList) throws Exception {
|
||||
HttpServletRequest request =((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
||||
public Object viewDetail(String viewId, String panelId, ChartExtRequest requestList) throws Exception {
|
||||
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
|
||||
.getRequest();
|
||||
String linkToken = request.getHeader(F2CLinkFilter.LINK_TOKEN_KEY);
|
||||
DecodedJWT jwt = JWT.decode(linkToken);
|
||||
Long userId = jwt.getClaim("userId").asLong();
|
||||
@ -105,7 +101,6 @@ public class LinkServer implements LinkApi {
|
||||
return chartViewService.getData(viewId, requestList);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String shortUrl(Map<String, String> param) {
|
||||
String resourceId = param.get("resourceId");
|
||||
|
@ -64,9 +64,9 @@ export function loadResource(resourceId) {
|
||||
})
|
||||
}
|
||||
|
||||
export function viewInfo(id, data) {
|
||||
export function viewInfo(id, panelId, data) {
|
||||
return request({
|
||||
url: 'api/link/viewDetail/' + id,
|
||||
url: 'api/link/viewDetail/' + id + '/' + panelId,
|
||||
method: 'post',
|
||||
hideMsg: true,
|
||||
data
|
||||
|
Loading…
Reference in New Issue
Block a user