Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/merge-upstream' into merge-upstr…
Browse files Browse the repository at this point in the history
…eam-entity-access
  • Loading branch information
richard-cox committed May 29, 2020
2 parents 81db83c + 23d690a commit 68b96b2
Show file tree
Hide file tree
Showing 600 changed files with 13,945 additions and 10,428 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ src/backend/*/vendor/
.v8flags*

*.bak
./secrets.yaml
/secrets.yaml
build/dev_config.json
e2e-reports/
.stratos-git-metadata.json
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This release contains a number of fixes and improvements:
**Fixes:**

- User profile is fetched on most page changes [\#4284](https://github.com/cloudfoundry/stratos/issues/4284)
- Servicves Marketplace: Create service icon is incorrectly aligned [\#4280](https://github.com/cloudfoundry/stratos/issues/4280)
- Service Marketplace: Create service icon is incorrectly aligned [\#4280](https://github.com/cloudfoundry/stratos/issues/4280)
- Deployment time does not show correctly in diagnostics when deployed with Helm 3 [\#4261](https://github.com/cloudfoundry/stratos/issues/4261)
- Pushing app from Stratos can sometimes fail due to expired token [\#4253](https://github.com/cloudfoundry/stratos/issues/4253)
- Helm: Chart fails to render if `uaa` section is missing, docs misleading [\#4248](https://github.com/cloudfoundry/stratos/issues/4248)
Expand Down
39 changes: 34 additions & 5 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"preserveSymlinks": true,
"outputPath": "dist",
"index": "src/frontend/packages/core/src/index.html",
Expand All @@ -35,6 +36,12 @@
},
"configurations": {
"production": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
Expand Down Expand Up @@ -101,6 +108,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"preserveSymlinks": true,
"outputPath": "dist/core",
"index": "src/frontend/packages/core/src/index.html",
Expand All @@ -124,6 +132,12 @@
},
"configurations": {
"production": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"fileReplacements": [
{
"replace": "src/frontend/packages/core/src/environments/environment.ts",
Expand Down Expand Up @@ -216,7 +230,12 @@
"tsConfig": "src/frontend/packages/store/tsconfig.lib.json",
"project": "src/frontend/packages/store/ng-package.json"
}
},
, "configurations": {
"production": {
"tsConfig": "src/frontend/packages/store/tsconfig.lib.prod.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
Expand Down Expand Up @@ -254,7 +273,12 @@
"tsConfig": "src/frontend/packages/cloud-foundry/tsconfig.lib.json",
"project": "src/frontend/packages/cloud-foundry/ng-package.json"
}
},
, "configurations": {
"production": {
"tsConfig": "src/frontend/packages/cloud-foundry/tsconfig.lib.prod.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
Expand Down Expand Up @@ -292,7 +316,12 @@
"tsConfig": "src/frontend/packages/cf-autoscaler/tsconfig.lib.json",
"project": "src/frontend/packages/cf-autoscaler/ng-package.json"
}
},
, "configurations": {
"production": {
"tsConfig": "src/frontend/packages/cf-autoscaler/tsconfig.lib.prod.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
Expand Down Expand Up @@ -323,13 +352,13 @@
"schematics": {
"@schematics/angular:component": {
"prefix": "app",
"styleext": "scss"
"style": "scss"
},
"@schematics/angular:directive": {
"prefix": "app"
}
},
"cli": {
"defaultCollection": "@nrwl/angular"
"_defaultCollection": "@nrwl/angular"
}
}
4 changes: 2 additions & 2 deletions custom-src/frontend/app/custom/custom-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const customRoutes: Routes = [
},
{
path: 'kubernetes',
loadChildren: './kubernetes/kubernetes.module#KubernetesModule',
loadChildren: () => import('./kubernetes/kubernetes.module').then(m => m.KubernetesModule),
data: {
stratosNavigation: {
text: 'Kubernetes',
Expand All @@ -34,7 +34,7 @@ const customRoutes: Routes = [
},
{
path: 'monocular',
loadChildren: './helm/helm.module#HelmModule',
loadChildren: () => import('./helm/helm.module').then(m => m.HelmModule),
data: {
reuseRoute: true,
stratosNavigation: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { HttpClient } from '@angular/common/http';
import { Component, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { MatTextareaAutosize } from '@angular/material';
import { MatTextareaAutosize } from '@angular/material/input';
import { ActivatedRoute } from '@angular/router';
import { Store } from '@ngrx/store';
import { BehaviorSubject, combineLatest, Observable, of, Subscription } from 'rxjs';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HttpClient } from '@angular/common/http';
import { Injectable, NgZone } from '@angular/core';
import { MatSnackBar } from '@angular/material';
import { MatSnackBar } from '@angular/material/snack-bar';
import { ActivatedRoute } from '@angular/router';
import { Store } from '@ngrx/store';
import { UnregisterEndpoint } from 'frontend/packages/store/src/actions/endpoint.actions';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Component, Input, OnInit, ViewEncapsulation } from '@angular/core';
import { MatIconRegistry, MatSnackBar } from '@angular/material';
import { MatIconRegistry } from '@angular/material/icon';
import { MatSnackBar } from '@angular/material/snack-bar';
import { DomSanitizer } from '@angular/platform-browser';

import { EndpointsService } from '../../../../../core/endpoints.service';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { MatIconRegistry } from '@angular/material';
import { MatIconRegistry } from '@angular/material/icon';
import { DomSanitizer } from '@angular/platform-browser';
import { ActivatedRoute, Params, Router } from '@angular/router';

Expand Down
20 changes: 10 additions & 10 deletions custom-src/frontend/app/custom/helm/store/helm.effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Actions, Effect, ofType } from '@ngrx/effects';
import { Action, Store } from '@ngrx/store';
import { GET_ENDPOINTS_SUCCESS, GetAllEndpointsSuccess } from 'frontend/packages/store/src/actions/endpoint.actions';
import { AppState } from 'frontend/packages/store/src/app-state';
import { entityCatalog } from 'frontend/packages/store/src/entity-catalog/entity-catalog';
import { NormalizedResponse } from 'frontend/packages/store/src/types/api.types';
import {
EntityRequestAction,
StartRequestAction,
WrapperRequestActionFailed,
WrapperRequestActionSuccess,
} from 'frontend/packages/store/src/types/request.types';
import { Observable } from 'rxjs';
import { catchError, flatMap, mergeMap } from 'rxjs/operators';

import { GET_ENDPOINTS_SUCCESS, GetAllEndpointsSuccess } from '../../../../../store/src/actions/endpoint.actions';
import { ClearPaginationOfType } from '../../../../../store/src/actions/pagination.actions';
import { AppState } from '../../../../../store/src/app-state';
import { entityCatalog } from '../../../../../store/src/entity-catalog/entity-catalog';
import { ApiRequestTypes } from '../../../../../store/src/reducers/api-request-reducer/request-helpers';
import { NormalizedResponse } from '../../../../../store/src/types/api.types';
import {
EntityRequestAction,
StartRequestAction,
WrapperRequestActionFailed,
WrapperRequestActionSuccess,
} from '../../../../../store/src/types/request.types';
import { environment } from '../../../environments/environment';
import { isJetstreamError } from '../../../jetstream.helpers';
import { helmEntityCatalog } from '../helm-entity-catalog';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HttpClient } from '@angular/common/http';
import { Component, OnDestroy } from '@angular/core';
import { MatSnackBar, MatSnackBarRef, SimpleSnackBar } from '@angular/material';
import { MatSnackBar, MatSnackBarRef, SimpleSnackBar } from '@angular/material/snack-bar';
import { ActivatedRoute } from '@angular/router';
import { BehaviorSubject, Observable, Subscription } from 'rxjs';
import { distinctUntilChanged, filter, map } from 'rxjs/operators';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Schema, schema } from 'normalizr';

import { metricEntityType } from '../../../../cloud-foundry/src/cf-entity-types';
import { getAPIResourceGuid } from '../../../../cloud-foundry/src/store/selectors/api.selectors';
import { EntitySchema } from '../../../../store/src/helpers/entity-schema';
import { metricEntityType } from '../../base-entity-schemas';
import {
getGuidFromKubeDashboardObj,
getGuidFromKubeDeploymentObj,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Validators } from '@angular/forms';

import { metricEntityType } from '../../../../cloud-foundry/src/cf-entity-types';
import {
StratosBaseCatalogEntity,
StratosCatalogEndpointEntity,
Expand All @@ -11,6 +10,7 @@ import {
StratosEndpointExtensionDefinition,
} from '../../../../store/src/entity-catalog/entity-catalog.types';
import { IFavoriteMetadata } from '../../../../store/src/types/user-favorites.types';
import { metricEntityType } from '../../base-entity-schemas';
import { EndpointAuthTypeConfig, EndpointType } from '../../core/extension/extension-types';
import { KubernetesAWSAuthFormComponent } from './auth-forms/kubernetes-aws-auth-form/kubernetes-aws-auth-form.component';
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SortDirection } from '@angular/material';
import { SortDirection } from '@angular/material/sort';
import { getActions } from 'frontend/packages/store/src/actions/action.helper';
import { ApiRequestTypes } from 'frontend/packages/store/src/reducers/api-request-reducer/request-helpers';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { Component, OnDestroy } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Store } from '@ngrx/store';
import { LoggerService } from 'frontend/packages/core/src/core/logger.service';
import { IPageSideNavTab } from 'frontend/packages/core/src/features/dashboard/page-side-nav/page-side-nav.component';
import { AppState } from 'frontend/packages/store/src/app-state';
import { entityCatalog } from 'frontend/packages/store/src/entity-catalog/entity-catalog';
import { EntityRequestAction, WrapperRequestActionSuccess } from 'frontend/packages/store/src/types/request.types';
import { Observable, Subject, Subscription } from 'rxjs';
import makeWebSocketObservable, { GetWebSocketResponses } from 'rxjs-websockets';
import { catchError, map, share, switchMap } from 'rxjs/operators';

import { AppState } from '../../../../../../../store/src/app-state';
import { entityCatalog } from '../../../../../../../store/src/entity-catalog/entity-catalog';
import { EntityRequestAction, WrapperRequestActionSuccess } from '../../../../../../../store/src/types/request.types';
import { LoggerService } from '../../../../../core/logger.service';
import { IPageSideNavTab } from '../../../../../features/dashboard/page-side-nav/page-side-nav.component';
import { kubeEntityCatalog } from '../../../kubernetes-entity-catalog';
import { KubernetesPodExpandedStatusHelper } from '../../../services/kubernetes-expanded-state';
import { KubernetesPod, KubeService } from '../../../store/kube.types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import {
StratosBaseCatalogEntity,
StratosCatalogEntity,
} from 'frontend/packages/store/src/entity-catalog/entity-catalog-entity/entity-catalog-entity';
import { StratosEndpointExtensionDefinition } from 'frontend/packages/store/src/entity-catalog/entity-catalog.types';
import { IFavoriteMetadata } from 'frontend/packages/store/src/types/user-favorites.types';

} from '../../../../../../store/src/entity-catalog/entity-catalog-entity/entity-catalog-entity';
import { StratosEndpointExtensionDefinition } from '../../../../../../store/src/entity-catalog/entity-catalog.types';
import { IFavoriteMetadata } from '../../../../../../store/src/types/user-favorites.types';
import { kubernetesEntityFactory } from '../../kubernetes-entity-factory';
import { HelmRelease, HelmReleaseGraph, HelmReleaseResource } from '../workload.types';
import { workloadsEntityCatalog } from '../workloads-entity-catalog';
Expand Down
12 changes: 12 additions & 0 deletions deploy/ci/travis/check-e2e-pr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

if [ -n "${TRAVIS_PULL_REQUEST}" ]; then
if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
echo "Checking labels on ${TRAVIS_PULL_REQUEST_SLUG} #${TRAVIS_PULL_REQUEST}"
LABEL=$(curl -s "https://api.github.com/repos/${TRAVIS_PULL_REQUEST_SLUG}/pulls/${TRAVIS_PULL_REQUEST}" | jq -r '.labels[] | select(.name == "e2e-debug") | .name')
if [ "${LABEL}" == "e2e-debug" ]; then
echo "PR has the 'e2e-debug' label - enabling debug logging for E2E tests"
export STRATOS_E2E_DEBUG=true
fi
fi
fi
8 changes: 5 additions & 3 deletions deploy/ci/travis/e2e-build-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ LOCAL_BUILD="true"
# TRAVIS_COMMIT

if [ -z "$TRAVIS_REPO_SLUG" ]; then
echo "Need to be running in Trvis"
echo "Need to be running in Travis"
exit 1
fi

if [ -z "$TRAVIS_COMMIT" ]; then
echo "Need to be running in Trvis"
echo "Need to be running in Travis"
exit 1
fi

Expand All @@ -40,9 +40,11 @@ function tryGetExistingBuild() {
if [ $? -eq 0 ]; then
# We found an existing build, so download and unpack it
echo "Downloading build package"
tar -xvf ${GZIP_NAME}
tar -xvf ${GZIP_NAME} > /dev/null
if [ $? -eq 0 ]; then
LOCAL_BUILD="false"
else
echo "Failed to untar the build package"
fi
rm -rf ${GZIP_NAME}
fi
Expand Down
13 changes: 9 additions & 4 deletions deploy/ci/travis/job-e2e-before_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,14 @@ if [ "${MAILCATCHER}" == "true" ]; then
docker run -d -p 1080:80 -p 1025:25 --name mail tophfr/mailcatcher
fi

# Start a local UAA - this will take a few seconds to come up in the background
docker run -d -p 8080:8080 splatform/stratos-uaa

# Check that the S3 server is available
curl -k --max-time 20 ${AWS_ENDPOINT}
if [ $? -ne 0 ]; then
echo "Can not contact S3 Server"
exit 1
if [ -n "${AWS_ENDPOINT}" ]; then
curl -k --max-time 20 ${AWS_ENDPOINT}
if [ $? -ne 0 ]; then
echo "Can not contact S3 Server"
exit 1
fi
fi
7 changes: 5 additions & 2 deletions deploy/ci/travis/run-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ set -e
echo "Stratos e2e tests"
echo "================="

DIRPATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && cd ../../.. && pwd)"

echo "Checking docker version"

docker version
Expand Down Expand Up @@ -40,8 +42,6 @@ fi

echo "Using local deployment for e2e tests"
# Quick deploy locally
# Start a local UAA - this will take a few seconds to come up in the background
docker run -d -p 8080:8080 splatform/stratos-uaa

# Build if needed or use existing build for this commit
DIRNAME="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
Expand All @@ -64,6 +64,9 @@ export STRATOS_E2E_BASE_URL="https://127.0.0.1:5443"

E2E_TARGET="e2e -- --no-webdriver-update --dev-server-target= --base-url=https://127.0.0.1:5443 --suite=${SUITE}"

# Set Stratos debug if running a PR with the appropriate label
source "${DIRPATH}/deploy/ci/travis/check-e2e-pr.sh"

# Capture video if configured
if [ "$CAPTURE_VIDEO" == "video" ]; then
echo "Waiting for ffmpeg install to complete..."
Expand Down
9 changes: 3 additions & 6 deletions deploy/kubernetes/console/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ helm repo add stratos https://cloudfoundry.github.io/stratos
Check the repository was successfully added by searching for the `console`, for example:

```
helm search console
helm search repo console
NAME CHART VERSION APP VERSION DESCRIPTION
stratos/console 3.1.0 3.1.0 A Helm chart for deploying Stratos UI Console
stratos/console 3.2.0 3.2.0 A Helm chart for deploying Stratos UI Console
```

> Note: Version numbers will depend on the version of Stratos available from the Helm repository
Expand Down Expand Up @@ -283,10 +283,7 @@ UAA configuration can be specified by providing the following configuration.
Create a yaml file with the content below and and update according to your environment and save to a file called `uaa-config.yaml`.
```
uaa:
url: https://uaa.cf-dev.io:2793
protocol: https://
port: 2793
host: uaa.cf-dev.io
endpoint: https://uaa.cf-dev.io:2793
consoleClient: cf
consoleClientSecret:
consoleAdminIdentifier: cloud_controller.admin
Expand Down
Loading

0 comments on commit 68b96b2

Please sign in to comment.