Skip to content

Commit

Permalink
Hiding entity editor from defaut view (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
puneetjaiswal authored Oct 11, 2019
1 parent 2135fb6 commit d8ad248
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,10 @@ The Gateway admin page is used to configure the gateway to multiple backends. Ex
## Contributing

Want to help build Presto Gateway? Check out our [contributing documentation](CONTRIBUTING.md)

References :sparkles:
--------------------
[Scaling Presto Infra with gateway at Lyft](https://eng.lyft.com/presto-infrastructure-at-lyft-b10adb9db01)

[Presto-gateway at Pinterest](https://medium.com/pinterest-engineering/presto-at-pinterest-a8bda7515e52)

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.util.Arrays;
import java.util.List;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
Expand Down Expand Up @@ -50,6 +51,7 @@ private enum EntityType {

@GET
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public List<EntityType> getAllEntityTypes() {
return Arrays.asList(EntityType.values());
}
Expand Down
3 changes: 2 additions & 1 deletion gateway-ha/src/main/resources/template/entity-view.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<script type="text/javascript">
$(document).ready(function () {
renderConfigSelector();
document.getElementById("entity_editor_tab").style.display = "inline";
document.getElementById("entity_editor_tab").style.backgroundColor = "grey";
})
</script>
Expand All @@ -22,4 +23,4 @@
<h2>!!Admin only!!</h2>
<div id="entity-editor-place-holder"></div>

<#include "footer.ftl">
<#include "footer.ftl">
4 changes: 2 additions & 2 deletions gateway-ha/src/main/resources/template/header.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<button class="tablink" id="active_backends_tab">Active Backends</button>
</a>
<a href="/entity">
<button class="tablink" id="entity_editor_tab">Entity Editor</button>
<button class="tablink" id="entity_editor_tab" style="display: none">Entity Editor</button>
</a>

<div class="tabcontent">
<div class="tabcontent">

0 comments on commit d8ad248

Please sign in to comment.