Skip to content

Commit

Permalink
more improvements
Browse files Browse the repository at this point in the history
Signed-off-by: Charly Molter <[email protected]>
  • Loading branch information
lahabana committed Nov 15, 2024
1 parent 73e2234 commit c1e18e0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 73 deletions.
73 changes: 12 additions & 61 deletions app/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
background: #82d9a6;
font-size: 20px;
font-weight: bold;
overflow: auto;
}

#status.error {
Expand All @@ -89,16 +90,10 @@
display: none !important;
}

.inner {
max-width: 1300px;
margin-left: auto;
margin-right: auto;
}

.columns {
display: flex;
max-width: 1300px;
margin: 20px auto;
margin: 0 auto;
text-align: left;
}

Expand All @@ -107,23 +102,12 @@
flex-basis: 50%;
padding: 50px;
}

/* make sure to place your content above the pseudo element! */
.info > * {
position: relative;
z-index: 1;
.info {
background-color: rgba(0, 0, 0, 0.025);
}

/* hacky background 50% column trick */
.info::after {
position: absolute;
top: 0;
left: 0;
display: block;
content: "";
width: 50vw;
height: 100%;
background: rgba(0, 0, 0, 0.025);
.info .mermaid {
padding: 36px 0;
}

button:disabled {
Expand Down Expand Up @@ -211,29 +195,6 @@
margin-right: 10px;
}

footer {
background: #fff;
border-top: 1px solid #eee;
}

@media (min-height: 775px) {
footer {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
}
}

footer > .inner {
text-align: center;
padding: 30px;
}

footer p {
margin: 0 0 10px 0;
}

.type-s {
font-size: 14px !important;
}
Expand Down Expand Up @@ -274,14 +235,18 @@ <h1 class="type-xxxl">Kuma Counter Demo <span id="ui-version"></span></h1>
<li><strong>demo-app:</strong> To serve the backend API and this frontend</li>
<li><strong>kv:</strong> To store the counter value</li>
</ul>
<p>
<pre class="mermaid">
flowchart LR

demo-app(demo-app :5050)
kv(kv :5050)
demo-app --> kv
</pre>
<p>
<a href="https://github.com/kumahq/kuma-counter-demo" class="icon-button" target="_blank">
<img src="./github.svg" alt="GitHub logo" class="icon">
<span>https://github.com/kumahq/kuma-counter-demo</span>
</a>
</p>
</div>
<div class="controls-container">
Expand All @@ -301,7 +266,7 @@ <h1 class="type-xxxl">Kuma Counter Demo <span id="ui-version"></span></h1>
</div>

<div class="output">
<div id="status"></div>
<pre id="status"></pre>

<div class="tile">
<h3>Counter</h3>
Expand Down Expand Up @@ -333,20 +298,6 @@ <h3>Version</h3>
</div>
</div>
</div>

<footer>
<div class="inner">
<p>
You can find the source code for this demo at
</p>
<p>
<a href="https://github.com/kumahq/kuma-counter-demo" class="icon-button" target="_blank">
<img src="./github.svg" alt="GitHub logo" class="icon">
<span>https://github.com/kumahq/kuma-counter-demo</span>
</a>
</p>
</div>
</footer>
</div>
<script type="text/javascript">
let running = false;
Expand Down
5 changes: 1 addition & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@ go 1.23.2

require (
github.com/getkin/kin-openapi v0.127.0
github.com/go-logr/logr v1.4.2
github.com/gorilla/mux v1.8.1
github.com/oapi-codegen/nethttp-middleware v1.0.2
github.com/oapi-codegen/runtime v1.1.1
github.com/prometheus/client_golang v1.20.3
go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux v0.55.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0
go.opentelemetry.io/otel v1.32.0
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.6.0
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.30.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.30.0
go.opentelemetry.io/otel/exporters/prometheus v0.52.0
go.opentelemetry.io/otel/sdk v1.30.0
go.opentelemetry.io/otel/sdk/log v0.6.0
go.opentelemetry.io/otel/sdk/metric v1.30.0
go.opentelemetry.io/otel/trace v1.32.0
)
Expand All @@ -28,7 +27,6 @@ require (
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
Expand All @@ -44,7 +42,6 @@ require (
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.59.1 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
go.opentelemetry.io/otel/log v0.6.0 // indirect
go.opentelemetry.io/otel/metric v1.32.0 // indirect
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
golang.org/x/net v0.29.0 // indirect
Expand Down
6 changes: 0 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0 h1:DheMAlT
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0/go.mod h1:wZcGmeVO9nzP67aYSLDqXNWK87EZWhi7JWj1v7ZXf94=
go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U=
go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg=
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.6.0 h1:QSKmLBzbFULSyHzOdO9JsN9lpE4zkrz1byYGmJecdVE=
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.6.0/go.mod h1:sTQ/NH8Yrirf0sJ5rWqVu+oT82i4zL9FaF6rWcqnptM=
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.30.0 h1:VrMAbeJz4gnVDg2zEzjHG4dEH86j4jO6VYB+NgtGD8s=
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.30.0/go.mod h1:qqN/uFdpeitTvm+JDqqnjm517pmQRYxTORbETHq5tOc=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0 h1:lsInsfvhVIfOI6qHVyysXMNDnjO9Npvl7tlDPJFBVd4=
Expand All @@ -94,14 +92,10 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.30.0 h1:umZgi
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.30.0/go.mod h1:4lVs6obhSVRb1EW5FhOuBTyiQhtRtAnnva9vD3yRfq8=
go.opentelemetry.io/otel/exporters/prometheus v0.52.0 h1:kmU3H0b9ufFSi8IQCcxack+sWUblKkFbqWYs6YiACGQ=
go.opentelemetry.io/otel/exporters/prometheus v0.52.0/go.mod h1:+wsAp2+JhuGXX7YRkjlkx6hyWY3ogFPfNA4x3nyiAh0=
go.opentelemetry.io/otel/log v0.6.0 h1:nH66tr+dmEgW5y+F9LanGJUBYPrRgP4g2EkmPE3LeK8=
go.opentelemetry.io/otel/log v0.6.0/go.mod h1:KdySypjQHhP069JX0z/t26VHwa8vSwzgaKmXtIB3fJM=
go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M=
go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8=
go.opentelemetry.io/otel/sdk v1.30.0 h1:cHdik6irO49R5IysVhdn8oaiR9m8XluDaJAs4DfOrYE=
go.opentelemetry.io/otel/sdk v1.30.0/go.mod h1:p14X4Ok8S+sygzblytT1nqG98QG2KYKv++HE0LY/mhg=
go.opentelemetry.io/otel/sdk/log v0.6.0 h1:4J8BwXY4EeDE9Mowg+CyhWVBhTSLXVXodiXxS/+PGqI=
go.opentelemetry.io/otel/sdk/log v0.6.0/go.mod h1:L1DN8RMAduKkrwRAFDEX3E3TLOq46+XMGSbUfHU/+vE=
go.opentelemetry.io/otel/sdk/metric v1.30.0 h1:QJLT8Pe11jyHBHfSAgYH7kEmT24eX792jZO1bo4BXkM=
go.opentelemetry.io/otel/sdk/metric v1.30.0/go.mod h1:waS6P3YqFNzeP01kuo/MBBYqaoBJl7efRQHOaydhy1Y=
go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM=
Expand Down
4 changes: 2 additions & 2 deletions k8s/policies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ apiVersion: kuma.io/v1alpha1
kind: MeshTrafficPermission
metadata:
namespace: kuma-demo
name: redis
name: kv
spec:
targetRef:
kind: MeshSubset
Expand All @@ -33,7 +33,7 @@ spec:
apiVersion: kuma.io/v1alpha1
kind: MeshTrafficPermission
metadata:
namespace: kuma-system
namespace: kuma-demo
name: demo-app
spec:
targetRef:
Expand Down

0 comments on commit c1e18e0

Please sign in to comment.