Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tacc-frontend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Wen Wei Li
tacc-frontend
Commits
8cd6c43a
Commit
8cd6c43a
authored
May 03, 2024
by
Wen Wei Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add single agent view
parent
be38f193
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
7 deletions
+15
-7
src/components/Agent.vue
src/components/Agent.vue
+4
-4
src/components/Agents.vue
src/components/Agents.vue
+1
-1
src/main.js
src/main.js
+10
-2
No files found.
src/components/Agent.vue
View file @
8cd6c43a
<
template
>
<CContainer>
<div>
<h2>
Agent Lists
</h2>
<h2>
{{
agentId
}}
</h2>
<CContainer>
<CTable
hover
>
<CTableHead>
...
...
@@ -42,8 +42,8 @@
methods
:
{
async
fetchAgentsData
()
{
try
{
console
.
log
(
"
`http://192.168.88.238:8080/api/v1/agent/${this.agentI
D
}`
"
);
const
response
=
await
fetch
(
"
`http://192.168.88.238:8080/api/v1/agent/${this.agentI
D
}`
"
);
console
.
log
(
"
`http://192.168.88.238:8080/api/v1/agent/${this.agentI
d
}`
"
);
const
response
=
await
fetch
(
"
`http://192.168.88.238:8080/api/v1/agent/${this.agentI
d
}`
"
);
if
(
!
response
.
ok
)
throw
new
Error
(
'
Failed to fetch
'
);
this
.
agent_data
=
await
response
.
json
();
console
.
log
(
this
.
agent_data
);
...
...
@@ -55,7 +55,7 @@
watch
:
{
'
$route
'
(
to
,
from
)
{
// React to route changes and update the productId
this
.
agentI
D
=
to
.
params
.
agentID
;
this
.
agentI
d
=
to
.
params
.
agentId
;
}
}
}
...
...
src/components/Agents.vue
View file @
8cd6c43a
...
...
@@ -15,7 +15,7 @@
<CTableBody>
<CTableRow
v-for=
"(agent, index) in agents"
:key=
"agent.id"
>
<CTableDataCell>
<router-link
:to=
"`/agent/$
{agent.id}`" >
<router-link
:to=
"`/agent
s
/$
{agent.id}`" >
{{
agent
.
id
}}
</router-link>
</CTableDataCell>
...
...
src/main.js
View file @
8cd6c43a
...
...
@@ -14,8 +14,16 @@ const router = createRouter({
history
:
createWebHistory
(),
routes
:
[
{
path
:
'
/
'
,
component
:
Criteria
},
{
path
:
'
/agents
'
,
component
:
Agents
},
{
path
:
'
/agent/:agentID
'
,
component
:
Agent
}
{
path
:
'
/agents
'
,
component
:
Agents
,
children
:
[
{
path
:
'
:agentId
'
,
name
:
'
agentId
'
,
props
:
true
,
component
:
Agent
}
]
},
]
});
export
default
router
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment