wangjx 3 роки тому
джерело
коміт
09356e42c4
3 змінених файлів з 2 додано та 7 видалено
  1. +1
    -3
      sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/FlowRuleNacosProvider.java
  2. +0
    -3
      sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/FlowRuleNacosPublisher.java
  3. +1
    -1
      sentinel-dashboard/src/main/webapp/resources/app/scripts/directives/sidebar/sidebar.html

+ 1
- 3
sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/FlowRuleNacosProvider.java Переглянути файл

@@ -20,7 +20,6 @@ import com.alibaba.csp.sentinel.dashboard.config.NacosPropertiesConfiguration;
import com.alibaba.csp.sentinel.dashboard.datasource.entity.rule.FlowRuleEntity;
import com.alibaba.csp.sentinel.datasource.Converter;
import com.alibaba.nacos.api.config.ConfigService;
import lombok.extern.log4j.Log4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
@@ -31,7 +30,6 @@ import java.util.List;
/**
* @author Eric Zhao
*/
@Log4j
@Service
public class FlowRuleNacosProvider implements DynamicRuleProvider<List<FlowRuleEntity>> {

@@ -47,7 +45,7 @@ public class FlowRuleNacosProvider implements DynamicRuleProvider<List<FlowRuleE
public List<FlowRuleEntity> getRules(String appName) throws Exception {
String dataId=new StringBuilder(appName).append(NacosConstants.DATA_ID_POSTFIX).toString();
String rules = configService.getConfig(dataId,nacosPropertiesConfiguration.getGroupId(),3000);
log.info("pull FlowRule from nacos Config:"+rules);
//log.info("pull FlowRule from nacos Config:"+rules);
if (rules.isEmpty()) {
return new ArrayList<>();
} else {


+ 0
- 3
sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/FlowRuleNacosPublisher.java Переглянути файл

@@ -21,18 +21,15 @@ import com.alibaba.csp.sentinel.dashboard.datasource.entity.rule.FlowRuleEntity;
import com.alibaba.csp.sentinel.datasource.Converter;
import com.alibaba.csp.sentinel.util.AssertUtil;
import com.alibaba.nacos.api.config.ConfigService;
import lombok.extern.log4j.Log4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
* @author Eric Zhao
*/
@Log4j
@Service
public class FlowRuleNacosPublisher implements DynamicRulePublisher<List<FlowRuleEntity>> {



+ 1
- 1
sentinel-dashboard/src/main/webapp/resources/app/scripts/directives/sidebar/sidebar.html Переглянути файл

@@ -21,7 +21,7 @@
<span class="fa arrow"></span>
<span class="arrow">({{entry.healthyCount}}/{{entry.machines.length}})</span>
</a -->
<li class="glyphicon-dashboard" ng-repeat="entry in apps | filter: { app: searchApp }">
<li ng-class="glyphicon-dashboard" ng-repeat="entry in apps | filter: { app: searchApp }">
sentinel_dashboard
<!--<ul class="nav nav-second-level" collapse="{{entry.active}}" style="display: none;">-->
<ul class="nav nav-second-level" ng-show="entry.active">


Завантаження…
Відмінити
Зберегти