Skip to content

Merge Jay's Branch to Master#1

Open
Joe12o wants to merge 37 commits into
masterfrom
jay_feb4_dev01
Open

Merge Jay's Branch to Master#1
Joe12o wants to merge 37 commits into
masterfrom
jay_feb4_dev01

Conversation

@Joe12o

@Joe12o Joe12o commented Mar 28, 2018

Copy link
Copy Markdown
Collaborator

Will be using this to go through and comment on any issues I see.

# Conflicts:
#	src/main/java/com/therame/controllers/UserController.java
#	src/main/java/com/therame/model/User.java
#	src/main/java/com/therame/service/MediaResolverService.java
#	src/main/java/com/therame/service/UserServiceImpl.java
#	src/main/resources/application.properties
#	src/main/resources/templates/login.html
#	src/main/resources/templates/registration.html
Got it to run again, with ssl, merged in my upload which is a little more organized but we'll have to work on merging in the REST functionality.
…el user for adding admin accounts.

All the registered users now can't log in because we need to do the account init.
so that's gonna come next I'd assume!
…y_feb4_dev01

# Conflicts:
#	src/main/resources/application.properties
…ar as I can see.

Also everything's in ssl now.
- exercise and user
in order to index them for search.

my web pages are still messed up but I'll take a look at that when I get the chance
…y_feb4_dev01

# Conflicts:
#	src/main/resources/templates/home.html
#	src/main/resources/templates/pt_home.html

Everything works now!
…y_feb4_dev01

                     # Conflicts:
                     #	src/main/resources/templates/home.html
                     #	src/main/resources/templates/pt_home.html

Fixed some of the jquery stuff, adding in the ability to autocomplete search results
…y_feb4_dev01

                                                                                                         # Conflicts:
                                                                                                         #	src/main/resources/templates/home.html
                                                                                                         #	src/main/resources/templates/pt_home.html

Dying of Solr
…y_feb4_dev01

                                                                                                         # Conflicts:
                                                                                                         #	src/main/resources/templates/home.html
                                                                                                         #	src/main/resources/templates/pt_home.html

Added some stuff for the login api
…y_feb4_dev01

                                                                                                         # Conflicts:
                                                                                                         #	src/main/resources/templates/home.html
                                                                                                         #	src/main/resources/templates/pt_home.html

Added some stuff for the login api
…y_feb4_dev01

# Conflicts:
#	src/main/java/com/therame/controllers/UserController.java
…y_feb4_dev01

# Conflicts:
#	src/main/java/com/therame/controllers/UserController.java
…y_feb4_dev01

# Conflicts:
#	src/main/java/com/therame/controllers/UserController.java
@Joe12o Joe12o self-assigned this Mar 28, 2018
# Conflicts:
#	src/main/java/com/therame/controllers/UserController.java
# Conflicts:
#	src/main/java/com/therame/controllers/UserController.java
@Joe12o Joe12o assigned jayricco and unassigned Joe12o Mar 28, 2018
Comment thread docker-compose.yml Outdated
- exercise

volumes:
data:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the readme with docs on how to set up solr?

Comment thread pom.xml

<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are all of these actually being used?

@Override
public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
return new SimpleAsyncUncaughtExceptionHandler();
}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these additions necessary? Were you running into problems with the default config?

.setTimeToLiveSeconds(20)
);
}
}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What value does hazelcast add to our project? Also, what is it actually being used for?

import org.springframework.data.solr.server.support.HttpSolrClientFactoryBean;

@Configuration
@ComponentScan

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is @ComponentScan doing in this situation?

@@ -1 +0,0 @@
(function(root){"use strict";var css=".nanobar{width:100%;height:4px;z-index:9999;top:0}.bar{width:0;height:100%;transition:height .3s;background:#000}";function addCss(){var s=document.getElementById("nanobarcss");if(s===null){s=document.createElement("style");s.type="text/css";s.id="nanobarcss";document.head.insertBefore(s,document.head.firstChild);if(!s.styleSheet)return s.appendChild(document.createTextNode(css));s.styleSheet.cssText=css}}function addClass(el,cls){if(el.classList)el.classList.add(cls);else el.className+=" "+cls}function createBar(rm){var el=document.createElement("div"),width=0,here=0,on=0,bar={el:el,go:go};addClass(el,"bar");function move(){var dist=width-here;if(dist<.1&&dist>-.1){place(here);on=0;if(width>=100){el.style.height=0;setTimeout(function(){rm(el)},300)}}else{place(width-dist/4);setTimeout(go,16)}}function place(num){width=num;el.style.width=width+"%"}function go(num){if(num>=0){here=num;if(!on){on=1;move()}}else if(on){move()}}return bar}function Nanobar(opts){opts=opts||{};var el=document.createElement("div"),applyGo,nanobar={el:el,go:function(p){applyGo(p);if(p>=100){init()}}};function rm(child){el.removeChild(child)}function init(){var bar=createBar(rm);el.appendChild(bar.el);applyGo=bar.go}addCss();addClass(el,"nanobar");if(opts.id)el.id=opts.id;if(opts.classname)addClass(el,opts.classname);if(opts.target){el.style.position="relative";opts.target.insertBefore(el,opts.target.firstChild)}else{el.style.position="fixed";document.getElementsByTagName("body")[0].appendChild(el)}init();return nanobar}if(typeof exports==="object"){module.exports=Nanobar}else if(typeof define==="function"&&define.amd){define([],function(){return Nanobar})}else{root.Nanobar=Nanobar}})(this); No newline at end of file

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was a mistake, we still depend on nanobar in other places

delimiter: ",",
transformResult: function(response) {
return {
//must convert json to javascript object before processing

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is true, but I don't know enough about the autocomplete function to dispute it. Will look later

});
});
//]]>
</script>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this the same as confirm.js?

<!--<script th:src="@{/js/registration.js}"></script>-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/1000hz-bootstrap-validator/0.11.9/validator.min.js"></script>
</body>
</html> No newline at end of file

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why couldn't the old registration.html and registration.js be used? All you'd need to do is remove the password fields as far as I can tell.

</div>

</body>
</html> No newline at end of file

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this?

try {
exercises = exerciseService.searchExercisesByTitle(query);
System.out.println(exercises);
} catch (Exception e) {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What exception is being caught here? Do want really just want to swallow it and tell the client it was a bad request?

exercises = exerciseService.findAllExercises();
}
if (exercises == null) {
return ResponseEntity.badRequest().body(query);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really a bad request if the only way to get here is from solr errors?

}

@RequestMapping(value="/login", method = RequestMethod.GET)
@RequestMapping(value="/login")

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use @GetMapping, this request now accepts all types of requests when we should narrow it to just get requests.

}

public boolean isCompleteAtCurrentTime() {
LocalTime current_time = LocalTime.now();

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to deal with the complexity that time zones add? I personally wanted to avoid it




}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this? If its a combination of the patient_attempt and patient_response tables, I'm unsure if we should do this.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, I think we should try to stick with the ERD we have in the SDS.

private FeedbackType feedbackType;

@Column(name = "message_data")
private StringBuffer message;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this a StringBuffer? We're not going to be modifying these messages so it doesn't really make sense here

CompletionRecord,
Feedback
}
public enum FeedbackType {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be useful if we were going to continue work on this project, but we won't be making any distinction between the types in our final product, so why make the distinction here?

-ms-transform: scale(1);
transform: scale(1);
}
} No newline at end of file

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this file exist

.replace(/\\t/g, "\\t")
.replace(/\\b/g, "\\b")
.replace(/\\f/g, "\\f");
};

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this used and why do we need to escape the special characters




<script th:src="@{js/fv.min.js}"></script>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This script doesn't exist

<script th:src="@{/js/nanobar.min.js}"></script>
<script th:src="@{/js/thirdparty/jquery-3.3.1.min.js}"></script>
<script th:src="@{/js/thirdparty/jquery.autocomplete.min.js}"></script>
<script th:src="@{/js/thirdparty/nanobar.min.js}"></script>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of these scripts exist in the git repo

# Conflicts:
#	src/main/java/com/therame/controllers/UserController.java
…y_feb4_dev01

# Conflicts:
#	src/main/java/com/therame/configuration/WebSecurityConfig.java
#	src/main/java/com/therame/model/Exercise.java
#	src/main/java/com/therame/service/ExerciseServiceImpl.java
#	src/main/java/com/therame/service/HistoryService.java
#	src/main/java/com/therame/service/UserServiceImpl.java
#	src/main/resources/templates/registration.html
…y_feb4_dev01

# Conflicts:
#	src/main/java/com/therame/configuration/WebSecurityConfig.java
#	src/main/java/com/therame/model/Exercise.java
#	src/main/java/com/therame/service/ExerciseServiceImpl.java
#	src/main/java/com/therame/service/HistoryService.java
#	src/main/java/com/therame/service/UserServiceImpl.java
#	src/main/resources/templates/registration.html
…y_feb4_dev01

# Conflicts:
#	src/main/java/com/therame/configuration/WebSecurityConfig.java
#	src/main/java/com/therame/model/Exercise.java
#	src/main/java/com/therame/service/ExerciseServiceImpl.java
#	src/main/java/com/therame/service/HistoryService.java
#	src/main/java/com/therame/service/UserServiceImpl.java
#	src/main/resources/templates/registration.html
…y_feb4_dev01

# Conflicts:
#	src/main/java/com/therame/controllers/HistoryController.java
#	src/main/java/com/therame/model/Feedback.java
#	src/main/java/com/therame/model/History.java
#	src/main/java/com/therame/repository/jpa/AssignmentRepository.java
#	src/main/java/com/therame/repository/jpa/FeedbackRepository.java
#	src/main/java/com/therame/repository/jpa/HistoryRepository.java
#	src/main/java/com/therame/service/HistoryService.java
#	src/main/java/com/therame/service/HistoryServiceImpl.java
#	src/main/java/com/therame/view/HistoryView.java
#	src/main/resources/templates/user.html
…y_feb4_dev01

# Conflicts:
#	src/main/java/com/therame/controllers/HistoryController.java
#	src/main/java/com/therame/model/Feedback.java
#	src/main/java/com/therame/model/History.java
#	src/main/java/com/therame/repository/jpa/AssignmentRepository.java
#	src/main/java/com/therame/repository/jpa/FeedbackRepository.java
#	src/main/java/com/therame/repository/jpa/HistoryRepository.java
#	src/main/java/com/therame/service/HistoryService.java
#	src/main/java/com/therame/service/HistoryServiceImpl.java
#	src/main/java/com/therame/view/HistoryView.java
#	src/main/resources/templates/user.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants