Commit 12662cf2 authored by xiaohua guan's avatar xiaohua guan Committed by Yas Naoi
Browse files

Issue #3285849 by Xiaohua Guan, yas: Manage Cloud Orchestrator deployment (Add site list view)

parent 2b2e7595
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -436,3 +436,21 @@ function cloud_cluster_update_9016(): void {
  ];
  \Drupal::service('cloud')->updateYmlDefinitions($files, 'cloud_cluster');
}

/**
 * Add entity type cloud_cluster_site and view cloud_cluster_site.
 */
function cloud_cluster_update_9017(): void {
  // Add entity type k8s_cluster_role.
  $definition_update_manager = \Drupal::entityDefinitionUpdateManager();
  $entity_type = \Drupal::entityTypeManager()->getDefinition('cloud_cluster_site');
  if (!empty($entity_type)) {
    $definition_update_manager->uninstallEntityType($entity_type);
    $definition_update_manager->installEntityType($entity_type);
  }
  // Add view cloud_cluster_site.
  $files = [
    'views.view.cloud_cluster_site.yml',
  ];
  \Drupal::service('cloud')->updateYmlDefinitions($files, 'cloud_cluster');
}
+24 −0
Original line number Diff line number Diff line
@@ -22,3 +22,27 @@ cloud_cluster.local_tasks.worker.cloud_config:
  route_name: 'cloud_cluster.view.cloud_config.list'
  base_route: 'entity.cloud_cluster_worker.canonical'
  weight: 20

cloud_cluster.local_tasks.worker:
  title: 'Workers'
  route_name: 'view.cloud_cluster_worker.list'
  base_route: 'cloud_cluster.local_tasks.cloud_context'
  weight: 10

# cloud_cluster.local_tasks.worker.all:
#   title: 'Workers'
#   route_name: 'view.cloud_cluster_worker.all'
#   base_route: 'cloud_cluster.local_tasks.all_resources'
#   weight: 10

cloud_cluster.local_tasks.site:
  title: 'Sites'
  route_name: 'view.cloud_cluster_site.list'
  base_route: 'cloud_cluster.local_tasks.cloud_context'
  weight: 20

# cloud_cluster.local_tasks.site.all:
#   title: 'Sites'
#   route_name: 'view.cloud_cluster_site.all'
#   base_route: 'cloud_cluster.local_tasks.all_resources'
#   weight: 20
+6 −0
Original line number Diff line number Diff line
@@ -671,6 +671,12 @@ function cloud_cluster_form_cloud_launch_template_cloud_cluster_launch_form_alte
    }
  }

  $form['site_name'] = [
    '#type' => 'textfield',
    '#title' => t('Name'),
    '#required' => TRUE,
  ];

  $form['cloud_service_provider'] = [
    '#type' => 'details',
    '#title' => t('Deployment provider'),
+13 −0
Original line number Diff line number Diff line
@@ -17,3 +17,16 @@ view cloud cluster worker:
delete cloud cluster worker:
  title: 'Delete Cloud Orchestrator Worker'
  description: 'Allow users to delete any Cloud Orchestrator Worker.'

############################
# Cloud Orchestrator (Cloud Cluster) Site
############################
list cloud cluster site:
  title: 'List Cloud Orchestrator Site'
  description: 'Allow users to list Cloud Orchestrator Site.'
view cloud cluster site:
  title: 'View Cloud Orchestrator Site'
  description: 'Allow users to view Cloud Orchestrator Site.'
delete cloud cluster site:
  title: 'Delete Cloud Orchestrator Site'
  description: 'Allow users to delete any Cloud Orchestrator Site.'
+1193 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading