-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from yammer/react
React
- Loading branch information
Showing
79 changed files
with
1,510 additions
and
2,042 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
target* | ||
dependency-reduced-pom.xml | ||
*.keystore | ||
breakerbox-ui/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 0 additions & 36 deletions
36
...rbox-dashboard/src/main/java/com/yammer/breakerbox/dashboard/resources/IndexResource.java
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
turbine.aggregator.clusterConfig=breakerbox,production | ||
turbine.aggregator.clusterConfig=breakerbox,production,others | ||
|
||
turbine.instanceUrlSuffix=/tenacity/metrics.stream | ||
|
||
turbine.ConfigPropertyBasedDiscovery.others.instances=\ | ||
localhost:8080,\ | ||
localhost:8081 | ||
|
||
turbine.ConfigPropertyBasedDiscovery.breakerbox.instances=\ | ||
localhost:8080 | ||
localhost:8080,\ | ||
localhost:8081 | ||
|
||
turbine.ConfigPropertyBasedDiscovery.production.instances=\ | ||
localhost:8080 | ||
localhost:8080,\ | ||
localhost:8081 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
...erbox-service/src/main/java/com/yammer/breakerbox/service/resources/ClustersResource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package com.yammer.breakerbox.service.resources; | ||
|
||
import com.codahale.metrics.annotation.Timed; | ||
import com.google.common.collect.Ordering; | ||
import com.yammer.breakerbox.service.comparable.SortRowFirst; | ||
import com.yammer.breakerbox.service.core.Instances; | ||
import com.yammer.breakerbox.service.store.TenacityPropertyKeysStore; | ||
import com.yammer.breakerbox.store.BreakerboxStore; | ||
import com.yammer.breakerbox.store.DependencyId; | ||
import com.yammer.breakerbox.store.ServiceId; | ||
import com.yammer.breakerbox.store.model.DependencyModel; | ||
|
||
import javax.ws.rs.*; | ||
import javax.ws.rs.core.MediaType; | ||
import java.util.Collection; | ||
import java.util.Set; | ||
|
||
@Path("/clusters") | ||
public class ClustersResource { | ||
private final Set<String> specifiedMetaClusters; | ||
private final BreakerboxStore breakerboxStore; | ||
private final TenacityPropertyKeysStore tenacityPropertyKeysStore; | ||
|
||
public ClustersResource(Set<String> specifiedMetaClusters, | ||
BreakerboxStore breakerboxStore, | ||
TenacityPropertyKeysStore tenacityPropertyKeysStore) { | ||
this.specifiedMetaClusters = specifiedMetaClusters; | ||
this.breakerboxStore = breakerboxStore; | ||
this.tenacityPropertyKeysStore = tenacityPropertyKeysStore; | ||
} | ||
|
||
@GET @Timed @Produces(MediaType.APPLICATION_JSON) | ||
public Collection<String> clusters(@QueryParam("no-meta") @DefaultValue("false") boolean noMeta) { | ||
return noMeta ? Instances.noMetaClusters(specifiedMetaClusters) : Instances.clusters(); | ||
} | ||
|
||
@GET @Timed @Produces(MediaType.APPLICATION_JSON) | ||
@Path("{serviceId}/propertykeys") | ||
public Collection<String> propertyKeys(@PathParam("serviceId") String id) { | ||
final ServiceId serviceId = ServiceId.from(id); | ||
return tenacityPropertyKeysStore.tenacityPropertyKeysFor(Instances.propertyKeyUris(serviceId)); | ||
} | ||
|
||
@GET @Timed @Produces(MediaType.APPLICATION_JSON) | ||
@Path("{serviceId}/configurations/{dependencyId}") | ||
public Collection<DependencyModel> configurations(@PathParam("serviceId") String serviceId, | ||
@PathParam("dependencyId") String dependencyId) { | ||
return Ordering.from(new SortRowFirst()) | ||
.reverse() | ||
.immutableSortedCopy(breakerboxStore.allDependenciesFor(DependencyId.from(dependencyId), | ||
ServiceId.from(serviceId))); | ||
} | ||
} |
Oops, something went wrong.