Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Summer2021 support more format #3871

Merged
merged 1 commit into from
Aug 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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