Commit a8ecf47c by lepdou

bugfix appnamespace format null

parent 5d404bd9
......@@ -16,6 +16,7 @@ import com.ctrip.framework.apollo.biz.entity.Audit;
import com.ctrip.framework.apollo.biz.repository.AppNamespaceRepository;
import com.ctrip.framework.apollo.common.utils.BeanUtils;
import com.ctrip.framework.apollo.core.ConfigConsts;
import com.ctrip.framework.apollo.core.enums.ConfigFileFormat;
import com.ctrip.framework.apollo.core.exception.ServiceException;
import com.ctrip.framework.apollo.core.utils.StringUtils;
......@@ -60,6 +61,7 @@ public class AppNamespaceService {
appNs.setAppId(appId);
appNs.setName(ConfigConsts.NAMESPACE_APPLICATION);
appNs.setComment("default app namespace");
appNs.setFormat(ConfigFileFormat.Properties.getValue());
appNs.setDataChangeCreatedBy(createBy);
appNs.setDataChangeLastModifiedBy(createBy);
appNamespaceRepository.save(appNs);
......
......@@ -5,6 +5,7 @@ import com.google.common.collect.Lists;
import com.ctrip.framework.apollo.portal.entity.po.UserInfo;
import com.ctrip.framework.apollo.portal.service.UserService;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
......@@ -15,7 +16,7 @@ public class DefaultUserService implements UserService {
@Override
public List<UserInfo> searchUsers(String keyword, int offset, int limit) {
return Collections.emptyList();
return Arrays.asList(assembleDefaultUser());
}
@Override
......
......@@ -2,6 +2,7 @@ package com.ctrip.framework.apollo.portal.service;
import com.ctrip.framework.apollo.common.entity.AppNamespace;
import com.ctrip.framework.apollo.core.ConfigConsts;
import com.ctrip.framework.apollo.core.enums.ConfigFileFormat;
import com.ctrip.framework.apollo.core.exception.BadRequestException;
import com.ctrip.framework.apollo.core.exception.ServiceException;
import com.ctrip.framework.apollo.portal.auth.UserInfoHolder;
......@@ -47,6 +48,7 @@ public class AppNamespaceService {
appNs.setAppId(appId);
appNs.setName(ConfigConsts.NAMESPACE_APPLICATION);
appNs.setComment("default app namespace");
appNs.setFormat(ConfigFileFormat.Properties.getValue());
String userId = userInfoHolder.getUser().getUserId();
appNs.setDataChangeCreatedBy(userId);
......
......@@ -42,8 +42,8 @@ namespace_module.controller("LinkNamespaceController",
appId: $scope.appId,
name: '',
comment: '',
isPublic: false,
format: 'xml'
isPublic: true,
format: 'properties'
};
$scope.switchNSType = function (type) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment