This repository has been archived on 2020-10-16. You can view files and clone it, but cannot push or open issues or pull requests.
2020-05-22 18:41:22 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
# This is the landing for a specific tally cluster
|
|
|
|
class ClusterController < ApplicationController
|
|
|
|
before_action :only_for_unknown
|
2020-05-23 06:23:37 +00:00
|
|
|
def show
|
|
|
|
@clusters = Cluster.list
|
|
|
|
end
|
2020-05-22 18:41:22 +00:00
|
|
|
|
|
|
|
def create
|
2020-05-23 06:23:37 +00:00
|
|
|
cluster = Cluster.new(params[:cluster])
|
2020-05-23 10:23:20 +00:00
|
|
|
session[:cluster_uuid] = cluster.uuid
|
2020-05-22 18:41:22 +00:00
|
|
|
redirect_to root_path
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def only_for_unknown
|
2020-05-23 06:23:37 +00:00
|
|
|
redirect_to root_path if valid_cluster?
|
2020-05-22 18:41:22 +00:00
|
|
|
end
|
|
|
|
end
|