Skip to content
Snippets Groups Projects
Commit a6292207 authored by Nikos Filinis's avatar Nikos Filinis
Browse files

Update application graph

parent 92cb7e57
No related branches found
No related tags found
No related merge requests found
Pipeline #66413 passed with stage
in 2 minutes and 19 seconds
......@@ -227,12 +227,20 @@ async function showDescriptor(id) {
}
async function editIntent(artifact) {
if (!artifact?.descriptor?.id) return;
await fetchDescriptor(artifact.descriptor.id);
const selectedDescriptor = descriptor.value.find((desc) =>
desc.fileName.endsWith('.yaml'),
);
if (!selectedDescriptor) return;
const descJson = yaml.load(selectedDescriptor.content);
if (descriptorContent.value === '') {
await fetchDescriptor(artifact.descriptor.id);
const selectedDescriptor = descriptor.value.find((desc) =>
desc.fileName.endsWith('.yaml'),
);
if (selectedDescriptor) {
descriptorTitle.value = selectedDescriptor.fileName;
descriptorContent.value = selectedDescriptor.content;
}
}
if (!descriptorContent.value) return;
const descJson = yaml.load(descriptorContent.value);
const activeIntentType = getActiveIntentType(
descJson.hdaGraph.hdaGraphIntent,
);
......@@ -269,7 +277,7 @@ async function editIntent(artifact) {
};
});
editedIntent.value = {
originalDescriptor: selectedDescriptor,
originalDescriptor: descriptorTitle.value,
descriptorObject: descJson,
hdaGraphIntent: {
type: activeIntentType,
......@@ -445,4 +453,3 @@ function viewGraph(artifactName) {
height: 500px;
}
</style>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment