diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 09d9db88..d7b0166d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -16,9 +16,13 @@ updates: schedule: interval: "weekly" ignore: + # Managed by cisagov/skeleton-generic - dependency-name: actions/cache - dependency-name: actions/checkout + - dependency-name: actions/setup-go - dependency-name: actions/setup-python + - dependency-name: hashicorp/setup-terraform + - dependency-name: mxschmitt/action-tmate # Managed by cisagov/skeleton-docker - dependency-name: actions/download-artifact - dependency-name: actions/github-script @@ -27,6 +31,7 @@ updates: - dependency-name: docker/login-action - dependency-name: docker/setup-buildx-action - dependency-name: docker/setup-qemu-action + - dependency-name: github/codeql-action - package-ecosystem: "pip" directory: "/" diff --git a/.github/labels.yml b/.github/labels.yml new file mode 100644 index 00000000..014cc00c --- /dev/null +++ b/.github/labels.yml @@ -0,0 +1,73 @@ +--- +# Rather than breaking up descriptions into multiline strings we disable that +# specific rule in yamllint for this file. +# yamllint disable rule:line-length +- color: "eb6420" + description: This issue or pull request is awaiting the outcome of another issue or pull request + name: blocked +- color: "000000" + description: This issue or pull request involves changes to existing functionality + name: breaking change +- color: "d73a4a" + description: This issue or pull request addresses broken functionality + name: bug +- color: "07648d" + description: This issue will be advertised on code.gov's Open Tasks page (https://code.gov/open-tasks) + name: code.gov +- color: "0366d6" + description: Pull requests that update a dependency file + name: dependencies +- color: "2497ed" + description: Pull requests that update Docker code + name: docker +- color: "5319e7" + description: This issue or pull request improves or adds to documentation + name: documentation +- color: "cfd3d7" + description: This issue or pull request already exists or is covered in another issue or pull request + name: duplicate +- color: "b005bc" + description: A high-level objective issue encompassing multiple issues instead of a specific unit of work + name: epic +- color: "000000" + description: Pull requests that update GitHub Actions code + name: github-actions +- color: "0e8a16" + description: This issue or pull request is well-defined and good for newcomers + name: good first issue +- color: "ff7518" + description: Pull request that should count toward Hacktoberfest participation + name: hacktoberfest-accepted +- color: "a2eeef" + description: This issue or pull request will add or improve functionality, maintainability, or ease of use + name: improvement +- color: "fef2c0" + description: This issue or pull request is not applicable, incorrect, or obsolete + name: invalid +- color: "ce099a" + description: This pull request is ready to merge during the next Lineage Kraken release + name: kraken 🐙 +- color: "a4fc5d" + description: This issue or pull request requires further information + name: need info +- color: "fcdb45" + description: This pull request is awaiting an action or decision to move forward + name: on hold +- color: "ef476c" + description: This issue is a request for information or needs discussion + name: question +- color: "d73a4a" + description: This issue or pull request addresses a security issue + name: security +- color: "00008b" + description: This issue or pull request adds or otherwise modifies test code + name: test +- color: "1d76db" + description: This issue or pull request pulls in upstream updates + name: upstream update +- color: "d4c5f9" + description: This issue or pull request increments the version number + name: version bump +- color: "ffffff" + description: This issue will not be incorporated + name: wontfix diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8754b231..0d18a7b9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,28 +58,24 @@ jobs: uses: cisagov/setup-env-github-action@develop - uses: actions/checkout@v3 - id: setup-python - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: "3.10" # We need the Go version and Go cache location for the actions/cache step, # so the Go installation must happen before that. - - uses: actions/setup-go@v2 + - id: setup-go + uses: actions/setup-go@v3 with: - go-version: "1.16" - - name: Store installed Go version - id: go-version - run: | - echo "::set-output name=version::"\ - "$(go version | sed 's/^go version go\([0-9.]\+\) .*/\1/')" + go-version: "1.19" - name: Lookup Go cache directory id: go-cache run: | - echo "::set-output name=dir::$(go env GOCACHE)" + echo "dir=$(go env GOCACHE)" >> $GITHUB_OUTPUT - uses: actions/cache@v3 env: BASE_CACHE_KEY: "${{ github.job }}-${{ runner.os }}-\ py${{ steps.setup-python.outputs.python-version }}-\ - go${{ steps.go-version.outputs.version }}-\ + go${{ steps.setup-go.outputs.go-version }}-\ packer${{ steps.setup-env.outputs.packer-version }}-\ tf${{ steps.setup-env.outputs.terraform-version }}-" with: @@ -119,7 +115,7 @@ jobs: ${{ env.CURL_CACHE_DIR }}/"${PACKER_ZIP}" sudo mv /usr/local/bin/packer /usr/local/bin/packer-default sudo ln -s /opt/packer/packer /usr/local/bin/packer - - uses: hashicorp/setup-terraform@v1 + - uses: hashicorp/setup-terraform@v2 with: terraform_version: ${{ steps.setup-env.outputs.terraform-version }} - name: Install shfmt @@ -195,7 +191,7 @@ jobs: - uses: actions/checkout@v3 - name: Gather repository metadata id: repo - uses: actions/github-script@v5 + uses: actions/github-script@v6 with: script: | const repo = await github.rest.repos.get(context.repo) @@ -236,9 +232,9 @@ jobs: do TAGS="${TAGS},ghcr.io/${i}" done - echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ') - echo ::set-output name=source_version::$(./bump_version.sh show) - echo ::set-output name=tags::${TAGS} + echo "created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT + echo "source_version=$(./bump_version.sh show)" >> $GITHUB_OUTPUT + echo "tags=${TAGS}" >> $GITHUB_OUTPUT echo tags=${TAGS} - name: Setup tmate debug session uses: mxschmitt/action-tmate@v3 @@ -269,7 +265,7 @@ jobs: run: mkdir -p dist - name: Build image id: docker_build - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: build-args: | VERSION=${{ needs.prepare.outputs.source_version }} @@ -322,9 +318,9 @@ jobs: steps: - uses: actions/checkout@v3 - id: setup-python - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: "3.10" - name: Cache testing environments uses: actions/cache@v3 env: @@ -370,6 +366,10 @@ jobs: runs-on: ubuntu-latest needs: [lint, prepare, test] if: github.event_name != 'pull_request' + # When Dependabot creates a PR it requires this permission in + # order to push Docker images to ghcr.io. + permissions: + packages: write steps: - name: Login to Docker Hub uses: docker/login-action@v2 @@ -401,7 +401,7 @@ jobs: run: ./buildx-dockerfile.sh - name: Build and push platform images to registries id: docker_build - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: build-args: | VERSION=${{ needs.prepare.outputs.source_version }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 33d19999..bf0d1489 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,5 +1,4 @@ --- - # For most projects, this workflow file will not need changing; you simply need # to commit it to your repository. # @@ -11,10 +10,12 @@ on: push: # Dependabot triggered push events have read-only access, but uploading code # scanning requires write access. - branches-ignore: [dependabot/**] + branches-ignore: + - dependabot/** pull_request: # The branches below must be a subset of the branches above - branches: [develop] + branches: + - develop schedule: - cron: '0 21 * * 6' @@ -22,48 +23,45 @@ jobs: analyze: name: Analyze runs-on: ubuntu-latest - + permissions: + # required for all workflows + security-events: write strategy: fail-fast: false matrix: # Override automatic language detection by changing the below list - # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', - # 'python'] - language: ['python'] + # Supported options are go, javascript, csharp, python, cpp, and java + language: + - python # Learn more... # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a - # config file. By default, queries listed here will override any - # specified in a config file. Prefix the list here with "+" to use - # these queries and those in the config file. queries: - # ./path/to/local/query, your-org/your-repo/queries@main - # Autobuild attempts to build any compiled languages (C/C++, C#, or + # Autobuild attempts to build any compiled languages (C/C++, C#, or # Java). If this step fails, then you should remove it and run the build - # manually (see below) + # manually (see below). - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v2 # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following - # three lines and modify them (or add more) to build your code if your - # project uses a compiled language + # three lines and modify them (or add more) to build your code if your + # project uses a compiled language # - run: | - # make bootstrap - # make release + # make bootstrap + # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml new file mode 100644 index 00000000..ae7c091b --- /dev/null +++ b/.github/workflows/sync-labels.yml @@ -0,0 +1,29 @@ +--- +name: sync-labels + +on: + push: + paths: + - '.github/labels.yml' + - '.github/workflows/sync-labels.yml' + +permissions: + contents: read + +jobs: + labeler: + permissions: + # actions/checkout needs this to fetch code + contents: read + # crazy-max/ghaction-github-labeler needs this to manage repository labels + issues: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Sync repository labels + if: success() + uses: crazy-max/ghaction-github-labeler@v4 + with: + # This is a hideous ternary equivalent so we only do a dry run unless + # this workflow is triggered by the develop branch. + dry-run: ${{ github.ref_name == 'develop' && 'false' || 'true' }} diff --git a/.lgtm.yml b/.lgtm.yml deleted file mode 100644 index 89502636..00000000 --- a/.lgtm.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -extraction: - python: - python_setup: - version: 3 - requirements_files: - - requirements-test.txt - setup_py: false diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a1fdcbfd..bb426e3c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ default_language_version: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.1.0 + rev: v4.4.0 hooks: - id: check-case-conflict - id: check-executables-have-shebangs @@ -20,7 +20,6 @@ repos: args: - --allow-missing-credentials - id: detect-private-key - exclude: src/secrets/privkey.pem - id: end-of-file-fixer exclude: files/(issue|motd)|src/DomainManager/src/assets/userguide/ - id: mixed-line-ending @@ -36,17 +35,17 @@ repos: # Text file hooks - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.31.1 + rev: v0.33.0 hooks: - id: markdownlint args: - --config=.mdl_config.yaml - repo: https://github.com/pre-commit/mirrors-prettier - rev: v2.6.1 + rev: v3.0.0-alpha.4 hooks: - id: prettier - repo: https://github.com/adrienverge/yamllint - rev: v1.26.3 + rev: v1.29.0 hooks: - id: yamllint args: @@ -54,14 +53,14 @@ repos: # GitHub Actions hooks - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.14.2 + rev: 0.21.0 hooks: - id: check-github-actions - id: check-github-workflows # pre-commit hooks - repo: https://github.com/pre-commit/pre-commit - rev: v2.17.0 + rev: v3.0.2 hooks: - id: validate_manifest @@ -86,6 +85,7 @@ repos: - id: shell-lint # Python hooks + # Run bandit on the "tests" tree with a configuration - repo: https://github.com/PyCQA/bandit rev: 1.7.4 hooks: @@ -94,33 +94,33 @@ repos: files: tests args: - --config=.bandit.yml - # Run bandit everything but tests directory + # Run bandit on everything except the "tests" tree - repo: https://github.com/PyCQA/bandit - rev: 1.7.0 + rev: 1.7.4 hooks: - id: bandit name: bandit (everything else) exclude: tests - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 22.12.0 hooks: - id: black - - repo: https://gitlab.com/pycqa/flake8 - rev: 3.9.2 + - repo: https://github.com/PyCQA/flake8 + rev: 6.0.0 hooks: - id: flake8 additional_dependencies: - flake8-docstrings - repo: https://github.com/PyCQA/isort - rev: 5.10.1 + rev: 5.12.0 hooks: - id: isort - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.942 + rev: v0.991 hooks: - id: mypy - repo: https://github.com/asottile/pyupgrade - rev: v2.31.1 + rev: v3.3.1 hooks: - id: pyupgrade @@ -133,14 +133,14 @@ repos: # Terraform hooks - repo: https://github.com/antonbabenko/pre-commit-terraform - rev: v1.64.0 + rev: v1.77.0 hooks: - id: terraform_fmt - id: terraform_validate # Docker hooks - repo: https://github.com/IamTheFij/docker-pre-commit - rev: v2.1.0 + rev: v2.1.1 hooks: - id: docker-compose-check diff --git a/.yamllint b/.yamllint index 6e1674e2..adefa6ec 100644 --- a/.yamllint +++ b/.yamllint @@ -10,6 +10,16 @@ rules: # this behavior. comments-indentation: disable + # yamllint does not allow inline mappings that exceed the line length by + # default. There are many scenarios where the inline mapping may be a key, + # hash, or other long value that would exceed the line length but cannot + # reasonably be broken across lines. + line-length: + # This rule implies the allow-non-breakable-words rule + allow-non-breakable-inline-mappings: true + # Allows a 10% overage from the default limit of 80 + max: 88 + # yamllint doesn't like when we use yes and no for true and false, # but that's pretty standard in Ansible. truthy: disable diff --git a/bump_version.sh b/bump_version.sh index a6c8ed9c..963389f9 100755 --- a/bump_version.sh +++ b/bump_version.sh @@ -12,6 +12,9 @@ README_FILE=README.md HELP_INFORMATION="bump_version.sh (show|major|minor|patch|prerelease|build|finalize)" old_version=$(sed -n "s/^__version__ = \"\(.*\)\"$/\1/p" $VERSION_FILE) +# Comment out periods so they are interpreted as periods and don't +# just match any character +old_version_regex=${old_version//\./\\\.} if [ $# -ne 1 ]; then echo "$HELP_INFORMATION" @@ -21,9 +24,9 @@ else new_version=$(python -c "import semver; print(semver.bump_$1('$old_version'))") echo Changing version from "$old_version" to "$new_version" tmp_file=/tmp/version.$$ - sed "s/$old_version/$new_version/" $VERSION_FILE > $tmp_file + sed "s/$old_version_regex/$new_version/" $VERSION_FILE > $tmp_file mv $tmp_file $VERSION_FILE - sed "s/$old_version/$new_version/" $README_FILE > $tmp_file + sed "s/$old_version_regex/$new_version/" $README_FILE > $tmp_file mv $tmp_file $README_FILE git add $VERSION_FILE $README_FILE git commit -m"Bump version from $old_version to $new_version" @@ -33,12 +36,12 @@ else new_version=$(python -c "import semver; print(semver.finalize_version('$old_version'))") echo Changing version from "$old_version" to "$new_version" tmp_file=/tmp/version.$$ - sed "s/$old_version/$new_version/" $VERSION_FILE > $tmp_file + sed "s/$old_version_regex/$new_version/" $VERSION_FILE > $tmp_file mv $tmp_file $VERSION_FILE - sed "s/$old_version/$new_version/" $README_FILE > $tmp_file + sed "s/$old_version_regex/$new_version/" $README_FILE > $tmp_file mv $tmp_file $README_FILE git add $VERSION_FILE $README_FILE - git commit -m"Bump version from $old_version to $new_version" + git commit -m"Finalize version from $old_version to $new_version" git push ;; show) diff --git a/src/DomainManager/e2e/src/app.e2e-spec.ts b/src/DomainManager/e2e/src/app.e2e-spec.ts index d98d3268..235dd8d5 100644 --- a/src/DomainManager/e2e/src/app.e2e-spec.ts +++ b/src/DomainManager/e2e/src/app.e2e-spec.ts @@ -19,7 +19,7 @@ describe('workspace-project App', () => { expect(logs).not.toContain( jasmine.objectContaining({ level: logging.Level.SEVERE, - } as logging.Entry) + } as logging.Entry), ); }); }); diff --git a/src/DomainManager/e2e/src/app.po.ts b/src/DomainManager/e2e/src/app.po.ts index c63155bc..f72cedf7 100644 --- a/src/DomainManager/e2e/src/app.po.ts +++ b/src/DomainManager/e2e/src/app.po.ts @@ -7,7 +7,7 @@ export class AppPage { getTitleText(): Promise { return element( - by.css('app-root .content span') + by.css('app-root .content span'), ).getText() as Promise; } } diff --git a/src/DomainManager/src/app/app.component.spec.ts b/src/DomainManager/src/app/app.component.spec.ts index 4ff55be6..cdc3da58 100644 --- a/src/DomainManager/src/app/app.component.spec.ts +++ b/src/DomainManager/src/app/app.component.spec.ts @@ -27,7 +27,7 @@ describe('AppComponent', () => { fixture.detectChanges(); const compiled = fixture.nativeElement; expect(compiled.querySelector('.content span').textContent).toContain( - 'DomainManager app is running!' + 'DomainManager app is running!', ); }); }); diff --git a/src/DomainManager/src/app/components/about/about.component.ts b/src/DomainManager/src/app/components/about/about.component.ts index 558bd943..4d20c852 100644 --- a/src/DomainManager/src/app/components/about/about.component.ts +++ b/src/DomainManager/src/app/components/about/about.component.ts @@ -21,7 +21,7 @@ export class AboutComponent implements OnInit { public layoutSvc: LayoutService, public userAuthSvc: UserAuthService, public dialog: MatDialog, - public alertsSvc: AlertsService + public alertsSvc: AlertsService, ) { this.layoutSvc.setTitle('About'); } @@ -40,7 +40,7 @@ export class AboutComponent implements OnInit { }, (error) => { console.log(error); - } + }, ); } @@ -51,7 +51,7 @@ export class AboutComponent implements OnInit { }, (error) => { console.log(error); - } + }, ); } @@ -73,7 +73,7 @@ export class AboutComponent implements OnInit { }, (error) => { this.alertsSvc.alert(error.error); - } + }, ); } else { dialogRef.close(); diff --git a/src/DomainManager/src/app/components/applications/application-edit-dialog/application-edit-dialog.component.ts b/src/DomainManager/src/app/components/applications/application-edit-dialog/application-edit-dialog.component.ts index a9b31028..c19ef3fd 100644 --- a/src/DomainManager/src/app/components/applications/application-edit-dialog/application-edit-dialog.component.ts +++ b/src/DomainManager/src/app/components/applications/application-edit-dialog/application-edit-dialog.component.ts @@ -30,7 +30,7 @@ export class ApplicationEditDialogComponent implements OnInit { public dialog: MatDialog, private dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public data: ApplicationModel, - private applicationSvc: ApplicationService + private applicationSvc: ApplicationService, ) {} ngOnInit(): void { @@ -59,7 +59,7 @@ export class ApplicationEditDialogComponent implements OnInit { (error) => { console.log(error); this.alertsSvc.alert(error.error.error); - } + }, ); } } diff --git a/src/DomainManager/src/app/components/applications/applications-details/applications-details.component.ts b/src/DomainManager/src/app/components/applications/applications-details/applications-details.component.ts index df391e2b..84264c65 100644 --- a/src/DomainManager/src/app/components/applications/applications-details/applications-details.component.ts +++ b/src/DomainManager/src/app/components/applications/applications-details/applications-details.component.ts @@ -21,7 +21,7 @@ export class ApplicationsDetailsComponent implements OnInit { constructor( public activeRoute: ActivatedRoute, public applicationSvc: ApplicationService, - public userSvc: UserManagementService + public userSvc: UserManagementService, ) {} ngOnInit(): void { diff --git a/src/DomainManager/src/app/components/applications/applications-details/tabs/applications-details-domains/applications-details-domains.component.ts b/src/DomainManager/src/app/components/applications/applications-details/tabs/applications-details-domains/applications-details-domains.component.ts index b09dc057..1ec92341 100644 --- a/src/DomainManager/src/app/components/applications/applications-details/tabs/applications-details-domains/applications-details-domains.component.ts +++ b/src/DomainManager/src/app/components/applications/applications-details/tabs/applications-details-domains/applications-details-domains.component.ts @@ -48,7 +48,7 @@ export class ApplicationsDetailsDomainsComponent implements OnInit { (success) => {}, (failure) => { this.transferItem(this.dataSourceTwo, this.dataSourceOne, row); - } + }, ); this.setSorts(); } @@ -60,7 +60,7 @@ export class ApplicationsDetailsDomainsComponent implements OnInit { (success) => {}, (failure) => { this.transferItem(this.dataSourceOne, this.dataSourceTwo, row); - } + }, ); this.setSorts(); } diff --git a/src/DomainManager/src/app/components/applications/applications-details/tabs/applications-details-summary/applications-details-summary.component.ts b/src/DomainManager/src/app/components/applications/applications-details/tabs/applications-details-summary/applications-details-summary.component.ts index ef8ba686..2f44bac1 100644 --- a/src/DomainManager/src/app/components/applications/applications-details/tabs/applications-details-summary/applications-details-summary.component.ts +++ b/src/DomainManager/src/app/components/applications/applications-details/tabs/applications-details-summary/applications-details-summary.component.ts @@ -27,7 +27,7 @@ export class ApplicationsDetailsSummaryComponent implements OnInit { constructor( public activeRoute: ActivatedRoute, public appTabSvc: ApplicationsTabService, - public layoutSvc: LayoutService + public layoutSvc: LayoutService, ) { this.layoutSvc.setTitle('Application Details'); } @@ -48,7 +48,7 @@ export class ApplicationsDetailsSummaryComponent implements OnInit { if (this.app_id !== null) { this.appTabSvc.getApplication(this.app_id); } - }) + }), ); } @@ -61,13 +61,13 @@ export class ApplicationsDetailsSummaryComponent implements OnInit { setForm(application) { this.applicationForm.controls.name.setValue(application.name); this.applicationForm.controls.contactName.setValue( - application.contact_name + application.contact_name, ); this.applicationForm.controls.contactEmail.setValue( - application.contact_email + application.contact_email, ); this.applicationForm.controls.contactPhone.setValue( - application.contact_phone + application.contact_phone, ); } diff --git a/src/DomainManager/src/app/components/applications/applications-details/tabs/applications-details-users/applications-details-users.component.html b/src/DomainManager/src/app/components/applications/applications-details/tabs/applications-details-users/applications-details-users.component.html index 8a205522..7f3e62a2 100644 --- a/src/DomainManager/src/app/components/applications/applications-details/tabs/applications-details-users/applications-details-users.component.html +++ b/src/DomainManager/src/app/components/applications/applications-details/tabs/applications-details-users/applications-details-users.component.html @@ -19,7 +19,7 @@

Application Users

Created Date {{ - row.UserCreateDate | date: "MM/dd/yy" + row.UserCreateDate | date : "MM/dd/yy" }} @@ -27,7 +27,7 @@

Application Users

Last Modified Date {{ - row.UserLastModifiedDate | date: "MM/dd/yy" + row.UserLastModifiedDate | date : "MM/dd/yy" }} diff --git a/src/DomainManager/src/app/components/applications/applications-list/application-list.component.ts b/src/DomainManager/src/app/components/applications/applications-list/application-list.component.ts index 37f0406f..8c251a43 100644 --- a/src/DomainManager/src/app/components/applications/applications-list/application-list.component.ts +++ b/src/DomainManager/src/app/components/applications/applications-list/application-list.component.ts @@ -44,7 +44,7 @@ export class ApplicationListComponent public applicationSvc: ApplicationService, public dialog: MatDialog, public layoutSvc: LayoutService, - private router: Router + private router: Router, ) { this.layoutSvc.setTitle('Applications'); } @@ -83,7 +83,7 @@ export class ApplicationListComponent (error) => { this.alertsSvc.alert(error); this.loading = false; - } + }, ); } @@ -118,7 +118,7 @@ export class ApplicationListComponent }, (failure) => { this.alertsSvc.alert(failure); - } + }, ); } else { dialogRef.close(); diff --git a/src/DomainManager/src/app/components/categorization/categorization-reject-dialog/categorization-reject-dialog.component.ts b/src/DomainManager/src/app/components/categorization/categorization-reject-dialog/categorization-reject-dialog.component.ts index 081c0824..d0e2b9ab 100644 --- a/src/DomainManager/src/app/components/categorization/categorization-reject-dialog/categorization-reject-dialog.component.ts +++ b/src/DomainManager/src/app/components/categorization/categorization-reject-dialog/categorization-reject-dialog.component.ts @@ -34,7 +34,7 @@ export class CategorizationRejectDialogComponent implements OnInit { public alertsSvc: AlertsService, public dialog: MatDialog, private dialogRef: MatDialogRef, - private domainSvc: DomainService + private domainSvc: DomainService, ) {} ngOnInit() {} diff --git a/src/DomainManager/src/app/components/categorization/categorization.component.ts b/src/DomainManager/src/app/components/categorization/categorization.component.ts index 109533a9..fbf93198 100644 --- a/src/DomainManager/src/app/components/categorization/categorization.component.ts +++ b/src/DomainManager/src/app/components/categorization/categorization.component.ts @@ -28,7 +28,7 @@ export class CategorizationComponent { public categorySvc: CategoryService, public dialog: MatDialog, public layoutSvc: LayoutService, - public categorizationTabSvc: CategorizationTabService + public categorizationTabSvc: CategorizationTabService, ) { this.layoutSvc.setTitle('Categorization'); } @@ -49,7 +49,7 @@ export class CategorizationComponent { }, (failure) => { console.log(failure); - } + }, ); } @@ -79,14 +79,14 @@ export class CategorizationComponent { (success) => { this.alertsSvc.alert('Proxy status has been updated.'); const proxy = this.verifyCategoryList.data.findIndex( - (obj) => obj._id === categorization_id + (obj) => obj._id === categorization_id, ); this.verifyCategoryList.data.splice(proxy, 1); this.verifyCategoryList.data = this.verifyCategoryList.data; }, (failure) => { this.alertsSvc.alert('Error updating proxy status.'); - } + }, ); } }); diff --git a/src/DomainManager/src/app/components/categorization/tabs/categorization-submit/categorization-submit.component.html b/src/DomainManager/src/app/components/categorization/tabs/categorization-submit/categorization-submit.component.html index 9b7d5e7f..c65d5688 100644 --- a/src/DomainManager/src/app/components/categorization/tabs/categorization-submit/categorization-submit.component.html +++ b/src/DomainManager/src/app/components/categorization/tabs/categorization-submit/categorization-submit.component.html @@ -74,10 +74,10 @@

