Skip to content

Commit 64999ae

Browse files
sei-rkemererrkcert1sei-aschlackmansei-tspencersei-awelle
authored
Add classification header (#700)
* Add classification header to player.ui * Moved common header bar component outside of router outlet * Added classification header * layout fixes * migrate to application builder * fix dockerfile path * add localNPM configuration * update layout * fix application bar scrolling * fix admin roles scrollbars * Added settings.shared.json to gitignore * Add classification banner 2 (#699) * Improve Player View Edit Form UX and Fix Application Settings (#689) * Simplify application field labels in view edit - Change application field labels to simple titles - Application Name, Application URL, Icon Path, etc. * Improve view edit form labels and file upload UX - Simplify view information field labels to basic titles - Add DEFAULT badge to default team in team list - Add team selection validation for file uploads - Show red warning when no teams selected for files - Change upload button to 'Save Changes and Upload File' - Disable upload button when no teams selected - Allow clearing teams in UI without server errors - Only save to server when at least one team is selected * Fix application settings dropdowns toggling each other - Remove [(value)]="selected" binding from all dropdowns - Each dropdown now only uses [(ngModel)] for its specific property - Fixes issue where changing Embeddable would affect Load in Background - Simplify save methods to avoid change detection errors - Fix NG0100 ExpressionChangedAfterItHasBeenCheckedError * Improve file upload UX to match team section pattern - Restructure upload section as expansion panel (like teams) - Add file icon before filename in panel title - Move 'Add New File' button to always be visible at top - Match team selection layout to existing uploaded files - Change label to 'Teams with Access' - Add validation warning when no teams selected - Position Cancel and Upload buttons at bottom * Convert application template fields to use mat-label - Change from placeholder to mat-label for Name, URL, Icon Path - Consistent with other form fields across the application * labels added (#692) * Chore/auto version update (#694) * chore: configure automatic version updates via reusable workflow Migrate to the cmu-sei/Crucible-Github-Actions docker-build reusable workflow @docker-v1 and add versionMode/versionFiles inputs to enable automatic version bumping on release. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * migrate to cmu-sei/Crucible-Github-Actions/.github/workflows/docker-build.yaml@docker-v1.1.2 --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * Use v1 tag for docker-build action (#695) * point to 0.6.0 * lock file --------- Co-authored-by: Adam Welle <arwelle@cert.org> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Jarrett Booz <89405171+sei-jbooz@users.noreply.github.com> * remove --resources-output-path=assets/fonts --------- Co-authored-by: Robert Kemerer <rkemerer@cert.org> Co-authored-by: Andrew Schlackman <72105194+sei-aschlackman@users.noreply.github.com> Co-authored-by: Tim Spencer <72101647+sei-tspencer@users.noreply.github.com> Co-authored-by: Adam Welle <arwelle@cert.org> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Jarrett Booz <89405171+sei-jbooz@users.noreply.github.com> Co-authored-by: sei-tspencer <trspencer@sei.cmu.edu>
1 parent d8040d8 commit 64999ae

22 files changed

+160
-86
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ __pycache__/
301301
*.xsd.cs
302302

303303
*/assets/config/settings.env.json*
304+
*/assets/config/settings.shared.json*
304305

305306
/dist
306307
/docker
308+
tsconfig.local-npm.json

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ WORKDIR /ng-app
1313

1414
COPY . .
1515

16-
RUN npx ng build --resources-output-path=assets/fonts --configuration production
16+
RUN npx ng build --configuration production
1717

1818
### Stage 2: Setup ###
1919

@@ -23,7 +23,7 @@ USER root
2323
RUN rm -rf /usr/share/nginx/html/*
2424
COPY default.conf /etc/nginx/conf.d/default.conf
2525
COPY nginx-basehref.sh /docker-entrypoint.d/90-basehref.sh
26-
COPY --from=builder /ng-app/dist /usr/share/nginx/html
26+
COPY --from=builder /ng-app/dist/browser /usr/share/nginx/html
2727
RUN chown -R nginx:nginx /usr/share/nginx/html
2828
USER nginx
2929

angular.json

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@
99
"projectType": "application",
1010
"architect": {
1111
"build": {
12-
"builder": "@angular-devkit/build-angular:browser",
12+
"builder": "@angular-devkit/build-angular:application",
1313
"options": {
14-
"outputPath": "dist",
14+
"outputPath": {
15+
"base": "dist"
16+
},
1517
"index": "src/index.html",
16-
"main": "src/main.ts",
1718
"tsConfig": "src/tsconfig.app.json",
18-
"polyfills": "src/polyfills.ts",
19+
"polyfills": ["src/polyfills.ts"],
1920
"allowedCommonJsDependencies": [
2021
"crypto-js/core.js",
2122
"crypto-js/enc-base64.js",
@@ -26,7 +27,7 @@
2627
"src/assets",
2728
{
2829
"glob": "auth-callback-silent.html",
29-
"input": "node_modules/@cmusei/crucible-common/src/lib/comn-auth/assets/",
30+
"input": "../../libraries/Crucible.Common.Ui/projects/@crucible-common/src/lib/comn-auth/assets/",
3031
"output": "/"
3132
}
3233
],
@@ -35,11 +36,11 @@
3536
"./node_modules/bootstrap/dist/css/bootstrap-utilities.min.css"
3637
],
3738
"stylePreprocessorOptions": {
38-
"includePaths": [
39-
"src/styles"
40-
]
39+
"includePaths": ["src/styles"]
4140
},
42-
"scripts": []
41+
"scripts": [],
42+
"preserveSymlinks": true,
43+
"browser": "src/main.ts"
4344
},
4445
"configurations": {
4546
"production": {
@@ -65,13 +66,17 @@
6566
]
6667
},
6768
"development": {
68-
"buildOptimizer": false,
6969
"optimization": false,
70-
"vendorChunk": true,
7170
"extractLicenses": false,
72-
"sourceMap": true,
73-
"namedChunks": true,
74-
"preserveSymlinks": true
71+
"sourceMap": {
72+
"scripts": true,
73+
"styles": true,
74+
"vendor": true
75+
},
76+
"namedChunks": true
77+
},
78+
"localNPM": {
79+
"tsConfig": "tsconfig.local-npm.json"
7580
}
7681
},
7782
"defaultConfiguration": "production"
@@ -87,6 +92,9 @@
8792
},
8893
"development": {
8994
"buildTarget": "player-ui:build:development"
95+
},
96+
"localNPM": {
97+
"buildTarget": "player-ui:build:development,localNPM"
9098
}
9199
},
92100
"defaultConfiguration": "development"

package-lock.json

Lines changed: 19 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737
"@angular/platform-browser": "^21.2.1",
3838
"@angular/platform-browser-dynamic": "^21.2.1",
3939
"@angular/router": "^21.2.1",
40-
"@cmusei/crucible-common": "0.4.2",
41-
"@material/material-color-utilities": "^0.4.0",
40+
"@cmusei/crucible-common": "^0.6.0",
4241
"@datorama/akita": "^8.0.1",
4342
"@datorama/akita-ng-router-store": "^8.0.0",
43+
"@material/material-color-utilities": "^0.4.0",
4444
"@mdi/font": "^7.4.47",
4545
"@microsoft/signalr": "^10.0.0",
4646
"@popperjs/core": "^2.11.8",

src/app/app.component.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,10 @@
33
Released under a MIT (SEI)-style license. See LICENSE.md in the project root for license information.
44
-->
55

6-
<router-outlet></router-outlet>
6+
<div class="app-layout">
7+
<comn-header-bar></comn-header-bar>
8+
9+
<main class="main-content">
10+
<router-outlet></router-outlet>
11+
</main>
12+
</div>

src/app/app.component.scss

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,46 @@
11
// Copyright 2021 Carnegie Mellon University. All Rights Reserved.
22
// Released under a MIT (SEI)-style license. See LICENSE.md in the project root for license information.
33

4+
.app-layout {
5+
display: grid;
6+
grid-template-rows: auto 1fr;
7+
height: 100vh;
8+
overflow: hidden;
9+
}
10+
11+
.main-content {
12+
overflow: auto;
13+
}
14+
415
@font-face {
516
font-family: 'open_sansregular';
617
/*
718
Note about src: url() and BaseHref:
819
When using BaseHref SCSS and angular pre-processors do not like relative paths
9-
We can escape the angular pre-processors by adding `^` to the start of the URL
10-
20+
We can escape the angular pre-processors by adding `../` to the start of the URL
21+
1122
*/
12-
src: url('^assets/fonts/opensans-regular.woff2') format('woff2'),
13-
url('^assets/fonts/opensans-regular.woff') format('woff');
23+
src:
24+
url('../assets/fonts/opensans-regular.woff2') format('woff2'),
25+
url('../assets/fonts/opensans-regular.woff') format('woff');
1426
font-weight: normal;
1527
font-style: normal;
1628
}
1729

1830
@font-face {
1931
font-family: 'open_sansbold';
20-
src: url('^assets/fonts/opensans-bold.woff2') format('woff2'),
21-
url('^assets/fonts/opensans-bold.woff') format('woff');
32+
src:
33+
url('../assets/fonts/opensans-bold.woff2') format('woff2'),
34+
url('../assets/fonts/opensans-bold.woff') format('woff');
2235
font-weight: normal;
2336
font-style: normal;
2437
}
2538

2639
@font-face {
2740
font-family: 'open_sansitalic';
28-
src: url('^assets/fonts/opensans-italic.woff2') format('woff2'),
29-
url('^assets/fonts/opensans-italic.woff') format('woff');
41+
src:
42+
url('../assets/fonts/opensans-italic.woff2') format('woff2'),
43+
url('../assets/fonts/opensans-italic.woff') format('woff');
3044
font-weight: normal;
3145
font-style: normal;
3246
}

src/app/app.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ import {
4848
ComnAuthModule,
4949
ComnSettingsModule,
5050
ComnSettingsService,
51+
ComnHeaderBarModule,
5152
} from '@cmusei/crucible-common';
5253
import { AkitaNgRouterStoreModule } from '@datorama/akita-ng-router-store';
5354
import { AkitaNgDevtools } from '@datorama/akita-ngdevtools';
@@ -220,6 +221,7 @@ export const myCustomTooltipDefaults: MatTooltipDefaultOptions = {
220221
AkitaNgRouterStoreModule,
221222
ComnSettingsModule.forRoot(),
222223
ComnAuthModule.forRoot(),
224+
ComnHeaderBarModule,
223225
TableVirtualScrollModule,
224226
ResizableModule], providers: [
225227
AppService,

src/app/components/admin-app/admin-app.component.scss

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2021 Carnegie Mellon University. All Rights Reserved.
22
// Released under a MIT (SEI)-style license. See LICENSE.md in the project root for license information.
3-
43
.appitems-container .mat-list-item {
54
height: auto;
65
}
@@ -15,12 +14,15 @@
1514
cursor: pointer;
1615
}
1716

17+
:host {
18+
display: flex;
19+
flex-direction: column;
20+
height: 100%;
21+
}
22+
1823
.appcontent-container {
19-
position: absolute;
20-
top: 0;
21-
bottom: 0;
22-
left: 0;
23-
right: 0;
24+
flex: 1;
25+
overflow: hidden;
2426
}
2527

2628
.appbarmenu-container {

src/app/components/admin-app/admin-app.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2021 Carnegie Mellon University. All Rights Reserved.
22
// Released under a MIT (SEI)-style license. See LICENSE.md in the project root for license information.
33

4-
import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
4+
import { Component, OnDestroy, OnInit, ViewChild, ElementRef, AfterViewInit, Renderer2 } from '@angular/core';
55
import { MatSidenav } from '@angular/material/sidenav';
66
import { Router } from '@angular/router';
77
import {
@@ -25,6 +25,7 @@ import { SystemPermission } from '../../generated/player-api';
2525
})
2626
export class AdminAppComponent implements OnInit, OnDestroy {
2727
@ViewChild('sidenav') sidenav: MatSidenav;
28+
2829
public TopbarView = TopbarView;
2930
public queryParams: any;
3031
Section = Section;
@@ -96,7 +97,7 @@ export class AdminAppComponent implements OnInit, OnDestroy {
9697
private routerQuery: RouterQuery,
9798
private authQuery: ComnAuthQuery,
9899
public loggedInUserService: LoggedInUserService,
99-
public permissionsService: UserPermissionsService
100+
public permissionsService: UserPermissionsService,
100101
) {
101102
this.theme$ = this.authQuery.userTheme$;
102103
}

0 commit comments

Comments
 (0)