|
1 | 1 | <button mat-icon-button class="close-button" (click)="closeDialog2()"> |
2 | | - <mat-icon class="close-icon" >close</mat-icon> |
| 2 | + <mat-icon class="close-icon">close</mat-icon> |
3 | 3 | </button> |
| 4 | + |
4 | 5 | <div mat-dialog-content> |
5 | | - <mat-form-field id="type-field" class="action-button-with-margin" [floatLabel]="'always'"> |
6 | | - <mat-label>Input the known Information</mat-label> |
7 | | - <textarea matInput placeholder="Type in information" [formControl]="inputfield" cdkFocusInitial></textarea> |
| 6 | + <mat-form-field id="type-field" class="action-button-with-margin" [floatLabel]="'always'"> |
| 7 | + <mat-label>Describe your context</mat-label> |
| 8 | + <textarea |
| 9 | + matInput |
| 10 | + placeholder="Type in information" |
| 11 | + [formControl]="inputfield" |
| 12 | + cdkFocusInitial |
| 13 | + class="styled-textarea"></textarea> |
8 | 14 | </mat-form-field> |
| 15 | + |
| 16 | + <div *ngIf="showRephrasedInput"> |
| 17 | + <p>Rephrased input: {{rephrasedInput}}</p> |
| 18 | + </div> |
| 19 | + |
| 20 | + <div *ngIf="showMatchingResults"> |
| 21 | + <p>The best matching algorithm with cosine similarity is |
| 22 | + <span class="resultLink" (click)="openLink()">{{resultAlgorithm.name}}</span>. |
| 23 | + </p> |
| 24 | + <p>The Cosine Similarity is |
| 25 | + <span class="similarityvalue">{{resultAlgorithm.cosineSimilarity}}</span> |
| 26 | + </p> |
| 27 | + </div> |
| 28 | + |
| 29 | + <div *ngIf="showMatchingResults"> |
| 30 | + <mat-table #table [dataSource]="tabledata"> |
| 31 | + <ng-container matColumnDef="name"> |
| 32 | + <mat-header-cell *matHeaderCellDef> Name </mat-header-cell> |
| 33 | + <mat-cell *matCellDef="let result"> |
| 34 | + <span class="resultLink" (click)="openLink2(result.name)">{{result.name}}</span> |
| 35 | + </mat-cell> |
| 36 | + </ng-container> |
| 37 | + <ng-container matColumnDef="cosineSimilarity"> |
| 38 | + <mat-header-cell *matHeaderCellDef> Cosine similarity </mat-header-cell> |
| 39 | + <mat-cell *matCellDef="let result"> {{result.cosineSimilarity}} </mat-cell> |
| 40 | + </ng-container> |
| 41 | + <mat-header-row *matHeaderRowDef="columnsToDisplay"></mat-header-row> |
| 42 | + <mat-row *matRowDef="let row; columns: columnsToDisplay"></mat-row> |
| 43 | + </mat-table> |
| 44 | + </div> |
| 45 | + |
| 46 | + <!-- Progress bar for aggregation --> |
| 47 | + <mat-progress-bar *ngIf="isAggregating" mode="determinate" [value]="progressValue"></mat-progress-bar> |
| 48 | + <p *ngIf="isAggregating">Aggregation in progress... {{ progressValue }}%</p> |
9 | 49 | </div> |
10 | | -<div mat-dialog-content *ngIf="showRephrasedInput"> |
11 | | - <p>Rephrased input: {{rephrasedInput}} </p> |
12 | | -</div> |
13 | | -<div mat-dialog-content *ngIf="showMatchingResults"> |
14 | | - <p>The best matching algorithm with cosine similarity is <span class="resultLink"(click)="openLink()">{{resultAlgorithm.name}}</span>. </p> |
15 | | - <p>The Cosine Similarity is <span class="similarityvalue">{{resultAlgorithm.cosineSimilarity}}</span> </p> |
16 | | -</div> |
17 | | -<div> |
18 | | - <mat-form-field *ngIf="showMatchingResults"> |
19 | | - <mat-label>Number of displayed algorithms</mat-label> |
20 | | - <mat-select [(value)]="selectednumber" (selectionChange)="numberChanged()"> |
21 | | - <mat-option *ngFor="let number of numbers" [value]="number">{{number}}</mat-option> |
22 | | - </mat-select> |
23 | | - </mat-form-field> |
24 | | -</div> |
25 | | -<div> |
26 | | - <mat-table #table [dataSource]="tabledata" *ngIf="showMatchingResults"> |
27 | | - <ng-container matColumnDef="name"> |
28 | | - <mat-header-cell *matHeaderCellDef> Name </mat-header-cell> |
29 | | - <mat-cell *matCellDef="let result"> <span class="resultLink"(click)="openLink2(result.name)">{{result.name}}</span> </mat-cell> |
30 | | - </ng-container> |
31 | | - <ng-container matColumnDef="cosineSimilarity"> |
32 | | - <mat-header-cell *matHeaderCellDef> Cosine similarity </mat-header-cell> |
33 | | - <mat-cell *matCellDef="let result"> {{result.cosineSimilarity}} </mat-cell> |
34 | | - </ng-container> |
35 | | - <mat-header-row *matHeaderRowDef="columnsToDisplay"></mat-header-row> |
36 | | - <mat-row *matRowDef="let row; columns: columnsToDisplay"></mat-row> |
37 | | - </mat-table> |
38 | | -</div> |
| 50 | + |
39 | 51 | <div mat-dialog-actions> |
40 | | - <button class="action-button-with-margin" (click)="closeDialog2()" mat-raised-button > |
41 | | - <i class="material-icons"></i> close |
42 | | - </button> |
43 | | - <button class="action-button-with-margin" (click)="extractInformation(false) "mat-raised-button> |
44 | | - <i class="material-icons"></i> start textmatching |
45 | | - </button> |
46 | | - <button class="action-button-with-margin" (click)="extractInformation(true) "mat-raised-button> |
47 | | - <i class="material-icons"></i> start textmatching with rake |
48 | | - </button> |
49 | | - <section class="testsection"> |
50 | | - <input type="checkbox" class="example-margin" [checked]="checked" (change)="checkboxClicked($event)">rephrase Problem using OpenAI |
51 | | - </section> |
| 52 | + <button class="action-button-with-margin" (click)="extractInformation(false)" mat-raised-button> |
| 53 | + <i class="material-icons"></i> Identify Patterns |
| 54 | + </button> |
| 55 | + |
| 56 | + <button class="action-button-with-margin" *ngIf="fulltabledata && fulltabledata.length > 0" |
| 57 | + (click)="openGraphDialog()" mat-raised-button> |
| 58 | + Show Pattern Graph |
| 59 | + </button> |
| 60 | + |
| 61 | + <button class="action-button-with-margin" *ngIf="fulltabledata && fulltabledata.length > 0" (click)="aggregateSolutions()" mat-raised-button> |
| 62 | + Aggregate Solutions |
| 63 | + </button> |
| 64 | + |
| 65 | + <button class="action-button-with-margin" *ngIf="isAggregationComplete && (fulltabledata && fulltabledata.length > 0)" (click)="deploySolution()" |
| 66 | + mat-raised-button> |
| 67 | + Deploy Solution |
| 68 | + </button> |
52 | 69 | </div> |
| 70 | + |
| 71 | +<!-- Styling --> |
53 | 72 | <style> |
54 | | -.resultLink { |
55 | | -cursor: pointer; |
56 | | -color: blue; |
57 | | -} |
| 73 | + .resultLink { |
| 74 | + cursor: pointer; |
| 75 | + color: blue; |
| 76 | + } |
| 77 | + |
| 78 | + .resultLink:hover { |
| 79 | + opacity: 0.9; |
| 80 | + color: pink; |
| 81 | + text-decoration: underline; |
| 82 | + } |
| 83 | + |
| 84 | + .similarityvalue { |
| 85 | + color: red; |
| 86 | + } |
| 87 | + |
| 88 | + .example-margin:hover { |
| 89 | + color: blue; |
| 90 | + } |
58 | 91 |
|
59 | | -.resultLink:hover { |
60 | | -opacity: 0.9; |
61 | | -color: pink; |
62 | | -text-decoration: underline; |
63 | | -} |
| 92 | + .action-button-with-margin { |
| 93 | + margin-right: 10px; |
| 94 | + } |
64 | 95 |
|
65 | | -.similarityvalue { |
66 | | -color: red; |
67 | | -} |
| 96 | + .styled-textarea { |
| 97 | + height: 100px; |
| 98 | + border-radius: 5px; |
| 99 | + padding: 10px; |
| 100 | + border: 1px solid #ccc; |
| 101 | + transition: border-color 0.3s; |
| 102 | + } |
68 | 103 |
|
69 | | -.example-margin:hover { |
70 | | -color: blue; |
71 | | -} |
| 104 | + .styled-textarea:focus { |
| 105 | + border-color: #3f51b5; |
| 106 | + outline: none; |
| 107 | + } |
72 | 108 |
|
| 109 | + .graph-container { |
| 110 | + width: 100%; |
| 111 | + height: 400px; |
| 112 | + overflow: auto; |
| 113 | + border: 1px solid #ccc; |
| 114 | + margin-top: 20px; |
| 115 | + padding: 10px; |
| 116 | + } |
73 | 117 | </style> |
0 commit comments