diff --git a/README.md b/README.md index 2640dc89..fbe9ba98 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ curl -sSL https://raw.githubusercontent.com/czhu12/canine/refs/heads/main/instal Or run manually if you prefer: ```bash -git clone git@github.com:czhu12/canine.git +git clone https://github.com/czhu12/canine.git cd canine/install docker compose up -d ``` @@ -39,6 +39,9 @@ Canine Cloud offers additional features for small teams: For more information & pricing, take a look at our landing page [https://canine.sh](https://canine.sh). +## Repo Activity + + ## License -[MIT License](https://github.com/czhu12/canine/blob/main/LICENSE) +[Apache 2.0 License](https://github.com/czhu12/canine/blob/main/LICENSE) diff --git a/TODO.md b/TODO.md index a2cbe7d5..a7482b60 100644 --- a/TODO.md +++ b/TODO.md @@ -3,18 +3,14 @@ - [ ] Change the loading state of an add on install to have a better UX - [ ] Show multi step install progress - [ ] Automatic DNS mapping for canineapp.run -- [ ] Support login without Github -- [ ] Support organization projects +- [ ] Migrate Login with Github to github apps + - [ ] Support organization projects on github - [ ] Add skeleton loader for processes page -- [ ] Migrate to goodjob to support scheduled jobs without a ton of separate gems -- [ ] Gray out deploy button if there are no services -- [ ] Make the metrics page look better + filter - [ ] Show ingress logs at the cluster level -- parse NGINX logs - [ ] Streaming logs for pods - [ ] Project groupings? -- [ ] Create a pricing calculator - [ ] Constantly refresh the processes page for readiness of pods -- [ ] Pre-deploy task +- [ ] Make the metrics page look better + filter - [ ] Metrics improvement: https://stackoverflow.com/questions/68058199/chartjs-need-help-on-drawing-a-vertical-line-when-hovering-cursor - [ ] Add metrics page for add ons -- [ ] improve helm chart previews \ No newline at end of file +- [ ] Web socket issues with deployment status's diff --git a/app/controllers/add_ons_controller.rb b/app/controllers/add_ons_controller.rb index 391ed7de..bfe72e13 100644 --- a/app/controllers/add_ons_controller.rb +++ b/app/controllers/add_ons_controller.rb @@ -112,6 +112,8 @@ class AddOnsController < ApplicationController @service = K8::Helm::Redis.new(@add_on) elsif @add_on.chart_type == "postgresql" @service = K8::Helm::Postgresql.new(@add_on) + elsif @add_on.chart_type == "clickhouse" + @service = K8::Helm::Clickhouse.new(@add_on) else @service = K8::Helm::Service.new(@add_on) end diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index edafea9c..96f9669f 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -28,8 +28,8 @@ class ProjectsController < ApplicationController # GET /projects/new def new - selected_provider = params[:provider] || Provider::GITHUB_PROVIDER - @providers = current_user.providers.where(provider: selected_provider) + @selected_provider = params[:provider] || Provider::GITHUB_PROVIDER + @providers = current_user.providers.where(provider: @selected_provider) # Temporary hack @provider = @providers.first @project = Project.new diff --git a/app/controllers/users/omniauth_callbacks_controller.rb b/app/controllers/users/omniauth_callbacks_controller.rb index ea24b764..5800bf61 100644 --- a/app/controllers/users/omniauth_callbacks_controller.rb +++ b/app/controllers/users/omniauth_callbacks_controller.rb @@ -9,14 +9,6 @@ module Users redirect_to root_path, alert: "Something went wrong" end - def facebook - handle_auth "Facebook" - end - - def twitter - handle_auth "Twitter" - end - def github handle_auth "Github" end diff --git a/app/controllers/users/registrations_controller.rb b/app/controllers/users/registrations_controller.rb index 52ea44a3..3ab1cdca 100644 --- a/app/controllers/users/registrations_controller.rb +++ b/app/controllers/users/registrations_controller.rb @@ -1,6 +1,15 @@ class Users::RegistrationsController < Devise::RegistrationsController layout 'homepage', only: [ :new, :create ] + def create + ActiveRecord::Base.transaction do + super do |user| + account = Account.create!(name: "#{user.first_name}'s Account", owner: user) if user.persisted? + AccountUser.create!(account:, user:) + end + end + end + protected def update_resource(resource, params) if account_update_params[:password].blank? diff --git a/app/javascript/controllers/github_select_repository_controller.js b/app/javascript/controllers/github_select_repository_controller.js index 89e9e30e..29fa5255 100644 --- a/app/javascript/controllers/github_select_repository_controller.js +++ b/app/javascript/controllers/github_select_repository_controller.js @@ -17,7 +17,8 @@ export default class extends Controller { } async filterRepositories(e) { - this.searchFunc(e) + e.preventDefault(); + this.searchFunc(e); } closeModal() { diff --git a/app/javascript/controllers/helm_search_controller.js b/app/javascript/controllers/helm_search_controller.js index ee0dbc9a..d734c69f 100644 --- a/app/javascript/controllers/helm_search_controller.js +++ b/app/javascript/controllers/helm_search_controller.js @@ -1,5 +1,5 @@ import { Controller } from "@hotwired/stimulus" -import { renderHelmChartCard, getLogoImageUrl } from "../utils/helm_charts" +import { renderHelmChartCard, helmChartHeader } from "../utils/helm_charts" import { debounce } from "../utils" export default class extends Controller { @@ -9,10 +9,12 @@ export default class extends Controller { connect() { this.input = this.element.querySelector(`input[name="add_on[metadata][helm_chart][helm_chart.name]"]`) + // disable autocomplete + this.input.setAttribute('autocomplete', 'off') // Create and append dropdown this.dropdown = document.createElement('ul') - this.dropdown.className = 'hidden absolute z-10 w-full mt-1 menu bg-base-100 rounded-box shadow-lg' + this.dropdown.className = 'hidden absolute z-10 w-full mt-1 menu bg-base-200 block rounded-box shadow-lg max-h-[300px] overflow-y-auto' this.element.appendChild(this.dropdown) // Bind search handler with debounce @@ -39,15 +41,8 @@ export default class extends Controller { } this.dropdown.innerHTML = packages.map(pkg => ` -
' : ''}
Please provide your <%= params[:provider].titleize %> credentials to continue.
- <%= link_to "Add Credentials", providers_path, class: "mt-6 btn btn-primary", data: { turbo: false } %> -Please provide your Docker Hub credentials to continue.
+ <%= link_to "Add Credentials", providers_path, class: "mt-6 btn btn-primary", data: { turbo: false } %> +Please provide your Github credentials to continue.
+