File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ echo "🔄 Updating repository..."
1313BRANCH_NAME=" $1 "
1414shift # Remove first argument, leaving the rest for exec
1515
16+ # Save the user provided command in environment variable
17+ export AWS_USER_PROVIDED_COMMAND=" $* "
18+
1619echo " 🌿 Checking out branch: $BRANCH_NAME "
1720git fetch
1821git checkout " $BRANCH_NAME "
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ def get_aws_metadata() -> dict:
2222 "AWS_BATCH_JOB_ATTEMPT" ,
2323 "AWS_BATCH_JOB_ID" ,
2424 "AWS_BATCH_JQ_NAME" ,
25+ "AWS_USER_PROVIDED_COMMAND" , # we defined that ourselves in docker_entrypoint.sh
2526 ]
2627 return {env_variable : os .getenv (env_variable ) for env_variable in env_variables }
2728
Original file line number Diff line number Diff line change @@ -1199,6 +1199,22 @@ summary:focus {
11991199 color : # 000000 ;
12001200}
12011201
1202+ /* AWS Command Display Styling */
1203+ .aws-command-display {
1204+ margin-top : 1rem ;
1205+ padding-top : 1rem ;
1206+ border-top : 1px solid var (--border-color );
1207+ }
1208+
1209+ .aws-command-display h4 {
1210+ margin : 0 0 0.5rem 0 ;
1211+ font-size : 1rem ;
1212+ color : var (--accent-color );
1213+ display : flex;
1214+ align-items : center;
1215+ gap : 0.5rem ;
1216+ }
1217+
12021218.delete-experiment-btn {
12031219 background : var (--success-color );
12041220 color : white;
Original file line number Diff line number Diff line change @@ -93,4 +93,21 @@ function setupCopyButtons() {
9393 }
9494 } ) ;
9595 } ) ;
96+
97+ // Add event listeners to AWS command copy buttons
98+ document . querySelectorAll ( ".copy-aws-command-btn" ) . forEach ( ( button ) => {
99+ button . addEventListener ( "click" , function ( e ) {
100+ e . preventDefault ( ) ;
101+ e . stopPropagation ( ) ;
102+
103+ // Get the AWS command from the code element next to this button
104+ const codeElement = this . parentElement . querySelector ( ".folder-path" ) ;
105+ if ( codeElement ) {
106+ const command = codeElement . textContent . trim ( ) ;
107+ copyToClipboard ( command , this ) ;
108+ } else {
109+ console . error ( "No AWS command found near button:" , this ) ;
110+ }
111+ } ) ;
112+ } ) ;
96113}
Load diff This file was deleted.
Original file line number Diff line number Diff line change @@ -31,6 +31,21 @@ <h3><i class="bi bi-hdd"></i> Storage</h3>
3131 </ div >
3232 </ div >
3333
34+ <!-- AWS User Provided Command -->
35+ {% if metadata and metadata.results and metadata.results.aws and metadata.results.aws.AWS_USER_PROVIDED_COMMAND %}
36+ < div class ="storage-item ">
37+ < div class ="storage-label ">
38+ < i class ="bi bi-cloud "> </ i > AWS Command:
39+ </ div >
40+ < div class ="storage-content ">
41+ < code class ="folder-path "> aws/run_job.py -- {{ metadata.results.aws.AWS_USER_PROVIDED_COMMAND }}</ code >
42+ < button class ="btn btn-outline-primary btn-sm copy-aws-command-btn " title ="Copy AWS command ">
43+ < i class ="bi bi-clipboard "> </ i > Copy command
44+ </ button >
45+ </ div >
46+ </ div >
47+ {% endif %}
48+
3449 <!-- External Links -->
3550 < div class ="storage-item ">
3651 < div class ="storage-label ">
You can’t perform that action at this time.
0 commit comments