Commit ff0364c1 authored by lepdou's avatar lepdou

重构portal api

parent babb3c6a
...@@ -77,6 +77,9 @@ public class AdminConfigServiceImpl implements AdminConfigService { ...@@ -77,6 +77,9 @@ public class AdminConfigServiceImpl implements AdminConfigService {
return null; return null;
} }
Version version = versionRepository.findById(versionId); Version version = versionRepository.findById(versionId);
if (version == null){
return null;
}
return version.toDTO(); return version.toDTO();
} }
......
...@@ -15,12 +15,12 @@ INSERT INTO RELEASESNAPSHOT (ClusterName, IsDeleted, ReleaseId, Configurations) ...@@ -15,12 +15,12 @@ INSERT INTO RELEASESNAPSHOT (ClusterName, IsDeleted, ReleaseId, Configurations)
INSERT INTO RELEASESNAPSHOT (ClusterName, IsDeleted, ReleaseId, Configurations) VALUES ('cluster2', 0, 11111, '{"6666.bar":"bar2222"}'); INSERT INTO RELEASESNAPSHOT (ClusterName, IsDeleted, ReleaseId, Configurations) VALUES ('cluster2', 0, 11111, '{"6666.bar":"bar2222"}');
INSERT INTO RELEASESNAPSHOT (ClusterName, IsDeleted, ReleaseId, Configurations) VALUES ('default', 0, 11112, '{"6666.foo":"verson2.0", "6666.bar":"verson2.0","3333.foo":"1008","4444.bar":"99901"}'); INSERT INTO RELEASESNAPSHOT (ClusterName, IsDeleted, ReleaseId, Configurations) VALUES ('default', 0, 11112, '{"6666.foo":"verson2.0", "6666.bar":"verson2.0","3333.foo":"1008","4444.bar":"99901"}');
INSERT INTO ConfigItem(ClusterId, ClusterName, AppId, Key, Value, comment, DataChange_CreatedBy, DataChange_CreatedTime, DataChange_LastModifiedBy, DataChange_LastModifiedTime, IsDeleted) VALUES (100, 'default', 6666, '6666.k1', '6666.v1', 'comment1', 'lepdou', '2016-03-23 12:00:00', '王五', NOW(), 0); INSERT INTO ConfigItem(ClusterId, ClusterName, AppId, Key, Value, comment, DataChange_CreatedBy, DataChange_CreatedTime, DataChange_LastModifiedBy, DataChange_LastTime, IsDeleted) VALUES (100, 'default', 6666, '6666.k1', '6666.v1', 'comment1', 'lepdou', '2016-03-23 12:00:00', '王五', NOW(), 0);
INSERT INTO ConfigItem(ClusterId, ClusterName, AppId, Key, Value, comment, DataChange_CreatedBy, DataChange_CreatedTime, DataChange_LastModifiedBy, DataChange_LastModifiedTime, IsDeleted) VALUES (100, 'default', 6666, '6666.k2', '6666.v2', 'xxxx', 'lepdou', '2016-03-23 12:00:00', '王五1', NOW(),0); INSERT INTO ConfigItem(ClusterId, ClusterName, AppId, Key, Value, comment, DataChange_CreatedBy, DataChange_CreatedTime, DataChange_LastModifiedBy, DataChange_LastTime, IsDeleted) VALUES (100, 'default', 6666, '6666.k2', '6666.v2', 'xxxx', 'lepdou', '2016-03-23 12:00:00', '王五1', NOW(),0);
INSERT INTO ConfigItem(ClusterId, ClusterName, AppId, Key, Value, comment, DataChange_CreatedBy, DataChange_CreatedTime, DataChange_LastModifiedBy, DataChange_LastModifiedTime, IsDeleted) VALUES (100, 'default', 6666, '6666.k3', '6666.v3', 'yyyy', 'lepdou', '2016-03-23 12:00:00', '王五2', NOW(),0); INSERT INTO ConfigItem(ClusterId, ClusterName, AppId, Key, Value, comment, DataChange_CreatedBy, DataChange_CreatedTime, DataChange_LastModifiedBy, DataChange_LastTime, IsDeleted) VALUES (100, 'default', 6666, '6666.k3', '6666.v3', 'yyyy', 'lepdou', '2016-03-23 12:00:00', '王五2', NOW(),0);
INSERT INTO ConfigItem(ClusterId, ClusterName, AppId, Key, Value, comment, DataChange_CreatedBy, DataChange_CreatedTime, DataChange_LastModifiedBy, DataChange_LastModifiedTime, IsDeleted) VALUES (100, 'default', 5555, '5555.k1', '5555.v11', 'zzzz', 'lepdou', '2016-03-23 12:00:00', '王五3', NOW(),0); INSERT INTO ConfigItem(ClusterId, ClusterName, AppId, Key, Value, comment, DataChange_CreatedBy, DataChange_CreatedTime, DataChange_LastModifiedBy, DataChange_LastTime, IsDeleted) VALUES (100, 'default', 5555, '5555.k1', '5555.v11', 'zzzz', 'lepdou', '2016-03-23 12:00:00', '王五3', NOW(),0);
INSERT INTO ConfigItem(ClusterId, ClusterName, AppId, Key, Value, comment, DataChange_CreatedBy, DataChange_CreatedTime, DataChange_LastModifiedBy, DataChange_LastModifiedTime, IsDeleted) VALUES (101, 'cluster1', 6666, '6666.k1', '6666.v122', 'qqqqq', 'lepdou', '2016-03-23 12:00:00', '王五4', NOW(),0); INSERT INTO ConfigItem(ClusterId, ClusterName, AppId, Key, Value, comment, DataChange_CreatedBy, DataChange_CreatedTime, DataChange_LastModifiedBy, DataChange_LastTime, IsDeleted) VALUES (101, 'cluster1', 6666, '6666.k1', '6666.v122', 'qqqqq', 'lepdou', '2016-03-23 12:00:00', '王五4', NOW(),0);
package com.ctrip.apollo.portal;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestTemplate;
public class RestUtils {
private static RestTemplate restTemplate = new RestTemplate();
public static <T> T exchangeInGET(String url, Class<T> responseType) {
ResponseEntity<T> response =
restTemplate.exchange(url, HttpMethod.GET, new HttpEntity<Void>((Void) null), responseType);
return response.getBody();
}
}
package com.ctrip.apollo.portal.api;
import com.ctrip.apollo.Apollo;
import com.ctrip.apollo.portal.service.ServiceLocator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.client.RestTemplate;
public class API {
@Autowired
protected ServiceLocator serviceLocator;
protected RestTemplate restTemplate = new RestTemplate();
public String getAdminServiceHost(Apollo.Env env){
//本地测试用
// return "http://localhost:8090";
return serviceLocator.getAdminService(env);
}
}
package com.ctrip.apollo.portal.api;
import com.ctrip.apollo.Apollo;
import com.ctrip.apollo.core.dto.ClusterDTO;
import com.ctrip.apollo.core.dto.ConfigItemDTO;
import com.ctrip.apollo.core.dto.ReleaseSnapshotDTO;
import com.ctrip.apollo.core.dto.VersionDTO;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class AdminServiceAPI {
@Service
public static class ConfigAPI extends API {
public static String CONFIG_RELEASE_API = "/configs/release/";
public ReleaseSnapshotDTO[] getConfigByReleaseId(Apollo.Env env, long releaseId) {
if (releaseId <= 0) {
return null;
}
return restTemplate.getForObject(getAdminServiceHost(env) + CONFIG_RELEASE_API + releaseId,
ReleaseSnapshotDTO[].class);
}
public ConfigItemDTO[] getLatestConfigItemsByClusters(Apollo.Env env, List<Long> clusterIds) {
if (clusterIds == null || clusterIds.size() == 0) {
return null;
}
StringBuilder sb = new StringBuilder();
for (long clusterId : clusterIds) {
sb.append(clusterId).append(",");
}
return restTemplate.getForObject(getAdminServiceHost(env) + "/configs/latest?clusterIds=" + sb
.substring(0, sb.length() - 1), ConfigItemDTO[].class);
}
}
@Service
public static class ClusterAPI extends API {
public static String CLUSTER_APP_API = "/cluster/app/";
public ClusterDTO[] getClustersByApp(Apollo.Env env, long appId) {
if (appId <= 0) {
return null;
}
return restTemplate
.getForObject(getAdminServiceHost(env) + CLUSTER_APP_API + appId, ClusterDTO[].class);
}
}
@Service
public static class VersionAPI extends API{
public static String VERSION_API = "/version/";
public static String VERSION_APP_API = "/version/app/";
public VersionDTO getVersionById(Apollo.Env env, long versionId){
if (versionId <= 0){
return null;
}
return restTemplate.getForObject(getAdminServiceHost(env) + VERSION_API + versionId, VersionDTO.class);
}
public VersionDTO[] getVersionsByApp(Apollo.Env env, long appId){
if (appId <= 0){
return null;
}
return restTemplate.getForObject(getAdminServiceHost(env) + VERSION_APP_API + appId,
VersionDTO[].class);
}
}
}
package com.ctrip.apollo.portal.service; package com.ctrip.apollo.portal.service;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -16,33 +19,38 @@ import com.ctrip.apollo.core.dto.ClusterDTO; ...@@ -16,33 +19,38 @@ import com.ctrip.apollo.core.dto.ClusterDTO;
import com.ctrip.apollo.core.dto.ConfigItemDTO; import com.ctrip.apollo.core.dto.ConfigItemDTO;
import com.ctrip.apollo.core.dto.ReleaseSnapshotDTO; import com.ctrip.apollo.core.dto.ReleaseSnapshotDTO;
import com.ctrip.apollo.core.dto.VersionDTO; import com.ctrip.apollo.core.dto.VersionDTO;
import com.ctrip.apollo.core.serivce.ApolloService; import com.ctrip.apollo.portal.api.AdminServiceAPI;
import com.ctrip.apollo.portal.RestUtils;
import com.ctrip.apollo.portal.constants.PortalConstants; import com.ctrip.apollo.portal.constants.PortalConstants;
import com.ctrip.apollo.portal.entity.AppConfigVO; import com.ctrip.apollo.portal.entity.AppConfigVO;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
@Service @Service
public class ConfigService { public class ConfigService {
private Logger logger = LoggerFactory.getLogger(ConfigService.class);
@Autowired
private AdminServiceAPI.ConfigAPI configAPI;
@Autowired
private AdminServiceAPI.ClusterAPI clusterAPI;
@Autowired @Autowired
private ServiceLocator serviceLocator; private AdminServiceAPI.VersionAPI versionAPI;
private ObjectMapper objectMapper = new ObjectMapper(); private ObjectMapper objectMapper = new ObjectMapper();
public AppConfigVO loadReleaseConfig(Env env, long appId, long versionId) { public AppConfigVO loadReleaseConfig(Env env, long appId, long versionId) {
if (appId <= 0 || versionId <= 0) { if (appId <= 0 || versionId <= 0) {
return null; return null;
} }
long releaseId = getReleaseIdFromVersionId(env, versionId); long releaseId = getReleaseIdFromVersionId(env, versionId);
if (releaseId == -1) {
return null;
}
String serviceHost = serviceLocator.getAdminService(env); ReleaseSnapshotDTO[] releaseSnapShots = configAPI.getConfigByReleaseId(Env.DEV, releaseId);
ReleaseSnapshotDTO[] releaseSnapShots = RestUtils
.exchangeInGET(serviceHost + "/configs/release/" + releaseId, ReleaseSnapshotDTO[].class);
if (releaseSnapShots == null || releaseSnapShots.length == 0) { if (releaseSnapShots == null || releaseSnapShots.length == 0) {
return null; return null;
} }
...@@ -63,9 +71,7 @@ public class ConfigService { ...@@ -63,9 +71,7 @@ public class ConfigService {
} }
private long getReleaseIdFromVersionId(Env env, long versionId) { private long getReleaseIdFromVersionId(Env env, long versionId) {
String serviceHost = serviceLocator.getAdminService(env); VersionDTO version = versionAPI.getVersionById(env, versionId);
VersionDTO version =
RestUtils.exchangeInGET(serviceHost + "/version/" + versionId, VersionDTO.class);
if (version == null) { if (version == null) {
return -1; return -1;
} }
...@@ -73,7 +79,7 @@ public class ConfigService { ...@@ -73,7 +79,7 @@ public class ConfigService {
} }
private void collectDefaultClusterConfigs(long appId, ReleaseSnapshotDTO snapShot, private void collectDefaultClusterConfigs(long appId, ReleaseSnapshotDTO snapShot,
AppConfigVO appConfigVO) { AppConfigVO appConfigVO) {
Map<Long, List<ConfigItemDTO>> groupedConfigs = groupConfigsByApp(snapShot.getConfigurations()); Map<Long, List<ConfigItemDTO>> groupedConfigs = groupConfigsByApp(snapShot.getConfigurations());
...@@ -136,7 +142,7 @@ public class ConfigService { ...@@ -136,7 +142,7 @@ public class ConfigService {
} }
private void collectSpecialClusterConfigs(long appId, ReleaseSnapshotDTO snapShot, private void collectSpecialClusterConfigs(long appId, ReleaseSnapshotDTO snapShot,
AppConfigVO appConfigVO) { AppConfigVO appConfigVO) {
List<AppConfigVO.OverrideClusterConfig> overrideClusterConfigs = List<AppConfigVO.OverrideClusterConfig> overrideClusterConfigs =
appConfigVO.getOverrideClusterConfigs(); appConfigVO.getOverrideClusterConfigs();
AppConfigVO.OverrideClusterConfig overrideClusterConfig = AppConfigVO.OverrideClusterConfig overrideClusterConfig =
...@@ -152,21 +158,17 @@ public class ConfigService { ...@@ -152,21 +158,17 @@ public class ConfigService {
return null; return null;
} }
String serviceHost = serviceLocator.getAdminService(env); ClusterDTO[] clusters = clusterAPI.getClustersByApp(env, appId);
ClusterDTO[] clusters =
RestUtils.exchangeInGET(serviceHost + "/cluster/app/" + appId, ClusterDTO[].class);
if (clusters == null || clusters.length == 0) { if (clusters == null || clusters.length == 0) {
return null; return null;
} }
StringBuilder sb = new StringBuilder(); List<Long> clusterIds = new ArrayList<>(clusters.length);
for (ClusterDTO cluster : clusters) { for (ClusterDTO cluster : clusters) {
sb.append(cluster.getId()).append(","); clusterIds.add(cluster.getId());
} }
ConfigItemDTO[] configItems = RestUtils.exchangeInGET( ConfigItemDTO[] configItems = configAPI.getLatestConfigItemsByClusters(env, clusterIds);
serviceHost + "/configs/latest?clusterIds=" + sb.substring(0, sb.length() - 1),
ConfigItemDTO[].class);
return buildAPPConfigVO(appId, Arrays.asList(configItems)); return buildAPPConfigVO(appId, Arrays.asList(configItems));
} }
...@@ -203,7 +205,7 @@ public class ConfigService { ...@@ -203,7 +205,7 @@ public class ConfigService {
} }
private void groupConfigByAppAndEnrichDTO(Map<String, List<ConfigItemDTO>> groupedClusterConfigs, private void groupConfigByAppAndEnrichDTO(Map<String, List<ConfigItemDTO>> groupedClusterConfigs,
AppConfigVO appConfigVO) { AppConfigVO appConfigVO) {
long appId = appConfigVO.getAppId(); long appId = appConfigVO.getAppId();
List<ConfigItemDTO> defaultClusterConfigs = appConfigVO.getDefaultClusterConfigs(); List<ConfigItemDTO> defaultClusterConfigs = appConfigVO.getDefaultClusterConfigs();
...@@ -222,7 +224,7 @@ public class ConfigService { ...@@ -222,7 +224,7 @@ public class ConfigService {
if (Constants.DEFAULT_CLUSTER_NAME.equals(clusterName)) { if (Constants.DEFAULT_CLUSTER_NAME.equals(clusterName)) {
// default cluster configs // default cluster configs
collectDefaultClusterConfigs(appId, clusterConfigs, defaultClusterConfigs, collectDefaultClusterConfigs(appId, clusterConfigs, defaultClusterConfigs,
overrideAppConfigs); overrideAppConfigs);
} else { } else {
// override cluster configs // override cluster configs
collectSpecialClusterConfigs(clusterName, clusterConfigs, overrideClusterConfigs); collectSpecialClusterConfigs(clusterName, clusterConfigs, overrideClusterConfigs);
...@@ -231,8 +233,8 @@ public class ConfigService { ...@@ -231,8 +233,8 @@ public class ConfigService {
} }
private void collectDefaultClusterConfigs(long appId, List<ConfigItemDTO> clusterConfigs, private void collectDefaultClusterConfigs(long appId, List<ConfigItemDTO> clusterConfigs,
List<ConfigItemDTO> defaultClusterConfigs, List<ConfigItemDTO> defaultClusterConfigs,
List<AppConfigVO.OverrideAppConfig> overrideAppConfigs) { List<AppConfigVO.OverrideAppConfig> overrideAppConfigs) {
Map<Long, AppConfigVO.OverrideAppConfig> appIdMapOverrideAppConfig = null; Map<Long, AppConfigVO.OverrideAppConfig> appIdMapOverrideAppConfig = null;
...@@ -261,7 +263,7 @@ public class ConfigService { ...@@ -261,7 +263,7 @@ public class ConfigService {
} }
private void collectSpecialClusterConfigs(String clusterName, List<ConfigItemDTO> clusterConfigs, private void collectSpecialClusterConfigs(String clusterName, List<ConfigItemDTO> clusterConfigs,
List<AppConfigVO.OverrideClusterConfig> overrideClusterConfigs) { List<AppConfigVO.OverrideClusterConfig> overrideClusterConfigs) {
AppConfigVO.OverrideClusterConfig overrideClusterConfig = AppConfigVO.OverrideClusterConfig overrideClusterConfig =
new AppConfigVO.OverrideClusterConfig(); new AppConfigVO.OverrideClusterConfig();
overrideClusterConfig.setClusterName(clusterName); overrideClusterConfig.setClusterName(clusterName);
......
...@@ -30,8 +30,6 @@ public class ServiceLocator { ...@@ -30,8 +30,6 @@ public class ServiceLocator {
} }
public String getAdminService(Env env) { public String getAdminService(Env env) {
//本地测试用
// return "http://localhost:8090";
List<ApolloService> services = getAdminServices(env); List<ApolloService> services = getAdminServices(env);
if (services.size() == 0) { if (services.size() == 0) {
throw new RuntimeException("No available admin service"); throw new RuntimeException("No available admin service");
......
...@@ -2,22 +2,28 @@ package com.ctrip.apollo.portal.service; ...@@ -2,22 +2,28 @@ package com.ctrip.apollo.portal.service;
import com.ctrip.apollo.Apollo; import com.ctrip.apollo.Apollo;
import com.ctrip.apollo.core.dto.VersionDTO; import com.ctrip.apollo.core.dto.VersionDTO;
import com.ctrip.apollo.portal.RestUtils; import com.ctrip.apollo.portal.api.AdminServiceAPI;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.Collections;
import java.util.List; import java.util.List;
@Service @Service
public class VersionService { public class VersionService {
@Autowired @Autowired
private ServiceLocator serviceLocator; private AdminServiceAPI.VersionAPI versionAPI;
public List<VersionDTO> findVersionsByApp(Apollo.Env env, long appId) { public List<VersionDTO> findVersionsByApp(Apollo.Env env, long appId) {
return RestUtils VersionDTO[] versions = versionAPI.getVersionsByApp(env, appId);
.exchangeInGET(serviceLocator.getAdminService(env) + "/version/app/" + appId, List.class);
if (versions == null || versions.length == 0){
return Collections.EMPTY_LIST;
}
return Arrays.asList(versions);
} }
} }
...@@ -13,7 +13,7 @@ spring: ...@@ -13,7 +13,7 @@ spring:
logging: logging:
level: level:
org.springframework.cloud: 'DEBUG' org.springframework.cloud: 'DEBUG'
file: /opt/logs/${ctrip.appid}/apollo-adminservice.log file: /opt/logs/${ctrip.appid}/apollo-portal.log
ctrip: ctrip:
appid: 100003173 appid: 100003173
...@@ -7,6 +7,10 @@ body { ...@@ -7,6 +7,10 @@ body {
padding-bottom: 50px; padding-bottom: 50px;
} }
a{
cursor: pointer;
}
.container { .container {
width: 100%; width: 100%;
min-height: 550px; min-height: 550px;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!--环境nav--> <!--环境nav-->
<ul class="nav nav-pills nav-justified"> <ul class="nav nav-pills nav-justified">
<li ng-repeat="env in envs" ng-class="{active:configLocation.env == env}"> <li ng-repeat="env in envs" ng-class="{active:configLocation.env == env}">
<a href="#" ng-click="switchEnv(env)">{{env}}</a> <a ng-click="switchEnv(env)">{{env}}</a>
</li> </li>
</ul> </ul>
...@@ -14,12 +14,12 @@ ...@@ -14,12 +14,12 @@
<ul class="nav nav-pills nav-stacked"> <ul class="nav nav-pills nav-stacked">
<li class="dropdown-header">未发布</li> <li class="dropdown-header">未发布</li>
<li role="presentation" ng-class="{active:configLocation.versionId == -1}" <li role="presentation" ng-class="{active:configLocation.versionId == -1}"
ng-click="switchVersion(-1)"><a href="#">latest</a></li> ng-click="switchVersion(-1)"><a>latest</a></li>
<li role="separator" class="divider"></li> <li role="separator" class="divider"></li>
<li class="dropdown-header">已发布</li> <li class="dropdown-header">已发布</li>
<li ng-repeat="version in releaseVersions" <li ng-repeat="version in releaseVersions"
ng-class="{active:configLocation.versionId == version.id}"> ng-class="{active:configLocation.versionId == version.id}">
<a href="#" ng-click="switchVersion(version.id)">{{version.name}}</a> <a ng-click="switchVersion(version.id)">{{version.name}}</a>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -31,13 +31,13 @@ ...@@ -31,13 +31,13 @@
<div class="col-md-6">项目的基本配置</div> <div class="col-md-6">项目的基本配置</div>
<div class="col-md-6" ng-show="!currentVersionIsRelease"> <div class="col-md-6" ng-show="!currentVersionIsRelease">
<p class="text-right"> <p class="text-right">
<a href="#" data-toggle="tooltip" <a data-toggle="tooltip"
data-placement="top" title="下载配置"> data-placement="top" title="下载配置">
<span class="glyphicon glyphicon-save" <span class="glyphicon glyphicon-save"
aria-hidden="true"></span> aria-hidden="true"></span>
</a> </a>
&nbsp; &nbsp;
<a href="#" data-toggle="tooltip" <a data-toggle="tooltip"
data-placement="top" title="添加配置"> data-placement="top" title="添加配置">
<span class="glyphicon glyphicon-plus" <span class="glyphicon glyphicon-plus"
aria-hidden="true"></span> aria-hidden="true"></span>
...@@ -93,12 +93,12 @@ ...@@ -93,12 +93,12 @@
</td> </td>
<td ng-show="!currentVersionIsRelease"> <td ng-show="!currentVersionIsRelease">
<a href="#" data-toggle="tooltip" <a data-toggle="tooltip"
data-placement="top" title="修改"> data-placement="top" title="修改">
<span class="glyphicon glyphicon-edit" <span class="glyphicon glyphicon-edit"
aria-hidden="true"></span> aria-hidden="true"></span>
</a> </a>
<a href="#" data-toggle="tooltip" <a data-toggle="tooltip"
data-placement="top" title="删除"> data-placement="top" title="删除">
<span class="glyphicon glyphicon-remove" <span class="glyphicon glyphicon-remove"
aria-hidden="true"></span> aria-hidden="true"></span>
...@@ -110,17 +110,17 @@ ...@@ -110,17 +110,17 @@
<nav class="text-right"> <nav class="text-right">
<ul class="pagination"> <ul class="pagination">
<li> <li>
<a href="#" aria-label="Previous"> <a aria-label="Previous">
<span aria-hidden="true">&laquo;</span> <span aria-hidden="true">&laquo;</span>
</a> </a>
</li> </li>
<li><a href="#">1</a></li> <li><a >1</a></li>
<li><a href="#">2</a></li> <li><a >2</a></li>
<li><a href="#">3</a></li> <li><a >3</a></li>
<li><a href="#">4</a></li> <li><a >4</a></li>
<li><a href="#">5</a></li> <li><a >5</a></li>
<li> <li>
<a href="#" aria-label="Next"> <a aria-label="Next">
<span aria-hidden="true">&raquo;</span> <span aria-hidden="true">&raquo;</span>
</a> </a>
</li> </li>
...@@ -135,18 +135,18 @@ ...@@ -135,18 +135,18 @@
<header class="panel-heading"> <header class="panel-heading">
<div class="row"> <div class="row">
<div class="col-md-6">重写<a <div class="col-md-6">重写<a
href="#">{{overrideAppConfig.appId}}</a>的配置 >{{overrideAppConfig.appId}}</a>的配置
</div> </div>
<div class="col-md-6" ng-show="!currentVersionIsRelease"> <div class="col-md-6" ng-show="!currentVersionIsRelease">
<p class="text-right"> <p class="text-right">
<a href="#" data-toggle="tooltip" <a data-toggle="tooltip"
data-placement="top" data-placement="top"
title="下载配置"> title="下载配置">
<span class="glyphicon glyphicon-save" <span class="glyphicon glyphicon-save"
aria-hidden="true"></span> aria-hidden="true"></span>
</a> </a>
&nbsp; &nbsp;
<a href="#" data-toggle="tooltip" <a data-toggle="tooltip"
data-placement="top" data-placement="top"
title="添加配置"> title="添加配置">
<span class="glyphicon glyphicon-plus" <span class="glyphicon glyphicon-plus"
...@@ -202,13 +202,13 @@ ...@@ -202,13 +202,13 @@
</td> </td>
<td ng-show="!currentVersionIsRelease"> <td ng-show="!currentVersionIsRelease">
<a href="#" data-toggle="tooltip" <a data-toggle="tooltip"
data-placement="top" data-placement="top"
title="修改"> title="修改">
<span class="glyphicon glyphicon-edit" <span class="glyphicon glyphicon-edit"
aria-hidden="true"></span> aria-hidden="true"></span>
</a> </a>
<a href="#" data-toggle="tooltip" <a data-toggle="tooltip"
data-placement="top" data-placement="top"
title="删除"> title="删除">
<span class="glyphicon glyphicon-remove" <span class="glyphicon glyphicon-remove"
...@@ -247,13 +247,13 @@ ...@@ -247,13 +247,13 @@
</div> </div>
<div class="col-md-6" ng-show="!currentVersionIsRelease"> <div class="col-md-6" ng-show="!currentVersionIsRelease">
<p class="text-right"> <p class="text-right">
<a href="#" data-toggle="tooltip" <a data-toggle="tooltip"
data-placement="top" title="下载配置"> data-placement="top" title="下载配置">
<span class="glyphicon glyphicon-save" <span class="glyphicon glyphicon-save"
aria-hidden="true"></span> aria-hidden="true"></span>
</a> </a>
&nbsp; &nbsp;
<a href="#" data-toggle="tooltip" <a data-toggle="tooltip"
data-placement="top" title="添加配置"> data-placement="top" title="添加配置">
<span class="glyphicon glyphicon-plus" <span class="glyphicon glyphicon-plus"
aria-hidden="true"></span> aria-hidden="true"></span>
...@@ -308,13 +308,13 @@ ...@@ -308,13 +308,13 @@
</td> </td>
<td ng-show="!currentVersionIsRelease"> <td ng-show="!currentVersionIsRelease">
<a href="#" data-toggle="tooltip" <a data-toggle="tooltip"
data-placement="top" data-placement="top"
title="修改"> title="修改">
<span class="glyphicon glyphicon-edit" <span class="glyphicon glyphicon-edit"
aria-hidden="true"></span> aria-hidden="true"></span>
</a> </a>
<a href="#" data-toggle="tooltip" <a data-toggle="tooltip"
data-placement="top" data-placement="top"
title="删除"> title="删除">
<span class="glyphicon glyphicon-remove" <span class="glyphicon glyphicon-remove"
......
server: server:
port: 8080 port: 8070
spring: spring:
application:
name: apollo-portal
datasource: datasource:
url: jdbc:h2:file:~/fxapolloportaldb url: jdbc:h2:mem:~/fxapolloportaldb
username: sa
password: sa
jpa: jpa:
show-sql: true hibernate:
naming_strategy: org.hibernate.cfg.EJB3NamingStrategy
logging:
level:
org.springframework.cloud: 'DEBUG'
file: /opt/logs/${ctrip.appid}/apollo-portal.log
ctrip:
appid: 100003173
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment