1. 01 Nov, 2018 5 commits
    • Thong Kuah's avatar
      Resolve controller sharing concern · 1a1fdf8e
      Thong Kuah authored
      Use ClustersController as base while having Projects::ClustersController
      to inform what `clusterable` is. Thanks @ayufan for the great suggestion
      - View changes to work with new approach
      - Fix javascript for new approach
      - Fix feature specs for new approach
      - Fix QA
    • Thong Kuah's avatar
      Restore 403 functionality for external auth (EE) · 28dabc67
      Thong Kuah authored
      When we unhooked ClustersController from
      Project::ApplicationsController, we missed an EE override to
      Rather than carry on with override RoutingActions, make a specific proc
      for Project that we override in EE instead. Use that proc in both
      Clusters::BaseController and Project::ApplicationsController.
    • Thong Kuah's avatar
      Move view and path concerns to presenters · 1163b235
      Thong Kuah authored
      - Move show path for cluster to ClusterPresenter
      - Create ClusterablePresenter to encapsulate logic. Consolidates
      scattered methods from BaseController and ClustersHelper into an object.
    • Thong Kuah's avatar
      Abstract out project out of ClustersController · 88800abc
      Thong Kuah authored
      To the extent possible swap out `project` with `clusterable`
      - Abstract paths for showing cluster or clusters. This will allow us to
      swap in alternative paths for group level cluster
      - Push :project_id and :namespace_id params from the URL to the POST
      - Create a nice helper for to generate links for the destroy
      For some reason, spec :project_id and :namespace_id param are not going
      through `to_param` for a JSON format. Manually call `to_param` to fix
      - Move :layout to BaseController
    • Thong Kuah's avatar
      Convert clusters to use a top-level controller · 5b3c096c
      Thong Kuah authored
      In preparation so that we can create both cluster attached to project
      and cluster attached to group.
      - Move ClustersController to top level
      - Move Clusters::ApplicationsController to top-level too
      - Creates a Clusters::BaseController to share common functions
      - Do not rely on @Project ivar. Anything could set the ivar.
      - Fix Vue page components due to new data-page value
      Because of the controller change we have gone from
      `projects:clusters:new` to `clusters:new`, so we need to update the file
      location of the page components. There is somewhere a function that will
      convert data-page to a file location.
      On that note, projects/clusters/gcp/new/, translate to
      Projects::Clusters::Gcp#new doesn't exist so replace that with
      clusters/create_gcp/ and clusters/create_user/
  2. 30 Oct, 2018 5 commits
  3. 29 Oct, 2018 30 commits