Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
v2.6.1
-
computery:macOS Mojave 10.14.5
-
Patch
Description
After selecting the project-name, it will go to the backend to get the cube under the current project, but there will be a request to get all the cubes, even if the backend does not succeed in the permission control, but this is superfluous. I checked and found that all the cubes were obtained only because I need to judge whether there is a cube with the same name when editing or creating the cube. This should not be done in the front end, but the information is submitted to the back end when the cube is created. A unified judgment is made by the back end. Otherwise, there will be a situation where the number of cubes that can be viewed by the current logged-in user's privilege is limited, so it is not complete to determine whether the cube is renamed at the time of creation. This leads to the fact that even if the cube with the same name is created, you can see two cubes with the same name when you can view all cube users (admin). . .
The extra code path to get the cube request:
webapp/app/js/controllers/cubeSchema.js
In this position :
This code should not be written directly in the CubeSchemaCtrl controller, otherwise it will trigger the execution of this code when a page references the controller, and there is a case of repeated request to initiate the request. I don't know why. Perhaps it is because the other properties or methods under this controller change to trigger the execution of this code.
I pass the check backend
server-base/src/main/java/org/apache/kylin/rest/controller/CubeController.java
The file found that there is a ready-made check interface, and I don't know why it is not connected. I refer it to the front end for the request and delete the other redundant code.