Skip to content

Commit

Permalink
Merge pull request #172 from kubero-dev/fix/pipeline-delition
Browse files Browse the repository at this point in the history
Fix / Improve pipeline delete
  • Loading branch information
mms-gianni authored May 29, 2023
2 parents 4e53972 + cdfd438 commit 102c8c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions client/src/components/pipelines/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</v-col>
</v-row>

<v-row v-for="item in apps" :key="item.name">
<v-row v-for="item in apps" :key="item.name" :id="item.name">
<v-col cols="12">
<v-card elevation="2" outlined color="cardBackground">
<v-card-text>
Expand Down Expand Up @@ -118,10 +118,12 @@ export default {
});
},
deletePipeline(app) {
document.querySelector(`#${app}`).style.display = "none";
axios.delete(`/api/pipelines/${app}`)
.then(response => {
console.log(response);
this.loadPipelinesList();
//this.loadPipelinesList();
})
.catch(error => {
console.log(error);
Expand Down
2 changes: 1 addition & 1 deletion src/kubero.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export class Kubero {
if (pipeline) {
await this.kubectl.deletePipeline(pipelineName);

// TODO: lines not working, since object may still exist in the API
await new Promise(resolve => setTimeout(resolve, 5000)); // needs some extra time to delete the namespace
this.updateState();
this._io.emit('updatedPipelines', "deleted");
this.kubectl.createEvent('Normal', 'Deleted', 'pipeline.deleted', 'deleted pipeline: '+pipelineName);
Expand Down

0 comments on commit 102c8c7

Please sign in to comment.