ENHANCEMENT: Using webpack for assets

This commit is contained in:
Jeroen De Meerleer 2021-05-26 13:09:13 +02:00
parent 9ab63f7de1
commit 0be5d57cb3
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6
19 changed files with 7391 additions and 81 deletions

2
.gitignore vendored
View File

@ -1,6 +1,8 @@
cache/* cache/*
!cache/.gitkeep !cache/.gitkeep
vendor/ vendor/
node_modules/
public/build/
webcron.old/config.inc.php webcron.old/config.inc.php
\.idea/ \.idea/
.env .env

View File

@ -1,3 +1,6 @@
import 'tempusdominus-bootstrap-4';
import bsCustomFileInput from 'bs-custom-file-input';
$(function() { $(function() {
initDatePickers(); initDatePickers();
initCronType(); initCronType();
@ -21,26 +24,26 @@ function initCronType()
let type = $(this).data('type'); let type = $(this).data('type');
$('#crontypeButton').html($(this).html()); $('#crontypeButton').html($(this).html());
$('.crontype').val(type); $('.crontype').val(type);
$('.crontype-inputs:not(.hidden)').addClass('hidden'); $('.crontype-inputs:not(.d-none)').addClass('d-none');
$('.crontype-' + type).removeClass('hidden'); $('.crontype-' + type).removeClass('d-none');
$('.crontype-inputs:not(.hidden) input').prop('disabled', false); $('.crontype-inputs:not(.d-none) input').prop('disabled', false);
$('.crontype-inputs.hidden input').prop('disabled', true); $('.crontype-inputs.d-none input').prop('disabled', true);
if(type != 'http') { if(type != 'http') {
$('.croncategory-group').addClass('btn-group'); $('.croncategory-group').addClass('btn-group');
$('.croncategory-group').removeClass('hidden'); $('.croncategory-group').removeClass('d-none');
} else { } else {
$('.croncategory-group:not(.crontype-group) button').each(function() { $('.croncategory-group:not(.crontype-group) button').each(function() {
$(this).html($(this).data('default-text')) $(this).html($(this).data('default-text'))
}) })
$('.croncategory-group').removeClass('btn-group'); $('.croncategory-group').removeClass('btn-group');
$('.croncategory-group:not(.crontype-group)').addClass('hidden'); $('.croncategory-group:not(.crontype-group)').addClass('d-none');
$('.croncategory-inputs:not(.crontype-inputs)').addClass('hidden'); $('.croncategory-inputs:not(.crontype-inputs)').addClass('d-none');
$('.croncategory-inputs:not(.hidden) input').prop('disabled', false); $('.croncategory-inputs:not(.d-none) input').prop('disabled', false);
$('.croncategory-inputs.hidden input').prop('disabled', true); $('.croncategory-inputs.d-none input').prop('disabled', true);
} }
}) })
} }
@ -53,11 +56,11 @@ function initContainerType()
$('#containertypeButton').html($(this).html()); $('#containertypeButton').html($(this).html());
let type = $(this).data('type'); let type = $(this).data('type');
$('.containertype').val(type); $('.containertype').val(type);
$('.containertype-inputs:not(.hidden)').addClass('hidden'); $('.containertype-inputs:not(.d-none)').addClass('d-none');
$('.containertype-' + type).removeClass('hidden'); $('.containertype-' + type).removeClass('d-none');
$('.containertype-inputs:not(.hidden) input').prop('disabled', false); $('.containertype-inputs:not(.d-none) input').prop('disabled', false);
$('.containertype-inputs.hidden input').prop('disabled', true); $('.containertype-inputs.d-none input').prop('disabled', true);
}) })
} }
@ -70,11 +73,11 @@ function initHostType()
$('#hosttypeButton').html($(this).html()); $('#hosttypeButton').html($(this).html());
let type = $(this).data('type'); let type = $(this).data('type');
$('.hosttype').val(type); $('.hosttype').val(type);
$('.hosttype-inputs:not(.hidden)').addClass('hidden'); $('.hosttype-inputs:not(.d-none)').addClass('d-none');
$('.hosttype-' + type).removeClass('hidden'); $('.hosttype-' + type).removeClass('d-none');
$('.hosttype-inputs:not(.hidden) input').prop('disabled', false); $('.hosttype-inputs:not(.d-none) input').prop('disabled', false);
$('.hosttype-inputs.hidden input').prop('disabled', true); $('.hosttype-inputs.d-none input').prop('disabled', true);
}) })
$('.privkey-keep').on('click', function() { $('.privkey-keep').on('click', function() {
@ -86,12 +89,12 @@ function initVarInputs()
{ {
$('.addvar-btn').on('click', function() { $('.addvar-btn').on('click', function() {
let index = $('.var-group').length; let index = $('.var-group').length;
$('.var-group:first-child').clone().appendTo('.vars').removeClass('hidden'); $('.var-group:first-child').clone().appendTo('.vars').removeClass('d-none');
$('.var-group:last-child').data({index: index}); $('.var-group:last-child').data({index: index});
$('.var-group:last-child .var-issecret').prop('name', 'var-issecret[' + index + ']'); $('.var-group:last-child .var-issecret').prop('name', 'var-issecret[' + index + ']');
$('.var-group:last-child .var-id').prop('name', 'var-id[' + index + ']'); $('.var-group:last-child .var-id').prop('name', 'var-id[' + index + ']');
$('.var-group:last-child .var-value').prop('name', 'var-value[' + index + ']'); $('.var-group:last-child .var-value').prop('name', 'var-value[' + index + ']');
$('.vars-description').removeClass('hidden'); $('.vars-description').removeClass('d-none');
}) })
$(document).on('click', '.var-issecret', function() { $(document).on('click', '.var-issecret', function() {
let ischecked = $(this).prop('checked'); let ischecked = $(this).prop('checked');

3
assets/job/add.scss Normal file
View File

@ -0,0 +1,3 @@
@import "~bootstrap/dist/css/bootstrap.css";
@import "~tempusdominus-bootstrap-4/build/css/tempusdominus-bootstrap-4.css";
@import "~font-awesome";

2
assets/job/index.scss Normal file
View File

@ -0,0 +1,2 @@
@import "~bootstrap/dist/css/bootstrap.css";
@import "~font-awesome";

View File

@ -0,0 +1 @@
@import "~bootstrap/dist/css/bootstrap.css";

View File

@ -17,7 +17,8 @@
"symfony/http-foundation": "^5.2", "symfony/http-foundation": "^5.2",
"symfony/config": "^5.2", "symfony/config": "^5.2",
"symfony/console": "^5.2", "symfony/console": "^5.2",
"phpseclib/phpseclib": "^3.0" "phpseclib/phpseclib": "^3.0",
"mehrkanal/twig-encore-extension": "^1.2"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {

886
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "220115977dffca9a54502ffb2b8d124a", "content-hash": "3a37200efaf0340e0080cd7b39770160",
"packages": [ "packages": [
{ {
"name": "composer/package-versions-deprecated", "name": "composer/package-versions-deprecated",
@ -656,6 +656,52 @@
}, },
"time": "2021-04-26T09:17:50+00:00" "time": "2021-04-26T09:17:50+00:00"
}, },
{
"name": "mehrkanal/twig-encore-extension",
"version": "v1.2",
"source": {
"type": "git",
"url": "https://github.com/mehrkanal/twig-encore-extension.git",
"reference": "0311a300d84ff36758a80929a5feab53dab59795"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mehrkanal/twig-encore-extension/zipball/0311a300d84ff36758a80929a5feab53dab59795",
"reference": "0311a300d84ff36758a80929a5feab53dab59795",
"shasum": ""
},
"require": {
"php": "^7.1",
"symfony/webpack-encore-bundle": "^1.7",
"twig/twig": "^1.42.5 || ^2.12.5 || ^3.0.3"
},
"require-dev": {
"mehrkanal/editorconfig": "dev-master",
"squizlabs/php_codesniffer": "^3.2"
},
"type": "library",
"autoload": {
"psr-4": {
"Mehrkanal\\EncoreTwigExtension\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-3.0-or-later"
],
"authors": [
{
"name": "Julian Frauenholz",
"email": "frauenholz@mehrkanal.com"
}
],
"description": "Twig Extension to use entrypoints.json in Twig Templates",
"support": {
"issues": "https://github.com/mehrkanal/twig-encore-extension/issues",
"source": "https://github.com/mehrkanal/twig-encore-extension/tree/v1.2"
},
"time": "2021-04-28T08:26:42+00:00"
},
{ {
"name": "paragonie/constant_time_encoding", "name": "paragonie/constant_time_encoding",
"version": "v2.4.0", "version": "v2.4.0",
@ -932,6 +978,56 @@
}, },
"time": "2021-03-05T17:36:06+00:00" "time": "2021-03-05T17:36:06+00:00"
}, },
{
"name": "psr/event-dispatcher",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/event-dispatcher.git",
"reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0",
"reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0",
"shasum": ""
},
"require": {
"php": ">=7.2.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\EventDispatcher\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Standard interfaces for event handling.",
"keywords": [
"events",
"psr",
"psr-14"
],
"support": {
"issues": "https://github.com/php-fig/event-dispatcher/issues",
"source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0"
},
"time": "2019-01-08T18:20:26+00:00"
},
{ {
"name": "psr/http-client", "name": "psr/http-client",
"version": "1.0.1", "version": "1.0.1",
@ -1037,6 +1133,56 @@
}, },
"time": "2016-08-06T14:39:51+00:00" "time": "2016-08-06T14:39:51+00:00"
}, },
{
"name": "psr/log",
"version": "1.1.4",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.1.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Log\\": "Psr/Log/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
"homepage": "https://github.com/php-fig/log",
"keywords": [
"log",
"psr",
"psr-3"
],
"support": {
"source": "https://github.com/php-fig/log/tree/1.1.4"
},
"time": "2021-05-03T11:20:27+00:00"
},
{ {
"name": "ralouphie/getallheaders", "name": "ralouphie/getallheaders",
"version": "3.0.3", "version": "3.0.3",
@ -1081,6 +1227,75 @@
}, },
"time": "2019-03-08T08:55:37+00:00" "time": "2019-03-08T08:55:37+00:00"
}, },
{
"name": "symfony/asset",
"version": "v5.2.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/asset.git",
"reference": "e6676acfabf011dca2beaa5f9b8d519c8aea2870"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/asset/zipball/e6676acfabf011dca2beaa5f9b8d519c8aea2870",
"reference": "e6676acfabf011dca2beaa5f9b8d519c8aea2870",
"shasum": ""
},
"require": {
"php": ">=7.2.5"
},
"require-dev": {
"symfony/http-client": "^4.4|^5.0",
"symfony/http-foundation": "^4.4|^5.0",
"symfony/http-kernel": "^4.4|^5.0"
},
"suggest": {
"symfony/http-foundation": ""
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\Asset\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Manages URL generation and versioning of web assets such as CSS stylesheets, JavaScript files and image files",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/asset/tree/v5.2.7"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-04-07T16:07:52+00:00"
},
{ {
"name": "symfony/config", "name": "symfony/config",
"version": "v5.2.8", "version": "v5.2.8",
@ -1256,6 +1471,93 @@
], ],
"time": "2021-05-11T15:45:21+00:00" "time": "2021-05-11T15:45:21+00:00"
}, },
{
"name": "symfony/dependency-injection",
"version": "v5.2.9",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
"reference": "2761ca2f7e2f41af3a45951e1ce8c01f121245eb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/2761ca2f7e2f41af3a45951e1ce8c01f121245eb",
"reference": "2761ca2f7e2f41af3a45951e1ce8c01f121245eb",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"psr/container": "^1.0",
"symfony/deprecation-contracts": "^2.1",
"symfony/polyfill-php80": "^1.15",
"symfony/service-contracts": "^1.1.6|^2"
},
"conflict": {
"symfony/config": "<5.1",
"symfony/finder": "<4.4",
"symfony/proxy-manager-bridge": "<4.4",
"symfony/yaml": "<4.4"
},
"provide": {
"psr/container-implementation": "1.0",
"symfony/service-implementation": "1.0|2.0"
},
"require-dev": {
"symfony/config": "^5.1",
"symfony/expression-language": "^4.4|^5.0",
"symfony/yaml": "^4.4|^5.0"
},
"suggest": {
"symfony/config": "",
"symfony/expression-language": "For using expressions in service container configuration",
"symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required",
"symfony/proxy-manager-bridge": "Generate service proxies to lazy load them",
"symfony/yaml": ""
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\DependencyInjection\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Allows you to standardize and centralize the way objects are constructed in your application",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/dependency-injection/tree/v5.2.9"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-05-16T13:07:46+00:00"
},
{ {
"name": "symfony/deprecation-contracts", "name": "symfony/deprecation-contracts",
"version": "v2.4.0", "version": "v2.4.0",
@ -1393,6 +1695,239 @@
], ],
"time": "2021-01-27T10:01:46+00:00" "time": "2021-01-27T10:01:46+00:00"
}, },
{
"name": "symfony/error-handler",
"version": "v5.2.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/error-handler.git",
"reference": "1416bc16317a8188aabde251afef7618bf4687ac"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/error-handler/zipball/1416bc16317a8188aabde251afef7618bf4687ac",
"reference": "1416bc16317a8188aabde251afef7618bf4687ac",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"psr/log": "^1.0",
"symfony/polyfill-php80": "^1.15",
"symfony/var-dumper": "^4.4|^5.0"
},
"require-dev": {
"symfony/deprecation-contracts": "^2.1",
"symfony/http-kernel": "^4.4|^5.0",
"symfony/serializer": "^4.4|^5.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\ErrorHandler\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Provides tools to manage errors and ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/error-handler/tree/v5.2.8"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-05-07T13:42:21+00:00"
},
{
"name": "symfony/event-dispatcher",
"version": "v5.2.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "d08d6ec121a425897951900ab692b612a61d6240"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d08d6ec121a425897951900ab692b612a61d6240",
"reference": "d08d6ec121a425897951900ab692b612a61d6240",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/deprecation-contracts": "^2.1",
"symfony/event-dispatcher-contracts": "^2",
"symfony/polyfill-php80": "^1.15"
},
"conflict": {
"symfony/dependency-injection": "<4.4"
},
"provide": {
"psr/event-dispatcher-implementation": "1.0",
"symfony/event-dispatcher-implementation": "2.0"
},
"require-dev": {
"psr/log": "~1.0",
"symfony/config": "^4.4|^5.0",
"symfony/dependency-injection": "^4.4|^5.0",
"symfony/error-handler": "^4.4|^5.0",
"symfony/expression-language": "^4.4|^5.0",
"symfony/http-foundation": "^4.4|^5.0",
"symfony/service-contracts": "^1.1|^2",
"symfony/stopwatch": "^4.4|^5.0"
},
"suggest": {
"symfony/dependency-injection": "",
"symfony/http-kernel": ""
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\EventDispatcher\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/event-dispatcher/tree/v5.2.4"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-02-18T17:12:37+00:00"
},
{
"name": "symfony/event-dispatcher-contracts",
"version": "v2.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher-contracts.git",
"reference": "69fee1ad2332a7cbab3aca13591953da9cdb7a11"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/69fee1ad2332a7cbab3aca13591953da9cdb7a11",
"reference": "69fee1ad2332a7cbab3aca13591953da9cdb7a11",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"psr/event-dispatcher": "^1"
},
"suggest": {
"symfony/event-dispatcher-implementation": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "2.4-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
},
"autoload": {
"psr-4": {
"Symfony\\Contracts\\EventDispatcher\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Generic abstractions related to dispatching event",
"homepage": "https://symfony.com",
"keywords": [
"abstractions",
"contracts",
"decoupling",
"interfaces",
"interoperability",
"standards"
],
"support": {
"source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.4.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-03-23T23:28:01+00:00"
},
{ {
"name": "symfony/filesystem", "name": "symfony/filesystem",
"version": "v5.2.7", "version": "v5.2.7",
@ -1455,6 +1990,84 @@
], ],
"time": "2021-04-01T10:42:13+00:00" "time": "2021-04-01T10:42:13+00:00"
}, },
{
"name": "symfony/http-client-contracts",
"version": "v2.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-client-contracts.git",
"reference": "7e82f6084d7cae521a75ef2cb5c9457bbda785f4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/7e82f6084d7cae521a75ef2cb5c9457bbda785f4",
"reference": "7e82f6084d7cae521a75ef2cb5c9457bbda785f4",
"shasum": ""
},
"require": {
"php": ">=7.2.5"
},
"suggest": {
"symfony/http-client-implementation": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "2.4-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
},
"autoload": {
"psr-4": {
"Symfony\\Contracts\\HttpClient\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Generic abstractions related to HTTP clients",
"homepage": "https://symfony.com",
"keywords": [
"abstractions",
"contracts",
"decoupling",
"interfaces",
"interoperability",
"standards"
],
"support": {
"source": "https://github.com/symfony/http-client-contracts/tree/v2.4.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-04-11T23:07:08+00:00"
},
{ {
"name": "symfony/http-foundation", "name": "symfony/http-foundation",
"version": "v5.2.8", "version": "v5.2.8",
@ -1528,6 +2141,118 @@
], ],
"time": "2021-05-07T13:41:16+00:00" "time": "2021-05-07T13:41:16+00:00"
}, },
{
"name": "symfony/http-kernel",
"version": "v5.2.9",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
"reference": "eb540ef6870dbf33c92e372cfb869ebf9649e6cb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/eb540ef6870dbf33c92e372cfb869ebf9649e6cb",
"reference": "eb540ef6870dbf33c92e372cfb869ebf9649e6cb",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"psr/log": "~1.0",
"symfony/deprecation-contracts": "^2.1",
"symfony/error-handler": "^4.4|^5.0",
"symfony/event-dispatcher": "^5.0",
"symfony/http-client-contracts": "^1.1|^2",
"symfony/http-foundation": "^4.4|^5.0",
"symfony/polyfill-ctype": "^1.8",
"symfony/polyfill-php73": "^1.9",
"symfony/polyfill-php80": "^1.15"
},
"conflict": {
"symfony/browser-kit": "<4.4",
"symfony/cache": "<5.0",
"symfony/config": "<5.0",
"symfony/console": "<4.4",
"symfony/dependency-injection": "<5.1.8",
"symfony/doctrine-bridge": "<5.0",
"symfony/form": "<5.0",
"symfony/http-client": "<5.0",
"symfony/mailer": "<5.0",
"symfony/messenger": "<5.0",
"symfony/translation": "<5.0",
"symfony/twig-bridge": "<5.0",
"symfony/validator": "<5.0",
"twig/twig": "<2.13"
},
"provide": {
"psr/log-implementation": "1.0"
},
"require-dev": {
"psr/cache": "^1.0|^2.0|^3.0",
"symfony/browser-kit": "^4.4|^5.0",
"symfony/config": "^5.0",
"symfony/console": "^4.4|^5.0",
"symfony/css-selector": "^4.4|^5.0",
"symfony/dependency-injection": "^5.1.8",
"symfony/dom-crawler": "^4.4|^5.0",
"symfony/expression-language": "^4.4|^5.0",
"symfony/finder": "^4.4|^5.0",
"symfony/process": "^4.4|^5.0",
"symfony/routing": "^4.4|^5.0",
"symfony/stopwatch": "^4.4|^5.0",
"symfony/translation": "^4.4|^5.0",
"symfony/translation-contracts": "^1.1|^2",
"twig/twig": "^2.13|^3.0.4"
},
"suggest": {
"symfony/browser-kit": "",
"symfony/config": "",
"symfony/console": "",
"symfony/dependency-injection": ""
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\HttpKernel\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-kernel/tree/v5.2.9"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-05-19T12:23:45+00:00"
},
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
"version": "v1.22.1", "version": "v1.22.1",
@ -2265,6 +2990,165 @@
], ],
"time": "2021-05-10T14:56:10+00:00" "time": "2021-05-10T14:56:10+00:00"
}, },
{
"name": "symfony/var-dumper",
"version": "v5.2.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
"reference": "d693200a73fae179d27f8f1b16b4faf3e8569eba"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/d693200a73fae179d27f8f1b16b4faf3e8569eba",
"reference": "d693200a73fae179d27f8f1b16b4faf3e8569eba",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php80": "^1.15"
},
"conflict": {
"phpunit/phpunit": "<5.4.3",
"symfony/console": "<4.4"
},
"require-dev": {
"ext-iconv": "*",
"symfony/console": "^4.4|^5.0",
"symfony/process": "^4.4|^5.0",
"twig/twig": "^2.13|^3.0.4"
},
"suggest": {
"ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).",
"ext-intl": "To show region name in time zone dump",
"symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script"
},
"bin": [
"Resources/bin/var-dump-server"
],
"type": "library",
"autoload": {
"files": [
"Resources/functions/dump.php"
],
"psr-4": {
"Symfony\\Component\\VarDumper\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Provides mechanisms for walking through any arbitrary PHP variable",
"homepage": "https://symfony.com",
"keywords": [
"debug",
"dump"
],
"support": {
"source": "https://github.com/symfony/var-dumper/tree/v5.2.8"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-05-07T13:42:21+00:00"
},
{
"name": "symfony/webpack-encore-bundle",
"version": "v1.11.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/webpack-encore-bundle.git",
"reference": "f282fb17ffa4839ba491eb7e3f5ffdd40c86f969"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/webpack-encore-bundle/zipball/f282fb17ffa4839ba491eb7e3f5ffdd40c86f969",
"reference": "f282fb17ffa4839ba491eb7e3f5ffdd40c86f969",
"shasum": ""
},
"require": {
"php": ">=7.1.3",
"symfony/asset": "^4.4 || ^5.0",
"symfony/config": "^4.4 || ^5.0",
"symfony/dependency-injection": "^4.4 || ^5.0",
"symfony/http-kernel": "^4.4 || ^5.0",
"symfony/service-contracts": "^1.0 || ^2.0"
},
"require-dev": {
"symfony/framework-bundle": "^4.4 || ^5.0",
"symfony/phpunit-bridge": "^4.4 || ^5.0",
"symfony/twig-bundle": "^4.4 || ^5.0",
"symfony/web-link": "^4.4 || ^5.0"
},
"type": "symfony-bundle",
"extra": {
"thanks": {
"name": "symfony/webpack-encore",
"url": "https://github.com/symfony/webpack-encore"
}
},
"autoload": {
"psr-4": {
"Symfony\\WebpackEncoreBundle\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Integration with your Symfony app & Webpack Encore!",
"support": {
"issues": "https://github.com/symfony/webpack-encore-bundle/issues",
"source": "https://github.com/symfony/webpack-encore-bundle/tree/v1.11.2"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-04-26T12:48:17+00:00"
},
{ {
"name": "symfony/yaml", "name": "symfony/yaml",
"version": "v5.2.9", "version": "v5.2.9",

View File

@ -4,6 +4,8 @@
namespace JeroenED\Framework; namespace JeroenED\Framework;
use Mehrkanal\EncoreTwigExtension\Extensions\EntryFilesTwigExtension;
use Symfony\WebpackEncoreBundle\Asset\EntrypointLookup;
use Twig\Environment; use Twig\Environment;
use Twig\Loader\FilesystemLoader; use Twig\Loader\FilesystemLoader;
use Twig\TwigFilter; use Twig\TwigFilter;
@ -33,6 +35,7 @@ class Twig
$path = new TwigFunction('path', function(string $route, array $params = []) { $path = new TwigFunction('path', function(string $route, array $params = []) {
return $this->kernel->getRouter()->getUrlForRoute($route, $params); return $this->kernel->getRouter()->getUrlForRoute($route, $params);
}); });
$this->environment->addExtension(new EntryFilesTwigExtension(new EntrypointLookup('./public/build/entrypoints.json')));
$this->environment->addFunction($path); $this->environment->addFunction($path);
} }
@ -55,7 +58,4 @@ class Twig
}); });
$this->environment->addFilter($secondsToInterval); $this->environment->addFilter($secondsToInterval);
} }
} }

6323
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

31
package.json Normal file
View File

@ -0,0 +1,31 @@
{
"name": "webcron",
"version": "1.0.0",
"description": "(c) 2017, 2021 Jeroen De Meerleer <me@jeroened.be>",
"main": "webpack.config.js",
"directories": {
"lib": "lib"
},
"dependencies": {
"bootstrap": "^4.6.0",
"bs-custom-file-input": "^1.3.4",
"font-awesome": "^4.7.0",
"jquery": "^3.6.0",
"moment": "^2.29.1",
"tempusdominus-bootstrap-4": "^5.39.0"
},
"devDependencies": {
"@symfony/webpack-encore": "^1.3.0",
"sass": "^1.34.0",
"sass-loader": "^11.1.1"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://git.jeroened.be/webcron/webcron.git"
},
"author": "Jeroen De Meerleer <me@jeroened.be>",
"license": " AGPL-3.0-or-later"
}

View File

@ -1,3 +0,0 @@
.hidden {
display: none;
}

View File

@ -5,13 +5,9 @@
<title>Webcron management :: {% block title %}{% endblock %}</title> <title>Webcron management :: {% block title %}{% endblock %}</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous"> {% block styles %}{% endblock %}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
{% block extrastyles %}{% endblock %}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> {% block scripts %}{% endblock %}
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns" crossorigin="anonymous"></script>
{% block extrascripts %}{% endblock %}
</head> </head>

View File

@ -49,7 +49,7 @@
</div> </div>
</div> </div>
<div class="dropdown croncategory-group hidden hosttype-group"> <div class="dropdown croncategory-group d-none hosttype-group">
<button class="btn btn-outline-primary dropdown-toggle" type="button" id="hosttypeButton" data-default-text="" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <button class="btn btn-outline-primary dropdown-toggle" type="button" id="hosttypeButton" data-default-text="" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Host type Host type
</button> </button>
@ -59,7 +59,7 @@
</div> </div>
</div> </div>
<div class="dropdown croncategory-group hidden containertype-group"> <div class="dropdown croncategory-group d-none containertype-group">
<button class="btn btn-outline-primary dropdown-toggle" type="button" id="containertypeButton" data-default-text="" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <button class="btn btn-outline-primary dropdown-toggle" type="button" id="containertypeButton" data-default-text="" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Container Container
</button> </button>
@ -70,7 +70,7 @@
</div> </div>
</div> </div>
<div class="crontype-command crontype-inputs croncategory-inputs hidden"> <div class="crontype-command crontype-inputs croncategory-inputs d-none">
<h4>Command details</h4> <h4>Command details</h4>
<div class="mb-3"> <div class="mb-3">
<label for="command">Command</label> <label for="command">Command</label>
@ -83,7 +83,7 @@
</div> </div>
</div> </div>
<div class="crontype-reboot crontype-inputs croncategory-inputs hidden"> <div class="crontype-reboot crontype-inputs croncategory-inputs d-none">
<h4>Reboot job details</h4> <h4>Reboot job details</h4>
<div class="mb-3"> <div class="mb-3">
<label for="reboot-command">Reboot command</label> <label for="reboot-command">Reboot command</label>
@ -109,7 +109,7 @@
</div> </div>
</div> </div>
<div class="crontype-http crontype-inputs croncategory-inputs hidden"> <div class="crontype-http crontype-inputs croncategory-inputs d-none">
<h4>HTTP request details</h4> <h4>HTTP request details</h4>
<div class="mb-3"> <div class="mb-3">
<label for="url">Url</label> <label for="url">Url</label>
@ -131,12 +131,12 @@
</div> </div>
</div> </div>
<div class="hosttype-local hosttype-inputs croncategory-inputs hidden"> <div class="hosttype-local hosttype-inputs croncategory-inputs d-none">
<h4>Localhost details</h4> <h4>Localhost details</h4>
<h5>No options</h5> <h5>No options</h5>
</div> </div>
<div class="hosttype-ssh hosttype-inputs croncategory-inputs hidden"> <div class="hosttype-ssh hosttype-inputs croncategory-inputs d-none">
<h4>SSH host details</h4> <h4>SSH host details</h4>
<div class="mb-3"> <div class="mb-3">
<label for="host">Hostname</label> <label for="host">Hostname</label>
@ -165,10 +165,10 @@
</div> </div>
</div> </div>
<div class="containertype-none containertype-inputs croncategory-inputs hidden"> <div class="containertype-none containertype-inputs croncategory-inputs d-none">
</div> </div>
<div class="containertype-docker containertype-inputs croncategory-inputs hidden"> <div class="containertype-docker containertype-inputs croncategory-inputs d-none">
<h4>Docker container details</h4> <h4>Docker container details</h4>
<div class="mb-3"> <div class="mb-3">
<label for="service">Service</label> <label for="service">Service</label>
@ -184,7 +184,7 @@
<h3>Variables</h3> <h3>Variables</h3>
<div class="vars mb-3"> <div class="vars mb-3">
<div class="input-group var-group hidden"> <div class="input-group var-group d-none">
<div class="input-group-prepend"> <div class="input-group-prepend">
<div class="input-group-text border-right-0"> <div class="input-group-text border-right-0">
<input type="checkbox" name="var-issecret[0]" class="var-issecret" placeholder="value" value="true"> <input type="checkbox" name="var-issecret[0]" class="var-issecret" placeholder="value" value="true">
@ -197,7 +197,7 @@
</div> </div>
</div> </div>
<div class="vars-description mb-3 hidden"> <div class="vars-description mb-3 d-none">
<p> <p>
You can add variables by using {variable-name} in job details You can add variables by using {variable-name} in job details
</p> </p>
@ -214,14 +214,10 @@
{% endblock %} {% endblock %}
{% block extrastyles %} {% block styles %}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.39.0/css/tempusdominus-bootstrap-4.min.css" integrity="sha512-3JRrEUwaCkFUBLK1N8HehwQgu8e23jTH4np5NHOmQOobuC4ROQxFwFgBLTnhcnQRMs84muMh0PnnwXlPq5MGjg==" crossorigin="anonymous" /> {{ encore_entry_link_tags('job.add') }}
<link rel="stylesheet" href="/resources/job/add.css" />
{% endblock %} {% endblock %}
{% block extrascripts %} {% block scripts %}
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js" integrity="sha512-qTXRIMyZIFb8iQcfjXWCO8+M5Tbc38Qi5WzdPOYZHIlZpzBHG3L3by84BBBOiRGiEb7KKtAOAs5qYdUiZiQNNQ==" crossorigin="anonymous"></script> {{ encore_entry_script_tags('job.add') }}
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.39.0/js/tempusdominus-bootstrap-4.min.js" integrity="sha512-k6/Bkb8Fxf/c1Tkyl39yJwcOZ1P4cRrJu77p83zJjN2Z55prbFHxPs9vN7q3l3+tSMGPDdoH51AEU8Vgo1cgAA==" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bs-custom-file-input/1.3.4/bs-custom-file-input.min.js" integrity="sha512-91BoXI7UENvgjyH31ug0ga7o1Ov41tOzbMM3+RPqFVohn1UbVcjL/f5sl6YSOFfaJp+rF+/IEbOOEwtBONMz+w==" crossorigin="anonymous"></script>
<script type="text/javascript" src="/resources/job/add.js"></script>
{% endblock %} {% endblock %}

View File

@ -55,7 +55,7 @@
</div> </div>
</div> </div>
<div class="dropdown croncategory-group hosttype-group{% if data.crontype != 'http' %} btn-group{% else %} hidden{% endif %}"> <div class="dropdown croncategory-group hosttype-group{% if data.crontype != 'http' %} btn-group{% else %} d-none{% endif %}">
<button class="btn btn-outline-primary dropdown-toggle" type="button" id="hosttypeButton" data-default-text="Host type" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <button class="btn btn-outline-primary dropdown-toggle" type="button" id="hosttypeButton" data-default-text="Host type" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{% if data.hosttype == 'local' %} {% if data.hosttype == 'local' %}
Local Local
@ -69,7 +69,7 @@
</div> </div>
</div> </div>
<div class="dropdown croncategory-group containertype-group{% if data.crontype != 'http' %} btn-group{% else %} hidden{% endif %}"> <div class="dropdown croncategory-group containertype-group{% if data.crontype != 'http' %} btn-group{% else %} d-none{% endif %}">
<button class="btn btn-outline-primary dropdown-toggle" type="button" id="containertypeButton" data-default-text="" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <button class="btn btn-outline-primary dropdown-toggle" type="button" id="containertypeButton" data-default-text="" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{% if data.containertype == 'none' %} {% if data.containertype == 'none' %}
None None
@ -84,7 +84,7 @@
</div> </div>
</div> </div>
<div class="crontype-command crontype-inputs croncategory-inputs{% if data.crontype != 'command' %} hidden{% endif %}"> <div class="crontype-command crontype-inputs croncategory-inputs{% if data.crontype != 'command' %} d-none{% endif %}">
<h4>Command details</h4> <h4>Command details</h4>
<div class="mb-3"> <div class="mb-3">
<label for="command">Command</label> <label for="command">Command</label>
@ -97,7 +97,7 @@
</div> </div>
</div> </div>
<div class="crontype-reboot crontype-inputs croncategory-inputs{% if data.crontype != 'reboot' %} hidden{% endif %}"> <div class="crontype-reboot crontype-inputs croncategory-inputs{% if data.crontype != 'reboot' %} d-none{% endif %}">
<h4>Reboot job details</h4> <h4>Reboot job details</h4>
<div class="mb-3"> <div class="mb-3">
<label for="reboot-command">Reboot command</label> <label for="reboot-command">Reboot command</label>
@ -123,7 +123,7 @@
</div> </div>
</div> </div>
<div class="crontype-http crontype-inputs croncategory-inputs{% if data.crontype != 'http' %} hidden{% endif %}"> <div class="crontype-http crontype-inputs croncategory-inputs{% if data.crontype != 'http' %} d-none{% endif %}">
<h4>HTTP request details</h4> <h4>HTTP request details</h4>
<div class="mb-3"> <div class="mb-3">
<label for="url">Url</label> <label for="url">Url</label>
@ -145,12 +145,12 @@
</div> </div>
</div> </div>
<div class="hosttype-local hosttype-inputs croncategory-inputs{% if data.hosttype != 'local' %} hidden{% endif %}"> <div class="hosttype-local hosttype-inputs croncategory-inputs{% if data.hosttype != 'local' %} d-none{% endif %}">
<h4>Localhost details</h4> <h4>Localhost details</h4>
<h5>No options</h5> <h5>No options</h5>
</div> </div>
<div class="hosttype-ssh hosttype-inputs croncategory-inputs{% if data.hosttype != 'ssh' %} hidden{% endif %}"> <div class="hosttype-ssh hosttype-inputs croncategory-inputs{% if data.hosttype != 'ssh' %} d-none{% endif %}">
<h4>SSH host details</h4> <h4>SSH host details</h4>
<div class="mb-3"> <div class="mb-3">
<label for="host">Hostname</label> <label for="host">Hostname</label>
@ -188,10 +188,10 @@
</div> </div>
</div> </div>
<div class="containertype-none containertype-inputs croncategory-inputs{% if data.containertype != 'none' %} hidden{% endif %}"> <div class="containertype-none containertype-inputs croncategory-inputs{% if data.containertype != 'none' %} d-none{% endif %}">
</div> </div>
<div class="containertype-docker containertype-inputs croncategory-inputs{% if data.containertype != 'docker' %} hidden{% endif %}"> <div class="containertype-docker containertype-inputs croncategory-inputs{% if data.containertype != 'docker' %} d-none{% endif %}">
<h4>Docker container details</h4> <h4>Docker container details</h4>
<div class="mb-3"> <div class="mb-3">
<label for="service">Service</label> <label for="service">Service</label>
@ -207,7 +207,7 @@
<h3>Variables</h3> <h3>Variables</h3>
<div class="vars mb-3"> <div class="vars mb-3">
<div class="input-group var-group hidden"> <div class="input-group var-group d-none">
<div class="input-group-prepend"> <div class="input-group-prepend">
<div class="input-group-text border-right-0"> <div class="input-group-text border-right-0">
<input type="checkbox" name="var-issecret[0]" class="var-issecret" placeholder="value" value="true"> <input type="checkbox" name="var-issecret[0]" class="var-issecret" placeholder="value" value="true">
@ -232,7 +232,7 @@
{% endfor %} {% endfor %}
</div> </div>
<div class="vars-description mb-3 hidden"> <div class="vars-description mb-3 d-none">
<p> <p>
You can add variables by using {variable-name} in job details You can add variables by using {variable-name} in job details
</p> </p>
@ -249,14 +249,10 @@
{% endblock %} {% endblock %}
{% block extrastyles %} {% block styles %}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.39.0/css/tempusdominus-bootstrap-4.min.css" integrity="sha512-3JRrEUwaCkFUBLK1N8HehwQgu8e23jTH4np5NHOmQOobuC4ROQxFwFgBLTnhcnQRMs84muMh0PnnwXlPq5MGjg==" crossorigin="anonymous" /> {{ encore_entry_link_tags('job.add') }}
<link rel="stylesheet" href="/resources/job/add.css" />
{% endblock %} {% endblock %}
{% block extrascripts %} {% block scripts %}
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js" integrity="sha512-qTXRIMyZIFb8iQcfjXWCO8+M5Tbc38Qi5WzdPOYZHIlZpzBHG3L3by84BBBOiRGiEb7KKtAOAs5qYdUiZiQNNQ==" crossorigin="anonymous"></script> {{ encore_entry_script_tags('job.add') }}
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.39.0/js/tempusdominus-bootstrap-4.min.js" integrity="sha512-k6/Bkb8Fxf/c1Tkyl39yJwcOZ1P4cRrJu77p83zJjN2Z55prbFHxPs9vN7q3l3+tSMGPDdoH51AEU8Vgo1cgAA==" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bs-custom-file-input/1.3.4/bs-custom-file-input.min.js" integrity="sha512-91BoXI7UENvgjyH31ug0ga7o1Ov41tOzbMM3+RPqFVohn1UbVcjL/f5sl6YSOFfaJp+rF+/IEbOOEwtBONMz+w==" crossorigin="anonymous"></script>
<script type="text/javascript" src="/resources/job/add.js"></script>
{% endblock %} {% endblock %}

View File

@ -50,9 +50,10 @@
</div> </div>
{% endblock %} {% endblock %}
{% block extrastyles %} {% block styles %}
<link rel="stylesheet" href="/resources/job/index.css" /> {{ encore_entry_link_tags('job.index') }}
{% endblock %} {% endblock %}
{% block extrascripts %}
<script type="text/javascript" src="/resources/job/index.js"></script> {% block scripts %}
{{ encore_entry_script_tags('job.index') }}
{% endblock %} {% endblock %}

View File

@ -4,13 +4,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Webcron management :: Log in</title> <title>Webcron management :: Log in</title>
{{ encore_entry_link_tags('security.login') }}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous"> {{ encore_entry_script_tags('security.login') }}
<link rel="stylesheet" href="/css/site.css">
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns" crossorigin="anonymous"></script>
<script src="/js/site.js" type="text/javascript"></script>
</head> </head>
<body> <body>

78
webpack.config.js Normal file
View File

@ -0,0 +1,78 @@
const Encore = require('@symfony/webpack-encore');
// Manually configure the runtime environment if not already configured yet by the "encore" command.
// It's useful when you use tools that rely on webpack.config.js file.
if (!Encore.isRuntimeEnvironmentConfigured()) {
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
}
Encore
// directory where compiled assets will be stored
.setOutputPath('public/build/')
// public path used by the web server to access the output path
.setPublicPath('/build')
// only needed for CDN's or sub-directory deploy
//.setManifestKeyPrefix('build/')
/*
* ENTRY CONFIG
*
* Add 1 entry for each "page" of your app
* (including one that's included on every page - e.g. "app")
*
* Each entry will result in one JavaScript file (e.g. app.js)
* and one CSS file (e.g. app.css) if your JavaScript imports CSS.
*/
.addEntry('security.login', ['./assets/security/login.js', './assets/security/login.scss'])
.addEntry('job.index', ['./assets/job/index.js', './assets/job/index.scss'])
.addEntry('job.add', ['./assets/job/add.js', './assets/job/add.scss'])
//.addEntry('page1', './assets/page1.js')
//.addEntry('page2', './assets/page2.js')
// When enabled, Webpack "splits" your files into smaller pieces for greater optimization.
// .splitEntryChunks()
// will require an extra script tag for runtime.js
// but, you probably want this, unless you're building a single-page app
.enableSingleRuntimeChunk()
/*
* FEATURE CONFIG
*
* Enable & configure other features below. For a full
* list of features, see:
* https://symfony.com/doc/current/frontend.html#adding-more-features
*/
.cleanupOutputBeforeBuild()
//.enableBuildNotifications()
.enableSourceMaps(!Encore.isProduction())
// enables hashed filenames (e.g. app.abc123.css)
.enableVersioning(Encore.isProduction())
// enables Sass/SCSS support
.enableSassLoader()
// uncomment if you use TypeScript
//.enableTypeScriptLoader()
// uncomment to get integrity="..." attributes on your script & link tags
// requires WebpackEncoreBundle 1.4 or higher
//.enableIntegrityHashes(Encore.isProduction())
// uncomment if you're having problems with a jQuery plugin
//.autoProvidejQuery()
// uncomment if you use API Platform Admin (composer require api-admin)
//.enableReactPreset()
//.addEntry('admin', './assets/admin.js')
.autoProvideVariables({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery',
moment: 'moment',
boostrap: 'bootstrap'
})
;
module.exports = Encore.getWebpackConfig();