[Improvement][ui] improving to find current version identifier(#15815)

This commit is contained in:
1462719985@qq.com 2024-04-30 17:54:46 +08:00
parent 4ec8f9a7bd
commit f808e70a70
13 changed files with 30 additions and 26 deletions

View File

@ -29,13 +29,20 @@ import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
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.*;

View File

@ -18,7 +18,6 @@
package org.apache.dolphinscheduler.api.service;
import org.apache.dolphinscheduler.api.dto.ProductInfoDto;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.enums.PluginType;
import org.apache.dolphinscheduler.dao.entity.User;

View File

@ -106,8 +106,6 @@ public class UiPluginControllerTest extends AbstractControllerTest {
@Test
public void testQueryProductInfo() throws Exception {
// Map<String, Object> mockResult = new HashMap<>();
// mockResult.put(Constants.STATUS, Status.SUCCESS);
ProductInfoDto mockResult = new ProductInfoDto();
Mockito.when(uiPluginService.queryProductInfo(Mockito.any(), Mockito.anyInt())).thenReturn(mockResult);

View File

@ -31,8 +31,8 @@ export function useDropDown() {
useLogout()
} else if (key === 'password') {
router.push({ path: '/password' })
} else if (key === 'product') {
router.push({ path: '/product' })
} else if (key === 'about') {
router.push({ path: '/about' })
} else if (key === 'profile') {
router.push({ path: '/profile' })
}

View File

@ -374,8 +374,8 @@ export function useDataList() {
disabled: userStore.getSecurityConfigType !== 'PASSWORD'
},
{
label: t('user_dropdown.product'),
key: 'product',
label: t('user_dropdown.about'),
key: 'about',
icon: renderIcon(SelectOutlined),
},
{

View File

@ -16,6 +16,6 @@
*/
export default {
product: 'Product Info',
product_version: 'Product Version'
about: 'About',
about_version: 'Product Version'
}

View File

@ -32,7 +32,7 @@ import security from '@/locales/en_US/security'
import theme from '@/locales/en_US/theme'
import user_dropdown from '@/locales/en_US/user-dropdown'
import ui_setting from '@/locales/en_US/ui_setting'
import product from "@/locales/en_US/product";
import about from "@/locales/en_US/about";
export default {
login,
@ -42,7 +42,7 @@ export default {
menu,
home,
password,
product,
about,
profile,
monitor,
resource,

View File

@ -18,6 +18,6 @@
export default {
profile: 'Profile',
password: 'Password',
product: 'Product',
about: 'About',
logout: 'Logout'
}

View File

@ -16,6 +16,6 @@
*/
export default {
product: '产品信息',
product_version: '产品版本'
about: '关于产品',
about_version: '产品版本'
}

View File

@ -32,7 +32,7 @@ import security from '@/locales/zh_CN/security'
import theme from '@/locales/zh_CN/theme'
import user_dropdown from '@/locales/zh_CN/user-dropdown'
import ui_setting from '@/locales/zh_CN/ui_setting'
import product from "@/locales/zh_CN/product";
import about from "@/locales/zh_CN/about";
export default {
login,
@ -42,7 +42,7 @@ export default {
menu,
home,
password,
product,
about,
profile,
monitor,
resource,

View File

@ -18,6 +18,6 @@
export default {
profile: '用户信息',
password: '密码管理',
product: '产品信息',
about: '产品信息',
logout: '退出登录'
}

View File

@ -70,9 +70,9 @@ const basePage: RouteRecordRaw[] = [
}
},
{
path: '/product',
name: 'product',
component: components['product'],
path: '/about',
name: 'about',
component: components['about'],
meta: {
title: '产品信息',
auth: []

View File

@ -23,8 +23,8 @@ import { useUserStore } from '@/store/user/user'
import { queryProductInfo } from '@/service/modules/ui-plugins'
const userStore = useUserStore()
const product = defineComponent({
name: 'product',
const about = defineComponent({
name: 'about',
setup() {
const info: any = ref('')
const queryProduct = async (userId: number) => {
@ -45,11 +45,11 @@ const product = defineComponent({
return (
<div>
<Card
title={t('product.product')}
title={t('about.about')}
>
<NSpace vertical>
<NSpace align='center' >
<span>{t('product.product_version')}</span>
<span>{t('about.about_version')}</span>
<div>{ info }</div>
</NSpace>
</NSpace>
@ -58,4 +58,4 @@ const product = defineComponent({
)
}
})
export default product
export default about