Skip to content

Commit

Permalink
added vlan feature (#519)
Browse files Browse the repository at this point in the history
Added a VLANs section to the Administration area to allow for the management of VLAN
Pools and Partitions.

- set Admin module to lazy loaded
- changed swagger:gen-win npm script to swagger:gen-docker and updated to be
cross-platform
  • Loading branch information
sei-aschlackman authored Nov 28, 2022
1 parent 5dd0d14 commit 0dc475e
Show file tree
Hide file tree
Showing 108 changed files with 6,875 additions and 831 deletions.
7 changes: 7 additions & 0 deletions openapitools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2,
"generator-cli": {
"version": "6.2.0"
}
}
160 changes: 160 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"docker:destroy": "// Destroys the docker stack, data retained"
},
"config": {
"port": "4310"
"port": "4310",
"openapiArgs": "--additional-properties ngVersion=14.2 --additional-properties modelPropertyNaming=original",
"deleteGeneratedCommand": "rimraf src/app/generated/caster-api/*"
},
"scripts": {
"ng": "ng",
Expand All @@ -22,8 +24,8 @@
"lint": "ng lint caster-ui",
"e2e": "ng e2e caster-ui",
"postinstall": "ngcc",
"swagger:gen": "curl --insecure http://localhost:4309/swagger/v1/swagger.json --output swagger.json && node_modules/@openapitools/openapi-generator-cli/bin/openapi-generator generate -i ./swagger.json -g typescript-angular -o src/app/generated/caster-api --additional-properties ngVersion=12.1 --additional-properties useRxJS6=true --additional-properties modelPropertyNaming=original --skip-validate-spec",
"swagger:gen-win": "docker run --rm -v %CD%:/local openapitools/openapi-generator-cli:v5.3.0 generate -i http://host.docker.internal:4309/swagger/v1/swagger.json?format=openapi -g typescript-angular -o /local/src/app/generated/caster-api --additional-properties ngVersion=12.1 --additional-properties useRxJS6=true --additional-properties modelPropertyNaming=original --skip-validate-spec"
"swagger:gen": "cross-var $npm_package_config_deleteGeneratedCommand && cross-var curl --insecure http://localhost:4309/swagger/v1/swagger.json --output swagger.json && node_modules/@openapitools/openapi-generator-cli/bin/openapi-generator-cli generate -i ./swagger.json -g typescript-angular -o src/app/generated/caster-api $npm_package_config_openapiArgs",
"swagger:gen-docker": "cross-var $npm_package_config_deleteGeneratedCommand && cross-env-shell docker run --rm -v $INIT_CWD:/local openapitools/openapi-generator-cli:v6.2.0 generate -i http://host.docker.internal:4309/swagger/v1/swagger.json?format=openapi -g typescript-angular -o /local/src/app/generated/caster-api $npm_package_config_openapiArgs"
},
"private": true,
"dependencies": {
Expand Down Expand Up @@ -55,6 +57,8 @@
"depcheck": "^1.4.2",
"domsanitizer": "^0.2.3",
"monaco-editor": "^0.34.1",
"ng-for-track-by-property": "^14.0.0",
"ng-table-virtual-scroll": "~1.3.8",
"ngx-clipboard": "^15.1.0",
"oidc-client": "^1.11.5",
"rxjs": "^6.6.7",
Expand All @@ -75,6 +79,7 @@
"@types/jasminewd2": "^2.0.10",
"@types/node": "^16.4.11",
"codelyzer": "^6.0.2",
"cross-env": "^7.0.3",
"cross-var": "^1.1.0",
"jasmine-core": "^3.8.0",
"jasmine-spec-reporter": "^7.0.0",
Expand All @@ -86,6 +91,7 @@
"ng-packagr": "^14.2.2",
"prettier": "^2.7.1",
"protractor": "^7.0.0",
"rimraf": "^3.0.2",
"rxjs-tslint-rules": "^4.34.8",
"rxjs-watcher": "^1.1.3",
"ts-node": "^10.1.0",
Expand Down
20 changes: 20 additions & 0 deletions src/app/admin-app/admin-app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright 2021 Carnegie Mellon University. All Rights Reserved.
// Released under a MIT (SEI)-style license. See LICENSE.md in the project root for license information.

import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { AdminContainerComponent } from './component/admin-container/admin-container.component';

const routes: Routes = [
{
path: '',
component: AdminContainerComponent,
pathMatch: 'full',
},
];

@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class AdminAppRoutingModule {}
49 changes: 37 additions & 12 deletions src/app/admin-app/admin-app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { AdminContainerComponent } from './component/admin-container/admin-conta
import { UsersComponent } from './component/admin-users/users.component';
import { UserListComponent } from './component/admin-users/user-list/user-list.component';
import { FlexLayoutModule } from '@angular/flex-layout';
import { ProjectModule } from '../project/project.module';
import { RouterModule } from '@angular/router';
import { ClipboardModule } from 'ngx-clipboard';
import { AdminModuleListComponent } from './component/admin-modules/modules-list/module-list.component';
Expand All @@ -35,6 +34,22 @@ import { LockingStatusComponent } from './component/admin-workspaces/locking-sta
import { ActiveRunsComponent } from './component/admin-workspaces/active-runs/active-runs.component';
import { CwdTableModule } from '../sei-cwd-common/cwd-table/cwd-table.module';
import { WorkspaceModule } from '../workspace/workspace.module';
import { VlansComponent } from './component/admin-vlans/vlans.component';
import { PoolListComponent } from './component/admin-vlans/pool-list/pool-list.component';
import { PartitionListComponent } from './component/admin-vlans/partition-list/partition-list.component';
import { PartitionComponent } from './component/admin-vlans/partition/partition.component';
import { MatSliderModule } from '@angular/material/slider';
import { VlanListComponent } from './component/admin-vlans/vlan-list/vlan-list.component';
import { MatTableModule } from '@angular/material/table';
import { TableVirtualScrollModule } from 'ng-table-virtual-scroll';
import { ScrollingModule } from '@angular/cdk/scrolling';
import { MatSelectModule } from '@angular/material/select';
import { PoolsComponent } from './component/admin-vlans/pools/pools.component';
import { ProjectVlansComponent } from './component/admin-vlans/project-vlans/project-vlans.component';
import { MatTabsModule } from '@angular/material/tabs';
import { PoolListItemComponent } from './component/admin-vlans/pool-list-item/pool-list-item.component';
import { AdminAppRoutingModule } from './admin-app-routing.module';
import { SharedModule } from '../shared/shared.module';

@NgModule({
declarations: [
Expand All @@ -46,13 +61,27 @@ import { WorkspaceModule } from '../workspace/workspace.module';
AdminWorkspacesComponent,
LockingStatusComponent,
ActiveRunsComponent,
VlansComponent,
PoolListComponent,
PartitionListComponent,
PartitionComponent,
VlanListComponent,
PoolsComponent,
ProjectVlansComponent,
PoolListItemComponent,
],
imports: [
ClipboardModule,
CommonModule,
ProjectModule,
SharedModule,
RouterModule,
FlexLayoutModule,
FormsModule,
CwdTableModule,
WorkspaceModule,
ScrollingModule,
TableVirtualScrollModule,
AdminAppRoutingModule,
MatButtonModule,
MatCardModule,
MatCheckboxModule,
Expand All @@ -66,19 +95,15 @@ import { WorkspaceModule } from '../workspace/workspace.module';
MatProgressBarModule,
MatProgressSpinnerModule,
MatSidenavModule,
MatSlideToggleModule,
MatSortModule,
MatTooltipModule,
MatTreeModule,
RouterModule,
MatSlideToggleModule,
CwdTableModule,
WorkspaceModule,
],
exports: [
AdminContainerComponent,
MatPaginatorModule,
UsersComponent,
UserListComponent,
MatSelectModule,
MatTabsModule,
MatSliderModule,
MatTableModule,
],
exports: [AdminContainerComponent, UsersComponent, UserListComponent],
})
export class AdminAppModule {}
Loading

0 comments on commit 0dc475e

Please sign in to comment.