Skip to content

Commit

Permalink
Fix trial pipelines creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ardem committed Oct 23, 2024
1 parent c3e6809 commit 55ffc13
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
12 changes: 7 additions & 5 deletions backend/pipelines/app/trial/creator.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,15 @@ func createTrialPipeline(db *sql.DB, pipelineUuid string, pipelineName string, o
}

var query *task.Query
var uQuery *task.HttpApiUpdatedQuery
uQuery := new(task.HttpApiUpdatedQuery)
for _, qTask := range tasks.Items {
if qTask.Type == task.TaskTypeQuery {
query, _ = task.GetQuery(db, qTask.Id)
uQuery.SourceUuid = sourceUuid
uQuery.SQLQuery = query.SQLQuery
_ = task.UpdateQueryTx(tx, qTask.Id, uQuery)
query, err = task.GetQuery(db, qTask.ImplementationId)
if err == nil {
uQuery.SourceUuid = sourceUuid
uQuery.SQLQuery = query.SQLQuery
_ = task.UpdateQueryTx(tx, qTask.ImplementationId, uQuery)
}
}
}

Expand Down
9 changes: 7 additions & 2 deletions ui/src/components/pipelines/pipeline.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,10 @@ class Pipeline extends Component {
isOutputVisible: false,
oldOutput: "",
});

Array.from(document.getElementsByClassName('nodeTBD')).forEach(element => (
element.classList.remove('nodeTBD')
));
}

setElements(elements) {
Expand Down Expand Up @@ -1087,6 +1091,7 @@ class Pipeline extends Component {
closeRunningForm = async(timeoutError = false, isExternalFailure = false) => {
await this.promisedSetState({
isRunningFormOpen: false,
isPipelineRunning: false,
});

if (isExternalFailure === true) {
Expand Down Expand Up @@ -1407,9 +1412,9 @@ class Pipeline extends Component {
<Button
variant="primary"
onClick={() => this.openRunningForm(false)}
disabled={isPipelineRunning}
disabled={isPipelineRunning === true}
>
{isPipelineRunning && (
{isPipelineRunning === true && (
<span className="spinner-border spinner-border-sm spinner-primary"></span>
)}
Run pipeline
Expand Down

0 comments on commit 55ffc13

Please sign in to comment.