repo_name stringclasses 5 values | pr_number int64 1.52k 15.5k | pr_title stringlengths 8 143 | pr_description stringlengths 0 10.2k | author stringlengths 3 18 | date_created timestamp[ns, tz=UTC] | date_merged timestamp[ns, tz=UTC] | previous_commit stringlengths 40 40 | pr_commit stringlengths 40 40 | query stringlengths 11 10.2k | filepath stringlengths 6 220 | before_content stringlengths 0 597M | after_content stringlengths 0 597M | label int64 -1 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apolloconfig/apollo | 3,864 | Lazy load ConfigUtil | prevent ConfigUtil init when ApolloApplicationContextInitializer initialized,
That is too early.
This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f
## What's the purpose of this PR
XXXXX
## Which issue(s) this PR fixes:
Fixes #
## Brief changelog
XXXXX
Follow this checklist to help us incorporate your contribution quickly and easily:
- [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| lonre | 2021-07-31T12:12:17Z | 2021-08-04T00:43:24Z | 02c43dd547db3d44253d0b08659b8b0e8e3a8374 | bfdfd985fbdd7fd156ddb0be34507224a3db70f5 | Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized,
That is too early.
This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f
## What's the purpose of this PR
XXXXX
## Which issue(s) this PR fixes:
Fixes #
## Brief changelog
XXXXX
Follow this checklist to help us incorporate your contribution quickly and easily:
- [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/InstanceService.java | /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.portal.service;
import com.ctrip.framework.apollo.common.dto.InstanceDTO;
import com.ctrip.framework.apollo.common.dto.PageDTO;
import com.ctrip.framework.apollo.portal.environment.Env;
import com.ctrip.framework.apollo.portal.api.AdminServiceAPI;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Set;
@Service
public class InstanceService {
private final AdminServiceAPI.InstanceAPI instanceAPI;
public InstanceService(final AdminServiceAPI.InstanceAPI instanceAPI) {
this.instanceAPI = instanceAPI;
}
public PageDTO<InstanceDTO> getByRelease(Env env, long releaseId, int page, int size){
return instanceAPI.getByRelease(env, releaseId, page, size);
}
public PageDTO<InstanceDTO> getByNamespace(Env env, String appId, String clusterName, String namespaceName,
String instanceAppId, int page, int size){
return instanceAPI.getByNamespace(appId, env, clusterName, namespaceName, instanceAppId, page, size);
}
public int getInstanceCountByNamepsace(String appId, Env env, String clusterName, String namespaceName){
return instanceAPI.getInstanceCountByNamespace(appId, env, clusterName, namespaceName);
}
public List<InstanceDTO> getByReleasesNotIn(Env env, String appId, String clusterName, String namespaceName, Set<Long> releaseIds){
return instanceAPI.getByReleasesNotIn(appId, env, clusterName, namespaceName, releaseIds);
}
}
| /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.portal.service;
import com.ctrip.framework.apollo.common.dto.InstanceDTO;
import com.ctrip.framework.apollo.common.dto.PageDTO;
import com.ctrip.framework.apollo.portal.environment.Env;
import com.ctrip.framework.apollo.portal.api.AdminServiceAPI;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Set;
@Service
public class InstanceService {
private final AdminServiceAPI.InstanceAPI instanceAPI;
public InstanceService(final AdminServiceAPI.InstanceAPI instanceAPI) {
this.instanceAPI = instanceAPI;
}
public PageDTO<InstanceDTO> getByRelease(Env env, long releaseId, int page, int size){
return instanceAPI.getByRelease(env, releaseId, page, size);
}
public PageDTO<InstanceDTO> getByNamespace(Env env, String appId, String clusterName, String namespaceName,
String instanceAppId, int page, int size){
return instanceAPI.getByNamespace(appId, env, clusterName, namespaceName, instanceAppId, page, size);
}
public int getInstanceCountByNamepsace(String appId, Env env, String clusterName, String namespaceName){
return instanceAPI.getInstanceCountByNamespace(appId, env, clusterName, namespaceName);
}
public List<InstanceDTO> getByReleasesNotIn(Env env, String appId, String clusterName, String namespaceName, Set<Long> releaseIds){
return instanceAPI.getByReleasesNotIn(appId, env, clusterName, namespaceName, releaseIds);
}
}
| -1 |
apolloconfig/apollo | 3,864 | Lazy load ConfigUtil | prevent ConfigUtil init when ApolloApplicationContextInitializer initialized,
That is too early.
This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f
## What's the purpose of this PR
XXXXX
## Which issue(s) this PR fixes:
Fixes #
## Brief changelog
XXXXX
Follow this checklist to help us incorporate your contribution quickly and easily:
- [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| lonre | 2021-07-31T12:12:17Z | 2021-08-04T00:43:24Z | 02c43dd547db3d44253d0b08659b8b0e8e3a8374 | bfdfd985fbdd7fd156ddb0be34507224a3db70f5 | Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized,
That is too early.
This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f
## What's the purpose of this PR
XXXXX
## Which issue(s) this PR fixes:
Fixes #
## Brief changelog
XXXXX
Follow this checklist to help us incorporate your contribution quickly and easily:
- [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/ConfigPropertySource.java | /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.spring.config;
import com.ctrip.framework.apollo.ConfigChangeListener;
import java.util.Set;
import org.springframework.core.env.EnumerablePropertySource;
import com.ctrip.framework.apollo.Config;
/**
* Property source wrapper for Config
*
* @author Jason Song(song_s@ctrip.com)
*/
public class ConfigPropertySource extends EnumerablePropertySource<Config> {
private static final String[] EMPTY_ARRAY = new String[0];
ConfigPropertySource(String name, Config source) {
super(name, source);
}
@Override
public boolean containsProperty(String name) {
return this.source.getProperty(name, null) != null;
}
@Override
public String[] getPropertyNames() {
Set<String> propertyNames = this.source.getPropertyNames();
if (propertyNames.isEmpty()) {
return EMPTY_ARRAY;
}
return propertyNames.toArray(new String[propertyNames.size()]);
}
@Override
public Object getProperty(String name) {
return this.source.getProperty(name, null);
}
public void addChangeListener(ConfigChangeListener listener) {
this.source.addChangeListener(listener);
}
}
| /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.spring.config;
import com.ctrip.framework.apollo.ConfigChangeListener;
import java.util.Set;
import org.springframework.core.env.EnumerablePropertySource;
import com.ctrip.framework.apollo.Config;
/**
* Property source wrapper for Config
*
* @author Jason Song(song_s@ctrip.com)
*/
public class ConfigPropertySource extends EnumerablePropertySource<Config> {
private static final String[] EMPTY_ARRAY = new String[0];
ConfigPropertySource(String name, Config source) {
super(name, source);
}
@Override
public boolean containsProperty(String name) {
return this.source.getProperty(name, null) != null;
}
@Override
public String[] getPropertyNames() {
Set<String> propertyNames = this.source.getPropertyNames();
if (propertyNames.isEmpty()) {
return EMPTY_ARRAY;
}
return propertyNames.toArray(new String[propertyNames.size()]);
}
@Override
public Object getProperty(String name) {
return this.source.getProperty(name, null);
}
public void addChangeListener(ConfigChangeListener listener) {
this.source.addChangeListener(listener);
}
}
| -1 |
apolloconfig/apollo | 3,864 | Lazy load ConfigUtil | prevent ConfigUtil init when ApolloApplicationContextInitializer initialized,
That is too early.
This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f
## What's the purpose of this PR
XXXXX
## Which issue(s) this PR fixes:
Fixes #
## Brief changelog
XXXXX
Follow this checklist to help us incorporate your contribution quickly and easily:
- [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| lonre | 2021-07-31T12:12:17Z | 2021-08-04T00:43:24Z | 02c43dd547db3d44253d0b08659b8b0e8e3a8374 | bfdfd985fbdd7fd156ddb0be34507224a3db70f5 | Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized,
That is too early.
This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f
## What's the purpose of this PR
XXXXX
## Which issue(s) this PR fixes:
Fixes #
## Brief changelog
XXXXX
Follow this checklist to help us incorporate your contribution quickly and easily:
- [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/v1/controller/AppController.java | /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.openapi.v1.controller;
import com.ctrip.framework.apollo.common.dto.ClusterDTO;
import com.ctrip.framework.apollo.common.entity.App;
import com.ctrip.framework.apollo.common.utils.BeanUtils;
import com.ctrip.framework.apollo.openapi.entity.ConsumerRole;
import com.ctrip.framework.apollo.openapi.service.ConsumerService;
import com.ctrip.framework.apollo.openapi.util.ConsumerAuthUtil;
import com.ctrip.framework.apollo.portal.environment.Env;
import com.ctrip.framework.apollo.openapi.dto.OpenAppDTO;
import com.ctrip.framework.apollo.openapi.dto.OpenEnvClusterDTO;
import com.ctrip.framework.apollo.openapi.util.OpenApiBeanUtils;
import com.ctrip.framework.apollo.portal.component.PortalSettings;
import com.ctrip.framework.apollo.portal.service.AppService;
import com.ctrip.framework.apollo.portal.service.ClusterService;
import com.google.common.collect.Sets;
import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
@RestController("openapiAppController")
@RequestMapping("/openapi/v1")
public class AppController {
private final PortalSettings portalSettings;
private final ClusterService clusterService;
private final AppService appService;
private final ConsumerAuthUtil consumerAuthUtil;
private final ConsumerService consumerService;
public AppController(final PortalSettings portalSettings,
final ClusterService clusterService,
final AppService appService,
final ConsumerAuthUtil consumerAuthUtil,
final ConsumerService consumerService) {
this.portalSettings = portalSettings;
this.clusterService = clusterService;
this.appService = appService;
this.consumerAuthUtil = consumerAuthUtil;
this.consumerService = consumerService;
}
@GetMapping(value = "/apps/{appId}/envclusters")
public List<OpenEnvClusterDTO> loadEnvClusterInfo(@PathVariable String appId){
List<OpenEnvClusterDTO> envClusters = new LinkedList<>();
List<Env> envs = portalSettings.getActiveEnvs();
for (Env env : envs) {
OpenEnvClusterDTO envCluster = new OpenEnvClusterDTO();
envCluster.setEnv(env.name());
List<ClusterDTO> clusterDTOs = clusterService.findClusters(env, appId);
envCluster.setClusters(BeanUtils.toPropertySet("name", clusterDTOs));
envClusters.add(envCluster);
}
return envClusters;
}
@GetMapping("/apps")
public List<OpenAppDTO> findApps(@RequestParam(value = "appIds", required = false) String appIds) {
final List<App> apps = new ArrayList<>();
if (StringUtils.isEmpty(appIds)) {
apps.addAll(appService.findAll());
} else {
apps.addAll(appService.findByAppIds(Sets.newHashSet(appIds.split(","))));
}
return OpenApiBeanUtils.transformFromApps(apps);
}
/**
* @return which apps can be operated by open api
*/
@GetMapping("/apps/authorized")
public List<OpenAppDTO> findAppsAuthorized(HttpServletRequest request) {
long consumerId = this.consumerAuthUtil.retrieveConsumerId(request);
Set<String> appIds = this.consumerService.findAppIdsAuthorizedByConsumerId(consumerId);
List<App> apps = this.appService.findByAppIds(appIds);
List<OpenAppDTO> openAppDTOS = OpenApiBeanUtils.transformFromApps(apps);
return openAppDTOS;
}
}
| /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.openapi.v1.controller;
import com.ctrip.framework.apollo.common.dto.ClusterDTO;
import com.ctrip.framework.apollo.common.entity.App;
import com.ctrip.framework.apollo.common.utils.BeanUtils;
import com.ctrip.framework.apollo.openapi.entity.ConsumerRole;
import com.ctrip.framework.apollo.openapi.service.ConsumerService;
import com.ctrip.framework.apollo.openapi.util.ConsumerAuthUtil;
import com.ctrip.framework.apollo.portal.environment.Env;
import com.ctrip.framework.apollo.openapi.dto.OpenAppDTO;
import com.ctrip.framework.apollo.openapi.dto.OpenEnvClusterDTO;
import com.ctrip.framework.apollo.openapi.util.OpenApiBeanUtils;
import com.ctrip.framework.apollo.portal.component.PortalSettings;
import com.ctrip.framework.apollo.portal.service.AppService;
import com.ctrip.framework.apollo.portal.service.ClusterService;
import com.google.common.collect.Sets;
import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
@RestController("openapiAppController")
@RequestMapping("/openapi/v1")
public class AppController {
private final PortalSettings portalSettings;
private final ClusterService clusterService;
private final AppService appService;
private final ConsumerAuthUtil consumerAuthUtil;
private final ConsumerService consumerService;
public AppController(final PortalSettings portalSettings,
final ClusterService clusterService,
final AppService appService,
final ConsumerAuthUtil consumerAuthUtil,
final ConsumerService consumerService) {
this.portalSettings = portalSettings;
this.clusterService = clusterService;
this.appService = appService;
this.consumerAuthUtil = consumerAuthUtil;
this.consumerService = consumerService;
}
@GetMapping(value = "/apps/{appId}/envclusters")
public List<OpenEnvClusterDTO> loadEnvClusterInfo(@PathVariable String appId){
List<OpenEnvClusterDTO> envClusters = new LinkedList<>();
List<Env> envs = portalSettings.getActiveEnvs();
for (Env env : envs) {
OpenEnvClusterDTO envCluster = new OpenEnvClusterDTO();
envCluster.setEnv(env.name());
List<ClusterDTO> clusterDTOs = clusterService.findClusters(env, appId);
envCluster.setClusters(BeanUtils.toPropertySet("name", clusterDTOs));
envClusters.add(envCluster);
}
return envClusters;
}
@GetMapping("/apps")
public List<OpenAppDTO> findApps(@RequestParam(value = "appIds", required = false) String appIds) {
final List<App> apps = new ArrayList<>();
if (StringUtils.isEmpty(appIds)) {
apps.addAll(appService.findAll());
} else {
apps.addAll(appService.findByAppIds(Sets.newHashSet(appIds.split(","))));
}
return OpenApiBeanUtils.transformFromApps(apps);
}
/**
* @return which apps can be operated by open api
*/
@GetMapping("/apps/authorized")
public List<OpenAppDTO> findAppsAuthorized(HttpServletRequest request) {
long consumerId = this.consumerAuthUtil.retrieveConsumerId(request);
Set<String> appIds = this.consumerService.findAppIdsAuthorizedByConsumerId(consumerId);
List<App> apps = this.appService.findByAppIds(appIds);
List<OpenAppDTO> openAppDTOS = OpenApiBeanUtils.transformFromApps(apps);
return openAppDTOS;
}
}
| -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./CHANGES.md | Changes by Version
==================
Release Notes.
Apollo 1.9.0
------------------
* [extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.](https://github.com/ctripcorp/apollo/pull/3552)
* [add spring configuration metadata](https://github.com/ctripcorp/apollo/pull/3553)
* [fix #3551 and optimize ldap samples ](https://github.com/ctripcorp/apollo/pull/3561)
* [update wiki url and refine documentation](https://github.com/ctripcorp/apollo/pull/3563)
* [slim docker images](https://github.com/ctripcorp/apollo/pull/3572)
* [add network strategy guideline to docker quick start](https://github.com/ctripcorp/apollo/pull/3574)
* [Added support for consul service discovery](https://github.com/ctripcorp/apollo/pull/3575)
* [disable consul in apollo-assembly by default ](https://github.com/ctripcorp/apollo/pull/3585)
* [ServiceBootstrap unit test fix](https://github.com/ctripcorp/apollo/pull/3593)
* [replace http client implementation with interface ](https://github.com/ctripcorp/apollo/pull/3594)
* [Allow users to inject customized instance via ApolloInjectorCustomizer](https://github.com/ctripcorp/apollo/pull/3602)
* [Fixes #3606](https://github.com/ctripcorp/apollo/pull/3609)
* [Bump xstream from 1.4.15 to 1.4.16](https://github.com/ctripcorp/apollo/pull/3611)
* [docs: user practices. Alibaba Sentinel Dashboard Push Rules to apollo](https://github.com/ctripcorp/apollo/pull/3617)
* [update known users](https://github.com/ctripcorp/apollo/pull/3619)
* [add maven deploy action](https://github.com/ctripcorp/apollo/pull/3620)
* [fix the issue that access key doesn't work if appid passed is in different case](https://github.com/ctripcorp/apollo/pull/3627)
* [fix oidc logout](https://github.com/ctripcorp/apollo/pull/3628)
* [docs: third party sdk nodejs client](https://github.com/ctripcorp/apollo/pull/3632)
* [update known users](https://github.com/ctripcorp/apollo/pull/3633)
* [docs: use docsify pagination plugin](https://github.com/ctripcorp/apollo/pull/3634)
* [apollo client to support jdk16](https://github.com/ctripcorp/apollo/pull/3646)
* [add English version of readme](https://github.com/ctripcorp/apollo/pull/3656)
* [update known users](https://github.com/ctripcorp/apollo/pull/3657)
* [update apolloconfig.com domain](https://github.com/ctripcorp/apollo/pull/3658)
* [localize css to speed up the loading of google fonts](https://github.com/ctripcorp/apollo/pull/3660)
* [test(apollo-client): use assertEquals instead of assertThat](https://github.com/ctripcorp/apollo/pull/3667)
* [test(apollo-client): make timeout more longer when long poll](https://github.com/ctripcorp/apollo/pull/3668)
* [fix unit test](https://github.com/ctripcorp/apollo/pull/3669)
* [解决日志系统未初始化完成时,apollo 的加载日志没法输出问题](https://github.com/ctripcorp/apollo/pull/3677)
* [fix[apollo-configService]: Solve configService startup exception](https://github.com/ctripcorp/apollo/pull/3679)
* [Community Governance Proposal](https://github.com/ctripcorp/apollo/pull/3670)
* [增加阿波罗client的php库](https://github.com/ctripcorp/apollo/pull/3682)
* [Bump xstream from 1.4.16 to 1.4.17](https://github.com/ctripcorp/apollo/pull/3692)
* [Improve the nacos registry configuration document](https://github.com/ctripcorp/apollo/pull/3695)
* [Remove redundant invoke of trySyncFromUpstream](https://github.com/ctripcorp/apollo/pull/3699)
* [add apollo team introduction and community releated contents](https://github.com/ctripcorp/apollo/pull/3713)
* [fix oidc sql](https://github.com/ctripcorp/apollo/pull/3720)
* [feat(apollo-client): add method interestedChangedKeys to ConfigChangeEvent](https://github.com/ctripcorp/apollo/pull/3666)
* [add More... link for known users](https://github.com/ctripcorp/apollo/pull/3757)
* [update OIDC documentation](https://github.com/ctripcorp/apollo/pull/3766)
* [Improve the item-value length limit configuration document](https://github.com/ctripcorp/apollo/pull/3789)
* [Use queue#take instead of poll](https://github.com/ctripcorp/apollo/pull/3765)
* [feature: add Spring Boot 2.4 config data loader support](https://github.com/ctripcorp/apollo/pull/3754)
* [feat(open-api): get authorized apps](https://github.com/ctripcorp/apollo/pull/3647)
* [feature: shared session for multi apollo portal](https://github.com/ctripcorp/apollo/pull/3786)
* [feature: add email for select user on apollo portal](https://github.com/ctripcorp/apollo/pull/3797)
* [feature: modify item comment valid size](https://github.com/ctripcorp/apollo/pull/3803)
* [set default session store-type](https://github.com/ctripcorp/apollo/pull/3812)
* [speed up the stale issue mark and close phase](https://github.com/ctripcorp/apollo/pull/3808)
* [feature: add the delegating password encoder for apollo-portal simple auth](https://github.com/ctripcorp/apollo/pull/3804)
* [support release apollo-client-config-data](https://github.com/ctripcorp/apollo/pull/3822)
* [Fix possiable NPE](https://github.com/ctripcorp/apollo/pull/3832)
* [Reduce bootstrap time in the situation with large properties](https://github.com/ctripcorp/apollo/pull/3816)
* [docs: English catalog in sidebar](https://github.com/ctripcorp/apollo/pull/3831)
* [fix the issue that release messages might be missed in certain scenarios](https://github.com/ctripcorp/apollo/pull/3819)
* [use official docker images for manual kubernetes deployment](https://github.com/ctripcorp/apollo/pull/3840)
* [fix size of create project button](https://github.com/ctripcorp/apollo/pull/3849)
------------------
All issues and pull requests are [here](https://github.com/ctripcorp/apollo/milestone/6?closed=1)
| Changes by Version
==================
Release Notes.
Apollo 1.9.0
------------------
* [extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.](https://github.com/ctripcorp/apollo/pull/3552)
* [add spring configuration metadata](https://github.com/ctripcorp/apollo/pull/3553)
* [fix #3551 and optimize ldap samples ](https://github.com/ctripcorp/apollo/pull/3561)
* [update wiki url and refine documentation](https://github.com/ctripcorp/apollo/pull/3563)
* [slim docker images](https://github.com/ctripcorp/apollo/pull/3572)
* [add network strategy guideline to docker quick start](https://github.com/ctripcorp/apollo/pull/3574)
* [Added support for consul service discovery](https://github.com/ctripcorp/apollo/pull/3575)
* [disable consul in apollo-assembly by default ](https://github.com/ctripcorp/apollo/pull/3585)
* [ServiceBootstrap unit test fix](https://github.com/ctripcorp/apollo/pull/3593)
* [replace http client implementation with interface ](https://github.com/ctripcorp/apollo/pull/3594)
* [Allow users to inject customized instance via ApolloInjectorCustomizer](https://github.com/ctripcorp/apollo/pull/3602)
* [Fixes #3606](https://github.com/ctripcorp/apollo/pull/3609)
* [Bump xstream from 1.4.15 to 1.4.16](https://github.com/ctripcorp/apollo/pull/3611)
* [docs: user practices. Alibaba Sentinel Dashboard Push Rules to apollo](https://github.com/ctripcorp/apollo/pull/3617)
* [update known users](https://github.com/ctripcorp/apollo/pull/3619)
* [add maven deploy action](https://github.com/ctripcorp/apollo/pull/3620)
* [fix the issue that access key doesn't work if appid passed is in different case](https://github.com/ctripcorp/apollo/pull/3627)
* [fix oidc logout](https://github.com/ctripcorp/apollo/pull/3628)
* [docs: third party sdk nodejs client](https://github.com/ctripcorp/apollo/pull/3632)
* [update known users](https://github.com/ctripcorp/apollo/pull/3633)
* [docs: use docsify pagination plugin](https://github.com/ctripcorp/apollo/pull/3634)
* [apollo client to support jdk16](https://github.com/ctripcorp/apollo/pull/3646)
* [add English version of readme](https://github.com/ctripcorp/apollo/pull/3656)
* [update known users](https://github.com/ctripcorp/apollo/pull/3657)
* [update apolloconfig.com domain](https://github.com/ctripcorp/apollo/pull/3658)
* [localize css to speed up the loading of google fonts](https://github.com/ctripcorp/apollo/pull/3660)
* [test(apollo-client): use assertEquals instead of assertThat](https://github.com/ctripcorp/apollo/pull/3667)
* [test(apollo-client): make timeout more longer when long poll](https://github.com/ctripcorp/apollo/pull/3668)
* [fix unit test](https://github.com/ctripcorp/apollo/pull/3669)
* [解决日志系统未初始化完成时,apollo 的加载日志没法输出问题](https://github.com/ctripcorp/apollo/pull/3677)
* [fix[apollo-configService]: Solve configService startup exception](https://github.com/ctripcorp/apollo/pull/3679)
* [Community Governance Proposal](https://github.com/ctripcorp/apollo/pull/3670)
* [增加阿波罗client的php库](https://github.com/ctripcorp/apollo/pull/3682)
* [Bump xstream from 1.4.16 to 1.4.17](https://github.com/ctripcorp/apollo/pull/3692)
* [Improve the nacos registry configuration document](https://github.com/ctripcorp/apollo/pull/3695)
* [Remove redundant invoke of trySyncFromUpstream](https://github.com/ctripcorp/apollo/pull/3699)
* [add apollo team introduction and community releated contents](https://github.com/ctripcorp/apollo/pull/3713)
* [fix oidc sql](https://github.com/ctripcorp/apollo/pull/3720)
* [feat(apollo-client): add method interestedChangedKeys to ConfigChangeEvent](https://github.com/ctripcorp/apollo/pull/3666)
* [add More... link for known users](https://github.com/ctripcorp/apollo/pull/3757)
* [update OIDC documentation](https://github.com/ctripcorp/apollo/pull/3766)
* [Improve the item-value length limit configuration document](https://github.com/ctripcorp/apollo/pull/3789)
* [Use queue#take instead of poll](https://github.com/ctripcorp/apollo/pull/3765)
* [feature: add Spring Boot 2.4 config data loader support](https://github.com/ctripcorp/apollo/pull/3754)
* [feat(open-api): get authorized apps](https://github.com/ctripcorp/apollo/pull/3647)
* [feature: shared session for multi apollo portal](https://github.com/ctripcorp/apollo/pull/3786)
* [feature: add email for select user on apollo portal](https://github.com/ctripcorp/apollo/pull/3797)
* [feature: modify item comment valid size](https://github.com/ctripcorp/apollo/pull/3803)
* [set default session store-type](https://github.com/ctripcorp/apollo/pull/3812)
* [speed up the stale issue mark and close phase](https://github.com/ctripcorp/apollo/pull/3808)
* [feature: add the delegating password encoder for apollo-portal simple auth](https://github.com/ctripcorp/apollo/pull/3804)
* [support release apollo-client-config-data](https://github.com/ctripcorp/apollo/pull/3822)
* [Fix possiable NPE](https://github.com/ctripcorp/apollo/pull/3832)
* [Reduce bootstrap time in the situation with large properties](https://github.com/ctripcorp/apollo/pull/3816)
* [docs: English catalog in sidebar](https://github.com/ctripcorp/apollo/pull/3831)
* [fix the issue that release messages might be missed in certain scenarios](https://github.com/ctripcorp/apollo/pull/3819)
* [use official docker images for manual kubernetes deployment](https://github.com/ctripcorp/apollo/pull/3840)
* [fix size of create project button](https://github.com/ctripcorp/apollo/pull/3849)
* [feature: add history detail for not key-value type of namespace](https://github.com/ctripcorp/apollo/pull/3856)
------------------
All issues and pull requests are [here](https://github.com/ctripcorp/apollo/milestone/6?closed=1)
| 1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-portal/src/main/resources/static/views/component/namespace-panel-branch-tab.html | <!--
~ Copyright 2021 Apollo Authors
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<section class="branch-panel-body" ng-if="namespace.initialized &&
(namespace.hasBranch && namespace.displayControl.currentOperateBranch != 'master')">
<!--main header-->
<header class="panel-heading">
<div class="row">
<div class="col-md-6 col-sm-6 header-namespace">
<b class="namespace-name" ng-bind="namespace.viewName"
data-tooltip="tooltip" data-placement="bottom" title="{{namespace.comment}}"></b>
<span class="label label-warning no-radius namespace-label"
ng-show="namespace.branch.itemModifiedCnt > 0">{{'Component.Namespace.Branch.IsChanged' | translate }}
<span class="badge label badge-white namespace-label"
ng-bind="namespace.branch.itemModifiedCnt"></span>
</span>
<span class="label label-primary no-radius namespace-label"
ng-show="namespace.branch.lockOwner">{{'Component.Namespace.Branch.ChangeUser' | translate }}:
<span ng-bind="namespace.branch.lockOwner"></span>
</span>
</div>
<div class="col-md-6 col-sm-6 text-right header-buttons">
<a type="button" class="btn btn-success btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Branch.ContinueGrayscalePublish' | translate }}"
ng-show="(namespace.hasReleasePermission || namespace.hasModifyPermission)"
ng-click="publish(namespace.branch)">
{{'Component.Namespace.Branch.GrayscalePublish' | translate }}
</a>
<a type="button" class="btn btn-primary btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Branch.MergeToMasterAndPublish' | translate }}"
ng-show="(namespace.hasReleasePermission || namespace.hasModifyPermission)"
ng-click="mergeAndPublish(namespace.branch)">
{{'Component.Namespace.Branch.AllPublish' | translate }}
</a>
<a type="button" class="btn btn-warning btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Branch.DiscardGrayscaleVersion' | translate }}" ng-show="(namespace.hasReleasePermission
|| (!namespace.branch.latestRelease && namespace.hasModifyPermission))"
ng-click="preDeleteBranch(namespace.branch)">
{{'Component.Namespace.Branch.DiscardGrayscale' | translate }}
</a>
</div>
</div>
</header>
<div id="BODY{{namespace.branch.id}}"
ng-class="{'collapse in': showNamespaceBody, 'collapse' : !showNamespaceBody}">
<div class="J_namespace-release-tip well well-sm no-radius text-center" ng-show="namespace.isConfigHidden">
<span style="color: red">{{'Component.Namespace.Branch.NoPermissionTips' | translate }}</span>
</div>
<!--second header-->
<header class="panel-heading second-panel-heading" ng-show="!namespace.isConfigHidden">
<div class="row">
<div class="col-md-12 pull-left">
<ul class="nav nav-tabs">
<li role="presentation" ng-click="switchView(namespace.branch, 'table')"
ng-show="namespace.isPropertiesFormat">
<a ng-class="{node_active:namespace.branch.viewType == 'table'}">
<img src="img/table.png">
{{'Component.Namespace.Branch.Tab.Configuration' | translate }}
</a>
</li>
<li role="presentation" ng-click="switchView(namespace.branch, 'rule')">
<a ng-class="{node_active:namespace.branch.viewType == 'rule'}">
<img src="img/rule.png">
{{'Component.Namespace.Branch.Tab.GrayscaleRule' | translate }}
<span class="badge badge-grey"
ng-bind="namespace.branch.grayIps.length + namespace.branch.grayApps.length"></span>
</a>
</li>
<li role="presentation" ng-click="switchView(namespace.branch, 'instance')">
<a ng-class="{node_active:namespace.branch.viewType == 'instance'}">
<img src="img/machine.png">
{{'Component.Namespace.Branch.Tab.GrayscaleInstance' | translate }}
<span class="badge badge-grey"
ng-bind="namespace.branch.latestReleaseInstances.total"></span>
</a>
</li>
<li role="presentation" ng-click="switchView(namespace.branch, 'history')">
<a ng-class="{node_active:namespace.branch.viewType == 'history'}">
<img src="img/change.png">
{{'Component.Namespace.Branch.Tab.ChangeHistory' | translate }}
</a>
</li>
</ul>
</div>
</div>
</header>
<!--namespace body-->
<section ng-show="!namespace.isConfigHidden">
<!--items-->
<div class="namespace-view-table" ng-show="namespace.branch.viewType == 'table'">
<div class="panel panel-default" ng-if="namespace.hasBranch">
<div class="panel-heading">
{{'Component.Namespace.Branch.Body.Item' | translate }}
<button type="button" class="btn btn-primary btn-sm pull-right" style="margin-top: -4px;"
ng-show="namespace.hasModifyPermission" ng-click="createItem(namespace.branch)">
<img src="img/plus.png">
{{'Component.Namespace.Branch.Body.AddedItem' | translate }}
</button>
</div>
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}"
ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
{{'Component.Namespace.Branch.Body.PublishState' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}"
ng-click="col='item.key';desc=!desc;">
{{'Component.Namespace.Branch.Body.ItemKey' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
{{'Component.Namespace.Branch.Body.ItemMasterValue' | translate }}
</th>
<th>
{{'Component.Namespace.Branch.Body.ItemGrayscaleValue' | translate }}
</th>
<th>
{{'Component.Namespace.Branch.Body.ItemComment' | translate }}
</th>
<th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}"
ng-click="col='item.dataChangeLastModifiedBy';desc=!desc;">
{{'Component.Namespace.Branch.Body.ItemLastModify' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}"
ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
{{'Component.Namespace.Branch.Body.ItemLastModifyTime' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
{{'Component.Namespace.Branch.Body.ItemOperator' | translate }}
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="config in namespace.branch.branchItems |orderBy:col:desc"
ng-if="config.item.key">
<td width="7%" class="text-center">
<span class="label label-warning no-radius cursor-pointer" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Branch.Body.ClickToSeeItemValue' | translate }}"
ng-if="config.isModified || config.isDeleted"
ng-click="showText(config.oldValue)">{{'Component.Namespace.Branch.Body.ItemNoPublish' | translate }}</span>
<span class="label label-default-light no-radius" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Branch.Body.ItemEffective' | translate }}"
ng-if="!config.isModified">{{'Component.Namespace.Branch.Body.ItemPublished' | translate }}</span>
</td>
<td width="15%" class="cursor-pointer"
title="{{'Component.Namespace.Branch.Body.ClickToSee' | translate }}"
ng-click="showText(config.item.key)">
<span ng-bind="config.item.key | limitTo: 250"></span>
<span ng-bind="config.item.key.length > 250 ? '...' :''"></span>
<span class="label label-danger" ng-if="config.isDeleted" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Branch.Body.DeletedItem' | translate }}">{{'Component.Namespace.Branch.Body.Delete' | translate }}</span>
<span class="label label-info" ng-if="!config.isDeleted && config.masterItemExists"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Branch.Body.ChangedFromMaster' | translate }}">{{'Component.Namespace.Branch.Body.Modify' | translate }}</span>
<span class="label label-success"
ng-if="!config.isDeleted && !config.masterItemExists" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Branch.Body.AddedByGrayscale' | translate }}">{{'Component.Namespace.Branch.Body.Added' | translate }}</span>
</td>
<td width="20%" class="cursor-pointer"
title="{{'Component.Namespace.Branch.Body.ClickToSee' | translate }}"
ng-click="showText(config.masterReleaseValue)">
<span ng-bind="config.masterReleaseValue | limitTo: 250"></span>
<span ng-bind="config.item.value.length > 250 ? '...': ''"></span>
</td>
<td width="20%" class="cursor-pointer"
title="{{'Component.Namespace.Branch.Body.ClickToSee' | translate }}"
ng-click="showText(config.item.value)">
<span ng-bind="config.item.value | limitTo: 250"></span>
<span ng-bind="config.item.value.length > 250 ? '...': ''"></span>
</td>
<td width="10%" title="{{config.item.comment}}">
<span ng-bind="config.item.comment | limitTo: 250"></span>
<span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span>
</td>
<td width="10%" ng-bind="config.item.dataChangeLastModifiedByDisplayName + '(' + config.item.dataChangeLastModifiedBy + ')'">
</td>
<td width="10%"
ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'">
</td>
<td width="9%" class="text-center">
<img src="img/edit.png" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Branch.Body.Op.Modify' | translate }}"
ng-if="!config.isDeleted" ng-click="editItem(namespace.branch, config.item)"
ng-show="namespace.hasModifyPermission">
<img style="margin-left: 5px;" src="img/cancel.png" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Branch.Body.Op.Delete' | translate }}"
ng-if="!config.isDeleted"
ng-click="preDeleteItem(namespace.branch, config.item)"
ng-show="namespace.hasModifyPermission">
</td>
</tr>
</tbody>
</table>
</div>
<div class="panel panel-default"
ng-if="namespace.branch.masterItems && namespace.branch.masterItems.length > 0">
<div class="panel-heading">
{{'Component.Namespace.MasterBranch.Body.Title' | translate }}
</div>
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>{{'Component.Namespace.MasterBranch.Body.PublishState' | translate }}</th>
<th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}"
ng-click="col='item.key';desc=!desc;">
{{'Component.Namespace.MasterBranch.Body.ItemKey' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
{{'Component.Namespace.MasterBranch.Body.ItemValue' | translate }}
</th>
<th>
{{'Component.Namespace.MasterBranch.Body.ItemComment' | translate }}
</th>
<th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}"
ng-click="col='item.dataChangeLastModifiedBy';desc=!desc;">
{{'Component.Namespace.MasterBranch.Body.ItemLastModify' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}"
ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
{{'Component.Namespace.MasterBranch.Body.ItemLastModifyTime' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
{{'Component.Namespace.MasterBranch.Body.ItemOperator' | translate }}
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="config in namespace.branch.masterItems |orderBy:col:desc"
ng-if="config.item.key">
<td width="8%" class="text-center">
<span class="label label-warning no-radius cursor-pointer" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.MasterBranch.Body.ClickToSeeItemValue' | translate }}"
ng-if="config.isModified || config.isDeleted"
ng-click="showText(config.oldValue)">{{'Component.Namespace.MasterBranch.Body.ItemNoPublish' | translate }}</span>
<span class="label label-default-light no-radius" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.MasterBranch.Body.ItemEffective' | translate }}"
ng-if="!config.isModified">{{'Component.Namespace.MasterBranch.Body.ItemPublished' | translate }}</span>
</td>
<td width="15%" class="cursor-pointer"
title="{{'Component.Namespace.Branch.Body.ClickToSee' | translate }}"
ng-click="showText(config.item.key)">
<span ng-bind="config.item.key | limitTo: 250"></span>
<span ng-bind="config.item.key.length > 250 ? '...' :''"></span>
<span class="label label-success" ng-if="config.isModified && !config.oldValue"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.MasterBranch.Body.AddedItem' | translate }}">{{'Component.Namespace.Branch.Body.Added' | translate }}</span>
<span class="label label-info"
ng-if="config.isModified && config.oldValue && !config.isDeleted"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Branch.Body.ModifiedItem' | translate }}">{{'Component.Namespace.Branch.Body.Modify' | translate }}</span>
<span class="label label-danger" ng-if="config.isDeleted" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Branch.Body.DeletedItem' | translate }}">{{'Component.Namespace.Branch.Body.Delete' | translate }}</span>
</td>
<td width="35%" class="cursor-pointer"
title="{{'Component.Namespace.Branch.Body.ClickToSee' | translate }}"
ng-click="showText(config.item.value)">
<span ng-bind="config.item.value | limitTo: 250"></span>
<span ng-bind="config.item.value.length > 250 ? '...': ''"></span>
</td>
<td width="12%" title="{{config.item.comment}}">
<span ng-bind="config.item.comment | limitTo: 250"></span>
<span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span>
</td>
<td width="10%" ng-bind="config.item.dataChangeLastModifiedByDisplayName + '(' + config.item.dataChangeLastModifiedBy + ')'">
</td>
<td width="15%"
ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'">
</td>
<td width="5%" class="text-center">
<img src="img/gray.png" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.MasterBranch.Body.ModifyItem' | translate }}"
ng-if="!config.isDeleted" ng-click="editItem(namespace.branch, config.item)"
ng-show="namespace.hasModifyPermission">
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!--gray rules-->
<div class="rules-manage-view row" ng-show="namespace.branch.viewType == 'rule'">
<div class="alert alert-warning no-radius"
ng-show="!namespace.hasModifyPermission && !namespace.hasReleasePermission">
<strong>Tips:</strong>
{{'Component.Namespace.Branch.GrayScaleRule.NoPermissionTips' | translate }}
</div>
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>{{'Component.Namespace.Branch.GrayScaleRule.AppId' | translate }}</th>
<th>{{'Component.Namespace.Branch.GrayScaleRule.IpList' | translate }}</th>
<th>{{'Component.Namespace.Branch.GrayScaleRule.Operator' | translate }}</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="ruleItem in namespace.branch.rules.ruleItems">
<td width="20%" ng-bind="ruleItem.clientAppId"></td>
<td width="70%" ng-show="!ruleItem.ApplyToAllInstances"
ng-bind="ruleItem.clientIpList.join(', ')"></td>
<td width="70%" ng-show="ruleItem.ApplyToAllInstances">
{{'Component.Namespace.Branch.GrayScaleRule.ApplyToAllInstances' | translate }}</td>
<td class="text-center" width="10%">
<img src="img/edit.png" class="i-20 hover" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Branch.GrayScaleRule.Modify' | translate }}"
ng-show="namespace.hasModifyPermission || namespace.hasReleasePermission"
ng-click="editRuleItem(namespace.branch, ruleItem)">
<img src="img/cancel.png" class="i-20 hover" style="margin-left: 5px;"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Branch.GrayScaleRule.Delete' | translate }}"
ng-show="namespace.hasModifyPermission || namespace.hasReleasePermission"
ng-click="deleteRuleItem(namespace.branch, ruleItem)">
</td>
</tr>
</tbody>
</table>
<button class="btn btn-primary" ng-if="namespace.hasModifyPermission || namespace.hasReleasePermission"
ng-show="(namespace.isPublic && !namespace.isLinkedNamespace) ||
((!namespace.isPublic || namespace.isLinkedNamespace)
&& (!namespace.branch.rules
|| !namespace.branch.rules.ruleItems
|| !namespace.branch.rules.ruleItems.length))"
ng-click="addRuleItem(namespace.branch)">{{'Component.Namespace.Branch.GrayScaleRule.AddNewRule' | translate }}
</button>
</div>
<!--instances -->
<div class="panel panel-default" ng-show="namespace.branch.viewType == 'instance'">
<div class="panel-heading text-right">
<button class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Branch.Instance.RefreshList' | translate }}"
ng-click="refreshInstancesInfo(namespace.branch)">
<img ng-src="{{ '/img/refresh.png' | prefixPath }}" />
</button>
</div>
<div class="panel-body">
<div class="panel-default" ng-if="namespace.branch.latestReleaseInstances.total > 0">
<div class="panel-heading">
<a target="_blank" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Branch.Instance.ItemToSee' | translate }}"
ng-href="{{ '/config/history.html' | prefixPath }}?#/appid={{appId}}&env={{env}}&clusterName={{namespace.baseInfo.clusterName}}&namespaceName={{namespace.baseInfo.namespaceName}}&releaseId={{namespace.branch.latestRelease.id}}">
{{namespace.branch.latestRelease.name}}
</a>
</div>
<table class="table table-bordered table-striped">
<thead>
<tr>
<td>{{'Component.Namespace.Branch.Instance.InstanceAppId' | translate }}</td>
<td>{{'Component.Namespace.Branch.Instance.InstanceClusterName' | translate }}</td>
<td>{{'Component.Namespace.Branch.Instance.InstanceDataCenter' | translate }}</td>
<td>{{'Component.Namespace.Branch.Instance.InstanceIp' | translate }}</td>
<td>{{'Component.Namespace.Branch.Instance.InstanceGetItemTime' | translate }}</td>
</tr>
</thead>
<tbody>
<tr ng-repeat="instance in namespace.branch.latestReleaseInstances.content">
<td width="20%" ng-bind="instance.appId"></td>
<td width="20%" ng-bind="instance.clusterName"></td>
<td width="20%" ng-bind="instance.dataCenter"></td>
<td width="20%" ng-bind="instance.ip"></td>
<td width="20%">{{instance.configs && instance.configs.length ?
(instance.configs[0].releaseDeliveryTime | date: 'yyyy-MM-dd HH:mm:ss') : ''}}
</td>
</tr>
</tbody>
</table>
<div class="row text-center"
ng-show="namespace.branch.latestReleaseInstances.content.length < namespace.branch.latestReleaseInstances.total">
<button class="btn btn-default"
ng-click="loadInstanceInfo(namespace.branch)">{{'Component.Namespace.Branch.Instance.LoadMore' | translate }}</button>
</div>
</div>
<div class="text-center" ng-if="namespace.branch.latestReleaseInstances.total == 0">
{{'Component.Namespace.Branch.Instance.NoInstance' | translate }}
</div>
</div>
</div>
<!--history view-->
<div class="J_historyview history-view" ng-show="namespace.branch.viewType == 'history'">
<div class="media" ng-show="namespace.branch.commits && namespace.branch.commits.length"
ng-repeat="commits in namespace.branch.commits">
<div class="media-body">
<div class="row">
<div class="col-md-6 col-sm-6 ">
<h3 class="media-heading" ng-bind="commits.dataChangeCreatedByDisplayName + '(' + commits.dataChangeCreatedBy + ')'"></h3>
</div>
<div class="col-md-6 col-sm-6 text-right">
<h5 class="media-heading"
ng-bind="commits.dataChangeCreatedTime | date: 'yyyy-MM-dd HH:mm:ss'"></h5>
</div>
</div>
<!--properties format-->
<table class="table table-bordered table-striped text-center table-hover"
style="margin-top: 5px;" ng-if="namespace.isPropertiesFormat">
<thead>
<tr>
<th>
{{'Component.Namespace.Branch.History.ItemType' | translate }}
</th>
<th>
{{'Component.Namespace.Branch.History.ItemKey' | translate }}
</th>
<th>
{{'Component.Namespace.Branch.History.ItemOldValue' | translate }}
</th>
<th>
{{'Component.Namespace.Branch.History.ItemNewValue' | translate }}
</th>
<th>
{{'Component.Namespace.Branch.History.ItemComment' | translate }}
</th>
</tr>
</thead>
<tbody>
<!--兼容老数据,不显示item类型为空行和注释的item-->
<tr ng-repeat="item in commits.changeSets.createItems" ng-show="item.key">
<td width="6%">
{{'Component.Namespace.Branch.History.NewAdded' | translate }}
</td>
<td width="20%" title="{{item.key}}">
<span ng-bind="item.key | limitTo: 250"></span>
<span ng-bind="item.key.length > 250 ? '...' :''"></span>
</td>
<td width="28%">
</td>
<td width="28%" class="cursor-pointer" title="{{item.value}}"
ng-click="showText(item.value)">
<span ng-bind="item.value | limitTo: 250"></span>
<span ng-bind="item.value.length > 250 ? '...': ''"></span>
</td>
<td width="18%" title="{{item.comment}}">
<span ng-bind="item.comment | limitTo: 250"></span>
<span ng-bind="item.comment.length > 250 ?'...' : ''"></span>
</td>
</tr>
<tr ng-repeat="item in commits.changeSets.updateItems">
<td width="6%">
{{'Component.Namespace.Branch.History.Modified' | translate }}
</td>
<td width="20%" title="{{item.newItem.key}}">
<span ng-bind="item.newItem.key | limitTo: 250"></span>
<span ng-bind="item.newItem.key.length > 250 ? '...' :''"></span>
</td>
<td width="28%" class="cursor-pointer" title="{{item.oldItem.value}}"
ng-click="showText(item.oldItem.value)">
<span ng-bind="item.oldItem.value | limitTo: 250"></span>
<span ng-bind="item.oldItem.value.length > 250 ? '...': ''"></span>
</td>
<td width="28%" class="cursor-pointer" title="{{item.newItem.value}}"
ng-click="showText(item.newItem.value)">
<span ng-bind="item.newItem.value | limitTo: 250"></span>
<span ng-bind="item.newItem.value.length > 250 ? '...': ''"></span>
</td>
<td width="18%" title="{{item.newItem.comment}}">
<span ng-bind="item.newItem.comment | limitTo: 250"></span>
<span ng-bind="item.newItem.comment.length > 250 ?'...' : ''"></span>
</td>
</tr>
<tr ng-repeat="item in commits.changeSets.deleteItems"
ng-show="item.key || item.comment">
<td width="6%">
{{'Component.Namespace.Branch.History.Deleted' | translate }}
</td>
<td width="20%" title="{{item.key}}">
<span ng-bind="item.key | limitTo: 250"></span>
<span ng-bind="item.key.length > 250 ? '...' :''"></span>
</td>
<td width="28%" title="{{item.value}}">
<span ng-bind="item.value | limitTo: 250"></span>
<span ng-bind="item.value.length > 250 ? '...': ''"></span>
</td>
<td width="28%">
</td>
<td width="18%" title="{{item.comment}}">
<span ng-bind="item.comment | limitTo: 250"></span>
<span ng-bind="item.comment.length > 250 ?'...' : ''"></span>
</td>
</tr>
</tbody>
</table>
<!--not properties format-->
<div ng-if="!namespace.isPropertiesFormat">
<div ng-repeat="item in commits.changeSets.createItems">
<textarea class="form-control no-radius" rows="20" ng-disabled="true"
ng-bind="item.value">
</textarea>
</div>
<div ng-repeat="item in commits.changeSets.updateItems">
<textarea class="form-control no-radius" rows="20" ng-disabled="true"
ng-bind="item.newItem.value">
</textarea>
</div>
</div>
</div>
<hr>
</div>
<div class="text-center">
<button type="button" class="btn btn-default" ng-show="!namespace.branch.hasLoadAllCommit"
ng-click="loadCommitHistory(namespace.branch)">{{'Component.Namespace.Branch.History.LoadMore' | translate }}
<span class="glyphicon glyphicon-menu-down"></span></button>
</div>
<div class="empty-container text-center"
ng-show="!namespace.branch.commits || !namespace.branch.commits.length">
{{'Component.Namespace.Branch.History.NoHistory' | translate }}
</div>
</div>
</section>
</div>
</section> | <!--
~ Copyright 2021 Apollo Authors
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<section class="branch-panel-body" ng-if="namespace.initialized &&
(namespace.hasBranch && namespace.displayControl.currentOperateBranch != 'master')">
<!--main header-->
<header class="panel-heading">
<div class="row">
<div class="col-md-6 col-sm-6 header-namespace">
<b class="namespace-name" ng-bind="namespace.viewName"
data-tooltip="tooltip" data-placement="bottom" title="{{namespace.comment}}"></b>
<span class="label label-warning no-radius namespace-label"
ng-show="namespace.branch.itemModifiedCnt > 0">{{'Component.Namespace.Branch.IsChanged' | translate }}
<span class="badge label badge-white namespace-label"
ng-bind="namespace.branch.itemModifiedCnt"></span>
</span>
<span class="label label-primary no-radius namespace-label"
ng-show="namespace.branch.lockOwner">{{'Component.Namespace.Branch.ChangeUser' | translate }}:
<span ng-bind="namespace.branch.lockOwner"></span>
</span>
</div>
<div class="col-md-6 col-sm-6 text-right header-buttons">
<a type="button" class="btn btn-success btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Branch.ContinueGrayscalePublish' | translate }}"
ng-show="(namespace.hasReleasePermission || namespace.hasModifyPermission)"
ng-click="publish(namespace.branch)">
{{'Component.Namespace.Branch.GrayscalePublish' | translate }}
</a>
<a type="button" class="btn btn-primary btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Branch.MergeToMasterAndPublish' | translate }}"
ng-show="(namespace.hasReleasePermission || namespace.hasModifyPermission)"
ng-click="mergeAndPublish(namespace.branch)">
{{'Component.Namespace.Branch.AllPublish' | translate }}
</a>
<a type="button" class="btn btn-warning btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Branch.DiscardGrayscaleVersion' | translate }}" ng-show="(namespace.hasReleasePermission
|| (!namespace.branch.latestRelease && namespace.hasModifyPermission))"
ng-click="preDeleteBranch(namespace.branch)">
{{'Component.Namespace.Branch.DiscardGrayscale' | translate }}
</a>
</div>
</div>
</header>
<div id="BODY{{namespace.branch.id}}"
ng-class="{'collapse in': showNamespaceBody, 'collapse' : !showNamespaceBody}">
<div class="J_namespace-release-tip well well-sm no-radius text-center" ng-show="namespace.isConfigHidden">
<span style="color: red">{{'Component.Namespace.Branch.NoPermissionTips' | translate }}</span>
</div>
<!--second header-->
<header class="panel-heading second-panel-heading" ng-show="!namespace.isConfigHidden">
<div class="row">
<div class="col-md-12 pull-left">
<ul class="nav nav-tabs">
<li role="presentation" ng-click="switchView(namespace.branch, 'table')"
ng-show="namespace.isPropertiesFormat">
<a ng-class="{node_active:namespace.branch.viewType == 'table'}">
<img src="img/table.png">
{{'Component.Namespace.Branch.Tab.Configuration' | translate }}
</a>
</li>
<li role="presentation" ng-click="switchView(namespace.branch, 'rule')">
<a ng-class="{node_active:namespace.branch.viewType == 'rule'}">
<img src="img/rule.png">
{{'Component.Namespace.Branch.Tab.GrayscaleRule' | translate }}
<span class="badge badge-grey"
ng-bind="namespace.branch.grayIps.length + namespace.branch.grayApps.length"></span>
</a>
</li>
<li role="presentation" ng-click="switchView(namespace.branch, 'instance')">
<a ng-class="{node_active:namespace.branch.viewType == 'instance'}">
<img src="img/machine.png">
{{'Component.Namespace.Branch.Tab.GrayscaleInstance' | translate }}
<span class="badge badge-grey"
ng-bind="namespace.branch.latestReleaseInstances.total"></span>
</a>
</li>
<li role="presentation" ng-click="switchView(namespace.branch, 'history')">
<a ng-class="{node_active:namespace.branch.viewType == 'history'}">
<img src="img/change.png">
{{'Component.Namespace.Branch.Tab.ChangeHistory' | translate }}
</a>
</li>
</ul>
</div>
</div>
</header>
<!--namespace body-->
<section ng-show="!namespace.isConfigHidden">
<!--items-->
<div class="namespace-view-table" ng-show="namespace.branch.viewType == 'table'">
<div class="panel panel-default" ng-if="namespace.hasBranch">
<div class="panel-heading">
{{'Component.Namespace.Branch.Body.Item' | translate }}
<button type="button" class="btn btn-primary btn-sm pull-right" style="margin-top: -4px;"
ng-show="namespace.hasModifyPermission" ng-click="createItem(namespace.branch)">
<img src="img/plus.png">
{{'Component.Namespace.Branch.Body.AddedItem' | translate }}
</button>
</div>
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}"
ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
{{'Component.Namespace.Branch.Body.PublishState' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}"
ng-click="col='item.key';desc=!desc;">
{{'Component.Namespace.Branch.Body.ItemKey' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
{{'Component.Namespace.Branch.Body.ItemMasterValue' | translate }}
</th>
<th>
{{'Component.Namespace.Branch.Body.ItemGrayscaleValue' | translate }}
</th>
<th>
{{'Component.Namespace.Branch.Body.ItemComment' | translate }}
</th>
<th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}"
ng-click="col='item.dataChangeLastModifiedBy';desc=!desc;">
{{'Component.Namespace.Branch.Body.ItemLastModify' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}"
ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
{{'Component.Namespace.Branch.Body.ItemLastModifyTime' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
{{'Component.Namespace.Branch.Body.ItemOperator' | translate }}
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="config in namespace.branch.branchItems |orderBy:col:desc"
ng-if="config.item.key">
<td width="7%" class="text-center">
<span class="label label-warning no-radius cursor-pointer" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Branch.Body.ClickToSeeItemValue' | translate }}"
ng-if="config.isModified || config.isDeleted"
ng-click="showText(config.oldValue)">{{'Component.Namespace.Branch.Body.ItemNoPublish' | translate }}</span>
<span class="label label-default-light no-radius" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Branch.Body.ItemEffective' | translate }}"
ng-if="!config.isModified">{{'Component.Namespace.Branch.Body.ItemPublished' | translate }}</span>
</td>
<td width="15%" class="cursor-pointer"
title="{{'Component.Namespace.Branch.Body.ClickToSee' | translate }}"
ng-click="showText(config.item.key)">
<span ng-bind="config.item.key | limitTo: 250"></span>
<span ng-bind="config.item.key.length > 250 ? '...' :''"></span>
<span class="label label-danger" ng-if="config.isDeleted" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Branch.Body.DeletedItem' | translate }}">{{'Component.Namespace.Branch.Body.Delete' | translate }}</span>
<span class="label label-info" ng-if="!config.isDeleted && config.masterItemExists"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Branch.Body.ChangedFromMaster' | translate }}">{{'Component.Namespace.Branch.Body.Modify' | translate }}</span>
<span class="label label-success"
ng-if="!config.isDeleted && !config.masterItemExists" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Branch.Body.AddedByGrayscale' | translate }}">{{'Component.Namespace.Branch.Body.Added' | translate }}</span>
</td>
<td width="20%" class="cursor-pointer"
title="{{'Component.Namespace.Branch.Body.ClickToSee' | translate }}"
ng-click="showText(config.masterReleaseValue)">
<span ng-bind="config.masterReleaseValue | limitTo: 250"></span>
<span ng-bind="config.item.value.length > 250 ? '...': ''"></span>
</td>
<td width="20%" class="cursor-pointer"
title="{{'Component.Namespace.Branch.Body.ClickToSee' | translate }}"
ng-click="showText(config.item.value)">
<span ng-bind="config.item.value | limitTo: 250"></span>
<span ng-bind="config.item.value.length > 250 ? '...': ''"></span>
</td>
<td width="10%" title="{{config.item.comment}}">
<span ng-bind="config.item.comment | limitTo: 250"></span>
<span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span>
</td>
<td width="10%" ng-bind="config.item.dataChangeLastModifiedByDisplayName + '(' + config.item.dataChangeLastModifiedBy + ')'">
</td>
<td width="10%"
ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'">
</td>
<td width="9%" class="text-center">
<img src="img/edit.png" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Branch.Body.Op.Modify' | translate }}"
ng-if="!config.isDeleted" ng-click="editItem(namespace.branch, config.item)"
ng-show="namespace.hasModifyPermission">
<img style="margin-left: 5px;" src="img/cancel.png" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Branch.Body.Op.Delete' | translate }}"
ng-if="!config.isDeleted"
ng-click="preDeleteItem(namespace.branch, config.item)"
ng-show="namespace.hasModifyPermission">
</td>
</tr>
</tbody>
</table>
</div>
<div class="panel panel-default"
ng-if="namespace.branch.masterItems && namespace.branch.masterItems.length > 0">
<div class="panel-heading">
{{'Component.Namespace.MasterBranch.Body.Title' | translate }}
</div>
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>{{'Component.Namespace.MasterBranch.Body.PublishState' | translate }}</th>
<th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}"
ng-click="col='item.key';desc=!desc;">
{{'Component.Namespace.MasterBranch.Body.ItemKey' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
{{'Component.Namespace.MasterBranch.Body.ItemValue' | translate }}
</th>
<th>
{{'Component.Namespace.MasterBranch.Body.ItemComment' | translate }}
</th>
<th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}"
ng-click="col='item.dataChangeLastModifiedBy';desc=!desc;">
{{'Component.Namespace.MasterBranch.Body.ItemLastModify' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}"
ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
{{'Component.Namespace.MasterBranch.Body.ItemLastModifyTime' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
{{'Component.Namespace.MasterBranch.Body.ItemOperator' | translate }}
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="config in namespace.branch.masterItems |orderBy:col:desc"
ng-if="config.item.key">
<td width="8%" class="text-center">
<span class="label label-warning no-radius cursor-pointer" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.MasterBranch.Body.ClickToSeeItemValue' | translate }}"
ng-if="config.isModified || config.isDeleted"
ng-click="showText(config.oldValue)">{{'Component.Namespace.MasterBranch.Body.ItemNoPublish' | translate }}</span>
<span class="label label-default-light no-radius" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.MasterBranch.Body.ItemEffective' | translate }}"
ng-if="!config.isModified">{{'Component.Namespace.MasterBranch.Body.ItemPublished' | translate }}</span>
</td>
<td width="15%" class="cursor-pointer"
title="{{'Component.Namespace.Branch.Body.ClickToSee' | translate }}"
ng-click="showText(config.item.key)">
<span ng-bind="config.item.key | limitTo: 250"></span>
<span ng-bind="config.item.key.length > 250 ? '...' :''"></span>
<span class="label label-success" ng-if="config.isModified && !config.oldValue"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.MasterBranch.Body.AddedItem' | translate }}">{{'Component.Namespace.Branch.Body.Added' | translate }}</span>
<span class="label label-info"
ng-if="config.isModified && config.oldValue && !config.isDeleted"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Branch.Body.ModifiedItem' | translate }}">{{'Component.Namespace.Branch.Body.Modify' | translate }}</span>
<span class="label label-danger" ng-if="config.isDeleted" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Branch.Body.DeletedItem' | translate }}">{{'Component.Namespace.Branch.Body.Delete' | translate }}</span>
</td>
<td width="35%" class="cursor-pointer"
title="{{'Component.Namespace.Branch.Body.ClickToSee' | translate }}"
ng-click="showText(config.item.value)">
<span ng-bind="config.item.value | limitTo: 250"></span>
<span ng-bind="config.item.value.length > 250 ? '...': ''"></span>
</td>
<td width="12%" title="{{config.item.comment}}">
<span ng-bind="config.item.comment | limitTo: 250"></span>
<span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span>
</td>
<td width="10%" ng-bind="config.item.dataChangeLastModifiedByDisplayName + '(' + config.item.dataChangeLastModifiedBy + ')'">
</td>
<td width="15%"
ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'">
</td>
<td width="5%" class="text-center">
<img src="img/gray.png" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.MasterBranch.Body.ModifyItem' | translate }}"
ng-if="!config.isDeleted" ng-click="editItem(namespace.branch, config.item)"
ng-show="namespace.hasModifyPermission">
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!--gray rules-->
<div class="rules-manage-view row" ng-show="namespace.branch.viewType == 'rule'">
<div class="alert alert-warning no-radius"
ng-show="!namespace.hasModifyPermission && !namespace.hasReleasePermission">
<strong>Tips:</strong>
{{'Component.Namespace.Branch.GrayScaleRule.NoPermissionTips' | translate }}
</div>
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>{{'Component.Namespace.Branch.GrayScaleRule.AppId' | translate }}</th>
<th>{{'Component.Namespace.Branch.GrayScaleRule.IpList' | translate }}</th>
<th>{{'Component.Namespace.Branch.GrayScaleRule.Operator' | translate }}</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="ruleItem in namespace.branch.rules.ruleItems">
<td width="20%" ng-bind="ruleItem.clientAppId"></td>
<td width="70%" ng-show="!ruleItem.ApplyToAllInstances"
ng-bind="ruleItem.clientIpList.join(', ')"></td>
<td width="70%" ng-show="ruleItem.ApplyToAllInstances">
{{'Component.Namespace.Branch.GrayScaleRule.ApplyToAllInstances' | translate }}</td>
<td class="text-center" width="10%">
<img src="img/edit.png" class="i-20 hover" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Branch.GrayScaleRule.Modify' | translate }}"
ng-show="namespace.hasModifyPermission || namespace.hasReleasePermission"
ng-click="editRuleItem(namespace.branch, ruleItem)">
<img src="img/cancel.png" class="i-20 hover" style="margin-left: 5px;"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Branch.GrayScaleRule.Delete' | translate }}"
ng-show="namespace.hasModifyPermission || namespace.hasReleasePermission"
ng-click="deleteRuleItem(namespace.branch, ruleItem)">
</td>
</tr>
</tbody>
</table>
<button class="btn btn-primary" ng-if="namespace.hasModifyPermission || namespace.hasReleasePermission"
ng-show="(namespace.isPublic && !namespace.isLinkedNamespace) ||
((!namespace.isPublic || namespace.isLinkedNamespace)
&& (!namespace.branch.rules
|| !namespace.branch.rules.ruleItems
|| !namespace.branch.rules.ruleItems.length))"
ng-click="addRuleItem(namespace.branch)">{{'Component.Namespace.Branch.GrayScaleRule.AddNewRule' | translate }}
</button>
</div>
<!--instances -->
<div class="panel panel-default" ng-show="namespace.branch.viewType == 'instance'">
<div class="panel-heading text-right">
<button class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Branch.Instance.RefreshList' | translate }}"
ng-click="refreshInstancesInfo(namespace.branch)">
<img ng-src="{{ '/img/refresh.png' | prefixPath }}" />
</button>
</div>
<div class="panel-body">
<div class="panel-default" ng-if="namespace.branch.latestReleaseInstances.total > 0">
<div class="panel-heading">
<a target="_blank" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Branch.Instance.ItemToSee' | translate }}"
ng-href="{{ '/config/history.html' | prefixPath }}?#/appid={{appId}}&env={{env}}&clusterName={{namespace.baseInfo.clusterName}}&namespaceName={{namespace.baseInfo.namespaceName}}&releaseId={{namespace.branch.latestRelease.id}}">
{{namespace.branch.latestRelease.name}}
</a>
</div>
<table class="table table-bordered table-striped">
<thead>
<tr>
<td>{{'Component.Namespace.Branch.Instance.InstanceAppId' | translate }}</td>
<td>{{'Component.Namespace.Branch.Instance.InstanceClusterName' | translate }}</td>
<td>{{'Component.Namespace.Branch.Instance.InstanceDataCenter' | translate }}</td>
<td>{{'Component.Namespace.Branch.Instance.InstanceIp' | translate }}</td>
<td>{{'Component.Namespace.Branch.Instance.InstanceGetItemTime' | translate }}</td>
</tr>
</thead>
<tbody>
<tr ng-repeat="instance in namespace.branch.latestReleaseInstances.content">
<td width="20%" ng-bind="instance.appId"></td>
<td width="20%" ng-bind="instance.clusterName"></td>
<td width="20%" ng-bind="instance.dataCenter"></td>
<td width="20%" ng-bind="instance.ip"></td>
<td width="20%">{{instance.configs && instance.configs.length ?
(instance.configs[0].releaseDeliveryTime | date: 'yyyy-MM-dd HH:mm:ss') : ''}}
</td>
</tr>
</tbody>
</table>
<div class="row text-center"
ng-show="namespace.branch.latestReleaseInstances.content.length < namespace.branch.latestReleaseInstances.total">
<button class="btn btn-default"
ng-click="loadInstanceInfo(namespace.branch)">{{'Component.Namespace.Branch.Instance.LoadMore' | translate }}</button>
</div>
</div>
<div class="text-center" ng-if="namespace.branch.latestReleaseInstances.total == 0">
{{'Component.Namespace.Branch.Instance.NoInstance' | translate }}
</div>
</div>
</div>
<!--history view-->
<div class="J_historyview history-view" ng-show="namespace.branch.viewType == 'history'">
<div class="media" ng-show="namespace.branch.commits && namespace.branch.commits.length"
ng-repeat="commits in namespace.branch.commits">
<div class="media-body">
<div class="row">
<div class="col-md-6 col-sm-6 ">
<h3 class="media-heading" ng-bind="commits.dataChangeCreatedByDisplayName + '(' + commits.dataChangeCreatedBy + ')'"></h3>
</div>
<div class="col-md-6 col-sm-6 text-right">
<h5 class="media-heading"
ng-bind="commits.dataChangeCreatedTime | date: 'yyyy-MM-dd HH:mm:ss'"></h5>
</div>
</div>
<!--properties format-->
<table class="table table-bordered table-striped text-center table-hover"
style="margin-top: 5px;" ng-if="namespace.isPropertiesFormat">
<thead>
<tr>
<th>
{{'Component.Namespace.Branch.History.ItemType' | translate }}
</th>
<th>
{{'Component.Namespace.Branch.History.ItemKey' | translate }}
</th>
<th>
{{'Component.Namespace.Branch.History.ItemOldValue' | translate }}
</th>
<th>
{{'Component.Namespace.Branch.History.ItemNewValue' | translate }}
</th>
<th>
{{'Component.Namespace.Branch.History.ItemComment' | translate }}
</th>
</tr>
</thead>
<tbody>
<!--兼容老数据,不显示item类型为空行和注释的item-->
<tr ng-repeat="item in commits.changeSets.createItems" ng-show="item.key">
<td width="6%">
{{'Component.Namespace.Branch.History.NewAdded' | translate }}
</td>
<td width="20%" title="{{item.key}}">
<span ng-bind="item.key | limitTo: 250"></span>
<span ng-bind="item.key.length > 250 ? '...' :''"></span>
</td>
<td width="28%">
</td>
<td width="28%" class="cursor-pointer" title="{{item.value}}"
ng-click="showText(item.value)">
<span ng-bind="item.value | limitTo: 250"></span>
<span ng-bind="item.value.length > 250 ? '...': ''"></span>
</td>
<td width="18%" title="{{item.comment}}">
<span ng-bind="item.comment | limitTo: 250"></span>
<span ng-bind="item.comment.length > 250 ?'...' : ''"></span>
</td>
</tr>
<tr ng-repeat="item in commits.changeSets.updateItems">
<td width="6%">
{{'Component.Namespace.Branch.History.Modified' | translate }}
</td>
<td width="20%" title="{{item.newItem.key}}">
<span ng-bind="item.newItem.key | limitTo: 250"></span>
<span ng-bind="item.newItem.key.length > 250 ? '...' :''"></span>
</td>
<td width="28%" class="cursor-pointer" title="{{item.oldItem.value}}"
ng-click="showText(item.oldItem.value)">
<span ng-bind="item.oldItem.value | limitTo: 250"></span>
<span ng-bind="item.oldItem.value.length > 250 ? '...': ''"></span>
</td>
<td width="28%" class="cursor-pointer" title="{{item.newItem.value}}"
ng-click="showText(item.newItem.value)">
<span ng-bind="item.newItem.value | limitTo: 250"></span>
<span ng-bind="item.newItem.value.length > 250 ? '...': ''"></span>
</td>
<td width="18%" title="{{item.newItem.comment}}">
<span ng-bind="item.newItem.comment | limitTo: 250"></span>
<span ng-bind="item.newItem.comment.length > 250 ?'...' : ''"></span>
</td>
</tr>
<tr ng-repeat="item in commits.changeSets.deleteItems"
ng-show="item.key || item.comment">
<td width="6%">
{{'Component.Namespace.Branch.History.Deleted' | translate }}
</td>
<td width="20%" title="{{item.key}}">
<span ng-bind="item.key | limitTo: 250"></span>
<span ng-bind="item.key.length > 250 ? '...' :''"></span>
</td>
<td width="28%" title="{{item.value}}">
<span ng-bind="item.value | limitTo: 250"></span>
<span ng-bind="item.value.length > 250 ? '...': ''"></span>
</td>
<td width="28%">
</td>
<td width="18%" title="{{item.comment}}">
<span ng-bind="item.comment | limitTo: 250"></span>
<span ng-bind="item.comment.length > 250 ?'...' : ''"></span>
</td>
</tr>
</tbody>
</table>
<!--not properties format-->
<table class="table table-bordered table-striped text-center table-hover"
style="margin-top: 5px;" ng-if="!namespace.isPropertiesFormat">
<thead>
<tr>
<th>
{{'Component.Namespace.Branch.History.ItemType' | translate }}
</th>
<th>
{{'Component.Namespace.Branch.History.ItemOldValue' | translate }}
</th>
<th>
{{'Component.Namespace.Branch.History.ItemNewValue' | translate }}
</th>
<th>
{{'Component.Namespace.Branch.History.ItemComment' | translate }}
</th>
</tr>
</thead>
<tbody>
<!--兼容老数据,不显示item类型为空行和注释的item-->
<tr ng-repeat="item in commits.changeSets.createItems" ng-show="item.key">
<td width="6%">
{{'Component.Namespace.Branch.History.NewAdded' | translate }}
</td>
<td width="28%">
</td>
<td width="28%" class="cursor-pointer" title="{{item.value}}"
ng-click="showText(item.value)">
<span ng-bind="item.value | limitTo: 250"></span>
<span ng-bind="item.value.length > 250 ? '...': ''"></span>
</td>
<td width="18%" title="{{item.comment}}">
<span ng-bind="item.comment | limitTo: 250"></span>
<span ng-bind="item.comment.length > 250 ?'...' : ''"></span>
</td>
</tr>
<tr ng-repeat="item in commits.changeSets.updateItems">
<td width="6%">
{{'Component.Namespace.Branch.History.Modified' | translate }}
</td>
<td width="28%" class="cursor-pointer" title="{{item.oldItem.value}}"
ng-click="showText(item.oldItem.value)">
<span ng-bind="item.oldItem.value | limitTo: 250"></span>
<span ng-bind="item.oldItem.value.length > 250 ? '...': ''"></span>
</td>
<td width="28%" class="cursor-pointer" title="{{item.newItem.value}}"
ng-click="showText(item.newItem.value)">
<span ng-bind="item.newItem.value | limitTo: 250"></span>
<span ng-bind="item.newItem.value.length > 250 ? '...': ''"></span>
</td>
<td width="18%" title="{{item.newItem.comment}}">
<span ng-bind="item.newItem.comment | limitTo: 250"></span>
<span ng-bind="item.newItem.comment.length > 250 ?'...' : ''"></span>
</td>
</tr>
<tr ng-repeat="item in commits.changeSets.deleteItems"
ng-show="item.key || item.comment">
<td width="6%">
{{'Component.Namespace.Branch.History.Deleted' | translate }}
</td>
<td width="28%" title="{{item.value}}">
<span ng-bind="item.value | limitTo: 250"></span>
<span ng-bind="item.value.length > 250 ? '...': ''"></span>
</td>
<td width="28%">
</td>
<td width="18%" title="{{item.comment}}">
<span ng-bind="item.comment | limitTo: 250"></span>
<span ng-bind="item.comment.length > 250 ?'...' : ''"></span>
</td>
</tr>
</tbody>
</table>
</div>
<hr>
</div>
<div class="text-center">
<button type="button" class="btn btn-default" ng-show="!namespace.branch.hasLoadAllCommit"
ng-click="loadCommitHistory(namespace.branch)">{{'Component.Namespace.Branch.History.LoadMore' | translate }}
<span class="glyphicon glyphicon-menu-down"></span></button>
</div>
<div class="empty-container text-center"
ng-show="!namespace.branch.commits || !namespace.branch.commits.length">
{{'Component.Namespace.Branch.History.NoHistory' | translate }}
</div>
</div>
</section>
</div>
</section> | 1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-portal/src/main/resources/static/views/component/namespace-panel-master-tab.html | <!--
~ Copyright 2021 Apollo Authors
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<!--master panel body when not initialized-->
<section class="master-panel-body" ng-if="!namespace.initialized">
<!--main header-->
<header class="panel-heading">
<div class="row">
<div class="col-md-6 col-sm-6 header-namespace">
<b class="namespace-name" ng-bind="namespace.viewName"
data-tooltip="tooltip" data-placement="bottom" title="{{namespace.comment}}"></b>
<span class="label label-warning no-radius namespace-label modify-tip"
ng-show="namespace.itemModifiedCnt > 0">
{{'Component.Namespace.Master.Items.Changed' | translate }}
<span class="badge label badge-white namespace-label" ng-bind="namespace.itemModifiedCnt"></span>
</span>
</div>
<div class="col-md-6 col-sm-6 text-right header-buttons">
<button type="button" class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.LoadNamespaceTips' | translate }}"
ng-click="refreshNamespace()">
<img src="img/more.png">
{{'Component.Namespace.Master.LoadNamespace' | translate }}
</button>
</div>
</div>
</header>
</section>
<!--master panel body-->
<section class="master-panel-body" ng-if="namespace.initialized &&
(namespace.hasBranch && namespace.displayControl.currentOperateBranch == 'master' || !namespace.hasBranch)">
<!--main header-->
<header class="panel-heading">
<div class="row">
<div class="col-md-6 col-sm-6 header-namespace">
<b class="namespace-name" ng-bind="namespace.viewName"
data-tooltip="tooltip" data-placement="bottom" title="{{namespace.comment}}"></b>
<span class="label label-warning no-radius namespace-label modify-tip"
ng-show="namespace.itemModifiedCnt > 0">
{{'Component.Namespace.Master.Items.Changed' | translate }}
<span class="badge label badge-white namespace-label" ng-bind="namespace.itemModifiedCnt"></span>
</span>
<span class="label label-primary no-radius namespace-label"
ng-show="namespace.lockOwner">{{'Component.Namespace.Master.Items.ChangedUser' | translate }}:{{namespace.lockOwner}}</span>
</div>
<div class="col-md-6 col-sm-6 text-right header-buttons">
<button type="button" class="btn btn-success btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.PublishTips' | translate }}"
ng-show="(namespace.hasReleasePermission || namespace.hasModifyPermission)"
ng-disabled="namespace.isTextEditing" ng-click="publish(namespace)">
<img src="img/release.png">
{{'Component.Namespace.Master.Items.Publish' | translate }}
</button>
<button type="button" class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.RollbackTips' | translate }}"
ng-show="namespace.hasReleasePermission" ng-click="rollback(namespace)">
<img src="img/rollback.png">
{{'Component.Namespace.Master.Items.Rollback' | translate }}
</button>
<a type="button" class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.PublishHistoryTips' | translate }}"
href="{{ '/config/history.html' | prefixPath }}?#/appid={{appId}}&env={{env}}&clusterName={{cluster}}&namespaceName={{namespace.baseInfo.namespaceName}}">
<img src="img/release-history.png">
{{'Component.Namespace.Master.Items.PublishHistory' | translate }}
</a>
<a type="button" class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.GrantTips' | translate }}"
href="{{ '/namespace/role.html' | prefixPath }}?#/appid={{appId}}&namespaceName={{namespace.baseInfo.namespaceName}}"
ng-show="hasAssignUserPermission">
<img src="img/assign.png">
{{'Component.Namespace.Master.Items.Grant' | translate }}
</a>
<a type="button" class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.GrayscaleTips' | translate }}"
ng-show="!namespace.hasBranch && namespace.isPropertiesFormat && namespace.hasModifyPermission"
ng-click="preCreateBranch(namespace)">
<img src="img/test.png">
{{'Component.Namespace.Master.Items.Grayscale' | translate }}
</a>
<a type="button" class="btn btn-default btn-sm J_tableview_btn" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Master.Items.RequestPermissionTips' | translate }}"
ng-click="showNoModifyPermissionDialog()"
ng-show="!namespace.hasModifyPermission && !namespace.hasReleasePermission">
{{'Component.Namespace.Master.Items.RequestPermission' | translate }}
</a>
<div class="btn-group"
ng-show="namespace.hasModifyPermission || namespace.hasReleasePermission || hasAssignUserPermission">
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<img src="img/operate.png"> <span class="caret"></span>
</button>
<ul class="dropdown-menu" style="right: 0; left: -160px;">
<li ng-click="deleteNamespace(namespace)">
<a style="color: red">
<img src="img/delete.png">
{{'Component.Namespace.Master.Items.DeleteNamespace' | translate }}</a>
</li>
</ul>
</div>
</div>
</div>
</header>
<div id="BODY{{namespace.id}}" ng-class="{'collapse in': showNamespaceBody, 'collapse' : !showNamespaceBody}">
<div class="J_namespace-release-tip well well-sm no-radius text-center" ng-show="namespace.isConfigHidden">
<span style="color: red">{{'Component.Namespace.Master.Items.NoPermissionTips' | translate }}</span>
</div>
<!--second header-->
<header class="panel-heading second-panel-heading" ng-show="!namespace.isConfigHidden">
<div class="row">
<div class="col-md-6 col-sm-6 pull-left">
<!--master branch nav tabs-->
<ul class="nav nav-tabs">
<li role="presentation" ng-click="switchView(namespace, 'table')"
ng-show="namespace.isPropertiesFormat">
<a ng-class="{node_active:namespace.viewType == 'table'}">
<img src="img/table.png">
{{'Component.Namespace.Master.Items.ItemList' | translate }}
</a>
</li>
<li role="presentation" ng-click="switchView(namespace, 'text')">
<a ng-class="{node_active:namespace.viewType == 'text'}">
<img src="img/text.png">
{{'Component.Namespace.Master.Items.ItemListByText' | translate }}
</a>
</li>
<li role="presentation" ng-click="switchView(namespace, 'history')">
<a ng-class="{node_active:namespace.viewType == 'history'}">
<img src="img/change.png">
{{'Component.Namespace.Master.Items.ItemHistory' | translate }}
</a>
</li>
<li role="presentation" ng-click="switchView(namespace, 'instance')">
<a ng-class="{node_active:namespace.viewType == 'instance'}">
<img src="img/machine.png">
{{'Component.Namespace.Master.Items.ItemInstance' | translate }}
<span class="badge badge-grey" ng-bind="namespace.instancesCount"></span>
</a>
</li>
</ul>
</div>
<div class="col-md-6 col-sm-6 text-right">
<img src="img/copy.png" class="ns_btn clipboard cursor-pointer"
data-clipboard-text="{{namespace.text}}" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.CopyText' | translate }}"
ng-show="!namespace.isTextEditing && namespace.viewType == 'text' && namespace.hasModifyPermission">
<img src="img/syntax.png" class="ns_btn cursor-pointer" data-tooltip="tooltip"
data-placement="bottom" title="{{'Component.Namespace.Master.Items.GrammarCheck' | translate }}"
ng-show="namespace.isTextEditing && namespace.viewType == 'text' && namespace.isSyntaxCheckable"
ng-click="syntaxCheck(namespace)">
<img src="img/cancel.png" class="ns_btn cursor-pointer" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Master.Items.CancelChanged' | translate }}"
ng-show="namespace.isTextEditing && namespace.viewType == 'text'"
ng-click="toggleTextEditStatus(namespace)">
<img src="img/edit.png" class="ns_btn cursor-pointer" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Change' | translate }}"
ng-show="!namespace.isTextEditing && namespace.viewType == 'text' && namespace.hasModifyPermission"
ng-click="toggleTextEditStatus(namespace)">
<img src="img/submit.png" class="ns_btn cursor-pointer" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Master.Items.SummitChanged' | translate }}" data-toggle="modal"
data-target="#commitModal" ng-show="namespace.isTextEditing && namespace.viewType == 'text'"
ng-click="modifyByText(namespace)">
<button type="button" class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.SortByKey' | translate }}" ng-show="namespace.viewType == 'table' && namespace.displayControl.currentOperateBranch == 'master'
&& !namespace.isLinkedNamespace" ng-click="toggleItemSearchInput(namespace)">
<span class="glyphicon glyphicon-filter"></span>
{{'Component.Namespace.Master.Items.FilterItem' | translate }}
</button>
<button type="button" class="btn btn-default btn-sm J_tableview_btn" data-tooltip="tooltip"
data-placement="bottom" title="{{'Component.Namespace.Master.Items.SyncItemTips' | translate }}"
ng-click="goToSyncPage(namespace)" ng-show="namespace.viewType == 'table' && namespace.displayControl.currentOperateBranch == 'master'
&& namespace.hasModifyPermission && namespace.isPropertiesFormat">
<img src="img/sync.png">
{{'Component.Namespace.Master.Items.SyncItem' | translate }}
</button>
<button type="button" class="btn btn-default btn-sm J_tableview_btn" data-tooltip="tooltip"
data-placement="bottom" title="{{'Component.Namespace.Master.Items.RevokeItemTips' | translate }}"
ng-click="preRevokeItem(namespace)" ng-show="namespace.viewType == 'table' && namespace.displayControl.currentOperateBranch == 'master'
&& namespace.hasModifyPermission && namespace.isPropertiesFormat">
<img src="img/rollback.png">
{{'Component.Namespace.Master.Items.RevokeItem' | translate }}
</button>
<button type="button" class="btn btn-default btn-sm J_tableview_btn" data-tooltip="tooltip"
data-placement="bottom" title="{{'Component.Namespace.Master.Items.DiffItemTips' | translate }}"
ng-click="goToDiffPage(namespace)" ng-show="namespace.viewType == 'table' && namespace.displayControl.currentOperateBranch == 'master'
&& namespace.isPropertiesFormat">
<img src="img/diff.png">
{{'Component.Namespace.Master.Items.DiffItem' | translate }}
</button>
<button type="button" class="btn btn-primary btn-sm" ng-show="!namespace.isLinkedNamespace
&& namespace.viewType == 'table'
&& namespace.displayControl.currentOperateBranch == 'master'
&& namespace.hasModifyPermission" ng-click="createItem(namespace)">
<img src="img/plus.png">
{{'Component.Namespace.Master.Items.AddItem' | translate }}
</button>
</div>
</div>
</header>
<!--namespace body-->
<section ng-show="!namespace.isConfigHidden">
<!--table view-->
<div class="namespace-view-table" ng-show="namespace.viewType == 'table'">
<div class="J_namespace-release-tip well well-sm no-radius text-center"
ng-show="namespace.isLatestReleaseLoaded && !namespace.isLinkedNamespace && !namespace.latestRelease">
<span style="color: red">
{{'Component.Namespace.Master.Items.Body.ItemsNoPublishedTips' | translate }}</span>
</div>
<!--not link namespace-->
<div ng-if="!namespace.isLinkedNamespace">
<div class="search-input" ng-show="namespace.displayControl.showSearchInput">
<input type="text" class="form-control"
placeholder="{{'Component.Namespace.Master.Items.Body.FilterByKey' | translate }}"
ng-model="namespace.searchKey" ng-change="searchItems(namespace)">
</div>
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th class="hover" title="{{'Component.Namespace.Master.Items.Body.Sort' | translate }}"
ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
{{'Component.Namespace.Master.Items.Body.PublishState' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th class="hover" title="{{'Component.Namespace.Master.Items.Body.Sort' | translate }}"
ng-click="col='item.key';desc=!desc;">
{{'Component.Namespace.Master.Items.Body.ItemKey' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
{{'Component.Namespace.Master.Items.Body.ItemValue' | translate }}
</th>
<th>
{{'Component.Namespace.Master.Items.Body.ItemComment' | translate }}
</th>
<th class="hover" title="{{'Component.Namespace.Master.Items.Body.Sort' | translate }}"
ng-click="col='item.dataChangeLastModifiedBy';desc=!desc;">
{{'Component.Namespace.Master.Items.Body.ItemLastModify' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th class="hover" title="{{'Component.Namespace.Master.Items.Body.Sort' | translate }}"
ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
{{'Component.Namespace.Master.Items.Body.ItemLastModifyTime' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
{{'Component.Namespace.Master.Items.Body.ItemOperator' | translate }}
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="config in namespace.viewItems |orderBy:col:desc" ng-if="config.item.key"
ng-class="{'warning': !config.item.value}">
<td width="8%" class="text-center">
<span class="label label-warning no-radius cursor-pointer" ng-if="config.isModified"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.NoPublishTitle' | translate }}"
ng-click="showText(config.oldValue?config.oldValue:('Component.Namespace.Master.Items.Body.NoPublishTips' | translate))">{{'Component.Namespace.Master.Items.Body.NoPublish' | translate }}</span>
<span class="label label-default-light no-radius" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.PublishedTitle' | translate }}"
ng-if="!config.isModified">{{'Component.Namespace.Master.Items.Body.Published' | translate }}</span>
</td>
<td width="15%" class="cursor-pointer"
title="{{'Component.Namespace.Master.Items.Body.ClickToSee' | translate }}"
ng-click="showText(config.item.key)">
<span ng-bind="config.item.key | limitTo: 250"></span>
<span ng-bind="config.item.key.length > 250 ? '...' :''"></span>
<span class="label label-default cursor-pointer" ng-if="config.hasBranchValue"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.HaveGrayscale' | translate }}"
ng-click="namespace.displayControl.currentOperateBranch=namespace.branchName;namespace.branch.viewType='table'">{{'Component.Namespace.Master.Items.Body.Grayscale' | translate }}</span>
<span class="label label-success" ng-if="config.isModified && !config.oldValue"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.NewAddedTips' | translate }}">{{'Component.Namespace.Master.Items.Body.NewAdded' | translate }}</span>
<span class="label label-info"
ng-if="config.isModified && config.oldValue && !config.isDeleted"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.ModifiedTips' | translate }}">{{'Component.Namespace.Master.Items.Body.Modified' | translate }}</span>
<span class="label label-danger" ng-if="config.isDeleted" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.DeletedTips' | translate }}">{{'Component.Namespace.Master.Items.Body.Deleted' | translate }}</span>
</td>
<td width="30%" class="cursor-pointer"
title="{{'Component.Namespace.Master.Items.Body.ClickToSee' | translate }}"
ng-click="showText(config.item.value)">
<span ng-bind="config.item.value | limitTo: 250"></span>
<span ng-bind="config.item.value.length > 250 ? '...': ''"></span>
</td>
<td width="13%" title="{{config.item.comment}}">
<span ng-bind="config.item.comment | limitTo: 250"></span>
<span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span>
</td>
<td width="10%" ng-bind="config.item.dataChangeLastModifiedByDisplayName + '(' + config.item.dataChangeLastModifiedBy + ')'">
</td>
<td width="16%"
ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'">
</td>
<td width="8%" class="text-center" ng-if="!config.isDeleted">
<img src="img/edit.png" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.ModifyTips' | translate }}"
ng-click="editItem(namespace, config.item)"
ng-show="namespace.hasModifyPermission">
<img style="margin-left: 5px;" src="img/cancel.png" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.DeleteTips' | translate }}"
ng-click="preDeleteItem(namespace, config.item)"
ng-show="namespace.hasModifyPermission">
</td>
<td width="6%" class="text-center" ng-if="config.isDeleted">
</td>
</tr>
</tbody>
</table>
</div>
<!--link namespace-->
<div class="panel panel-default" ng-if="namespace.isLinkedNamespace">
<div class="panel-heading">
<div class="row">
<div class="padding-top-5 col-md-4 col-sm-4">
{{'Component.Namespace.Master.Items.Body.Link.Title' | translate }}
</div>
<div class="col-md-8 col-sm-8">
<input type="text" class="form-control pull-right" placeholder="filter by key ..."
ng-class="{'search-onblur': namespace.searchStatus == 'OFF' || !namespace.searchStatus,
'search-focus': namespace.searchStatus == 'ON'}" ng-model="namespace.searchKey"
ng-change="searchItems(namespace)" ng-focus="namespace.searchStatus='ON'"
ng-blur="namespace.searchStatus='OFF'">
</div>
</div>
</div>
<table class="table table-bordered table-striped table-hover"
ng-if="namespace.viewItems && namespace.viewItems.length">
<thead>
<tr>
<th>{{'Component.Namespace.Master.Items.Body.PublishState' | translate }}</th>
<th class="hover" title="{{'Component.Namespace.Master.Items.Body.Sort' | translate }}"
ng-click="col='item.key';desc=!desc;">
{{'Component.Namespace.Master.Items.Body.ItemKey' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
{{'Component.Namespace.Master.Items.Body.ItemValue' | translate }}
</th>
<th>
{{'Component.Namespace.Master.Items.Body.ItemComment' | translate }}
</th>
<th class="hover" title="{{'Component.Namespace.Master.Items.Body.Sort' | translate }}"
ng-click="col='item.dataChangeLastModifiedBy';desc=!desc;">
{{'Component.Namespace.Master.Items.Body.ItemLastModify' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th class="hover" title="{{'Component.Namespace.Master.Items.Body.Sort' | translate }}"
ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
{{'Component.Namespace.Master.Items.Body.ItemLastModifyTime' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
{{'Component.Namespace.Master.Items.Body.ItemOperator' | translate }}
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="config in namespace.viewItems |orderBy:col:desc" ng-if="config.item.key">
<td width="8%" class="text-center">
<span class="label label-warning no-radius cursor-pointer" ng-if="config.isModified"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.NoPublishTitle' | translate }}"
ng-click="showText(config.oldValue?config.oldValue:('Component.Namespace.Master.Items.Body.NoPublishTips' | translate))">{{'Component.Namespace.Master.Items.Body.NoPublish' | translate }}</span>
<span class="label label-default-light no-radius" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.PublishedTitle' | translate }}"
ng-if="!config.isModified">{{'Component.Namespace.Master.Items.Body.Published' | translate }}</span>
</td>
<td width="15%" class="cursor-pointer"
title="{{'Component.Namespace.Master.Items.Body.ClickToSee' | translate }}"
ng-click="showText(config.item.key)">
<span ng-bind="config.item.key | limitTo: 250"></span>
<span ng-bind="config.item.key.length > 250 ? '...' :''"></span>
<span class="label label-default cursor-pointer" ng-if="config.hasBranchValue"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.HaveGrayscale' | translate }}"
ng-click="namespace.displayControl.currentOperateBranch=namespace.branchName;namespace.branch.viewType='table'">{{'Component.Namespace.Master.Items.Body.Grayscale' | translate }}</span>
<span class="label label-success" ng-if="config.isModified && !config.oldValue"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.NewAddedTips' | translate }}">{{'Component.Namespace.Master.Items.Body.NewAdded' | translate }}</span>
<span class="label label-info"
ng-if="config.isModified && config.oldValue && !config.isDeleted"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.ModifiedTips' | translate }}">{{'Component.Namespace.Master.Items.Body.Modified' | translate }}</span>
<span class="label label-danger" ng-if="config.isDeleted" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.DeletedTips' | translate }}">{{'Component.Namespace.Master.Items.Body.Deleted' | translate }}</span>
</td>
<td width="30%" class="cursor-pointer"
title="{{'Component.Namespace.Master.Items.Body.ClickToSee' | translate }}"
ng-click="showText(config.item.value)">
<span ng-bind="config.item.value | limitTo: 250"></span>
<span ng-bind="config.item.value.length > 250 ? '...': ''"></span>
</td>
<td width="13%" title="{{config.item.comment}}">
<span ng-bind="config.item.comment | limitTo: 250"></span>
<span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span>
</td>
<td width="10%" ng-bind="config.item.dataChangeLastModifiedByDisplayName + '(' + config.item.dataChangeLastModifiedBy + ')'">
</td>
<td width="16%"
ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'">
</td>
<td width="8%" class="text-center" ng-if="!config.isDeleted">
<img src="img/edit.png" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.ModifyTips' | translate }}"
ng-click="editItem(namespace, config.item)"
ng-show="namespace.hasModifyPermission">
<img style="margin-left: 5px;" src="img/cancel.png" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.DeleteTips' | translate }}"
ng-click="preDeleteItem(namespace, config.item)"
ng-show="namespace.hasModifyPermission">
</td>
<td width="6%" class="text-center" ng-if="config.isDeleted">
</td>
</tr>
</tbody>
</table>
<div class="text-center no-config-panel"
ng-if="!namespace.viewItems || !namespace.viewItems.length">
<h5>{{'Component.Namespace.Master.Items.Body.Link.NoCoverLinkItem' | translate }}</h5>
</div>
</div>
<!--link namespace's public namespace-->
<div ng-if="namespace.isLinkedNamespace">
<div class="panel panel-default" ng-if="namespace.publicNamespace">
<div class="panel-heading">
<div class="row">
<div class="padding-top-5 col-md-4 col-sm-4">
{{'Component.Namespace.Master.Items.Body.Public.Title' | translate }}
<a href="{{ '/config.html' | prefixPath }}?#/appid={{namespace.publicNamespace.baseInfo.appId}}&env={{env}}&cluster={{namespace.publicNamespace.baseInfo.clusterName}}"
target="_blank">
<small>
({{'Common.AppId' | translate }}:{{namespace.publicNamespace.baseInfo.appId}},
{{'Common.Cluster' | translate }}:{{namespace.publicNamespace.baseInfo.clusterName}})
</small>
</a>
</div>
<div class="col-md-4 col-sm-4 text-center">
<div class="btn-group btn-group-sm" role="group"
ng-show="namespace.publicNamespace.isModified">
<button type="button" class="btn btn-default" ng-class="{'active':namespace.publicNamespaceViewType == 'RELEASE'
|| !namespace.publicNamespaceViewType}"
ng-click="namespace.publicNamespaceViewType = 'RELEASE'">
{{'Component.Namespace.Master.Items.Body.Public.Published' | translate }}
</button>
<button type="button" class="btn btn-default"
ng-class="{'active':namespace.publicNamespaceViewType == 'NOT_RELEASE'}"
ng-click="namespace.publicNamespaceViewType = 'NOT_RELEASE'">
{{'Component.Namespace.Master.Items.Body.Public.NoPublish' | translate }}
</button>
</div>
</div>
<div class="col-md-4 col-sm-4">
<input type="text" class="form-control pull-right" placeholder="filter by key ..."
ng-class="{'search-onblur': namespace.publicNamespace.searchStatus == 'OFF'
|| !namespace.publicNamespace.searchStatus,
'search-focus': namespace.publicNamespace.searchStatus == 'ON'}"
ng-model="namespace.publicNamespace.searchKey"
ng-change="searchItems(namespace.publicNamespace)"
ng-blur="namespace.publicNamespace.searchStatus='OFF'"
ng-focus="namespace.publicNamespace.searchStatus='ON'" />
</div>
</div>
</div>
<!--published items-->
<div
ng-show="!namespace.publicNamespaceViewType || namespace.publicNamespaceViewType == 'RELEASE'">
<table class="table table-bordered table-striped table-hover"
ng-show="namespace.publicNamespace.hasPublishedItem">
<thead>
<tr>
<th class="hover"
title="{{'Component.Namespace.Master.Items.Body.Sort' | translate }}"
ng-click="col='item.key';desc=!desc;">
{{'Component.Namespace.Master.Items.Body.ItemKey' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
{{'Component.Namespace.Master.Items.Body.ItemValue' | translate }}
</th>
<th>
{{'Component.Namespace.Master.Items.Body.ItemComment' | translate }}
</th>
<th class="hover"
title="{{'Component.Namespace.Master.Items.Body.Sort' | translate }}"
ng-click="col='item.dataChangeLastModifiedBy';desc=!desc;">
{{'Component.Namespace.Master.Items.Body.ItemLastModify' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th class="hover"
title="{{'Component.Namespace.Master.Items.Body.Sort' | translate }}"
ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
{{'Component.Namespace.Master.Items.Body.ItemLastModifyTime' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
{{'Component.Namespace.Master.Items.Body.ItemOperator' | translate }}
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="config in namespace.publicNamespace.viewItems |orderBy:col:desc"
ng-if="config.item.key && !config.isModified && !config.isDeleted">
<td width="15%" class="cursor-pointer"
title="{{'Component.Namespace.Master.Items.Body.ClickToSee' | translate }}"
ng-click="showText(config.item.key)">
<span ng-bind="config.item.key | limitTo: 250"></span>
<span ng-bind="config.item.key.length > 250 ? '...' :''"></span>
</td>
<td width="35%" class="cursor-pointer"
title="{{'Component.Namespace.Master.Items.Body.ClickToSee' | translate }}"
ng-click="showText(config.item.value)">
<span ng-bind="config.item.value | limitTo: 250"></span>
<span ng-bind="config.item.value.length > 250 ? '...': ''"></span>
</td>
<td width="15%" title="{{config.item.comment}}">
<span ng-bind="config.item.comment | limitTo: 250"></span>
<span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span>
</td>
<td width="10%" ng-bind="config.item.dataChangeLastModifiedByDisplayName + '(' + config.item.dataChangeLastModifiedBy + ')'">
</td>
<td width="15%"
ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'">
</td>
<td width="10%" class="text-center" ng-if="!config.isDeleted">
<img src="img/gray.png" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.Public.PublishedAndCover' | translate }}"
ng-click="editItem(namespace, config.item)"
ng-show="namespace.hasModifyPermission && !config.covered">
</td>
<td width="6%" class="text-center" ng-if="config.isDeleted">
</td>
</tr>
</tbody>
</table>
<div class="text-center no-config-panel" ng-if="namespace.publicNamespace.viewItems
&& namespace.publicNamespace.viewItems.length
&& !namespace.publicNamespace.hasPublishedItem">
<h5>{{'Component.Namespace.Master.Items.Body.Public.NoPublished' | translate }}</h5>
</div>
</div>
<!--not published items-->
<table class="table table-bordered table-striped table-hover"
ng-show="namespace.publicNamespaceViewType == 'NOT_RELEASE'">
<thead>
<tr>
<th class="hover"
title="{{'Component.Namespace.Master.Items.Body.Sort' | translate }}"
ng-click="col='item.key';desc=!desc;">
{{'Component.Namespace.Master.Items.Body.ItemKey' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
{{'Component.Namespace.Master.Items.Body.NoPublished.PublishedValue' | translate }}
</th>
<th>
{{'Component.Namespace.Master.Items.Body.NoPublished.NoPublishedValue' | translate }}
</th>
<th>
{{'Component.Namespace.Master.Items.Body.ItemComment' | translate }}
</th>
<th class="hover"
title="{{'Component.Namespace.Master.Items.Body.Sort' | translate }}"
ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
{{'Component.Namespace.Master.Items.Body.ItemLastModifyTime' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
{{'Component.Namespace.Master.Items.Body.ItemOperator' | translate }}
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="config in namespace.publicNamespace.viewItems |orderBy:col:desc"
ng-if="config.item.key && (config.isModified || config.isDeleted)">
<td width="20%" class="cursor-pointer"
title="{{'Component.Namespace.Master.Items.Body.ClickToSee' | translate }}"
ng-click="showText(config.item.key)">
<span ng-bind="config.item.key | limitTo: 250"></span>
<span ng-bind="config.item.key.length > 250 ? '...' :''"></span>
<span class="label label-success" ng-if="config.isModified && !config.oldValue"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.NewAddedTips' | translate }}">{{'Component.Namespace.Master.Items.Body.NewAdded' | translate }}</span>
<span class="label label-info"
ng-if="config.isModified && config.oldValue && !config.isDeleted"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.ModifiedTips' | translate }}">{{'Component.Namespace.Master.Items.Body.Modified' | translate }}</span>
<span class="label label-danger" ng-if="config.isDeleted" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.DeletedTips' | translate }}">{{'Component.Namespace.Master.Items.Body.Deleted' | translate }}</span>
</td>
<td width="25%" class="cursor-pointer"
title="{{'Component.Namespace.Master.Items.Body.ClickToSee' | translate }}"
ng-click="showText(config.oldValue)">
<span ng-bind="config.oldValue | limitTo: 250"></span>
<span ng-bind="config.oldValue.length > 250 ? '...': ''"></span>
</td>
<td width="25%" class="cursor-pointer"
title="{{'Component.Namespace.Master.Items.Body.ClickToSee' | translate }}"
ng-click="showText(config.item.value)">
<span ng-bind="config.item.value | limitTo: 250"></span>
<span ng-bind="config.item.value.length > 250 ? '...': ''"></span>
</td>
<td width="10%" title="{{config.item.comment}}">
<span ng-bind="config.item.comment | limitTo: 250"></span>
<span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span>
</td>
<td width="15%"
ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'">
</td>
<td width="5%" class="text-center" ng-if="!config.isDeleted">
<img src="img/gray.png" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.Public.PublishedAndCover' | translate }}"
ng-click="editItem(namespace, config.item)"
ng-show="namespace.hasModifyPermission && !config.covered">
</td>
</tr>
</tbody>
</table>
<div class="text-center no-config-panel"
ng-if="!namespace.publicNamespace.viewItems || !namespace.publicNamespace.viewItems.length">
<h5>{{'Component.Namespace.Master.Items.Body.NoPublished.Title' | translate }}</h5>
</div>
</div>
<div class="panel panel-default" ng-if="!namespace.publicNamespace">
<div class="panel-heading">
{{'Component.Namespace.Master.Items.Body.Public.Title' | translate }}
</div>
<div class="panel-body text-center">
{{'Component.Namespace.Master.Items.Body.Public.NoPublicNamespaceTips1' | translate }}
<a href="{{ '/config.html' | prefixPath }}?#/appid={{namespace.parentAppId}}"
target="_blank">{{namespace.parentAppId}}</a>
{{'Component.Namespace.Master.Items.Body.Public.NoPublicNamespaceTips2' | translate:this }}
</div>
</div>
</div>
</div>
<!--text view-->
<!--只读模式下的文本内容,不替换换行符-->
<div ui-ace="aceConfig" readonly="true" class="form-control no-radius"
rows="{{namespace.itemCnt < 10 ? 10: namespace.itemCnt>20 ? 20:namespace.itemCnt}}"
ng-show="namespace.viewType == 'text' && !namespace.isTextEditing" ng-model="namespace.text">
</div>
<!--编辑状态下的文本内容,会过滤掉换行符-->
<div ui-ace="aceConfig" class="form-control no-radius"
rows="{{namespace.itemCnt < 10 ? 10: namespace.itemCnt>20 ? 20:namespace.itemCnt}}"
ng-show="namespace.viewType == 'text' && namespace.isTextEditing" ng-disabled="!namespace.isTextEditing"
ng-model="namespace.editText">
</div>
<!--history view-->
<div class="J_historyview history-view" ng-show="namespace.viewType == 'history'">
<div class="media" ng-show="namespace.commits && namespace.commits.length"
ng-repeat="commits in namespace.commits">
<div class="media-body">
<div class="row">
<div class="col-md-6 col-sm-6">
<h3 class="media-heading"
ng-bind="commits.dataChangeCreatedByDisplayName + '(' + commits.dataChangeCreatedBy + ')'"></h3>
</div>
<div class="col-md-6 col-sm-6 text-right">
<h5 class="media-heading"
ng-bind="commits.dataChangeCreatedTime | date: 'yyyy-MM-dd HH:mm:ss'"></h5>
</div>
</div>
<!--properties format-->
<table class="table table-bordered table-striped text-center table-hover"
style="margin-top: 5px;" ng-if="namespace.isPropertiesFormat">
<thead>
<tr>
<th>
{{'Component.Namespace.Master.Items.Body.HistoryView.ItemType' | translate }}
</th>
<th>
{{'Component.Namespace.Master.Items.Body.HistoryView.ItemKey' | translate }}
</th>
<th>
{{'Component.Namespace.Master.Items.Body.HistoryView.ItemOldValue' | translate }}
</th>
<th>
{{'Component.Namespace.Master.Items.Body.HistoryView.ItemNewValue' | translate }}
</th>
<th>
{{'Component.Namespace.Master.Items.Body.HistoryView.ItemComment' | translate }}
</th>
</tr>
</thead>
<tbody>
<!--兼容老数据,不显示item类型为空行和注释的item-->
<tr ng-repeat="item in commits.changeSets.createItems" ng-show="item.key">
<td width="6%">
{{'Component.Namespace.Master.Items.Body.HistoryView.NewAdded' | translate }}
</td>
<td width="20%" title="{{item.key}}">
<span ng-bind="item.key | limitTo: 250"></span>
<span ng-bind="item.key.length > 250 ? '...' :''"></span>
</td>
<td width="28%">
</td>
<td width="28%" class="cursor-pointer" title="{{item.value}}"
ng-click="showText(item.value)">
<span ng-bind="item.value | limitTo: 250"></span>
<span ng-bind="item.value.length > 250 ? '...': ''"></span>
</td>
<td width="18%" title="{{item.comment}}">
<span ng-bind="item.comment | limitTo: 250"></span>
<span ng-bind="item.comment.length > 250 ?'...' : ''"></span>
</td>
</tr>
<tr ng-repeat="item in commits.changeSets.updateItems">
<td width="6%">
{{'Component.Namespace.Master.Items.Body.HistoryView.Updated' | translate }}
</td>
<td width="20%" title="{{item.newItem.key}}">
<span ng-bind="item.newItem.key | limitTo: 250"></span>
<span ng-bind="item.newItem.key.length > 250 ? '...' :''"></span>
</td>
<td width="28%" class="cursor-pointer" title="{{item.oldItem.value}}"
ng-click="showText(item.oldItem.value)">
<span ng-bind="item.oldItem.value | limitTo: 250"></span>
<span ng-bind="item.oldItem.value.length > 250 ? '...': ''"></span>
</td>
<td width="28%" class="cursor-pointer" title="{{item.newItem.value}}"
ng-click="showText(item.newItem.value)">
<span ng-bind="item.newItem.value | limitTo: 250"></span>
<span ng-bind="item.newItem.value.length > 250 ? '...': ''"></span>
</td>
<td width="18%" title="{{item.newItem.comment}}">
<span ng-bind="item.newItem.comment | limitTo: 250"></span>
<span ng-bind="item.newItem.comment.length > 250 ?'...' : ''"></span>
</td>
</tr>
<tr ng-repeat="item in commits.changeSets.deleteItems"
ng-show="item.key || item.comment">
<td width="6%">
{{'Component.Namespace.Master.Items.Body.HistoryView.Deleted' | translate }}
</td>
<td width="20%" title="{{item.key}}">
<span ng-bind="item.key | limitTo: 250"></span>
<span ng-bind="item.key.length > 250 ? '...' :''"></span>
</td>
<td width="28%" title="{{item.value}}">
<span ng-bind="item.value | limitTo: 250"></span>
<span ng-bind="item.value.length > 250 ? '...': ''"></span>
</td>
<td width="28%">
</td>
<td width="18%" title="{{item.comment}}">
<span ng-bind="item.comment | limitTo: 250"></span>
<span ng-bind="item.comment.length > 250 ?'...' : ''"></span>
</td>
</tr>
</tbody>
</table>
<!--not properties format-->
<div ng-if="!namespace.isPropertiesFormat">
<div ng-repeat="item in commits.changeSets.createItems">
<textarea class="form-control no-radius" rows="20" ng-disabled="true"
ng-bind="item.value">
</textarea>
</div>
<div ng-repeat="item in commits.changeSets.updateItems">
<textarea class="form-control no-radius" rows="20" ng-disabled="true"
ng-bind="item.newItem.value">
</textarea>
</div>
</div>
</div>
<hr>
</div>
<div class="text-center">
<button type="button" class="btn btn-default" ng-show="!namespace.hasLoadAllCommit"
ng-click="loadCommitHistory(namespace)">{{'Component.Namespace.Master.Items.Body.HistoryView.LoadMore' | translate }}
<span class="glyphicon glyphicon-menu-down"></span></button>
</div>
<div class="empty-container text-center" ng-show="!namespace.commits || !namespace.commits.length">
{{'Component.Namespace.Master.Items.Body.HistoryView.NoHistory' | translate }}
</div>
</div>
<!--instance view-->
<div class="panel panel-default instance-view" ng-show="namespace.viewType == 'instance'">
<div class="panel-heading">
<div class="row">
<div class="col-md-5 col-sm-5">
<small>{{'Component.Namespace.Master.Items.Body.Instance.Tips' | translate }}</small>
</div>
<div class="col-md-7 col-sm-7 text-right">
<div class="btn-group btn-group-sm" role="group">
<button type="button" class="btn btn-default"
ng-class="{'btn-primary':namespace.instanceViewType == 'latest_release'}"
ng-click="switchInstanceViewType(namespace, 'latest_release')">
{{'Component.Namespace.Master.Items.Body.Instance.UsedNewItem' | translate }}
<span class="badge" ng-bind="namespace.latestReleaseInstances.total"></span>
</button>
<button type="button" class="btn btn-default"
ng-class="{'btn-primary':namespace.instanceViewType == 'not_latest_release'}"
ng-click="switchInstanceViewType(namespace, 'not_latest_release')">{{'Component.Namespace.Master.Items.Body.Instance.NoUsedNewItem' | translate }}
<span class="badge"
ng-bind="namespace.instancesCount - namespace.latestReleaseInstances.total"></span>
</button>
<button type="button" class="btn btn-default"
ng-class="{'btn-primary':namespace.instanceViewType == 'all'}"
ng-click="switchInstanceViewType(namespace, 'all')">{{'Component.Namespace.Master.Items.Body.Instance.AllInstance' | translate }}
<span class="badge" ng-bind="namespace.instancesCount"></span>
</button>
</div>
<button class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.Instance.RefreshList' | translate }}"
ng-click="refreshInstancesInfo(namespace)">
<img ng-src="{{ '/img/refresh.png' | prefixPath }}" />
</button>
</div>
</div>
</div>
<!--latest release instances-->
<div class="panel-body" ng-show="namespace.instanceViewType == 'latest_release'">
<div class="panel-default" ng-if="namespace.latestReleaseInstances.total > 0">
<div class="panel-heading">
<a target="_blank" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.Instance.ToSeeItem' | translate }}"
ng-href="{{ '/config/history.html' | prefixPath }}?#/appid={{appId}}&env={{env}}&clusterName={{cluster}}&namespaceName={{namespace.baseInfo.namespaceName}}&releaseId={{namespace.latestRelease.id}}">
{{namespace.latestRelease.name}}
</a>
</div>
<table class="table table-bordered table-striped">
<thead>
<tr>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemAppId' | translate }}</td>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemCluster' | translate }}
</td>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemDataCenter' | translate }}
</td>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemIp' | translate }}</td>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemGetTime' | translate }}
</td>
</tr>
</thead>
<tbody>
<tr ng-repeat="instance in namespace.latestReleaseInstances.content">
<td width="20%" ng-bind="instance.appId"></td>
<td width="20%" ng-bind="instance.clusterName"></td>
<td width="20%" ng-bind="instance.dataCenter"></td>
<td width="20%" ng-bind="instance.ip"></td>
<td width="20%">{{instance.configs && instance.configs.length ?
(instance.configs[0].releaseDeliveryTime | date: 'yyyy-MM-dd HH:mm:ss') : ''}}
</td>
</tr>
</tbody>
</table>
<div class="row text-center"
ng-show="namespace.latestReleaseInstances.content.length < namespace.latestReleaseInstances.total">
<button class="btn btn-default"
ng-click="loadInstanceInfo(namespace)">{{'Component.Namespace.Master.Items.Body.Instance.LoadMore' | translate }}</button>
</div>
</div>
<div class="text-center" ng-if="namespace.latestReleaseInstances.total == 0">
{{'Component.Namespace.Master.Items.Body.Instance.NoInstanceTips' | translate }}
</div>
</div>
<!--not latest release instances-->
<div class="panel-body" ng-show="namespace.instanceViewType == 'not_latest_release'">
<div class="panel-default"
ng-if="namespace.instancesCount - namespace.latestReleaseInstances.total > 0"
ng-repeat="release in namespace.notLatestReleases">
<div class="panel-heading">
<a target="_blank" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.Instance.ToSeeItem' | translate }}"
href="{{ '/config/history.html' | prefixPath }}?#/appid={{appId}}&env={{env}}&clusterName={{cluster}}&namespaceName={{namespace.baseInfo.namespaceName}}&releaseId={{release.id}}">
{{release.name}}
</a>
</div>
<table class="table table-bordered table-striped">
<thead>
<tr>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemAppId' | translate }}</td>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemCluster' | translate }}
</td>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemDataCenter' | translate }}
</td>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemIp' | translate }}</td>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemGetTime' | translate }}
</td>
</tr>
</thead>
<tbody>
<tr ng-repeat="instance in namespace.notLatestReleaseInstances[release.id]">
<td width="20%" ng-bind="instance.appId"></td>
<td width="20%" ng-bind="instance.clusterName"></td>
<td width="20%" ng-bind="instance.dataCenter"></td>
<td width="20%" ng-bind="instance.ip"></td>
<td width="20%">{{instance.configs && instance.configs.length ?
(instance.configs[0].releaseDeliveryTime | date: 'yyyy-MM-dd HH:mm:ss') : ''}}
</td>
</tr>
</tbody>
</table>
</div>
<div class="text-center"
ng-if="namespace.instancesCount - namespace.latestReleaseInstances.total == 0">
{{'Component.Namespace.Master.Items.Body.Instance.NoInstanceTips' | translate }}
</div>
</div>
<!--all instances-->
<div class="panel-body" ng-show="namespace.instanceViewType == 'all'">
<div class="panel-default" ng-if="namespace.instancesCount > 0">
<table class="table table-bordered table-striped" ng-if="namespace.allInstances">
<thead>
<tr>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemAppId' | translate }}</td>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemCluster' | translate }}
</td>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemDataCenter' | translate }}
</td>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemIp' | translate }}</td>
</tr>
</thead>
<tbody>
<tr ng-repeat="instance in namespace.allInstances">
<td width="25%" ng-bind="instance.appId"></td>
<td width="25%" ng-bind="instance.clusterName"></td>
<td width="25%" ng-bind="instance.dataCenter"></td>
<td width="25%" ng-bind="instance.ip"></td>
</tr>
</tbody>
</table>
<div class="row text-center" ng-show="namespace.allInstances.length < namespace.instancesCount">
<button class="btn btn-default"
ng-click="loadInstanceInfo(namespace)">{{'Component.Namespace.Master.Items.Body.Instance.LoadMore' | translate }}</button>
</div>
</div>
<div class="text-center" ng-if="namespace.instancesCount == 0">
{{'Component.Namespace.Master.Items.Body.Instance.NoInstanceTips' | translate }}
</div>
</div>
</div>
</section>
</div>
</section> | <!--
~ Copyright 2021 Apollo Authors
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<!--master panel body when not initialized-->
<section class="master-panel-body" ng-if="!namespace.initialized">
<!--main header-->
<header class="panel-heading">
<div class="row">
<div class="col-md-6 col-sm-6 header-namespace">
<b class="namespace-name" ng-bind="namespace.viewName"
data-tooltip="tooltip" data-placement="bottom" title="{{namespace.comment}}"></b>
<span class="label label-warning no-radius namespace-label modify-tip"
ng-show="namespace.itemModifiedCnt > 0">
{{'Component.Namespace.Master.Items.Changed' | translate }}
<span class="badge label badge-white namespace-label" ng-bind="namespace.itemModifiedCnt"></span>
</span>
</div>
<div class="col-md-6 col-sm-6 text-right header-buttons">
<button type="button" class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.LoadNamespaceTips' | translate }}"
ng-click="refreshNamespace()">
<img src="img/more.png">
{{'Component.Namespace.Master.LoadNamespace' | translate }}
</button>
</div>
</div>
</header>
</section>
<!--master panel body-->
<section class="master-panel-body" ng-if="namespace.initialized &&
(namespace.hasBranch && namespace.displayControl.currentOperateBranch == 'master' || !namespace.hasBranch)">
<!--main header-->
<header class="panel-heading">
<div class="row">
<div class="col-md-6 col-sm-6 header-namespace">
<b class="namespace-name" ng-bind="namespace.viewName"
data-tooltip="tooltip" data-placement="bottom" title="{{namespace.comment}}"></b>
<span class="label label-warning no-radius namespace-label modify-tip"
ng-show="namespace.itemModifiedCnt > 0">
{{'Component.Namespace.Master.Items.Changed' | translate }}
<span class="badge label badge-white namespace-label" ng-bind="namespace.itemModifiedCnt"></span>
</span>
<span class="label label-primary no-radius namespace-label"
ng-show="namespace.lockOwner">{{'Component.Namespace.Master.Items.ChangedUser' | translate }}:{{namespace.lockOwner}}</span>
</div>
<div class="col-md-6 col-sm-6 text-right header-buttons">
<button type="button" class="btn btn-success btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.PublishTips' | translate }}"
ng-show="(namespace.hasReleasePermission || namespace.hasModifyPermission)"
ng-disabled="namespace.isTextEditing" ng-click="publish(namespace)">
<img src="img/release.png">
{{'Component.Namespace.Master.Items.Publish' | translate }}
</button>
<button type="button" class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.RollbackTips' | translate }}"
ng-show="namespace.hasReleasePermission" ng-click="rollback(namespace)">
<img src="img/rollback.png">
{{'Component.Namespace.Master.Items.Rollback' | translate }}
</button>
<a type="button" class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.PublishHistoryTips' | translate }}"
href="{{ '/config/history.html' | prefixPath }}?#/appid={{appId}}&env={{env}}&clusterName={{cluster}}&namespaceName={{namespace.baseInfo.namespaceName}}">
<img src="img/release-history.png">
{{'Component.Namespace.Master.Items.PublishHistory' | translate }}
</a>
<a type="button" class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.GrantTips' | translate }}"
href="{{ '/namespace/role.html' | prefixPath }}?#/appid={{appId}}&namespaceName={{namespace.baseInfo.namespaceName}}"
ng-show="hasAssignUserPermission">
<img src="img/assign.png">
{{'Component.Namespace.Master.Items.Grant' | translate }}
</a>
<a type="button" class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.GrayscaleTips' | translate }}"
ng-show="!namespace.hasBranch && namespace.isPropertiesFormat && namespace.hasModifyPermission"
ng-click="preCreateBranch(namespace)">
<img src="img/test.png">
{{'Component.Namespace.Master.Items.Grayscale' | translate }}
</a>
<a type="button" class="btn btn-default btn-sm J_tableview_btn" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Master.Items.RequestPermissionTips' | translate }}"
ng-click="showNoModifyPermissionDialog()"
ng-show="!namespace.hasModifyPermission && !namespace.hasReleasePermission">
{{'Component.Namespace.Master.Items.RequestPermission' | translate }}
</a>
<div class="btn-group"
ng-show="namespace.hasModifyPermission || namespace.hasReleasePermission || hasAssignUserPermission">
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<img src="img/operate.png"> <span class="caret"></span>
</button>
<ul class="dropdown-menu" style="right: 0; left: -160px;">
<li ng-click="deleteNamespace(namespace)">
<a style="color: red">
<img src="img/delete.png">
{{'Component.Namespace.Master.Items.DeleteNamespace' | translate }}</a>
</li>
</ul>
</div>
</div>
</div>
</header>
<div id="BODY{{namespace.id}}" ng-class="{'collapse in': showNamespaceBody, 'collapse' : !showNamespaceBody}">
<div class="J_namespace-release-tip well well-sm no-radius text-center" ng-show="namespace.isConfigHidden">
<span style="color: red">{{'Component.Namespace.Master.Items.NoPermissionTips' | translate }}</span>
</div>
<!--second header-->
<header class="panel-heading second-panel-heading" ng-show="!namespace.isConfigHidden">
<div class="row">
<div class="col-md-6 col-sm-6 pull-left">
<!--master branch nav tabs-->
<ul class="nav nav-tabs">
<li role="presentation" ng-click="switchView(namespace, 'table')"
ng-show="namespace.isPropertiesFormat">
<a ng-class="{node_active:namespace.viewType == 'table'}">
<img src="img/table.png">
{{'Component.Namespace.Master.Items.ItemList' | translate }}
</a>
</li>
<li role="presentation" ng-click="switchView(namespace, 'text')">
<a ng-class="{node_active:namespace.viewType == 'text'}">
<img src="img/text.png">
{{'Component.Namespace.Master.Items.ItemListByText' | translate }}
</a>
</li>
<li role="presentation" ng-click="switchView(namespace, 'history')">
<a ng-class="{node_active:namespace.viewType == 'history'}">
<img src="img/change.png">
{{'Component.Namespace.Master.Items.ItemHistory' | translate }}
</a>
</li>
<li role="presentation" ng-click="switchView(namespace, 'instance')">
<a ng-class="{node_active:namespace.viewType == 'instance'}">
<img src="img/machine.png">
{{'Component.Namespace.Master.Items.ItemInstance' | translate }}
<span class="badge badge-grey" ng-bind="namespace.instancesCount"></span>
</a>
</li>
</ul>
</div>
<div class="col-md-6 col-sm-6 text-right">
<img src="img/copy.png" class="ns_btn clipboard cursor-pointer"
data-clipboard-text="{{namespace.text}}" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.CopyText' | translate }}"
ng-show="!namespace.isTextEditing && namespace.viewType == 'text' && namespace.hasModifyPermission">
<img src="img/syntax.png" class="ns_btn cursor-pointer" data-tooltip="tooltip"
data-placement="bottom" title="{{'Component.Namespace.Master.Items.GrammarCheck' | translate }}"
ng-show="namespace.isTextEditing && namespace.viewType == 'text' && namespace.isSyntaxCheckable"
ng-click="syntaxCheck(namespace)">
<img src="img/cancel.png" class="ns_btn cursor-pointer" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Master.Items.CancelChanged' | translate }}"
ng-show="namespace.isTextEditing && namespace.viewType == 'text'"
ng-click="toggleTextEditStatus(namespace)">
<img src="img/edit.png" class="ns_btn cursor-pointer" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Change' | translate }}"
ng-show="!namespace.isTextEditing && namespace.viewType == 'text' && namespace.hasModifyPermission"
ng-click="toggleTextEditStatus(namespace)">
<img src="img/submit.png" class="ns_btn cursor-pointer" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Master.Items.SummitChanged' | translate }}" data-toggle="modal"
data-target="#commitModal" ng-show="namespace.isTextEditing && namespace.viewType == 'text'"
ng-click="modifyByText(namespace)">
<button type="button" class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.SortByKey' | translate }}" ng-show="namespace.viewType == 'table' && namespace.displayControl.currentOperateBranch == 'master'
&& !namespace.isLinkedNamespace" ng-click="toggleItemSearchInput(namespace)">
<span class="glyphicon glyphicon-filter"></span>
{{'Component.Namespace.Master.Items.FilterItem' | translate }}
</button>
<button type="button" class="btn btn-default btn-sm J_tableview_btn" data-tooltip="tooltip"
data-placement="bottom" title="{{'Component.Namespace.Master.Items.SyncItemTips' | translate }}"
ng-click="goToSyncPage(namespace)" ng-show="namespace.viewType == 'table' && namespace.displayControl.currentOperateBranch == 'master'
&& namespace.hasModifyPermission && namespace.isPropertiesFormat">
<img src="img/sync.png">
{{'Component.Namespace.Master.Items.SyncItem' | translate }}
</button>
<button type="button" class="btn btn-default btn-sm J_tableview_btn" data-tooltip="tooltip"
data-placement="bottom" title="{{'Component.Namespace.Master.Items.RevokeItemTips' | translate }}"
ng-click="preRevokeItem(namespace)" ng-show="namespace.viewType == 'table' && namespace.displayControl.currentOperateBranch == 'master'
&& namespace.hasModifyPermission && namespace.isPropertiesFormat">
<img src="img/rollback.png">
{{'Component.Namespace.Master.Items.RevokeItem' | translate }}
</button>
<button type="button" class="btn btn-default btn-sm J_tableview_btn" data-tooltip="tooltip"
data-placement="bottom" title="{{'Component.Namespace.Master.Items.DiffItemTips' | translate }}"
ng-click="goToDiffPage(namespace)" ng-show="namespace.viewType == 'table' && namespace.displayControl.currentOperateBranch == 'master'
&& namespace.isPropertiesFormat">
<img src="img/diff.png">
{{'Component.Namespace.Master.Items.DiffItem' | translate }}
</button>
<button type="button" class="btn btn-primary btn-sm" ng-show="!namespace.isLinkedNamespace
&& namespace.viewType == 'table'
&& namespace.displayControl.currentOperateBranch == 'master'
&& namespace.hasModifyPermission" ng-click="createItem(namespace)">
<img src="img/plus.png">
{{'Component.Namespace.Master.Items.AddItem' | translate }}
</button>
</div>
</div>
</header>
<!--namespace body-->
<section ng-show="!namespace.isConfigHidden">
<!--table view-->
<div class="namespace-view-table" ng-show="namespace.viewType == 'table'">
<div class="J_namespace-release-tip well well-sm no-radius text-center"
ng-show="namespace.isLatestReleaseLoaded && !namespace.isLinkedNamespace && !namespace.latestRelease">
<span style="color: red">
{{'Component.Namespace.Master.Items.Body.ItemsNoPublishedTips' | translate }}</span>
</div>
<!--not link namespace-->
<div ng-if="!namespace.isLinkedNamespace">
<div class="search-input" ng-show="namespace.displayControl.showSearchInput">
<input type="text" class="form-control"
placeholder="{{'Component.Namespace.Master.Items.Body.FilterByKey' | translate }}"
ng-model="namespace.searchKey" ng-change="searchItems(namespace)">
</div>
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th class="hover" title="{{'Component.Namespace.Master.Items.Body.Sort' | translate }}"
ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
{{'Component.Namespace.Master.Items.Body.PublishState' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th class="hover" title="{{'Component.Namespace.Master.Items.Body.Sort' | translate }}"
ng-click="col='item.key';desc=!desc;">
{{'Component.Namespace.Master.Items.Body.ItemKey' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
{{'Component.Namespace.Master.Items.Body.ItemValue' | translate }}
</th>
<th>
{{'Component.Namespace.Master.Items.Body.ItemComment' | translate }}
</th>
<th class="hover" title="{{'Component.Namespace.Master.Items.Body.Sort' | translate }}"
ng-click="col='item.dataChangeLastModifiedBy';desc=!desc;">
{{'Component.Namespace.Master.Items.Body.ItemLastModify' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th class="hover" title="{{'Component.Namespace.Master.Items.Body.Sort' | translate }}"
ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
{{'Component.Namespace.Master.Items.Body.ItemLastModifyTime' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
{{'Component.Namespace.Master.Items.Body.ItemOperator' | translate }}
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="config in namespace.viewItems |orderBy:col:desc" ng-if="config.item.key"
ng-class="{'warning': !config.item.value}">
<td width="8%" class="text-center">
<span class="label label-warning no-radius cursor-pointer" ng-if="config.isModified"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.NoPublishTitle' | translate }}"
ng-click="showText(config.oldValue?config.oldValue:('Component.Namespace.Master.Items.Body.NoPublishTips' | translate))">{{'Component.Namespace.Master.Items.Body.NoPublish' | translate }}</span>
<span class="label label-default-light no-radius" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.PublishedTitle' | translate }}"
ng-if="!config.isModified">{{'Component.Namespace.Master.Items.Body.Published' | translate }}</span>
</td>
<td width="15%" class="cursor-pointer"
title="{{'Component.Namespace.Master.Items.Body.ClickToSee' | translate }}"
ng-click="showText(config.item.key)">
<span ng-bind="config.item.key | limitTo: 250"></span>
<span ng-bind="config.item.key.length > 250 ? '...' :''"></span>
<span class="label label-default cursor-pointer" ng-if="config.hasBranchValue"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.HaveGrayscale' | translate }}"
ng-click="namespace.displayControl.currentOperateBranch=namespace.branchName;namespace.branch.viewType='table'">{{'Component.Namespace.Master.Items.Body.Grayscale' | translate }}</span>
<span class="label label-success" ng-if="config.isModified && !config.oldValue"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.NewAddedTips' | translate }}">{{'Component.Namespace.Master.Items.Body.NewAdded' | translate }}</span>
<span class="label label-info"
ng-if="config.isModified && config.oldValue && !config.isDeleted"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.ModifiedTips' | translate }}">{{'Component.Namespace.Master.Items.Body.Modified' | translate }}</span>
<span class="label label-danger" ng-if="config.isDeleted" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.DeletedTips' | translate }}">{{'Component.Namespace.Master.Items.Body.Deleted' | translate }}</span>
</td>
<td width="30%" class="cursor-pointer"
title="{{'Component.Namespace.Master.Items.Body.ClickToSee' | translate }}"
ng-click="showText(config.item.value)">
<span ng-bind="config.item.value | limitTo: 250"></span>
<span ng-bind="config.item.value.length > 250 ? '...': ''"></span>
</td>
<td width="13%" title="{{config.item.comment}}">
<span ng-bind="config.item.comment | limitTo: 250"></span>
<span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span>
</td>
<td width="10%" ng-bind="config.item.dataChangeLastModifiedByDisplayName + '(' + config.item.dataChangeLastModifiedBy + ')'">
</td>
<td width="16%"
ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'">
</td>
<td width="8%" class="text-center" ng-if="!config.isDeleted">
<img src="img/edit.png" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.ModifyTips' | translate }}"
ng-click="editItem(namespace, config.item)"
ng-show="namespace.hasModifyPermission">
<img style="margin-left: 5px;" src="img/cancel.png" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.DeleteTips' | translate }}"
ng-click="preDeleteItem(namespace, config.item)"
ng-show="namespace.hasModifyPermission">
</td>
<td width="6%" class="text-center" ng-if="config.isDeleted">
</td>
</tr>
</tbody>
</table>
</div>
<!--link namespace-->
<div class="panel panel-default" ng-if="namespace.isLinkedNamespace">
<div class="panel-heading">
<div class="row">
<div class="padding-top-5 col-md-4 col-sm-4">
{{'Component.Namespace.Master.Items.Body.Link.Title' | translate }}
</div>
<div class="col-md-8 col-sm-8">
<input type="text" class="form-control pull-right" placeholder="filter by key ..."
ng-class="{'search-onblur': namespace.searchStatus == 'OFF' || !namespace.searchStatus,
'search-focus': namespace.searchStatus == 'ON'}" ng-model="namespace.searchKey"
ng-change="searchItems(namespace)" ng-focus="namespace.searchStatus='ON'"
ng-blur="namespace.searchStatus='OFF'">
</div>
</div>
</div>
<table class="table table-bordered table-striped table-hover"
ng-if="namespace.viewItems && namespace.viewItems.length">
<thead>
<tr>
<th>{{'Component.Namespace.Master.Items.Body.PublishState' | translate }}</th>
<th class="hover" title="{{'Component.Namespace.Master.Items.Body.Sort' | translate }}"
ng-click="col='item.key';desc=!desc;">
{{'Component.Namespace.Master.Items.Body.ItemKey' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
{{'Component.Namespace.Master.Items.Body.ItemValue' | translate }}
</th>
<th>
{{'Component.Namespace.Master.Items.Body.ItemComment' | translate }}
</th>
<th class="hover" title="{{'Component.Namespace.Master.Items.Body.Sort' | translate }}"
ng-click="col='item.dataChangeLastModifiedBy';desc=!desc;">
{{'Component.Namespace.Master.Items.Body.ItemLastModify' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th class="hover" title="{{'Component.Namespace.Master.Items.Body.Sort' | translate }}"
ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
{{'Component.Namespace.Master.Items.Body.ItemLastModifyTime' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
{{'Component.Namespace.Master.Items.Body.ItemOperator' | translate }}
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="config in namespace.viewItems |orderBy:col:desc" ng-if="config.item.key">
<td width="8%" class="text-center">
<span class="label label-warning no-radius cursor-pointer" ng-if="config.isModified"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.NoPublishTitle' | translate }}"
ng-click="showText(config.oldValue?config.oldValue:('Component.Namespace.Master.Items.Body.NoPublishTips' | translate))">{{'Component.Namespace.Master.Items.Body.NoPublish' | translate }}</span>
<span class="label label-default-light no-radius" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.PublishedTitle' | translate }}"
ng-if="!config.isModified">{{'Component.Namespace.Master.Items.Body.Published' | translate }}</span>
</td>
<td width="15%" class="cursor-pointer"
title="{{'Component.Namespace.Master.Items.Body.ClickToSee' | translate }}"
ng-click="showText(config.item.key)">
<span ng-bind="config.item.key | limitTo: 250"></span>
<span ng-bind="config.item.key.length > 250 ? '...' :''"></span>
<span class="label label-default cursor-pointer" ng-if="config.hasBranchValue"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.HaveGrayscale' | translate }}"
ng-click="namespace.displayControl.currentOperateBranch=namespace.branchName;namespace.branch.viewType='table'">{{'Component.Namespace.Master.Items.Body.Grayscale' | translate }}</span>
<span class="label label-success" ng-if="config.isModified && !config.oldValue"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.NewAddedTips' | translate }}">{{'Component.Namespace.Master.Items.Body.NewAdded' | translate }}</span>
<span class="label label-info"
ng-if="config.isModified && config.oldValue && !config.isDeleted"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.ModifiedTips' | translate }}">{{'Component.Namespace.Master.Items.Body.Modified' | translate }}</span>
<span class="label label-danger" ng-if="config.isDeleted" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.DeletedTips' | translate }}">{{'Component.Namespace.Master.Items.Body.Deleted' | translate }}</span>
</td>
<td width="30%" class="cursor-pointer"
title="{{'Component.Namespace.Master.Items.Body.ClickToSee' | translate }}"
ng-click="showText(config.item.value)">
<span ng-bind="config.item.value | limitTo: 250"></span>
<span ng-bind="config.item.value.length > 250 ? '...': ''"></span>
</td>
<td width="13%" title="{{config.item.comment}}">
<span ng-bind="config.item.comment | limitTo: 250"></span>
<span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span>
</td>
<td width="10%" ng-bind="config.item.dataChangeLastModifiedByDisplayName + '(' + config.item.dataChangeLastModifiedBy + ')'">
</td>
<td width="16%"
ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'">
</td>
<td width="8%" class="text-center" ng-if="!config.isDeleted">
<img src="img/edit.png" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.ModifyTips' | translate }}"
ng-click="editItem(namespace, config.item)"
ng-show="namespace.hasModifyPermission">
<img style="margin-left: 5px;" src="img/cancel.png" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.DeleteTips' | translate }}"
ng-click="preDeleteItem(namespace, config.item)"
ng-show="namespace.hasModifyPermission">
</td>
<td width="6%" class="text-center" ng-if="config.isDeleted">
</td>
</tr>
</tbody>
</table>
<div class="text-center no-config-panel"
ng-if="!namespace.viewItems || !namespace.viewItems.length">
<h5>{{'Component.Namespace.Master.Items.Body.Link.NoCoverLinkItem' | translate }}</h5>
</div>
</div>
<!--link namespace's public namespace-->
<div ng-if="namespace.isLinkedNamespace">
<div class="panel panel-default" ng-if="namespace.publicNamespace">
<div class="panel-heading">
<div class="row">
<div class="padding-top-5 col-md-4 col-sm-4">
{{'Component.Namespace.Master.Items.Body.Public.Title' | translate }}
<a href="{{ '/config.html' | prefixPath }}?#/appid={{namespace.publicNamespace.baseInfo.appId}}&env={{env}}&cluster={{namespace.publicNamespace.baseInfo.clusterName}}"
target="_blank">
<small>
({{'Common.AppId' | translate }}:{{namespace.publicNamespace.baseInfo.appId}},
{{'Common.Cluster' | translate }}:{{namespace.publicNamespace.baseInfo.clusterName}})
</small>
</a>
</div>
<div class="col-md-4 col-sm-4 text-center">
<div class="btn-group btn-group-sm" role="group"
ng-show="namespace.publicNamespace.isModified">
<button type="button" class="btn btn-default" ng-class="{'active':namespace.publicNamespaceViewType == 'RELEASE'
|| !namespace.publicNamespaceViewType}"
ng-click="namespace.publicNamespaceViewType = 'RELEASE'">
{{'Component.Namespace.Master.Items.Body.Public.Published' | translate }}
</button>
<button type="button" class="btn btn-default"
ng-class="{'active':namespace.publicNamespaceViewType == 'NOT_RELEASE'}"
ng-click="namespace.publicNamespaceViewType = 'NOT_RELEASE'">
{{'Component.Namespace.Master.Items.Body.Public.NoPublish' | translate }}
</button>
</div>
</div>
<div class="col-md-4 col-sm-4">
<input type="text" class="form-control pull-right" placeholder="filter by key ..."
ng-class="{'search-onblur': namespace.publicNamespace.searchStatus == 'OFF'
|| !namespace.publicNamespace.searchStatus,
'search-focus': namespace.publicNamespace.searchStatus == 'ON'}"
ng-model="namespace.publicNamespace.searchKey"
ng-change="searchItems(namespace.publicNamespace)"
ng-blur="namespace.publicNamespace.searchStatus='OFF'"
ng-focus="namespace.publicNamespace.searchStatus='ON'" />
</div>
</div>
</div>
<!--published items-->
<div
ng-show="!namespace.publicNamespaceViewType || namespace.publicNamespaceViewType == 'RELEASE'">
<table class="table table-bordered table-striped table-hover"
ng-show="namespace.publicNamespace.hasPublishedItem">
<thead>
<tr>
<th class="hover"
title="{{'Component.Namespace.Master.Items.Body.Sort' | translate }}"
ng-click="col='item.key';desc=!desc;">
{{'Component.Namespace.Master.Items.Body.ItemKey' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
{{'Component.Namespace.Master.Items.Body.ItemValue' | translate }}
</th>
<th>
{{'Component.Namespace.Master.Items.Body.ItemComment' | translate }}
</th>
<th class="hover"
title="{{'Component.Namespace.Master.Items.Body.Sort' | translate }}"
ng-click="col='item.dataChangeLastModifiedBy';desc=!desc;">
{{'Component.Namespace.Master.Items.Body.ItemLastModify' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th class="hover"
title="{{'Component.Namespace.Master.Items.Body.Sort' | translate }}"
ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
{{'Component.Namespace.Master.Items.Body.ItemLastModifyTime' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
{{'Component.Namespace.Master.Items.Body.ItemOperator' | translate }}
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="config in namespace.publicNamespace.viewItems |orderBy:col:desc"
ng-if="config.item.key && !config.isModified && !config.isDeleted">
<td width="15%" class="cursor-pointer"
title="{{'Component.Namespace.Master.Items.Body.ClickToSee' | translate }}"
ng-click="showText(config.item.key)">
<span ng-bind="config.item.key | limitTo: 250"></span>
<span ng-bind="config.item.key.length > 250 ? '...' :''"></span>
</td>
<td width="35%" class="cursor-pointer"
title="{{'Component.Namespace.Master.Items.Body.ClickToSee' | translate }}"
ng-click="showText(config.item.value)">
<span ng-bind="config.item.value | limitTo: 250"></span>
<span ng-bind="config.item.value.length > 250 ? '...': ''"></span>
</td>
<td width="15%" title="{{config.item.comment}}">
<span ng-bind="config.item.comment | limitTo: 250"></span>
<span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span>
</td>
<td width="10%" ng-bind="config.item.dataChangeLastModifiedByDisplayName + '(' + config.item.dataChangeLastModifiedBy + ')'">
</td>
<td width="15%"
ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'">
</td>
<td width="10%" class="text-center" ng-if="!config.isDeleted">
<img src="img/gray.png" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.Public.PublishedAndCover' | translate }}"
ng-click="editItem(namespace, config.item)"
ng-show="namespace.hasModifyPermission && !config.covered">
</td>
<td width="6%" class="text-center" ng-if="config.isDeleted">
</td>
</tr>
</tbody>
</table>
<div class="text-center no-config-panel" ng-if="namespace.publicNamespace.viewItems
&& namespace.publicNamespace.viewItems.length
&& !namespace.publicNamespace.hasPublishedItem">
<h5>{{'Component.Namespace.Master.Items.Body.Public.NoPublished' | translate }}</h5>
</div>
</div>
<!--not published items-->
<table class="table table-bordered table-striped table-hover"
ng-show="namespace.publicNamespaceViewType == 'NOT_RELEASE'">
<thead>
<tr>
<th class="hover"
title="{{'Component.Namespace.Master.Items.Body.Sort' | translate }}"
ng-click="col='item.key';desc=!desc;">
{{'Component.Namespace.Master.Items.Body.ItemKey' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
{{'Component.Namespace.Master.Items.Body.NoPublished.PublishedValue' | translate }}
</th>
<th>
{{'Component.Namespace.Master.Items.Body.NoPublished.NoPublishedValue' | translate }}
</th>
<th>
{{'Component.Namespace.Master.Items.Body.ItemComment' | translate }}
</th>
<th class="hover"
title="{{'Component.Namespace.Master.Items.Body.Sort' | translate }}"
ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
{{'Component.Namespace.Master.Items.Body.ItemLastModifyTime' | translate }}
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
{{'Component.Namespace.Master.Items.Body.ItemOperator' | translate }}
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="config in namespace.publicNamespace.viewItems |orderBy:col:desc"
ng-if="config.item.key && (config.isModified || config.isDeleted)">
<td width="20%" class="cursor-pointer"
title="{{'Component.Namespace.Master.Items.Body.ClickToSee' | translate }}"
ng-click="showText(config.item.key)">
<span ng-bind="config.item.key | limitTo: 250"></span>
<span ng-bind="config.item.key.length > 250 ? '...' :''"></span>
<span class="label label-success" ng-if="config.isModified && !config.oldValue"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.NewAddedTips' | translate }}">{{'Component.Namespace.Master.Items.Body.NewAdded' | translate }}</span>
<span class="label label-info"
ng-if="config.isModified && config.oldValue && !config.isDeleted"
data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.ModifiedTips' | translate }}">{{'Component.Namespace.Master.Items.Body.Modified' | translate }}</span>
<span class="label label-danger" ng-if="config.isDeleted" data-tooltip="tooltip"
data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.DeletedTips' | translate }}">{{'Component.Namespace.Master.Items.Body.Deleted' | translate }}</span>
</td>
<td width="25%" class="cursor-pointer"
title="{{'Component.Namespace.Master.Items.Body.ClickToSee' | translate }}"
ng-click="showText(config.oldValue)">
<span ng-bind="config.oldValue | limitTo: 250"></span>
<span ng-bind="config.oldValue.length > 250 ? '...': ''"></span>
</td>
<td width="25%" class="cursor-pointer"
title="{{'Component.Namespace.Master.Items.Body.ClickToSee' | translate }}"
ng-click="showText(config.item.value)">
<span ng-bind="config.item.value | limitTo: 250"></span>
<span ng-bind="config.item.value.length > 250 ? '...': ''"></span>
</td>
<td width="10%" title="{{config.item.comment}}">
<span ng-bind="config.item.comment | limitTo: 250"></span>
<span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span>
</td>
<td width="15%"
ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'">
</td>
<td width="5%" class="text-center" ng-if="!config.isDeleted">
<img src="img/gray.png" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.Public.PublishedAndCover' | translate }}"
ng-click="editItem(namespace, config.item)"
ng-show="namespace.hasModifyPermission && !config.covered">
</td>
</tr>
</tbody>
</table>
<div class="text-center no-config-panel"
ng-if="!namespace.publicNamespace.viewItems || !namespace.publicNamespace.viewItems.length">
<h5>{{'Component.Namespace.Master.Items.Body.NoPublished.Title' | translate }}</h5>
</div>
</div>
<div class="panel panel-default" ng-if="!namespace.publicNamespace">
<div class="panel-heading">
{{'Component.Namespace.Master.Items.Body.Public.Title' | translate }}
</div>
<div class="panel-body text-center">
{{'Component.Namespace.Master.Items.Body.Public.NoPublicNamespaceTips1' | translate }}
<a href="{{ '/config.html' | prefixPath }}?#/appid={{namespace.parentAppId}}"
target="_blank">{{namespace.parentAppId}}</a>
{{'Component.Namespace.Master.Items.Body.Public.NoPublicNamespaceTips2' | translate:this }}
</div>
</div>
</div>
</div>
<!--text view-->
<!--只读模式下的文本内容,不替换换行符-->
<div ui-ace="aceConfig" readonly="true" class="form-control no-radius"
rows="{{namespace.itemCnt < 10 ? 10: namespace.itemCnt>20 ? 20:namespace.itemCnt}}"
ng-show="namespace.viewType == 'text' && !namespace.isTextEditing" ng-model="namespace.text">
</div>
<!--编辑状态下的文本内容,会过滤掉换行符-->
<div ui-ace="aceConfig" class="form-control no-radius"
rows="{{namespace.itemCnt < 10 ? 10: namespace.itemCnt>20 ? 20:namespace.itemCnt}}"
ng-show="namespace.viewType == 'text' && namespace.isTextEditing" ng-disabled="!namespace.isTextEditing"
ng-model="namespace.editText">
</div>
<!--history view-->
<div class="J_historyview history-view" ng-show="namespace.viewType == 'history'">
<div class="media" ng-show="namespace.commits && namespace.commits.length"
ng-repeat="commits in namespace.commits">
<div class="media-body">
<div class="row">
<div class="col-md-6 col-sm-6">
<h3 class="media-heading"
ng-bind="commits.dataChangeCreatedByDisplayName + '(' + commits.dataChangeCreatedBy + ')'"></h3>
</div>
<div class="col-md-6 col-sm-6 text-right">
<h5 class="media-heading"
ng-bind="commits.dataChangeCreatedTime | date: 'yyyy-MM-dd HH:mm:ss'"></h5>
</div>
</div>
<!--properties format-->
<table class="table table-bordered table-striped text-center table-hover"
style="margin-top: 5px;" ng-if="namespace.isPropertiesFormat">
<thead>
<tr>
<th>
{{'Component.Namespace.Master.Items.Body.HistoryView.ItemType' | translate }}
</th>
<th>
{{'Component.Namespace.Master.Items.Body.HistoryView.ItemKey' | translate }}
</th>
<th>
{{'Component.Namespace.Master.Items.Body.HistoryView.ItemOldValue' | translate }}
</th>
<th>
{{'Component.Namespace.Master.Items.Body.HistoryView.ItemNewValue' | translate }}
</th>
<th>
{{'Component.Namespace.Master.Items.Body.HistoryView.ItemComment' | translate }}
</th>
</tr>
</thead>
<tbody>
<!--兼容老数据,不显示item类型为空行和注释的item-->
<tr ng-repeat="item in commits.changeSets.createItems" ng-show="item.key">
<td width="6%">
{{'Component.Namespace.Master.Items.Body.HistoryView.NewAdded' | translate }}
</td>
<td width="20%" title="{{item.key}}">
<span ng-bind="item.key | limitTo: 250"></span>
<span ng-bind="item.key.length > 250 ? '...' :''"></span>
</td>
<td width="28%">
</td>
<td width="28%" class="cursor-pointer" title="{{item.value}}"
ng-click="showText(item.value)">
<span ng-bind="item.value | limitTo: 250"></span>
<span ng-bind="item.value.length > 250 ? '...': ''"></span>
</td>
<td width="18%" title="{{item.comment}}">
<span ng-bind="item.comment | limitTo: 250"></span>
<span ng-bind="item.comment.length > 250 ?'...' : ''"></span>
</td>
</tr>
<tr ng-repeat="item in commits.changeSets.updateItems">
<td width="6%">
{{'Component.Namespace.Master.Items.Body.HistoryView.Updated' | translate }}
</td>
<td width="20%" title="{{item.newItem.key}}">
<span ng-bind="item.newItem.key | limitTo: 250"></span>
<span ng-bind="item.newItem.key.length > 250 ? '...' :''"></span>
</td>
<td width="28%" class="cursor-pointer" title="{{item.oldItem.value}}"
ng-click="showText(item.oldItem.value)">
<span ng-bind="item.oldItem.value | limitTo: 250"></span>
<span ng-bind="item.oldItem.value.length > 250 ? '...': ''"></span>
</td>
<td width="28%" class="cursor-pointer" title="{{item.newItem.value}}"
ng-click="showText(item.newItem.value)">
<span ng-bind="item.newItem.value | limitTo: 250"></span>
<span ng-bind="item.newItem.value.length > 250 ? '...': ''"></span>
</td>
<td width="18%" title="{{item.newItem.comment}}">
<span ng-bind="item.newItem.comment | limitTo: 250"></span>
<span ng-bind="item.newItem.comment.length > 250 ?'...' : ''"></span>
</td>
</tr>
<tr ng-repeat="item in commits.changeSets.deleteItems"
ng-show="item.key || item.comment">
<td width="6%">
{{'Component.Namespace.Master.Items.Body.HistoryView.Deleted' | translate }}
</td>
<td width="20%" title="{{item.key}}">
<span ng-bind="item.key | limitTo: 250"></span>
<span ng-bind="item.key.length > 250 ? '...' :''"></span>
</td>
<td width="28%" title="{{item.value}}">
<span ng-bind="item.value | limitTo: 250"></span>
<span ng-bind="item.value.length > 250 ? '...': ''"></span>
</td>
<td width="28%">
</td>
<td width="18%" title="{{item.comment}}">
<span ng-bind="item.comment | limitTo: 250"></span>
<span ng-bind="item.comment.length > 250 ?'...' : ''"></span>
</td>
</tr>
</tbody>
</table>
<!--not properties format-->
<table class="table table-bordered table-striped text-center table-hover"
style="margin-top: 5px;" ng-if="!namespace.isPropertiesFormat">
<thead>
<tr>
<th>
{{'Component.Namespace.Master.Items.Body.HistoryView.ItemType' | translate }}
</th>
<th>
{{'Component.Namespace.Master.Items.Body.HistoryView.ItemOldValue' | translate }}
</th>
<th>
{{'Component.Namespace.Master.Items.Body.HistoryView.ItemNewValue' | translate }}
</th>
<th>
{{'Component.Namespace.Master.Items.Body.HistoryView.ItemComment' | translate }}
</th>
</tr>
</thead>
<tbody>
<!--兼容老数据,不显示item类型为空行和注释的item-->
<tr ng-repeat="item in commits.changeSets.createItems" ng-show="item.key">
<td width="6%">
{{'Component.Namespace.Master.Items.Body.HistoryView.NewAdded' | translate }}
</td>
<td width="28%">
</td>
<td width="28%" class="cursor-pointer" title="{{item.value}}"
ng-click="showText(item.value)">
<span ng-bind="item.value | limitTo: 250"></span>
<span ng-bind="item.value.length > 250 ? '...': ''"></span>
</td>
<td width="18%" title="{{item.comment}}">
<span ng-bind="item.comment | limitTo: 250"></span>
<span ng-bind="item.comment.length > 250 ?'...' : ''"></span>
</td>
</tr>
<tr ng-repeat="item in commits.changeSets.updateItems">
<td width="6%">
{{'Component.Namespace.Master.Items.Body.HistoryView.Updated' | translate }}
</td>
<td width="28%" class="cursor-pointer" title="{{item.oldItem.value}}"
ng-click="showText(item.oldItem.value)">
<span ng-bind="item.oldItem.value | limitTo: 250"></span>
<span ng-bind="item.oldItem.value.length > 250 ? '...': ''"></span>
</td>
<td width="28%" class="cursor-pointer" title="{{item.newItem.value}}"
ng-click="showText(item.newItem.value)">
<span ng-bind="item.newItem.value | limitTo: 250"></span>
<span ng-bind="item.newItem.value.length > 250 ? '...': ''"></span>
</td>
<td width="18%" title="{{item.newItem.comment}}">
<span ng-bind="item.newItem.comment | limitTo: 250"></span>
<span ng-bind="item.newItem.comment.length > 250 ?'...' : ''"></span>
</td>
</tr>
<tr ng-repeat="item in commits.changeSets.deleteItems"
ng-show="item.key || item.comment">
<td width="6%">
{{'Component.Namespace.Master.Items.Body.HistoryView.Deleted' | translate }}
</td>
<td width="28%" title="{{item.value}}">
<span ng-bind="item.value | limitTo: 250"></span>
<span ng-bind="item.value.length > 250 ? '...': ''"></span>
</td>
<td width="28%">
</td>
<td width="18%" title="{{item.comment}}">
<span ng-bind="item.comment | limitTo: 250"></span>
<span ng-bind="item.comment.length > 250 ?'...' : ''"></span>
</td>
</tr>
</tbody>
</table>
</div>
<hr>
</div>
<div class="text-center">
<button type="button" class="btn btn-default" ng-show="!namespace.hasLoadAllCommit"
ng-click="loadCommitHistory(namespace)">{{'Component.Namespace.Master.Items.Body.HistoryView.LoadMore' | translate }}
<span class="glyphicon glyphicon-menu-down"></span></button>
</div>
<div class="empty-container text-center" ng-show="!namespace.commits || !namespace.commits.length">
{{'Component.Namespace.Master.Items.Body.HistoryView.NoHistory' | translate }}
</div>
</div>
<!--instance view-->
<div class="panel panel-default instance-view" ng-show="namespace.viewType == 'instance'">
<div class="panel-heading">
<div class="row">
<div class="col-md-5 col-sm-5">
<small>{{'Component.Namespace.Master.Items.Body.Instance.Tips' | translate }}</small>
</div>
<div class="col-md-7 col-sm-7 text-right">
<div class="btn-group btn-group-sm" role="group">
<button type="button" class="btn btn-default"
ng-class="{'btn-primary':namespace.instanceViewType == 'latest_release'}"
ng-click="switchInstanceViewType(namespace, 'latest_release')">
{{'Component.Namespace.Master.Items.Body.Instance.UsedNewItem' | translate }}
<span class="badge" ng-bind="namespace.latestReleaseInstances.total"></span>
</button>
<button type="button" class="btn btn-default"
ng-class="{'btn-primary':namespace.instanceViewType == 'not_latest_release'}"
ng-click="switchInstanceViewType(namespace, 'not_latest_release')">{{'Component.Namespace.Master.Items.Body.Instance.NoUsedNewItem' | translate }}
<span class="badge"
ng-bind="namespace.instancesCount - namespace.latestReleaseInstances.total"></span>
</button>
<button type="button" class="btn btn-default"
ng-class="{'btn-primary':namespace.instanceViewType == 'all'}"
ng-click="switchInstanceViewType(namespace, 'all')">{{'Component.Namespace.Master.Items.Body.Instance.AllInstance' | translate }}
<span class="badge" ng-bind="namespace.instancesCount"></span>
</button>
</div>
<button class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.Instance.RefreshList' | translate }}"
ng-click="refreshInstancesInfo(namespace)">
<img ng-src="{{ '/img/refresh.png' | prefixPath }}" />
</button>
</div>
</div>
</div>
<!--latest release instances-->
<div class="panel-body" ng-show="namespace.instanceViewType == 'latest_release'">
<div class="panel-default" ng-if="namespace.latestReleaseInstances.total > 0">
<div class="panel-heading">
<a target="_blank" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.Instance.ToSeeItem' | translate }}"
ng-href="{{ '/config/history.html' | prefixPath }}?#/appid={{appId}}&env={{env}}&clusterName={{cluster}}&namespaceName={{namespace.baseInfo.namespaceName}}&releaseId={{namespace.latestRelease.id}}">
{{namespace.latestRelease.name}}
</a>
</div>
<table class="table table-bordered table-striped">
<thead>
<tr>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemAppId' | translate }}</td>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemCluster' | translate }}
</td>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemDataCenter' | translate }}
</td>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemIp' | translate }}</td>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemGetTime' | translate }}
</td>
</tr>
</thead>
<tbody>
<tr ng-repeat="instance in namespace.latestReleaseInstances.content">
<td width="20%" ng-bind="instance.appId"></td>
<td width="20%" ng-bind="instance.clusterName"></td>
<td width="20%" ng-bind="instance.dataCenter"></td>
<td width="20%" ng-bind="instance.ip"></td>
<td width="20%">{{instance.configs && instance.configs.length ?
(instance.configs[0].releaseDeliveryTime | date: 'yyyy-MM-dd HH:mm:ss') : ''}}
</td>
</tr>
</tbody>
</table>
<div class="row text-center"
ng-show="namespace.latestReleaseInstances.content.length < namespace.latestReleaseInstances.total">
<button class="btn btn-default"
ng-click="loadInstanceInfo(namespace)">{{'Component.Namespace.Master.Items.Body.Instance.LoadMore' | translate }}</button>
</div>
</div>
<div class="text-center" ng-if="namespace.latestReleaseInstances.total == 0">
{{'Component.Namespace.Master.Items.Body.Instance.NoInstanceTips' | translate }}
</div>
</div>
<!--not latest release instances-->
<div class="panel-body" ng-show="namespace.instanceViewType == 'not_latest_release'">
<div class="panel-default"
ng-if="namespace.instancesCount - namespace.latestReleaseInstances.total > 0"
ng-repeat="release in namespace.notLatestReleases">
<div class="panel-heading">
<a target="_blank" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.Instance.ToSeeItem' | translate }}"
href="{{ '/config/history.html' | prefixPath }}?#/appid={{appId}}&env={{env}}&clusterName={{cluster}}&namespaceName={{namespace.baseInfo.namespaceName}}&releaseId={{release.id}}">
{{release.name}}
</a>
</div>
<table class="table table-bordered table-striped">
<thead>
<tr>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemAppId' | translate }}</td>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemCluster' | translate }}
</td>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemDataCenter' | translate }}
</td>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemIp' | translate }}</td>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemGetTime' | translate }}
</td>
</tr>
</thead>
<tbody>
<tr ng-repeat="instance in namespace.notLatestReleaseInstances[release.id]">
<td width="20%" ng-bind="instance.appId"></td>
<td width="20%" ng-bind="instance.clusterName"></td>
<td width="20%" ng-bind="instance.dataCenter"></td>
<td width="20%" ng-bind="instance.ip"></td>
<td width="20%">{{instance.configs && instance.configs.length ?
(instance.configs[0].releaseDeliveryTime | date: 'yyyy-MM-dd HH:mm:ss') : ''}}
</td>
</tr>
</tbody>
</table>
</div>
<div class="text-center"
ng-if="namespace.instancesCount - namespace.latestReleaseInstances.total == 0">
{{'Component.Namespace.Master.Items.Body.Instance.NoInstanceTips' | translate }}
</div>
</div>
<!--all instances-->
<div class="panel-body" ng-show="namespace.instanceViewType == 'all'">
<div class="panel-default" ng-if="namespace.instancesCount > 0">
<table class="table table-bordered table-striped" ng-if="namespace.allInstances">
<thead>
<tr>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemAppId' | translate }}</td>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemCluster' | translate }}
</td>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemDataCenter' | translate }}
</td>
<td>{{'Component.Namespace.Master.Items.Body.Instance.ItemIp' | translate }}</td>
</tr>
</thead>
<tbody>
<tr ng-repeat="instance in namespace.allInstances">
<td width="25%" ng-bind="instance.appId"></td>
<td width="25%" ng-bind="instance.clusterName"></td>
<td width="25%" ng-bind="instance.dataCenter"></td>
<td width="25%" ng-bind="instance.ip"></td>
</tr>
</tbody>
</table>
<div class="row text-center" ng-show="namespace.allInstances.length < namespace.instancesCount">
<button class="btn btn-default"
ng-click="loadInstanceInfo(namespace)">{{'Component.Namespace.Master.Items.Body.Instance.LoadMore' | translate }}</button>
</div>
</div>
<div class="text-center" ng-if="namespace.instancesCount == 0">
{{'Component.Namespace.Master.Items.Body.Instance.NoInstanceTips' | translate }}
</div>
</div>
</div>
</section>
</div>
</section> | 1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./GOVERNANCE.md | # Overview
Apollo is a meritocratic, consensus-based community project. Anyone with an interest in the project can join the community, contribute to the project design and participate in the decision-making process.
This document describes how that participation takes place and how to set about earning merit within the project community.
# Roles and Responsibilities
Apollo community is composed of and operated by the following roles:
- Users
- Contributors
- Committers
- Project Management Committee (PMC)
## Users
Users are community members who have a need for the project. They are the most important members of the community and without them the project would have no purpose. Anyone can be a user and there are no special requirements.
## Contributors
Contributors are community members who contribute in concrete ways to the project.
### How to become a Contributor
- merged at least 1 pull request
You are also encouraged to participate in the projects in the following ways:
- Actively answer technical questions raised by community users in GitHub issues.
- Help test the projects
- Help review the pull requests (PRs) submitted by others
- Help improve technical documents
- Submit valuable issues
- Report or fix known and unknown bugs
- Write articles about source code analysis and usage cases for a project.
- Give representations of Apollo topic in conferences.
- Take part in our discussions of features, enhancements, etc.
## Committers
Committers are contributors who have shown that they are committed to the continued development of the project through ongoing engagement with the community and recognized by PMCs for their outstanding contributions.
### How to become a Committer
A Committer must have accomplished one or more of the following items:
- Demonstrated a good sense of responsibility in PR reviews.
- Demonstrated deep understanding of Apollo components by contributing significantly as:
- Finished 2 or more tasks of Medium difficulty
- Fixed 1 or more tasks of Hard difficulty
- Nominated by one PMC member and gained more +1 than -1.
### Privileges and responsibilities
- Control overall code quality of projects
- Guide Contributors to contribute to the community continuously
- Participate in design discussions
## Project Management Committee
The PMC(Project Management Committee) functions as the core management team that oversees the Apollo community. The PMC has additional responsibilities over and above those of Committers. These responsibilities ensure the smooth running of the project.
### How to become a PMC member
- Membership of the PMC is by invitation from the existing PMC members.
- A nomination will result in discussion and then a vote by the existing PMC members.
- PMC membership votes are subject to consensus approval of the current PMC members.
### Privileges and responsibilities
- Handle reported security issues (CVE, etc.)
- Nominate new committers and PMC members
- Vote on new committers and new PMC members
- Make major decisions for the future with respect to Apollo, such as project-level governance policies, management of sub-structures, security processes and so on
- Make decisions when community consensus cannot be reached
# Decision-making and voting
Proposals and ideas can be submitted for agreement via a GitHub issue, PR, or GitHub Discussion.
Major changes such as feature proposals and organization or process changes should be brought to the PMC. For the change to happen, the change must earn more +1 than -1.
# Conflict resolution
In general, we prefer that technical issues and other disputes upon which consensus can't be reached are amicably worked out between the persons involved. If a dispute cannot be decided independently, the PMC can be called in to resolve the issue by voting. The same PR can be used, or a separate PR can be opened for voting.
# Changes in Governance
Any change in this Governance document, or similar nature of changes to other governance related documents, shall go through the voting process as described in [Decision-making and voting](#decision-making-and-voting).
# Credits
The contents of this document are based on <http://oss-watch.ac.uk/resources/meritocraticgovernancemodel> by Ross Gardler and Gabriel Hanganu, and [TiDB Governance](https://github.com/pingcap/community/blob/master/GOVERNANCE.md).
| # Overview
Apollo is a meritocratic, consensus-based community project. Anyone with an interest in the project can join the community, contribute to the project design and participate in the decision-making process.
This document describes how that participation takes place and how to set about earning merit within the project community.
# Roles and Responsibilities
Apollo community is composed of and operated by the following roles:
- Users
- Contributors
- Committers
- Project Management Committee (PMC)
## Users
Users are community members who have a need for the project. They are the most important members of the community and without them the project would have no purpose. Anyone can be a user and there are no special requirements.
## Contributors
Contributors are community members who contribute in concrete ways to the project.
### How to become a Contributor
- merged at least 1 pull request
You are also encouraged to participate in the projects in the following ways:
- Actively answer technical questions raised by community users in GitHub issues.
- Help test the projects
- Help review the pull requests (PRs) submitted by others
- Help improve technical documents
- Submit valuable issues
- Report or fix known and unknown bugs
- Write articles about source code analysis and usage cases for a project.
- Give representations of Apollo topic in conferences.
- Take part in our discussions of features, enhancements, etc.
## Committers
Committers are contributors who have shown that they are committed to the continued development of the project through ongoing engagement with the community and recognized by PMCs for their outstanding contributions.
### How to become a Committer
A Committer must have accomplished one or more of the following items:
- Demonstrated a good sense of responsibility in PR reviews.
- Demonstrated deep understanding of Apollo components by contributing significantly as:
- Finished 2 or more tasks of Medium difficulty
- Fixed 1 or more tasks of Hard difficulty
- Nominated by one PMC member and gained more +1 than -1.
### Privileges and responsibilities
- Control overall code quality of projects
- Guide Contributors to contribute to the community continuously
- Participate in design discussions
## Project Management Committee
The PMC(Project Management Committee) functions as the core management team that oversees the Apollo community. The PMC has additional responsibilities over and above those of Committers. These responsibilities ensure the smooth running of the project.
### How to become a PMC member
- Membership of the PMC is by invitation from the existing PMC members.
- A nomination will result in discussion and then a vote by the existing PMC members.
- PMC membership votes are subject to consensus approval of the current PMC members.
### Privileges and responsibilities
- Handle reported security issues (CVE, etc.)
- Nominate new committers and PMC members
- Vote on new committers and new PMC members
- Make major decisions for the future with respect to Apollo, such as project-level governance policies, management of sub-structures, security processes and so on
- Make decisions when community consensus cannot be reached
# Decision-making and voting
Proposals and ideas can be submitted for agreement via a GitHub issue, PR, or GitHub Discussion.
Major changes such as feature proposals and organization or process changes should be brought to the PMC. For the change to happen, the change must earn more +1 than -1.
# Conflict resolution
In general, we prefer that technical issues and other disputes upon which consensus can't be reached are amicably worked out between the persons involved. If a dispute cannot be decided independently, the PMC can be called in to resolve the issue by voting. The same PR can be used, or a separate PR can be opened for voting.
# Changes in Governance
Any change in this Governance document, or similar nature of changes to other governance related documents, shall go through the voting process as described in [Decision-making and voting](#decision-making-and-voting).
# Credits
The contents of this document are based on <http://oss-watch.ac.uk/resources/meritocraticgovernancemodel> by Ross Gardler and Gabriel Hanganu, and [TiDB Governance](https://github.com/pingcap/community/blob/master/GOVERNANCE.md).
| -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-portal/src/main/resources/static/views/component/multiple-user-selector.html | <select class="{{id}}" style="width: 450px;" multiple="multiple">
<!--
~ Copyright 2021 Apollo Authors
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
</select>
| <select class="{{id}}" style="width: 450px;" multiple="multiple">
<!--
~ Copyright 2021 Apollo Authors
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
</select>
| -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./docs/en/usage/dotnet-sdk-user-guide.md | TODO
| TODO
| -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-portal/src/main/resources/static/views/common/nav.html | <nav class="navbar navbar-default">
<!--
~ Copyright 2021 Apollo Authors
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<div class="container-fluid">
<div class="navbar-header">
<img class="navbar-brand side-bar-switch cursor-pointer" src="{{ '/img/show_sidebar.png' | prefixPath }}"
onMouseOver="this.style.background='#f1f2f7'"
onMouseOut="this.style.background='#fff'"
data-tooltip="tooltip" data-placement="bottom" title="{{'Common.Nav.ShowNavBar' | translate }}"
ng-show="viewMode == 2 && !showSideBar"
ng-click="showSideBar = !showSideBar">
<img class="navbar-brand side-bar-switch cursor-pointer" src="{{ '/img/hide_sidebar.png' | prefixPath }}"
onMouseOver="this.style.background='#f1f2f7'"
onMouseOut="this.style.background='#fff'"
data-tooltip="tooltip" data-placement="bottom" title="{{'Common.Nav.HideNavBar' | translate }}"
ng-show="viewMode == 2 && showSideBar"
ng-click="showSideBar = !showSideBar">
<a class="navbar-brand logo" href="{{ '/' | prefixPath }}">
<img src="{{ '/img/logo-simple.png' | prefixPath }}" style="height:45px; margin-top: -13px">
</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="{{pageSetting.wikiAddress}}" target="_blank">
<span class="glyphicon glyphicon-question-sign"></span> {{'Common.Nav.Help' | translate }}
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon .glyphicon-glyphicon-font"></span> Language<span class="caret"></span></a>
<ul class="dropdown-menu">
<li value="en"><a href="javascript:void(0)" ng-click="changeLanguage('en')">English</a></li>
<li value="zh-CN"><a href="javascript:void(0)" ng-click="changeLanguage('zh-CN')">简体中文</a></li>
</ul>
</li>
<!-- admin tool -->
<li class="dropdown" ng-if="hasRootPermission == true">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-cog"></span> {{'Common.Nav.AdminTools' | translate }}
<span class="caret"></span></a>
<ul class="dropdown-menu" >
<li><a ng-href="{{ '/user-manage.html' | prefixPath }}" target="_blank">{{'Common.Nav.UserManage' | translate }}</a></li>
<li><a href="{{ '/system-role-manage.html' | prefixPath }}" target="_blank">{{'Common.Nav.SystemRoleManage' | translate }}</a></li>
<li><a href="{{ '/open/manage.html' | prefixPath }}" target="_blank">{{'Common.Nav.OpenMange' | translate }}</a></li>
<li><a href="{{ '/server_config.html' | prefixPath }}" target="_blank">{{'Common.Nav.SystemConfig' | translate }}</a></li>
<li><a href="{{ '/delete_app_cluster_namespace.html' | prefixPath }}" target="_blank">{{'Common.Nav.DeleteApp-Cluster-Namespace' | translate }}</a></li>
<li><a href="{{ '/system_info.html' | prefixPath }}" target="_blank">{{'Common.Nav.SystemInfo' | translate }}</a></li>
<li><a href="{{ '/config_export.html' | prefixPath }}" target="_blank">{{'Common.Nav.ConfigExport' | translate }}</a></li>
</ul>
</li>
<!-- normal user tool (not admin)-->
<li class="dropdown" ng-if="hasRootPermission == false">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-cog"></span> {{'Common.Nav.NonAdminTools' | translate }}
<span class="caret"></span></a>
<ul class="dropdown-menu" >
<li><a href="{{ '/config_export.html' | prefixPath }}" target="_blank">{{'Common.Nav.ConfigExport' | translate }}</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-user"></span> {{userDisplayName}}({{userName}})
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="{{ '/user/logout' | prefixPath }}">{{'Common.Nav.Logout' | translate }}</a></li>
</ul>
</li>
</ul>
<div class="navbar-form navbar-right form-inline" role="search">
<div class="form-group app-search-list">
<select id="app-search-list" style="width: 350px"></select>
</div>
</div>
</div>
</div>
</nav>
| <nav class="navbar navbar-default">
<!--
~ Copyright 2021 Apollo Authors
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<div class="container-fluid">
<div class="navbar-header">
<img class="navbar-brand side-bar-switch cursor-pointer" src="{{ '/img/show_sidebar.png' | prefixPath }}"
onMouseOver="this.style.background='#f1f2f7'"
onMouseOut="this.style.background='#fff'"
data-tooltip="tooltip" data-placement="bottom" title="{{'Common.Nav.ShowNavBar' | translate }}"
ng-show="viewMode == 2 && !showSideBar"
ng-click="showSideBar = !showSideBar">
<img class="navbar-brand side-bar-switch cursor-pointer" src="{{ '/img/hide_sidebar.png' | prefixPath }}"
onMouseOver="this.style.background='#f1f2f7'"
onMouseOut="this.style.background='#fff'"
data-tooltip="tooltip" data-placement="bottom" title="{{'Common.Nav.HideNavBar' | translate }}"
ng-show="viewMode == 2 && showSideBar"
ng-click="showSideBar = !showSideBar">
<a class="navbar-brand logo" href="{{ '/' | prefixPath }}">
<img src="{{ '/img/logo-simple.png' | prefixPath }}" style="height:45px; margin-top: -13px">
</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="{{pageSetting.wikiAddress}}" target="_blank">
<span class="glyphicon glyphicon-question-sign"></span> {{'Common.Nav.Help' | translate }}
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon .glyphicon-glyphicon-font"></span> Language<span class="caret"></span></a>
<ul class="dropdown-menu">
<li value="en"><a href="javascript:void(0)" ng-click="changeLanguage('en')">English</a></li>
<li value="zh-CN"><a href="javascript:void(0)" ng-click="changeLanguage('zh-CN')">简体中文</a></li>
</ul>
</li>
<!-- admin tool -->
<li class="dropdown" ng-if="hasRootPermission == true">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-cog"></span> {{'Common.Nav.AdminTools' | translate }}
<span class="caret"></span></a>
<ul class="dropdown-menu" >
<li><a ng-href="{{ '/user-manage.html' | prefixPath }}" target="_blank">{{'Common.Nav.UserManage' | translate }}</a></li>
<li><a href="{{ '/system-role-manage.html' | prefixPath }}" target="_blank">{{'Common.Nav.SystemRoleManage' | translate }}</a></li>
<li><a href="{{ '/open/manage.html' | prefixPath }}" target="_blank">{{'Common.Nav.OpenMange' | translate }}</a></li>
<li><a href="{{ '/server_config.html' | prefixPath }}" target="_blank">{{'Common.Nav.SystemConfig' | translate }}</a></li>
<li><a href="{{ '/delete_app_cluster_namespace.html' | prefixPath }}" target="_blank">{{'Common.Nav.DeleteApp-Cluster-Namespace' | translate }}</a></li>
<li><a href="{{ '/system_info.html' | prefixPath }}" target="_blank">{{'Common.Nav.SystemInfo' | translate }}</a></li>
<li><a href="{{ '/config_export.html' | prefixPath }}" target="_blank">{{'Common.Nav.ConfigExport' | translate }}</a></li>
</ul>
</li>
<!-- normal user tool (not admin)-->
<li class="dropdown" ng-if="hasRootPermission == false">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-cog"></span> {{'Common.Nav.NonAdminTools' | translate }}
<span class="caret"></span></a>
<ul class="dropdown-menu" >
<li><a href="{{ '/config_export.html' | prefixPath }}" target="_blank">{{'Common.Nav.ConfigExport' | translate }}</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-user"></span> {{userDisplayName}}({{userName}})
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="{{ '/user/logout' | prefixPath }}">{{'Common.Nav.Logout' | translate }}</a></li>
</ul>
</li>
</ul>
<div class="navbar-form navbar-right form-inline" role="search">
<div class="form-group app-search-list">
<select id="app-search-list" style="width: 350px"></select>
</div>
</div>
</div>
</div>
</nav>
| -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-portal/src/main/resources/static/delete_app_cluster_namespace.html | <!--
~ Copyright 2021 Apollo Authors
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<!doctype html>
<html ng-app="delete_app_cluster_namespace">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="icon" href="img/config.png">
<!-- styles -->
<link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="vendor/angular/angular-toastr-1.4.1.min.css">
<link rel="stylesheet" type="text/css" media='all' href="vendor/angular/loading-bar.min.css">
<link rel="stylesheet" type="text/css" href="styles/common-style.css">
<link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css">
<title>{{'Delete.Title' | translate }}</title>
</head>
<body>
<apollonav></apollonav>
<div class="container-fluid" ng-controller="DeleteAppClusterNamespaceController">
<div class="col-md-10 col-md-offset-1 panel">
<section class="panel-body" ng-show="isRootUser">
<!-- delete app -->
<section class="row">
<h5>{{'Delete.DeleteApp' | translate }}
<small>
{{'Delete.DeleteAppTips' | translate }}
</small>
</h5>
<hr>
<form class="form-horizontal">
<div class="form-group" valdr-form-group>
<label class="col-sm-2 control-label">
<apollorequiredfield></apollorequiredfield>
{{'Common.AppId' | translate }}
</label>
<div class="col-sm-5">
<input type="text" class="form-control" ng-model="app.appId">
<small> {{'Delete.AppIdTips' | translate }}</small>
</div>
<div class="col-sm-1">
<button class="btn btn-info" ng-click="getAppInfo()">{{'Common.Search' | translate }}</button>
</div>
</div>
<div class="form-group" valdr-form-group>
<label class="col-sm-2 control-label">
{{'Delete.AppInfo' | translate }}</label>
<div class="col-sm-5">
<h5 ng-show="app.info" ng-bind="app.info"></h5>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-9">
<button type="submit" class="btn btn-primary" ng-disabled="deleteAppBtnDisabled"
ng-click="deleteApp()">
{{'Delete.DeleteApp' | translate }}
</button>
</div>
</div>
</form>
</section>
<!-- delete cluster -->
<section class="row">
<h5>{{'Delete.DeleteCluster' | translate }}
<small>
{{'Delete.DeleteClusterTips' | translate }}
</small>
</h5>
<hr>
<form class="form-horizontal">
<div class="form-group" valdr-form-group>
<label class="col-sm-2 control-label">
<apollorequiredfield></apollorequiredfield>
{{'Common.AppId' | translate }}
</label>
<div class="col-sm-5">
<input type="text" class="form-control" ng-model="cluster.appId">
</div>
</div>
<div class="form-group" valdr-form-group>
<label class="col-sm-2 control-label">
<apollorequiredfield></apollorequiredfield>
{{'Delete.EnvName' | translate }}
</label>
<div class="col-sm-5">
<input type="text" class="form-control" ng-model="cluster.env">
</div>
</div>
<div class="form-group" valdr-form-group>
<label class="col-sm-2 control-label">
<apollorequiredfield></apollorequiredfield>
{{'Common.ClusterName' | translate }}
</label>
<div class="col-sm-5">
<input type="text" class="form-control" ng-model="cluster.name">
<small>{{'Delete.ClusterNameTips' | translate }}</small>
</div>
<div class="col-sm-1">
<button class="btn btn-info"
ng-click="getClusterInfo()">{{'Common.Search' | translate }}</button>
</div>
</div>
<div class="form-group" viv clform-group>
<label class="col-sm-2 control-label">
{{'Delete.ClusterInfo' | translate }}</label>
<div class="col-sm-5">
<h5 ng-show="cluster.info" ng-bind="cluster.info"></h5>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-9">
<button type="submit" class="btn btn-primary" ng-disabled="deleteClusterBtnDisabled"
ng-click="deleteCluster()">
{{'Delete.DeleteCluster' | translate }}
</button>
</div>
</div>
</form>
</section>
<!-- delete app namespace -->
<section class="row">
<h5>{{'Delete.DeleteNamespace' | translate }}
<small>{{'Delete.DeleteNamespaceTips' | translate }}</small>
</h5>
<small>
{{'Delete.DeleteNamespaceTips2' | translate }}
</small>
<hr>
<form class="form-horizontal">
<div class="form-group" valdr-form-group>
<label class="col-sm-2 control-label">
<apollorequiredfield></apollorequiredfield>
{{'Common.AppId' | translate }}
</label>
<div class="col-sm-5">
<input type="text" class="form-control" ng-model="appNamespace.appId">
</div>
</div>
<div class="form-group" valdr-form-group>
<label class="col-sm-2 control-label">
<apollorequiredfield></apollorequiredfield>
{{'Delete.AppNamespaceName' | translate }}
</label>
<div class="col-sm-5">
<input type="text" class="form-control" ng-model="appNamespace.name">
<small>{{'Delete.AppNamespaceNameTips' | translate }}</small>
</div>
<div class="col-sm-1">
<button class="btn btn-info" ng-click="getAppNamespaceInfo()">{{'Common.Search' | translate }}</button>
</div>
</div>
<div class="form-group" viv clform-group>
<label class="col-sm-2 control-label">
{{'Delete.AppNamespaceInfo' | translate }}</label>
<div class="col-sm-5">
<h5 ng-show="appNamespace.info" ng-bind="appNamespace.info"></h5>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-9">
<button type="submit" class="btn btn-primary"
ng-disabled="deleteAppNamespaceBtnDisabled" ng-click="deleteAppNamespace()">
{{'Delete.DeleteNamespace' | translate }}
</button>
</div>
</div>
</form>
</section>
</section>
<section class="panel-body text-center" ng-if="!isRootUser">
<h4>{{'Common.IsRootUser' | translate }}</h4>
</section>
</div>
</div>
<div ng-include="'views/common/footer.html'"></div>
<!-- jquery.js -->
<script src="vendor/jquery.min.js" type="text/javascript"></script>
<!--angular-->
<script src="vendor/angular/angular.min.js"></script>
<script src="vendor/angular/angular-route.min.js"></script>
<script src="vendor/angular/angular-resource.min.js"></script>
<script src="vendor/angular/angular-toastr-1.4.1.tpls.min.js"></script>
<script src="vendor/angular/loading-bar.min.js"></script>
<script src="vendor/angular/angular-cookies.min.js"></script>
<script src="vendor/angular/angular-translate.2.18.1/angular-translate.min.js"></script>
<script src="vendor/angular/angular-translate.2.18.1/angular-translate-loader-static-files.min.js"></script>
<script src="vendor/angular/angular-translate.2.18.1/angular-translate-storage-cookie.min.js"></script>
<!--valdr-->
<script src="vendor/valdr/valdr.min.js" type="text/javascript"></script>
<script src="vendor/valdr/valdr-message.min.js" type="text/javascript"></script>
<!-- bootstrap.js -->
<script src="vendor/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="vendor/lodash.min.js"></script>
<script src="vendor/select2/select2.min.js" type="text/javascript"></script>
<!--biz-->
<!--must import-->
<script type="application/javascript" src="scripts/app.js"></script>
<script type="application/javascript" src="scripts/services/AppService.js"></script>
<script type="application/javascript" src="scripts/services/EnvService.js"></script>
<script type="application/javascript" src="scripts/services/UserService.js"></script>
<script type="application/javascript" src="scripts/services/CommonService.js"></script>
<script type="application/javascript" src="scripts/services/PermissionService.js"></script>
<script type="application/javascript" src="scripts/services/ClusterService.js"></script>
<script type="application/javascript" src="scripts/services/NamespaceService.js"></script>
<script type="application/javascript" src="scripts/AppUtils.js"></script>
<script type="application/javascript" src="scripts/PageCommon.js"></script>
<script type="application/javascript" src="scripts/directive/directive.js"></script>
<script type="application/javascript" src="scripts/valdr.js"></script>
<script type="application/javascript" src="scripts/controller/DeleteAppClusterNamespaceController.js"></script>
</body>
</html> | <!--
~ Copyright 2021 Apollo Authors
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<!doctype html>
<html ng-app="delete_app_cluster_namespace">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="icon" href="img/config.png">
<!-- styles -->
<link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="vendor/angular/angular-toastr-1.4.1.min.css">
<link rel="stylesheet" type="text/css" media='all' href="vendor/angular/loading-bar.min.css">
<link rel="stylesheet" type="text/css" href="styles/common-style.css">
<link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css">
<title>{{'Delete.Title' | translate }}</title>
</head>
<body>
<apollonav></apollonav>
<div class="container-fluid" ng-controller="DeleteAppClusterNamespaceController">
<div class="col-md-10 col-md-offset-1 panel">
<section class="panel-body" ng-show="isRootUser">
<!-- delete app -->
<section class="row">
<h5>{{'Delete.DeleteApp' | translate }}
<small>
{{'Delete.DeleteAppTips' | translate }}
</small>
</h5>
<hr>
<form class="form-horizontal">
<div class="form-group" valdr-form-group>
<label class="col-sm-2 control-label">
<apollorequiredfield></apollorequiredfield>
{{'Common.AppId' | translate }}
</label>
<div class="col-sm-5">
<input type="text" class="form-control" ng-model="app.appId">
<small> {{'Delete.AppIdTips' | translate }}</small>
</div>
<div class="col-sm-1">
<button class="btn btn-info" ng-click="getAppInfo()">{{'Common.Search' | translate }}</button>
</div>
</div>
<div class="form-group" valdr-form-group>
<label class="col-sm-2 control-label">
{{'Delete.AppInfo' | translate }}</label>
<div class="col-sm-5">
<h5 ng-show="app.info" ng-bind="app.info"></h5>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-9">
<button type="submit" class="btn btn-primary" ng-disabled="deleteAppBtnDisabled"
ng-click="deleteApp()">
{{'Delete.DeleteApp' | translate }}
</button>
</div>
</div>
</form>
</section>
<!-- delete cluster -->
<section class="row">
<h5>{{'Delete.DeleteCluster' | translate }}
<small>
{{'Delete.DeleteClusterTips' | translate }}
</small>
</h5>
<hr>
<form class="form-horizontal">
<div class="form-group" valdr-form-group>
<label class="col-sm-2 control-label">
<apollorequiredfield></apollorequiredfield>
{{'Common.AppId' | translate }}
</label>
<div class="col-sm-5">
<input type="text" class="form-control" ng-model="cluster.appId">
</div>
</div>
<div class="form-group" valdr-form-group>
<label class="col-sm-2 control-label">
<apollorequiredfield></apollorequiredfield>
{{'Delete.EnvName' | translate }}
</label>
<div class="col-sm-5">
<input type="text" class="form-control" ng-model="cluster.env">
</div>
</div>
<div class="form-group" valdr-form-group>
<label class="col-sm-2 control-label">
<apollorequiredfield></apollorequiredfield>
{{'Common.ClusterName' | translate }}
</label>
<div class="col-sm-5">
<input type="text" class="form-control" ng-model="cluster.name">
<small>{{'Delete.ClusterNameTips' | translate }}</small>
</div>
<div class="col-sm-1">
<button class="btn btn-info"
ng-click="getClusterInfo()">{{'Common.Search' | translate }}</button>
</div>
</div>
<div class="form-group" viv clform-group>
<label class="col-sm-2 control-label">
{{'Delete.ClusterInfo' | translate }}</label>
<div class="col-sm-5">
<h5 ng-show="cluster.info" ng-bind="cluster.info"></h5>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-9">
<button type="submit" class="btn btn-primary" ng-disabled="deleteClusterBtnDisabled"
ng-click="deleteCluster()">
{{'Delete.DeleteCluster' | translate }}
</button>
</div>
</div>
</form>
</section>
<!-- delete app namespace -->
<section class="row">
<h5>{{'Delete.DeleteNamespace' | translate }}
<small>{{'Delete.DeleteNamespaceTips' | translate }}</small>
</h5>
<small>
{{'Delete.DeleteNamespaceTips2' | translate }}
</small>
<hr>
<form class="form-horizontal">
<div class="form-group" valdr-form-group>
<label class="col-sm-2 control-label">
<apollorequiredfield></apollorequiredfield>
{{'Common.AppId' | translate }}
</label>
<div class="col-sm-5">
<input type="text" class="form-control" ng-model="appNamespace.appId">
</div>
</div>
<div class="form-group" valdr-form-group>
<label class="col-sm-2 control-label">
<apollorequiredfield></apollorequiredfield>
{{'Delete.AppNamespaceName' | translate }}
</label>
<div class="col-sm-5">
<input type="text" class="form-control" ng-model="appNamespace.name">
<small>{{'Delete.AppNamespaceNameTips' | translate }}</small>
</div>
<div class="col-sm-1">
<button class="btn btn-info" ng-click="getAppNamespaceInfo()">{{'Common.Search' | translate }}</button>
</div>
</div>
<div class="form-group" viv clform-group>
<label class="col-sm-2 control-label">
{{'Delete.AppNamespaceInfo' | translate }}</label>
<div class="col-sm-5">
<h5 ng-show="appNamespace.info" ng-bind="appNamespace.info"></h5>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-9">
<button type="submit" class="btn btn-primary"
ng-disabled="deleteAppNamespaceBtnDisabled" ng-click="deleteAppNamespace()">
{{'Delete.DeleteNamespace' | translate }}
</button>
</div>
</div>
</form>
</section>
</section>
<section class="panel-body text-center" ng-if="!isRootUser">
<h4>{{'Common.IsRootUser' | translate }}</h4>
</section>
</div>
</div>
<div ng-include="'views/common/footer.html'"></div>
<!-- jquery.js -->
<script src="vendor/jquery.min.js" type="text/javascript"></script>
<!--angular-->
<script src="vendor/angular/angular.min.js"></script>
<script src="vendor/angular/angular-route.min.js"></script>
<script src="vendor/angular/angular-resource.min.js"></script>
<script src="vendor/angular/angular-toastr-1.4.1.tpls.min.js"></script>
<script src="vendor/angular/loading-bar.min.js"></script>
<script src="vendor/angular/angular-cookies.min.js"></script>
<script src="vendor/angular/angular-translate.2.18.1/angular-translate.min.js"></script>
<script src="vendor/angular/angular-translate.2.18.1/angular-translate-loader-static-files.min.js"></script>
<script src="vendor/angular/angular-translate.2.18.1/angular-translate-storage-cookie.min.js"></script>
<!--valdr-->
<script src="vendor/valdr/valdr.min.js" type="text/javascript"></script>
<script src="vendor/valdr/valdr-message.min.js" type="text/javascript"></script>
<!-- bootstrap.js -->
<script src="vendor/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="vendor/lodash.min.js"></script>
<script src="vendor/select2/select2.min.js" type="text/javascript"></script>
<!--biz-->
<!--must import-->
<script type="application/javascript" src="scripts/app.js"></script>
<script type="application/javascript" src="scripts/services/AppService.js"></script>
<script type="application/javascript" src="scripts/services/EnvService.js"></script>
<script type="application/javascript" src="scripts/services/UserService.js"></script>
<script type="application/javascript" src="scripts/services/CommonService.js"></script>
<script type="application/javascript" src="scripts/services/PermissionService.js"></script>
<script type="application/javascript" src="scripts/services/ClusterService.js"></script>
<script type="application/javascript" src="scripts/services/NamespaceService.js"></script>
<script type="application/javascript" src="scripts/AppUtils.js"></script>
<script type="application/javascript" src="scripts/PageCommon.js"></script>
<script type="application/javascript" src="scripts/directive/directive.js"></script>
<script type="application/javascript" src="scripts/valdr.js"></script>
<script type="application/javascript" src="scripts/controller/DeleteAppClusterNamespaceController.js"></script>
</body>
</html> | -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-portal/src/main/resources/static/views/component/delete-namespace-modal.html | <div id="deleteNamespaceModal" class="modal fade">
<!--
~ Copyright 2021 Apollo Authors
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header panel-primary">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">×</span></button>
<h4 class="modal-title">
{{'Component.DeleteNamespace.Title' | translate }}
</h4>
</div>
<div class="modal-body form-horizontal" ng-show="toDeleteNamespace.isPublic">
{{'Component.DeleteNamespace.PublicContent' | translate }}
</div>
<div class="modal-body form-horizontal" ng-show="!toDeleteNamespace.isPublic">
{{'Component.DeleteNamespace.PrivateContent' | translate }}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">
{{'Common.Cancel' | translate }}
</button>
<button type="button" class="btn btn-danger" data-dismiss="modal"
ng-click="doDeleteNamespace()">
{{'Common.Ok' | translate }}
</button>
</div>
</div>
</div>
</div>
| <div id="deleteNamespaceModal" class="modal fade">
<!--
~ Copyright 2021 Apollo Authors
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header panel-primary">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">×</span></button>
<h4 class="modal-title">
{{'Component.DeleteNamespace.Title' | translate }}
</h4>
</div>
<div class="modal-body form-horizontal" ng-show="toDeleteNamespace.isPublic">
{{'Component.DeleteNamespace.PublicContent' | translate }}
</div>
<div class="modal-body form-horizontal" ng-show="!toDeleteNamespace.isPublic">
{{'Component.DeleteNamespace.PrivateContent' | translate }}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">
{{'Common.Cancel' | translate }}
</button>
<button type="button" class="btn btn-danger" data-dismiss="modal"
ng-click="doDeleteNamespace()">
{{'Common.Ok' | translate }}
</button>
</div>
</div>
</div>
</div>
| -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./.github/ISSUE_TEMPLATE/feature_request_en.md | ---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
| ---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
| -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./README.md | <img src="https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/logo/logo-simple.png" alt="apollo-logo" width="40%">
# Apollo - A reliable configuration management system
[](https://github.com/ctripcorp/apollo/actions)
[](https://github.com/ctripcorp/apollo/releases)
[](https://mvnrepository.com/artifact/com.ctrip.framework.apollo/apollo-client)
[](https://codecov.io/github/ctripcorp/apollo?branch=master)
[](https://opensource.org/licenses/Apache-2.0)
Apollo is a reliable configuration management system. It can centrally manage the configurations of different applications and different clusters. It is suitable for microservice configuration management scenarios.
The server side is developed based on Spring Boot and Spring Cloud, which can simply run without the need to install additional application containers such as Tomcat.
The Java SDK does not rely on any framework and can run in all Java runtime environments. It also has good support for Spring/Spring Boot environments.
The .Net SDK does not rely on any framework and can run in all .Net runtime environments.
For more details of the product introduction, please refer [Introduction to Apollo Configuration Center](https://www.apolloconfig.com/#/zh/design/apollo-introduction).
For local demo purpose, please refer [Quick Start](https://www.apolloconfig.com/#/zh/deployment/quick-start).
Demo Environment:
- [http://106.54.227.205](http://106.54.227.205/)
- User/Password: apollo/admin
# Screenshots

# Features
* **Unified management of the configurations of different environments and different clusters**
* Apollo provides a unified interface to centrally manage the configurations of different environments, different clusters, and different namespaces
* The same codebase could have different configurations when deployed in different clusters
* With the namespace concept, it is easy to support multiple applications to share the same configurations, while also allowing them to customize the configurations
* Multiple languages is provided in user interface(currently Chinese and English)
* **Configuration changes takes effect in real time (hot release)**
* After the user modified the configuration and released it in Apollo, the sdk will receive the latest configurations in real time (1 second) and notify the application
* **Release version management**
* Every configuration releases are versioned, which is friendly to support configuration rollback
* **Grayscale release**
* Support grayscale configuration release, for example, after clicking release, it will only take effect for some application instances. After a period of observation, we could push the configurations to all application instances if there is no problem
* **Authorization management, release approval and operation audit**
* Great authorization mechanism is designed for applications and configurations management, and the management of configurations is divided into two operations: editing and publishing, therefore greatly reducing human errors
* All operations have audit logs for easy tracking of problems
* **Client side configuration information monitoring**
* It's very easy to see which instances are using the configurations and what versions they are using
* **Rich SDKs available**
* Provides native sdks of Java and .Net to facilitate application integration
* Support Spring Placeholder, Annotation and Spring Boot ConfigurationProperties for easy application use (requires Spring 3.1.1+)
* Http APIs are provided, so non-Java and .Net applications can integrate conveniently
* Rich third party sdks are also available, e.g. Golang, Python, NodeJS, PHP, C, etc
* **Open platform API**
* Apollo itself provides a unified configuration management interface, which supports features such as multi-environment, multi-data center configuration management, permissions, and process governance
* However, for the sake of versatility, Apollo will not put too many restrictions on the modification of the configuration, as long as it conforms to the basic format, it can be saved.
* In our research, we found that for some users, their configurations may have more complicated formats, such as xml, json, and the format needs to be verified
* There are also some users such as DAL, which not only have a specific format, but also need to verify the entered value before saving, such as checking whether the database, username and password match
* For this type of application, Apollo allows the application to modify and release configurations through open APIs, which has great authorization and permission control mechanism built in
* **Simple deployment**
* As an infrastructure service, the configuration center has very high availability requirements, which forces Apollo to rely on external dependencies as little as possible
* Currently, the only external dependency is MySQL, so the deployment is very simple. Apollo can run as long as Java and MySQL are installed
* Apollo also provides a packaging script, which can generate all required installation packages with just one click, and supports customization of runtime parameters
# Usage
1. [Apollo User Guide](https://www.apolloconfig.com/#/zh/usage/apollo-user-guide)
2. [Java SDK User Guide](https://www.apolloconfig.com/#/zh/usage/java-sdk-user-guide)
3. [.Net SDK user Guide](https://www.apolloconfig.com/#/zh/usage/dotnet-sdk-user-guide)
4. [Third Party SDK User Guide](https://www.apolloconfig.com/#/zh/usage/third-party-sdks-user-guide)
5. [Other Language Client User Guide](https://www.apolloconfig.com/#/zh/usage/other-language-client-user-guide)
6. [Apollo Open APIs](https://www.apolloconfig.com/#/zh/usage/apollo-open-api-platform)
7. [Apollo Use Cases](https://github.com/ctripcorp/apollo-use-cases)
8. [Apollo User Practices](https://www.apolloconfig.com/#/zh/usage/apollo-user-practices)
9. [Apollo Security Best Practices](https://www.apolloconfig.com/#/zh/usage/apollo-user-guide?id=_71-%e5%ae%89%e5%85%a8%e7%9b%b8%e5%85%b3)
# Design
* [Apollo Design](https://www.apolloconfig.com/#/zh/design/apollo-design)
* [Apollo Core Concept - Namespace](https://www.apolloconfig.com/#/zh/design/apollo-core-concept-namespace)
* [Apollo Architecture Analysis](https://mp.weixin.qq.com/s/-hUaQPzfsl9Lm3IqQW3VDQ)
* [Apollo Source Code Explanation](http://www.iocoder.cn/categories/Apollo/)
# Development
* [Apollo Development Guide](https://www.apolloconfig.com/#/zh/development/apollo-development-guide)
* Code Styles
* [Eclipse Code Style](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/eclipse-java-google-style.xml)
* [Intellij Code Style](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/intellij-java-google-style.xml)
# Deployment
* [Quick Start](https://www.apolloconfig.com/#/zh/deployment/quick-start)
* [Distributed Deployment Guide](https://www.apolloconfig.com/#/zh/deployment/distributed-deployment-guide)
# Release Notes
* [Releases](https://github.com/ctripcorp/apollo/releases)
# FAQ
* [FAQ](https://www.apolloconfig.com/#/zh/faq/faq)
* [Common Issues in Deployment & Development Phase](https://www.apolloconfig.com/#/zh/faq/common-issues-in-deployment-and-development-phase)
# Presentation
* [Design and Implementation Details of Apollo](http://www.itdks.com/dakalive/detail/3420)
* [Slides](https://myslide.cn/slides/10168)
* [Configuration Center Makes Microservices Smart](https://2018.qconshanghai.com/presentation/799)
* [Slides](https://myslide.cn/slides/10035)
# Publication
* [Design and Implementation Details of Apollo](https://www.infoq.cn/article/open-source-configuration-center-apollo)
* [Configuration Center Makes Microservices Smart](https://mp.weixin.qq.com/s/iDmYJre_ULEIxuliu1EbIQ)
# Community
* [Apollo Team](https://www.apolloconfig.com/#/en/community/team)
* [Community Governance](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md)
* [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md)
# License
The project is licensed under the [Apache 2 license](https://github.com/ctripcorp/apollo/blob/master/LICENSE).
# Known Users
> Sorted by registration order,users are welcome to register in [https://github.com/ctripcorp/apollo/issues/451](https://github.com/ctripcorp/apollo/issues/451) (reference purpose only for the community)
<table>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ctrip.png" alt="携程"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bluestone.png" alt="青石证券"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sagreen.png" alt="沙绿"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/umetrip.jpg" alt="航旅纵横"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhuanzhuan.png" alt="58转转"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/phone580.png" alt="蜂助手"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hainan-airlines.png" alt="海南航空"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cvte.png" alt="CVTE"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mainbo.jpg" alt="明博教育"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/madailicai.png" alt="麻袋理财"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mxnavi.jpg" alt="美行科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/fshows.jpg" alt="首展科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/feezu.png" alt="易微行"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rencaijia.png" alt="人才加"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/keking.png" alt="凯京集团"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/leoao.png" alt="乐刻运动"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dji.png" alt="大疆"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kkmh.png" alt="快看漫画"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wolaidai.png" alt="我来贷"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xsrj.png" alt="虚实软件"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yanxuan.png" alt="网易严选"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sjzg.png" alt="视觉中国"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zc360.png" alt="资产360"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ecarx.png" alt="亿咖通"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/5173.png" alt="5173"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hujiang.png" alt="沪江"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/163yun.png" alt="网易云基础服务"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cash-bus.png" alt="现金巴士"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/smartisan.png" alt="锤子科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/toodc.png" alt="头等仓"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/juneyaoair.png" alt="吉祥航空"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/263mobile.png" alt="263移动通信"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/toutoujinrong.png" alt="投投金融"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mytijian.png" alt="每天健康"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/maiyabank.png" alt="麦芽金服"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/fengunion.png" alt="蜂向科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/geex-logo.png" alt="即科金融"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/beike.png" alt="贝壳网"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/youzan.png" alt="有赞"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yunjihuitong.png" alt="云集汇通"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rhinotech.png" alt="犀牛瀚海科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/nxin.png" alt="农信互联"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mgzf.png" alt="蘑菇租房"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/huli-logo.png" alt="狐狸金服"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mandao.png" alt="漫道集团"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/enmonster.png" alt="怪兽充电"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/nanguazufang.png" alt="南瓜租房"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shitoujinrong.png" alt="石投金融"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tubatu.png" alt="土巴兔"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/payh_logo.png" alt="平安银行"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xinxindai.png" alt="新新贷"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/chrtc.png" alt="中国华戎科技集团"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tuya_logo.png" alt="涂鸦智能"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/szlcsc.jpg" alt="立创商城"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hairongyi.png" alt="乐赚金服"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kxqc.png" alt="开心汽车"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ppcredit.png" alt="乐赚金服"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/primeton.png" alt="普元信息"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hoskeeper.png" alt="医帮管家"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/fula.png" alt="付啦信用卡管家"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/uzai.png" alt="悠哉网"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/91wutong.png" alt="梧桐诚选"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ppdai.png" alt="拍拍贷"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xinyongfei.png" alt="信用飞"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dxy.png" alt="丁香园"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ghtech.png" alt="国槐科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/qbb.png" alt="亲宝宝"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/huawei_logo.png" alt="华为视频直播"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/weiboyi.png" alt="微播易"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ofpay.png" alt="欧飞"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mishuo.png" alt="迷说"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yixia.png" alt="一下科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/daocloud.png" alt="DaoCloud"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cnvex.png" alt="汽摩交易所"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/100tal.png" alt="好未来教育集团"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ainirobot.png" alt="猎户星空"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhuojian.png" alt="卓健科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/enjoyor.png" alt="银江股份"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tuhu.png" alt="途虎养车"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/homedo.png" alt="河姆渡"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xwbank.png" alt="新网银行"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ctspcl.png" alt="中旅安信云贷"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/meiyou.png" alt="美柚"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zkh-logo.png" alt="震坤行"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wgss.png" alt="万谷盛世"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/plateno.png" alt="铂涛旅行"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/lifesense.png" alt="乐心"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/reachmedia.png" alt="亿投传媒"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/guxiansheng.png" alt="股先生"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/caixuetang.png" alt="财学堂"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/4399.png" alt="4399"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/autohome.png" alt="汽车之家"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mbcaijing.png" alt="面包财经"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hoopchina.png" alt="虎扑"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sohu-auto.png" alt="搜狐汽车"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/liangfuzhengxin.png" alt="量富征信"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/maihaoche.png" alt="卖好车"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zyiot.jpg" alt="中移物联网"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/biauto.png" alt="易车网"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/maiyaole.png" alt="一药网"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xiaoying.png" alt="小影"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/caibeike.png" alt="彩贝壳"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yeelight.png" alt="YEELIGHT"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/itsgmu.png" alt="积目"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/acmedcare.png" alt="极致医疗"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jinhui365.png" alt="金汇金融"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/900etrip.png" alt="久柏易游"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/24xiaomai.png" alt="小麦铺"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/vvic.png" alt="搜款网"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mizlicai.png" alt="米庄理财"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bjt.png" alt="贝吉塔网络科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/weimob.png" alt="微盟"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kada.png" alt="网易卡搭"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kapbook.png" alt="股书"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jumore.png" alt="聚贸"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bimface.png" alt="广联达bimface"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/globalgrow.png" alt="环球易购"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jollychic.png" alt="浙江执御"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/2dfire.jpg" alt="二维火"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shopin.png" alt="上品"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/inspur.png" alt="浪潮集团"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ngarihealth.png" alt="纳里健康"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/oraro.png" alt="橙红科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dragonpass.png" alt="龙腾出行"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/lizhi.fm.png" alt="荔枝"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/htd.png" alt="汇通达"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yunrong.png" alt="云融金科"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tszg360.png" alt="天生掌柜"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rongplus.png" alt="容联光辉"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/intellif.png" alt="云天励飞"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jiayundata.png" alt="嘉云数据"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zts.png" alt="中泰证券网络金融部"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/163dun.png" alt="网易易盾"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xiangwushuo.png" alt="享物说"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sto.png" alt="申通"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jinhe.png" alt="金和网络"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/2345.png" alt="二三四五"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/chtwm.jpg" alt="恒天财富"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/uweixin.png" alt="沐雪微信"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wzeye.png" alt="温州医科大学附属眼视光医院"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/10010pay.png" alt="联通支付"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shanshu.png" alt="杉数科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/fenlibao.png" alt="分利宝"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hetao101.png" alt="核桃编程"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xiaohongshu.png" alt="小红书"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/blissmall.png" alt="幸福西饼"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ky-express.png" alt="跨越速运"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/oyohotels.png" alt="OYO"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/100-me.png" alt="叮咚买菜"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhidaohulian.jpg" alt="智道网联"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xueqiu.jpg" alt="雪球"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/autocloudpro.png" alt="车通云"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dadaabc.png" alt="哒哒英语"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xedaojia.jpg" alt="小E微店"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/daling.png" alt="达令家"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/renliwo.png" alt="人力窝"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mocire.jpg" alt="嘉美在线"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/uepay.png" alt="极易付"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wdom.png" alt="智慧开源"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cheshiku.png" alt="车仕库"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/taimeitech.png" alt="太美医疗科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yilianbaihui.png" alt="亿联百汇"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhoupu123.png" alt="舟谱数据"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/frxs.png" alt="芙蓉兴盛"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/beastshop.png" alt="野兽派"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kaishustory.png" alt="凯叔讲故事"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/haodf.png" alt="好大夫在线"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/insyunmi.png" alt="云幂信息技术"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/duiba.png" alt="兑吧"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/9ji.png" alt="九机网"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sui.png" alt="随手科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/aixiangdao.png" alt="万谷盛世"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yunzhangfang.png" alt="云账房"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yuantutech.png" alt="浙江远图互联"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/qk365.png" alt="青客公寓"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/eastmoney.png" alt="东方财富"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jikexiu.png" alt="极客修"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/meix.png" alt="美市科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zto.png" alt="中通快递"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/e6yun.png" alt="易流科技"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xiaoyuanzhao.png" alt="实习僧"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dalingjia.png" alt="达令家"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/secoo.png" alt="寺库"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/lianlianpay.png" alt="连连支付"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhongan.png" alt="众安保险"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/360jinrong.png" alt="360金融"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/caschina.png" alt="中航服商旅"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ke.png" alt="贝壳"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yeahmobi.png" alt="Yeahmobi易点天下"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/idengyun.png" alt="北京登云美业网络科技有限公司"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jinher.png" alt="金和网络"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/komect.png" alt="中移(杭州)信息技术有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/beisen.png" alt="北森"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/log56.png" alt="合肥维天运通"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/meboth.png" alt="北京蜜步科技有限公司"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/postop.png" alt="术康"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rfchina.png" alt="富力集团"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tfxing.png" alt="天府行"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/8travelpay.png" alt="八商山"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/centaline.png" alt="中原地产"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zkyda.png" alt="智科云达"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/house730.png" alt="中原730"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/pagoda.png" alt="百果园"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bolome.png" alt="波罗蜜"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xignite.png" alt="Xignite"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/aduer.png" alt="杭州有云科技有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jojoreading.png" alt="成都书声科技有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sweetome.png" alt="斯维登集团"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/vipthink.png" alt="广东快乐种子科技有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tongxuecool.png" alt="上海盈翼文化传播有限公司"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sccfc.png" alt="上海尚诚消费金融股份有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ziroom.png" alt="自如网"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jd.png" alt="京东"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rabbitpre.png" alt="兔展智能"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhubei.png" alt="竹贝"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/imile.png" alt="iMile(中东)"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/helloglobal.png" alt="哈罗出行"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhaopin.png" alt="智联招聘"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/acadsoc.png" alt="阿卡索"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mojory.png" alt="妙知旅"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/chengduoduo.png" alt="程多多"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/baojunev.png" alt="上汽通用五菱"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/leyan.png" alt="乐言科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dushu.png" alt="樊登读书"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zyiz.png" alt="找一找教程网"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bppc.png" alt="中油碧辟石油有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shanglv51.png" alt="四川商旅无忧科技服务有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/waijiao365.png" alt="懿鸢网络科技(上海)有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/gaoding.jpg" alt="稿定科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ricacorp.png" alt="搵樓 - 利嘉閣"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/t3go.png" alt="南京领行科技股份有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mokahr.jpg" alt="北京希瑞亚斯科技有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/printrainbow.png" alt="印彩虹印刷公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/milliontech.png" alt="Million Tech"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/guoguokeji.jpg" alt="果果科技"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/airkunming.png" alt="昆明航空"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/5i5j.png" alt="我爱我家"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/gjzq.png" alt="国金证券"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/enjoymusic.jpg" alt="不亦乐乎"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cnhnb.png" alt="惠农网"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/daoklab.jpg" alt="成都道壳"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ausnutria.jpg" alt="澳优乳业"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/deiyoudian.png" alt="河南有态度信息科技有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ezhiyang.png" alt="智阳第一人力"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shie.png" alt="上海保险交易所"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wsecar.png" alt="万顺叫车"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shouqinba.jpg" alt="收钱吧"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/baozun.png" alt="宝尊电商"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xbnwl.png" alt="喜百年供应链"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/gwwisdom.png" alt="南京观为智慧软件科技有限公司"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ztrip.png" alt="在途商旅"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hualala.png" alt="哗啦啦"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xin.png" alt="优信二手车"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/maycur.png" alt="每刻科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bullyun.png" alt="杭州蛮牛"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bestpay.png" alt="翼支付"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mockuai.png" alt="魔筷科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ct108.png" alt="畅唐网络"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jusdaglobal.jpg" alt="准时达"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/izaodao.png" alt="早道网校"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ovopark.jpg" alt="万店掌"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/funstory.jpg" alt="推文科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/lemonbox.png" alt="Lemonbox"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/polyt.png" alt="保利票务"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/chipwing.png" alt="芯翼科技"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/czbank.png" alt="浙商银行"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/czbyqy.png" alt="易企银科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yundun.jpg" alt="上海云盾"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/gaiaworks.jpg" alt="苏州盖雅信息技术有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mengxiang.png" alt="爱库存"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jidouauto.png" alt="极豆车联网"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ipalfish.png" alt="伴鱼少儿英语"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/iqboard.png" alt="锐达科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/koolearn.png" alt="新东方在线"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kingcome.png" alt="金康高科"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/soulapp.png" alt="soul"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ezrpro.png" alt="驿氪"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hc360.png" alt="慧聪"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/21cp.png" alt="中塑在线"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/goinglink.jpg" alt="甄云科技"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/aitrace.jpg" alt="追溯科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/moqipobing.png" alt="玩吧"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cassan.png" alt="广州卡桑信息技术有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shuidichou.png" alt="水滴"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kuwo.png" alt="酷我音乐"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mi.png" alt="小米"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mvmyun.png" alt="今典"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/visabao.jpg" alt="签宝科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/inrice.png" alt="广州趣米网络科技有限公司"></td>
<td><a target="_blank" href="https://github.com/ctripcorp/apollo/issues/451">More...</a></td>
</tr>
</table>
# Awards
<img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/awards/oschina-2018-award.jpg" width="240px" alt="The most popular Chinese open source software in 2018">
# Stargazers over time
[](https://starcharts.herokuapp.com/ctripcorp/apollo)
| <img src="https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/logo/logo-simple.png" alt="apollo-logo" width="40%">
# Apollo - A reliable configuration management system
[](https://github.com/ctripcorp/apollo/actions)
[](https://github.com/ctripcorp/apollo/releases)
[](https://mvnrepository.com/artifact/com.ctrip.framework.apollo/apollo-client)
[](https://codecov.io/github/ctripcorp/apollo?branch=master)
[](https://opensource.org/licenses/Apache-2.0)
Apollo is a reliable configuration management system. It can centrally manage the configurations of different applications and different clusters. It is suitable for microservice configuration management scenarios.
The server side is developed based on Spring Boot and Spring Cloud, which can simply run without the need to install additional application containers such as Tomcat.
The Java SDK does not rely on any framework and can run in all Java runtime environments. It also has good support for Spring/Spring Boot environments.
The .Net SDK does not rely on any framework and can run in all .Net runtime environments.
For more details of the product introduction, please refer [Introduction to Apollo Configuration Center](https://www.apolloconfig.com/#/zh/design/apollo-introduction).
For local demo purpose, please refer [Quick Start](https://www.apolloconfig.com/#/zh/deployment/quick-start).
Demo Environment:
- [http://106.54.227.205](http://106.54.227.205/)
- User/Password: apollo/admin
# Screenshots

# Features
* **Unified management of the configurations of different environments and different clusters**
* Apollo provides a unified interface to centrally manage the configurations of different environments, different clusters, and different namespaces
* The same codebase could have different configurations when deployed in different clusters
* With the namespace concept, it is easy to support multiple applications to share the same configurations, while also allowing them to customize the configurations
* Multiple languages is provided in user interface(currently Chinese and English)
* **Configuration changes takes effect in real time (hot release)**
* After the user modified the configuration and released it in Apollo, the sdk will receive the latest configurations in real time (1 second) and notify the application
* **Release version management**
* Every configuration releases are versioned, which is friendly to support configuration rollback
* **Grayscale release**
* Support grayscale configuration release, for example, after clicking release, it will only take effect for some application instances. After a period of observation, we could push the configurations to all application instances if there is no problem
* **Authorization management, release approval and operation audit**
* Great authorization mechanism is designed for applications and configurations management, and the management of configurations is divided into two operations: editing and publishing, therefore greatly reducing human errors
* All operations have audit logs for easy tracking of problems
* **Client side configuration information monitoring**
* It's very easy to see which instances are using the configurations and what versions they are using
* **Rich SDKs available**
* Provides native sdks of Java and .Net to facilitate application integration
* Support Spring Placeholder, Annotation and Spring Boot ConfigurationProperties for easy application use (requires Spring 3.1.1+)
* Http APIs are provided, so non-Java and .Net applications can integrate conveniently
* Rich third party sdks are also available, e.g. Golang, Python, NodeJS, PHP, C, etc
* **Open platform API**
* Apollo itself provides a unified configuration management interface, which supports features such as multi-environment, multi-data center configuration management, permissions, and process governance
* However, for the sake of versatility, Apollo will not put too many restrictions on the modification of the configuration, as long as it conforms to the basic format, it can be saved.
* In our research, we found that for some users, their configurations may have more complicated formats, such as xml, json, and the format needs to be verified
* There are also some users such as DAL, which not only have a specific format, but also need to verify the entered value before saving, such as checking whether the database, username and password match
* For this type of application, Apollo allows the application to modify and release configurations through open APIs, which has great authorization and permission control mechanism built in
* **Simple deployment**
* As an infrastructure service, the configuration center has very high availability requirements, which forces Apollo to rely on external dependencies as little as possible
* Currently, the only external dependency is MySQL, so the deployment is very simple. Apollo can run as long as Java and MySQL are installed
* Apollo also provides a packaging script, which can generate all required installation packages with just one click, and supports customization of runtime parameters
# Usage
1. [Apollo User Guide](https://www.apolloconfig.com/#/zh/usage/apollo-user-guide)
2. [Java SDK User Guide](https://www.apolloconfig.com/#/zh/usage/java-sdk-user-guide)
3. [.Net SDK user Guide](https://www.apolloconfig.com/#/zh/usage/dotnet-sdk-user-guide)
4. [Third Party SDK User Guide](https://www.apolloconfig.com/#/zh/usage/third-party-sdks-user-guide)
5. [Other Language Client User Guide](https://www.apolloconfig.com/#/zh/usage/other-language-client-user-guide)
6. [Apollo Open APIs](https://www.apolloconfig.com/#/zh/usage/apollo-open-api-platform)
7. [Apollo Use Cases](https://github.com/ctripcorp/apollo-use-cases)
8. [Apollo User Practices](https://www.apolloconfig.com/#/zh/usage/apollo-user-practices)
9. [Apollo Security Best Practices](https://www.apolloconfig.com/#/zh/usage/apollo-user-guide?id=_71-%e5%ae%89%e5%85%a8%e7%9b%b8%e5%85%b3)
# Design
* [Apollo Design](https://www.apolloconfig.com/#/zh/design/apollo-design)
* [Apollo Core Concept - Namespace](https://www.apolloconfig.com/#/zh/design/apollo-core-concept-namespace)
* [Apollo Architecture Analysis](https://mp.weixin.qq.com/s/-hUaQPzfsl9Lm3IqQW3VDQ)
* [Apollo Source Code Explanation](http://www.iocoder.cn/categories/Apollo/)
# Development
* [Apollo Development Guide](https://www.apolloconfig.com/#/zh/development/apollo-development-guide)
* Code Styles
* [Eclipse Code Style](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/eclipse-java-google-style.xml)
* [Intellij Code Style](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/intellij-java-google-style.xml)
# Deployment
* [Quick Start](https://www.apolloconfig.com/#/zh/deployment/quick-start)
* [Distributed Deployment Guide](https://www.apolloconfig.com/#/zh/deployment/distributed-deployment-guide)
# Release Notes
* [Releases](https://github.com/ctripcorp/apollo/releases)
# FAQ
* [FAQ](https://www.apolloconfig.com/#/zh/faq/faq)
* [Common Issues in Deployment & Development Phase](https://www.apolloconfig.com/#/zh/faq/common-issues-in-deployment-and-development-phase)
# Presentation
* [Design and Implementation Details of Apollo](http://www.itdks.com/dakalive/detail/3420)
* [Slides](https://myslide.cn/slides/10168)
* [Configuration Center Makes Microservices Smart](https://2018.qconshanghai.com/presentation/799)
* [Slides](https://myslide.cn/slides/10035)
# Publication
* [Design and Implementation Details of Apollo](https://www.infoq.cn/article/open-source-configuration-center-apollo)
* [Configuration Center Makes Microservices Smart](https://mp.weixin.qq.com/s/iDmYJre_ULEIxuliu1EbIQ)
# Community
* [Apollo Team](https://www.apolloconfig.com/#/en/community/team)
* [Community Governance](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md)
* [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md)
# License
The project is licensed under the [Apache 2 license](https://github.com/ctripcorp/apollo/blob/master/LICENSE).
# Known Users
> Sorted by registration order,users are welcome to register in [https://github.com/ctripcorp/apollo/issues/451](https://github.com/ctripcorp/apollo/issues/451) (reference purpose only for the community)
<table>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ctrip.png" alt="携程"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bluestone.png" alt="青石证券"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sagreen.png" alt="沙绿"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/umetrip.jpg" alt="航旅纵横"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhuanzhuan.png" alt="58转转"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/phone580.png" alt="蜂助手"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hainan-airlines.png" alt="海南航空"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cvte.png" alt="CVTE"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mainbo.jpg" alt="明博教育"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/madailicai.png" alt="麻袋理财"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mxnavi.jpg" alt="美行科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/fshows.jpg" alt="首展科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/feezu.png" alt="易微行"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rencaijia.png" alt="人才加"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/keking.png" alt="凯京集团"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/leoao.png" alt="乐刻运动"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dji.png" alt="大疆"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kkmh.png" alt="快看漫画"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wolaidai.png" alt="我来贷"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xsrj.png" alt="虚实软件"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yanxuan.png" alt="网易严选"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sjzg.png" alt="视觉中国"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zc360.png" alt="资产360"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ecarx.png" alt="亿咖通"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/5173.png" alt="5173"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hujiang.png" alt="沪江"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/163yun.png" alt="网易云基础服务"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cash-bus.png" alt="现金巴士"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/smartisan.png" alt="锤子科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/toodc.png" alt="头等仓"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/juneyaoair.png" alt="吉祥航空"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/263mobile.png" alt="263移动通信"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/toutoujinrong.png" alt="投投金融"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mytijian.png" alt="每天健康"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/maiyabank.png" alt="麦芽金服"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/fengunion.png" alt="蜂向科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/geex-logo.png" alt="即科金融"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/beike.png" alt="贝壳网"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/youzan.png" alt="有赞"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yunjihuitong.png" alt="云集汇通"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rhinotech.png" alt="犀牛瀚海科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/nxin.png" alt="农信互联"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mgzf.png" alt="蘑菇租房"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/huli-logo.png" alt="狐狸金服"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mandao.png" alt="漫道集团"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/enmonster.png" alt="怪兽充电"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/nanguazufang.png" alt="南瓜租房"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shitoujinrong.png" alt="石投金融"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tubatu.png" alt="土巴兔"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/payh_logo.png" alt="平安银行"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xinxindai.png" alt="新新贷"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/chrtc.png" alt="中国华戎科技集团"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tuya_logo.png" alt="涂鸦智能"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/szlcsc.jpg" alt="立创商城"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hairongyi.png" alt="乐赚金服"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kxqc.png" alt="开心汽车"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ppcredit.png" alt="乐赚金服"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/primeton.png" alt="普元信息"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hoskeeper.png" alt="医帮管家"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/fula.png" alt="付啦信用卡管家"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/uzai.png" alt="悠哉网"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/91wutong.png" alt="梧桐诚选"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ppdai.png" alt="拍拍贷"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xinyongfei.png" alt="信用飞"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dxy.png" alt="丁香园"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ghtech.png" alt="国槐科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/qbb.png" alt="亲宝宝"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/huawei_logo.png" alt="华为视频直播"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/weiboyi.png" alt="微播易"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ofpay.png" alt="欧飞"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mishuo.png" alt="迷说"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yixia.png" alt="一下科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/daocloud.png" alt="DaoCloud"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cnvex.png" alt="汽摩交易所"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/100tal.png" alt="好未来教育集团"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ainirobot.png" alt="猎户星空"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhuojian.png" alt="卓健科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/enjoyor.png" alt="银江股份"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tuhu.png" alt="途虎养车"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/homedo.png" alt="河姆渡"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xwbank.png" alt="新网银行"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ctspcl.png" alt="中旅安信云贷"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/meiyou.png" alt="美柚"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zkh-logo.png" alt="震坤行"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wgss.png" alt="万谷盛世"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/plateno.png" alt="铂涛旅行"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/lifesense.png" alt="乐心"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/reachmedia.png" alt="亿投传媒"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/guxiansheng.png" alt="股先生"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/caixuetang.png" alt="财学堂"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/4399.png" alt="4399"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/autohome.png" alt="汽车之家"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mbcaijing.png" alt="面包财经"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hoopchina.png" alt="虎扑"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sohu-auto.png" alt="搜狐汽车"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/liangfuzhengxin.png" alt="量富征信"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/maihaoche.png" alt="卖好车"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zyiot.jpg" alt="中移物联网"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/biauto.png" alt="易车网"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/maiyaole.png" alt="一药网"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xiaoying.png" alt="小影"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/caibeike.png" alt="彩贝壳"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yeelight.png" alt="YEELIGHT"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/itsgmu.png" alt="积目"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/acmedcare.png" alt="极致医疗"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jinhui365.png" alt="金汇金融"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/900etrip.png" alt="久柏易游"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/24xiaomai.png" alt="小麦铺"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/vvic.png" alt="搜款网"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mizlicai.png" alt="米庄理财"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bjt.png" alt="贝吉塔网络科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/weimob.png" alt="微盟"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kada.png" alt="网易卡搭"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kapbook.png" alt="股书"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jumore.png" alt="聚贸"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bimface.png" alt="广联达bimface"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/globalgrow.png" alt="环球易购"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jollychic.png" alt="浙江执御"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/2dfire.jpg" alt="二维火"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shopin.png" alt="上品"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/inspur.png" alt="浪潮集团"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ngarihealth.png" alt="纳里健康"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/oraro.png" alt="橙红科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dragonpass.png" alt="龙腾出行"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/lizhi.fm.png" alt="荔枝"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/htd.png" alt="汇通达"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yunrong.png" alt="云融金科"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tszg360.png" alt="天生掌柜"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rongplus.png" alt="容联光辉"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/intellif.png" alt="云天励飞"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jiayundata.png" alt="嘉云数据"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zts.png" alt="中泰证券网络金融部"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/163dun.png" alt="网易易盾"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xiangwushuo.png" alt="享物说"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sto.png" alt="申通"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jinhe.png" alt="金和网络"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/2345.png" alt="二三四五"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/chtwm.jpg" alt="恒天财富"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/uweixin.png" alt="沐雪微信"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wzeye.png" alt="温州医科大学附属眼视光医院"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/10010pay.png" alt="联通支付"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shanshu.png" alt="杉数科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/fenlibao.png" alt="分利宝"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hetao101.png" alt="核桃编程"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xiaohongshu.png" alt="小红书"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/blissmall.png" alt="幸福西饼"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ky-express.png" alt="跨越速运"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/oyohotels.png" alt="OYO"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/100-me.png" alt="叮咚买菜"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhidaohulian.jpg" alt="智道网联"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xueqiu.jpg" alt="雪球"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/autocloudpro.png" alt="车通云"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dadaabc.png" alt="哒哒英语"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xedaojia.jpg" alt="小E微店"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/daling.png" alt="达令家"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/renliwo.png" alt="人力窝"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mocire.jpg" alt="嘉美在线"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/uepay.png" alt="极易付"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wdom.png" alt="智慧开源"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cheshiku.png" alt="车仕库"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/taimeitech.png" alt="太美医疗科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yilianbaihui.png" alt="亿联百汇"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhoupu123.png" alt="舟谱数据"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/frxs.png" alt="芙蓉兴盛"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/beastshop.png" alt="野兽派"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kaishustory.png" alt="凯叔讲故事"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/haodf.png" alt="好大夫在线"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/insyunmi.png" alt="云幂信息技术"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/duiba.png" alt="兑吧"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/9ji.png" alt="九机网"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sui.png" alt="随手科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/aixiangdao.png" alt="万谷盛世"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yunzhangfang.png" alt="云账房"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yuantutech.png" alt="浙江远图互联"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/qk365.png" alt="青客公寓"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/eastmoney.png" alt="东方财富"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jikexiu.png" alt="极客修"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/meix.png" alt="美市科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zto.png" alt="中通快递"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/e6yun.png" alt="易流科技"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xiaoyuanzhao.png" alt="实习僧"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dalingjia.png" alt="达令家"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/secoo.png" alt="寺库"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/lianlianpay.png" alt="连连支付"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhongan.png" alt="众安保险"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/360jinrong.png" alt="360金融"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/caschina.png" alt="中航服商旅"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ke.png" alt="贝壳"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yeahmobi.png" alt="Yeahmobi易点天下"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/idengyun.png" alt="北京登云美业网络科技有限公司"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jinher.png" alt="金和网络"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/komect.png" alt="中移(杭州)信息技术有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/beisen.png" alt="北森"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/log56.png" alt="合肥维天运通"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/meboth.png" alt="北京蜜步科技有限公司"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/postop.png" alt="术康"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rfchina.png" alt="富力集团"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tfxing.png" alt="天府行"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/8travelpay.png" alt="八商山"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/centaline.png" alt="中原地产"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zkyda.png" alt="智科云达"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/house730.png" alt="中原730"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/pagoda.png" alt="百果园"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bolome.png" alt="波罗蜜"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xignite.png" alt="Xignite"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/aduer.png" alt="杭州有云科技有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jojoreading.png" alt="成都书声科技有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sweetome.png" alt="斯维登集团"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/vipthink.png" alt="广东快乐种子科技有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tongxuecool.png" alt="上海盈翼文化传播有限公司"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sccfc.png" alt="上海尚诚消费金融股份有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ziroom.png" alt="自如网"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jd.png" alt="京东"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rabbitpre.png" alt="兔展智能"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhubei.png" alt="竹贝"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/imile.png" alt="iMile(中东)"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/helloglobal.png" alt="哈罗出行"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhaopin.png" alt="智联招聘"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/acadsoc.png" alt="阿卡索"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mojory.png" alt="妙知旅"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/chengduoduo.png" alt="程多多"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/baojunev.png" alt="上汽通用五菱"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/leyan.png" alt="乐言科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dushu.png" alt="樊登读书"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zyiz.png" alt="找一找教程网"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bppc.png" alt="中油碧辟石油有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shanglv51.png" alt="四川商旅无忧科技服务有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/waijiao365.png" alt="懿鸢网络科技(上海)有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/gaoding.jpg" alt="稿定科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ricacorp.png" alt="搵樓 - 利嘉閣"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/t3go.png" alt="南京领行科技股份有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mokahr.jpg" alt="北京希瑞亚斯科技有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/printrainbow.png" alt="印彩虹印刷公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/milliontech.png" alt="Million Tech"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/guoguokeji.jpg" alt="果果科技"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/airkunming.png" alt="昆明航空"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/5i5j.png" alt="我爱我家"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/gjzq.png" alt="国金证券"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/enjoymusic.jpg" alt="不亦乐乎"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cnhnb.png" alt="惠农网"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/daoklab.jpg" alt="成都道壳"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ausnutria.jpg" alt="澳优乳业"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/deiyoudian.png" alt="河南有态度信息科技有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ezhiyang.png" alt="智阳第一人力"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shie.png" alt="上海保险交易所"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wsecar.png" alt="万顺叫车"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shouqinba.jpg" alt="收钱吧"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/baozun.png" alt="宝尊电商"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xbnwl.png" alt="喜百年供应链"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/gwwisdom.png" alt="南京观为智慧软件科技有限公司"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ztrip.png" alt="在途商旅"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hualala.png" alt="哗啦啦"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xin.png" alt="优信二手车"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/maycur.png" alt="每刻科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bullyun.png" alt="杭州蛮牛"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bestpay.png" alt="翼支付"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mockuai.png" alt="魔筷科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ct108.png" alt="畅唐网络"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jusdaglobal.jpg" alt="准时达"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/izaodao.png" alt="早道网校"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ovopark.jpg" alt="万店掌"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/funstory.jpg" alt="推文科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/lemonbox.png" alt="Lemonbox"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/polyt.png" alt="保利票务"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/chipwing.png" alt="芯翼科技"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/czbank.png" alt="浙商银行"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/czbyqy.png" alt="易企银科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yundun.jpg" alt="上海云盾"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/gaiaworks.jpg" alt="苏州盖雅信息技术有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mengxiang.png" alt="爱库存"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jidouauto.png" alt="极豆车联网"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ipalfish.png" alt="伴鱼少儿英语"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/iqboard.png" alt="锐达科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/koolearn.png" alt="新东方在线"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kingcome.png" alt="金康高科"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/soulapp.png" alt="soul"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ezrpro.png" alt="驿氪"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hc360.png" alt="慧聪"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/21cp.png" alt="中塑在线"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/goinglink.jpg" alt="甄云科技"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/aitrace.jpg" alt="追溯科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/moqipobing.png" alt="玩吧"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cassan.png" alt="广州卡桑信息技术有限公司"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shuidichou.png" alt="水滴"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kuwo.png" alt="酷我音乐"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mi.png" alt="小米"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mvmyun.png" alt="今典"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/visabao.jpg" alt="签宝科技"></td>
<td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/inrice.png" alt="广州趣米网络科技有限公司"></td>
<td><a target="_blank" href="https://github.com/ctripcorp/apollo/issues/451">More...</a></td>
</tr>
</table>
# Awards
<img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/awards/oschina-2018-award.jpg" width="240px" alt="The most popular Chinese open source software in 2018">
# Stargazers over time
[](https://starcharts.herokuapp.com/ctripcorp/apollo)
| -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./docs/zh/deployment/quick-start-docker.md | 如果您对Docker非常熟悉,可以使用Docker的方式快速部署Apollo,从而快速的了解Apollo。如果您对Docker并不是很了解,请参考[常规方式部署Quick Start](zh/deployment/quick-start)。
另外需要说明的是,不管是Docker方式部署Quick Start还是常规方式部署的,Quick Start只是用来快速入门、了解Apollo。如果部署Apollo在公司中使用,请参考[分布式部署指南](zh/deployment/distributed-deployment-guide)。
> 由于Docker对windows的支持并不是很好,所以不建议您在windows环境下使用Docker方式部署,除非您对windows docker非常了解
## 一、 准备工作
### 1.1 安装Docker
具体步骤可以参考[Docker安装指南](https://yeasy.gitbooks.io/docker_practice/content/install/),通过以下命令测试是否成功安装
```
docker -v
```
为了加速Docker镜像下载,建议[配置镜像加速器](https://yeasy.gitbooks.io/docker_practice/content/install/mirror.html)。
### 1.2 下载Docker Quick Start配置文件
确保[docker-quick-start](https://github.com/ctripcorp/apollo/tree/master/scripts/docker-quick-start)文件夹已经在本地存在,如果本地已经clone过Apollo的代码,则可以跳过此步骤。
## 二、启动Apollo配置中心
在docker-quick-start目录下执行`docker-compose up`,第一次执行会触发下载镜像等操作,需要耐心等待一些时间。
搜索所有`apollo-quick-start`开头的日志,看到以下日志说明启动成功:
```log
apollo-quick-start | ==== starting service ====
apollo-quick-start | Service logging file is ./service/apollo-service.log
apollo-quick-start | Started [45]
apollo-quick-start | Waiting for config service startup.......
apollo-quick-start | Config service started. You may visit http://localhost:8080 for service status now!
apollo-quick-start | Waiting for admin service startup......
apollo-quick-start | Admin service started
apollo-quick-start | ==== starting portal ====
apollo-quick-start | Portal logging file is ./portal/apollo-portal.log
apollo-quick-start | Started [254]
apollo-quick-start | Waiting for portal startup.......
apollo-quick-start | Portal started. You can visit http://localhost:8070 now!
```
> 注1:数据库的端口映射为13306,所以如果希望在宿主机上访问数据库,可以通过localhost:13306,用户名是root,密码留空。
> 注2:如要查看更多服务的日志,可以通过`docker exec -it apollo-quick-start bash`登录, 然后到`/apollo-quick-start/service`和`/apollo-quick-start/portal`下查看日志信息。
## 三、使用Apollo配置中心
使用相关步骤可以参考[Quick Start - 四、使用Apollo配置中心](zh/deployment/quick-start#四、使用apollo配置中心)
需要注意的是,在Docker环境下需要通过下面的命令运行Demo客户端:
```bash
docker exec -i apollo-quick-start /apollo-quick-start/demo.sh client
```
默认情况下 apollo-configservice 只会注册内网 IP,只有通过上述命令启动的客户端能连通,如果希望外部的客户端也能访问,请参考[网络策略](zh/deployment/distributed-deployment-guide?id=_14-网络策略)。 | 如果您对Docker非常熟悉,可以使用Docker的方式快速部署Apollo,从而快速的了解Apollo。如果您对Docker并不是很了解,请参考[常规方式部署Quick Start](zh/deployment/quick-start)。
另外需要说明的是,不管是Docker方式部署Quick Start还是常规方式部署的,Quick Start只是用来快速入门、了解Apollo。如果部署Apollo在公司中使用,请参考[分布式部署指南](zh/deployment/distributed-deployment-guide)。
> 由于Docker对windows的支持并不是很好,所以不建议您在windows环境下使用Docker方式部署,除非您对windows docker非常了解
## 一、 准备工作
### 1.1 安装Docker
具体步骤可以参考[Docker安装指南](https://yeasy.gitbooks.io/docker_practice/content/install/),通过以下命令测试是否成功安装
```
docker -v
```
为了加速Docker镜像下载,建议[配置镜像加速器](https://yeasy.gitbooks.io/docker_practice/content/install/mirror.html)。
### 1.2 下载Docker Quick Start配置文件
确保[docker-quick-start](https://github.com/ctripcorp/apollo/tree/master/scripts/docker-quick-start)文件夹已经在本地存在,如果本地已经clone过Apollo的代码,则可以跳过此步骤。
## 二、启动Apollo配置中心
在docker-quick-start目录下执行`docker-compose up`,第一次执行会触发下载镜像等操作,需要耐心等待一些时间。
搜索所有`apollo-quick-start`开头的日志,看到以下日志说明启动成功:
```log
apollo-quick-start | ==== starting service ====
apollo-quick-start | Service logging file is ./service/apollo-service.log
apollo-quick-start | Started [45]
apollo-quick-start | Waiting for config service startup.......
apollo-quick-start | Config service started. You may visit http://localhost:8080 for service status now!
apollo-quick-start | Waiting for admin service startup......
apollo-quick-start | Admin service started
apollo-quick-start | ==== starting portal ====
apollo-quick-start | Portal logging file is ./portal/apollo-portal.log
apollo-quick-start | Started [254]
apollo-quick-start | Waiting for portal startup.......
apollo-quick-start | Portal started. You can visit http://localhost:8070 now!
```
> 注1:数据库的端口映射为13306,所以如果希望在宿主机上访问数据库,可以通过localhost:13306,用户名是root,密码留空。
> 注2:如要查看更多服务的日志,可以通过`docker exec -it apollo-quick-start bash`登录, 然后到`/apollo-quick-start/service`和`/apollo-quick-start/portal`下查看日志信息。
## 三、使用Apollo配置中心
使用相关步骤可以参考[Quick Start - 四、使用Apollo配置中心](zh/deployment/quick-start#四、使用apollo配置中心)
需要注意的是,在Docker环境下需要通过下面的命令运行Demo客户端:
```bash
docker exec -i apollo-quick-start /apollo-quick-start/demo.sh client
```
默认情况下 apollo-configservice 只会注册内网 IP,只有通过上述命令启动的客户端能连通,如果希望外部的客户端也能访问,请参考[网络策略](zh/deployment/distributed-deployment-guide?id=_14-网络策略)。 | -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./docs/zh/usage/apollo-open-api-platform.md | ### 一、 什么是开放平台?
Apollo提供了一套的Http REST接口,使第三方应用能够自己管理配置。虽然Apollo系统本身提供了Portal来管理配置,但是在有些情景下,应用需要通过程序去管理配置。
### 二、 第三方应用接入Apollo开放平台
#### 2.1 注册第三方应用
第三方应用负责人需要向Apollo管理员提供一些第三方应用基本信息。
基本信息如下:
* 第三方应用的AppId、应用名、部门
* 第三方应用负责人
Apollo管理员在 http://{portal_address}/open/manage.html 创建第三方应用,创建之前最好先查询此AppId是否已经创建。创建成功之后会生成一个token,如下图所示:

#### 2.2 给已注册的第三方应用授权
第三方应用不应该能操作任何Namespace的配置,所以需要给token绑定可以操作的Namespace。Apollo管理员在 http://{portal_address}/open/manage.html 页面给token赋权。赋权之后,第三方应用就可以通过Apollo提供的Http REST接口来管理已授权的Namespace的配置了。
#### 2.3 第三方应用调用Apollo Open API
##### 2.3.1 调用Http REST接口
任何语言的第三方应用都可以调用Apollo的Open API,在调用接口时,需要设置注意以下两点:
* Http Header中增加一个Authorization字段,字段值为申请的token
* Http Header的Content-Type字段需要设置成application/json;charset=UTF-8
##### 2.3.2 Java应用通过apollo-openapi调用Apollo Open API
从1.1.0版本开始,Apollo提供了[apollo-openapi](https://github.com/ctripcorp/apollo/tree/master/apollo-openapi)客户端,所以Java语言的第三方应用可以更方便地调用Apollo Open API。
首先引入`apollo-openapi`依赖:
```xml
<dependency>
<groupId>com.ctrip.framework.apollo</groupId>
<artifactId>apollo-openapi</artifactId>
<version>1.7.0</version>
</dependency>
```
在程序中构造`ApolloOpenApiClient`:
```java
String portalUrl = "http://localhost:8070"; // portal url
String token = "e16e5cd903fd0c97a116c873b448544b9d086de9"; // 申请的token
ApolloOpenApiClient client = ApolloOpenApiClient.newBuilder()
.withPortalUrl(portalUrl)
.withToken(token)
.build();
```
后续就可以通过`ApolloOpenApiClient`的接口直接操作Apollo Open API了,接口说明参见下面的Rest接口文档。
##### 2.3.3 .Net core应用调用Apollo Open API
.Net core也提供了open api的客户端,详见https://github.com/ctripcorp/apollo.net/pull/77
### 三、 接口文档
#### 3.1 URL路径参数说明
参数名 | 参数说明
--- | ---
env | 所管理的配置环境
appId | 所管理的配置AppId
clusterName | 所管理的配置集群名, 一般情况下传入 default 即可。如果是特殊集群,传入相应集群的名称即可
namespaceName | 所管理的Namespace的名称,如果是非properties格式,需要加上后缀名,如`sample.yml`
#### 3.2 API接口列表
##### 3.2.1 获取App的环境,集群信息
* **URL** : http://{portal_address}/openapi/v1/apps/{appId}/envclusters
* **Method** : GET
* **Request Params** : 无
* **返回值Sample**:
``` json
[
{
"env":"FAT",
"clusters":[ //集群列表
"default",
"FAT381"
]
},
{
"env":"UAT",
"clusters":[
"default"
]
},
{
"env":"PRO",
"clusters":[
"default",
"SHAOY",
"SHAJQ"
]
}
]
```
##### 3.2.2 获取App信息
* **URL** : http://{portal_address}/openapi/v1/apps
* **Method** : GET
* **Request Params** :
参数名 | 必选 | 类型 | 说明
--- | --- | --- | ---
appIds | false | String | appId列表,以逗号分隔,如果为空则返回所有App信息
* **返回值Sample**:
``` json
[
{
"name":"first_app",
"appId":"100003171",
"orgId":"development",
"orgName":"研发部",
"ownerName":"apollo",
"ownerEmail":"test@test.com",
"dataChangeCreatedBy":"apollo",
"dataChangeLastModifiedBy":"apollo",
"dataChangeCreatedTime":"2019-05-08T09:13:31.000+0800",
"dataChangeLastModifiedTime":"2019-05-08T09:13:31.000+0800"
},
{
"name":"apollo-demo",
"appId":"100004458",
"orgId":"development",
"orgName":"产品研发部",
"ownerName":"apollo",
"ownerEmail":"apollo@cmcm.com",
"dataChangeCreatedBy":"apollo",
"dataChangeLastModifiedBy":"apollo",
"dataChangeCreatedTime":"2018-12-23T12:35:16.000+0800",
"dataChangeLastModifiedTime":"2019-04-08T13:58:36.000+0800"
}
]
```
##### 3.2.3 获取集群接口
* **URL** : http://{portal_address}/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}
* **Method** : GET
* **Request Params** :无
* **返回值Sample**:
``` json
{
"name":"default",
"appId":"100004458",
"dataChangeCreatedBy":"apollo",
"dataChangeLastModifiedBy":"apollo",
"dataChangeCreatedTime":"2018-12-23T12:35:16.000+0800",
"dataChangeLastModifiedTime":"2018-12-23T12:35:16.000+0800"
}
```
##### 3.2.4 创建集群接口
可以通过此接口创建集群,调用此接口需要授予第三方APP对目标APP的管理权限。
* **URL** : http://{portal_address}/openapi/v1/envs/{env}/apps/{appId}/clusters
* **Method** : POST
* **Request Params** :无
* **请求内容(Request Body, JSON格式)** :
参数名 | 必选 | 类型 | 说明
---- | --- | --- | ---
name | true | String | Cluster的名字
appId | true | String | Cluster所属的AppId
dataChangeCreatedBy | true | String | namespace的创建人,格式为域账号,也就是sso系统的User ID
* **返回值 Sample** :
``` json
{
"name":"someClusterName",
"appId":"100004458",
"dataChangeCreatedBy":"apollo",
"dataChangeLastModifiedBy":"apollo",
"dataChangeCreatedTime":"2018-12-23T12:35:16.000+0800",
"dataChangeLastModifiedTime":"2018-12-23T12:35:16.000+0800"
}
```
##### 3.2.5 获取集群下所有Namespace信息接口
* **URL** : http://{portal_address}/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces
* **Method**: GET
* **Request Params**: 无
* **返回值Sample**:
``` json
[
{
"appId": "100003171",
"clusterName": "default",
"namespaceName": "application",
"comment": "default app namespace",
"format": "properties", //Namespace格式可能取值为:properties、xml、json、yml、yaml
"isPublic": false, //是否为公共的Namespace
"items": [ // Namespace下所有的配置集合
{
"key": "batch",
"value": "100",
"dataChangeCreatedBy": "song_s",
"dataChangeLastModifiedBy": "song_s",
"dataChangeCreatedTime": "2016-07-21T16:03:43.000+0800",
"dataChangeLastModifiedTime": "2016-07-21T16:03:43.000+0800"
}
],
"dataChangeCreatedBy": "song_s",
"dataChangeLastModifiedBy": "song_s",
"dataChangeCreatedTime": "2016-07-20T14:05:58.000+0800",
"dataChangeLastModifiedTime": "2016-07-20T14:05:58.000+0800"
},
{
"appId": "100003171",
"clusterName": "default",
"namespaceName": "FX.apollo",
"comment": "apollo public namespace",
"format": "properties",
"isPublic": true,
"items": [
{
"key": "request.timeout",
"value": "3000",
"comment": "",
"dataChangeCreatedBy": "song_s",
"dataChangeLastModifiedBy": "song_s",
"dataChangeCreatedTime": "2016-07-20T14:08:30.000+0800",
"dataChangeLastModifiedTime": "2016-08-01T13:56:25.000+0800"
},
{
"id": 1116,
"key": "batch",
"value": "3000",
"comment": "",
"dataChangeCreatedBy": "song_s",
"dataChangeLastModifiedBy": "song_s",
"dataChangeCreatedTime": "2016-07-28T15:13:42.000+0800",
"dataChangeLastModifiedTime": "2016-08-01T13:51:00.000+0800"
}
],
"dataChangeCreatedBy": "song_s",
"dataChangeLastModifiedBy": "song_s",
"dataChangeCreatedTime": "2016-07-20T14:08:13.000+0800",
"dataChangeLastModifiedTime": "2016-07-20T14:08:13.000+0800"
}
]
```
##### 3.2.6 获取某个Namespace信息接口
* **URL** : http://{portal_address}/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}
* **Method** : GET
* **Request Params** :无
* **返回值Sample** :
``` json
{
"appId": "100003171",
"clusterName": "default",
"namespaceName": "application",
"comment": "default app namespace",
"format": "properties", //Namespace格式可能取值为:properties、xml、json、yml、yaml
"isPublic": false, //是否为公共的Namespace
"items": [ // Namespace下所有的配置集合
{
"key": "batch",
"value": "100",
"dataChangeCreatedBy": "song_s",
"dataChangeLastModifiedBy": "song_s",
"dataChangeCreatedTime": "2016-07-21T16:03:43.000+0800",
"dataChangeLastModifiedTime": "2016-07-21T16:03:43.000+0800"
}
],
"dataChangeCreatedBy": "song_s",
"dataChangeLastModifiedBy": "song_s",
"dataChangeCreatedTime": "2016-07-20T14:05:58.000+0800",
"dataChangeLastModifiedTime": "2016-07-20T14:05:58.000+0800"
}
```
##### 3.2.7 创建Namespace
可以通过此接口创建Namespace,调用此接口需要授予第三方APP对目标APP的管理权限。
* **URL** : http://{portal_address}/openapi/v1/apps/{appId}/appnamespaces
* **Method** : POST
* **Request Params** :无
* **请求内容(Request Body, JSON格式)** :
参数名 | 必选 | 类型 | 说明
---- | --- | --- | ---
name | true | String | Namespace的名字
appId | true | String | Namespace所属的AppId
format |true | String | Namespace的格式,**只能是以下类型: properties、xml、json、yml、yaml**
isPublic |true | boolean | 是否是公共文件
comment |false | String | Namespace说明
dataChangeCreatedBy | true | String | namespace的创建人,格式为域账号,也就是sso系统的User ID
* **返回值 Sample** :
``` json
{
"name": "FX.public-0420-11",
"appId": "100003173",
"format": "properties",
"isPublic": true,
"comment": "test",
"dataChangeCreatedBy": "zhanglea",
"dataChangeLastModifiedBy": "zhanglea",
"dataChangeCreatedTime": "2017-04-20T18:25:49.033+0800",
"dataChangeLastModifiedTime": "2017-04-20T18:25:49.033+0800"
}
```
* **返回值说明** :
> 如果是properties文件,name = ${appId所属的部门}.${传入的name值} ,例如调用接口传入的name=xy-z, format=properties,应用的部门为框架(FX),那么name=FX.xy-z
> 如果不是properties文件 name = ${appId所属的部门}.${传入的name值}.${format},例如调用接口传入的name=xy-z, format=json,应用的部门为框架(FX),那么name=FX.xy-z.json
##### 3.2.8 获取某个Namespace当前编辑人接口
Apollo在生产环境(PRO)有限制规则:每次发布只能有一个人编辑配置,且该次发布的人不能是该次发布的编辑人。
也就是说如果一个用户A修改了某个namespace的配置,那么在这个namespace发布前,只能由A修改,其它用户无法修改。同时,该用户A无法发布自己修改的配置,必须找另一个有发布权限的人操作。
这个接口就是用来获取当前namespace是否有人锁定的接口。在非生产环境(FAT、UAT),该接口始终返回没有人锁定。
* **URL** : http://{portal_address}/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock
* **Method** : GET
* **Request Params** :无
* **返回值 Sample(未锁定)** :
``` json
{
"namespaceName": "application",
"isLocked": false
}
```
* **返回值Sample(被锁定)** :
``` json
{
"namespaceName": "application",
"isLocked": true,
"lockedBy": "song_s" //锁owner
}
```
##### 3.2.9 读取配置接口
* **URL** : http://{portal_address}/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}
* **Method** : GET
* **Request Params** :无
* **返回值Sample** :
``` json
{
"key": "timeout",
"value": "3000",
"comment": "超时时间",
"dataChangeCreatedBy": "zhanglea",
"dataChangeLastModifiedBy": "zhanglea",
"dataChangeCreatedTime": "2016-08-11T12:06:41.818+0800",
"dataChangeLastModifiedTime": "2016-08-11T12:06:41.818+0800"
}
```
##### 3.2.10 新增配置接口
* **URL** : http://{portal_address}/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items
* **Method** : POST
* **Request Params** :无
* **请求内容(Request Body, JSON格式)** :
参数名 | 必选 | 类型 | 说明
---- | --- | --- | ---
key | true | String | 配置的key,长度不能超过128个字符。非properties格式,key固定为`content`
value | true | String | 配置的value,长度不能超过20000个字符,非properties格式,value为文件全部内容
comment | false | String | 配置的备注,长度不能超过256个字符
dataChangeCreatedBy | true | String | item的创建人,格式为域账号,也就是sso系统的User ID
* **Request body sample** :
``` json
{
"key":"timeout",
"value":"3000",
"comment":"超时时间",
"dataChangeCreatedBy":"zhanglea"
}
```
* **返回值Sample** :
``` json
{
"key": "timeout",
"value": "3000",
"comment": "超时时间",
"dataChangeCreatedBy": "zhanglea",
"dataChangeLastModifiedBy": "zhanglea",
"dataChangeCreatedTime": "2016-08-11T12:06:41.818+0800",
"dataChangeLastModifiedTime": "2016-08-11T12:06:41.818+0800"
}
```
##### 3.2.11 修改配置接口
* **URL** : http://{portal_address}/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}
* **Method** : PUT
* **Request Params** :
参数名 | 必选 | 类型 | 说明
--- | --- | --- | ---
createIfNotExists | false | Boolean | 当配置不存在时是否自动创建
* **请求内容(Request Body, JSON格式)** :
参数名 | 必选 | 类型 | 说明
---- | --- | --- | ---
key | true | String | 配置的key,需和url中的key值一致。非properties格式,key固定为`content`
value | true | String | 配置的value,长度不能超过20000个字符,非properties格式,value为文件全部内容
comment | false | String | 配置的备注,长度不能超过256个字符
dataChangeLastModifiedBy | true | String | item的修改人,格式为域账号,也就是sso系统的User ID
dataChangeCreatedBy | false | String | 当createIfNotExists为true时必选。item的创建人,格式为域账号,也就是sso系统的User ID
* **Request body sample** :
```json
{
"key":"timeout",
"value":"3000",
"comment":"超时时间",
"dataChangeLastModifiedBy":"zhanglea"
}
```
* **返回值** :无
##### 3.2.12 删除配置接口
* **URL** : http://{portal_address}/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}?operator={operator}
* **Method** : DELETE
* **Request Params** :
参数名 | 必选 | 类型 | 说明
--- | --- | --- | ---
key | true | String | 配置的key。非properties格式,key固定为`content`
operator | true | String | 删除配置的操作者,域账号
* **返回值** : 无
##### 3.2.13 发布配置接口
* **URL** : http://{portal_address}/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases
* **Method** : POST
* **Request Params** :无
* **Request Body** :
参数名 | 必选 | 类型 | 说明
--- | --- | --- | ---
releaseTitle | true | String | 此次发布的标题,长度不能超过64个字符
releaseComment | false | String | 发布的备注,长度不能超过256个字符
releasedBy | true | String | 发布人,域账号,注意:如果`ApolloConfigDB.ServerConfig`中的`namespace.lock.switch`设置为true的话(默认是false),那么该环境不允许发布人和编辑人为同一人。所以如果编辑人是zhanglea,发布人就不能再是zhanglea。
* **Request Body example** :
```json
{
"releaseTitle":"2016-08-11",
"releaseComment":"修改timeout值",
"releasedBy":"zhanglea"
}
```
* **返回值Sample** :
``` json
{
"appId": "test-0620-01",
"clusterName": "test",
"namespaceName": "application",
"name": "2016-08-11",
"configurations": {
"timeout": "3000",
},
"comment": "修改timeout值",
"dataChangeCreatedBy": "zhanglea",
"dataChangeLastModifiedBy": "zhanglea",
"dataChangeCreatedTime": "2016-08-11T14:03:46.232+0800",
"dataChangeLastModifiedTime": "2016-08-11T14:03:46.235+0800"
}
```
##### 3.2.14 获取某个Namespace当前生效的已发布配置接口
* **URL** : http://{portal_address}/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest
* **Method** : GET
* **Request Params** :无
* **返回值Sample** :
``` json
{
"appId": "test-0620-01",
"clusterName": "test",
"namespaceName": "application",
"name": "2016-08-11",
"configurations": {
"timeout": "3000",
},
"comment": "修改timeout值",
"dataChangeCreatedBy": "zhanglea",
"dataChangeLastModifiedBy": "zhanglea",
"dataChangeCreatedTime": "2016-08-11T14:03:46.232+0800",
"dataChangeLastModifiedTime": "2016-08-11T14:03:46.235+0800"
}
```
##### 3.2.15 回滚已发布配置接口
* **URL** : http://{portal_address}/openapi/v1/envs/{env}/releases/{releaseId}/rollback
* **Method** : PUT
* **Request Params** :
参数名 | 必选 | 类型 | 说明
--- | --- | --- | ---
operator | true | String | 删除配置的操作者,域账号
* **返回值** : 无
### 四、错误码说明
正常情况下,接口返回的Http状态码是200,下面列举了Apollo会返回的非200错误码说明。
#### 4.1 400 - Bad Request
客户端传入参数的错误,如操作人不存在,namespace不存在等等,客户端需要根据提示信息检查对应的参数是否正确。
#### 4.2 401 - Unauthorized
接口传入的token非法或者已过期,客户端需要检查token是否传入正确。
#### 4.3 403 - Forbidden
接口要访问的资源未得到授权,比如只授权了对A应用下Namespace的管理权限,但是却尝试管理B应用下的配置。
#### 4.4 404 - Not Found
接口要访问的资源不存在,一般是URL或URL的参数错误。
#### 4.5 405 - Method Not Allowed
接口访问的Method不正确,比如应该使用POST的接口使用了GET访问等,客户端需要检查接口访问方式是否正确。
#### 4.6 500 - Internal Server Error
其它类型的错误默认都会返回500,对这类错误如果应用无法根据提示信息找到原因的话,可以找Apollo研发团队一起排查问题。
| ### 一、 什么是开放平台?
Apollo提供了一套的Http REST接口,使第三方应用能够自己管理配置。虽然Apollo系统本身提供了Portal来管理配置,但是在有些情景下,应用需要通过程序去管理配置。
### 二、 第三方应用接入Apollo开放平台
#### 2.1 注册第三方应用
第三方应用负责人需要向Apollo管理员提供一些第三方应用基本信息。
基本信息如下:
* 第三方应用的AppId、应用名、部门
* 第三方应用负责人
Apollo管理员在 http://{portal_address}/open/manage.html 创建第三方应用,创建之前最好先查询此AppId是否已经创建。创建成功之后会生成一个token,如下图所示:

#### 2.2 给已注册的第三方应用授权
第三方应用不应该能操作任何Namespace的配置,所以需要给token绑定可以操作的Namespace。Apollo管理员在 http://{portal_address}/open/manage.html 页面给token赋权。赋权之后,第三方应用就可以通过Apollo提供的Http REST接口来管理已授权的Namespace的配置了。
#### 2.3 第三方应用调用Apollo Open API
##### 2.3.1 调用Http REST接口
任何语言的第三方应用都可以调用Apollo的Open API,在调用接口时,需要设置注意以下两点:
* Http Header中增加一个Authorization字段,字段值为申请的token
* Http Header的Content-Type字段需要设置成application/json;charset=UTF-8
##### 2.3.2 Java应用通过apollo-openapi调用Apollo Open API
从1.1.0版本开始,Apollo提供了[apollo-openapi](https://github.com/ctripcorp/apollo/tree/master/apollo-openapi)客户端,所以Java语言的第三方应用可以更方便地调用Apollo Open API。
首先引入`apollo-openapi`依赖:
```xml
<dependency>
<groupId>com.ctrip.framework.apollo</groupId>
<artifactId>apollo-openapi</artifactId>
<version>1.7.0</version>
</dependency>
```
在程序中构造`ApolloOpenApiClient`:
```java
String portalUrl = "http://localhost:8070"; // portal url
String token = "e16e5cd903fd0c97a116c873b448544b9d086de9"; // 申请的token
ApolloOpenApiClient client = ApolloOpenApiClient.newBuilder()
.withPortalUrl(portalUrl)
.withToken(token)
.build();
```
后续就可以通过`ApolloOpenApiClient`的接口直接操作Apollo Open API了,接口说明参见下面的Rest接口文档。
##### 2.3.3 .Net core应用调用Apollo Open API
.Net core也提供了open api的客户端,详见https://github.com/ctripcorp/apollo.net/pull/77
### 三、 接口文档
#### 3.1 URL路径参数说明
参数名 | 参数说明
--- | ---
env | 所管理的配置环境
appId | 所管理的配置AppId
clusterName | 所管理的配置集群名, 一般情况下传入 default 即可。如果是特殊集群,传入相应集群的名称即可
namespaceName | 所管理的Namespace的名称,如果是非properties格式,需要加上后缀名,如`sample.yml`
#### 3.2 API接口列表
##### 3.2.1 获取App的环境,集群信息
* **URL** : http://{portal_address}/openapi/v1/apps/{appId}/envclusters
* **Method** : GET
* **Request Params** : 无
* **返回值Sample**:
``` json
[
{
"env":"FAT",
"clusters":[ //集群列表
"default",
"FAT381"
]
},
{
"env":"UAT",
"clusters":[
"default"
]
},
{
"env":"PRO",
"clusters":[
"default",
"SHAOY",
"SHAJQ"
]
}
]
```
##### 3.2.2 获取App信息
* **URL** : http://{portal_address}/openapi/v1/apps
* **Method** : GET
* **Request Params** :
参数名 | 必选 | 类型 | 说明
--- | --- | --- | ---
appIds | false | String | appId列表,以逗号分隔,如果为空则返回所有App信息
* **返回值Sample**:
``` json
[
{
"name":"first_app",
"appId":"100003171",
"orgId":"development",
"orgName":"研发部",
"ownerName":"apollo",
"ownerEmail":"test@test.com",
"dataChangeCreatedBy":"apollo",
"dataChangeLastModifiedBy":"apollo",
"dataChangeCreatedTime":"2019-05-08T09:13:31.000+0800",
"dataChangeLastModifiedTime":"2019-05-08T09:13:31.000+0800"
},
{
"name":"apollo-demo",
"appId":"100004458",
"orgId":"development",
"orgName":"产品研发部",
"ownerName":"apollo",
"ownerEmail":"apollo@cmcm.com",
"dataChangeCreatedBy":"apollo",
"dataChangeLastModifiedBy":"apollo",
"dataChangeCreatedTime":"2018-12-23T12:35:16.000+0800",
"dataChangeLastModifiedTime":"2019-04-08T13:58:36.000+0800"
}
]
```
##### 3.2.3 获取集群接口
* **URL** : http://{portal_address}/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}
* **Method** : GET
* **Request Params** :无
* **返回值Sample**:
``` json
{
"name":"default",
"appId":"100004458",
"dataChangeCreatedBy":"apollo",
"dataChangeLastModifiedBy":"apollo",
"dataChangeCreatedTime":"2018-12-23T12:35:16.000+0800",
"dataChangeLastModifiedTime":"2018-12-23T12:35:16.000+0800"
}
```
##### 3.2.4 创建集群接口
可以通过此接口创建集群,调用此接口需要授予第三方APP对目标APP的管理权限。
* **URL** : http://{portal_address}/openapi/v1/envs/{env}/apps/{appId}/clusters
* **Method** : POST
* **Request Params** :无
* **请求内容(Request Body, JSON格式)** :
参数名 | 必选 | 类型 | 说明
---- | --- | --- | ---
name | true | String | Cluster的名字
appId | true | String | Cluster所属的AppId
dataChangeCreatedBy | true | String | namespace的创建人,格式为域账号,也就是sso系统的User ID
* **返回值 Sample** :
``` json
{
"name":"someClusterName",
"appId":"100004458",
"dataChangeCreatedBy":"apollo",
"dataChangeLastModifiedBy":"apollo",
"dataChangeCreatedTime":"2018-12-23T12:35:16.000+0800",
"dataChangeLastModifiedTime":"2018-12-23T12:35:16.000+0800"
}
```
##### 3.2.5 获取集群下所有Namespace信息接口
* **URL** : http://{portal_address}/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces
* **Method**: GET
* **Request Params**: 无
* **返回值Sample**:
``` json
[
{
"appId": "100003171",
"clusterName": "default",
"namespaceName": "application",
"comment": "default app namespace",
"format": "properties", //Namespace格式可能取值为:properties、xml、json、yml、yaml
"isPublic": false, //是否为公共的Namespace
"items": [ // Namespace下所有的配置集合
{
"key": "batch",
"value": "100",
"dataChangeCreatedBy": "song_s",
"dataChangeLastModifiedBy": "song_s",
"dataChangeCreatedTime": "2016-07-21T16:03:43.000+0800",
"dataChangeLastModifiedTime": "2016-07-21T16:03:43.000+0800"
}
],
"dataChangeCreatedBy": "song_s",
"dataChangeLastModifiedBy": "song_s",
"dataChangeCreatedTime": "2016-07-20T14:05:58.000+0800",
"dataChangeLastModifiedTime": "2016-07-20T14:05:58.000+0800"
},
{
"appId": "100003171",
"clusterName": "default",
"namespaceName": "FX.apollo",
"comment": "apollo public namespace",
"format": "properties",
"isPublic": true,
"items": [
{
"key": "request.timeout",
"value": "3000",
"comment": "",
"dataChangeCreatedBy": "song_s",
"dataChangeLastModifiedBy": "song_s",
"dataChangeCreatedTime": "2016-07-20T14:08:30.000+0800",
"dataChangeLastModifiedTime": "2016-08-01T13:56:25.000+0800"
},
{
"id": 1116,
"key": "batch",
"value": "3000",
"comment": "",
"dataChangeCreatedBy": "song_s",
"dataChangeLastModifiedBy": "song_s",
"dataChangeCreatedTime": "2016-07-28T15:13:42.000+0800",
"dataChangeLastModifiedTime": "2016-08-01T13:51:00.000+0800"
}
],
"dataChangeCreatedBy": "song_s",
"dataChangeLastModifiedBy": "song_s",
"dataChangeCreatedTime": "2016-07-20T14:08:13.000+0800",
"dataChangeLastModifiedTime": "2016-07-20T14:08:13.000+0800"
}
]
```
##### 3.2.6 获取某个Namespace信息接口
* **URL** : http://{portal_address}/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}
* **Method** : GET
* **Request Params** :无
* **返回值Sample** :
``` json
{
"appId": "100003171",
"clusterName": "default",
"namespaceName": "application",
"comment": "default app namespace",
"format": "properties", //Namespace格式可能取值为:properties、xml、json、yml、yaml
"isPublic": false, //是否为公共的Namespace
"items": [ // Namespace下所有的配置集合
{
"key": "batch",
"value": "100",
"dataChangeCreatedBy": "song_s",
"dataChangeLastModifiedBy": "song_s",
"dataChangeCreatedTime": "2016-07-21T16:03:43.000+0800",
"dataChangeLastModifiedTime": "2016-07-21T16:03:43.000+0800"
}
],
"dataChangeCreatedBy": "song_s",
"dataChangeLastModifiedBy": "song_s",
"dataChangeCreatedTime": "2016-07-20T14:05:58.000+0800",
"dataChangeLastModifiedTime": "2016-07-20T14:05:58.000+0800"
}
```
##### 3.2.7 创建Namespace
可以通过此接口创建Namespace,调用此接口需要授予第三方APP对目标APP的管理权限。
* **URL** : http://{portal_address}/openapi/v1/apps/{appId}/appnamespaces
* **Method** : POST
* **Request Params** :无
* **请求内容(Request Body, JSON格式)** :
参数名 | 必选 | 类型 | 说明
---- | --- | --- | ---
name | true | String | Namespace的名字
appId | true | String | Namespace所属的AppId
format |true | String | Namespace的格式,**只能是以下类型: properties、xml、json、yml、yaml**
isPublic |true | boolean | 是否是公共文件
comment |false | String | Namespace说明
dataChangeCreatedBy | true | String | namespace的创建人,格式为域账号,也就是sso系统的User ID
* **返回值 Sample** :
``` json
{
"name": "FX.public-0420-11",
"appId": "100003173",
"format": "properties",
"isPublic": true,
"comment": "test",
"dataChangeCreatedBy": "zhanglea",
"dataChangeLastModifiedBy": "zhanglea",
"dataChangeCreatedTime": "2017-04-20T18:25:49.033+0800",
"dataChangeLastModifiedTime": "2017-04-20T18:25:49.033+0800"
}
```
* **返回值说明** :
> 如果是properties文件,name = ${appId所属的部门}.${传入的name值} ,例如调用接口传入的name=xy-z, format=properties,应用的部门为框架(FX),那么name=FX.xy-z
> 如果不是properties文件 name = ${appId所属的部门}.${传入的name值}.${format},例如调用接口传入的name=xy-z, format=json,应用的部门为框架(FX),那么name=FX.xy-z.json
##### 3.2.8 获取某个Namespace当前编辑人接口
Apollo在生产环境(PRO)有限制规则:每次发布只能有一个人编辑配置,且该次发布的人不能是该次发布的编辑人。
也就是说如果一个用户A修改了某个namespace的配置,那么在这个namespace发布前,只能由A修改,其它用户无法修改。同时,该用户A无法发布自己修改的配置,必须找另一个有发布权限的人操作。
这个接口就是用来获取当前namespace是否有人锁定的接口。在非生产环境(FAT、UAT),该接口始终返回没有人锁定。
* **URL** : http://{portal_address}/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock
* **Method** : GET
* **Request Params** :无
* **返回值 Sample(未锁定)** :
``` json
{
"namespaceName": "application",
"isLocked": false
}
```
* **返回值Sample(被锁定)** :
``` json
{
"namespaceName": "application",
"isLocked": true,
"lockedBy": "song_s" //锁owner
}
```
##### 3.2.9 读取配置接口
* **URL** : http://{portal_address}/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}
* **Method** : GET
* **Request Params** :无
* **返回值Sample** :
``` json
{
"key": "timeout",
"value": "3000",
"comment": "超时时间",
"dataChangeCreatedBy": "zhanglea",
"dataChangeLastModifiedBy": "zhanglea",
"dataChangeCreatedTime": "2016-08-11T12:06:41.818+0800",
"dataChangeLastModifiedTime": "2016-08-11T12:06:41.818+0800"
}
```
##### 3.2.10 新增配置接口
* **URL** : http://{portal_address}/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items
* **Method** : POST
* **Request Params** :无
* **请求内容(Request Body, JSON格式)** :
参数名 | 必选 | 类型 | 说明
---- | --- | --- | ---
key | true | String | 配置的key,长度不能超过128个字符。非properties格式,key固定为`content`
value | true | String | 配置的value,长度不能超过20000个字符,非properties格式,value为文件全部内容
comment | false | String | 配置的备注,长度不能超过256个字符
dataChangeCreatedBy | true | String | item的创建人,格式为域账号,也就是sso系统的User ID
* **Request body sample** :
``` json
{
"key":"timeout",
"value":"3000",
"comment":"超时时间",
"dataChangeCreatedBy":"zhanglea"
}
```
* **返回值Sample** :
``` json
{
"key": "timeout",
"value": "3000",
"comment": "超时时间",
"dataChangeCreatedBy": "zhanglea",
"dataChangeLastModifiedBy": "zhanglea",
"dataChangeCreatedTime": "2016-08-11T12:06:41.818+0800",
"dataChangeLastModifiedTime": "2016-08-11T12:06:41.818+0800"
}
```
##### 3.2.11 修改配置接口
* **URL** : http://{portal_address}/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}
* **Method** : PUT
* **Request Params** :
参数名 | 必选 | 类型 | 说明
--- | --- | --- | ---
createIfNotExists | false | Boolean | 当配置不存在时是否自动创建
* **请求内容(Request Body, JSON格式)** :
参数名 | 必选 | 类型 | 说明
---- | --- | --- | ---
key | true | String | 配置的key,需和url中的key值一致。非properties格式,key固定为`content`
value | true | String | 配置的value,长度不能超过20000个字符,非properties格式,value为文件全部内容
comment | false | String | 配置的备注,长度不能超过256个字符
dataChangeLastModifiedBy | true | String | item的修改人,格式为域账号,也就是sso系统的User ID
dataChangeCreatedBy | false | String | 当createIfNotExists为true时必选。item的创建人,格式为域账号,也就是sso系统的User ID
* **Request body sample** :
```json
{
"key":"timeout",
"value":"3000",
"comment":"超时时间",
"dataChangeLastModifiedBy":"zhanglea"
}
```
* **返回值** :无
##### 3.2.12 删除配置接口
* **URL** : http://{portal_address}/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}?operator={operator}
* **Method** : DELETE
* **Request Params** :
参数名 | 必选 | 类型 | 说明
--- | --- | --- | ---
key | true | String | 配置的key。非properties格式,key固定为`content`
operator | true | String | 删除配置的操作者,域账号
* **返回值** : 无
##### 3.2.13 发布配置接口
* **URL** : http://{portal_address}/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases
* **Method** : POST
* **Request Params** :无
* **Request Body** :
参数名 | 必选 | 类型 | 说明
--- | --- | --- | ---
releaseTitle | true | String | 此次发布的标题,长度不能超过64个字符
releaseComment | false | String | 发布的备注,长度不能超过256个字符
releasedBy | true | String | 发布人,域账号,注意:如果`ApolloConfigDB.ServerConfig`中的`namespace.lock.switch`设置为true的话(默认是false),那么该环境不允许发布人和编辑人为同一人。所以如果编辑人是zhanglea,发布人就不能再是zhanglea。
* **Request Body example** :
```json
{
"releaseTitle":"2016-08-11",
"releaseComment":"修改timeout值",
"releasedBy":"zhanglea"
}
```
* **返回值Sample** :
``` json
{
"appId": "test-0620-01",
"clusterName": "test",
"namespaceName": "application",
"name": "2016-08-11",
"configurations": {
"timeout": "3000",
},
"comment": "修改timeout值",
"dataChangeCreatedBy": "zhanglea",
"dataChangeLastModifiedBy": "zhanglea",
"dataChangeCreatedTime": "2016-08-11T14:03:46.232+0800",
"dataChangeLastModifiedTime": "2016-08-11T14:03:46.235+0800"
}
```
##### 3.2.14 获取某个Namespace当前生效的已发布配置接口
* **URL** : http://{portal_address}/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest
* **Method** : GET
* **Request Params** :无
* **返回值Sample** :
``` json
{
"appId": "test-0620-01",
"clusterName": "test",
"namespaceName": "application",
"name": "2016-08-11",
"configurations": {
"timeout": "3000",
},
"comment": "修改timeout值",
"dataChangeCreatedBy": "zhanglea",
"dataChangeLastModifiedBy": "zhanglea",
"dataChangeCreatedTime": "2016-08-11T14:03:46.232+0800",
"dataChangeLastModifiedTime": "2016-08-11T14:03:46.235+0800"
}
```
##### 3.2.15 回滚已发布配置接口
* **URL** : http://{portal_address}/openapi/v1/envs/{env}/releases/{releaseId}/rollback
* **Method** : PUT
* **Request Params** :
参数名 | 必选 | 类型 | 说明
--- | --- | --- | ---
operator | true | String | 删除配置的操作者,域账号
* **返回值** : 无
### 四、错误码说明
正常情况下,接口返回的Http状态码是200,下面列举了Apollo会返回的非200错误码说明。
#### 4.1 400 - Bad Request
客户端传入参数的错误,如操作人不存在,namespace不存在等等,客户端需要根据提示信息检查对应的参数是否正确。
#### 4.2 401 - Unauthorized
接口传入的token非法或者已过期,客户端需要检查token是否传入正确。
#### 4.3 403 - Forbidden
接口要访问的资源未得到授权,比如只授权了对A应用下Namespace的管理权限,但是却尝试管理B应用下的配置。
#### 4.4 404 - Not Found
接口要访问的资源不存在,一般是URL或URL的参数错误。
#### 4.5 405 - Method Not Allowed
接口访问的Method不正确,比如应该使用POST的接口使用了GET访问等,客户端需要检查接口访问方式是否正确。
#### 4.6 500 - Internal Server Error
其它类型的错误默认都会返回500,对这类错误如果应用无法根据提示信息找到原因的话,可以找Apollo研发团队一起排查问题。
| -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./docs/en/community/team.md | # Apollo Team
The Apollo team is comprised of Members and Contributors. Members have direct access to the source of Apollo project and actively evolve the code-base. Contributors improve the project through submission of patches and suggestions to the Members. The number of Contributors to the project is unbounded. All contributions to Apollo are greatly appreciated, whether for trivial cleanups, big new features or other material rewards.
For more information about the community governance model, please refer [GOVERNANCE.md](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md).
## Members
Members include Project Management Committee members and committers. The list is in alphabet order.
### Project Management Committee
| Github ID | Name | Organization |
| ---------- | ---------- | ------------ |
| JaredTan95 | Jared Tan | DaoCloud |
| kezhenxu94 | Zhenxu Ke | Tetrate |
| nobodyiam | Jason Song | Ant Group |
| zouyx | Joe Zou | Shein |
### Committer
| Github ID | Name | Organization |
| ----------- | ------------- | ------------ |
| Anilople | Xiaoquan Wang | Some Bank |
| klboke | Kailing Chen | TapTap |
| lepdou | Le Zhang | Ant Group |
| nisiyong | Stephen Ni | Qihoo 360 |
| pengweiqhca | Wei Peng | Tuhu |
| vdisk-group | Lvqiu Ye | Hundsun |
## Contributors
### Apollo main repository
<img src="https://opencollective.com/apollo/contributors.svg?width=880&button=false" />
### apollo.net
<img src="https://opencollective.com/apollonet/contributors.svg?width=880&button=false" />
## Becoming a Committer
Please refer [How to become a Committer](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md#how-to-become-a-committer).
| # Apollo Team
The Apollo team is comprised of Members and Contributors. Members have direct access to the source of Apollo project and actively evolve the code-base. Contributors improve the project through submission of patches and suggestions to the Members. The number of Contributors to the project is unbounded. All contributions to Apollo are greatly appreciated, whether for trivial cleanups, big new features or other material rewards.
For more information about the community governance model, please refer [GOVERNANCE.md](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md).
## Members
Members include Project Management Committee members and committers. The list is in alphabet order.
### Project Management Committee
| Github ID | Name | Organization |
| ---------- | ---------- | ------------ |
| JaredTan95 | Jared Tan | DaoCloud |
| kezhenxu94 | Zhenxu Ke | Tetrate |
| nobodyiam | Jason Song | Ant Group |
| zouyx | Joe Zou | Shein |
### Committer
| Github ID | Name | Organization |
| ----------- | ------------- | ------------ |
| Anilople | Xiaoquan Wang | Some Bank |
| klboke | Kailing Chen | TapTap |
| lepdou | Le Zhang | Ant Group |
| nisiyong | Stephen Ni | Qihoo 360 |
| pengweiqhca | Wei Peng | Tuhu |
| vdisk-group | Lvqiu Ye | Hundsun |
## Contributors
### Apollo main repository
<img src="https://opencollective.com/apollo/contributors.svg?width=880&button=false" />
### apollo.net
<img src="https://opencollective.com/apollonet/contributors.svg?width=880&button=false" />
## Becoming a Committer
Please refer [How to become a Committer](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md#how-to-become-a-committer).
| -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./docs/en/usage/apollo-user-practices.md | TODO
| TODO
| -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-portal/src/main/resources/static/cluster.html | <!--
~ Copyright 2021 Apollo Authors
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<!doctype html>
<html ng-app="cluster">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="icon" href="./img/config.png">
<!-- styles -->
<link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="vendor/angular/angular-toastr-1.4.1.min.css">
<link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css">
<link rel="stylesheet" type="text/css" media='all' href="vendor/angular/loading-bar.min.css">
<link rel="stylesheet" type="text/css" href="styles/common-style.css">
<title>{{'Cluster.CreateCluster' | translate }}</title>
</head>
<body>
<apollonav></apollonav>
<div class="container-fluid apollo-container hidden" ng-controller="ClusterController">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel">
<header class="panel-heading">
<div class="row">
<div class="col-md-6">
<h4>{{'Cluster.CreateCluster' | translate }}</h4>
</div>
<div class="col-md-6 text-right">
<a type="button" class="btn btn-info" href="config.html?#/appid={{appId}}">{{'Common.ReturnToIndex' | translate }}
</a>
</div>
</div>
</header>
<div class="panel-body">
<div class="alert alert-info no-radius" role="alert">
<strong>Tips:</strong>
<ul>
<li>{{'Cluster.Tips.1' | translate }}</li>
<li>{{'Cluster.Tips.2' | translate }}</li>
<li>{{'Cluster.Tips.3' | translate }}</li>
<li>{{'Cluster.Tips.4' | translate }}</li>
</ul>
</div>
<form class="form-horizontal" name="clusterForm" valdr-type="Cluster" ng-show="step == 1"
ng-submit="create()">
<div class="form-group">
<label class="col-sm-2 control-label">
<apollorequiredfield></apollorequiredfield>
{{'Common.AppId' | translate }}</label>
<div class="col-sm-6">
<label class="form-control-static" ng-bind="appId"></label>
</div>
</div>
<div class="form-group" valdr-form-group>
<label class="col-sm-2 control-label">
<apollorequiredfield></apollorequiredfield>
{{'Common.ClusterName' | translate }}</label>
<div class="col-sm-6">
<input type="text" class="form-control" name="clusterName" ng-model="clusterName">
<small>{{'Cluster.CreateNameTips' | translate }}</small>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">
<apollorequiredfield></apollorequiredfield>
{{'Cluster.ChooseEnvironment' | translate }}</label>
<div class="col-sm-5">
<table class="table table-hover" style="width: 100px">
<tbody>
<tr style="cursor: pointer" ng-repeat="env in envs"
ng-click="toggleEnvCheckedStatus(env)">
<td width="10%"><input type="checkbox" ng-checked="env.checked"
ng-click="switchChecked(env, $event)"></td>
<td width="30%" ng-bind="env.name"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-primary"
ng-disabled="clusterForm.$invalid || submitBtnDisabled">{{'Common.Submit' | translate }}
</button>
</div>
</div>
</form>
<div class="row text-center" ng-show="step == 2">
<img src="img/sync-succ.png" style="height: 100px; width: 100px">
<h3>{{'Common.Created' | translate }}!</h3>
</div>
</div>
</div>
</div>
</div>
</div>
<div ng-include="'views/common/footer.html'"></div>
<!--angular-->
<script src="vendor/angular/angular.min.js"></script>
<script src="vendor/angular/angular-resource.min.js"></script>
<script src="vendor/angular/angular-toastr-1.4.1.tpls.min.js"></script>
<script src="vendor/angular/loading-bar.min.js"></script>
<script src="vendor/angular/angular-cookies.min.js"></script>
<script src="vendor/angular/angular-translate.2.18.1/angular-translate.min.js"></script>
<script src="vendor/angular/angular-translate.2.18.1/angular-translate-loader-static-files.min.js"></script>
<script src="vendor/angular/angular-translate.2.18.1/angular-translate-storage-cookie.min.js"></script>
<!-- jquery.js -->
<script src="vendor/jquery.min.js" type="text/javascript"></script>
<script src="vendor/select2/select2.min.js" type="text/javascript"></script>
<!-- bootstrap.js -->
<script src="vendor/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<!--valdr-->
<script src="vendor/valdr/valdr.min.js" type="text/javascript"></script>
<script src="vendor/valdr/valdr-message.min.js" type="text/javascript"></script>
<script type="application/javascript" src="scripts/app.js"></script>
<script type="application/javascript" src="scripts/services/AppService.js"></script>
<script type="application/javascript" src="scripts/services/EnvService.js"></script>
<script type="application/javascript" src="scripts/services/UserService.js"></script>
<script type="application/javascript" src="scripts/services/CommonService.js"></script>
<script type="application/javascript" src="scripts/services/ClusterService.js"></script>
<script type="application/javascript" src="scripts/AppUtils.js"></script>
<script type="application/javascript" src="scripts/directive/directive.js"></script>
<script type="application/javascript" src="scripts/services/PermissionService.js"></script>
<script type="application/javascript" src="scripts/controller/ClusterController.js"></script>
<script src="scripts/valdr.js" type="text/javascript"></script>
</body>
</html>
| <!--
~ Copyright 2021 Apollo Authors
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<!doctype html>
<html ng-app="cluster">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="icon" href="./img/config.png">
<!-- styles -->
<link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="vendor/angular/angular-toastr-1.4.1.min.css">
<link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css">
<link rel="stylesheet" type="text/css" media='all' href="vendor/angular/loading-bar.min.css">
<link rel="stylesheet" type="text/css" href="styles/common-style.css">
<title>{{'Cluster.CreateCluster' | translate }}</title>
</head>
<body>
<apollonav></apollonav>
<div class="container-fluid apollo-container hidden" ng-controller="ClusterController">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel">
<header class="panel-heading">
<div class="row">
<div class="col-md-6">
<h4>{{'Cluster.CreateCluster' | translate }}</h4>
</div>
<div class="col-md-6 text-right">
<a type="button" class="btn btn-info" href="config.html?#/appid={{appId}}">{{'Common.ReturnToIndex' | translate }}
</a>
</div>
</div>
</header>
<div class="panel-body">
<div class="alert alert-info no-radius" role="alert">
<strong>Tips:</strong>
<ul>
<li>{{'Cluster.Tips.1' | translate }}</li>
<li>{{'Cluster.Tips.2' | translate }}</li>
<li>{{'Cluster.Tips.3' | translate }}</li>
<li>{{'Cluster.Tips.4' | translate }}</li>
</ul>
</div>
<form class="form-horizontal" name="clusterForm" valdr-type="Cluster" ng-show="step == 1"
ng-submit="create()">
<div class="form-group">
<label class="col-sm-2 control-label">
<apollorequiredfield></apollorequiredfield>
{{'Common.AppId' | translate }}</label>
<div class="col-sm-6">
<label class="form-control-static" ng-bind="appId"></label>
</div>
</div>
<div class="form-group" valdr-form-group>
<label class="col-sm-2 control-label">
<apollorequiredfield></apollorequiredfield>
{{'Common.ClusterName' | translate }}</label>
<div class="col-sm-6">
<input type="text" class="form-control" name="clusterName" ng-model="clusterName">
<small>{{'Cluster.CreateNameTips' | translate }}</small>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">
<apollorequiredfield></apollorequiredfield>
{{'Cluster.ChooseEnvironment' | translate }}</label>
<div class="col-sm-5">
<table class="table table-hover" style="width: 100px">
<tbody>
<tr style="cursor: pointer" ng-repeat="env in envs"
ng-click="toggleEnvCheckedStatus(env)">
<td width="10%"><input type="checkbox" ng-checked="env.checked"
ng-click="switchChecked(env, $event)"></td>
<td width="30%" ng-bind="env.name"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-primary"
ng-disabled="clusterForm.$invalid || submitBtnDisabled">{{'Common.Submit' | translate }}
</button>
</div>
</div>
</form>
<div class="row text-center" ng-show="step == 2">
<img src="img/sync-succ.png" style="height: 100px; width: 100px">
<h3>{{'Common.Created' | translate }}!</h3>
</div>
</div>
</div>
</div>
</div>
</div>
<div ng-include="'views/common/footer.html'"></div>
<!--angular-->
<script src="vendor/angular/angular.min.js"></script>
<script src="vendor/angular/angular-resource.min.js"></script>
<script src="vendor/angular/angular-toastr-1.4.1.tpls.min.js"></script>
<script src="vendor/angular/loading-bar.min.js"></script>
<script src="vendor/angular/angular-cookies.min.js"></script>
<script src="vendor/angular/angular-translate.2.18.1/angular-translate.min.js"></script>
<script src="vendor/angular/angular-translate.2.18.1/angular-translate-loader-static-files.min.js"></script>
<script src="vendor/angular/angular-translate.2.18.1/angular-translate-storage-cookie.min.js"></script>
<!-- jquery.js -->
<script src="vendor/jquery.min.js" type="text/javascript"></script>
<script src="vendor/select2/select2.min.js" type="text/javascript"></script>
<!-- bootstrap.js -->
<script src="vendor/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<!--valdr-->
<script src="vendor/valdr/valdr.min.js" type="text/javascript"></script>
<script src="vendor/valdr/valdr-message.min.js" type="text/javascript"></script>
<script type="application/javascript" src="scripts/app.js"></script>
<script type="application/javascript" src="scripts/services/AppService.js"></script>
<script type="application/javascript" src="scripts/services/EnvService.js"></script>
<script type="application/javascript" src="scripts/services/UserService.js"></script>
<script type="application/javascript" src="scripts/services/CommonService.js"></script>
<script type="application/javascript" src="scripts/services/ClusterService.js"></script>
<script type="application/javascript" src="scripts/AppUtils.js"></script>
<script type="application/javascript" src="scripts/directive/directive.js"></script>
<script type="application/javascript" src="scripts/services/PermissionService.js"></script>
<script type="application/javascript" src="scripts/controller/ClusterController.js"></script>
<script src="scripts/valdr.js" type="text/javascript"></script>
</body>
</html>
| -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./CONTRIBUTING.md | ## Contributing to apollo
Apollo is released under the non-restrictive Apache 2.0 license, and follows a very standard Github development process, using Github tracker for issues and merging pull requests into master. If you want to contribute even something trivial please do not hesitate, but follow the guidelines below.
### Sign the Contributor License Agreement
Before we accept a non-trivial patch or pull request we will need you to sign the Contributor License Agreement. Signing the contributor’s agreement does not grant anyone commit rights to the main repository, but it does mean that we can accept your contributions, and you will get an author credit if we do. Active contributors might be asked to join the core team, and given the ability to merge pull requests.
### Code Conventions
Our code style is in line with [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html).
We provide template files [intellij-java-google-style.xml](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/intellij-java-google-style.xml) for IntelliJ IDEA and [eclipse-java-google-style.xml](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/eclipse-java-google-style.xml) for Eclipse. If you use other IDEs, then you may config manually by referencing the template files.
* Make sure all new .java files have a simple Javadoc class comment with at least an `@author` tag identifying you, and preferably at least a paragraph on what the class is for.
* Add yourself as an @author to the .java files that you modify substantially (more than cosmetic changes).
* Add some Javadocs and, if you change the namespace, some XSD doc elements.
* A few unit tests should be added for a new feature or an important bug fix.
* If no-one else is using your branch, please rebase it against the current master (or other target branch in the main project).
* Normally, we would squash commits for one feature into one commit. There are 2 ways to do this:
1. To rebase and squash based on the remote branch
* `git rebase -i <remote>/master`
* merge commits via `fixup`, etc
2. Create a new branch and merge these commits into one
* `git checkout -b <some-branch-name> <remote>/master`
* `git merge --squash <current-feature-branch>`
* When writing a commit message please follow these conventions: if you are fixing an existing issue, please add Fixes #XXX at the end of the commit message (where XXX is the issue number).
| ## Contributing to apollo
Apollo is released under the non-restrictive Apache 2.0 license, and follows a very standard Github development process, using Github tracker for issues and merging pull requests into master. If you want to contribute even something trivial please do not hesitate, but follow the guidelines below.
### Sign the Contributor License Agreement
Before we accept a non-trivial patch or pull request we will need you to sign the Contributor License Agreement. Signing the contributor’s agreement does not grant anyone commit rights to the main repository, but it does mean that we can accept your contributions, and you will get an author credit if we do. Active contributors might be asked to join the core team, and given the ability to merge pull requests.
### Code Conventions
Our code style is in line with [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html).
We provide template files [intellij-java-google-style.xml](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/intellij-java-google-style.xml) for IntelliJ IDEA and [eclipse-java-google-style.xml](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/eclipse-java-google-style.xml) for Eclipse. If you use other IDEs, then you may config manually by referencing the template files.
* Make sure all new .java files have a simple Javadoc class comment with at least an `@author` tag identifying you, and preferably at least a paragraph on what the class is for.
* Add yourself as an @author to the .java files that you modify substantially (more than cosmetic changes).
* Add some Javadocs and, if you change the namespace, some XSD doc elements.
* A few unit tests should be added for a new feature or an important bug fix.
* If no-one else is using your branch, please rebase it against the current master (or other target branch in the main project).
* Normally, we would squash commits for one feature into one commit. There are 2 ways to do this:
1. To rebase and squash based on the remote branch
* `git rebase -i <remote>/master`
* merge commits via `fixup`, etc
2. Create a new branch and merge these commits into one
* `git checkout -b <some-branch-name> <remote>/master`
* `git merge --squash <current-feature-branch>`
* When writing a commit message please follow these conventions: if you are fixing an existing issue, please add Fixes #XXX at the end of the commit message (where XXX is the issue number).
| -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./docs/en/_sidebar.md | - [**Home**](en/README.md)
- Design Document
- [Apollo Config Center Design](en/design/apollo-design.md)
- [Apollo Config Center Introduction](en/design/apollo-introduction.md)
- [Apollo Core Concept Namespace](en/design/apollo-core-concept-namespace.md)
- [Apollo Source Code Analysis](http://www.iocoder.cn/categories/Apollo/)
- Deployment Document
- [Quick Start](en/deployment/quick-start.md)
- [Deployment Quick Start By Docker](en/deployment/quick-start-docker.md)
- [Distributed Deployment Guide](en/deployment/distributed-deployment-guide.md)
- Development Document
- [Apollo Development Guide](en/development/apollo-development-guide.md)
- Code Styles
- [Eclipse Code Style](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/eclipse-java-google-style.xml)
- [Intellij Code Style](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/intellij-java-google-style.xml)
- [Portal Implement User Login Function](en/development/portal-how-to-implement-user-login-function.md)
- [Portal Enable Email Service](en/development/portal-how-to-enable-email-service.md)
- [Portal Enable Session Store](en/development/portal-how-to-enable-session-store.md)
- [Portal Enable Webhook Notification](en/development/portal-how-to-enable-webhook-notification.md)
- Usage Document
- [Apollo Usage Guide](en/usage/apollo-user-guide.md)
- [Java Client Usage Guide](en/usage/java-sdk-user-guide.md)
- [.Net Client Usage Guide](en/usage/dotnet-sdk-user-guide.md)
- [Go、Python、NodeJS、PHP etc. Client Usage Guide](en/usage/third-party-sdks-user-guide.md)
- [Other Language Client User Guide](en/usage/other-language-client-user-guide.md)
- [Apollo Openapi Guide](en/usage/apollo-open-api-platform.md)
- [Apollo Use Cases](https://github.com/ctripcorp/apollo-use-cases)
- [Apollo User Practices](en/usage/apollo-user-practices.md)
- [Apollo Security Best Practices](en/usage/apollo-user-guide?id=_71-%e5%ae%89%e5%85%a8%e7%9b%b8%e5%85%b3)
- FAQ
- [Frequently Asked Question](en/faq/faq.md)
- [Common Issues In Deployment & Development Phase](en/faq/common-issues-in-deployment-and-development-phase.md)
- Other
- [Release History](https://github.com/ctripcorp/apollo/releases)
- [Apollo Benchmark](en/misc/apollo-benchmark.md)
- Community
- [Team](en/community/team.md)
- [Community Governance](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md)
- [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md)
- [Acknowledgements](en/community/thank-you.md)
| - [**Home**](en/README.md)
- Design Document
- [Apollo Config Center Design](en/design/apollo-design.md)
- [Apollo Config Center Introduction](en/design/apollo-introduction.md)
- [Apollo Core Concept Namespace](en/design/apollo-core-concept-namespace.md)
- [Apollo Source Code Analysis](http://www.iocoder.cn/categories/Apollo/)
- Deployment Document
- [Quick Start](en/deployment/quick-start.md)
- [Deployment Quick Start By Docker](en/deployment/quick-start-docker.md)
- [Distributed Deployment Guide](en/deployment/distributed-deployment-guide.md)
- Development Document
- [Apollo Development Guide](en/development/apollo-development-guide.md)
- Code Styles
- [Eclipse Code Style](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/eclipse-java-google-style.xml)
- [Intellij Code Style](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/intellij-java-google-style.xml)
- [Portal Implement User Login Function](en/development/portal-how-to-implement-user-login-function.md)
- [Portal Enable Email Service](en/development/portal-how-to-enable-email-service.md)
- [Portal Enable Session Store](en/development/portal-how-to-enable-session-store.md)
- [Portal Enable Webhook Notification](en/development/portal-how-to-enable-webhook-notification.md)
- Usage Document
- [Apollo Usage Guide](en/usage/apollo-user-guide.md)
- [Java Client Usage Guide](en/usage/java-sdk-user-guide.md)
- [.Net Client Usage Guide](en/usage/dotnet-sdk-user-guide.md)
- [Go、Python、NodeJS、PHP etc. Client Usage Guide](en/usage/third-party-sdks-user-guide.md)
- [Other Language Client User Guide](en/usage/other-language-client-user-guide.md)
- [Apollo Openapi Guide](en/usage/apollo-open-api-platform.md)
- [Apollo Use Cases](https://github.com/ctripcorp/apollo-use-cases)
- [Apollo User Practices](en/usage/apollo-user-practices.md)
- [Apollo Security Best Practices](en/usage/apollo-user-guide?id=_71-%e5%ae%89%e5%85%a8%e7%9b%b8%e5%85%b3)
- FAQ
- [Frequently Asked Question](en/faq/faq.md)
- [Common Issues In Deployment & Development Phase](en/faq/common-issues-in-deployment-and-development-phase.md)
- Other
- [Release History](https://github.com/ctripcorp/apollo/releases)
- [Apollo Benchmark](en/misc/apollo-benchmark.md)
- Community
- [Team](en/community/team.md)
- [Community Governance](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md)
- [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md)
- [Acknowledgements](en/community/thank-you.md)
| -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./docs/zh/design/apollo-introduction.md | #
# 1、What is Apollo
## 1.1 背景
随着程序功能的日益复杂,程序的配置日益增多:各种功能的开关、参数的配置、服务器的地址……
对程序配置的期望值也越来越高:配置修改后实时生效,灰度发布,分环境、分集群管理配置,完善的权限、审核机制……
在这样的大环境下,传统的通过配置文件、数据库等方式已经越来越无法满足开发人员对配置管理的需求。
Apollo配置中心应运而生!
## 1.2 Apollo简介
Apollo(阿波罗)是携程框架部门研发的开源配置管理中心,能够集中化管理应用不同环境、不同集群的配置,配置修改后能够实时推送到应用端,并且具备规范的权限、流程治理等特性。
Apollo支持4个维度管理Key-Value格式的配置:
1. application (应用)
2. environment (环境)
3. cluster (集群)
4. namespace (命名空间)
同时,Apollo基于开源模式开发,开源地址:<a href="https://github.com/ctripcorp/apollo" target="_blank">https://github.com/ctripcorp/apollo</a>
## 1.2 配置基本概念
既然Apollo定位于配置中心,那么在这里有必要先简单介绍一下什么是配置。
按照我们的理解,配置有以下几个属性:
* **配置是独立于程序的只读变量**
* 配置首先是独立于程序的,同一份程序在不同的配置下会有不同的行为。
* 其次,配置对于程序是只读的,程序通过读取配置来改变自己的行为,但是程序不应该去改变配置。
* 常见的配置有:DB Connection Str、Thread Pool Size、Buffer Size、Request Timeout、Feature Switch、Server Urls等。
* **配置伴随应用的整个生命周期**
* 配置贯穿于应用的整个生命周期,应用在启动时通过读取配置来初始化,在运行时根据配置调整行为。
* **配置可以有多种加载方式**
* 配置也有很多种加载方式,常见的有程序内部hard code,配置文件,环境变量,启动参数,基于数据库等
* **配置需要治理**
* 权限控制
* 由于配置能改变程序的行为,不正确的配置甚至能引起灾难,所以对配置的修改必须有比较完善的权限控制
* 不同环境、集群配置管理
* 同一份程序在不同的环境(开发,测试,生产)、不同的集群(如不同的数据中心)经常需要有不同的配置,所以需要有完善的环境、集群配置管理
* 框架类组件配置管理
* 还有一类比较特殊的配置 - 框架类组件配置,比如CAT客户端的配置。
* 虽然这类框架类组件是由其他团队开发、维护,但是运行时是在业务实际应用内的,所以本质上可以认为框架类组件也是应用的一部分。
* 这类组件对应的配置也需要有比较完善的管理方式。
# 2、Why Apollo
正是基于配置的特殊性,所以Apollo从设计之初就立志于成为一个有治理能力的配置发布平台,目前提供了以下的特性:
* **统一管理不同环境、不同集群的配置**
* Apollo提供了一个统一界面集中式管理不同环境(environment)、不同集群(cluster)、不同命名空间(namespace)的配置。
* 同一份代码部署在不同的集群,可以有不同的配置,比如zookeeper的地址等
* 通过命名空间(namespace)可以很方便地支持多个不同应用共享同一份配置,同时还允许应用对共享的配置进行覆盖
* **配置修改实时生效(热发布)**
* 用户在Apollo修改完配置并发布后,客户端能实时(1秒)接收到最新的配置,并通知到应用程序
* **版本发布管理**
* 所有的配置发布都有版本概念,从而可以方便地支持配置的回滚
* **灰度发布**
* 支持配置的灰度发布,比如点了发布后,只对部分应用实例生效,等观察一段时间没问题后再推给所有应用实例
* **权限管理、发布审核、操作审计**
* 应用和配置的管理都有完善的权限管理机制,对配置的管理还分为了编辑和发布两个环节,从而减少人为的错误。
* 所有的操作都有审计日志,可以方便地追踪问题
* **客户端配置信息监控**
* 可以在界面上方便地看到配置在被哪些实例使用
* **提供Java和.Net原生客户端**
* 提供了Java和.Net的原生客户端,方便应用集成
* 支持Spring Placeholder, Annotation和Spring Boot的ConfigurationProperties,方便应用使用(需要Spring 3.1.1+)
* 同时提供了Http接口,非Java和.Net应用也可以方便地使用
* **提供开放平台API**
* Apollo自身提供了比较完善的统一配置管理界面,支持多环境、多数据中心配置管理、权限、流程治理等特性。不过Apollo出于通用性考虑,不会对配置的修改做过多限制,只要符合基本的格式就能保存,不会针对不同的配置值进行针对性的校验,如数据库用户名、密码,Redis服务地址等
* 对于这类应用配置,Apollo支持应用方通过开放平台API在Apollo进行配置的修改和发布,并且具备完善的授权和权限控制
* **部署简单**
* 配置中心作为基础服务,可用性要求非常高,这就要求Apollo对外部依赖尽可能地少
* 目前唯一的外部依赖是MySQL,所以部署非常简单,只要安装好Java和MySQL就可以让Apollo跑起来
* Apollo还提供了打包脚本,一键就可以生成所有需要的安装包,并且支持自定义运行时参数
# 3、Apollo at a glance
## 3.1 基础模型
如下即是Apollo的基础模型:
1. 用户在配置中心对配置进行修改并发布
2. 配置中心通知Apollo客户端有配置更新
3. Apollo客户端从配置中心拉取最新的配置、更新本地配置并通知到应用

## 3.2 界面概览

上图是Apollo配置中心中一个项目的配置首页
* 在页面左上方的环境列表模块展示了所有的环境和集群,用户可以随时切换。
* 页面中央展示了两个namespace(application和FX.apollo)的配置信息,默认按照表格模式展示、编辑。用户也可以切换到文本模式,以文件形式查看、编辑。
* 页面上可以方便地进行发布、回滚、灰度、授权、查看更改历史和发布历史等操作
## 3.3 添加/修改配置项
用户可以通过配置中心界面方便的添加/修改配置项,更多使用说明请参见[应用接入指南](zh/usage/apollo-user-guide)

输入配置信息:

## 3.4 发布配置
通过配置中心发布配置:

填写发布信息:

## 3.5 客户端获取配置(Java API样例)
配置发布后,就能在客户端获取到了,以Java为例,获取配置的示例代码如下。Apollo客户端还支持和Spring整合,更多客户端使用说明请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)和[.Net客户端使用指南](zh/usage/dotnet-sdk-user-guide)。
```java
Config config = ConfigService.getAppConfig();
Integer defaultRequestTimeout = 200;
Integer requestTimeout = config.getIntProperty("requestTimeout", defaultRequestTimeout);
```
## 3.6 客户端监听配置变化
通过上述获取配置代码,应用就能实时获取到最新的配置了。
不过在某些场景下,应用还需要在配置变化时获得通知,比如数据库连接的切换等,所以Apollo还提供了监听配置变化的功能,Java示例如下:
```java
Config config = ConfigService.getAppConfig();
config.addChangeListener(new ConfigChangeListener() {
@Override
public void onChange(ConfigChangeEvent changeEvent) {
for (String key : changeEvent.changedKeys()) {
ConfigChange change = changeEvent.getChange(key);
System.out.println(String.format(
"Found change - key: %s, oldValue: %s, newValue: %s, changeType: %s",
change.getPropertyName(), change.getOldValue(),
change.getNewValue(), change.getChangeType()));
}
}
});
```
## 3.7 Spring集成样例
Apollo和Spring也可以很方便地集成,只需要标注`@EnableApolloConfig`后就可以通过`@Value`获取配置信息:
```java
@Configuration
@EnableApolloConfig
public class AppConfig {}
```
```java
@Component
public class SomeBean {
//timeout的值会自动更新
@Value("${request.timeout:200}")
private int timeout;
}
```
# 4、Apollo in depth
通过上面的介绍,相信大家已经对Apollo有了一个初步的了解,并且相信已经覆盖到了大部分的使用场景。
接下来会主要介绍Apollo的cluster管理(集群)、namespace管理(命名空间)和对应的配置获取规则。
## 4.1 Core Concepts
在介绍高级特性前,我们有必要先来了解一下Apollo中的几个核心概念:
1. **application (应用)**
* 这个很好理解,就是实际使用配置的应用,Apollo客户端在运行时需要知道当前应用是谁,从而可以去获取对应的配置
* 每个应用都需要有唯一的身份标识 -- appId,我们认为应用身份是跟着代码走的,所以需要在代码中配置,具体信息请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)。
2. **environment (环境)**
* 配置对应的环境,Apollo客户端在运行时需要知道当前应用处于哪个环境,从而可以去获取应用的配置
* 我们认为环境和代码无关,同一份代码部署在不同的环境就应该能够获取到不同环境的配置
* 所以环境默认是通过读取机器上的配置(server.properties中的env属性)指定的,不过为了开发方便,我们也支持运行时通过System Property等指定,具体信息请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)。
3. **cluster (集群)**
* 一个应用下不同实例的分组,比如典型的可以按照数据中心分,把上海机房的应用实例分为一个集群,把北京机房的应用实例分为另一个集群。
* 对不同的cluster,同一个配置可以有不一样的值,如zookeeper地址。
* 集群默认是通过读取机器上的配置(server.properties中的idc属性)指定的,不过也支持运行时通过System Property指定,具体信息请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)。
4. **namespace (命名空间)**
* 一个应用下不同配置的分组,可以简单地把namespace类比为文件,不同类型的配置存放在不同的文件中,如数据库配置文件,RPC配置文件,应用自身的配置文件等
* 应用可以直接读取到公共组件的配置namespace,如DAL,RPC等
* 应用也可以通过继承公共组件的配置namespace来对公共组件的配置做调整,如DAL的初始数据库连接数
## 4.2 自定义Cluster
> 【本节内容仅对应用需要对不同集群应用不同配置才需要,如没有相关需求,可以跳过本节】
比如我们有应用在A数据中心和B数据中心都有部署,那么如果希望两个数据中心的配置不一样的话,我们可以通过新建cluster来解决。
### 4.2.1 新建Cluster
新建Cluster只有项目的管理员才有权限,管理员可以在页面左侧看到“添加集群”按钮。

点击后就进入到集群添加页面,一般情况下可以按照数据中心来划分集群,如SHAJQ、SHAOY等。
不过也支持自定义集群,比如可以为A机房的某一台机器和B机房的某一台机创建一个集群,使用一套配置。

### 4.2.2 在Cluster中添加配置并发布
集群添加成功后,就可以为该集群添加配置了,首先需要按照下图所示切换到SHAJQ集群,之后配置添加流程和[3.3 添加/修改配置项](#_33-添加修改配置项)一样,这里就不再赘述了。

### 4.2.3 指定应用实例所属的Cluster
Apollo会默认使用应用实例所在的数据中心作为cluster,所以如果两者一致的话,不需要额外配置。
如果cluster和数据中心不一致的话,那么就需要通过System Property方式来指定运行时cluster:
* -Dapollo.cluster=SomeCluster
* 这里注意`apollo.cluster`为全小写
## 4.3 自定义Namespace
> 【本节仅对公共组件配置或需要多个应用共享配置才需要,如没有相关需求,可以跳过本节】
如果应用有公共组件(如hermes-producer,cat-client等)供其它应用使用,就需要通过自定义namespace来实现公共组件的配置。
### 4.3.1 新建Namespace
以hermes-producer为例,需要先新建一个namespace,新建namespace只有项目的管理员才有权限,管理员可以在页面左侧看到“添加Namespace”按钮。

点击后就进入namespace添加页面,Apollo会把应用所属的部门作为namespace的前缀,如FX。

### 4.3.2 关联到环境和集群
Namespace创建完,需要选择在哪些环境和集群下使用

### 4.3.3 在Namespace中添加配置项
接下来在这个新建的namespace下添加配置项

添加完成后就能在FX.Hermes.Producer的namespace中看到配置。

### 4.3.4 发布namespace的配置

### 4.3.5 客户端获取Namespace配置
对自定义namespace的配置获取,稍有不同,需要程序传入namespace的名字。Apollo客户端还支持和Spring整合,更多客户端使用说明请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)和[.Net客户端使用指南](zh/usage/dotnet-sdk-user-guide)。
```java
Config config = ConfigService.getConfig("FX.Hermes.Producer");
Integer defaultSenderBatchSize = 200;
Integer senderBatchSize = config.getIntProperty("sender.batchsize", defaultSenderBatchSize);
```
### 4.3.6 客户端监听Namespace配置变化
```java
Config config = ConfigService.getConfig("FX.Hermes.Producer");
config.addChangeListener(new ConfigChangeListener() {
@Override
public void onChange(ConfigChangeEvent changeEvent) {
System.out.println("Changes for namespace " + changeEvent.getNamespace());
for (String key : changeEvent.changedKeys()) {
ConfigChange change = changeEvent.getChange(key);
System.out.println(String.format(
"Found change - key: %s, oldValue: %s, newValue: %s, changeType: %s",
change.getPropertyName(), change.getOldValue(),
change.getNewValue(), change.getChangeType()));
}
}
});
```
### 4.3.7 Spring集成样例
```java
@Configuration
@EnableApolloConfig("FX.Hermes.Producer")
public class AppConfig {}
```
```java
@Component
public class SomeBean {
//timeout的值会自动更新
@Value("${request.timeout:200}")
private int timeout;
}
```
## 4.4 配置获取规则
> 【本节仅当应用自定义了集群或namespace才需要,如无相关需求,可以跳过本节】
在有了cluster概念后,配置的规则就显得重要了。
比如应用部署在A机房,但是并没有在Apollo新建cluster,这个时候Apollo的行为是怎样的?
或者在运行时指定了cluster=SomeCluster,但是并没有在Apollo新建cluster,这个时候Apollo的行为是怎样的?
接下来就来介绍一下配置获取的规则。
### 4.4.1 应用自身配置的获取规则
当应用使用下面的语句获取配置时,我们称之为获取应用自身的配置,也就是应用自身的application namespace的配置。
```java
Config config = ConfigService.getAppConfig();
```
对这种情况的配置获取规则,简而言之如下:
1. 首先查找运行时cluster的配置(通过apollo.cluster指定)
2. 如果没有找到,则查找数据中心cluster的配置
3. 如果还是没有找到,则返回默认cluster的配置
图示如下:

所以如果应用部署在A数据中心,但是用户没有在Apollo创建cluster,那么获取的配置就是默认cluster(default)的。
如果应用部署在A数据中心,同时在运行时指定了SomeCluster,但是没有在Apollo创建cluster,那么获取的配置就是A数据中心cluster的配置,如果A数据中心cluster没有配置的话,那么获取的配置就是默认cluster(default)的。
### 4.4.2 公共组件配置的获取规则
以`FX.Hermes.Producer`为例,hermes producer是hermes发布的公共组件。当使用下面的语句获取配置时,我们称之为获取公共组件的配置。
```java
Config config = ConfigService.getConfig("FX.Hermes.Producer");
```
对这种情况的配置获取规则,简而言之如下:
1. 首先获取当前应用下的`FX.Hermes.Producer` namespace的配置
2. 然后获取hermes应用下`FX.Hermes.Producer` namespace的配置
3. 上面两部分配置的并集就是最终使用的配置,如有key一样的部分,以当前应用优先
图示如下:

通过这种方式,就实现了对框架类组件的配置管理,框架组件提供方提供配置的默认值,应用如果有特殊需求,可以自行覆盖。
## 4.5 总体设计

上图简要描述了Apollo的总体设计,我们可以从下往上看:
* Config Service提供配置的读取、推送等功能,服务对象是Apollo客户端
* Admin Service提供配置的修改、发布等功能,服务对象是Apollo Portal(管理界面)
* Config Service和Admin Service都是多实例、无状态部署,所以需要将自己注册到Eureka中并保持心跳
* 在Eureka之上我们架了一层Meta Server用于封装Eureka的服务发现接口
* Client通过域名访问Meta Server获取Config Service服务列表(IP+Port),而后直接通过IP+Port访问服务,同时在Client侧会做load balance、错误重试
* Portal通过域名访问Meta Server获取Admin Service服务列表(IP+Port),而后直接通过IP+Port访问服务,同时在Portal侧会做load balance、错误重试
* 为了简化部署,我们实际上会把Config Service、Eureka和Meta Server三个逻辑角色部署在同一个JVM进程中
### 4.5.1 Why Eureka
为什么我们采用Eureka作为服务注册中心,而不是使用传统的zk、etcd呢?我大致总结了一下,有以下几方面的原因:
* 它提供了完整的Service Registry和Service Discovery实现
* 首先是提供了完整的实现,并且也经受住了Netflix自己的生产环境考验,相对使用起来会比较省心。
* 和Spring Cloud无缝集成
* 我们的项目本身就使用了Spring Cloud和Spring Boot,同时Spring Cloud还有一套非常完善的开源代码来整合Eureka,所以使用起来非常方便。
* 另外,Eureka还支持在我们应用自身的容器中启动,也就是说我们的应用启动完之后,既充当了Eureka的角色,同时也是服务的提供者。这样就极大的提高了服务的可用性。
* **这一点是我们选择Eureka而不是zk、etcd等的主要原因,为了提高配置中心的可用性和降低部署复杂度,我们需要尽可能地减少外部依赖。**
* Open Source
* 最后一点是开源,由于代码是开源的,所以非常便于我们了解它的实现原理和排查问题。
## 4.6 客户端设计

上图简要描述了Apollo客户端的实现原理:
1. 客户端和服务端保持了一个长连接,从而能第一时间获得配置更新的推送。
2. 客户端还会定时从Apollo配置中心服务端拉取应用的最新配置。
* 这是一个fallback机制,为了防止推送机制失效导致配置不更新
* 客户端定时拉取会上报本地版本,所以一般情况下,对于定时拉取的操作,服务端都会返回304 - Not Modified
* 定时频率默认为每5分钟拉取一次,客户端也可以通过在运行时指定System Property: `apollo.refreshInterval`来覆盖,单位为分钟。
3. 客户端从Apollo配置中心服务端获取到应用的最新配置后,会保存在内存中
4. 客户端会把从服务端获取到的配置在本地文件系统缓存一份
* 在遇到服务不可用,或网络不通的时候,依然能从本地恢复配置
5. 应用程序从Apollo客户端获取最新的配置、订阅配置更新通知
### 4.6.1 配置更新推送实现
前面提到了Apollo客户端和服务端保持了一个长连接,从而能第一时间获得配置更新的推送。
长连接实际上我们是通过Http Long Polling实现的,具体而言:
* 客户端发起一个Http请求到服务端
* 服务端会保持住这个连接60秒
* 如果在60秒内有客户端关心的配置变化,被保持住的客户端请求会立即返回,并告知客户端有配置变化的namespace信息,客户端会据此拉取对应namespace的最新配置
* 如果在60秒内没有客户端关心的配置变化,那么会返回Http状态码304给客户端
* 客户端在收到服务端请求后会立即重新发起连接,回到第一步
考虑到会有数万客户端向服务端发起长连,在服务端我们使用了async servlet(Spring DeferredResult)来服务Http Long Polling请求。
## 4.7 可用性考虑
配置中心作为基础服务,可用性要求非常高,下面的表格描述了不同场景下Apollo的可用性:
| 场景 | 影响 | 降级 | 原因 |
|------------------------|--------------------------------------|---------------------------------------|-----------------------------------------------------------------------------------------|
| 某台config service下线 | 无影响 | | Config service无状态,客户端重连其它config service |
| 所有config service下线 | 客户端无法读取最新配置,Portal无影响 | 客户端重启时,可以读取本地缓存配置文件 | |
| 某台admin service下线 | 无影响 | | Admin service无状态,Portal重连其它admin service |
| 所有admin service下线 | 客户端无影响,portal无法更新配置 | | |
| 某台portal下线 | 无影响 | | Portal域名通过slb绑定多台服务器,重试后指向可用的服务器 |
| 全部portal下线 | 客户端无影响,portal无法更新配置 | | |
| 某个数据中心下线 | 无影响 | | 多数据中心部署,数据完全同步,Meta Server/Portal域名通过slb自动切换到其它存活的数据中心 |
# 5、Contribute to Apollo
Apollo从开发之初就是以开源模式开发的,所以也非常欢迎有兴趣、有余力的朋友一起加入进来。
服务端开发使用的是Java,基于Spring Cloud和Spring Boot框架。客户端目前提供了Java和.Net两种实现。
Github地址:<a href="https://github.com/ctripcorp/apollo" target="_blank">https://github.com/ctripcorp/apollo</a>
欢迎大家发起Pull Request!
| #
# 1、What is Apollo
## 1.1 背景
随着程序功能的日益复杂,程序的配置日益增多:各种功能的开关、参数的配置、服务器的地址……
对程序配置的期望值也越来越高:配置修改后实时生效,灰度发布,分环境、分集群管理配置,完善的权限、审核机制……
在这样的大环境下,传统的通过配置文件、数据库等方式已经越来越无法满足开发人员对配置管理的需求。
Apollo配置中心应运而生!
## 1.2 Apollo简介
Apollo(阿波罗)是携程框架部门研发的开源配置管理中心,能够集中化管理应用不同环境、不同集群的配置,配置修改后能够实时推送到应用端,并且具备规范的权限、流程治理等特性。
Apollo支持4个维度管理Key-Value格式的配置:
1. application (应用)
2. environment (环境)
3. cluster (集群)
4. namespace (命名空间)
同时,Apollo基于开源模式开发,开源地址:<a href="https://github.com/ctripcorp/apollo" target="_blank">https://github.com/ctripcorp/apollo</a>
## 1.2 配置基本概念
既然Apollo定位于配置中心,那么在这里有必要先简单介绍一下什么是配置。
按照我们的理解,配置有以下几个属性:
* **配置是独立于程序的只读变量**
* 配置首先是独立于程序的,同一份程序在不同的配置下会有不同的行为。
* 其次,配置对于程序是只读的,程序通过读取配置来改变自己的行为,但是程序不应该去改变配置。
* 常见的配置有:DB Connection Str、Thread Pool Size、Buffer Size、Request Timeout、Feature Switch、Server Urls等。
* **配置伴随应用的整个生命周期**
* 配置贯穿于应用的整个生命周期,应用在启动时通过读取配置来初始化,在运行时根据配置调整行为。
* **配置可以有多种加载方式**
* 配置也有很多种加载方式,常见的有程序内部hard code,配置文件,环境变量,启动参数,基于数据库等
* **配置需要治理**
* 权限控制
* 由于配置能改变程序的行为,不正确的配置甚至能引起灾难,所以对配置的修改必须有比较完善的权限控制
* 不同环境、集群配置管理
* 同一份程序在不同的环境(开发,测试,生产)、不同的集群(如不同的数据中心)经常需要有不同的配置,所以需要有完善的环境、集群配置管理
* 框架类组件配置管理
* 还有一类比较特殊的配置 - 框架类组件配置,比如CAT客户端的配置。
* 虽然这类框架类组件是由其他团队开发、维护,但是运行时是在业务实际应用内的,所以本质上可以认为框架类组件也是应用的一部分。
* 这类组件对应的配置也需要有比较完善的管理方式。
# 2、Why Apollo
正是基于配置的特殊性,所以Apollo从设计之初就立志于成为一个有治理能力的配置发布平台,目前提供了以下的特性:
* **统一管理不同环境、不同集群的配置**
* Apollo提供了一个统一界面集中式管理不同环境(environment)、不同集群(cluster)、不同命名空间(namespace)的配置。
* 同一份代码部署在不同的集群,可以有不同的配置,比如zookeeper的地址等
* 通过命名空间(namespace)可以很方便地支持多个不同应用共享同一份配置,同时还允许应用对共享的配置进行覆盖
* **配置修改实时生效(热发布)**
* 用户在Apollo修改完配置并发布后,客户端能实时(1秒)接收到最新的配置,并通知到应用程序
* **版本发布管理**
* 所有的配置发布都有版本概念,从而可以方便地支持配置的回滚
* **灰度发布**
* 支持配置的灰度发布,比如点了发布后,只对部分应用实例生效,等观察一段时间没问题后再推给所有应用实例
* **权限管理、发布审核、操作审计**
* 应用和配置的管理都有完善的权限管理机制,对配置的管理还分为了编辑和发布两个环节,从而减少人为的错误。
* 所有的操作都有审计日志,可以方便地追踪问题
* **客户端配置信息监控**
* 可以在界面上方便地看到配置在被哪些实例使用
* **提供Java和.Net原生客户端**
* 提供了Java和.Net的原生客户端,方便应用集成
* 支持Spring Placeholder, Annotation和Spring Boot的ConfigurationProperties,方便应用使用(需要Spring 3.1.1+)
* 同时提供了Http接口,非Java和.Net应用也可以方便地使用
* **提供开放平台API**
* Apollo自身提供了比较完善的统一配置管理界面,支持多环境、多数据中心配置管理、权限、流程治理等特性。不过Apollo出于通用性考虑,不会对配置的修改做过多限制,只要符合基本的格式就能保存,不会针对不同的配置值进行针对性的校验,如数据库用户名、密码,Redis服务地址等
* 对于这类应用配置,Apollo支持应用方通过开放平台API在Apollo进行配置的修改和发布,并且具备完善的授权和权限控制
* **部署简单**
* 配置中心作为基础服务,可用性要求非常高,这就要求Apollo对外部依赖尽可能地少
* 目前唯一的外部依赖是MySQL,所以部署非常简单,只要安装好Java和MySQL就可以让Apollo跑起来
* Apollo还提供了打包脚本,一键就可以生成所有需要的安装包,并且支持自定义运行时参数
# 3、Apollo at a glance
## 3.1 基础模型
如下即是Apollo的基础模型:
1. 用户在配置中心对配置进行修改并发布
2. 配置中心通知Apollo客户端有配置更新
3. Apollo客户端从配置中心拉取最新的配置、更新本地配置并通知到应用

## 3.2 界面概览

上图是Apollo配置中心中一个项目的配置首页
* 在页面左上方的环境列表模块展示了所有的环境和集群,用户可以随时切换。
* 页面中央展示了两个namespace(application和FX.apollo)的配置信息,默认按照表格模式展示、编辑。用户也可以切换到文本模式,以文件形式查看、编辑。
* 页面上可以方便地进行发布、回滚、灰度、授权、查看更改历史和发布历史等操作
## 3.3 添加/修改配置项
用户可以通过配置中心界面方便的添加/修改配置项,更多使用说明请参见[应用接入指南](zh/usage/apollo-user-guide)

输入配置信息:

## 3.4 发布配置
通过配置中心发布配置:

填写发布信息:

## 3.5 客户端获取配置(Java API样例)
配置发布后,就能在客户端获取到了,以Java为例,获取配置的示例代码如下。Apollo客户端还支持和Spring整合,更多客户端使用说明请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)和[.Net客户端使用指南](zh/usage/dotnet-sdk-user-guide)。
```java
Config config = ConfigService.getAppConfig();
Integer defaultRequestTimeout = 200;
Integer requestTimeout = config.getIntProperty("requestTimeout", defaultRequestTimeout);
```
## 3.6 客户端监听配置变化
通过上述获取配置代码,应用就能实时获取到最新的配置了。
不过在某些场景下,应用还需要在配置变化时获得通知,比如数据库连接的切换等,所以Apollo还提供了监听配置变化的功能,Java示例如下:
```java
Config config = ConfigService.getAppConfig();
config.addChangeListener(new ConfigChangeListener() {
@Override
public void onChange(ConfigChangeEvent changeEvent) {
for (String key : changeEvent.changedKeys()) {
ConfigChange change = changeEvent.getChange(key);
System.out.println(String.format(
"Found change - key: %s, oldValue: %s, newValue: %s, changeType: %s",
change.getPropertyName(), change.getOldValue(),
change.getNewValue(), change.getChangeType()));
}
}
});
```
## 3.7 Spring集成样例
Apollo和Spring也可以很方便地集成,只需要标注`@EnableApolloConfig`后就可以通过`@Value`获取配置信息:
```java
@Configuration
@EnableApolloConfig
public class AppConfig {}
```
```java
@Component
public class SomeBean {
//timeout的值会自动更新
@Value("${request.timeout:200}")
private int timeout;
}
```
# 4、Apollo in depth
通过上面的介绍,相信大家已经对Apollo有了一个初步的了解,并且相信已经覆盖到了大部分的使用场景。
接下来会主要介绍Apollo的cluster管理(集群)、namespace管理(命名空间)和对应的配置获取规则。
## 4.1 Core Concepts
在介绍高级特性前,我们有必要先来了解一下Apollo中的几个核心概念:
1. **application (应用)**
* 这个很好理解,就是实际使用配置的应用,Apollo客户端在运行时需要知道当前应用是谁,从而可以去获取对应的配置
* 每个应用都需要有唯一的身份标识 -- appId,我们认为应用身份是跟着代码走的,所以需要在代码中配置,具体信息请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)。
2. **environment (环境)**
* 配置对应的环境,Apollo客户端在运行时需要知道当前应用处于哪个环境,从而可以去获取应用的配置
* 我们认为环境和代码无关,同一份代码部署在不同的环境就应该能够获取到不同环境的配置
* 所以环境默认是通过读取机器上的配置(server.properties中的env属性)指定的,不过为了开发方便,我们也支持运行时通过System Property等指定,具体信息请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)。
3. **cluster (集群)**
* 一个应用下不同实例的分组,比如典型的可以按照数据中心分,把上海机房的应用实例分为一个集群,把北京机房的应用实例分为另一个集群。
* 对不同的cluster,同一个配置可以有不一样的值,如zookeeper地址。
* 集群默认是通过读取机器上的配置(server.properties中的idc属性)指定的,不过也支持运行时通过System Property指定,具体信息请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)。
4. **namespace (命名空间)**
* 一个应用下不同配置的分组,可以简单地把namespace类比为文件,不同类型的配置存放在不同的文件中,如数据库配置文件,RPC配置文件,应用自身的配置文件等
* 应用可以直接读取到公共组件的配置namespace,如DAL,RPC等
* 应用也可以通过继承公共组件的配置namespace来对公共组件的配置做调整,如DAL的初始数据库连接数
## 4.2 自定义Cluster
> 【本节内容仅对应用需要对不同集群应用不同配置才需要,如没有相关需求,可以跳过本节】
比如我们有应用在A数据中心和B数据中心都有部署,那么如果希望两个数据中心的配置不一样的话,我们可以通过新建cluster来解决。
### 4.2.1 新建Cluster
新建Cluster只有项目的管理员才有权限,管理员可以在页面左侧看到“添加集群”按钮。

点击后就进入到集群添加页面,一般情况下可以按照数据中心来划分集群,如SHAJQ、SHAOY等。
不过也支持自定义集群,比如可以为A机房的某一台机器和B机房的某一台机创建一个集群,使用一套配置。

### 4.2.2 在Cluster中添加配置并发布
集群添加成功后,就可以为该集群添加配置了,首先需要按照下图所示切换到SHAJQ集群,之后配置添加流程和[3.3 添加/修改配置项](#_33-添加修改配置项)一样,这里就不再赘述了。

### 4.2.3 指定应用实例所属的Cluster
Apollo会默认使用应用实例所在的数据中心作为cluster,所以如果两者一致的话,不需要额外配置。
如果cluster和数据中心不一致的话,那么就需要通过System Property方式来指定运行时cluster:
* -Dapollo.cluster=SomeCluster
* 这里注意`apollo.cluster`为全小写
## 4.3 自定义Namespace
> 【本节仅对公共组件配置或需要多个应用共享配置才需要,如没有相关需求,可以跳过本节】
如果应用有公共组件(如hermes-producer,cat-client等)供其它应用使用,就需要通过自定义namespace来实现公共组件的配置。
### 4.3.1 新建Namespace
以hermes-producer为例,需要先新建一个namespace,新建namespace只有项目的管理员才有权限,管理员可以在页面左侧看到“添加Namespace”按钮。

点击后就进入namespace添加页面,Apollo会把应用所属的部门作为namespace的前缀,如FX。

### 4.3.2 关联到环境和集群
Namespace创建完,需要选择在哪些环境和集群下使用

### 4.3.3 在Namespace中添加配置项
接下来在这个新建的namespace下添加配置项

添加完成后就能在FX.Hermes.Producer的namespace中看到配置。

### 4.3.4 发布namespace的配置

### 4.3.5 客户端获取Namespace配置
对自定义namespace的配置获取,稍有不同,需要程序传入namespace的名字。Apollo客户端还支持和Spring整合,更多客户端使用说明请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)和[.Net客户端使用指南](zh/usage/dotnet-sdk-user-guide)。
```java
Config config = ConfigService.getConfig("FX.Hermes.Producer");
Integer defaultSenderBatchSize = 200;
Integer senderBatchSize = config.getIntProperty("sender.batchsize", defaultSenderBatchSize);
```
### 4.3.6 客户端监听Namespace配置变化
```java
Config config = ConfigService.getConfig("FX.Hermes.Producer");
config.addChangeListener(new ConfigChangeListener() {
@Override
public void onChange(ConfigChangeEvent changeEvent) {
System.out.println("Changes for namespace " + changeEvent.getNamespace());
for (String key : changeEvent.changedKeys()) {
ConfigChange change = changeEvent.getChange(key);
System.out.println(String.format(
"Found change - key: %s, oldValue: %s, newValue: %s, changeType: %s",
change.getPropertyName(), change.getOldValue(),
change.getNewValue(), change.getChangeType()));
}
}
});
```
### 4.3.7 Spring集成样例
```java
@Configuration
@EnableApolloConfig("FX.Hermes.Producer")
public class AppConfig {}
```
```java
@Component
public class SomeBean {
//timeout的值会自动更新
@Value("${request.timeout:200}")
private int timeout;
}
```
## 4.4 配置获取规则
> 【本节仅当应用自定义了集群或namespace才需要,如无相关需求,可以跳过本节】
在有了cluster概念后,配置的规则就显得重要了。
比如应用部署在A机房,但是并没有在Apollo新建cluster,这个时候Apollo的行为是怎样的?
或者在运行时指定了cluster=SomeCluster,但是并没有在Apollo新建cluster,这个时候Apollo的行为是怎样的?
接下来就来介绍一下配置获取的规则。
### 4.4.1 应用自身配置的获取规则
当应用使用下面的语句获取配置时,我们称之为获取应用自身的配置,也就是应用自身的application namespace的配置。
```java
Config config = ConfigService.getAppConfig();
```
对这种情况的配置获取规则,简而言之如下:
1. 首先查找运行时cluster的配置(通过apollo.cluster指定)
2. 如果没有找到,则查找数据中心cluster的配置
3. 如果还是没有找到,则返回默认cluster的配置
图示如下:

所以如果应用部署在A数据中心,但是用户没有在Apollo创建cluster,那么获取的配置就是默认cluster(default)的。
如果应用部署在A数据中心,同时在运行时指定了SomeCluster,但是没有在Apollo创建cluster,那么获取的配置就是A数据中心cluster的配置,如果A数据中心cluster没有配置的话,那么获取的配置就是默认cluster(default)的。
### 4.4.2 公共组件配置的获取规则
以`FX.Hermes.Producer`为例,hermes producer是hermes发布的公共组件。当使用下面的语句获取配置时,我们称之为获取公共组件的配置。
```java
Config config = ConfigService.getConfig("FX.Hermes.Producer");
```
对这种情况的配置获取规则,简而言之如下:
1. 首先获取当前应用下的`FX.Hermes.Producer` namespace的配置
2. 然后获取hermes应用下`FX.Hermes.Producer` namespace的配置
3. 上面两部分配置的并集就是最终使用的配置,如有key一样的部分,以当前应用优先
图示如下:

通过这种方式,就实现了对框架类组件的配置管理,框架组件提供方提供配置的默认值,应用如果有特殊需求,可以自行覆盖。
## 4.5 总体设计

上图简要描述了Apollo的总体设计,我们可以从下往上看:
* Config Service提供配置的读取、推送等功能,服务对象是Apollo客户端
* Admin Service提供配置的修改、发布等功能,服务对象是Apollo Portal(管理界面)
* Config Service和Admin Service都是多实例、无状态部署,所以需要将自己注册到Eureka中并保持心跳
* 在Eureka之上我们架了一层Meta Server用于封装Eureka的服务发现接口
* Client通过域名访问Meta Server获取Config Service服务列表(IP+Port),而后直接通过IP+Port访问服务,同时在Client侧会做load balance、错误重试
* Portal通过域名访问Meta Server获取Admin Service服务列表(IP+Port),而后直接通过IP+Port访问服务,同时在Portal侧会做load balance、错误重试
* 为了简化部署,我们实际上会把Config Service、Eureka和Meta Server三个逻辑角色部署在同一个JVM进程中
### 4.5.1 Why Eureka
为什么我们采用Eureka作为服务注册中心,而不是使用传统的zk、etcd呢?我大致总结了一下,有以下几方面的原因:
* 它提供了完整的Service Registry和Service Discovery实现
* 首先是提供了完整的实现,并且也经受住了Netflix自己的生产环境考验,相对使用起来会比较省心。
* 和Spring Cloud无缝集成
* 我们的项目本身就使用了Spring Cloud和Spring Boot,同时Spring Cloud还有一套非常完善的开源代码来整合Eureka,所以使用起来非常方便。
* 另外,Eureka还支持在我们应用自身的容器中启动,也就是说我们的应用启动完之后,既充当了Eureka的角色,同时也是服务的提供者。这样就极大的提高了服务的可用性。
* **这一点是我们选择Eureka而不是zk、etcd等的主要原因,为了提高配置中心的可用性和降低部署复杂度,我们需要尽可能地减少外部依赖。**
* Open Source
* 最后一点是开源,由于代码是开源的,所以非常便于我们了解它的实现原理和排查问题。
## 4.6 客户端设计

上图简要描述了Apollo客户端的实现原理:
1. 客户端和服务端保持了一个长连接,从而能第一时间获得配置更新的推送。
2. 客户端还会定时从Apollo配置中心服务端拉取应用的最新配置。
* 这是一个fallback机制,为了防止推送机制失效导致配置不更新
* 客户端定时拉取会上报本地版本,所以一般情况下,对于定时拉取的操作,服务端都会返回304 - Not Modified
* 定时频率默认为每5分钟拉取一次,客户端也可以通过在运行时指定System Property: `apollo.refreshInterval`来覆盖,单位为分钟。
3. 客户端从Apollo配置中心服务端获取到应用的最新配置后,会保存在内存中
4. 客户端会把从服务端获取到的配置在本地文件系统缓存一份
* 在遇到服务不可用,或网络不通的时候,依然能从本地恢复配置
5. 应用程序从Apollo客户端获取最新的配置、订阅配置更新通知
### 4.6.1 配置更新推送实现
前面提到了Apollo客户端和服务端保持了一个长连接,从而能第一时间获得配置更新的推送。
长连接实际上我们是通过Http Long Polling实现的,具体而言:
* 客户端发起一个Http请求到服务端
* 服务端会保持住这个连接60秒
* 如果在60秒内有客户端关心的配置变化,被保持住的客户端请求会立即返回,并告知客户端有配置变化的namespace信息,客户端会据此拉取对应namespace的最新配置
* 如果在60秒内没有客户端关心的配置变化,那么会返回Http状态码304给客户端
* 客户端在收到服务端请求后会立即重新发起连接,回到第一步
考虑到会有数万客户端向服务端发起长连,在服务端我们使用了async servlet(Spring DeferredResult)来服务Http Long Polling请求。
## 4.7 可用性考虑
配置中心作为基础服务,可用性要求非常高,下面的表格描述了不同场景下Apollo的可用性:
| 场景 | 影响 | 降级 | 原因 |
|------------------------|--------------------------------------|---------------------------------------|-----------------------------------------------------------------------------------------|
| 某台config service下线 | 无影响 | | Config service无状态,客户端重连其它config service |
| 所有config service下线 | 客户端无法读取最新配置,Portal无影响 | 客户端重启时,可以读取本地缓存配置文件 | |
| 某台admin service下线 | 无影响 | | Admin service无状态,Portal重连其它admin service |
| 所有admin service下线 | 客户端无影响,portal无法更新配置 | | |
| 某台portal下线 | 无影响 | | Portal域名通过slb绑定多台服务器,重试后指向可用的服务器 |
| 全部portal下线 | 客户端无影响,portal无法更新配置 | | |
| 某个数据中心下线 | 无影响 | | 多数据中心部署,数据完全同步,Meta Server/Portal域名通过slb自动切换到其它存活的数据中心 |
# 5、Contribute to Apollo
Apollo从开发之初就是以开源模式开发的,所以也非常欢迎有兴趣、有余力的朋友一起加入进来。
服务端开发使用的是Java,基于Spring Cloud和Spring Boot框架。客户端目前提供了Java和.Net两种实现。
Github地址:<a href="https://github.com/ctripcorp/apollo" target="_blank">https://github.com/ctripcorp/apollo</a>
欢迎大家发起Pull Request!
| -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./docs/en/faq/common-issues-in-deployment-and-development-phase.md | TODO
| TODO
| -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./docs/en/deployment/quick-start-docker.md | TODO
| TODO
| -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-core/src/test/resources/META-INF/services/com.ctrip.framework.apollo.tracer.spi.MessageProducerManager | com.ctrip.framework.apollo.tracer.internals.MockMessageProducerManager | com.ctrip.framework.apollo.tracer.internals.MockMessageProducerManager | -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-configservice/src/test/java/com/ctrip/framework/apollo/configservice/integration/AbstractBaseIntegrationTest.java | /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.configservice.integration;
import com.ctrip.framework.apollo.biz.service.BizDBPropertySource;
import com.google.gson.Gson;
import com.ctrip.framework.apollo.ConfigServiceTestConfiguration;
import com.ctrip.framework.apollo.biz.config.BizConfig;
import com.ctrip.framework.apollo.biz.entity.Namespace;
import com.ctrip.framework.apollo.biz.entity.Release;
import com.ctrip.framework.apollo.biz.entity.ReleaseMessage;
import com.ctrip.framework.apollo.biz.repository.ReleaseMessageRepository;
import com.ctrip.framework.apollo.biz.repository.ReleaseRepository;
import com.ctrip.framework.apollo.biz.utils.ReleaseKeyGenerator;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.web.client.DefaultResponseErrorHandler;
import org.springframework.web.client.RestTemplate;
import java.time.Duration;
import java.util.Date;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.annotation.PostConstruct;
/**
* @author Jason Song(song_s@ctrip.com)
*/
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = AbstractBaseIntegrationTest.TestConfiguration.class, webEnvironment = WebEnvironment.RANDOM_PORT)
public abstract class AbstractBaseIntegrationTest {
@Autowired
private ReleaseMessageRepository releaseMessageRepository;
@Autowired
private ReleaseRepository releaseRepository;
private static final Gson GSON = new Gson();
protected RestTemplate restTemplate = (new TestRestTemplate(new RestTemplateBuilder()
.setConnectTimeout(Duration.ofSeconds(5)))).getRestTemplate();
@PostConstruct
private void postConstruct() {
restTemplate.setErrorHandler(new DefaultResponseErrorHandler());
}
@Value("${local.server.port}")
int port;
protected String getHostUrl() {
return "localhost:" + port;
}
@Configuration
@Import(ConfigServiceTestConfiguration.class)
protected static class TestConfiguration {
@Bean
public BizConfig bizConfig(final BizDBPropertySource bizDBPropertySource) {
return new TestBizConfig(bizDBPropertySource);
}
}
protected void sendReleaseMessage(String message) {
ReleaseMessage releaseMessage = new ReleaseMessage(message);
releaseMessageRepository.save(releaseMessage);
}
public Release buildRelease(String name, String comment, Namespace namespace,
Map<String, String> configurations, String owner) {
Release release = new Release();
release.setReleaseKey(ReleaseKeyGenerator.generateReleaseKey(namespace));
release.setDataChangeCreatedTime(new Date());
release.setDataChangeCreatedBy(owner);
release.setDataChangeLastModifiedBy(owner);
release.setName(name);
release.setComment(comment);
release.setAppId(namespace.getAppId());
release.setClusterName(namespace.getClusterName());
release.setNamespaceName(namespace.getNamespaceName());
release.setConfigurations(GSON.toJson(configurations));
release = releaseRepository.save(release);
return release;
}
protected void periodicSendMessage(ExecutorService executorService, String message, AtomicBoolean stop) {
executorService.submit(() -> {
//wait for the request connected to server
while (!stop.get() && !Thread.currentThread().isInterrupted()) {
try {
TimeUnit.MILLISECONDS.sleep(100);
} catch (InterruptedException e) {
}
//double check
if (stop.get()) {
break;
}
sendReleaseMessage(message);
}
});
}
private static class TestBizConfig extends BizConfig {
public TestBizConfig(final BizDBPropertySource propertySource) {
super(propertySource);
}
@Override
public int appNamespaceCacheScanInterval() {
//should be short enough to update the AppNamespace cache in time
return 1;
}
@Override
public TimeUnit appNamespaceCacheScanIntervalTimeUnit() {
return TimeUnit.MILLISECONDS;
}
}
}
| /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.configservice.integration;
import com.ctrip.framework.apollo.biz.service.BizDBPropertySource;
import com.google.gson.Gson;
import com.ctrip.framework.apollo.ConfigServiceTestConfiguration;
import com.ctrip.framework.apollo.biz.config.BizConfig;
import com.ctrip.framework.apollo.biz.entity.Namespace;
import com.ctrip.framework.apollo.biz.entity.Release;
import com.ctrip.framework.apollo.biz.entity.ReleaseMessage;
import com.ctrip.framework.apollo.biz.repository.ReleaseMessageRepository;
import com.ctrip.framework.apollo.biz.repository.ReleaseRepository;
import com.ctrip.framework.apollo.biz.utils.ReleaseKeyGenerator;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.web.client.DefaultResponseErrorHandler;
import org.springframework.web.client.RestTemplate;
import java.time.Duration;
import java.util.Date;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.annotation.PostConstruct;
/**
* @author Jason Song(song_s@ctrip.com)
*/
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = AbstractBaseIntegrationTest.TestConfiguration.class, webEnvironment = WebEnvironment.RANDOM_PORT)
public abstract class AbstractBaseIntegrationTest {
@Autowired
private ReleaseMessageRepository releaseMessageRepository;
@Autowired
private ReleaseRepository releaseRepository;
private static final Gson GSON = new Gson();
protected RestTemplate restTemplate = (new TestRestTemplate(new RestTemplateBuilder()
.setConnectTimeout(Duration.ofSeconds(5)))).getRestTemplate();
@PostConstruct
private void postConstruct() {
restTemplate.setErrorHandler(new DefaultResponseErrorHandler());
}
@Value("${local.server.port}")
int port;
protected String getHostUrl() {
return "localhost:" + port;
}
@Configuration
@Import(ConfigServiceTestConfiguration.class)
protected static class TestConfiguration {
@Bean
public BizConfig bizConfig(final BizDBPropertySource bizDBPropertySource) {
return new TestBizConfig(bizDBPropertySource);
}
}
protected void sendReleaseMessage(String message) {
ReleaseMessage releaseMessage = new ReleaseMessage(message);
releaseMessageRepository.save(releaseMessage);
}
public Release buildRelease(String name, String comment, Namespace namespace,
Map<String, String> configurations, String owner) {
Release release = new Release();
release.setReleaseKey(ReleaseKeyGenerator.generateReleaseKey(namespace));
release.setDataChangeCreatedTime(new Date());
release.setDataChangeCreatedBy(owner);
release.setDataChangeLastModifiedBy(owner);
release.setName(name);
release.setComment(comment);
release.setAppId(namespace.getAppId());
release.setClusterName(namespace.getClusterName());
release.setNamespaceName(namespace.getNamespaceName());
release.setConfigurations(GSON.toJson(configurations));
release = releaseRepository.save(release);
return release;
}
protected void periodicSendMessage(ExecutorService executorService, String message, AtomicBoolean stop) {
executorService.submit(() -> {
//wait for the request connected to server
while (!stop.get() && !Thread.currentThread().isInterrupted()) {
try {
TimeUnit.MILLISECONDS.sleep(100);
} catch (InterruptedException e) {
}
//double check
if (stop.get()) {
break;
}
sendReleaseMessage(message);
}
});
}
private static class TestBizConfig extends BizConfig {
public TestBizConfig(final BizDBPropertySource propertySource) {
super(propertySource);
}
@Override
public int appNamespaceCacheScanInterval() {
//should be short enough to update the AppNamespace cache in time
return 1;
}
@Override
public TimeUnit appNamespaceCacheScanIntervalTimeUnit() {
return TimeUnit.MILLISECONDS;
}
}
}
| -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-configservice/src/test/java/com/ctrip/framework/apollo/metaservice/controller/ServiceControllerTest.java | /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.metaservice.controller;
import static org.junit.Assert.*;
import static org.mockito.Mockito.when;
import com.ctrip.framework.apollo.core.ServiceNameConsts;
import com.ctrip.framework.apollo.core.dto.ServiceDTO;
import com.ctrip.framework.apollo.metaservice.service.DiscoveryService;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
@RunWith(MockitoJUnitRunner.class)
public class ServiceControllerTest {
@Mock
private DiscoveryService discoveryService;
@Mock
private List<ServiceDTO> someServices;
private ServiceController serviceController;
@Before
public void setUp() throws Exception {
serviceController = new ServiceController(discoveryService);
}
@Test
public void testGetMetaService() {
assertTrue(serviceController.getMetaService().isEmpty());
}
@Test
public void testGetConfigService() {
String someAppId = "someAppId";
String someClientIp = "someClientIp";
when(discoveryService.getServiceInstances(ServiceNameConsts.APOLLO_CONFIGSERVICE))
.thenReturn(someServices);
assertEquals(someServices, serviceController.getConfigService(someAppId, someClientIp));
}
@Test
public void testGetAdminService() {
when(discoveryService.getServiceInstances(ServiceNameConsts.APOLLO_ADMINSERVICE))
.thenReturn(someServices);
assertEquals(someServices, serviceController.getAdminService());
}
} | /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.metaservice.controller;
import static org.junit.Assert.*;
import static org.mockito.Mockito.when;
import com.ctrip.framework.apollo.core.ServiceNameConsts;
import com.ctrip.framework.apollo.core.dto.ServiceDTO;
import com.ctrip.framework.apollo.metaservice.service.DiscoveryService;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
@RunWith(MockitoJUnitRunner.class)
public class ServiceControllerTest {
@Mock
private DiscoveryService discoveryService;
@Mock
private List<ServiceDTO> someServices;
private ServiceController serviceController;
@Before
public void setUp() throws Exception {
serviceController = new ServiceController(discoveryService);
}
@Test
public void testGetMetaService() {
assertTrue(serviceController.getMetaService().isEmpty());
}
@Test
public void testGetConfigService() {
String someAppId = "someAppId";
String someClientIp = "someClientIp";
when(discoveryService.getServiceInstances(ServiceNameConsts.APOLLO_CONFIGSERVICE))
.thenReturn(someServices);
assertEquals(someServices, serviceController.getConfigService(someAppId, someClientIp));
}
@Test
public void testGetAdminService() {
when(discoveryService.getServiceInstances(ServiceNameConsts.APOLLO_ADMINSERVICE))
.thenReturn(someServices);
assertEquals(someServices, serviceController.getAdminService());
}
} | -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/repository/AppRepository.java | /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.biz.repository;
import com.ctrip.framework.apollo.common.entity.App;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import java.util.List;
public interface AppRepository extends PagingAndSortingRepository<App, Long> {
@Query("SELECT a from App a WHERE a.name LIKE %:name%")
List<App> findByName(@Param("name") String name);
App findByAppId(String appId);
}
| /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.biz.repository;
import com.ctrip.framework.apollo.common.entity.App;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import java.util.List;
public interface AppRepository extends PagingAndSortingRepository<App, Long> {
@Query("SELECT a from App a WHERE a.name LIKE %:name%")
List<App> findByName(@Param("name") String name);
App findByAppId(String appId);
}
| -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-client/src/test/java/com/ctrip/framework/apollo/internals/AbstractConfigTest.java | /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.internals;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import com.ctrip.framework.apollo.ConfigChangeListener;
import com.ctrip.framework.apollo.enums.ConfigSourceType;
import com.ctrip.framework.apollo.enums.PropertyChangeType;
import com.ctrip.framework.apollo.model.ConfigChange;
import com.ctrip.framework.apollo.model.ConfigChangeEvent;
import com.google.common.util.concurrent.SettableFuture;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicInteger;
import org.junit.Test;
import org.mockito.Matchers;
/**
* @author wxq
*/
public class AbstractConfigTest {
/**
* @see AbstractConfig#fireConfigChange(ConfigChangeEvent)
*/
@Test
public void testFireConfigChange_cannot_notify() throws InterruptedException {
AbstractConfig abstractConfig = spy(new ErrorConfig());
final String namespace = "app-namespace-0";
ConfigChangeListener configChangeListener = spy(new ConfigChangeListener() {
@Override
public void onChange(ConfigChangeEvent changeEvent) {
}
});
abstractConfig
.addChangeListener(configChangeListener, Collections.singleton("cannot-be-match-key"));
Map<String, ConfigChange> changes = new HashMap<>();
changes.put("key1",
new ConfigChange(namespace, "key1", null, "new-value", PropertyChangeType.ADDED));
ConfigChangeEvent configChangeEvent = new ConfigChangeEvent(namespace, changes);
abstractConfig.fireConfigChange(configChangeEvent);
abstractConfig.fireConfigChange(namespace, changes);
// wait a minute for invoking
Thread.sleep(100);
verify(configChangeListener, times(0)).onChange(Matchers.<ConfigChangeEvent>any());
}
@Test
public void testFireConfigChange_event_notify_once()
throws ExecutionException, InterruptedException, TimeoutException {
AbstractConfig abstractConfig = new ErrorConfig();
final String namespace = "app-namespace-1";
final String key = "great-key";
final SettableFuture<ConfigChangeEvent> future1 = SettableFuture.create();
final SettableFuture<ConfigChangeEvent> future2 = SettableFuture.create();
final AtomicInteger invokeCount = new AtomicInteger();
final ConfigChangeListener configChangeListener1 = spy(new ConfigChangeListener() {
@Override
public void onChange(ConfigChangeEvent changeEvent) {
invokeCount.incrementAndGet();
future1.set(changeEvent);
}
});
final ConfigChangeListener configChangeListener2 = spy(new ConfigChangeListener() {
@Override
public void onChange(ConfigChangeEvent changeEvent) {
invokeCount.incrementAndGet();
future2.set(changeEvent);
}
});
abstractConfig.addChangeListener(configChangeListener1, Collections.singleton(key));
abstractConfig.addChangeListener(configChangeListener2, Collections.singleton(key));
Map<String, ConfigChange> changes = new HashMap<>();
changes.put(key,
new ConfigChange(namespace, key, "old-value", "new-value", PropertyChangeType.MODIFIED));
ConfigChangeEvent configChangeEvent = new ConfigChangeEvent(namespace, changes);
abstractConfig.fireConfigChange(configChangeEvent);
assertEquals(configChangeEvent, future1.get(500, TimeUnit.MILLISECONDS));
assertEquals(configChangeEvent, future2.get(500, TimeUnit.MILLISECONDS));
assertEquals(2, invokeCount.get());
verify(configChangeListener1, times(1)).onChange(Matchers.eq(configChangeEvent));
verify(configChangeListener2, times(1)).onChange(Matchers.eq(configChangeEvent));
}
@Test
public void testFireConfigChange_changes_notify_once()
throws ExecutionException, InterruptedException, TimeoutException {
AbstractConfig abstractConfig = new ErrorConfig();
final String namespace = "app-namespace-1";
final String key = "great-key";
final SettableFuture<ConfigChangeEvent> future1 = SettableFuture.create();
final SettableFuture<ConfigChangeEvent> future2 = SettableFuture.create();
final AtomicInteger invokeCount = new AtomicInteger();
final ConfigChangeListener configChangeListener1 = spy(new ConfigChangeListener() {
@Override
public void onChange(ConfigChangeEvent changeEvent) {
invokeCount.incrementAndGet();
future1.set(changeEvent);
}
});
final ConfigChangeListener configChangeListener2 = spy(new ConfigChangeListener() {
@Override
public void onChange(ConfigChangeEvent changeEvent) {
invokeCount.incrementAndGet();
future2.set(changeEvent);
}
});
abstractConfig.addChangeListener(configChangeListener1, Collections.singleton(key));
abstractConfig.addChangeListener(configChangeListener2, Collections.singleton(key));
Map<String, ConfigChange> changes = new HashMap<>();
changes.put(key,
new ConfigChange(namespace, key, "old-value", "new-value", PropertyChangeType.MODIFIED));
abstractConfig.fireConfigChange(namespace, changes);
assertEquals(Collections.singleton(key), future1.get(500, TimeUnit.MILLISECONDS).changedKeys());
assertEquals(Collections.singleton(key), future2.get(500, TimeUnit.MILLISECONDS).changedKeys());
assertEquals(2, invokeCount.get());
verify(configChangeListener1, times(1)).onChange(Matchers.<ConfigChangeEvent>any());
verify(configChangeListener2, times(1)).onChange(Matchers.<ConfigChangeEvent>any());
}
/**
* Only for current test usage.
*
* @author wxq
*/
private static class ErrorConfig extends AbstractConfig {
@Override
public String getProperty(String key, String defaultValue) {
throw new UnsupportedOperationException();
}
@Override
public Set<String> getPropertyNames() {
throw new UnsupportedOperationException();
}
@Override
public ConfigSourceType getSourceType() {
throw new UnsupportedOperationException();
}
}
} | /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.internals;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import com.ctrip.framework.apollo.ConfigChangeListener;
import com.ctrip.framework.apollo.enums.ConfigSourceType;
import com.ctrip.framework.apollo.enums.PropertyChangeType;
import com.ctrip.framework.apollo.model.ConfigChange;
import com.ctrip.framework.apollo.model.ConfigChangeEvent;
import com.google.common.util.concurrent.SettableFuture;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicInteger;
import org.junit.Test;
import org.mockito.Matchers;
/**
* @author wxq
*/
public class AbstractConfigTest {
/**
* @see AbstractConfig#fireConfigChange(ConfigChangeEvent)
*/
@Test
public void testFireConfigChange_cannot_notify() throws InterruptedException {
AbstractConfig abstractConfig = spy(new ErrorConfig());
final String namespace = "app-namespace-0";
ConfigChangeListener configChangeListener = spy(new ConfigChangeListener() {
@Override
public void onChange(ConfigChangeEvent changeEvent) {
}
});
abstractConfig
.addChangeListener(configChangeListener, Collections.singleton("cannot-be-match-key"));
Map<String, ConfigChange> changes = new HashMap<>();
changes.put("key1",
new ConfigChange(namespace, "key1", null, "new-value", PropertyChangeType.ADDED));
ConfigChangeEvent configChangeEvent = new ConfigChangeEvent(namespace, changes);
abstractConfig.fireConfigChange(configChangeEvent);
abstractConfig.fireConfigChange(namespace, changes);
// wait a minute for invoking
Thread.sleep(100);
verify(configChangeListener, times(0)).onChange(Matchers.<ConfigChangeEvent>any());
}
@Test
public void testFireConfigChange_event_notify_once()
throws ExecutionException, InterruptedException, TimeoutException {
AbstractConfig abstractConfig = new ErrorConfig();
final String namespace = "app-namespace-1";
final String key = "great-key";
final SettableFuture<ConfigChangeEvent> future1 = SettableFuture.create();
final SettableFuture<ConfigChangeEvent> future2 = SettableFuture.create();
final AtomicInteger invokeCount = new AtomicInteger();
final ConfigChangeListener configChangeListener1 = spy(new ConfigChangeListener() {
@Override
public void onChange(ConfigChangeEvent changeEvent) {
invokeCount.incrementAndGet();
future1.set(changeEvent);
}
});
final ConfigChangeListener configChangeListener2 = spy(new ConfigChangeListener() {
@Override
public void onChange(ConfigChangeEvent changeEvent) {
invokeCount.incrementAndGet();
future2.set(changeEvent);
}
});
abstractConfig.addChangeListener(configChangeListener1, Collections.singleton(key));
abstractConfig.addChangeListener(configChangeListener2, Collections.singleton(key));
Map<String, ConfigChange> changes = new HashMap<>();
changes.put(key,
new ConfigChange(namespace, key, "old-value", "new-value", PropertyChangeType.MODIFIED));
ConfigChangeEvent configChangeEvent = new ConfigChangeEvent(namespace, changes);
abstractConfig.fireConfigChange(configChangeEvent);
assertEquals(configChangeEvent, future1.get(500, TimeUnit.MILLISECONDS));
assertEquals(configChangeEvent, future2.get(500, TimeUnit.MILLISECONDS));
assertEquals(2, invokeCount.get());
verify(configChangeListener1, times(1)).onChange(Matchers.eq(configChangeEvent));
verify(configChangeListener2, times(1)).onChange(Matchers.eq(configChangeEvent));
}
@Test
public void testFireConfigChange_changes_notify_once()
throws ExecutionException, InterruptedException, TimeoutException {
AbstractConfig abstractConfig = new ErrorConfig();
final String namespace = "app-namespace-1";
final String key = "great-key";
final SettableFuture<ConfigChangeEvent> future1 = SettableFuture.create();
final SettableFuture<ConfigChangeEvent> future2 = SettableFuture.create();
final AtomicInteger invokeCount = new AtomicInteger();
final ConfigChangeListener configChangeListener1 = spy(new ConfigChangeListener() {
@Override
public void onChange(ConfigChangeEvent changeEvent) {
invokeCount.incrementAndGet();
future1.set(changeEvent);
}
});
final ConfigChangeListener configChangeListener2 = spy(new ConfigChangeListener() {
@Override
public void onChange(ConfigChangeEvent changeEvent) {
invokeCount.incrementAndGet();
future2.set(changeEvent);
}
});
abstractConfig.addChangeListener(configChangeListener1, Collections.singleton(key));
abstractConfig.addChangeListener(configChangeListener2, Collections.singleton(key));
Map<String, ConfigChange> changes = new HashMap<>();
changes.put(key,
new ConfigChange(namespace, key, "old-value", "new-value", PropertyChangeType.MODIFIED));
abstractConfig.fireConfigChange(namespace, changes);
assertEquals(Collections.singleton(key), future1.get(500, TimeUnit.MILLISECONDS).changedKeys());
assertEquals(Collections.singleton(key), future2.get(500, TimeUnit.MILLISECONDS).changedKeys());
assertEquals(2, invokeCount.get());
verify(configChangeListener1, times(1)).onChange(Matchers.<ConfigChangeEvent>any());
verify(configChangeListener2, times(1)).onChange(Matchers.<ConfigChangeEvent>any());
}
/**
* Only for current test usage.
*
* @author wxq
*/
private static class ErrorConfig extends AbstractConfig {
@Override
public String getProperty(String key, String defaultValue) {
throw new UnsupportedOperationException();
}
@Override
public Set<String> getPropertyNames() {
throw new UnsupportedOperationException();
}
@Override
public ConfigSourceType getSourceType() {
throw new UnsupportedOperationException();
}
}
} | -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-configservice/src/test/resources/integration-test/test-gray-release.sql | --
-- Copyright 2021 Apollo Authors
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
INSERT INTO GrayReleaseRule (`Id`, `AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `Rules`, `ReleaseId`, `BranchStatus`)
VALUES
(1, 'someAppId', 'default', 'application', 'gray-branch-1', '[{"clientAppId":"someAppId","clientIpList":["1.1.1.1"]}]', 986, 1);
INSERT INTO GrayReleaseRule (`Id`, `AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `Rules`, `ReleaseId`, `BranchStatus`)
VALUES
(2, 'somePublicAppId', 'default', 'somePublicNamespace', 'gray-branch-2', '[{"clientAppId":"someAppId","clientIpList":["1.1.1.1"]}]', 985, 1);
| --
-- Copyright 2021 Apollo Authors
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
INSERT INTO GrayReleaseRule (`Id`, `AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `Rules`, `ReleaseId`, `BranchStatus`)
VALUES
(1, 'someAppId', 'default', 'application', 'gray-branch-1', '[{"clientAppId":"someAppId","clientIpList":["1.1.1.1"]}]', 986, 1);
INSERT INTO GrayReleaseRule (`Id`, `AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `Rules`, `ReleaseId`, `BranchStatus`)
VALUES
(2, 'somePublicAppId', 'default', 'somePublicNamespace', 'gray-branch-2', '[{"clientAppId":"someAppId","clientIpList":["1.1.1.1"]}]', 985, 1);
| -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-portal/src/main/resources/static/vendor/clipboard.min.js | /*!
* clipboard.js v1.5.12
* https://zenorocha.github.io/clipboard.js
*
* Licensed MIT © Zeno Rocha
*/
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Clipboard=t()}}(function(){var t,e,n;return function t(e,n,o){function i(a,c){if(!n[a]){if(!e[a]){var s="function"==typeof require&&require;if(!c&&s)return s(a,!0);if(r)return r(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[a]={exports:{}};e[a][0].call(u.exports,function(t){var n=e[a][1][t];return i(n?n:t)},u,u.exports,t,e,n,o)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a<o.length;a++)i(o[a]);return i}({1:[function(t,e,n){var o=t("matches-selector");e.exports=function(t,e,n){for(var i=n?t:t.parentNode;i&&i!==document;){if(o(i,e))return i;i=i.parentNode}}},{"matches-selector":5}],2:[function(t,e,n){function o(t,e,n,o,r){var a=i.apply(this,arguments);return t.addEventListener(n,a,r),{destroy:function(){t.removeEventListener(n,a,r)}}}function i(t,e,n,o){return function(n){n.delegateTarget=r(n.target,e,!0),n.delegateTarget&&o.call(t,n)}}var r=t("closest");e.exports=o},{closest:1}],3:[function(t,e,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){var e=Object.prototype.toString.call(t);return"[object Function]"===e}},{}],4:[function(t,e,n){function o(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!c.string(e))throw new TypeError("Second argument must be a String");if(!c.fn(n))throw new TypeError("Third argument must be a Function");if(c.node(t))return i(t,e,n);if(c.nodeList(t))return r(t,e,n);if(c.string(t))return a(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function i(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}function r(t,e,n){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,n)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,n)})}}}function a(t,e,n){return s(document.body,t,e,n)}var c=t("./is"),s=t("delegate");e.exports=o},{"./is":3,delegate:2}],5:[function(t,e,n){function o(t,e){if(r)return r.call(t,e);for(var n=t.parentNode.querySelectorAll(e),o=0;o<n.length;++o)if(n[o]==t)return!0;return!1}var i=Element.prototype,r=i.matchesSelector||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector;e.exports=o},{}],6:[function(t,e,n){function o(t){var e;if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName)t.focus(),t.setSelectionRange(0,t.value.length),e=t.value;else{t.hasAttribute("contenteditable")&&t.focus();var n=window.getSelection(),o=document.createRange();o.selectNodeContents(t),n.removeAllRanges(),n.addRange(o),e=n.toString()}return e}e.exports=o},{}],7:[function(t,e,n){function o(){}o.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){function o(){i.off(t,o),e.apply(n,arguments)}var i=this;return o._=e,this.on(t,o,n)},emit:function(t){var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,i=n.length;for(o;i>o;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],i=[];if(o&&e)for(var r=0,a=o.length;a>r;r++)o[r].fn!==e&&o[r].fn._!==e&&i.push(o[r]);return i.length?n[t]=i:delete n[t],this}},e.exports=o},{}],8:[function(e,n,o){!function(i,r){if("function"==typeof t&&t.amd)t(["module","select"],r);else if("undefined"!=typeof o)r(n,e("select"));else{var a={exports:{}};r(a,i.select),i.clipboardAction=a.exports}}(this,function(t,e){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=n(e),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},a=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),c=function(){function t(e){o(this,t),this.resolveOptions(e),this.initSelection()}return t.prototype.resolveOptions=function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.action=e.action,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""},t.prototype.initSelection=function t(){this.text?this.selectFake():this.target&&this.selectTarget()},t.prototype.selectFake=function t(){var e=this,n="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=document.body.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[n?"right":"left"]="-9999px",this.fakeElem.style.top=(window.pageYOffset||document.documentElement.scrollTop)+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,document.body.appendChild(this.fakeElem),this.selectedText=(0,i.default)(this.fakeElem),this.copyText()},t.prototype.removeFake=function t(){this.fakeHandler&&(document.body.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)},t.prototype.selectTarget=function t(){this.selectedText=(0,i.default)(this.target),this.copyText()},t.prototype.copyText=function t(){var e=void 0;try{e=document.execCommand(this.action)}catch(n){e=!1}this.handleResult(e)},t.prototype.handleResult=function t(e){e?this.emitter.emit("success",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)}):this.emitter.emit("error",{action:this.action,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})},t.prototype.clearSelection=function t(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()},t.prototype.destroy=function t(){this.removeFake()},a(t,[{key:"action",set:function t(){var e=arguments.length<=0||void 0===arguments[0]?"copy":arguments[0];if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function t(){return this._action}},{key:"target",set:function t(e){if(void 0!==e){if(!e||"object"!==("undefined"==typeof e?"undefined":r(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function t(){return this._target}}]),t}();t.exports=c})},{select:6}],9:[function(e,n,o){!function(i,r){if("function"==typeof t&&t.amd)t(["module","./clipboard-action","tiny-emitter","good-listener"],r);else if("undefined"!=typeof o)r(n,e("./clipboard-action"),e("tiny-emitter"),e("good-listener"));else{var a={exports:{}};r(a,i.clipboardAction,i.tinyEmitter,i.goodListener),i.clipboard=a.exports}}(this,function(t,e,n,o){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}var l=i(e),u=i(n),f=i(o),d=function(t){function e(n,o){r(this,e);var i=a(this,t.call(this));return i.resolveOptions(o),i.listenClick(n),i}return c(e,t),e.prototype.resolveOptions=function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText},e.prototype.listenClick=function t(e){var n=this;this.listener=(0,f.default)(e,"click",function(t){return n.onClick(t)})},e.prototype.onClick=function t(e){var n=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l.default({action:this.action(n),target:this.target(n),text:this.text(n),trigger:n,emitter:this})},e.prototype.defaultAction=function t(e){return s("action",e)},e.prototype.defaultTarget=function t(e){var n=s("target",e);return n?document.querySelector(n):void 0},e.prototype.defaultText=function t(e){return s("text",e)},e.prototype.destroy=function t(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)},e}(u.default);t.exports=d})},{"./clipboard-action":8,"good-listener":4,"tiny-emitter":7}]},{},[9])(9)}); | /*!
* clipboard.js v1.5.12
* https://zenorocha.github.io/clipboard.js
*
* Licensed MIT © Zeno Rocha
*/
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Clipboard=t()}}(function(){var t,e,n;return function t(e,n,o){function i(a,c){if(!n[a]){if(!e[a]){var s="function"==typeof require&&require;if(!c&&s)return s(a,!0);if(r)return r(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[a]={exports:{}};e[a][0].call(u.exports,function(t){var n=e[a][1][t];return i(n?n:t)},u,u.exports,t,e,n,o)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a<o.length;a++)i(o[a]);return i}({1:[function(t,e,n){var o=t("matches-selector");e.exports=function(t,e,n){for(var i=n?t:t.parentNode;i&&i!==document;){if(o(i,e))return i;i=i.parentNode}}},{"matches-selector":5}],2:[function(t,e,n){function o(t,e,n,o,r){var a=i.apply(this,arguments);return t.addEventListener(n,a,r),{destroy:function(){t.removeEventListener(n,a,r)}}}function i(t,e,n,o){return function(n){n.delegateTarget=r(n.target,e,!0),n.delegateTarget&&o.call(t,n)}}var r=t("closest");e.exports=o},{closest:1}],3:[function(t,e,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){var e=Object.prototype.toString.call(t);return"[object Function]"===e}},{}],4:[function(t,e,n){function o(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!c.string(e))throw new TypeError("Second argument must be a String");if(!c.fn(n))throw new TypeError("Third argument must be a Function");if(c.node(t))return i(t,e,n);if(c.nodeList(t))return r(t,e,n);if(c.string(t))return a(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function i(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}function r(t,e,n){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,n)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,n)})}}}function a(t,e,n){return s(document.body,t,e,n)}var c=t("./is"),s=t("delegate");e.exports=o},{"./is":3,delegate:2}],5:[function(t,e,n){function o(t,e){if(r)return r.call(t,e);for(var n=t.parentNode.querySelectorAll(e),o=0;o<n.length;++o)if(n[o]==t)return!0;return!1}var i=Element.prototype,r=i.matchesSelector||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector;e.exports=o},{}],6:[function(t,e,n){function o(t){var e;if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName)t.focus(),t.setSelectionRange(0,t.value.length),e=t.value;else{t.hasAttribute("contenteditable")&&t.focus();var n=window.getSelection(),o=document.createRange();o.selectNodeContents(t),n.removeAllRanges(),n.addRange(o),e=n.toString()}return e}e.exports=o},{}],7:[function(t,e,n){function o(){}o.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){function o(){i.off(t,o),e.apply(n,arguments)}var i=this;return o._=e,this.on(t,o,n)},emit:function(t){var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,i=n.length;for(o;i>o;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],i=[];if(o&&e)for(var r=0,a=o.length;a>r;r++)o[r].fn!==e&&o[r].fn._!==e&&i.push(o[r]);return i.length?n[t]=i:delete n[t],this}},e.exports=o},{}],8:[function(e,n,o){!function(i,r){if("function"==typeof t&&t.amd)t(["module","select"],r);else if("undefined"!=typeof o)r(n,e("select"));else{var a={exports:{}};r(a,i.select),i.clipboardAction=a.exports}}(this,function(t,e){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=n(e),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},a=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),c=function(){function t(e){o(this,t),this.resolveOptions(e),this.initSelection()}return t.prototype.resolveOptions=function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.action=e.action,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""},t.prototype.initSelection=function t(){this.text?this.selectFake():this.target&&this.selectTarget()},t.prototype.selectFake=function t(){var e=this,n="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=document.body.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[n?"right":"left"]="-9999px",this.fakeElem.style.top=(window.pageYOffset||document.documentElement.scrollTop)+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,document.body.appendChild(this.fakeElem),this.selectedText=(0,i.default)(this.fakeElem),this.copyText()},t.prototype.removeFake=function t(){this.fakeHandler&&(document.body.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)},t.prototype.selectTarget=function t(){this.selectedText=(0,i.default)(this.target),this.copyText()},t.prototype.copyText=function t(){var e=void 0;try{e=document.execCommand(this.action)}catch(n){e=!1}this.handleResult(e)},t.prototype.handleResult=function t(e){e?this.emitter.emit("success",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)}):this.emitter.emit("error",{action:this.action,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})},t.prototype.clearSelection=function t(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()},t.prototype.destroy=function t(){this.removeFake()},a(t,[{key:"action",set:function t(){var e=arguments.length<=0||void 0===arguments[0]?"copy":arguments[0];if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function t(){return this._action}},{key:"target",set:function t(e){if(void 0!==e){if(!e||"object"!==("undefined"==typeof e?"undefined":r(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function t(){return this._target}}]),t}();t.exports=c})},{select:6}],9:[function(e,n,o){!function(i,r){if("function"==typeof t&&t.amd)t(["module","./clipboard-action","tiny-emitter","good-listener"],r);else if("undefined"!=typeof o)r(n,e("./clipboard-action"),e("tiny-emitter"),e("good-listener"));else{var a={exports:{}};r(a,i.clipboardAction,i.tinyEmitter,i.goodListener),i.clipboard=a.exports}}(this,function(t,e,n,o){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}var l=i(e),u=i(n),f=i(o),d=function(t){function e(n,o){r(this,e);var i=a(this,t.call(this));return i.resolveOptions(o),i.listenClick(n),i}return c(e,t),e.prototype.resolveOptions=function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText},e.prototype.listenClick=function t(e){var n=this;this.listener=(0,f.default)(e,"click",function(t){return n.onClick(t)})},e.prototype.onClick=function t(e){var n=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l.default({action:this.action(n),target:this.target(n),text:this.text(n),trigger:n,emitter:this})},e.prototype.defaultAction=function t(e){return s("action",e)},e.prototype.defaultTarget=function t(e){var n=s("target",e);return n?document.querySelector(n):void 0},e.prototype.defaultText=function t(e){return s("text",e)},e.prototype.destroy=function t(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)},e}(u.default);t.exports=d})},{"./clipboard-action":8,"good-listener":4,"tiny-emitter":7}]},{},[9])(9)}); | -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-portal/src/main/resources/static/vendor/bootstrap/js/bootstrap-treeview.min.js | !function(a,b,c,d){"use strict";var e="treeview",f={};f.settings={injectStyle:!0,levels:2,expandIcon:"glyphicon glyphicon-plus",collapseIcon:"glyphicon glyphicon-minus",emptyIcon:"glyphicon",nodeIcon:"",selectedIcon:"",checkedIcon:"glyphicon glyphicon-check",uncheckedIcon:"glyphicon glyphicon-unchecked",color:d,backColor:d,borderColor:d,onhoverColor:"#F5F5F5",selectedColor:"#FFFFFF",selectedBackColor:"#428bca",searchResultColor:"#D9534F",searchResultBackColor:d,enableLinks:!1,highlightSelected:!0,highlightSearchResults:!0,showBorder:!0,showIcon:!0,showCheckbox:!1,showTags:!1,multiSelect:!1,onNodeChecked:d,onNodeCollapsed:d,onNodeDisabled:d,onNodeEnabled:d,onNodeExpanded:d,onNodeSelected:d,onNodeUnchecked:d,onNodeUnselected:d,onSearchComplete:d,onSearchCleared:d},f.options={silent:!1,ignoreChildren:!1},f.searchOptions={ignoreCase:!0,exactMatch:!1,revealResults:!0};var g=function(b,c){return this.$element=a(b),this.elementId=b.id,this.styleId=this.elementId+"-style",this.init(c),{options:this.options,init:a.proxy(this.init,this),remove:a.proxy(this.remove,this),getNode:a.proxy(this.getNode,this),getParent:a.proxy(this.getParent,this),getSiblings:a.proxy(this.getSiblings,this),getSelected:a.proxy(this.getSelected,this),getUnselected:a.proxy(this.getUnselected,this),getExpanded:a.proxy(this.getExpanded,this),getCollapsed:a.proxy(this.getCollapsed,this),getChecked:a.proxy(this.getChecked,this),getUnchecked:a.proxy(this.getUnchecked,this),getDisabled:a.proxy(this.getDisabled,this),getEnabled:a.proxy(this.getEnabled,this),selectNode:a.proxy(this.selectNode,this),unselectNode:a.proxy(this.unselectNode,this),toggleNodeSelected:a.proxy(this.toggleNodeSelected,this),collapseAll:a.proxy(this.collapseAll,this),collapseNode:a.proxy(this.collapseNode,this),expandAll:a.proxy(this.expandAll,this),expandNode:a.proxy(this.expandNode,this),toggleNodeExpanded:a.proxy(this.toggleNodeExpanded,this),revealNode:a.proxy(this.revealNode,this),checkAll:a.proxy(this.checkAll,this),checkNode:a.proxy(this.checkNode,this),uncheckAll:a.proxy(this.uncheckAll,this),uncheckNode:a.proxy(this.uncheckNode,this),toggleNodeChecked:a.proxy(this.toggleNodeChecked,this),disableAll:a.proxy(this.disableAll,this),disableNode:a.proxy(this.disableNode,this),enableAll:a.proxy(this.enableAll,this),enableNode:a.proxy(this.enableNode,this),toggleNodeDisabled:a.proxy(this.toggleNodeDisabled,this),search:a.proxy(this.search,this),clearSearch:a.proxy(this.clearSearch,this)}};g.prototype.init=function(b){this.tree=[],this.nodes=[],b.data&&("string"==typeof b.data&&(b.data=a.parseJSON(b.data)),this.tree=a.extend(!0,[],b.data),delete b.data),this.options=a.extend({},f.settings,b),this.destroy(),this.subscribeEvents(),this.setInitialStates({nodes:this.tree},0),this.render()},g.prototype.remove=function(){this.destroy(),a.removeData(this,e),a("#"+this.styleId).remove()},g.prototype.destroy=function(){this.initialized&&(this.$wrapper.remove(),this.$wrapper=null,this.unsubscribeEvents(),this.initialized=!1)},g.prototype.unsubscribeEvents=function(){this.$element.off("click"),this.$element.off("nodeChecked"),this.$element.off("nodeCollapsed"),this.$element.off("nodeDisabled"),this.$element.off("nodeEnabled"),this.$element.off("nodeExpanded"),this.$element.off("nodeSelected"),this.$element.off("nodeUnchecked"),this.$element.off("nodeUnselected"),this.$element.off("searchComplete"),this.$element.off("searchCleared")},g.prototype.subscribeEvents=function(){this.unsubscribeEvents(),this.$element.on("click",a.proxy(this.clickHandler,this)),"function"==typeof this.options.onNodeChecked&&this.$element.on("nodeChecked",this.options.onNodeChecked),"function"==typeof this.options.onNodeCollapsed&&this.$element.on("nodeCollapsed",this.options.onNodeCollapsed),"function"==typeof this.options.onNodeDisabled&&this.$element.on("nodeDisabled",this.options.onNodeDisabled),"function"==typeof this.options.onNodeEnabled&&this.$element.on("nodeEnabled",this.options.onNodeEnabled),"function"==typeof this.options.onNodeExpanded&&this.$element.on("nodeExpanded",this.options.onNodeExpanded),"function"==typeof this.options.onNodeSelected&&this.$element.on("nodeSelected",this.options.onNodeSelected),"function"==typeof this.options.onNodeUnchecked&&this.$element.on("nodeUnchecked",this.options.onNodeUnchecked),"function"==typeof this.options.onNodeUnselected&&this.$element.on("nodeUnselected",this.options.onNodeUnselected),"function"==typeof this.options.onSearchComplete&&this.$element.on("searchComplete",this.options.onSearchComplete),"function"==typeof this.options.onSearchCleared&&this.$element.on("searchCleared",this.options.onSearchCleared)},g.prototype.setInitialStates=function(b,c){if(b.nodes){c+=1;var d=b,e=this;a.each(b.nodes,function(a,b){b.nodeId=e.nodes.length,b.parentId=d.nodeId,b.hasOwnProperty("selectable")||(b.selectable=!0),b.state=b.state||{},b.state.hasOwnProperty("checked")||(b.state.checked=!1),b.state.hasOwnProperty("disabled")||(b.state.disabled=!1),b.state.hasOwnProperty("expanded")||(!b.state.disabled&&c<e.options.levels&&b.nodes&&b.nodes.length>0?b.state.expanded=!0:b.state.expanded=!1),b.state.hasOwnProperty("selected")||(b.state.selected=!1),e.nodes.push(b),b.nodes&&e.setInitialStates(b,c)})}},g.prototype.clickHandler=function(b){this.options.enableLinks||b.preventDefault();var c=a(b.target),d=this.findNode(c);if(d&&!d.state.disabled){var e=c.attr("class")?c.attr("class").split(" "):[];-1!==e.indexOf("expand-icon")?(this.toggleExpandedState(d,f.options),this.render()):-1!==e.indexOf("check-icon")?(this.toggleCheckedState(d,f.options),this.render()):(d.selectable?this.toggleSelectedState(d,f.options):this.toggleExpandedState(d,f.options),this.render())}},g.prototype.findNode=function(a){var b=a.closest("li.list-group-item").attr("data-nodeid"),c=this.nodes[b];return c||console.log("Error: node does not exist"),c},g.prototype.toggleExpandedState=function(a,b){a&&this.setExpandedState(a,!a.state.expanded,b)},g.prototype.setExpandedState=function(b,c,d){c!==b.state.expanded&&(c&&b.nodes?(b.state.expanded=!0,d.silent||this.$element.trigger("nodeExpanded",a.extend(!0,{},b))):c||(b.state.expanded=!1,d.silent||this.$element.trigger("nodeCollapsed",a.extend(!0,{},b)),b.nodes&&!d.ignoreChildren&&a.each(b.nodes,a.proxy(function(a,b){this.setExpandedState(b,!1,d)},this))))},g.prototype.toggleSelectedState=function(a,b){a&&this.setSelectedState(a,!a.state.selected,b)},g.prototype.setSelectedState=function(b,c,d){c!==b.state.selected&&(c?(this.options.multiSelect||a.each(this.findNodes("true","g","state.selected"),a.proxy(function(a,b){this.setSelectedState(b,!1,d)},this)),b.state.selected=!0,d.silent||this.$element.trigger("nodeSelected",a.extend(!0,{},b))):(b.state.selected=!1,d.silent||this.$element.trigger("nodeUnselected",a.extend(!0,{},b))))},g.prototype.toggleCheckedState=function(a,b){a&&this.setCheckedState(a,!a.state.checked,b)},g.prototype.setCheckedState=function(b,c,d){c!==b.state.checked&&(c?(b.state.checked=!0,d.silent||this.$element.trigger("nodeChecked",a.extend(!0,{},b))):(b.state.checked=!1,d.silent||this.$element.trigger("nodeUnchecked",a.extend(!0,{},b))))},g.prototype.setDisabledState=function(b,c,d){c!==b.state.disabled&&(c?(b.state.disabled=!0,this.setExpandedState(b,!1,d),this.setSelectedState(b,!1,d),this.setCheckedState(b,!1,d),d.silent||this.$element.trigger("nodeDisabled",a.extend(!0,{},b))):(b.state.disabled=!1,d.silent||this.$element.trigger("nodeEnabled",a.extend(!0,{},b))))},g.prototype.render=function(){this.initialized||(this.$element.addClass(e),this.$wrapper=a(this.template.list),this.injectStyle(),this.initialized=!0),this.$element.empty().append(this.$wrapper.empty()),this.buildTree(this.tree,0)},g.prototype.buildTree=function(b,c){if(b){c+=1;var d=this;a.each(b,function(b,e){for(var f=a(d.template.item).addClass("node-"+d.elementId).addClass(e.state.checked?"node-checked":"").addClass(e.state.disabled?"node-disabled":"").addClass(e.state.selected?"node-selected":"").addClass(e.searchResult?"search-result":"").attr("data-nodeid",e.nodeId).attr("style",d.buildStyleOverride(e)),g=0;c-1>g;g++)f.append(d.template.indent);var h=[];if(e.nodes?(h.push("expand-icon"),h.push(e.state.expanded?d.options.collapseIcon:d.options.expandIcon)):h.push(d.options.emptyIcon),f.append(a(d.template.icon).addClass(h.join(" "))),d.options.showIcon){var h=["node-icon"];h.push(e.icon||d.options.nodeIcon),e.state.selected&&(h.pop(),h.push(e.selectedIcon||d.options.selectedIcon||e.icon||d.options.nodeIcon)),f.append(a(d.template.icon).addClass(h.join(" ")))}if(d.options.showCheckbox){var h=["check-icon"];h.push(e.state.checked?d.options.checkedIcon:d.options.uncheckedIcon),f.append(a(d.template.icon).addClass(h.join(" ")))}return f.append(d.options.enableLinks?a(d.template.link).attr("href",e.href).append(e.text):e.text),d.options.showTags&&e.tags&&a.each(e.tags,function(b,c){f.append(a(d.template.badge).append(c))}),d.$wrapper.append(f),e.nodes&&e.state.expanded&&!e.state.disabled?d.buildTree(e.nodes,c):void 0})}},g.prototype.buildStyleOverride=function(a){if(a.state.disabled)return"";var b=a.color,c=a.backColor;return this.options.highlightSelected&&a.state.selected&&(this.options.selectedColor&&(b=this.options.selectedColor),this.options.selectedBackColor&&(c=this.options.selectedBackColor)),this.options.highlightSearchResults&&a.searchResult&&!a.state.disabled&&(this.options.searchResultColor&&(b=this.options.searchResultColor),this.options.searchResultBackColor&&(c=this.options.searchResultBackColor)),"color:"+b+";background-color:"+c+";"},g.prototype.injectStyle=function(){this.options.injectStyle&&!c.getElementById(this.styleId)&&a('<style type="text/css" id="'+this.styleId+'"> '+this.buildStyle()+" </style>").appendTo("head")},g.prototype.buildStyle=function(){var a=".node-"+this.elementId+"{";return this.options.color&&(a+="color:"+this.options.color+";"),this.options.backColor&&(a+="background-color:"+this.options.backColor+";"),this.options.showBorder?this.options.borderColor&&(a+="border:1px solid "+this.options.borderColor+";"):a+="border:none;",a+="}",this.options.onhoverColor&&(a+=".node-"+this.elementId+":not(.node-disabled):hover{background-color:"+this.options.onhoverColor+";}"),this.css+a},g.prototype.template={list:'<ul class="list-group"></ul>',item:'<li class="list-group-item"></li>',indent:'<span class="indent"></span>',icon:'<span class="icon"></span>',link:'<a href="#" style="color:inherit;"></a>',badge:'<span class="badge"></span>'},g.prototype.css=".treeview .list-group-item{cursor:pointer}.treeview span.indent{margin-left:10px;margin-right:10px}.treeview span.icon{width:12px;margin-right:5px}.treeview .node-disabled{color:silver;cursor:not-allowed}",g.prototype.getNode=function(a){return this.nodes[a]},g.prototype.getParent=function(a){var b=this.identifyNode(a);return this.nodes[b.parentId]},g.prototype.getSiblings=function(a){var b=this.identifyNode(a),c=this.getParent(b),d=c?c.nodes:this.tree;return d.filter(function(a){return a.nodeId!==b.nodeId})},g.prototype.getSelected=function(){return this.findNodes("true","g","state.selected")},g.prototype.getUnselected=function(){return this.findNodes("false","g","state.selected")},g.prototype.getExpanded=function(){return this.findNodes("true","g","state.expanded")},g.prototype.getCollapsed=function(){return this.findNodes("false","g","state.expanded")},g.prototype.getChecked=function(){return this.findNodes("true","g","state.checked")},g.prototype.getUnchecked=function(){return this.findNodes("false","g","state.checked")},g.prototype.getDisabled=function(){return this.findNodes("true","g","state.disabled")},g.prototype.getEnabled=function(){return this.findNodes("false","g","state.disabled")},g.prototype.selectNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setSelectedState(a,!0,b)},this)),this.render()},g.prototype.unselectNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setSelectedState(a,!1,b)},this)),this.render()},g.prototype.toggleNodeSelected=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.toggleSelectedState(a,b)},this)),this.render()},g.prototype.collapseAll=function(b){var c=this.findNodes("true","g","state.expanded");this.forEachIdentifier(c,b,a.proxy(function(a,b){this.setExpandedState(a,!1,b)},this)),this.render()},g.prototype.collapseNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setExpandedState(a,!1,b)},this)),this.render()},g.prototype.expandAll=function(b){if(b=a.extend({},f.options,b),b&&b.levels)this.expandLevels(this.tree,b.levels,b);else{var c=this.findNodes("false","g","state.expanded");this.forEachIdentifier(c,b,a.proxy(function(a,b){this.setExpandedState(a,!0,b)},this))}this.render()},g.prototype.expandNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setExpandedState(a,!0,b),a.nodes&&b&&b.levels&&this.expandLevels(a.nodes,b.levels-1,b)},this)),this.render()},g.prototype.expandLevels=function(b,c,d){d=a.extend({},f.options,d),a.each(b,a.proxy(function(a,b){this.setExpandedState(b,c>0?!0:!1,d),b.nodes&&this.expandLevels(b.nodes,c-1,d)},this))},g.prototype.revealNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){for(var c=this.getParent(a);c;)this.setExpandedState(c,!0,b),c=this.getParent(c)},this)),this.render()},g.prototype.toggleNodeExpanded=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.toggleExpandedState(a,b)},this)),this.render()},g.prototype.checkAll=function(b){var c=this.findNodes("false","g","state.checked");this.forEachIdentifier(c,b,a.proxy(function(a,b){this.setCheckedState(a,!0,b)},this)),this.render()},g.prototype.checkNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setCheckedState(a,!0,b)},this)),this.render()},g.prototype.uncheckAll=function(b){var c=this.findNodes("true","g","state.checked");this.forEachIdentifier(c,b,a.proxy(function(a,b){this.setCheckedState(a,!1,b)},this)),this.render()},g.prototype.uncheckNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setCheckedState(a,!1,b)},this)),this.render()},g.prototype.toggleNodeChecked=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.toggleCheckedState(a,b)},this)),this.render()},g.prototype.disableAll=function(b){var c=this.findNodes("false","g","state.disabled");this.forEachIdentifier(c,b,a.proxy(function(a,b){this.setDisabledState(a,!0,b)},this)),this.render()},g.prototype.disableNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setDisabledState(a,!0,b)},this)),this.render()},g.prototype.enableAll=function(b){var c=this.findNodes("true","g","state.disabled");this.forEachIdentifier(c,b,a.proxy(function(a,b){this.setDisabledState(a,!1,b)},this)),this.render()},g.prototype.enableNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setDisabledState(a,!1,b)},this)),this.render()},g.prototype.toggleNodeDisabled=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setDisabledState(a,!a.state.disabled,b)},this)),this.render()},g.prototype.forEachIdentifier=function(b,c,d){c=a.extend({},f.options,c),b instanceof Array||(b=[b]),a.each(b,a.proxy(function(a,b){d(this.identifyNode(b),c)},this))},g.prototype.identifyNode=function(a){return"number"==typeof a?this.nodes[a]:a},g.prototype.search=function(b,c){c=a.extend({},f.searchOptions,c),this.clearSearch({render:!1});var d=[];if(b&&b.length>0){c.exactMatch&&(b="^"+b+"$");var e="g";c.ignoreCase&&(e+="i"),d=this.findNodes(b,e),a.each(d,function(a,b){b.searchResult=!0})}return c.revealResults?this.revealNode(d):this.render(),this.$element.trigger("searchComplete",a.extend(!0,{},d)),d},g.prototype.clearSearch=function(b){b=a.extend({},{render:!0},b);var c=a.each(this.findNodes("true","g","searchResult"),function(a,b){b.searchResult=!1});b.render&&this.render(),this.$element.trigger("searchCleared",a.extend(!0,{},c))},g.prototype.findNodes=function(b,c,d){c=c||"g",d=d||"text";var e=this;return a.grep(this.nodes,function(a){var f=e.getNodeValue(a,d);return"string"==typeof f?f.match(new RegExp(b,c)):void 0})},g.prototype.getNodeValue=function(a,b){var c=b.indexOf(".");if(c>0){var e=a[b.substring(0,c)],f=b.substring(c+1,b.length);return this.getNodeValue(e,f)}return a.hasOwnProperty(b)?a[b].toString():d};var h=function(a){b.console&&b.console.error(a)};a.fn[e]=function(b,c){var d;return this.each(function(){var f=a.data(this,e);"string"==typeof b?f?a.isFunction(f[b])&&"_"!==b.charAt(0)?(c instanceof Array||(c=[c]),d=f[b].apply(f,c)):h("No such method : "+b):h("Not initialized, can not call method : "+b):"boolean"==typeof b?d=f:a.data(this,e,new g(this,a.extend(!0,{},b)))}),d||this}}(jQuery,window,document); | !function(a,b,c,d){"use strict";var e="treeview",f={};f.settings={injectStyle:!0,levels:2,expandIcon:"glyphicon glyphicon-plus",collapseIcon:"glyphicon glyphicon-minus",emptyIcon:"glyphicon",nodeIcon:"",selectedIcon:"",checkedIcon:"glyphicon glyphicon-check",uncheckedIcon:"glyphicon glyphicon-unchecked",color:d,backColor:d,borderColor:d,onhoverColor:"#F5F5F5",selectedColor:"#FFFFFF",selectedBackColor:"#428bca",searchResultColor:"#D9534F",searchResultBackColor:d,enableLinks:!1,highlightSelected:!0,highlightSearchResults:!0,showBorder:!0,showIcon:!0,showCheckbox:!1,showTags:!1,multiSelect:!1,onNodeChecked:d,onNodeCollapsed:d,onNodeDisabled:d,onNodeEnabled:d,onNodeExpanded:d,onNodeSelected:d,onNodeUnchecked:d,onNodeUnselected:d,onSearchComplete:d,onSearchCleared:d},f.options={silent:!1,ignoreChildren:!1},f.searchOptions={ignoreCase:!0,exactMatch:!1,revealResults:!0};var g=function(b,c){return this.$element=a(b),this.elementId=b.id,this.styleId=this.elementId+"-style",this.init(c),{options:this.options,init:a.proxy(this.init,this),remove:a.proxy(this.remove,this),getNode:a.proxy(this.getNode,this),getParent:a.proxy(this.getParent,this),getSiblings:a.proxy(this.getSiblings,this),getSelected:a.proxy(this.getSelected,this),getUnselected:a.proxy(this.getUnselected,this),getExpanded:a.proxy(this.getExpanded,this),getCollapsed:a.proxy(this.getCollapsed,this),getChecked:a.proxy(this.getChecked,this),getUnchecked:a.proxy(this.getUnchecked,this),getDisabled:a.proxy(this.getDisabled,this),getEnabled:a.proxy(this.getEnabled,this),selectNode:a.proxy(this.selectNode,this),unselectNode:a.proxy(this.unselectNode,this),toggleNodeSelected:a.proxy(this.toggleNodeSelected,this),collapseAll:a.proxy(this.collapseAll,this),collapseNode:a.proxy(this.collapseNode,this),expandAll:a.proxy(this.expandAll,this),expandNode:a.proxy(this.expandNode,this),toggleNodeExpanded:a.proxy(this.toggleNodeExpanded,this),revealNode:a.proxy(this.revealNode,this),checkAll:a.proxy(this.checkAll,this),checkNode:a.proxy(this.checkNode,this),uncheckAll:a.proxy(this.uncheckAll,this),uncheckNode:a.proxy(this.uncheckNode,this),toggleNodeChecked:a.proxy(this.toggleNodeChecked,this),disableAll:a.proxy(this.disableAll,this),disableNode:a.proxy(this.disableNode,this),enableAll:a.proxy(this.enableAll,this),enableNode:a.proxy(this.enableNode,this),toggleNodeDisabled:a.proxy(this.toggleNodeDisabled,this),search:a.proxy(this.search,this),clearSearch:a.proxy(this.clearSearch,this)}};g.prototype.init=function(b){this.tree=[],this.nodes=[],b.data&&("string"==typeof b.data&&(b.data=a.parseJSON(b.data)),this.tree=a.extend(!0,[],b.data),delete b.data),this.options=a.extend({},f.settings,b),this.destroy(),this.subscribeEvents(),this.setInitialStates({nodes:this.tree},0),this.render()},g.prototype.remove=function(){this.destroy(),a.removeData(this,e),a("#"+this.styleId).remove()},g.prototype.destroy=function(){this.initialized&&(this.$wrapper.remove(),this.$wrapper=null,this.unsubscribeEvents(),this.initialized=!1)},g.prototype.unsubscribeEvents=function(){this.$element.off("click"),this.$element.off("nodeChecked"),this.$element.off("nodeCollapsed"),this.$element.off("nodeDisabled"),this.$element.off("nodeEnabled"),this.$element.off("nodeExpanded"),this.$element.off("nodeSelected"),this.$element.off("nodeUnchecked"),this.$element.off("nodeUnselected"),this.$element.off("searchComplete"),this.$element.off("searchCleared")},g.prototype.subscribeEvents=function(){this.unsubscribeEvents(),this.$element.on("click",a.proxy(this.clickHandler,this)),"function"==typeof this.options.onNodeChecked&&this.$element.on("nodeChecked",this.options.onNodeChecked),"function"==typeof this.options.onNodeCollapsed&&this.$element.on("nodeCollapsed",this.options.onNodeCollapsed),"function"==typeof this.options.onNodeDisabled&&this.$element.on("nodeDisabled",this.options.onNodeDisabled),"function"==typeof this.options.onNodeEnabled&&this.$element.on("nodeEnabled",this.options.onNodeEnabled),"function"==typeof this.options.onNodeExpanded&&this.$element.on("nodeExpanded",this.options.onNodeExpanded),"function"==typeof this.options.onNodeSelected&&this.$element.on("nodeSelected",this.options.onNodeSelected),"function"==typeof this.options.onNodeUnchecked&&this.$element.on("nodeUnchecked",this.options.onNodeUnchecked),"function"==typeof this.options.onNodeUnselected&&this.$element.on("nodeUnselected",this.options.onNodeUnselected),"function"==typeof this.options.onSearchComplete&&this.$element.on("searchComplete",this.options.onSearchComplete),"function"==typeof this.options.onSearchCleared&&this.$element.on("searchCleared",this.options.onSearchCleared)},g.prototype.setInitialStates=function(b,c){if(b.nodes){c+=1;var d=b,e=this;a.each(b.nodes,function(a,b){b.nodeId=e.nodes.length,b.parentId=d.nodeId,b.hasOwnProperty("selectable")||(b.selectable=!0),b.state=b.state||{},b.state.hasOwnProperty("checked")||(b.state.checked=!1),b.state.hasOwnProperty("disabled")||(b.state.disabled=!1),b.state.hasOwnProperty("expanded")||(!b.state.disabled&&c<e.options.levels&&b.nodes&&b.nodes.length>0?b.state.expanded=!0:b.state.expanded=!1),b.state.hasOwnProperty("selected")||(b.state.selected=!1),e.nodes.push(b),b.nodes&&e.setInitialStates(b,c)})}},g.prototype.clickHandler=function(b){this.options.enableLinks||b.preventDefault();var c=a(b.target),d=this.findNode(c);if(d&&!d.state.disabled){var e=c.attr("class")?c.attr("class").split(" "):[];-1!==e.indexOf("expand-icon")?(this.toggleExpandedState(d,f.options),this.render()):-1!==e.indexOf("check-icon")?(this.toggleCheckedState(d,f.options),this.render()):(d.selectable?this.toggleSelectedState(d,f.options):this.toggleExpandedState(d,f.options),this.render())}},g.prototype.findNode=function(a){var b=a.closest("li.list-group-item").attr("data-nodeid"),c=this.nodes[b];return c||console.log("Error: node does not exist"),c},g.prototype.toggleExpandedState=function(a,b){a&&this.setExpandedState(a,!a.state.expanded,b)},g.prototype.setExpandedState=function(b,c,d){c!==b.state.expanded&&(c&&b.nodes?(b.state.expanded=!0,d.silent||this.$element.trigger("nodeExpanded",a.extend(!0,{},b))):c||(b.state.expanded=!1,d.silent||this.$element.trigger("nodeCollapsed",a.extend(!0,{},b)),b.nodes&&!d.ignoreChildren&&a.each(b.nodes,a.proxy(function(a,b){this.setExpandedState(b,!1,d)},this))))},g.prototype.toggleSelectedState=function(a,b){a&&this.setSelectedState(a,!a.state.selected,b)},g.prototype.setSelectedState=function(b,c,d){c!==b.state.selected&&(c?(this.options.multiSelect||a.each(this.findNodes("true","g","state.selected"),a.proxy(function(a,b){this.setSelectedState(b,!1,d)},this)),b.state.selected=!0,d.silent||this.$element.trigger("nodeSelected",a.extend(!0,{},b))):(b.state.selected=!1,d.silent||this.$element.trigger("nodeUnselected",a.extend(!0,{},b))))},g.prototype.toggleCheckedState=function(a,b){a&&this.setCheckedState(a,!a.state.checked,b)},g.prototype.setCheckedState=function(b,c,d){c!==b.state.checked&&(c?(b.state.checked=!0,d.silent||this.$element.trigger("nodeChecked",a.extend(!0,{},b))):(b.state.checked=!1,d.silent||this.$element.trigger("nodeUnchecked",a.extend(!0,{},b))))},g.prototype.setDisabledState=function(b,c,d){c!==b.state.disabled&&(c?(b.state.disabled=!0,this.setExpandedState(b,!1,d),this.setSelectedState(b,!1,d),this.setCheckedState(b,!1,d),d.silent||this.$element.trigger("nodeDisabled",a.extend(!0,{},b))):(b.state.disabled=!1,d.silent||this.$element.trigger("nodeEnabled",a.extend(!0,{},b))))},g.prototype.render=function(){this.initialized||(this.$element.addClass(e),this.$wrapper=a(this.template.list),this.injectStyle(),this.initialized=!0),this.$element.empty().append(this.$wrapper.empty()),this.buildTree(this.tree,0)},g.prototype.buildTree=function(b,c){if(b){c+=1;var d=this;a.each(b,function(b,e){for(var f=a(d.template.item).addClass("node-"+d.elementId).addClass(e.state.checked?"node-checked":"").addClass(e.state.disabled?"node-disabled":"").addClass(e.state.selected?"node-selected":"").addClass(e.searchResult?"search-result":"").attr("data-nodeid",e.nodeId).attr("style",d.buildStyleOverride(e)),g=0;c-1>g;g++)f.append(d.template.indent);var h=[];if(e.nodes?(h.push("expand-icon"),h.push(e.state.expanded?d.options.collapseIcon:d.options.expandIcon)):h.push(d.options.emptyIcon),f.append(a(d.template.icon).addClass(h.join(" "))),d.options.showIcon){var h=["node-icon"];h.push(e.icon||d.options.nodeIcon),e.state.selected&&(h.pop(),h.push(e.selectedIcon||d.options.selectedIcon||e.icon||d.options.nodeIcon)),f.append(a(d.template.icon).addClass(h.join(" ")))}if(d.options.showCheckbox){var h=["check-icon"];h.push(e.state.checked?d.options.checkedIcon:d.options.uncheckedIcon),f.append(a(d.template.icon).addClass(h.join(" ")))}return f.append(d.options.enableLinks?a(d.template.link).attr("href",e.href).append(e.text):e.text),d.options.showTags&&e.tags&&a.each(e.tags,function(b,c){f.append(a(d.template.badge).append(c))}),d.$wrapper.append(f),e.nodes&&e.state.expanded&&!e.state.disabled?d.buildTree(e.nodes,c):void 0})}},g.prototype.buildStyleOverride=function(a){if(a.state.disabled)return"";var b=a.color,c=a.backColor;return this.options.highlightSelected&&a.state.selected&&(this.options.selectedColor&&(b=this.options.selectedColor),this.options.selectedBackColor&&(c=this.options.selectedBackColor)),this.options.highlightSearchResults&&a.searchResult&&!a.state.disabled&&(this.options.searchResultColor&&(b=this.options.searchResultColor),this.options.searchResultBackColor&&(c=this.options.searchResultBackColor)),"color:"+b+";background-color:"+c+";"},g.prototype.injectStyle=function(){this.options.injectStyle&&!c.getElementById(this.styleId)&&a('<style type="text/css" id="'+this.styleId+'"> '+this.buildStyle()+" </style>").appendTo("head")},g.prototype.buildStyle=function(){var a=".node-"+this.elementId+"{";return this.options.color&&(a+="color:"+this.options.color+";"),this.options.backColor&&(a+="background-color:"+this.options.backColor+";"),this.options.showBorder?this.options.borderColor&&(a+="border:1px solid "+this.options.borderColor+";"):a+="border:none;",a+="}",this.options.onhoverColor&&(a+=".node-"+this.elementId+":not(.node-disabled):hover{background-color:"+this.options.onhoverColor+";}"),this.css+a},g.prototype.template={list:'<ul class="list-group"></ul>',item:'<li class="list-group-item"></li>',indent:'<span class="indent"></span>',icon:'<span class="icon"></span>',link:'<a href="#" style="color:inherit;"></a>',badge:'<span class="badge"></span>'},g.prototype.css=".treeview .list-group-item{cursor:pointer}.treeview span.indent{margin-left:10px;margin-right:10px}.treeview span.icon{width:12px;margin-right:5px}.treeview .node-disabled{color:silver;cursor:not-allowed}",g.prototype.getNode=function(a){return this.nodes[a]},g.prototype.getParent=function(a){var b=this.identifyNode(a);return this.nodes[b.parentId]},g.prototype.getSiblings=function(a){var b=this.identifyNode(a),c=this.getParent(b),d=c?c.nodes:this.tree;return d.filter(function(a){return a.nodeId!==b.nodeId})},g.prototype.getSelected=function(){return this.findNodes("true","g","state.selected")},g.prototype.getUnselected=function(){return this.findNodes("false","g","state.selected")},g.prototype.getExpanded=function(){return this.findNodes("true","g","state.expanded")},g.prototype.getCollapsed=function(){return this.findNodes("false","g","state.expanded")},g.prototype.getChecked=function(){return this.findNodes("true","g","state.checked")},g.prototype.getUnchecked=function(){return this.findNodes("false","g","state.checked")},g.prototype.getDisabled=function(){return this.findNodes("true","g","state.disabled")},g.prototype.getEnabled=function(){return this.findNodes("false","g","state.disabled")},g.prototype.selectNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setSelectedState(a,!0,b)},this)),this.render()},g.prototype.unselectNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setSelectedState(a,!1,b)},this)),this.render()},g.prototype.toggleNodeSelected=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.toggleSelectedState(a,b)},this)),this.render()},g.prototype.collapseAll=function(b){var c=this.findNodes("true","g","state.expanded");this.forEachIdentifier(c,b,a.proxy(function(a,b){this.setExpandedState(a,!1,b)},this)),this.render()},g.prototype.collapseNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setExpandedState(a,!1,b)},this)),this.render()},g.prototype.expandAll=function(b){if(b=a.extend({},f.options,b),b&&b.levels)this.expandLevels(this.tree,b.levels,b);else{var c=this.findNodes("false","g","state.expanded");this.forEachIdentifier(c,b,a.proxy(function(a,b){this.setExpandedState(a,!0,b)},this))}this.render()},g.prototype.expandNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setExpandedState(a,!0,b),a.nodes&&b&&b.levels&&this.expandLevels(a.nodes,b.levels-1,b)},this)),this.render()},g.prototype.expandLevels=function(b,c,d){d=a.extend({},f.options,d),a.each(b,a.proxy(function(a,b){this.setExpandedState(b,c>0?!0:!1,d),b.nodes&&this.expandLevels(b.nodes,c-1,d)},this))},g.prototype.revealNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){for(var c=this.getParent(a);c;)this.setExpandedState(c,!0,b),c=this.getParent(c)},this)),this.render()},g.prototype.toggleNodeExpanded=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.toggleExpandedState(a,b)},this)),this.render()},g.prototype.checkAll=function(b){var c=this.findNodes("false","g","state.checked");this.forEachIdentifier(c,b,a.proxy(function(a,b){this.setCheckedState(a,!0,b)},this)),this.render()},g.prototype.checkNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setCheckedState(a,!0,b)},this)),this.render()},g.prototype.uncheckAll=function(b){var c=this.findNodes("true","g","state.checked");this.forEachIdentifier(c,b,a.proxy(function(a,b){this.setCheckedState(a,!1,b)},this)),this.render()},g.prototype.uncheckNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setCheckedState(a,!1,b)},this)),this.render()},g.prototype.toggleNodeChecked=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.toggleCheckedState(a,b)},this)),this.render()},g.prototype.disableAll=function(b){var c=this.findNodes("false","g","state.disabled");this.forEachIdentifier(c,b,a.proxy(function(a,b){this.setDisabledState(a,!0,b)},this)),this.render()},g.prototype.disableNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setDisabledState(a,!0,b)},this)),this.render()},g.prototype.enableAll=function(b){var c=this.findNodes("true","g","state.disabled");this.forEachIdentifier(c,b,a.proxy(function(a,b){this.setDisabledState(a,!1,b)},this)),this.render()},g.prototype.enableNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setDisabledState(a,!1,b)},this)),this.render()},g.prototype.toggleNodeDisabled=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setDisabledState(a,!a.state.disabled,b)},this)),this.render()},g.prototype.forEachIdentifier=function(b,c,d){c=a.extend({},f.options,c),b instanceof Array||(b=[b]),a.each(b,a.proxy(function(a,b){d(this.identifyNode(b),c)},this))},g.prototype.identifyNode=function(a){return"number"==typeof a?this.nodes[a]:a},g.prototype.search=function(b,c){c=a.extend({},f.searchOptions,c),this.clearSearch({render:!1});var d=[];if(b&&b.length>0){c.exactMatch&&(b="^"+b+"$");var e="g";c.ignoreCase&&(e+="i"),d=this.findNodes(b,e),a.each(d,function(a,b){b.searchResult=!0})}return c.revealResults?this.revealNode(d):this.render(),this.$element.trigger("searchComplete",a.extend(!0,{},d)),d},g.prototype.clearSearch=function(b){b=a.extend({},{render:!0},b);var c=a.each(this.findNodes("true","g","searchResult"),function(a,b){b.searchResult=!1});b.render&&this.render(),this.$element.trigger("searchCleared",a.extend(!0,{},c))},g.prototype.findNodes=function(b,c,d){c=c||"g",d=d||"text";var e=this;return a.grep(this.nodes,function(a){var f=e.getNodeValue(a,d);return"string"==typeof f?f.match(new RegExp(b,c)):void 0})},g.prototype.getNodeValue=function(a,b){var c=b.indexOf(".");if(c>0){var e=a[b.substring(0,c)],f=b.substring(c+1,b.length);return this.getNodeValue(e,f)}return a.hasOwnProperty(b)?a[b].toString():d};var h=function(a){b.console&&b.console.error(a)};a.fn[e]=function(b,c){var d;return this.each(function(){var f=a.data(this,e);"string"==typeof b?f?a.isFunction(f[b])&&"_"!==b.charAt(0)?(c instanceof Array||(c=[c]),d=f[b].apply(f,c)):h("No such method : "+b):h("Not initialized, can not call method : "+b):"boolean"==typeof b?d=f:a.data(this,e,new g(this,a.extend(!0,{},b)))}),d||this}}(jQuery,window,document); | -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-portal/src/main/resources/static/ctrip_sso_heartbeat.html | <!--
~ Copyright 2021 Apollo Authors
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>SSO Heartbeat</title>
<script type="text/javascript">
var reloading = false;
setInterval(function () {
if (document.cookie.indexOf('memCacheAssertionID=') == -1) {
if (reloading) {
return;
}
reloading = true;
console.log("sso memCacheAssertionID expires, try reloading");
location.reload(true);
}
}, 1000);
</script>
</head>
<body>
</body>
</html>
| <!--
~ Copyright 2021 Apollo Authors
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>SSO Heartbeat</title>
<script type="text/javascript">
var reloading = false;
setInterval(function () {
if (document.cookie.indexOf('memCacheAssertionID=') == -1) {
if (reloading) {
return;
}
reloading = true;
console.log("sso memCacheAssertionID expires, try reloading");
location.reload(true);
}
}, 1000);
</script>
</head>
<body>
</body>
</html>
| -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-portal/src/main/resources/static/scripts/controller/open/OpenManageController.js | /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
open_manage_module.controller('OpenManageController',
['$scope', '$translate', 'toastr', 'AppUtil', 'OrganizationService', 'ConsumerService', 'PermissionService', 'EnvService',
OpenManageController]);
function OpenManageController($scope, $translate, toastr, AppUtil, OrganizationService, ConsumerService, PermissionService, EnvService) {
var $orgWidget = $('#organization');
$scope.consumer = {};
$scope.consumerRole = {
type: 'NamespaceRole'
};
$scope.submitBtnDisabled = false;
$scope.userSelectWidgetId = 'toAssignMasterRoleUser';
$scope.getTokenByAppId = getTokenByAppId;
$scope.createConsumer = createConsumer;
$scope.assignRoleToConsumer = assignRoleToConsumer;
function init() {
initOrganization();
initPermission();
initEnv();
}
function initOrganization() {
OrganizationService.find_organizations().then(function (result) {
var organizations = [];
result.forEach(function (item) {
var org = {};
org.id = item.orgId;
org.text = item.orgName + '(' + item.orgId + ')';
org.name = item.orgName;
organizations.push(org);
});
$orgWidget.select2({
placeholder: $translate.instant('Common.PleaseChooseDepartment'),
width: '100%',
data: organizations
});
}, function (result) {
toastr.error(AppUtil.errorMsg(result), "load organizations error");
});
}
function initPermission() {
PermissionService.has_root_permission()
.then(function (result) {
$scope.isRootUser = result.hasPermission;
});
}
function initEnv() {
EnvService.find_all_envs()
.then(function (result) {
$scope.envs = new Array();
for (var iLoop = 0; iLoop < result.length; iLoop++) {
$scope.envs.push({ checked: false, env: result[iLoop] });
$scope.envsChecked = new Array();
}
$scope.switchSelect = function (item) {
item.checked = !item.checked;
$scope.envsChecked = new Array();
for (var iLoop = 0; iLoop < $scope.envs.length; iLoop++) {
var env = $scope.envs[iLoop];
if (env.checked) {
$scope.envsChecked.push(env.env);
}
}
};
});
}
function getTokenByAppId() {
if (!$scope.consumer.appId) {
toastr.warning($translate.instant('Open.Manage.PleaseEnterAppId'));
return;
}
ConsumerService.getConsumerTokenByAppId($scope.consumer.appId)
.then(function (consumerToken) {
if (consumerToken.token) {
$scope.consumerToken = consumerToken;
$scope.consumerRole.token = consumerToken.token;
} else {
$scope.consumerToken = {
token: $translate.instant('Open.Manage.AppNotCreated', { appId: $scope.consumer.appId })
};
}
});
}
function createConsumer() {
$scope.submitBtnDisabled = true;
if (!$scope.consumer.appId) {
toastr.warning($translate.instant('Open.Manage.PleaseEnterAppId'));
return;
}
var selectedOrg = $orgWidget.select2('data')[0];
if (!selectedOrg.id) {
toastr.warning($translate.instant('Common.PleaseChooseDepartment'));
return;
}
$scope.consumer.orgId = selectedOrg.id;
$scope.consumer.orgName = selectedOrg.name;
// owner
var owner = $('.ownerSelector').select2('data')[0];
if (!owner) {
toastr.warning($translate.instant('Common.PleaseChooseOwner'));
return;
}
$scope.consumer.ownerName = owner.id;
ConsumerService.createConsumer($scope.consumer)
.then(function (consumerToken) {
toastr.success($translate.instant('Common.Created'));
$scope.consumerToken = consumerToken;
$scope.consumerRole.token = consumerToken.token;
$scope.submitBtnDisabled = false;
$scope.consumer = {};
}, function (response) {
AppUtil.showErrorMsg(response, $translate.instant('Common.CreateFailed'));
$scope.submitBtnDisabled = false;
})
}
function assignRoleToConsumer() {
ConsumerService.assignRoleToConsumer($scope.consumerRole.token,
$scope.consumerRole.type,
$scope.consumerRole.appId,
$scope.consumerRole.namespaceName,
$scope.envsChecked)
.then(function (consumerRoles) {
toastr.success($translate.instant('Open.Manage.GrantSuccessfully'));
}, function (response) {
AppUtil.showErrorMsg(response, $translate.instant('Open.Manage.GrantFailed'));
})
}
init();
}
| /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
open_manage_module.controller('OpenManageController',
['$scope', '$translate', 'toastr', 'AppUtil', 'OrganizationService', 'ConsumerService', 'PermissionService', 'EnvService',
OpenManageController]);
function OpenManageController($scope, $translate, toastr, AppUtil, OrganizationService, ConsumerService, PermissionService, EnvService) {
var $orgWidget = $('#organization');
$scope.consumer = {};
$scope.consumerRole = {
type: 'NamespaceRole'
};
$scope.submitBtnDisabled = false;
$scope.userSelectWidgetId = 'toAssignMasterRoleUser';
$scope.getTokenByAppId = getTokenByAppId;
$scope.createConsumer = createConsumer;
$scope.assignRoleToConsumer = assignRoleToConsumer;
function init() {
initOrganization();
initPermission();
initEnv();
}
function initOrganization() {
OrganizationService.find_organizations().then(function (result) {
var organizations = [];
result.forEach(function (item) {
var org = {};
org.id = item.orgId;
org.text = item.orgName + '(' + item.orgId + ')';
org.name = item.orgName;
organizations.push(org);
});
$orgWidget.select2({
placeholder: $translate.instant('Common.PleaseChooseDepartment'),
width: '100%',
data: organizations
});
}, function (result) {
toastr.error(AppUtil.errorMsg(result), "load organizations error");
});
}
function initPermission() {
PermissionService.has_root_permission()
.then(function (result) {
$scope.isRootUser = result.hasPermission;
});
}
function initEnv() {
EnvService.find_all_envs()
.then(function (result) {
$scope.envs = new Array();
for (var iLoop = 0; iLoop < result.length; iLoop++) {
$scope.envs.push({ checked: false, env: result[iLoop] });
$scope.envsChecked = new Array();
}
$scope.switchSelect = function (item) {
item.checked = !item.checked;
$scope.envsChecked = new Array();
for (var iLoop = 0; iLoop < $scope.envs.length; iLoop++) {
var env = $scope.envs[iLoop];
if (env.checked) {
$scope.envsChecked.push(env.env);
}
}
};
});
}
function getTokenByAppId() {
if (!$scope.consumer.appId) {
toastr.warning($translate.instant('Open.Manage.PleaseEnterAppId'));
return;
}
ConsumerService.getConsumerTokenByAppId($scope.consumer.appId)
.then(function (consumerToken) {
if (consumerToken.token) {
$scope.consumerToken = consumerToken;
$scope.consumerRole.token = consumerToken.token;
} else {
$scope.consumerToken = {
token: $translate.instant('Open.Manage.AppNotCreated', { appId: $scope.consumer.appId })
};
}
});
}
function createConsumer() {
$scope.submitBtnDisabled = true;
if (!$scope.consumer.appId) {
toastr.warning($translate.instant('Open.Manage.PleaseEnterAppId'));
return;
}
var selectedOrg = $orgWidget.select2('data')[0];
if (!selectedOrg.id) {
toastr.warning($translate.instant('Common.PleaseChooseDepartment'));
return;
}
$scope.consumer.orgId = selectedOrg.id;
$scope.consumer.orgName = selectedOrg.name;
// owner
var owner = $('.ownerSelector').select2('data')[0];
if (!owner) {
toastr.warning($translate.instant('Common.PleaseChooseOwner'));
return;
}
$scope.consumer.ownerName = owner.id;
ConsumerService.createConsumer($scope.consumer)
.then(function (consumerToken) {
toastr.success($translate.instant('Common.Created'));
$scope.consumerToken = consumerToken;
$scope.consumerRole.token = consumerToken.token;
$scope.submitBtnDisabled = false;
$scope.consumer = {};
}, function (response) {
AppUtil.showErrorMsg(response, $translate.instant('Common.CreateFailed'));
$scope.submitBtnDisabled = false;
})
}
function assignRoleToConsumer() {
ConsumerService.assignRoleToConsumer($scope.consumerRole.token,
$scope.consumerRole.type,
$scope.consumerRole.appId,
$scope.consumerRole.namespaceName,
$scope.envsChecked)
.then(function (consumerRoles) {
toastr.success($translate.instant('Open.Manage.GrantSuccessfully'));
}, function (response) {
AppUtil.showErrorMsg(response, $translate.instant('Open.Manage.GrantFailed'));
})
}
init();
}
| -1 |
apolloconfig/apollo | 3,856 | feat: add history details for not key-value type of namespace | ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| wilsonwu | 2021-07-27T14:32:04Z | 2021-07-27T14:37:49Z | 8d227ff5152369e61a83d43f0ceae3435881fafb | a44e2515bf35097cff023a4e41ec3fb2fa1c2b21 | feat: add history details for not key-value type of namespace. ## What's the purpose of this PR
Add history details for not key-value type of namespace
## Which issue(s) this PR fixes:
Fixes #3715
## Brief changelog
After change:

With tooltip:

Show details by click:

Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
| ./apollo-portal/src/main/resources/static/img/comment.png | PNG
IHDR X IDATx^QRQ_Tc
+0xw݀
x!U_͍jqfݒW|ZRkԀ B
ِ ,&@ G <<H1@:<qT%hJf:4GUBDh#@qT%hJf:4GUBDh#@qT%hJf:4GUBDh#ЫA.g2
+j$gM3//I
riUh
f_Mq?U8E->Ywm[xc|6nnh'FjKk` W5\}G3p*KQ8]vb$AolH &ٙXw4 G#T
L[%A*L@t+ }scw|$@wi6lj)Z#LDϴS-AD=1- $p<nGPe]+ar!2ȹ5y ȍ ObUZ\[%! Nے 6/Υ?uA.nos#4κuǒi -fM`xuG&/cD@sNIA֒
/N]A֟
/N]A֟
/N]A֟
/N]A֟
/N]A֟
/N]A֟
/N]A֟
/N]A֟
/N]A֟
/N]A֟
/N]A֟
/N]A֟
/N]A֟
/N]A֟
/N]A֟
/N]A֟
/N]A֟@5iG+
[Nx=h[6
^$%=S 8fokv৮cDZĀ/ mOYwe;79BƱzCPAͺu.1W ]XCPA> ~rNy?]bc3?|}p]EQY^0\5L< |