Skip to content

Commit

Permalink
Merge branch 'develop' into feature/testserver-deployments-with-helios
Browse files Browse the repository at this point in the history
  • Loading branch information
egekocabas authored Jan 11, 2025
2 parents 9837d33 + e043031 commit 2c4a8a3
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ public JenkinsProgrammingLanguageFeatureService() {
programmingLanguageFeatures.put(GO, new ProgrammingLanguageFeature(GO, false, false, true, true, false, List.of(), false));
programmingLanguageFeatures.put(HASKELL, new ProgrammingLanguageFeature(HASKELL, false, false, false, false, true, List.of(), false));
programmingLanguageFeatures.put(JAVA,
new ProgrammingLanguageFeature(JAVA, true, true, true, true, false, List.of(PLAIN_GRADLE, GRADLE_GRADLE, PLAIN_MAVEN, MAVEN_MAVEN, MAVEN_BLACKBOX), true));
new ProgrammingLanguageFeature(JAVA, true, true, true, true, false, List.of(PLAIN_GRADLE, GRADLE_GRADLE, PLAIN_MAVEN, MAVEN_MAVEN, MAVEN_BLACKBOX), false));
programmingLanguageFeatures.put(JAVASCRIPT, new ProgrammingLanguageFeature(JAVASCRIPT, false, false, true, false, false, List.of(), false));
programmingLanguageFeatures.put(KOTLIN, new ProgrammingLanguageFeature(KOTLIN, true, false, true, true, false, List.of(), true));
programmingLanguageFeatures.put(KOTLIN, new ProgrammingLanguageFeature(KOTLIN, true, false, true, true, false, List.of(), false));
programmingLanguageFeatures.put(PYTHON, new ProgrammingLanguageFeature(PYTHON, false, false, true, false, false, List.of(), false));
programmingLanguageFeatures.put(R, new ProgrammingLanguageFeature(R, false, false, true, false, false, List.of(), false));
programmingLanguageFeatures.put(RUST, new ProgrammingLanguageFeature(RUST, false, false, true, false, false, List.of(), false));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,23 @@ public class LocalCIProgrammingLanguageFeatureService extends ProgrammingLanguag

public LocalCIProgrammingLanguageFeatureService() {
// Must be extended once a new programming language is added
programmingLanguageFeatures.put(EMPTY, new ProgrammingLanguageFeature(EMPTY, false, false, false, false, false, List.of(), false));
programmingLanguageFeatures.put(ASSEMBLER, new ProgrammingLanguageFeature(ASSEMBLER, false, false, false, false, false, List.of(), false));
programmingLanguageFeatures.put(C, new ProgrammingLanguageFeature(C, false, true, true, false, false, List.of(FACT, GCC), false));
programmingLanguageFeatures.put(C_PLUS_PLUS, new ProgrammingLanguageFeature(C_PLUS_PLUS, false, false, true, false, false, List.of(), false));
programmingLanguageFeatures.put(C_SHARP, new ProgrammingLanguageFeature(C_SHARP, false, false, true, false, false, List.of(), false));
programmingLanguageFeatures.put(GO, new ProgrammingLanguageFeature(GO, false, false, true, true, false, List.of(), false));
programmingLanguageFeatures.put(HASKELL, new ProgrammingLanguageFeature(HASKELL, true, false, false, false, true, List.of(), false));
programmingLanguageFeatures.put(EMPTY, new ProgrammingLanguageFeature(EMPTY, false, false, false, false, false, List.of(), true));
programmingLanguageFeatures.put(ASSEMBLER, new ProgrammingLanguageFeature(ASSEMBLER, false, false, false, false, false, List.of(), true));
programmingLanguageFeatures.put(C, new ProgrammingLanguageFeature(C, false, true, true, false, false, List.of(FACT, GCC), true));
programmingLanguageFeatures.put(C_PLUS_PLUS, new ProgrammingLanguageFeature(C_PLUS_PLUS, false, false, true, false, false, List.of(), true));
programmingLanguageFeatures.put(C_SHARP, new ProgrammingLanguageFeature(C_SHARP, false, false, true, false, false, List.of(), true));
programmingLanguageFeatures.put(GO, new ProgrammingLanguageFeature(GO, false, false, true, true, false, List.of(), true));
programmingLanguageFeatures.put(HASKELL, new ProgrammingLanguageFeature(HASKELL, true, false, false, false, true, List.of(), true));
programmingLanguageFeatures.put(JAVA,
new ProgrammingLanguageFeature(JAVA, true, true, true, true, false, List.of(PLAIN_GRADLE, GRADLE_GRADLE, PLAIN_MAVEN, MAVEN_MAVEN), false));
programmingLanguageFeatures.put(JAVASCRIPT, new ProgrammingLanguageFeature(JAVASCRIPT, false, false, true, false, false, List.of(), false));
programmingLanguageFeatures.put(KOTLIN, new ProgrammingLanguageFeature(KOTLIN, false, false, true, true, false, List.of(), false));
programmingLanguageFeatures.put(OCAML, new ProgrammingLanguageFeature(OCAML, false, false, false, false, true, List.of(), false));
programmingLanguageFeatures.put(PYTHON, new ProgrammingLanguageFeature(PYTHON, false, false, true, false, false, List.of(), false));
programmingLanguageFeatures.put(R, new ProgrammingLanguageFeature(R, false, false, true, false, false, List.of(), false));
programmingLanguageFeatures.put(RUST, new ProgrammingLanguageFeature(RUST, false, false, true, false, false, List.of(), false));
programmingLanguageFeatures.put(SWIFT, new ProgrammingLanguageFeature(SWIFT, false, false, true, true, false, List.of(PLAIN), false));
programmingLanguageFeatures.put(TYPESCRIPT, new ProgrammingLanguageFeature(TYPESCRIPT, false, false, true, false, false, List.of(), false));
programmingLanguageFeatures.put(VHDL, new ProgrammingLanguageFeature(VHDL, false, false, false, false, false, List.of(), false));
new ProgrammingLanguageFeature(JAVA, true, true, true, true, false, List.of(PLAIN_GRADLE, GRADLE_GRADLE, PLAIN_MAVEN, MAVEN_MAVEN), true));
programmingLanguageFeatures.put(JAVASCRIPT, new ProgrammingLanguageFeature(JAVASCRIPT, false, false, true, false, false, List.of(), true));
programmingLanguageFeatures.put(KOTLIN, new ProgrammingLanguageFeature(KOTLIN, false, false, true, true, false, List.of(), true));
programmingLanguageFeatures.put(OCAML, new ProgrammingLanguageFeature(OCAML, false, false, false, false, true, List.of(), true));
programmingLanguageFeatures.put(PYTHON, new ProgrammingLanguageFeature(PYTHON, false, true, true, false, false, List.of(), true));
programmingLanguageFeatures.put(R, new ProgrammingLanguageFeature(R, false, false, true, false, false, List.of(), true));
programmingLanguageFeatures.put(RUST, new ProgrammingLanguageFeature(RUST, false, false, true, false, false, List.of(), true));
programmingLanguageFeatures.put(SWIFT, new ProgrammingLanguageFeature(SWIFT, false, false, true, true, false, List.of(PLAIN), true));
programmingLanguageFeatures.put(TYPESCRIPT, new ProgrammingLanguageFeature(TYPESCRIPT, false, false, true, false, false, List.of(), true));
programmingLanguageFeatures.put(VHDL, new ProgrammingLanguageFeature(VHDL, false, false, false, false, false, List.of(), true));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<jhi-conversation-header (collapseSearch)="toggleChannelSearch()" (onUpdateSidebar)="prepareSidebarData()" />
<jhi-conversation-messages
[contentHeightDev]="!isProduction || isTestServer"
(openThread)="postInThread = $event"
(openThread)="openThread($event)"
[course]="course"
[searchbarCollapsed]="channelSearchCollapsed"
[focusPostId]="focusPostId"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,10 @@ export class CourseConversationsComponent implements OnInit, OnDestroy {
this.channelSearchCollapsed = !this.channelSearchCollapsed;
}

