Skip to content

Commit

Permalink
Repair errors after rebase with develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaky212 committed Jan 23, 2023
1 parent 8ee358d commit 63891df
Show file tree
Hide file tree
Showing 12 changed files with 158 additions and 334 deletions.
264 changes: 84 additions & 180 deletions assets/attributes.json

Large diffs are not rendered by default.

36 changes: 4 additions & 32 deletions assets/scss/components/connection_request.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

.button-small {
position: relative;
top: auto;
float: right;
padding: 5px 10px;
top: 1.5rem;
}
th.text {
width: 32%;
Expand Down Expand Up @@ -37,11 +36,9 @@
border-radius: 3px;
color: $black;
}

button[type="submit"]:disabled {
border: 1px solid darken($medium-grey, 5%);
background-color: $light-grey;
cursor: not-allowed;
.button-small {
padding: 5px 10px;
top: 1.5rem;
}

button[type="submit"]:disabled {
Expand All @@ -51,31 +48,6 @@
}
}

.line {
border-top: 2px solid #00829b;
padding-top: 5px;
}

.connection-request {
display: flex;
gap: 1.0rem;
}

.line {
border-top: 2px solid #00829b;
padding-top: 5px;
}

.connection-request {
display: flex;
gap: 1.0rem;
}

.line {
border-top: 2px solid #00829b;
padding-top: 5px;
}

