Commit 05ceebad by lepdou

private app namespace dont need prefix

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