Skip to content

Commit c8f3c25

Browse files
committed
add ui elements for github integration for df-mcp
1 parent 0056184 commit c8f3c25

7 files changed

Lines changed: 184 additions & 5 deletions

File tree

dist/7846.797c4a3dc8ca4f18.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/7846.fca7d1d277c562c1.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
<body class="mat-typography">
1111
<df-root></df-root>
1212
<script type="text/javascript" src="https://assets.calendly.com/assets/external/widget.js"></script>
13-
<script src="runtime.cf7df5620bb00a16.js" type="module"></script><script src="polyfills.cb64ea9d35bc0a9e.js" type="module"></script><script src="main.ea01e868c73a7d82.js" type="module"></script></body>
13+
<script src="runtime.80bb439672dc69f6.js" type="module"></script><script src="polyfills.cb64ea9d35bc0a9e.js" type="module"></script><script src="main.ea01e868c73a7d82.js" type="module"></script></body>
1414
</html>
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/adf-services/df-service-details/df-service-details.component.html

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,71 @@ <h5>Parameters</h5>
12021202
</p>
12031203
</div>
12041204

1205+
<!-- Link to SCM Service (function tools only) -->
1206+
<div
1207+
class="scm-link-section"
1208+
*ngIf="customToolForm.get('toolType')?.value === 'function' && availableScmServices.length > 0"
1209+
[formGroup]="customToolForm">
1210+
<mat-expansion-panel [expanded]="!!customToolForm.get('storageServiceId')?.value">
1211+
<mat-expansion-panel-header>
1212+
<mat-panel-title>Link to Repository</mat-panel-title>
1213+
</mat-expansion-panel-header>
1214+
1215+
<div class="form-row">
1216+
<mat-form-field appearance="outline" class="form-field-half">
1217+
<mat-label>SCM Service</mat-label>
1218+
<mat-select formControlName="storageServiceId">
1219+
<mat-option [value]="null">None</mat-option>
1220+
<mat-option
1221+
*ngFor="let svc of availableScmServices"
1222+
[value]="svc.id">
1223+
{{ svc.label || svc.name }}
1224+
</mat-option>
1225+
</mat-select>
1226+
<mat-hint>Select a GitHub, GitLab, or Bitbucket service</mat-hint>
1227+
</mat-form-field>
1228+
</div>
1229+
1230+
<div class="form-row" *ngIf="customToolForm.get('storageServiceId')?.value">
1231+
<mat-form-field appearance="outline" class="form-field-third">
1232+
<mat-label>Repository</mat-label>
1233+
<input
1234+
matInput
1235+
formControlName="scmRepository"
1236+
placeholder="my-repo" />
1237+
</mat-form-field>
1238+
1239+
<mat-form-field appearance="outline" class="form-field-third">
1240+
<mat-label>Branch / Tag</mat-label>
1241+
<input
1242+
matInput
1243+
formControlName="scmReference"
1244+
placeholder="master" />
1245+
</mat-form-field>
1246+
1247+
<mat-form-field appearance="outline" class="form-field-third">
1248+
<mat-label>File Path</mat-label>
1249+
<input
1250+
matInput
1251+
formControlName="storagePath"
1252+
placeholder="scripts/my-tool.js" />
1253+
</mat-form-field>
1254+
</div>
1255+
1256+
<div
1257+
class="scm-actions"
1258+
*ngIf="customToolForm.get('storageServiceId')?.value">
1259+
<button
1260+
mat-flat-button
1261+
color="primary"
1262+
type="button"
1263+
(click)="viewLatestScmContent()">
1264+
View Latest
1265+
</button>
1266+
</div>
1267+
</mat-expansion-panel>
1268+
</div>
1269+
12051270
<!-- Function editor -->
12061271
<div
12071272
class="editor-section"
@@ -1329,7 +1394,8 @@ <h5>Parameters</h5>
13291394
<code>{{ tool.httpMethod }}</code> {{ tool.url }}
13301395
</ng-container>
13311396
<ng-container *ngIf="tool.toolType === 'function'">
1332-
<em>Function</em>
1397+
<em *ngIf="!tool.storageServiceId">Function</em>
1398+
<em *ngIf="tool.storageServiceId">SCM: {{ tool.scmRepository }}/{{ tool.storagePath }}</em>
13331399
</ng-container>
13341400
</td>
13351401
<td>{{ tool.description }}</td>

src/app/adf-services/df-service-details/df-service-details.component.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,20 @@ mat-icon {
733733
flex-shrink: 0;
734734
}
735735

736+
.form-field-third {
737+
flex: 1;
738+
min-width: 0;
739+
}
740+
741+
.scm-link-section {
742+
margin-bottom: 16px;
743+
}
744+
745+
.scm-actions {
746+
margin-top: 8px;
747+
margin-bottom: 8px;
748+
}
749+
736750
.parameters-section {
737751
margin: 20px 0;
738752

0 commit comments

Comments
 (0)