mirror of
https://github.com/czhu12/canine.git
synced 2025-12-30 15:49:54 -06:00
22 lines
591 B
JavaScript
22 lines
591 B
JavaScript
import { Controller } from "@hotwired/stimulus"
|
|
import { getDefaultValues } from "../utils/helm_charts"
|
|
|
|
export default class extends Controller {
|
|
static targets = [ "modal", "content" ]
|
|
static values = {
|
|
repositoryName: String,
|
|
repositoryUrl: String,
|
|
chartName: String
|
|
}
|
|
connect() {
|
|
}
|
|
|
|
async show(event) {
|
|
event.preventDefault()
|
|
const html = await getDefaultValues(this.repositoryNameValue, this.repositoryUrlValue, this.chartNameValue)
|
|
this.contentTarget.innerHTML = html
|
|
// Show the modal on the page already
|
|
this.modalTarget.showModal()
|
|
}
|
|
}
|