Skip to content
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
14 changes: 14 additions & 0 deletions container/oracle/initdb.d/02_ddl.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,18 @@ CREATE TABLE SMOOTHNESS_OWNER.MOVIE
MPAA_RATING VARCHAR2(5 CHAR) NULL CONSTRAINT MOVIE_CK1 CHECK (MPAA_RATING IN ('G', 'PG', 'PG-13', 'R', 'NC-17')),
DURATION_MINUTES INTEGER NULL ,
CONSTRAINT MOVIE_PK PRIMARY KEY (MOVIE_ID)
);

CREATE TABLE SMOOTHNESS_OWNER.SETTING
(
KEY VARCHAR2(128 CHAR) NOT NULL,
VALUE VARCHAR2(4000 BYTE) NOT NULL,
TYPE VARCHAR2(32 CHAR) DEFAULT 'STRING' NOT NULL,
DESCRIPTION VARCHAR2(2048 CHAR) NOT NULL,
TAG VARCHAR2(32 CHAR) DEFAULT 'OTHER' NOT NULL,
WEIGHT INTEGER DEFAULT 0 NOT NULL,
CHANGE_ACTION_JNDI VARCHAR2(128 CHAR) NULL ,
CONSTRAINT SETTING_PK PRIMARY KEY (KEY),
CONSTRAINT SETTING_CK1 CHECK (TYPE IN ('STRING', 'BOOLEAN', 'CSV')),
CONSTRAINT SETTING_CK2 CHECK ((VALUE in ('Y', 'N') AND TYPE = 'BOOLEAN') OR TYPE <> 'BOOLEAN')
);
5 changes: 4 additions & 1 deletion container/oracle/initdb.d/03_default_data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ insert into SMOOTHNESS_OWNER.MOVIE (MOVIE_ID, TITLE, RELEASE_DATE, DESCRIPTION,
insert into SMOOTHNESS_OWNER.MOVIE (MOVIE_ID, TITLE, RELEASE_DATE, DESCRIPTION, MPAA_RATING, DURATION_MINUTES) values (SMOOTHNESS_OWNER.MOVIE_ID.nextval, 'Star Wars: Episode IV - A New Hope', TO_DATE('1977/05/25', 'yyyy/mm/dd'), 'Luke Skywalker joins forces with a Jedi Knight, a cocky pilot, a Wookiee and two droids to save the galaxy from the Empire''s world-destroying battle station, while also attempting to rescue Princess Leia from the mysterious Darth Vader.', 'PG', 121);
insert into SMOOTHNESS_OWNER.MOVIE (MOVIE_ID, TITLE, RELEASE_DATE, DESCRIPTION, MPAA_RATING, DURATION_MINUTES) values (SMOOTHNESS_OWNER.MOVIE_ID.nextval, 'Jaws', TO_DATE('1975/06/20', 'yyyy/mm/dd'), 'When a killer shark unleashes chaos on a beach community off Long Island, it''s up to a local sheriff, a marine biologist, and an old seafarer to hunt the beast down.', 'PG', 124);

commit;
insert into SMOOTHNESS_OWNER.SETTING (KEY, VALUE, TYPE, DESCRIPTION, TAG, WEIGHT) values ('ADMIN_ROLE_NAME', 'smoothness-demo-admin', 'STRING', 'App-specific Admin Role Name', 'AUTH', 1);
insert into SMOOTHNESS_OWNER.SETTING (KEY, VALUE, TYPE, DESCRIPTION, TAG, WEIGHT) values ('SMOOTHNESS_CDN', 'N', 'BOOLEAN', 'Smoothness weblib resources from CDN. Defaults to No = serve files locally. CDN is for minified/combined files on shared Content Delivery Network (CDN) server - Nice for when multiple apps use same resources to have warm cache.', 'CDN', 1);
insert into SMOOTHNESS_OWNER.SETTING (KEY, VALUE, TYPE, DESCRIPTION, TAG, WEIGHT) values ('SMOOTHNESS_SERVER', 'ace.jlab.org/cdn', 'STRING', 'Host name and port of content delivery network host for shared smoothness resources. Only used if SMOOTHNESS_LOCATION=CDN', 'CDN', 2);
insert into SMOOTHNESS_OWNER.SETTING (KEY, VALUE, TYPE, DESCRIPTION, TAG, WEIGHT) values ('SMOOTHNESS_VERSION', '4.10.4', 'STRING', 'Version of smoothness lib on CDN. Only used if SMOOTHNESS_LOCATION=CDN', 'CDN', 3);

This file was deleted.

2 changes: 2 additions & 0 deletions smoothness-demo/src/main/resources/META-INF/persistence.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
<properties>
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle12cDialect"/>
<property name="hibernate.default_schema" value="smoothness_owner"/>
</properties>
<class>org.jlab.smoothness.persistence.entity.Setting</class>
</persistence-unit>
</persistence>
Original file line number Diff line number Diff line change
@@ -1,53 +1,55 @@
<s:editable-row-table-dialog>
<form id="row-form">
<ul class="key-value-list">
<li>
<div class="li-key">
<label for="row-title">Title</label>
</div>
<div class="li-value">
<input type="text" maxlength="128" required="required" id="row-title"/>
</div>
</li>
<li>
<div class="li-key">
<label for="row-description">Description</label>
</div>
<div class="li-value">
<textarea maxlength="512" required="required" id="row-description"></textarea>
</div>
</li>
<li>
<div class="li-key">
<label for="row-rating">MPAA Rating</label>
</div>
<div class="li-value">
<select id="row-rating">
<option value="">&nbsp;</option>
<option>G</option>
<option>PG</option>
<option>PG-13</option>
<option>R</option>
<option>NC-17</option>
</select>
</div>
</li>
<li>
<div class="li-key">
<label for="row-duration">Duration (Minutes)</label>
</div>
<div class="li-value">
<input type="number" min="0" id="row-duration"/>
</div>
</li>
<li>
<div class="li-key">
<label for="row-release">Release Date</label>
</div>
<div class="li-value">
<input type="text" id="row-release" class="date-field" placeholder="${s:getFriendlyDatePlaceholder()}" autocomplete="off"/>
</div>
</li>
</ul>
</form>
<section>
<form id="row-form">
<ul class="key-value-list">
<li>
<div class="li-key">
<label for="row-title">Title</label>
</div>
<div class="li-value">
<input type="text" maxlength="128" required="required" id="row-title"/>
</div>
</li>
<li>
<div class="li-key">
<label for="row-description">Description</label>
</div>
<div class="li-value">
<textarea maxlength="512" required="required" id="row-description"></textarea>
</div>
</li>
<li>
<div class="li-key">
<label for="row-rating">MPAA Rating</label>
</div>
<div class="li-value">
<select id="row-rating">
<option value="">&nbsp;</option>
<option>G</option>
<option>PG</option>
<option>PG-13</option>
<option>R</option>
<option>NC-17</option>
</select>
</div>
</li>
<li>
<div class="li-key">
<label for="row-duration">Duration (Minutes)</label>
</div>
<div class="li-value">
<input type="number" min="0" id="row-duration"/>
</div>
</li>
<li>
<div class="li-key">
<label for="row-release">Release Date</label>
</div>
<div class="li-value">
<input type="text" id="row-release" class="date-field" placeholder="${s:getFriendlyDatePlaceholder()}" autocomplete="off"/>
</div>
</li>
</ul>
</form>
</section>
</s:editable-row-table-dialog>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<%@tag description="App Style Tag" pageEncoding="UTF-8"%>
2 changes: 2 additions & 0 deletions smoothness-demo/src/main/webapp/WEB-INF/tags/app-style.tag
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<%@tag description="App Style Tag" pageEncoding="UTF-8"%>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/resources/v${initParam.releaseNumber}/css/demo.css"/>
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<%@tag description="The Feature Page Template" pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%>
<%@taglib prefix="t" tagdir="/WEB-INF/tags"%>
<%@taglib prefix="s" uri="http://jlab.org/jsp/smoothness"%>
<%@attribute name="title"%>
<%@attribute name="stylesheets" fragment="true"%>
<%@attribute name="scripts" fragment="true"%>
<t:page title="${title}" category="Features" description="Enumerates the features of the smoothness weblib.">
<s:page title="${title}" category="Features" description="Enumerates the features of the smoothness weblib.">
<jsp:attribute name="stylesheets">
<jsp:invoke fragment="stylesheets"/>
</jsp:attribute>
Expand All @@ -26,4 +26,4 @@
<jsp:body>
<jsp:doBody/>
</jsp:body>
</t:page>
</s:page>
2 changes: 2 additions & 0 deletions smoothness-demo/src/main/webapp/WEB-INF/tags/footnote.tag
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<%@tag description="Footnote Tag" pageEncoding="UTF-8"%>
<a href="https://jlab.org">Jefferson Lab</a>
2 changes: 2 additions & 0 deletions smoothness-demo/src/main/webapp/WEB-INF/tags/header-extra.tag
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<%@tag description="Header Extra Tag" pageEncoding="UTF-8"%>
<a href="https://github.com/JeffersonLab/jam">JAM</a> | <a href="https://github.com/JeffersonLab/btm">BTM</a> | <a href="https://github.com/JeffersonLab/cnm">CNM</a> | <a href="https://github.com/JeffersonLab/dtm">DTM</a> | <a href="https://github.com/JeffersonLab/srm">SRM</a>
77 changes: 0 additions & 77 deletions smoothness-demo/src/main/webapp/WEB-INF/tags/page.tag

This file was deleted.

27 changes: 27 additions & 0 deletions smoothness-demo/src/main/webapp/WEB-INF/tags/primary-nav.tag
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<%@tag description="Primary Navigation Tag" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="s" uri="http://jlab.org/jsp/smoothness"%>
<ul>
<li${'/overview' eq currentPath ? ' class="current-primary"' : ''}>
<a href="${pageContext.request.contextPath}/overview">Overview</a>
</li>
<li${fn:startsWith(currentPath, '/features') ? ' class="current-primary"' : ''}>
<a href="${pageContext.request.contextPath}/features/single-select-datatable">Features</a>
</li>
<li${fn:startsWith(currentPath, '/breadcrumbs') ? ' class="current-primary"' : ''}>
<a href="${pageContext.request.contextPath}/breadcrumbs/crumb-one">Breadcrumb</a>
</li>
<li${fn:startsWith(currentPath, '/reports') ? ' class="current-primary"' : ''}>
<a href="${pageContext.request.contextPath}/reports/report-one">Reports</a>
</li>
<c:if test="${pageContext.request.isUserInRole('smoothness-demo-admin')}">
<li${fn:startsWith(currentPath, '/setup') ? ' class="current-primary"' : ''}>
<a href="${pageContext.request.contextPath}/setup/settings">Setup</a>
</li>
</c:if>
<li${'/help' eq currentPath ? ' class="current-primary"' : ''}>
<a href="${pageContext.request.contextPath}/help">Help</a>
</li>
</ul>
6 changes: 3 additions & 3 deletions smoothness-demo/src/main/webapp/WEB-INF/tags/report-page.tag
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<%@tag description="The Report Page Template" pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%>
<%@taglib prefix="t" tagdir="/WEB-INF/tags"%>
<%@taglib prefix="s" uri="http://jlab.org/jsp/smoothness"%>
<%@attribute name="title"%>
<%@attribute name="stylesheets" fragment="true"%>
<%@attribute name="scripts" fragment="true"%>
<t:page title="${title}" category="Reports">
<s:page title="${title}" category="Reports">
<jsp:attribute name="stylesheets">
<jsp:invoke fragment="stylesheets"/>
</jsp:attribute>
Expand All @@ -26,4 +26,4 @@
<jsp:body>
<jsp:doBody/>
</jsp:body>
</t:page>
</s:page>
16 changes: 16 additions & 0 deletions smoothness-demo/src/main/webapp/WEB-INF/tags/setup-nav.tag
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<%@tag description="Setup Navigation Tag" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="s" uri="http://jlab.org/jsp/smoothness"%>
<ul>
<li${'/setup/settings' eq currentPath ? ' class="current-secondary"' : ''}>
<a href="${pageContext.request.contextPath}/setup/settings">Settings</a>
</li>
<li${'/setup/directory-cache' eq currentPath ? ' class="current-secondary"' : ''}>
<a href="${pageContext.request.contextPath}/setup/directory-cache">Directory Cache</a>
</li>
<li${'/setup/setup-one' eq currentPath ? ' class="current-secondary"' : ''}>
<a href="${pageContext.request.contextPath}/setup/setup-one">Setup One</a>
</li>
</ul>
26 changes: 0 additions & 26 deletions smoothness-demo/src/main/webapp/WEB-INF/tags/setup-page.tag

This file was deleted.

2 changes: 2 additions & 0 deletions smoothness-demo/src/main/webapp/WEB-INF/tags/user-extra.tag
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<%@tag description="User Extra Tag" pageEncoding="UTF-8"%>
<div>Welcome </div>
Loading
Loading