repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/helpers/loggable.rb
app/helpers/loggable.rb
module Loggable extend ActiveSupport::Concern included do has_many :log_outputs, as: :loggable, dependent: :delete_all end def info(line, color: nil) color = LogColorsHelper::FRIENDLY_COLORS[color] output = "\e[#{color}m#{line}\e[0m" Rails.logger.info(line) self.log_outputs.create(output: ...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/helpers/turbo_stream_actions_helper.rb
app/helpers/turbo_stream_actions_helper.rb
module TurboStreamActionsHelper module CustomTurboStreamActions # Add your own custom Turbo StreamAction helpers # These will automatically be made available on the `turbo_stream` helper # Add the matching StreamAction in `app/javascripts/src/turbo_streams.js` # turbo_stream.remove_later("my-id", aft...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/helpers/metrics_helper.rb
app/helpers/metrics_helper.rb
module MetricsHelper def to_data(metrics, key) metrics.map do |m| { created_at: m.created_at, value: m.metadata[key].to_f } end end def sample_metrics_across_timerange(metrics, start_time, end_time, sample_size = 1000) # Get all metrics within the time range base_query...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/helpers/dot_settable.rb
app/helpers/dot_settable.rb
module DotSettable def dotset(path, value) keys = path.split(".") last_key = keys.pop nested_hash = keys.inject(self) { |current_hash, key| current_hash[key] ||= {} } nested_hash[last_key] = value end end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/helpers/services_helper.rb
app/helpers/services_helper.rb
module ServicesHelper def services_layout(service, tab, &block) render layout: 'projects/services/layout', locals: { service:, tab: }, &block end end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/helpers/settings_helper.rb
app/helpers/settings_helper.rb
module SettingsHelper def settings_layout(&block) render layout: 'settings/layout', &block end end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
module ProjectsHelper def project_layout(project, &block) render layout: 'projects/layout', locals: { project: }, &block end end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/helpers/namespace_metrics_helper.rb
app/helpers/namespace_metrics_helper.rb
module NamespaceMetricsHelper extend ActiveSupport::Concern include MetricsHelper def configure(nameable) connection = K8::Connection.new(nameable.cluster, current_user) @pods = K8::Metrics::Api::Pod.fetch(connection, nameable.name) @time_range = params[:time_range] || "2h" start_time = parse_tim...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/helpers/storage_helper.rb
app/helpers/storage_helper.rb
module StorageHelper SIZE_UNITS = { 'K' => 1024, 'M' => 1024**2, 'G' => 1024**3, 'T' => 1024**4 } def integer_to_compute(integer) integer.to_s + 'm' end def compute_to_integer(compute) if compute.end_with?("m") compute = compute.strip.gsub(/m$/, '') compute.to_i else ...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/helpers/announcements_helper.rb
app/helpers/announcements_helper.rb
module AnnouncementsHelper def unread_announcements(user) last_announcement = Announcement.order(published_at: :desc).first return if last_announcement.nil? # Highlight announcements for anyone not logged in, cuz tempting if user.nil? || user.announcements_last_read_at.nil? || user.announcements_last...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/helpers/application_helper.rb
app/helpers/application_helper.rb
module ApplicationHelper include Pagy::Frontend def custom_pagy_nav(pagy) html = '<div class="flex items-center gap-2">' html << pagy_nav_prev(pagy) if pagy.prev pagy.series.each do |item| if item.to_s == pagy.page.to_s html << link_to(item, url_for(page: item), class: "btn btn-sm btn-neu...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/helpers/eventable.rb
app/helpers/eventable.rb
module Eventable extend ActiveSupport::Concern included do attr_accessor :current_user has_many :events, as: :eventable, dependent: :destroy after_create :create_event end def create_event events.create!( user: current_user, event_action: id_changed? ? :create : :update, proj...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/helpers/avatar_helper.rb
app/helpers/avatar_helper.rb
module AvatarHelper def avatar_path(object, options = {}) size = options[:size] || 180 default_image = options[:default] || "mp" base_url = "https://secure.gravatar.com/avatar" base_url_params = "?s=#{size}&d=#{default_image}" if object.respond_to?(:avatar) && object.avatar.attached? && object.a...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/helpers/log_colors_helper.rb
app/helpers/log_colors_helper.rb
module LogColorsHelper ANSI_TO_TAILWIND = { "0" => "text-gray-300", # Reset or default "1" => "font-bold", # Bold "2" => "text-gray-500", # Dim "31" => "text-red-400", # Red (lighter for dark background) "32" => "text-green-400", # Green (lighter) "33" => "text-yellow-300", # Yello...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/helpers/clusters_helper.rb
app/helpers/clusters_helper.rb
module ClustersHelper def cluster_layout(cluster, &block) render layout: 'clusters/layout', locals: { cluster: }, &block end def cluster_icon(cluster, classes: "") icon = cluster.k3s? ? "devicon:k3s" : "devicon:kubernetes" tag.iconify_icon(icon:, class: classes) end end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/avo/config.rb
app/avo/config.rb
class Avo::Config def self.button_css "button-component inline-flex flex-grow-0 items-center font-semibold leading-6 fill-current whitespace-nowrap transition duration-100 transform transition duration-100 cursor-pointer disabled:cursor-not-allowed disabled:opacity-60 data-[disabled='true']:opacity-60 justify-cen...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/avo/resource_tools/user.rb
app/avo/resource_tools/user.rb
class Avo::ResourceTools::User < Avo::BaseResourceTool self.name = "User Tool" # self.partial = "avo/resource_tools/post_info" end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/avo/resources/project_fork.rb
app/avo/resources/project_fork.rb
class Avo::Resources::ProjectFork < Avo::BaseResource # self.includes = [] # self.attachments = [] # self.search = { # query: -> { query.ransack(id_eq: params[:q], m: "or").result(distinct: false) } # } def fields field :id, as: :id field :new_project, as: :belongs_to field :base_project, as:...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/avo/resources/build_configuration.rb
app/avo/resources/build_configuration.rb
class Avo::Resources::BuildConfiguration < Avo::BaseResource # self.includes = [] # self.attachments = [] # self.search = { # query: -> { query.ransack(id_eq: q, m: "or").result(distinct: false) } # } def fields field :id, as: :id field :project, as: :belongs_to field :driver, as: :number ...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/avo/resources/account_user.rb
app/avo/resources/account_user.rb
class Avo::Resources::AccountUser < Avo::BaseResource # self.includes = [] # self.attachments = [] # self.search = { # query: -> { query.ransack(id_eq: params[:q], m: "or").result(distinct: false) } # } def fields field :id, as: :id field :user, as: :belongs_to field :account, as: :belongs_to...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/avo/resources/add_on.rb
app/avo/resources/add_on.rb
class Avo::Resources::AddOn < Avo::BaseResource # self.includes = [] # self.attachments = [] # self.search = { # query: -> { query.ransack(id_eq: params[:q], m: "or").result(distinct: false) } # } def fields field :id, as: :id field :name, as: :text field :cluster, as: :belongs_to field :...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/avo/resources/cluster.rb
app/avo/resources/cluster.rb
class Avo::Resources::Cluster < Avo::BaseResource # self.includes = [] # self.attachments = [] # self.search = { # query: -> { query.ransack(id_eq: params[:q], m: "or").result(distinct: false) } # } def fields field :id, as: :id field :name, as: :text field :status, as: :select, options: Clus...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/avo/resources/project.rb
app/avo/resources/project.rb
class Avo::Resources::Project < Avo::BaseResource def fields field :id, as: :id # Generated fields from model field :name, as: :text field :repository_url, as: :text field :branch, as: :text field :status, as: :select, options: Project.statuses.keys.map { |status| [ status.humanize, status ] }...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/avo/resources/team_resource.rb
app/avo/resources/team_resource.rb
class Avo::Resources::TeamResource < Avo::BaseResource # self.includes = [] # self.attachments = [] # self.search = { # query: -> { query.ransack(id_eq: q, m: "or").result(distinct: false) } # } def fields field :id, as: :id field :team, as: :belongs_to field :resourceable, as: :text end en...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/avo/resources/saml_configuration.rb
app/avo/resources/saml_configuration.rb
class Avo::Resources::SAMLConfiguration < Avo::BaseResource self.includes = [] def fields field :id, as: :id field :idp_entity_id, as: :text, required: true, help: "Identity Provider's entity ID (issuer)" field :idp_sso_service_url, as: :text, required: true, help: "Identity Provider's Single Sign-On s...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/avo/resources/build.rb
app/avo/resources/build.rb
class Avo::Resources::Build < Avo::BaseResource # self.includes = [] # self.attachments = [] # self.search = { # query: -> { query.ransack(id_eq: params[:q], m: "or").result(distinct: false) } # } def fields field :id, as: :id field :project, as: :belongs_to field :status, as: :select, enum: ...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/avo/resources/account.rb
app/avo/resources/account.rb
class Avo::Resources::Account < Avo::BaseResource # self.includes = [] # self.attachments = [] # self.search = { # query: -> { query.ransack(id_eq: params[:q], m: "or").result(distinct: false) } # } def fields field :id, as: :id field :name, as: :text field :owner, as: :belongs_to field :...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/avo/resources/sso_provider.rb
app/avo/resources/sso_provider.rb
class Avo::Resources::SSOProvider < Avo::BaseResource # self.includes = [] # self.attachments = [] # self.search = { # query: -> { query.ransack(id_eq: q, m: "or").result(distinct: false) } # } def fields field :id, as: :id field :account, as: :belongs_to field :configuration, as: :text f...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/avo/resources/domain.rb
app/avo/resources/domain.rb
class Avo::Resources::Domain < Avo::BaseResource def fields field :id, as: :id # Generated fields from model field :domain_name, as: :text field :status, as: :select, options: Domain.statuses.keys.map { |status| [ status.humanize, status ] } field :status_reason, as: :text field :service, as: ...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/avo/resources/favorite.rb
app/avo/resources/favorite.rb
class Avo::Resources::Favorite < Avo::BaseResource # self.includes = [] # self.attachments = [] # self.search = { # query: -> { query.ransack(id_eq: q, m: "or").result(distinct: false) } # } def fields field :id, as: :id field :user, as: :belongs_to field :account, as: :belongs_to field :...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/avo/resources/ldap_configuration.rb
app/avo/resources/ldap_configuration.rb
class Avo::Resources::LDAPConfiguration < Avo::BaseResource self.includes = [] def fields field :id, as: :id field :host, as: :text, required: true, help: "LDAP server hostname (e.g., ldap.example.com)" field :port, as: :number, required: true, help: "LDAP server port (default: 389 for plain/STARTTLS, ...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/avo/resources/team_membership.rb
app/avo/resources/team_membership.rb
class Avo::Resources::TeamMembership < Avo::BaseResource # self.includes = [] # self.attachments = [] # self.search = { # query: -> { query.ransack(id_eq: q, m: "or").result(distinct: false) } # } def fields field :id, as: :id field :user, as: :belongs_to field :team, as: :belongs_to end en...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/avo/resources/team.rb
app/avo/resources/team.rb
class Avo::Resources::Team < Avo::BaseResource # self.includes = [] # self.attachments = [] # self.search = { # query: -> { query.ransack(id_eq: q, m: "or").result(distinct: false) } # } def fields field :id, as: :id field :name, as: :text field :account, as: :belongs_to end end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/avo/resources/service.rb
app/avo/resources/service.rb
class Avo::Resources::Service < Avo::BaseResource # self.includes = [] # self.attachments = [] # self.search = { # query: -> { query.ransack(id_eq: params[:q], m: "or").result(distinct: false) } # } def fields field :id, as: :id field :service_type, as: :select, enum: ::Service.service_types ...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/avo/resources/build_pack.rb
app/avo/resources/build_pack.rb
class Avo::Resources::BuildPack < Avo::BaseResource # self.includes = [] # self.attachments = [] # self.search = { # query: -> { query.ransack(id_eq: q, m: "or").result(distinct: false) } # } def fields field :id, as: :id field :build_configuration, as: :belongs_to field :namespace, as: :text...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/avo/resources/deployment.rb
app/avo/resources/deployment.rb
class Avo::Resources::Deployment < Avo::BaseResource def fields field :id, as: :id # Generated fields from model field :status, as: :select, options: Deployment.statuses.keys.map { |status| [ status.humanize, status ] } field :created_at, as: :date_time field :updated_at, as: :date_time field ...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/avo/resources/build_cloud.rb
app/avo/resources/build_cloud.rb
class Avo::Resources::BuildCloud < Avo::BaseResource # self.includes = [] # self.attachments = [] # self.search = { # query: -> { query.ransack(id_eq: q, m: "or").result(distinct: false) } # } def fields field :id, as: :id field :cluster, as: :belongs_to field :namespace, as: :text field ...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/avo/resources/oidc_configuration.rb
app/avo/resources/oidc_configuration.rb
class Avo::Resources::OIDCConfiguration < Avo::BaseResource self.includes = [] def fields field :id, as: :id field :issuer, as: :text, required: true, help: "OIDC provider issuer URL (e.g., https://auth.example.com)" field :client_id, as: :text, required: true, help: "OAuth 2.0 client ID" field :cl...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/avo/resources/user.rb
app/avo/resources/user.rb
class Avo::Resources::User < Avo::BaseResource # self.includes = [] # self.attachments = [] # self.search = { # query: -> { query.ransack(id_eq: params[:q], m: "or").result(distinct: false) } # } def fields tool Avo::ResourceTools::User, show_on: :index field :id, as: :id field :email, as: :...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/policies/account_user_policy.rb
app/policies/account_user_policy.rb
# frozen_string_literal: true class AccountUserPolicy < ApplicationPolicy def update? return false if record.owner? user.admin_or_owner? end def destroy? return false if record.owner? user.admin_or_owner? end end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/policies/application_policy.rb
app/policies/application_policy.rb
# frozen_string_literal: true class ApplicationPolicy attr_reader :user, :record def initialize(user, record) @user = user @record = record end def index? false end def show? false end def create? false end def new? create? end def update? false end def ed...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/policies/account_policy.rb
app/policies/account_policy.rb
# frozen_string_literal: true class AccountPolicy < ApplicationPolicy def index? user.present? end def new? create? end def edit? update? end def show? user.present? end def create? user&.admin_or_owner? end def update? user&.admin_or_owner? end def destroy? ...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/build_packs_controller.rb
app/controllers/build_packs_controller.rb
class BuildPacksController < ApplicationController def search result = Buildpacks::Search.execute(query: params[:q]) if result.success? render json: result.results else render json: { error: "Failed to search buildpacks" }, status: :unprocessable_entity end end def details result ...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/clusters_controller.rb
app/controllers/clusters_controller.rb
class ClustersController < ApplicationController before_action :set_cluster, only: [ :show, :edit, :update, :destroy, :test_connection, :download_kubeconfig, :logs, :download_yaml, :retry_install, :transfer_ownership ] def index sortable_column = params[:sort] || "created_at" clusters = Clust...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/home_controller.rb
app/controllers/home_controller.rb
class HomeController < ApplicationController end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/static_controller.rb
app/controllers/static_controller.rb
class StaticController < ApplicationController INSTALL_SCRIPT = "curl -sSL https://raw.githubusercontent.com/CanineHQ/canine/refs/heads/main/install/install.sh | bash" skip_before_action :authenticate_user! ILLUSTRATIONS = [ { src: "/images/illustrations/design_2.webp", title: "You enjoy vendor lo...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/notifications_controller.rb
app/controllers/notifications_controller.rb
class NotificationsController < ApplicationController before_action :authenticate_user! def index @notifications = current_user.notifications.includes(:event) end end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
class ProjectsController < ApplicationController include ProjectsHelper before_action :set_project, only: %i[show edit update destroy restart] before_action :set_provider_type, only: %i[new create] def index sortable_column = params[:sort] || "created_at" projects = Projects::List.call(account_user: cu...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/favorites_controller.rb
app/controllers/favorites_controller.rb
# frozen_string_literal: true class FavoritesController < ApplicationController include ActionView::RecordIdentifier def toggle @favoriteable = find_favoriteable result = Favorites::Toggle.execute( user: current_user, account: current_account, favoriteable: @favoriteable ) respo...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/announcements_controller.rb
app/controllers/announcements_controller.rb
class AnnouncementsController < ApplicationController before_action :mark_as_read, if: :user_signed_in? def index @announcements = Announcement.order(published_at: :desc) end private def mark_as_read current_user.update(announcements_last_read_at: Time.zone.now) end end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/api_tokens_controller.rb
app/controllers/api_tokens_controller.rb
class ApiTokensController < ApplicationController def new @api_token = ApiToken.new(user: current_user) end def create if ApiToken.create(api_token_params.merge(user: current_user)) redirect_to api_tokens_path, notice: "API token saved" else render "new", status: :unprocessable_entity ...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/add_ons_controller.rb
app/controllers/add_ons_controller.rb
class AddOnsController < ApplicationController include StorageHelper before_action :set_add_on, only: [ :show, :edit, :update, :destroy, :restart, :download_values ] # GET /add_ons def index add_ons = AddOns::List.call(account_user: current_account_user, params: params).add_ons @pagy, @add_ons = pagy(a...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/providers_controller.rb
app/controllers/providers_controller.rb
class ProvidersController < ApplicationController def index end def new @provider = Provider.new end def create @provider = Provider.new(provider_params.merge(user: current_user)) result = Providers::Create.call(@provider) if result.success? redirect_to providers_path, notice: "#{@prov...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/async_renderer_controller.rb
app/controllers/async_renderer_controller.rb
class AsyncRendererController < ApplicationController def async_render renderer = "Async::#{params[:view_model]}ViewModel".constantize view_model = renderer.new(current_user, params) html = view_model.async_render rescue => e puts e.message html = view_model.render_error ensure render inli...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/application_controller.rb
app/controllers/application_controller.rb
class ApplicationController < ActionController::Base include ActionView::Helpers::DateHelper impersonates :user include Pundit::Authorization include Pagy::Backend protect_from_forgery with: :exception before_action :configure_permitted_parameters, if: :devise_controller? before_action :authenticate_use...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/accounts_controller.rb
app/controllers/accounts_controller.rb
class AccountsController < ApplicationController def switch @account = current_user.accounts.friendly.find(params[:id]) session[:account_id] = @account.id redirect_to root_path end def show end def create account = Account.create!( name: account_params[:name], owner: current_user...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/search_controller.rb
app/controllers/search_controller.rb
class SearchController < ApplicationController def index @result = GlobalSearch::Search.execute(account_user: current_account_user, query: params[:q], limit: 5) @query = params[:q].to_s.strip end end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/add_ons/metrics_controller.rb
app/controllers/add_ons/metrics_controller.rb
class AddOns::MetricsController < AddOns::BaseController include NamespaceMetricsHelper before_action :set_add_on def show @time_range = params[:time_range] || "2h" start_time = parse_time_range(@time_range) end_time = Time.now @metrics = sample_metrics_across_timerange( @add_on.cluster.met...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/add_ons/processes_controller.rb
app/controllers/add_ons/processes_controller.rb
class AddOns::ProcessesController < AddOns::BaseController include LogColorsHelper def index;end def show client = K8::Client.new(active_connection) @pod_events = client.get_pod_events(params[:id], @add_on.name) @logs = client.get_pod_log(params[:id], @add_on.name) rescue Kubeclient::HttpError => ...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/add_ons/endpoints_controller.rb
app/controllers/add_ons/endpoints_controller.rb
class AddOns::EndpointsController < AddOns::BaseController before_action :set_add_on def edit @ip_address = Networks::CheckDns.infer_public_ip_from_cluster(active_connection) endpoints = @service.get_endpoints @endpoint = endpoints.find { |endpoint| endpoint.metadata.name == params[:id] } end def ...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/add_ons/base_controller.rb
app/controllers/add_ons/base_controller.rb
class AddOns::BaseController < ApplicationController before_action :set_add_on def set_service if @add_on.chart_type == "redis" @service = K8::Helm::Redis.new(active_connection) elsif @add_on.chart_type == "postgresql" @service = K8::Helm::Postgresql.new(active_connection) else @servi...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/integrations/github/repositories_controller.rb
app/controllers/integrations/github/repositories_controller.rb
class Integrations::Github::RepositoriesController < ApplicationController def index provider = current_account.github_provider client = Git::Github::Client.build_client( access_token: provider.access_token, api_base_url: provider.api_base_url ) if params[:q].present? client.auto_pag...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/avo/team_resources_controller.rb
app/controllers/avo/team_resources_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/3.0/controllers.html class Avo::TeamResourcesController < Avo::ResourcesController end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/avo/build_packs_controller.rb
app/controllers/avo/build_packs_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/3.0/controllers.html class Avo::BuildPacksController < Avo::ResourcesController end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/avo/project_forks_controller.rb
app/controllers/avo/project_forks_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/3.0/controllers.html class Avo::ProjectForksController < Avo::ResourcesController end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/avo/account_users_controller.rb
app/controllers/avo/account_users_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/3.0/controllers.html class Avo::AccountUsersController < Avo::ResourcesController end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/avo/clusters_controller.rb
app/controllers/avo/clusters_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/3.0/controllers.html class Avo::ClustersController < Avo::ResourcesController end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/avo/builds_controller.rb
app/controllers/avo/builds_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/3.0/controllers.html class Avo::BuildsController < Avo::ResourcesController end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/avo/domains_controller.rb
app/controllers/avo/domains_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/3.0/controllers.html class Avo::DomainsController < Avo::ResourcesController end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/avo/deployments_controller.rb
app/controllers/avo/deployments_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/3.0/controllers.html class Avo::DeploymentsController < Avo::ResourcesController end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/avo/build_clouds_controller.rb
app/controllers/avo/build_clouds_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/3.0/controllers.html class Avo::BuildCloudsController < Avo::ResourcesController end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/avo/projects_controller.rb
app/controllers/avo/projects_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/3.0/controllers.html class Avo::ProjectsController < Avo::ResourcesController end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/avo/favorites_controller.rb
app/controllers/avo/favorites_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/3.0/controllers.html class Avo::FavoritesController < Avo::ResourcesController end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/avo/team_memberships_controller.rb
app/controllers/avo/team_memberships_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/3.0/controllers.html class Avo::TeamMembershipsController < Avo::ResourcesController end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/avo/tools_controller.rb
app/controllers/avo/tools_controller.rb
class Avo::ToolsController < Avo::ApplicationController def dashboard @page_title = "Dashboard" add_breadcrumb "Dashboard" end def login_as user = User.find(params[:id]) sign_in(user) redirect_to root_path end end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/avo/users_controller.rb
app/controllers/avo/users_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/3.0/controllers.html class Avo::UsersController < Avo::ResourcesController end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/avo/oidc_configurations_controller.rb
app/controllers/avo/oidc_configurations_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/3.0/controllers.html class Avo::OIDCConfigurationsController < Avo::ResourcesController end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/avo/build_configurations_controller.rb
app/controllers/avo/build_configurations_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/3.0/controllers.html class Avo::BuildConfigurationsController < Avo::ResourcesController end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/avo/add_ons_controller.rb
app/controllers/avo/add_ons_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/3.0/controllers.html class Avo::AddOnsController < Avo::ResourcesController end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/avo/teams_controller.rb
app/controllers/avo/teams_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/3.0/controllers.html class Avo::TeamsController < Avo::ResourcesController end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/avo/services_controller.rb
app/controllers/avo/services_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/3.0/controllers.html class Avo::ServicesController < Avo::ResourcesController end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/avo/sso_providers_controller.rb
app/controllers/avo/sso_providers_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/3.0/controllers.html class Avo::SSOProvidersController < Avo::ResourcesController end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/avo/ldap_configurations_controller.rb
app/controllers/avo/ldap_configurations_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/3.0/controllers.html class Avo::LDAPConfigurationsController < Avo::ResourcesController end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/avo/accounts_controller.rb
app/controllers/avo/accounts_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/3.0/controllers.html class Avo::AccountsController < Avo::ResourcesController end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/clusters/build_clouds_controller.rb
app/controllers/clusters/build_clouds_controller.rb
class Clusters::BuildCloudsController < Clusters::BaseController include StorageHelper def show @build_cloud = @cluster.build_cloud if @build_cloud.blank? redirect_to edit_cluster_path(@cluster), alert: "No build cloud found for this cluster" return end render partial: "clusters/build...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/clusters/metrics_controller.rb
app/controllers/clusters/metrics_controller.rb
class Clusters::MetricsController < Clusters::BaseController include MetricsHelper include StorageHelper before_action :set_cluster def show @time_range = params[:time_range] || "2h" start_time = parse_time_range(@time_range) end_time = Time.now # Get sampled metrics across the time range ...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/clusters/base_controller.rb
app/controllers/clusters/base_controller.rb
class Clusters::BaseController < ApplicationController before_action :set_cluster def active_connection @_active_connection ||= K8::Connection.new(@cluster, current_user) end helper_method :active_connection private def set_cluster @cluster = Cluster.find(params[:cluster_id]) end end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/inbound_webhooks/github_controller.rb
app/controllers/inbound_webhooks/github_controller.rb
module InboundWebhooks class GithubController < ApplicationController before_action :verify_event def create # Save webhook to database record = InboundWebhook.create(body: payload) # Queue webhook for processing InboundWebhooks::GithubJob.perform_later(record, current_user:) ...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/inbound_webhooks/gitlab_controller.rb
app/controllers/inbound_webhooks/gitlab_controller.rb
module InboundWebhooks class GitlabController < ApplicationController before_action :verify_event def create # Save webhook to database record = InboundWebhook.create(body: payload) # Queue webhook for processing InboundWebhooks::GitlabJob.perform_later(record, current_user:) ...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/inbound_webhooks/application_controller.rb
app/controllers/inbound_webhooks/application_controller.rb
module InboundWebhooks class ApplicationController < ActionController::API private # Returns the payload for the webhook as a String # # Some services use multipart/form-data to encapsulate their JSON payload # For multipart/form-data we will let Rails parse and then dump the params as JSON d...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/api/v1/clusters_controller.rb
app/controllers/api/v1/clusters_controller.rb
module Api module V1 class ClustersController < BaseController before_action :set_cluster, only: %i[download_kubeconfig] def index @clusters = ::Clusters::VisibleToUser.execute(account_user: current_account_user).clusters.order(:name).limit(50) end def download_kubeconfig ...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/api/v1/builds_controller.rb
app/controllers/api/v1/builds_controller.rb
module Api module V1 class BuildsController < BaseController before_action :set_build, only: %i[show kill] def index @builds = accessible_builds .where(status: :in_progress) .or(accessible_builds.where(created_at: 24.hours.ago..)) .order(created_at: :desc) ...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/api/v1/projects_controller.rb
app/controllers/api/v1/projects_controller.rb
module Api module V1 class ProjectsController < BaseController before_action :set_project, only: %i[show deploy restart] def index @projects = ::Projects::VisibleToUser.execute(account_user: current_account_user).projects.order(:name).limit(50) end def show end def d...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/api/v1/base_controller.rb
app/controllers/api/v1/base_controller.rb
module Api module V1 class BaseController < ActionController::API include Pundit::Authorization helper_method :current_user, :current_account, :current_account_user before_action :authenticate_with_api_token! rescue_from ActiveRecord::RecordNotFound, with: :not_found rescue_from P...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/api/v1/me_controller.rb
app/controllers/api/v1/me_controller.rb
module Api module V1 class MeController < BaseController def show end end end end
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/api/v1/projects/processes_controller.rb
app/controllers/api/v1/projects/processes_controller.rb
module Api module V1 module Projects class ProcessesController < BaseController before_action :set_project def index client = K8::Client.new(active_connection) @pods = client.get_pods(namespace: @project.namespace).sort_by { |pod| pod.metadata.name }.first(50) en...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/providers/portainer_tokens_controller.rb
app/controllers/providers/portainer_tokens_controller.rb
module Providers class PortainerTokensController < ApplicationController before_action :authenticate_user! before_action :require_stack_manager def update token = params[:portainer_token] if token.blank? redirect_to providers_path, alert: "Please provide a Portainer API token" ...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/accounts/account_users_controller.rb
app/controllers/accounts/account_users_controller.rb
class Accounts::AccountUsersController < ApplicationController include SettingsHelper def create user = User.find_or_initialize_by(email: user_params[:email]) do |user| user.first_name = user_params[:email].split("@").first user.password = Devise.friendly_token[0, 20] user.save! end Ac...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/accounts/saml_controller.rb
app/controllers/accounts/saml_controller.rb
module Accounts class SAMLController < ApplicationController skip_before_action :authenticate_user! before_action :load_account def authorize saml_configuration = @account.sso_provider&.configuration unless saml_configuration.is_a?(SAMLConfiguration) redirect_to account_sign_in_path(@...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false
CanineHQ/canine
https://github.com/CanineHQ/canine/blob/f5c94561cbc487892b393a3aa57409beeea96c62/app/controllers/accounts/stack_managers_controller.rb
app/controllers/accounts/stack_managers_controller.rb
module Accounts class StackManagersController < ApplicationController before_action :authenticate_user! before_action :authorize_account, except: [ :verify_url, :check_reachable ] before_action :set_stack_manager, only: [ :show, :edit, :update, :destroy, :sync_clusters, :sync_registries ] skip_before_...
ruby
Apache-2.0
f5c94561cbc487892b393a3aa57409beeea96c62
2026-01-04T15:53:12.976830Z
false