Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
apollo
Commits
9f07d812
Commit
9f07d812
authored
Jul 11, 2016
by
Jason Song
Committed by
GitHub
Jul 11, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #320 from lepdou/bugfix_0711
private app namespace dont need prefix
parents
1b7a4aa0
05ceebad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
NamespaceController.java
...amework/apollo/portal/controller/NamespaceController.java
+7
-5
namespace.html
apollo-portal/src/main/resources/static/namespace.html
+6
-2
No files found.
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/NamespaceController.java
View file @
9f07d812
...
...
@@ -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
()))
{
...
...
apollo-portal/src/main/resources/static/namespace.html
View file @
9f07d812
...
...
@@ -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"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment