-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Improvement][ui] improving to find current version identifier(#15815) #15933
base: dev
Are you sure you want to change the base?
Changes from 11 commits
3a9e080
35f0aac
4ec8f9a
f808e70
00fbaca
b9fedfc
c02e79d
5043916
db81822
a524f5e
a188699
1e7b930
d8b6741
e84feb3
e03491b
228a84c
234d61a
b2abdd2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -18,7 +18,9 @@ | |||||||||||||||||||||
package org.apache.dolphinscheduler.api.controller; | ||||||||||||||||||||||
|
||||||||||||||||||||||
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_PLUGINS_ERROR; | ||||||||||||||||||||||
import static org.apache.dolphinscheduler.api.enums.Status.VERSION_INFO_STATE_ERROR; | ||||||||||||||||||||||
|
||||||||||||||||||||||
import org.apache.dolphinscheduler.api.dto.ProductInfoDto; | ||||||||||||||||||||||
import org.apache.dolphinscheduler.api.exceptions.ApiException; | ||||||||||||||||||||||
import org.apache.dolphinscheduler.api.service.UiPluginService; | ||||||||||||||||||||||
import org.apache.dolphinscheduler.api.utils.Result; | ||||||||||||||||||||||
|
@@ -27,22 +29,24 @@ | |||||||||||||||||||||
import org.apache.dolphinscheduler.dao.entity.User; | ||||||||||||||||||||||
|
||||||||||||||||||||||
import java.util.Map; | ||||||||||||||||||||||
|
||||||||||||||||||||||
import org.springframework.beans.factory.annotation.Autowired; | ||||||||||||||||||||||
import org.springframework.http.HttpStatus; | ||||||||||||||||||||||
import org.springframework.web.bind.annotation.GetMapping; | ||||||||||||||||||||||
import org.springframework.web.bind.annotation.PathVariable; | ||||||||||||||||||||||
import org.springframework.web.bind.annotation.RequestAttribute; | ||||||||||||||||||||||
import org.springframework.web.bind.annotation.RequestMapping; | ||||||||||||||||||||||
import org.springframework.web.bind.annotation.RequestParam; | ||||||||||||||||||||||
import org.springframework.web.bind.annotation.ResponseStatus; | ||||||||||||||||||||||
import org.springframework.web.bind.annotation.RestController; | ||||||||||||||||||||||
|
||||||||||||||||||||||
import io.swagger.v3.oas.annotations.Operation; | ||||||||||||||||||||||
import io.swagger.v3.oas.annotations.Parameter; | ||||||||||||||||||||||
import io.swagger.v3.oas.annotations.Parameters; | ||||||||||||||||||||||
import io.swagger.v3.oas.annotations.media.Schema; | ||||||||||||||||||||||
import io.swagger.v3.oas.annotations.tags.Tag; | ||||||||||||||||||||||
import org.springframework.web.bind.annotation.GetMapping; | ||||||||||||||||||||||
import org.springframework.web.bind.annotation.RequestMapping; | ||||||||||||||||||||||
import org.springframework.web.bind.annotation.ResponseStatus; | ||||||||||||||||||||||
import org.springframework.web.bind.annotation.RestController; | ||||||||||||||||||||||
import org.springframework.web.bind.annotation.PostMapping; | ||||||||||||||||||||||
import org.springframework.web.bind.annotation.RequestAttribute; | ||||||||||||||||||||||
import org.springframework.web.bind.annotation.PathVariable; | ||||||||||||||||||||||
import org.springframework.web.bind.annotation.RequestParam; | ||||||||||||||||||||||
|
||||||||||||||||||||||
import static org.apache.dolphinscheduler.api.enums.Status.*; | ||||||||||||||||||||||
|
||||||||||||||||||||||
/** | ||||||||||||||||||||||
* ui plugin controller | ||||||||||||||||||||||
|
@@ -85,4 +89,18 @@ public Result queryUiPluginDetailById(@Parameter(hidden = true) @RequestAttribut | |||||||||||||||||||||
Map<String, Object> result = uiPluginService.queryUiPluginDetailById(pluginId); | ||||||||||||||||||||||
return returnDataList(result); | ||||||||||||||||||||||
} | ||||||||||||||||||||||
|
||||||||||||||||||||||
/** | ||||||||||||||||||||||
* obtain project version and address | ||||||||||||||||||||||
* @return product info | ||||||||||||||||||||||
*/ | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
@Operation(summary = "queryProductInfo", description = "QUERY_PRODUCT_INFO") | ||||||||||||||||||||||
@PostMapping(value = "/queryProductInfo") | ||||||||||||||||||||||
ruanwenjun marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||
@ResponseStatus(HttpStatus.OK) | ||||||||||||||||||||||
@ApiException(VERSION_INFO_STATE_ERROR) | ||||||||||||||||||||||
public Result<ProductInfoDto> queryProductInfo( | ||||||||||||||||||||||
@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser) { | ||||||||||||||||||||||
|
||||||||||||||||||||||
ProductInfoDto result = uiPluginService.queryProductInfo(loginUser); | ||||||||||||||||||||||
return Result.success(result); | ||||||||||||||||||||||
} | ||||||||||||||||||||||
} |
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,35 @@ | ||||||||||||||
/* | ||||||||||||||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||||||||||||||
* contributor license agreements. See the NOTICE file distributed with | ||||||||||||||
* this work for additional information regarding copyright ownership. | ||||||||||||||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||||||||||||||
* (the "License"); you may not use this file except in compliance with | ||||||||||||||
* the License. You may obtain a copy of the License at | ||||||||||||||
* | ||||||||||||||
* http://www.apache.org/licenses/LICENSE-2.0 | ||||||||||||||
* | ||||||||||||||
* Unless required by applicable law or agreed to in writing, software | ||||||||||||||
* distributed under the License is distributed on an "AS IS" BASIS, | ||||||||||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||||||||||||
* See the License for the specific language governing permissions and | ||||||||||||||
* limitations under the License. | ||||||||||||||
*/ | ||||||||||||||
|
||||||||||||||
package org.apache.dolphinscheduler.api.dto; | ||||||||||||||
|
||||||||||||||
import lombok.Data; | ||||||||||||||
|
||||||||||||||
import java.util.Date; | ||||||||||||||
import java.util.List; | ||||||||||||||
|
||||||||||||||
/** | ||||||||||||||
* ProductInfoDto | ||||||||||||||
*/ | ||||||||||||||
Comment on lines
+25
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment is meaningless, you need to remove. |
||||||||||||||
@Data | ||||||||||||||
public class ProductInfoDto { | ||||||||||||||
|
||||||||||||||
private Integer id; | ||||||||||||||
ruanwenjun marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
|
||||||||||||||
private String version; | ||||||||||||||
|
||||||||||||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
export default { | ||
about: 'About', | ||
about_version: 'Product Version' | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,5 +18,6 @@ | |
export default { | ||
profile: 'Profile', | ||
password: 'Password', | ||
about: 'About', | ||
logout: 'Logout' | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
export default { | ||
about: '关于产品', | ||
about_version: '产品版本' | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,5 +18,6 @@ | |
export default { | ||
profile: '用户信息', | ||
password: '密码管理', | ||
about: '产品信息', | ||
logout: '退出登录' | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid wildcard import.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use mvn spotless:apply to fix these.