Skip to content

Commit

Permalink
Fix status block.
Browse files Browse the repository at this point in the history
  • Loading branch information
ndouglas committed Oct 4, 2023
1 parent 0caf65c commit 37928b8
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 27 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
va_gov_build_trigger.content_release_status_block_controller_get_block:
path: '/admin/content_release_status_block/ajax'
defaults:
_controller: '\Drupal\va_gov_build_trigger\Controller\ContentReleaseStatusBlockController::getBlock'
requirements:
_permission: "va gov deploy content build"

route_callbacks:
- '\Drupal\va_gov_build_trigger\RouteProvider::buildRequestRoutes'
- '\Drupal\va_gov_build_trigger\RouteProvider::notificationRoutes'
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Drupal\va_gov_build_trigger\Controller;
namespace Drupal\va_gov_content_release\Controller;

use Drupal\Core\Block\BlockManagerInterface;
use Drupal\Core\Controller\ControllerBase;
Expand All @@ -9,9 +9,9 @@
use Symfony\Component\HttpFoundation\Response;

/**
* Retrieves the content release status block.
* Retrieves the status block.
*/
class ContentReleaseStatusBlockController extends ControllerBase {
class StatusBlockController extends ControllerBase {

/**
* Drupal\Core\Block\BlockManagerInterface definition.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\State\StateInterface;
use Drupal\Core\Url;
use Drupal\va_gov_build_trigger\Environment\EnvironmentDiscovery;
use Drupal\va_gov_build_trigger\Service\BuildRequester;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
Expand Down Expand Up @@ -159,10 +161,10 @@ public function build() {
],
];

$build['#attached']['library'][] = 'va_gov_build_trigger/content_release_status_block';
$build['#attached']['drupalSettings']['contentReleaseStatusBlock'] = [
$build['#attached']['library'][] = 'va_gov_content_release/status_block';
$build['#attached']['drupalSettings']['contentRelease']['statusBlock'] = [
'blockRefreshPath' => Url::fromRoute(
'va_gov_build_trigger.content_release_status_block_controller_get_block'
'va_gov_content_release.status_block_controller_get_block'
)->toString(),
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ va_gov_content_release.form.simple:
requirements:
_permission: "va gov deploy content build"

va_gov_content_release.status_block_controller_get_block:
path: '/admin/content_release_status_block/ajax'
defaults:
_controller: '\Drupal\va_gov_content_release\Controller\StatusBlockController::getBlock'
requirements:
_permission: "va gov deploy content build"

va_gov_content_release.frontend_version_autocomplete:
path: '/admin/content/deploy/frontend_version_autocomplete/{frontend}/{count}'
defaults:
Expand Down

0 comments on commit 37928b8

Please sign in to comment.