Skip to content

Commit

Permalink
1. remove useless code
Browse files Browse the repository at this point in the history
2. fix failed ut
3. add change log
  • Loading branch information
lepdou committed Aug 5, 2021
1 parent 109c98d commit 41019b6
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Apollo 1.9.0
* [fix show-text-modal number display](https://github.com/ctripcorp/apollo/pull/3851)
* [Lazy load ConfigUtil](https://github.com/ctripcorp/apollo/pull/3864)
* [make jdbc session enable default](https://github.com/ctripcorp/apollo/pull/3869)
* [support json/yaml/xml format for public namespace](https://github.com/ctripcorp/apollo/pull/3836)

------------------
All issues and pull requests are [here](https://github.com/ctripcorp/apollo/milestone/6?closed=1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,6 @@ public AppNamespace createAppNamespaceInLocal(AppNamespace appNamespace, boolean
throw new BadRequestException("App not exist. AppId = " + appId);
}

// public namespaces only allow properties format
// if (appNamespace.isPublic()) {
// appNamespace.setFormat(ConfigFileFormat.Properties.getValue());
// }

StringBuilder appNamespaceName = new StringBuilder();
//add prefix postfix
appNamespaceName
Expand Down
3 changes: 1 addition & 2 deletions apollo-portal/src/main/resources/static/namespace.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@
</div>
</div>

<!--public namespace can only be properties -->
<div class="col-sm-2">
<select class="form-control" name="format" ng-model="appNamespace.format">
<option value="properties">properties</option>
Expand Down Expand Up @@ -254,4 +253,4 @@ <h3>{{'Common.Created' | translate }}</h3>

</body>

</html>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ namespace_module.controller("LinkNamespaceController",
};

function shouldAppendNamespacePrefix() {
//return $scope.appNamespace.isPublic ? $scope.appendNamespacePrefix : false;
return $scope.appendNamespacePrefix;
}

Expand Down Expand Up @@ -150,11 +149,6 @@ namespace_module.controller("LinkNamespaceController",
return;
}

// public namespaces only allow properties format
// if ($scope.appNamespace.isPublic) {
// $scope.appNamespace.format = 'properties';
// }

$scope.submitBtnDisabled = true;
//only append namespace prefix for public app namespace
var appendNamespacePrefix = shouldAppendNamespacePrefix();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public void testCreatePublicAppNamespaceWithWrongFormatNotExisted() {

Assert.assertNotNull(createdAppNamespace);
Assert.assertEquals(appNamespace.getName(), createdAppNamespace.getName());
Assert.assertEquals(ConfigFileFormat.Properties.getValue(), createdAppNamespace.getFormat());
Assert.assertEquals(ConfigFileFormat.YAML.getValue(), createdAppNamespace.getFormat());
}


Expand Down

0 comments on commit 41019b6

Please sign in to comment.