Commit 05ceebad authored by lepdou's avatar lepdou

private app namespace dont need prefix

parent 5395c802
...@@ -95,11 +95,13 @@ public class NamespaceController { ...@@ -95,11 +95,13 @@ public class NamespaceController {
//add app org id as prefix //add app org id as prefix
App app = appService.load(appId); App app = appService.load(appId);
if (appNamespace.formatAsEnum() == ConfigFileFormat.Properties) { StringBuilder appNamespaceName = new StringBuilder();
appNamespace.setName(String.format("%s.%s", app.getOrgId(), appNamespace.getName())); //add prefix postfix
} else { appNamespaceName
appNamespace.setName(String.format("%s.%s.%s", app.getOrgId(), appNamespace.getName(), appNamespace.getFormat())); .append(appNamespace.isPublic() ? app.getOrgId() + "." : "")
} .append(appNamespace.getName())
.append(appNamespace.formatAsEnum() == ConfigFileFormat.Properties ? "" : "." + appNamespace.getFormat());
appNamespace.setName(appNamespaceName.toString());
String operator = userInfoHolder.getUser().getUserId(); String operator = userInfoHolder.getUser().getUserId();
if (StringUtils.isEmpty(appNamespace.getDataChangeCreatedBy())) { if (StringUtils.isEmpty(appNamespace.getDataChangeCreatedBy())) {
......
...@@ -63,11 +63,15 @@ ...@@ -63,11 +63,15 @@
<apollorequiredfiled></apollorequiredfiled> <apollorequiredfiled></apollorequiredfiled>
名称</label> 名称</label>
<div class="col-sm-4"> <div class="col-sm-4">
<div class="input-group"> <div class="input-group" ng-show="appNamespace.isPublic">
<span class="input-group-addon" ng-bind="appBaseInfo.namespacePrefix"></span> <span class="input-group-addon" ng-bind="appBaseInfo.namespacePrefix"></span>
<input type="text" class="form-control" ng-model="appNamespace.name" <input type="text" class="form-control" ng-model="appNamespace.name"
ng-required="type == 'create'"> ng-required="type == 'create'">
</div> </div>
<div ng-show="!appNamespace.isPublic">
<input type="text" class="form-control" ng-model="appNamespace.name"
ng-required="type == 'create'">
</div>
</div> </div>
<div class="col-sm-2" ng-if="hasRootPermission"> <div class="col-sm-2" ng-if="hasRootPermission">
<select class="form-control" ng-model="appNamespace.format"> <select class="form-control" ng-model="appNamespace.format">
...@@ -76,7 +80,7 @@ ...@@ -76,7 +80,7 @@
</select> </select>
</div> </div>
<span ng-bind="concatNamespace()" style="line-height: 34px;"></span> <span ng-show="appNamespace.isPublic" ng-bind="concatNamespace()" style="line-height: 34px;"></span>
</div> </div>
<div class="form-group" ng-show="type == 'create' && hasRootPermission"> <div class="form-group" ng-show="type == 'create' && hasRootPermission">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label">
......
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