diff --git a/dvzaservice/app/src/Connection.js b/dvzaservice/app/src/Connection.js
index d43151c..9eda3c1 100644
--- a/dvzaservice/app/src/Connection.js
+++ b/dvzaservice/app/src/Connection.js
@@ -44,6 +44,7 @@ const Connection = () => {
console.log('service', service)
return (
+
Verbinding
{(connection && service) ? ({connection.OrganisationDisplayName} ({connection.OrganisationId}) | {service.Service.Name}
) : null}
{}
diff --git a/dvzaservice/app/src/Connections.js b/dvzaservice/app/src/Connections.js
index 88c1900..672dc7c 100644
--- a/dvzaservice/app/src/Connections.js
+++ b/dvzaservice/app/src/Connections.js
@@ -3,6 +3,11 @@ import { useEffect, useState } from "react";
import { Link } from "react-router-dom";
import "./Index.css";
+const subscriptionsCount = (s) => {
+ const l = s.Subscriptions.length
+ return l == 1 ? "1 patiƫnt aangemeld" : `${l} patiƫnten aangemeld`
+}
+
const App = () => {
const [connections, setConnections] = useState([])
useEffect(() => {
@@ -10,6 +15,7 @@ const App = () => {
}, [])
return (
+
Verbindingen
@@ -24,7 +30,7 @@ const App = () => {
{x.OrganisationId} |
{x.OrganisationDisplayName} |
{x.Services.length ? x.Services.map((s) => {
- return {s.Service.Name}
+ return {s.Service.Name} ({subscriptionsCount(s)})
}) : '-'} |
)
})}
diff --git a/dvzaservice/app/src/Home.js b/dvzaservice/app/src/Home.js
index 60d9581..69cc82d 100644
--- a/dvzaservice/app/src/Home.js
+++ b/dvzaservice/app/src/Home.js
@@ -3,7 +3,10 @@ import "./Index.css";
const App = () => {
return (
-
+
+
Welkom bij DVZA
+
Dit systeem is beschikbaar op: dvza.openkv.mcsr.nl:9999
+
);
};
diff --git a/dvzaservice/app/src/Index.css b/dvzaservice/app/src/Index.css
index 411d289..7bffdc1 100644
--- a/dvzaservice/app/src/Index.css
+++ b/dvzaservice/app/src/Index.css
@@ -1,5 +1,5 @@
body {
- font-family: helvetica;
+ font-family: Helvetica, Arial, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
@@ -8,6 +8,12 @@ h2 {
margin-bottom: 35px;
}
+code {
+ font-size: 120%;
+ background: rgba(0,0,0,0.1);
+ padding: 10px;
+}
+
.c-main-nav {
padding: 15px;
display: flex;
@@ -16,8 +22,20 @@ h2 {
box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
}
+.c-main-nav__main {
+ display: flex;
+ justify-content: space-between;
+ flex:1;
+}
+
.c-main-nav a {display: block; padding: 5px; color: #137ad4; text-decoration: none}
+.c-main-nav p a {color: black}
+.c-main-nav .active {font-weight:bold; text-decoration: underline}
+.t-page-header {
+ margin-bottom: 50px;
+}
+
.c-table {
width: 100%;
}
diff --git a/dvzaservice/app/src/Patient.js b/dvzaservice/app/src/Patient.js
index 48c88d9..8127bbe 100644
--- a/dvzaservice/app/src/Patient.js
+++ b/dvzaservice/app/src/Patient.js
@@ -14,6 +14,7 @@ const Patient = () => {
return (
+
Patient
{patient ? : null}
);
diff --git a/dvzaservice/app/src/Registrations.js b/dvzaservice/app/src/Registrations.js
index bca4964..ccc4438 100644
--- a/dvzaservice/app/src/Registrations.js
+++ b/dvzaservice/app/src/Registrations.js
@@ -10,6 +10,7 @@ const App = () => {
console.log('registrations', registrations)
return (
+
Registratie verzoeken
AGB |
diff --git a/dvzaservice/main.go b/dvzaservice/main.go
index 10a0733..d37b46e 100644
--- a/dvzaservice/main.go
+++ b/dvzaservice/main.go
@@ -12,8 +12,8 @@ import (
"whiteboxsystems.nl/openkvpoc/openkv"
)
-var srvaddr = "localhost:9999"
-var patientIf = "localhost:9095"
+var rpcAddr = "0.0.0.0:9999"
+var uiAddr = "0.0.0.0:9095"
func main() {
stop := make(chan os.Signal, 1)
@@ -29,18 +29,18 @@ func main() {
grpcServer := grpc.NewServer(opts...)
go func() {
- lis, err := net.Listen("tcp", srvaddr)
+ lis, err := net.Listen("tcp", rpcAddr)
if err != nil {
log.Fatalf("failed to listen: %v", err)
}
openkv.RegisterOpenKVServer(grpcServer, openapisrv)
- log.Printf("RPC Listening on %v", srvaddr)
+ log.Printf("RPC Listening on %v", rpcAddr)
wg.Add(1)
grpcServer.Serve(lis)
}()
- srv := NewUIServer(patientIf)
+ srv := NewUIServer(uiAddr)
srv.data = openapisrv.data
go func() {
diff --git a/dvzaservice/srv.go b/dvzaservice/srv.go
index a14b7dd..c0d42e2 100644
--- a/dvzaservice/srv.go
+++ b/dvzaservice/srv.go
@@ -131,7 +131,7 @@ func (srv *UIService) Authenticate(c *gin.Context) {
func (srv *UIService) GetConnections(c *gin.Context) {
connections := []*sharedmodel.Connection{}
- srv.data.Preload("Services").Preload("Services.Service").Find(&connections)
+ srv.data.Preload("Services").Preload("Services.Service").Preload("Services.Subscriptions").Find(&connections)
c.JSON(200, connections)
}
diff --git a/dvzaservice/templates/index.html b/dvzaservice/templates/index.html
index e6f3eeb..fc152cb 100644
--- a/dvzaservice/templates/index.html
+++ b/dvzaservice/templates/index.html
@@ -4,7 +4,7 @@
- ACME - DVZA
+ DVZA