Commit 856f53c3 authored by torgiren's avatar torgiren Committed by torgiren
Browse files

show fqdn and git repo on nginx list - closes #289

Signed-off-by: torgiren's avatarMarcin Fabrykowski <git@fabrykowski.pl>
1 merge request!30show fqdn and git repo on nginx list - closes #289
Pipeline #1786 passed with stages
in 5 minutes and 12 seconds
Showing with 26 additions and 3 deletions
+26 -3
......@@ -8,8 +8,14 @@ function AppNginxList (props) {
function loadApps () {
const query = JSON.stringify({
query: ` {
nginx(org: "${props.org}") { name,
nginx(org: "${props.org}") {
name,
org,
fqdn,
git {
repo,
branch
}
},
}`
})
......@@ -30,6 +36,12 @@ function AppNginxList (props) {
<td>{ index }</td>
<td>{ app.name }</td>
<td>{ app.org }</td>
<td>
{ app.fqdn ? app.fqdn : '' }
</td>
<td>
{ app.git ? app.git.repo + ' / ' + app.git.branch : '' }
</td>
</tr>
)))
return 0
......@@ -52,6 +64,8 @@ function AppNginxList (props) {
<th>Id</th>
<th>Name</th>
<th>Org</th>
<th>Fqdn</th>
<th>Git</th>
</tr></thead>
<tbody>
{apps}
......
......@@ -11,11 +11,18 @@ test('list nginx apps', async () => {
nginx: [
{
name: 'example-app1',
org: 'test-org'
org: 'test-org',
git: null,
fqdn: null
},
{
name: 'example-app2',
org: 'test-org'
org: 'test-org',
fqdn: 'www.test.pl',
git: {
repo: 'https://github.com/test/test.git',
branch: 'devel'
}
}
]
......@@ -28,4 +35,6 @@ test('list nginx apps', async () => {
render(<AppNginxList org='test-org'/>)
await waitFor(() => expect(screen.getByText('example-app1')).toBeInTheDocument)
await waitFor(() => expect(screen.getByText('example-app2')).toBeInTheDocument)
await waitFor(() => expect(screen.getByText('www.test.pl')).toBeInTheDocument)
await waitFor(() => expect(screen.getByText('https://github.com/test/test.git / devel')).toBeInTheDocument)
})
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment