Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boostrap update to v4.2 #228

Merged
merged 3 commits into from
Feb 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@
### Changed

- `LYO_BASE` is replaced with `LYO_BASEURL`. To override the Base URL of the adaptor, use the `baseurl` property. This release makes the use of this property consistent and check the `LYO_BASEURL` environment variable instead of `LYO_BASE`.
- Upgraded the frontend libraries from Bootstrap v4.0.0-beta to v4.2.1.

### Deprecated

### Removed

- The CSS and JS assets from Bootstrap are no longer bundled. The following files should be removed from the generated codebase:
- `src/main/webapp/static/css/bootstrap-4.0.0-beta.min.css`
- `src/main/webapp/static/js/bootstrap-4.0.0-beta.min.js`
- `src/main/webapp/static/js/jquery-3.2.1.min.js`
- `src/main/webapp/static/js/popper-1.11.0.min.js`

### Fixed

---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[comment encoding = UTF-8 /]
[comment
/*
* Copyright (c) 2020 Contributors to the Eclipse Foundation
* Copyright (c) 2021 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand All @@ -24,14 +24,16 @@
[import org::eclipse::lyo::oslc4j::codegenerator::services::jspServices/]
[import org::eclipse::lyo::oslc4j::codegenerator::services::resourcePropertyToHtml/]

[import org::eclipse::lyo::oslc4j::codegenerator::staticFiles::generateCssAndJsFiles/]

[template public generateGetResourceJsp(aResource : Resource, contextAdaptorInterface : AdaptorInterface, managingAdaptorInterface: AdaptorInterface, defaultJavaClassPackageName : String)]
[if (contextAdaptorInterface.generateJspFile(getResourceJspFullFileName(aResource, contextAdaptorInterface)))]
[if (not contextAdaptorInterface.generateJspFilesForOslcUI())]
[file (getResourceJspFullFileName(aResource, contextAdaptorInterface), false, 'UTF-8')]
<%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%>
<!DOCTYPE html>
<%--
Copyright (c) 2020 Contributors to the Eclipse Foundation
Copyright (c) 2021 Contributors to the Eclipse Foundation

See the NOTICE file(s) distributed with this work for additional
information regarding copyright ownership.
Expand Down Expand Up @@ -82,12 +84,9 @@

<title><%= a[javaName(aResource, true)/].toString() %></title>

<link href="<c:url value="/static/css/bootstrap-4.0.0-beta.min.css"/>" rel="stylesheet">
[generateBootstrapTags()/]
<link href="<c:url value="/static/css/adaptor.css"/>" rel="stylesheet">

<script src="<c:url value="/static/js/jquery-3.2.1.min.js"/>"></script>
<script src="<c:url value="/static/js/popper-1.11.0.min.js"/>"></script>
<script src="<c:url value="/static/js/bootstrap-4.0.0-beta.min.js"/>"></script>
<script src="<c:url value="/static/js/ui-preview-helper.js"/>"></script>
<script type="text/javascript">
$(function () {setupUiPreviewOnPopover($("a.oslc-resource-link"));});
Expand All @@ -98,8 +97,8 @@
<!-- Fixed navbar -->
<nav class="navbar navbar-expand-lg sticky-top navbar-light bg-light">
<div class="container">
<a class="navbar-brand" href="<c:url value="/"/>"><%= application.getServletContextName() %></a>
<ul class="navbar-nav mr-auto">
<li class="nav-item"><a class="nav-link" href="<c:url value="/"/>"><%= application.getServletContextName() %></a></li>
<li class="nav-item"><a class="nav-link" href="<c:url value="<%= catalogUrl %>"/>">Service Provider Catalog</a></li>
<li class="nav-item"><a class="nav-link" href="<c:url value="[swaggerIndexJspRelativeFileName(contextAdaptorInterface)/]"/>">Swagger UI</a></li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
[import org::eclipse::lyo::oslc4j::codegenerator::services::jspServices/]
[import org::eclipse::lyo::oslc4j::codegenerator::services::resourcePropertyToHtml/]

[import org::eclipse::lyo::oslc4j::codegenerator::staticFiles::generateCssAndJsFiles/]

[template public generateGetResourceLargePreviewJsp(aResource : Resource, contextAdaptorInterface : AdaptorInterface, managingAdaptorInterface: AdaptorInterface, defaultJavaClassPackageName : String)]
[if (contextAdaptorInterface.generateJspFile(getResourceLargePreviewJspFullFileName(aResource, contextAdaptorInterface)))]
[if (not contextAdaptorInterface.generateJspFilesForOslcUI())]
Expand Down Expand Up @@ -77,17 +79,11 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title><%= a[javaName(aResource, true)/].toString() %></title>

<link href="<c:url value="/static/css/bootstrap-4.0.0-beta.min.css"/>" rel="stylesheet">
[generateBootstrapTags()/]
<link href="<c:url value="/static/css/adaptor.css"/>" rel="stylesheet">

<script src="<c:url value="/static/js/jquery-3.2.1.min.js"/>"></script>
<script src="<c:url value="/static/js/popper-1.11.0.min.js"/>"></script>
<script src="<c:url value="/static/js/bootstrap-4.0.0-beta.min.js"/>"></script>
</head>

<body>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[comment encoding = UTF-8 /]
[comment
/*
* Copyright (c) 2020 Contributors to the Eclipse Foundation
* Copyright (c) 2022 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand All @@ -24,14 +24,16 @@
[import org::eclipse::lyo::oslc4j::codegenerator::services::jspServices/]
[import org::eclipse::lyo::oslc4j::codegenerator::services::resourcePropertyToHtml/]

[import org::eclipse::lyo::oslc4j::codegenerator::staticFiles::generateCssAndJsFiles/]

[template public generateGetResourceSmallPreviewJsp(aResource : Resource, contextAdaptorInterface : AdaptorInterface, managingAdaptorInterface: AdaptorInterface, defaultJavaClassPackageName : String)]
[if (contextAdaptorInterface.generateJspFile(getResourceSmallPreviewJspFullFileName(aResource, contextAdaptorInterface)))]
[if (not contextAdaptorInterface.generateJspFilesForOslcUI())]
[file (getResourceSmallPreviewJspFullFileName(aResource, contextAdaptorInterface), false, 'UTF-8')]
<%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%>
<!DOCTYPE html>
<%--
Copyright (c) 2020 Contributors to the Eclipse Foundation
Copyright (c) 2022 Contributors to the Eclipse Foundation

See the NOTICE file(s) distributed with this work for additional
information regarding copyright ownership.
Expand Down Expand Up @@ -76,18 +78,12 @@

<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title><%= a[javaName(aResource, true)/].toString() %></title>

<link href="<c:url value="/static/css/bootstrap-4.0.0-beta.min.css"/>" rel="stylesheet">
<link href="<c:url value="/static/css/adaptor.css"/>" rel="stylesheet">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title><%= a[javaName(aResource, true)/].toString() %></title>

<script src="<c:url value="/static/js/jquery-3.2.1.min.js"/>"></script>
<script src="<c:url value="/static/js/popper-1.11.0.min.js"/>"></script>
<script src="<c:url value="/static/js/bootstrap-4.0.0-beta.min.js"/>"></script>
[generateBootstrapTags()/]
<link href="<c:url value="/static/css/adaptor.css"/>" rel="stylesheet">
</head>

<body>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[comment encoding = UTF-8 /]
[comment
/*
* Copyright (c) 2020 Contributors to the Eclipse Foundation
* Copyright (c) 2022 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand All @@ -24,14 +24,16 @@
[import org::eclipse::lyo::oslc4j::codegenerator::services::jspServices/]
[import org::eclipse::lyo::oslc4j::codegenerator::services::resourcePropertyToHtml/]

[import org::eclipse::lyo::oslc4j::codegenerator::staticFiles::generateCssAndJsFiles/]

[template public generateGetResourceViewForOslcUIJsp(contextAdaptorInterface : AdaptorInterface)]
[if (contextAdaptorInterface.generateJspFile(getResourceViewForOslcUIJspFullFileName(contextAdaptorInterface)))]
[if (contextAdaptorInterface.generateJspFilesForOslcUI())]
[file (getResourceViewForOslcUIJspFullFileName(contextAdaptorInterface), false, 'UTF-8')]
<%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%>
<!DOCTYPE html>
<%--
Copyright (c) 2020 Contributors to the Eclipse Foundation
Copyright (c) 2022 Contributors to the Eclipse Foundation

See the NOTICE file(s) distributed with this work for additional
information regarding copyright ownership.
Expand Down Expand Up @@ -77,26 +79,20 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title><%= aResource.toString() %></title>

<link href="<c:url value="/static/css/bootstrap-4.0.0-beta.min.css"/>" rel="stylesheet">
[generateBootstrapTags()/]
<link href="<c:url value="/static/css/adaptor.css"/>" rel="stylesheet">

<script src="<c:url value="/static/js/jquery-3.2.1.min.js"/>"></script>
<script src="<c:url value="/static/js/popper-1.11.0.min.js"/>"></script>
<script src="<c:url value="/static/js/bootstrap-4.0.0-beta.min.js"/>"></script>
<script src="<c:url value="/static/js/ui-preview-helper.js"/>"></script>
</head>

<body>
<!-- Fixed navbar -->
<nav class="navbar navbar-expand-lg sticky-top navbar-light bg-light">
<div class="container">
<a class="navbar-brand" href="<c:url value="/"/>"><%= application.getServletContextName() %></a>
<ul class="navbar-nav mr-auto">
<li class="nav-item"><a class="nav-link" href="<c:url value="/"/>"><%= application.getServletContextName() %></a></li>
<li class="nav-item"><a class="nav-link" href="<c:url value="<%= catalogUrl %>"/>">Service Provider Catalog</a></li>
<li class="nav-item"><a class="nav-link" href="<c:url value="[swaggerIndexJspRelativeFileName(contextAdaptorInterface)/]"/>">Swagger UI</a></li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[comment encoding = UTF-8 /]
[comment
/*
* Copyright (c) 2020 Contributors to the Eclipse Foundation
* Copyright (c) 2022 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand All @@ -20,13 +20,15 @@
[import org::eclipse::lyo::oslc4j::codegenerator::services::jspServices/]
[import org::eclipse::lyo::oslc4j::codegenerator::services::adaptorInterfaceServices/]

[import org::eclipse::lyo::oslc4j::codegenerator::staticFiles::generateCssAndJsFiles/]

[template public generateIndexJsp(anAdaptorInterface : AdaptorInterface)]
[if (anAdaptorInterface.generateJspFile(webFilesBasePath(anAdaptorInterface).concatenatePaths('index.jsp')))]
[file (webFilesBasePath(anAdaptorInterface).concatenatePaths('index.jsp'), false, 'UTF-8')]
<%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%>
<!DOCTYPE html>
<%--
Copyright (c) 2020 Contributors to the Eclipse Foundation
Copyright (c) 2022 Contributors to the Eclipse Foundation

See the NOTICE file(s) distributed with this work for additional
information regarding copyright ownership.
Expand Down Expand Up @@ -54,11 +56,8 @@
<!-- Latest compiled and minified CSS -->
<title>Adaptor home</title>

<link href="<c:url value="/static/css/bootstrap-4.0.0-beta.min.css"/>" rel="stylesheet">
<link href="<c:url value="/static/css/adaptor.css"/>" rel="stylesheet">

<script src="<c:url value="/static/js/jquery-3.2.1.min.js"/>"></script>
<script src="<c:url value="/static/js/bootstrap-4.0.0-beta.min.js"/>"></script>
[generateBootstrapTags()/]
<link href="<c:url value="/static/css/adaptor.css"/>" rel="stylesheet">
</head>
<body>
<div class="container">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[comment encoding = UTF-8 /]
[comment
/*
* Copyright (c) 2020 Contributors to the Eclipse Foundation
* Copyright (c) 2022 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand All @@ -21,14 +21,16 @@
[import org::eclipse::lyo::oslc4j::codegenerator::services::resourceServices/]
[import org::eclipse::lyo::oslc4j::codegenerator::services::jspServices/]

[import org::eclipse::lyo::oslc4j::codegenerator::staticFiles::generateCssAndJsFiles/]

[template public generateResourceCollectionJsp(aQueryCapability: QueryCapability)]
[if (containingAdaptorInterface(aQueryCapability).generateJspFile(resourceCollectionJspFullFileName(aQueryCapability)))]
[file (resourceCollectionJspFullFileName(aQueryCapability), false, 'UTF-8')]
[let anAdaptorInterface: AdaptorInterface = containingAdaptorInterface(aQueryCapability)]
<%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%>
<!DOCTYPE html>
<%--
Copyright (c) 2020 Contributors to the Eclipse Foundation
Copyright (c) 2022 Contributors to the Eclipse Foundation

See the NOTICE file(s) distributed with this work for additional
information regarding copyright ownership.
Expand Down Expand Up @@ -69,12 +71,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Query capability [aQueryCapability.title/]</title>

<link href="<c:url value="/static/css/bootstrap-4.0.0-beta.min.css"/>" rel="stylesheet">
[generateBootstrapTags()/]
<link href="<c:url value="/static/css/adaptor.css"/>" rel="stylesheet">

<script src="<c:url value="/static/js/jquery-3.2.1.min.js"/>"></script>
<script src="<c:url value="/static/js/popper-1.11.0.min.js"/>"></script>
<script src="<c:url value="/static/js/bootstrap-4.0.0-beta.min.js"/>"></script>
<script src="<c:url value="/static/js/ui-preview-helper.js"/>"></script>
<script type="text/javascript">
$(function () {setupUiPreviewOnPopover($("a.oslc-resource-link"));});
Expand All @@ -85,8 +83,8 @@
<!-- Fixed navbar -->
<nav class="navbar navbar-expand-lg sticky-top navbar-light bg-light">
<div class="container">
<a class="navbar-brand" href="<c:url value="/"/>"><%= application.getServletContextName() %></a>
<ul class="navbar-nav mr-auto">
<li class="nav-item"><a class="nav-link" href="<c:url value="/"/>"><%= application.getServletContextName() %></a></li>
<li class="nav-item"><a class="nav-link" href="<c:url value="<%= catalogUrl %>"/>">Service Provider Catalog</a></li>
<li class="nav-item"><a class="nav-link" href="<c:url value="[swaggerIndexJspRelativeFileName(anAdaptorInterface)/]"/>">Swagger UI</a></li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[comment encoding = UTF-8 /]
[comment
/*
* Copyright (c) 2020 Contributors to the Eclipse Foundation
* Copyright (c) 2022 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand All @@ -23,14 +23,16 @@
[import org::eclipse::lyo::oslc4j::codegenerator::services::jspServices/]
[import org::eclipse::lyo::oslc4j::codegenerator::services::adaptorInterfaceServices/]

[import org::eclipse::lyo::oslc4j::codegenerator::staticFiles::generateCssAndJsFiles/]

[template public generateResourceCreatorClientJsp(anAdaptorInterface: AdaptorInterface)]
[if (anAdaptorInterface.generateJspFile(resourceCreatorClientJspFullFileName(anAdaptorInterface)))]
[file (resourceCreatorClientJspFullFileName(anAdaptorInterface), false, 'UTF-8')]
<%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<%--
Copyright (c) 2020 Contributors to the Eclipse Foundation
Copyright (c) 2022 Contributors to the Eclipse Foundation

See the NOTICE file(s) distributed with this work for additional
information regarding copyright ownership.
Expand All @@ -53,25 +55,23 @@
creationDialogUri += "#oslc-core-postMessage-1.0";
String catalogUrl = UriBuilder.fromUri(OSLC4JUtils.getServletURI()).path("/catalog/singleton").build().toString();
%>
<html>
<html lang="en">
<head>
<title>Creation Dialog client</title>

<link href="<c:url value="/static/css/bootstrap-4.0.0-beta.min.css"/>" rel="stylesheet">
<link href="<c:url value="/static/css/adaptor.css"/>" rel="stylesheet">

<script src="<c:url value="/static/js/jquery-3.2.1.min.js"/>"></script>
<script src="<c:url value="/static/js/popper-1.11.0.min.js"/>"></script>
<script src="<c:url value="/static/js/bootstrap-4.0.0-beta.min.js"/>"></script>
<script src="<c:url value="/static/js/delegated-ui-helper.js"/>"></script>
<script src="<c:url value="/static/js/ui-preview-helper.js"/>"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Creation Dialog client</title>

[generateBootstrapTags()/]
<link href="<c:url value="/static/css/adaptor.css"/>" rel="stylesheet">
<script src="<c:url value="/static/js/delegated-ui-helper.js"/>"></script>
<script src="<c:url value="/static/js/ui-preview-helper.js"/>"></script>
</head>
<body>

<nav class="navbar navbar-expand-lg sticky-top navbar-light bg-light">
<div class="container">
<a class="navbar-brand" href="<c:url value="/"/>"><%= application.getServletContextName() %></a>
<ul class="navbar-nav mr-auto">
<li class="nav-item"><a class="nav-link" href="<c:url value="/"/>"><%= application.getServletContextName() %></a></li>
<li class="nav-item"><a class="nav-link" href="<c:url value="<%= catalogUrl %>"/>">Service Provider Catalog</a></li>
<li class="nav-item"><a class="nav-link" href="<c:url value="[swaggerIndexJspRelativeFileName(anAdaptorInterface)/]"/>">Swagger UI</a></li>
</ul>
Expand Down
Loading