-
-
-
-
-
-
-
- | Configuration Id |
- Configuration Name |
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Welcome To The Configuration App
+
+
Current Configurations (All)
+
+
+
+
+
+ | Config ID |
+ Config Name |
+ Config Date |
+
+
+
+
+
To Add a Configuration
+
+
+
+
To Delete ALL Configurations for a Selected Month
+
+
+
To Delete a SINGLE Configuration
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/configurationapp/src/main/resources/static/js/app.js b/configurationapp/src/main/resources/static/js/app.js
index 2d4b945..9ba6a11 100644
--- a/configurationapp/src/main/resources/static/js/app.js
+++ b/configurationapp/src/main/resources/static/js/app.js
@@ -14,12 +14,14 @@
App.prototype.init = function() {
$('#configTable').DataTable({
scrollY: 300,
- paging: false,
- sorting: false,
+ paging: true,
+ sorting: true,
+ ordering: true,
+ select: true,
searching: false,
info: false
});
};
window.app = new App;
-})($);
\ No newline at end of file
+})($);
diff --git a/configurationapp/src/main/resources/static/js/jquery.spring-friendly.js b/configurationapp/src/main/resources/static/js/jquery.spring-friendly.js
new file mode 100755
index 0000000..c786bdd
--- /dev/null
+++ b/configurationapp/src/main/resources/static/js/jquery.spring-friendly.js
@@ -0,0 +1,73 @@
+// From https://github.com/jquery/jquery/blob/master/src/serialize.js
+// Overrides data serialization to allow Spring MVC to correctly map input parameters : column[0][data] now becomes column[0].data
+(function($) {
+ var r20 = /%20/g, rbracket = /\[\]$/, rCRLF = /\r?\n/g, rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, rsubmittable = /^(?:input|select|textarea|keygen)/i;
+
+ function customBuildParams(prefix, obj, traditional, add) {
+ var name;
+
+ if (jQuery.isArray(obj)) {
+ // Serialize array item.
+ jQuery.each(obj, function(i, v) {
+ if (traditional || rbracket.test(prefix)) {
+ // Treat each array item as a scalar.
+ add(prefix, v);
+
+ } else {
+ // Item is non-scalar (array or object), encode its numeric
+ // index.
+ customBuildParams(prefix + "["
+ + (typeof v === "object" ? i : "") + "]", v,
+ traditional, add);
+ }
+ });
+
+ } else if (!traditional && jQuery.type(obj) === "object") {
+ // Serialize object item.
+ for (name in obj) {
+ // This is where the magic happens
+ customBuildParams(prefix + "." + name, obj[name], traditional,
+ add);
+ }
+
+ } else {
+ // Serialize scalar item.
+ add(prefix, obj);
+ }
+ }
+
+ $.param = function(a, traditional) {
+ var prefix, s = [], add = function(key, value) {
+ // If value is a function, invoke it and return its value
+ value = jQuery.isFunction(value) ? value() : (value == null ? ""
+ : value);
+ s[s.length] = encodeURIComponent(key) + "="
+ + encodeURIComponent(value);
+ };
+
+ // Set traditional to true for jQuery <= 1.3.2 behavior.
+ if (traditional === undefined) {
+ traditional = jQuery.ajaxSettings
+ && jQuery.ajaxSettings.traditional;
+ }
+
+ // If an array was passed in, assume that it is an array of form
+ // elements.
+ if (jQuery.isArray(a) || (a.jquery && !jQuery.isPlainObject(a))) {
+ // Serialize the form elements
+ jQuery.each(a, function() {
+ add(this.name, this.value);
+ });
+
+ } else {
+ // If traditional, encode the "old" way (the way 1.3.2 or older
+ // did it), otherwise encode params recursively.
+ for (prefix in a) {
+ customBuildParams(prefix, a[prefix], traditional, add);
+ }
+ }
+
+ // Return the resulting serialization
+ return s.join("&").replace(r20, "+");
+ };
+})(jQuery);
\ No newline at end of file
diff --git a/configurationapp/src/test/com/att/BootstrapTest.java b/configurationapp/src/test/com/att/BootstrapTest.java
new file mode 100644
index 0000000..77e2305
--- /dev/null
+++ b/configurationapp/src/test/com/att/BootstrapTest.java
@@ -0,0 +1,48 @@
+package com.att;
+
+/**
+ *
java.com.att.BootstrapTest
+ * Description :
+ *
+ * @author gcanter
+ * on 2019-06-24
+ */
+
+
+import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic;
+import static org.apache.commons.lang3.RandomStringUtils.randomNumeric;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import org.junit.Test;
+
+
+import org.springframework.http.HttpStatus;
+
+import io.restassured.RestAssured;
+import io.restassured.response.Response;
+
+public class BootstrapTest {
+
+ private static final String API_ROOT = "http://localhost:9000";
+
+
+ // test to see if connection to http://localhost:9000 is working and returns all data
+ @Test
+ public void whenGetAllConfigs_thenOK() {
+ final Response response = RestAssured.get(API_ROOT);
+ assertEquals(HttpStatus.OK.value(), response.getStatusCode());
+ }
+
+ // Test to see if app returns just 1 single record
+
+
+
+
+
+
+
+
+
+
+
+}
diff --git a/configurationapp/src/test/com/att/SpringContextIntegrationTest.java b/configurationapp/src/test/com/att/SpringContextIntegrationTest.java
new file mode 100644
index 0000000..2495f44
--- /dev/null
+++ b/configurationapp/src/test/com/att/SpringContextIntegrationTest.java
@@ -0,0 +1,24 @@
+package com.att;
+
+/**
+ *
java.com.att.SpringContextIntegrationTest
+ * Description : Tests the Spring Context Integration to see if it loads. I always include it in
+ * all of my Spring Boot projects as the first test *
+ * @author gcanter
+ * on 2019-06-24
+ */
+
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest
+public class SpringContextIntegrationTest {
+
+ @Test
+ public void contextLoads() {
+ }
+}
diff --git a/configurationapp/target/classes/application.properties b/configurationapp/target/classes/application.properties
new file mode 100644
index 0000000..e17ca3f
--- /dev/null
+++ b/configurationapp/target/classes/application.properties
@@ -0,0 +1,17 @@
+server.port=9000
+spring.mvc.favicon.enabled=false
+
+logging.level.root=WARN
+logging.level.org.springframework.web=DEBUG
+logging.level.org.hibernate=ERROR
+
+spring.h2.console.enabled=true
+
+spring.datasource.url=jdbc:h2:mem:testdb
+
+#spring.datasource.url=jdbc:h2:file:/data/demo
+
+spring.datasource.driverClassName=org.h2.Driver
+spring.datasource.username=sa
+spring.datasource.password=
+spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
\ No newline at end of file
diff --git a/configurationapp/target/classes/data.sql b/configurationapp/target/classes/data.sql
new file mode 100644
index 0000000..9ce4cf4
--- /dev/null
+++ b/configurationapp/target/classes/data.sql
@@ -0,0 +1,4 @@
+INSERT INTO CONFIGVALUES (config_Name, config_Date) VALUES ('A', '022019');
+INSERT INTO CONFIGVALUES (config_Name, config_Date) VALUES ('B', '022019');
+INSERT INTO CONFIGVALUES (config_Name, config_Date) VALUES ('C', '032019');
+INSERT INTO CONFIGVALUES (config_Name, config_Date) VALUES ('D', '042019');
\ No newline at end of file
diff --git a/configurationapp/target/classes/static/index.html b/configurationapp/target/classes/static/index.html
new file mode 100755
index 0000000..fc8e983
--- /dev/null
+++ b/configurationapp/target/classes/static/index.html
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
DataTables
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Welcome To The Configuration App
+
+
Current Configurations (All)
+
+
+
+
+
+ | Config ID |
+ Config Name |
+ Config Date |
+
+
+
+
+
+
To Add a Configuration
+
+
+
+
To Delete ALL Configurations for a Selected Month
+
+
+
To Delete a SINGLE Configuration
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/configurationapp/target/classes/static/js/app.js b/configurationapp/target/classes/static/js/app.js
new file mode 100644
index 0000000..9ba6a11
--- /dev/null
+++ b/configurationapp/target/classes/static/js/app.js
@@ -0,0 +1,27 @@
+(function() {
+ function App() {
+
+ }
+
+ App.prototype.getData = function() {
+ $.ajax('',{
+
+ }).then(function(data) {
+
+ })
+ };
+
+ App.prototype.init = function() {
+ $('#configTable').DataTable({
+ scrollY: 300,
+ paging: true,
+ sorting: true,
+ ordering: true,
+ select: true,
+ searching: false,
+ info: false
+ });
+ };
+
+ window.app = new App;
+})($);
diff --git a/configurationapp/target/classes/static/js/jquery.spring-friendly.js b/configurationapp/target/classes/static/js/jquery.spring-friendly.js
new file mode 100755
index 0000000..c786bdd
--- /dev/null
+++ b/configurationapp/target/classes/static/js/jquery.spring-friendly.js
@@ -0,0 +1,73 @@
+// From https://github.com/jquery/jquery/blob/master/src/serialize.js
+// Overrides data serialization to allow Spring MVC to correctly map input parameters : column[0][data] now becomes column[0].data
+(function($) {
+ var r20 = /%20/g, rbracket = /\[\]$/, rCRLF = /\r?\n/g, rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, rsubmittable = /^(?:input|select|textarea|keygen)/i;
+
+ function customBuildParams(prefix, obj, traditional, add) {
+ var name;
+
+ if (jQuery.isArray(obj)) {
+ // Serialize array item.
+ jQuery.each(obj, function(i, v) {
+ if (traditional || rbracket.test(prefix)) {
+ // Treat each array item as a scalar.
+ add(prefix, v);
+
+ } else {
+ // Item is non-scalar (array or object), encode its numeric
+ // index.
+ customBuildParams(prefix + "["
+ + (typeof v === "object" ? i : "") + "]", v,
+ traditional, add);
+ }
+ });
+
+ } else if (!traditional && jQuery.type(obj) === "object") {
+ // Serialize object item.
+ for (name in obj) {
+ // This is where the magic happens
+ customBuildParams(prefix + "." + name, obj[name], traditional,
+ add);
+ }
+
+ } else {
+ // Serialize scalar item.
+ add(prefix, obj);
+ }
+ }
+
+ $.param = function(a, traditional) {
+ var prefix, s = [], add = function(key, value) {
+ // If value is a function, invoke it and return its value
+ value = jQuery.isFunction(value) ? value() : (value == null ? ""
+ : value);
+ s[s.length] = encodeURIComponent(key) + "="
+ + encodeURIComponent(value);
+ };
+
+ // Set traditional to true for jQuery <= 1.3.2 behavior.
+ if (traditional === undefined) {
+ traditional = jQuery.ajaxSettings
+ && jQuery.ajaxSettings.traditional;
+ }
+
+ // If an array was passed in, assume that it is an array of form
+ // elements.
+ if (jQuery.isArray(a) || (a.jquery && !jQuery.isPlainObject(a))) {
+ // Serialize the form elements
+ jQuery.each(a, function() {
+ add(this.name, this.value);
+ });
+
+ } else {
+ // If traditional, encode the "old" way (the way 1.3.2 or older
+ // did it), otherwise encode params recursively.
+ for (prefix in a) {
+ customBuildParams(prefix, a[prefix], traditional, add);
+ }
+ }
+
+ // Return the resulting serialization
+ return s.join("&").replace(r20, "+");
+ };
+})(jQuery);
\ No newline at end of file
diff --git a/configurationapp/target/configurationapp.jar.original b/configurationapp/target/configurationapp.jar.original
new file mode 100644
index 0000000..a2dfe08
Binary files /dev/null and b/configurationapp/target/configurationapp.jar.original differ
diff --git a/configurationapp/target/maven-archiver/pom.properties b/configurationapp/target/maven-archiver/pom.properties
new file mode 100644
index 0000000..02b9c6b
--- /dev/null
+++ b/configurationapp/target/maven-archiver/pom.properties
@@ -0,0 +1,4 @@
+#Created by Apache Maven 3.6.0
+groupId=com.att
+artifactId=configurationapp
+version=0.0.1-SNAPSHOT
diff --git a/configurationapp/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/configurationapp/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
new file mode 100644
index 0000000..4e0519f
--- /dev/null
+++ b/configurationapp/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
@@ -0,0 +1,5 @@
+com/att/dao/configurations/ConfigurationDao.class
+com/att/ConfigurationApp.class
+com/att/web/configuarations/ConfigurationController.class
+com/att/dao/configurations/ConfigurationDao$IdProvider.class
+com/att/data/configurations/ConfigValue.class
diff --git a/configurationapp/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/configurationapp/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
new file mode 100644
index 0000000..6aa7b0a
--- /dev/null
+++ b/configurationapp/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
@@ -0,0 +1,4 @@
+/Users/gcanter/dev/springboot/configurationapp/src/main/java/com/att/dao/configurations/ConfigurationDao.java
+/Users/gcanter/dev/springboot/configurationapp/src/main/java/com/att/ConfigurationApp.java
+/Users/gcanter/dev/springboot/configurationapp/src/main/java/com/att/data/configurations/ConfigValue.java
+/Users/gcanter/dev/springboot/configurationapp/src/main/java/com/att/web/configuarations/ConfigurationController.java