34
34
import javax .ws .rs .core .MediaType ;
35
35
import javax .ws .rs .core .Response ;
36
36
import java .net .URI ;
37
+ import java .util .Set ;
37
38
38
39
@ Path ("/configure/{service}" )
39
40
public class ConfigureResource {
40
41
private static final Logger LOG = LoggerFactory .getLogger (ConfigureResource .class );
41
42
private final BreakerboxStore breakerboxStore ;
42
43
private final TenacityPropertyKeysStore tenacityPropertyKeysStore ;
43
44
private final SyncComparator syncComparator ;
45
+ private final Set <String > specifiedMetaClusters ;
44
46
45
47
public ConfigureResource (BreakerboxStore breakerboxStore ,
46
48
TenacityPropertyKeysStore tenacityPropertyKeysStore ,
47
- SyncComparator syncComparator ) {
49
+ SyncComparator syncComparator ,
50
+ Set <String > specifiedMetaClusters ) {
48
51
this .breakerboxStore = breakerboxStore ;
49
52
this .tenacityPropertyKeysStore = tenacityPropertyKeysStore ;
50
53
this .syncComparator = syncComparator ;
54
+ this .specifiedMetaClusters = specifiedMetaClusters ;
51
55
}
52
56
53
57
@ GET @ Timed @ Produces (MediaType .TEXT_HTML )
@@ -59,7 +63,7 @@ public View render(@PathParam("service") String serviceName) {
59
63
if (firstDependencyKey .isPresent ()) {
60
64
return create (serviceId , DependencyId .from (firstDependencyKey .get ()), Optional .<Long >absent ());
61
65
} else {
62
- return new NoPropertyKeysView (serviceId );
66
+ return new NoPropertyKeysView (serviceId , specifiedMetaClusters );
63
67
}
64
68
}
65
69
@@ -80,7 +84,8 @@ private ConfigureView create(ServiceId serviceId,
80
84
serviceId ,
81
85
syncComparator .allInSync (serviceId , propertyKeys ),
82
86
getConfiguration (dependencyId , version , serviceId ),
83
- getDependencyVersionNameList (dependencyEntities ));
87
+ getDependencyVersionNameList (dependencyEntities ),
88
+ specifiedMetaClusters );
84
89
}
85
90
86
91
private TenacityConfiguration getConfiguration (DependencyId dependencyId , Optional <Long > version , ServiceId serviceId ) {
0 commit comments