Skip to content

Commit bb43f04

Browse files
author
Steve Cody
committed
initial commit
1 parent af01488 commit bb43f04

177 files changed

Lines changed: 18290 additions & 2 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
*.class
2+
# editor (intellij)
3+
.idea/
4+
*.iml
5+
# Mobile Tools for Java (J2ME)
6+
.mtj.tmp/
7+
# Package Files #
8+
*.jar
9+
*.war
10+
*.ear
11+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
12+
hs_err_pid*
13+
.classpath
14+
.project
15+
/target
16+
.settings/
17+
phantomjsdriver.log
18+
/bin/
19+
/target/
20+
src/main/java/od/lti/LTIController.java
21+
LOG_FILE_IS_UNDEFINED
22+
LOG_FILE_IS_UNDEFINED*
23+
/node_modules
24+
/node
25+
od.log
26+
od.log*

Dockerfile

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
###############################################################################
2+
# Copyright 2015 Unicon (R) Licensed under the
3+
# Educational Community License, Version 2.0 (the "License"); you may
4+
# not use this file except in compliance with the License. You may
5+
# obtain a copy of the License at
6+
#
7+
# http://www.osedu.org/licenses/ECL-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing,
10+
# software distributed under the License is distributed on an "AS IS"
11+
# BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12+
# or implied. See the License for the specific language governing
13+
# permissions and limitations under the License.
14+
###############################################################################
15+
16+
# DOCKER-VERSION 1.8.1
17+
FROM ubuntu:14.04
18+
MAINTAINER Jason Brown "jbrown@unicon.net"
19+
20+
# make sure the package repository is up to date
21+
RUN echo "deb http://archive.ubuntu.com/ubuntu trusty main universe" > /etc/apt/sources.list
22+
RUN apt-get -y update
23+
24+
# install python-software-properties (so you can do add-apt-repository)
25+
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q python-software-properties software-properties-common
26+
27+
# Install Java.
28+
RUN \
29+
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
30+
add-apt-repository -y ppa:webupd8team/java && \
31+
apt-get update && \
32+
apt-get install -y oracle-java8-installer && \
33+
rm -rf /var/lib/apt/lists/* && \
34+
rm -rf /var/cache/oracle-jdk8-installer
35+
36+
# Create a directory for the app to live
37+
RUN mkdir opt/opendash/
38+
39+
# Open the docker port. (Still have to map the host port with run command)
40+
EXPOSE 8080
41+
42+
# CMD will be called when starting this container.
43+
WORKDIR /opt/opendash/
44+
CMD java -server -jar -Djava.security.egd=file:/dev/./urandom -Dspring.config.location=/opt/opendash/dev.properties opendash-0.1-SNAPSHOT.jar
45+

LICENSE

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
Educational Community License
2+
3+
Version 2.0, April 2007
4+
5+
http://www.osedu.org/licenses/
6+
7+
The Educational Community License version 2.0 ("ECL") consists of the Apache 2.0 license, modified to change the scope of the patent grant in section 3 to be specific to the needs of the education communities using this license. The original Apache 2.0 license can be found at: http://www.apache.org/licenses/LICENSE-2.0
8+
9+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
10+
11+
1. Definitions.
12+
13+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
14+
15+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
16+
17+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
18+
19+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
20+
21+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
22+
23+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
24+
25+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
26+
27+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
28+
29+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
30+
31+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
32+
33+
2. Grant of Copyright License.
34+
35+
Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
36+
37+
3. Grant of Patent License.
38+
39+
Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. Any patent license granted hereby with respect to contributions by an individual employed by an institution or organization is limited to patent claims where the individual that is the author of the Work is also the inventor of the patent claims licensed, and where the organization or institution has the right to grant such license under applicable grant and research funding agreements. No other express or implied licenses are granted.
40+
41+
4. Redistribution.
42+
43+
You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
44+
45+
You must give any other recipients of the Work or Derivative Works a copy of this License; and
46+
You must cause any modified files to carry prominent notices stating that You changed the files; and
47+
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
48+
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
49+
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
50+
51+
5. Submission of Contributions.
52+
53+
Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
54+
55+
6. Trademarks.
56+
57+
This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
58+
59+
7. Disclaimer of Warranty.
60+
61+
Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
62+
63+
8. Limitation of Liability.
64+
65+
In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
66+
67+
9. Accepting Warranty or Additional Liability.
68+
69+
While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
70+
71+
END OF TERMS AND CONDITIONS

LICENSE_HEADER

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Copyright ${year} ${holder} Licensed under the
2+
Educational Community License, Version 2.0 (the "License"); you may
3+
not use this file except in compliance with the License. You may
4+
obtain a copy of the License at
5+
6+
http://www.osedu.org/licenses/ECL-2.0
7+
8+
Unless required by applicable law or agreed to in writing,
9+
software distributed under the License is distributed on an "AS IS"
10+
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11+
or implied. See the License for the specific language governing
12+
permissions and limitations under the License.

README.md

Lines changed: 121 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,121 @@
1-
# OpenDashboard-api
2-
This project is the API component of the Open Dashboard System. It is used in conjunction with the OpenDashboard-ux
1+
OpenDashboard
2+
============================
3+
A web application that provides a framework for displaying visualizations and data views called "cards". Cards represent a single discrete visualization or data view but share an API and data model.
4+
5+
*************************************************************************************
6+
7+
## New version as of February 12th, 2020
8+
Until now, the Dashboard served up both the UX and the Api's required to display the data.
9+
In keeping with a true Service Oriented Architecture, the two applications are now separate and exist in two repositories. The source code in This repository will not display anything. It is responsible for security, and serving the appropriate UX.
10+
11+
The two repo's required are:
12+
1. This repository
13+
2. OpenDashboard-ux (https://github.com/Apereo-Learning-Analytics-Initiative/OpenDashboard-ux)
14+
15+
To enhance scalability, if the dashboard is being used with the apereo project OpenLRW (https://github.com/Apereo-Learning-Analytics-Initiative/OpenLRW), it is now recommended that they are both configured with the same database.
16+
17+
## Installation
18+
### Prerequisites
19+
* git
20+
* MongoDB 3.6+ [(install instructions)](https://docs.mongodb.com/manual/installation/)
21+
* Maven 3 [(download)](https://maven.apache.org/download.cgi)
22+
* Java 8 [(jdk)](http://openjdk.java.net/)
23+
### Run in Demo mode
24+
#### Using Maven for development purposes
25+
~~~~
26+
Demo can now be seen completely with JUST the OpenDashboard-ux
27+
~~~~
28+
29+
#### Using a more production-like setup
30+
##### Directory Structure
31+
Create the following directory structure.
32+
* /opt/od/
33+
* conf
34+
* lib
35+
* logs
36+
* run
37+
* src
38+
* build.sh
39+
* run.sh
40+
###### Add a user to run the application
41+
Create a user to run the application and make them owner of /opt/od/* directories.
42+
~~~~
43+
useradd -c "Boot User" boot
44+
chown -R boot:boot /opt/od
45+
~~~~
46+
###### Checkout the source code
47+
This is a one time operation. Note you'll need to update the git command below with your git username.
48+
~~~~
49+
cd /opt/od/src
50+
git clone https://<!-- your bitbucket username-->@bitbucket.org/unicon/laq-dashboard.git
51+
~~~~
52+
###### Build Script (build.sh)
53+
From the /opt/od directory execute the build script to create the dashboard executable.
54+
~~~~
55+
#!/bin/sh
56+
cd `dirname $0`
57+
cd src/laq-opendashboard
58+
git pull
59+
mvn -DskipTests=true clean install
60+
cp target/opendash-0.1-SNAPSHOT.jar ../../lib/od.jar
61+
~~~~
62+
###### Run Script (run.sh)
63+
From the /opt/od directory execute the run script to start the application. Note you will need to update the script below with the appropriate MongoDB path. The application listens on port 8081.
64+
~~~~
65+
#!/bin/sh
66+
cd `dirname $0`
67+
APP_HOME="$PWD"
68+
PID_FILE=$APP_HOME/run/od.pid
69+
JAR_PATH=$APP_HOME/lib/od.jar
70+
cd $APP_HOME
71+
case "$1" in
72+
"start")
73+
if [ -f $PID_FILE ]; then
74+
exit 1
75+
fi
76+
java \
77+
-Dspring.profiles.active=demo \
78+
-Dlogging.path=/opt/od/logs/ \
79+
-Dspring.data.mongodb.uri=<!-- mongodb uri --> \
80+
-jar $JAR_PATH &
81+
echo $! > $PID_FILE
82+
;;
83+
"stop")
84+
if [ ! -f $PID_FILE ]; then
85+
exit 1
86+
fi
87+
kill `cat $PID_FILE`
88+
rm -f $PID_FILE
89+
;;
90+
*)
91+
echo "Usage: $0 start|stop"
92+
;;
93+
esac
94+
exit 0
95+
~~~~
96+
###### Automated Start (e.g., AWS Auto-scale)
97+
~~~~
98+
#!/bin/bash
99+
yum update -y
100+
bash
101+
cd /opt/od
102+
rm /opt/od/run/*.pid
103+
rm /opt/od/*.log
104+
rm /opt/od/logs/*.log
105+
su boot -c "sh build.sh"
106+
su boot -c "sh run.sh start"
107+
~~~~
108+
#### Change the default admin username and password
109+
You can change the default admin username and/or password using the od.admin.user and od.admin.password properties.
110+
~~~~
111+
mvn clean package spring-boot:run -Dod.admin.user=someOtherUsername -Dod.admin.password=someOtherPassword
112+
~~~~
113+
114+
License
115+
-------
116+
ECL (a slightly less permissive Apache2)
117+
http://opensource.org/licenses/ECL-2.0
118+
119+
Contact
120+
-------
121+
Send questions or comments to the mailing list: opendashboard-user@apereo.org

0 commit comments

Comments
 (0)