openThread(postToOpen: Post | undefined) {
this.postInThread = postToOpen;
}

@HostListener('document:keydown', ['$event'])
handleSearchShortcut(event: KeyboardEvent) {
if ((event.metaKey || event.ctrlKey) && event.key === 'k') {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { Component, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core';
import { PostingContentPart, ReferenceType } from '../../metis.util';
import { FileService } from 'app/shared/http/file.service';

Expand Down Expand Up @@ -27,7 +27,7 @@ import { AccountService } from 'app/core/auth/account.service';
templateUrl: './posting-content-part.component.html',
styleUrls: ['./../../metis.component.scss'],
})
export class PostingContentPartComponent implements OnInit {
export class PostingContentPartComponent implements OnInit, OnChanges {
@Input() postingContentPart: PostingContentPart;
@Output() userReferenceClicked = new EventEmitter<string>();
@Output() channelReferenceClicked = new EventEmitter<number>();
Expand Down Expand Up @@ -60,6 +60,10 @@ export class PostingContentPartComponent implements OnInit {
this.processContent();
}

ngOnChanges(): void {
this.processContent();
}

/**
* Opens an attachment with the given URL in a new window
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<span class="toggle-content" jhiTranslate="{{ showContent ? 'artemisApp.metis.post.collapseContent' : 'artemisApp.metis.post.showContent' }}"></span>
@if (showContent) {
<div>
@for (postingContentPart of postingContentParts(); track $index) {
@for (postingContentPart of postingContentParts(); track contentPartTrack($index)) {
<jhi-posting-content-part
[postingContentPart]="postingContentPart"
(userReferenceClicked)="userReferenceClicked.emit($event)"
Expand All @@ -33,7 +33,7 @@
<!-- not in preview mode: content always shown -->
@if (!previewMode) {
<div class="pb-1">
@for (postingContentPart of postingContentParts(); track $index) {
@for (postingContentPart of postingContentParts(); track contentPartTrack($index)) {
<jhi-posting-content-part
[postingContentPart]="postingContentPart"
(userReferenceClicked)="userReferenceClicked.emit($event)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ export class PostingContentComponent implements OnInit, OnChanges, OnDestroy {
if (!this.isSubscribeToMetis()) {
this.computeContentPartsOfPosts();
}

const patternMatches: PatternMatch[] = this.getPatternMatches();
this.computePostingContentParts(patternMatches);
}

/**
Expand Down Expand Up @@ -253,4 +256,8 @@ export class PostingContentComponent implements OnInit, OnChanges, OnDestroy {
}
return patternMatches;
}

contentPartTrack(index: number) {
return this.posting?.id + '_' + index;
}
}

0 comments on commit 2c4a8a3

Please sign in to comment.