This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit f124699d authored by Michael Breu's avatar Michael Breu
Browse files

sonar and fixing deployment

parent 2a205392
2 merge requests!231New Deployment into production and update gitlab,!225Resolve "Collections mehr hervorheben"
Showing
with 10 additions and 32 deletions
......@@ -144,6 +144,7 @@ deploy:
variables:
REGISTRY_URL: sharing-codeability.uibk.ac.at:5051
IMAGE_TAG: sharing-codeability.uibk.ac.at:5051/development/sharing/codeability-sharing-platform/gitsearch/$CI_COMMIT_REF_NAME
GITSEARCH_PATH: /home/contDeploy/gitsearch2/gitsearch
script:
- ssh contDeploy@codeability-austria -p 1022 "export CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME && export COMMIT_DATE=$(git show -s --format=%ct $CI_COMMIT_SHA) && export GITSEARCH_PATH=${GITSEARCH_PATH} && cd gitsearch2/gitsearch && git fetch && git stash && git checkout $CI_COMMIT_REF_NAME && git pull && ./manual_deploy.sh && exit"
when: manual
......@@ -164,6 +165,7 @@ deployProd:
variables:
REGISTRY_URL: sharing-codeability.uibk.ac.at:5051
IMAGE_TAG: sharing-codeability.uibk.ac.at:5051/development/sharing/codeability-sharing-platform/gitsearch/$CI_COMMIT_REF_NAME
GITSEARCH_PATH: /home/contDeploy/gitsearch
script:
- ssh contDeploy@sharing-codeability -p 1022 "export REGISTRY_URL=$REGISTRY_URL export CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME && export COMMIT_DATE=$(git show -s --format=%ct $CI_COMMIT_SHA) && cd gitsearch/ && git fetch && git stash && git checkout $CI_COMMIT_REF_NAME && git pull && ./manual_deploy.sh && exit"
when: manual
......
......@@ -58,9 +58,7 @@ public class ChatMessageService {
ChatMessage chatMessage = new ChatMessage();
Review review = reviewRepository.getById(chatMessageDTO.getReviewID());
if (review == null) {
log.warn("Review not found for ID: {}", chatMessageDTO.getReviewID());
}
chatMessage.setReview(review);
chatMessage.setTimestamp(new Date());
......
......@@ -234,7 +234,6 @@ public class GitlabService {
try {
project = projectApi.createProject(project);
} catch (GitLabApiException e) {
log.error("An error occurred while creating the new Gitlab project : {}", e.getMessage(), e);
throw new ArtemisImportError("exercise.import.error.creationFailed", e);
}
......@@ -253,7 +252,7 @@ public class GitlabService {
git.commit().setAll(true).setMessage("Importing files").setCommitter(currentUser.getUsername(), currentUser.getEmail()).call();
git.push().setCredentialsProvider(CredentialsProvider.getDefault()).call();
} catch (GitLabApiException | GitAPIException e) {
log.warn("Could not commit: {} \n", e.getMessage(), e);
log.info("Could not commit: {} \n", e.getMessage(), e);
if (git.getRepository().getDirectory().getParentFile().exists()) {
try {
FileUtils.deleteDirectory(git.getRepository().getDirectory().getParentFile());
......
......@@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
@Transactional
public class AchievementResource {
private final Logger log = LoggerFactory.getLogger(SearchResource.class);
private final Logger log = LoggerFactory.getLogger(AchievementResource.class);
private final AchievementService achievementService;
......
......@@ -252,17 +252,4 @@ public class LikesResource {
.headers(HeaderUtil.createEntityDeletionAlert(applicationName, true, ENTITY_NAME, id.toString()))
.build();
}
// /**
// * {@code SEARCH /_search/likes?query=:query} : search for the likes
// * corresponding to the query.
// *
// * @param query the query of the likes search.
// * @return the result of the search.
// */
// @GetMapping("/_search/likes")
// @PreAuthorize("hasAnyRole('ADMIN')")
// public List<Likes> searchLikes(@RequestParam String query) {
// log.debug("REST request to search Likes for query {}", query);
// return likesService.search(query);
// }
}
#H2 Server Properties
#Thu Aug 10 09:57:52 CEST 2023
#Tue Jan 23 13:29:36 CET 2024
0=JHipster H2 (Disk)|org.h2.Driver|jdbc\:h2\:file\:./target/h2db/db/gitsearch|gitsearch
webSSL=false
webAllowOthers=true
......
......@@ -136,8 +136,8 @@ export class UserWatchListComponent implements OnInit, OnDestroy {
const headersLink = headers.get('link');
this.links = this.parseLinks.parse(headersLink ? headersLink : '');
if (data) {
for (let i = 0; i < data.length; i++) {
this.userWatchLists.push(data[i]);
for (let dataItem of data) {
this.userWatchLists.push(dataItem);
}
}
}
......
......@@ -3,10 +3,4 @@
<A [routerLink]="['/bookmarks']" style="font-weight: bold; cursor: pointer">{{
getCurrentWatchList() ? getCurrentWatchList()!.userWatchList.name : 'undefined'
}}</A>
<!--
<button class="btn btn-outline-primary mr-2" id="dropdownManual" ngbDropdownToggle ngbDropdownAnchor>{{'gitsearchApp.userWatchList.selectedList'|translate}}<br/>{{getCurrentWatchList()?getCurrentWatchList()!.userWatchList.name:'undefined'}}</button>
<div ngbDropdownMenu aria-labelledby="dropdownManual" >
<button ngbDropdownItem *ngFor="let watchList of getMyWatchLists()" (click)="setCurrentWatchList(watchList.name)">{{watchList.name}}</button>
</div>
-->
</div>
......@@ -5,7 +5,6 @@ import { IUserWatchList, UserWatchListWithContent } from 'app/shared/model/user-
@Component({
selector: 'jhi-bookmark-info',
templateUrl: './bookmarkInfo.component.html',
styleUrls: ['./bookmarkInfo.component.scss'],
})
export class BookmarkInfoComponent {
constructor(private watchlistManager: WatchlistManager) {}
......
......@@ -52,7 +52,7 @@ export class ExerciseCardComponent implements AfterViewChecked {
* correct missing image urls
*/
correctImageURL(event: Event): void {
const img = event.srcElement as HTMLImageElement;
const img = event.target as HTMLImageElement;
if (img) {
img.src = '/content/images/Logo_codeAbility_4c_300dpi_RGB3.gif';
}
......
......@@ -66,7 +66,7 @@ export class ExerciseHeaderComponent {
* correct missing image urls
*/
correctImageURL(event: Event): void {
const srcElement = event.srcElement as HTMLImageElement;
const srcElement = event.target as HTMLImageElement;
if (srcElement) {
srcElement.src = '/content/images/Logo_codeAbility_4c_300dpi_RGB3.gif';
}
......
......@@ -10,7 +10,6 @@ import { SearchResultDTO } from 'app/shared/model/search/search-result-dto.model
@Component({
selector: 'jhi-exercise-metadata',
templateUrl: './exercise-metadata.component.html',
styleUrls: ['./exercise-metadata.component.scss'],
})
export class ExerciseMetadataComponent implements OnInit, OnDestroy {
@Input() exercise: SearchResultDTO | undefined;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment