Skip to content

Commit

Permalink
frontend: add an option to show full VMI history logs
Browse files Browse the repository at this point in the history
Signed-off-by: Vladik Romanovsky <[email protected]>
  • Loading branch information
vladikr committed Sep 26, 2023
1 parent d23f446 commit 22a4bf1
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,10 @@ const VirtualMachineInstances: React.FunctionComponent = () => {

const fetchDSLQuery = async (
vmiUUID: string,
nodeName: string
nodeName: string,
apiPath: string,
) => {
const retq = await axios.get(apiBaseUrl + "/getVMIQueryParams",
const retq = await axios.get(apiBaseUrl + "/" + apiPath,
{
params: {
vmiUUID: vmiUUID,
Expand Down Expand Up @@ -182,15 +183,15 @@ const VirtualMachineInstances: React.FunctionComponent = () => {

const defaultActions = (repo: Vmi): IAction[] => [
{
title: "Show Logs",
onClick: () => fetchDSLQuery(repo.uuid, repo.nodeName)
title: "Logs Since Creation",
onClick: () => fetchDSLQuery(repo.uuid, repo.nodeName, "getFullVMIHistoryQueryParams")
},
{
isSeparator: true
},
{
title: "Show logs since...",
onClick: () => console.log(`Not Implemented yet for ${repo.name}`)
title: "Show Latest Logs",
onClick: () => fetchDSLQuery(repo.uuid, repo.nodeName, "getVMIQueryParams")
}
];
const tableToolbar = (
Expand Down

0 comments on commit 22a4bf1

Please sign in to comment.