Proxy Categorization - Domains To Submit

Date Requested {{ - row.updated | date: "MM/dd/yy" + row.updated | date : "MM/dd/yy" }} {{ - row.created | date: "MM/dd/yy" + row.created | date : "MM/dd/yy" }} diff --git a/src/DomainManager/src/app/components/categorization/tabs/categorization-submit/categorization-submit.component.ts b/src/DomainManager/src/app/components/categorization/tabs/categorization-submit/categorization-submit.component.ts index d961d53d..4f58c77c 100644 --- a/src/DomainManager/src/app/components/categorization/tabs/categorization-submit/categorization-submit.component.ts +++ b/src/DomainManager/src/app/components/categorization/tabs/categorization-submit/categorization-submit.component.ts @@ -42,7 +42,7 @@ export class CategorizationSubmitComponent extends CategorizationComponent { this.submitCategoryData.map((item) => ({ _id: item.domain_id, is_external: item.is_external, - })) + })), ), ]; uniqueVals.forEach((val) => { @@ -56,12 +56,12 @@ export class CategorizationSubmitComponent extends CategorizationComponent { .filter((x) => x.domain_id == val._id) .forEach((cd) => { let found = this.domainData.some( - (el) => el.domain_name === cd.domain_name + (el) => el.domain_name === cd.domain_name, ); this.proxyData = new MatTableDataSource( this.submitCategoryData.filter( - (x) => x.domain_name == cd.domain_name - ) + (x) => x.domain_name == cd.domain_name, + ), ); if (!found) { @@ -79,7 +79,7 @@ export class CategorizationSubmitComponent extends CategorizationComponent { (failure) => { console.log(failure); return; - } + }, ); } else { this.categorizationTabSvc.domainDetails(val._id).subscribe( @@ -89,12 +89,12 @@ export class CategorizationSubmitComponent extends CategorizationComponent { .filter((x) => x.domain_id == val._id) .forEach((cd) => { let found = this.domainData.some( - (el) => el.domain_name === cd.domain_name + (el) => el.domain_name === cd.domain_name, ); this.proxyData = new MatTableDataSource( this.submitCategoryData.filter( - (x) => x.domain_name == cd.domain_name - ) + (x) => x.domain_name == cd.domain_name, + ), ); if (!found) { @@ -111,7 +111,7 @@ export class CategorizationSubmitComponent extends CategorizationComponent { (failure) => { console.log(failure); return; - } + }, ); } }); @@ -121,7 +121,7 @@ export class CategorizationSubmitComponent extends CategorizationComponent { }, (failure) => { console.log(failure); - } + }, ); } @@ -133,7 +133,7 @@ export class CategorizationSubmitComponent extends CategorizationComponent { (failure) => { console.log(failure); return; - } + }, ); } @@ -142,7 +142,7 @@ export class CategorizationSubmitComponent extends CategorizationComponent { categorize_url, preferred_category, domain_id, - domain_name + domain_name, ) { const dialogSettings = { domainName: domain_name, @@ -164,19 +164,19 @@ export class CategorizationSubmitComponent extends CategorizationComponent { (success) => { this.alertsSvc.alert('Category has been updated.'); const proxy = this.submitCategoryList.data.findIndex( - (obj) => obj._id === categorization_id + (obj) => obj._id === categorization_id, ); this.submitCategoryList.data.splice(proxy, 1); this.submitCategoryList.data = this.submitCategoryList.data; let domainIndex = this.domainData.findIndex( - (domain) => domain.domain_id === domain_id + (domain) => domain.domain_id === domain_id, ); // dynamically update verify list const toVerifyProxy = this.domainData[ domainIndex ].categories.data.find( - (category) => category._id === categorization_id + (category) => category._id === categorization_id, ); this.verifyCategoryList.data.push(toVerifyProxy); this.verifyCategoryList.data = this.verifyCategoryList.data; @@ -184,12 +184,12 @@ export class CategorizationSubmitComponent extends CategorizationComponent { this.domainData[domainIndex].categories.data = this.domainData[ domainIndex ].categories.data.filter( - (category) => category._id !== categorization_id + (category) => category._id !== categorization_id, ); }, (failure) => { this.alertsSvc.alert('Error updating category.'); - } + }, ); } }); @@ -206,10 +206,10 @@ export class CategorizationSubmitComponent extends CategorizationComponent { .subscribe( (success) => { this.alertsSvc.alert( - 'Proxy requests for this domain have been deleted.' + 'Proxy requests for this domain have been deleted.', ); const proxies = this.domainData.findIndex( - (obj) => obj.domain_id === domain_id + (obj) => obj.domain_id === domain_id, ); this.domainData.splice(proxies, 1); this.domainData = this.domainData; @@ -217,7 +217,7 @@ export class CategorizationSubmitComponent extends CategorizationComponent { (failure) => { console.log(failure); this.alertsSvc.alert(`${failure.error.error}`); - } + }, ); } else { this.categorizationTabSvc @@ -225,10 +225,10 @@ export class CategorizationSubmitComponent extends CategorizationComponent { .subscribe( (success) => { this.alertsSvc.alert( - 'Proxy requests for this external domain have been deleted.' + 'Proxy requests for this external domain have been deleted.', ); const proxies = this.domainData.findIndex( - (obj) => obj.domain_id === domain_id + (obj) => obj.domain_id === domain_id, ); this.domainData.splice(proxies, 1); this.domainData = this.domainData; @@ -236,7 +236,7 @@ export class CategorizationSubmitComponent extends CategorizationComponent { (failure) => { console.log(failure); this.alertsSvc.alert(`${failure.error.error}`); - } + }, ); } }); @@ -255,13 +255,13 @@ export class CategorizationSubmitComponent extends CategorizationComponent { this.categorizationTabSvc.enableEmailReceiving(domain_id).subscribe( (success) => { this.alertsSvc.alert( - 'Email receiving for this domain has been enabled.' + 'Email receiving for this domain has been enabled.', ); }, (failure) => { console.log(failure); this.alertsSvc.alert(`${failure.error.error}`); - } + }, ); } else { dialogRef.close(); diff --git a/src/DomainManager/src/app/components/categorization/tabs/categorization-verify/categorization-verify.component.html b/src/DomainManager/src/app/components/categorization/tabs/categorization-verify/categorization-verify.component.html index dbd3c12c..3d8d0cd0 100644 --- a/src/DomainManager/src/app/components/categorization/tabs/categorization-verify/categorization-verify.component.html +++ b/src/DomainManager/src/app/components/categorization/tabs/categorization-verify/categorization-verify.component.html @@ -38,10 +38,10 @@

Proxy Categorization - Domains To Verify

> {{ - row.updated | date: "MM/dd/yy" + row.updated | date : "MM/dd/yy" }} {{ - row.created | date: "MM/dd/yy" + row.created | date : "MM/dd/yy" }} diff --git a/src/DomainManager/src/app/components/dialog-windows/confirm-categorize/confirm-categorize-dialog.component.ts b/src/DomainManager/src/app/components/dialog-windows/confirm-categorize/confirm-categorize-dialog.component.ts index 44e4bd99..e4c087b5 100644 --- a/src/DomainManager/src/app/components/dialog-windows/confirm-categorize/confirm-categorize-dialog.component.ts +++ b/src/DomainManager/src/app/components/dialog-windows/confirm-categorize/confirm-categorize-dialog.component.ts @@ -23,7 +23,7 @@ export class ConfirmCategoryDialogComponent { constructor( @Inject(MAT_DIALOG_DATA) public data: any, public dialog: MatDialog, - private dialogRef: MatDialogRef + private dialogRef: MatDialogRef, ) { this.functionOnConfirm = data.functionOnConfirm; this.itemConfirming = data.itemConfirming; diff --git a/src/DomainManager/src/app/components/dialog-windows/confirm/confirm-dialog.component.ts b/src/DomainManager/src/app/components/dialog-windows/confirm/confirm-dialog.component.ts index c96b59cb..bd0cdc1e 100644 --- a/src/DomainManager/src/app/components/dialog-windows/confirm/confirm-dialog.component.ts +++ b/src/DomainManager/src/app/components/dialog-windows/confirm/confirm-dialog.component.ts @@ -24,7 +24,7 @@ export class ConfirmDialogComponent { constructor( @Inject(MAT_DIALOG_DATA) public data: ConfirmDialogSettings, public dialog: MatDialog, - private dialogRef: MatDialogRef + private dialogRef: MatDialogRef, ) { this.functionOnConfirm = data.functionOnConfirm; this.itemConfirming = data.itemConfirming; diff --git a/src/DomainManager/src/app/components/dialog-windows/file-upload/file-upload-dialog.component.html b/src/DomainManager/src/app/components/dialog-windows/file-upload/file-upload-dialog.component.html index f356b44f..b90e1ccb 100644 --- a/src/DomainManager/src/app/components/dialog-windows/file-upload/file-upload-dialog.component.html +++ b/src/DomainManager/src/app/components/dialog-windows/file-upload/file-upload-dialog.component.html @@ -132,7 +132,7 @@

Queued File

{{ item.type }} - {{ item.size / 1024 / 1024 | number: ".2" }} MB + {{ item.size / 1024 / 1024 | number : ".2" }} MB