.connection-request {
display: flex;
gap: 1.0rem;
Expand Down
74 changes: 34 additions & 40 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
"description": "Dashboard application for SURFconext Service Providers",
"license": "Apache-2.0",
"type": "project",
"autoload": {
"psr-4": {
"Surfnet\\": "src/Surfnet"
},
"classmap": [
"src/Surfnet/ServiceProviderDashboard/Kernel.php"
]
},
"autoload-dev": {
"psr-4": {
"Surfnet\\": "src\\Surfnet",
"Surfnet\\ServiceProviderDashboard\\Webtests\\": "tests/webtests"
}
},
"require": {
"php": "8.1.*",
"ext-ctype": "*",
Expand All @@ -18,6 +32,7 @@
"doctrine/doctrine-migrations-bundle": "^3.2",
"doctrine/orm": "^2.7",
"guzzlehttp/guzzle": "^7.5.0",
"jeremykendall/php-domain-parser": "~1.3.1",
"knplabs/knp-menu-bundle": "^3.0.0",
"league/tactician-bundle": "^1.1.17",
"lesstif/php-jira-rest-client": "^5.2",
Expand Down Expand Up @@ -53,59 +68,31 @@
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.4",
"malukenho/docheader": "^0.1.6",
"mockery/mockery": "^1.5.1",
"php-parallel-lint/php-parallel-lint": "^1.3",
"malukenho/docheader": "^0.1.6",
"mockery/mockery": "^1.2",
"phpmd/phpmd": "^2.13",
"phpunit/phpcov": "~8.2.1",
"phpunit/phpunit": "~9.5.26",
"sebastian/phpcpd": "^6.0.3",
"squizlabs/php_codesniffer": "^2.8",
"squizlabs/php_codesniffer": "^3.7",
"symfony/css-selector": "5.4.*",
"symfony/phpunit-bridge": "5.4.*",
"symfony/stopwatch": "5.4.*",
"symfony/web-profiler-bundle": "5.4.*"
},
"config": {
"allow-plugins": {
"composer/package-versions-deprecated": true,
"symfony/flex": true
},
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"Surfnet\\ServiceProviderDashboard\\": "src/Surfnet/ServiceProviderDashboard"
}
},
"autoload-dev": {
"psr-4": {
"Surfnet\\ServiceProviderDashboard\\": "src/Surfnet/ServiceProviderDashboard",
"Surfnet\\ServiceProviderDashboard\\Webtests\\": "tests/webtests",
"Surfnet\\ServiceProviderDashboard\\Tests\\": "tests/"
}
},
"replace": {
"paragonie/random_compat": "2.*",
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"symfony-scripts": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
],
"post-install-cmd": [
"@auto-scripts"
"@symfony-scripts"
],
"post-update-cmd": [
"@auto-scripts"
"@symfony-scripts"
],
"check": [
"@phpcs",
Expand Down Expand Up @@ -161,6 +148,13 @@
"symfony": {
"allow-contrib": false,
"require": "5.4.*"
}
},
"symfony-app-dir": "app",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"branch-alias": null
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"chart.js": "^2.7",
"chartjs-plugin-datalabels": "^0.7",
"core-js": "3",
"import-glob-loader": "^1.1.0",
"jest-environment-jsdom": "^29.0.2",
"jquery": ">=3.5.1",
"jquery-modal": "^0.9.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function build(ManageEntity $entity): array
foreach ($privacyQuestions as $question) {
// Get the associated getter
$getterName = $question->getterName;
if (method_exists($privacyQuestionAnswers, $getterName)) {
if ($privacyQuestionAnswers !== null && method_exists($privacyQuestionAnswers, $getterName)) {
$answer = $privacyQuestionAnswers->$getterName();
if (!is_null($answer)) {
if ($answer instanceof DateTime) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,74 +40,20 @@
*/
class EntityService implements EntityServiceInterface
{
/**
* @var EntityQueryRepositoryProvider
*/
private $queryRepositoryProvider;

/**
* @var TicketServiceInterface
*/
private $ticketService;

/**
* @var ServiceService
*/
private $serviceService;

/**
* @var ChangeRequestService
*/
private $changeRequestService;

/**
* @var RouterInterface
*/
private $router;

/**
* @var LoggerInterface
*/
private $logger;

/**
* @var ApiConfig
*/
private $testManageConfig;

/**
* @var ApiConfig
*/
private $prodManageConfig;

/**
* @var string
*/
private $removalStatus;

/**
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
EntityQueryRepositoryProvider $entityQueryRepositoryProvider,
TicketServiceInterface $ticketService,
ServiceService $serviceService,
ChangeRequestService $changeRequestService,
ApiConfig $testConfig,
ApiConfig $productionConfig,
RouterInterface $router,
LoggerInterface $logger,
string $removalStatus
private EntityQueryRepositoryProvider $queryRepositoryProvider,
private readonly TicketServiceInterface $ticketService,
private readonly ServiceService $serviceService,
private readonly ChangeRequestService $changeRequestService,
private readonly ApiConfig $testManageConfig,
private readonly ApiConfig $prodManageConfig,
private readonly RouterInterface $router,
private readonly LoggerInterface $logger,
private readonly string $removalStatus
) {
$this->queryRepositoryProvider = $entityQueryRepositoryProvider;
$this->ticketService = $ticketService;
$this->serviceService = $serviceService;
$this->changeRequestService = $changeRequestService;
$this->router = $router;
$this->logger = $logger;
$this->testManageConfig = $testConfig;
$this->prodManageConfig = $productionConfig;
$this->removalStatus = $removalStatus;
}

public function createEntityUuid()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function __construct(
* name="entity_type",
* methods={"GET", "POST"}
* )
* @Security("has_role('ROLE_USER')")
* @Security("is_granted('ROLE_USER')")
*
* @param Request $request
*
Expand Down Expand Up @@ -131,9 +131,7 @@ public function typeAction(Request $request, $serviceId, string $targetEnvironme
}

/**
* @Method({"GET", "POST"})
* @Route("/entity/create/{serviceId}/{type}/{targetEnvironment}", name="entity_add")
* @Template("@Dashboard/EntityEdit/edit.html.twig")
* @Route("/entity/create/{serviceId}/{type}/{targetEnvironment}", name="entity_add", methods={"GET","POST"})
* @param Request $request
* @param int $serviceId
* @param null|string $targetEnvironment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function __construct(

/**
* @Route("/", name="service_overview", methods={"GET"})
* @Security("has_role('ROLE_USER')")
* @Security("is_granted('ROLE_USER')")
*/
public function overviewAction()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ services:
- '@Surfnet\ServiceProviderDashboard\Application\Provider\EntityQueryRepositoryProvider'
- '@Surfnet\ServiceProviderDashboard\Application\Service\TicketService'
- '@Surfnet\ServiceProviderDashboard\Application\Service\ServiceService'
- '@Surfnet\ServiceProviderDashboard\Application\Service\ChangeRequestService'
- '@surfnet.manage.configuration.test'
- '@surfnet.manage.configuration.production'
- '@router'
Expand Down Expand Up @@ -427,7 +428,7 @@ services:

Surfnet\ServiceProviderDashboard\Infrastructure\Manage\ManageClient:
arguments:
- ['@Surfnet\ServiceProviderDashboard\Infrastructure\DashboardBundle\Factory\ManageClientFactory', 'createClient']
- '@surfnet.manage.http.guzzle.test_environment'
- '@logger'

Surfnet\ServiceProviderDashboard\Infrastructure\DashboardBundle\Controller\TeamsController:
Expand Down Expand Up @@ -483,20 +484,20 @@ services:

surfnet.manage.http.guzzle.test_environment:
class: GuzzleHttp\Client
factory: "Surfnet\\ServiceProviderDashboard\\Infrastructure\\DashboardBundle\\Factory\\ManageClientFactory:createClient"
factory: [ '@Surfnet\ServiceProviderDashboard\Infrastructure\DashboardBundle\Factory\ManageClientFactory', 'createClient' ]
arguments:
- "@surfnet.manage.configuration.test"

surfnet.teams.http.guzzle:
class: GuzzleHttp\Client
factory: "Surfnet\\ServiceProviderDashboard\\Infrastructure\\DashboardBundle\\Factory\\TeamsClientFactory:createClient"
factory: [ '@Surfnet\ServiceProviderDashboard\Infrastructure\DashboardBundle\Factory\ManageClientFactory', 'createClient' ]
arguments:
- "@surfnet.teams.configuration"

surfnet.manage.http.http_client.prod_environment:
class: Surfnet\ServiceProviderDashboard\Infrastructure\Manage\ManageClient
arguments:
- [ '@Surfnet\ServiceProviderDashboard\Infrastructure\DashboardBundle\Factory\TeamsClientFactory', 'createClient' ]
- '@surfnet.manage.http.guzzle.prod_environment'
- '@logger'
- 'production'

Expand All @@ -507,7 +508,7 @@ services:
surfnet.teams.http.http_client:
class: Surfnet\ServiceProviderDashboard\Infrastructure\Teams\TeamsClient
arguments:
- ['@Surfnet\ServiceProviderDashboard\Infrastructure\DashboardBundle\Factory\TeamsClientFactory', 'createClient']
- '@surfnet.teams.http.guzzle'
- '@logger'
- ''

Expand All @@ -518,7 +519,7 @@ services:

surfnet.manage.http.guzzle.prod_environment:
class: GuzzleHttp\Client
factory: "Surfnet\\ServiceProviderDashboard\\Infrastructure\\DashboardBundle\\Factory\\ManageClientFactory:createClient"
factory: [ 'Surfnet\ServiceProviderDashboard\Infrastructure\DashboardBundle\Factory\ManageClientFactory','createClient' ]
arguments:
- "@surfnet.manage.configuration.production"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,10 @@ entity.connection_request.ticket.institution: "Institution: %institution_name% C
"
entity.published_production.text.html: "Thanks for publishing \"%entityName%\" to our production environment."
entity.published_production_and_connection_request.text.html: "Thanks for publishing \"%entityName%\" and connection request(s) our production environment."
entity.published_connection_request.text.html: "Thanks for publishing the connection request(s) to our production environment."
entity.published_connection_request.title: "Successfully published the connection request(s) to production"
entity.published_production_and_connection_request.title: "Successfully published the entity and connection request(s) to production"
entity.published_production_and_sent_connection_request.text.html: "Thanks for publishing \"%entityName%\" to our production environment and and connection request(s) to the service desk."
entity.sending_connection_request.text.html: "Thanks for sending the connection request(s) to the service desk."
entity.sent_connection_request.title: "Successfully sent the connection request(s) to the service desk"
entity.published_production_and_sent_connection_request.title: "Successfully published the entity to production and sent connection request(s) to the service desk"

entity.published_production.title: "Successfully published the entity to production"
entity.published_test.text.html: "Thanks for publishing \"%entityName%\" to our test environment."
Expand Down
2 changes: 1 addition & 1 deletion templates/EntityPublished/sendConnectionRequest.html.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends '::base.html.twig' %}
{% extends 'base.html.twig' %}

{% block page_heading %}{{ 'entity.sent_connection_request.title'|trans }}{%endblock%}
{% block body %}
Expand Down
Loading

0 comments on commit 63891df

Please sign in to comment.