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

Commit

Permalink
Merge branch 'v3-master' into entity-catalogue-fix-cf-unit-tests
Browse files Browse the repository at this point in the history
* v3-master:
  Fix quotas
  Fix post merge
  Temp fix for linting
  Remove some duped reducers - all other cf specific reducers/functions should move out following #3789
  Fix linting
  Fix autoscaler events page
  Fix typo
  Removed comments
  Fix multiple autoscaler issues - fix charts view (including metrics tiem range selector) - ensure error is shown correctly on edit failure - ensure 404 error is not shown after policy creation - bug - Fix autoscaler events table #3783
  Fix metrics - Ensure metrics actions take in endpoint type   - cfMetrics for cf specific actions, downstream metrics will need updating - Fix systemEndpointsReducer (previously was not run) - Fix a cf actions that were using entityFactory
  Fix three quota issues (#3782)
  Bump version and add changelog for 2.5 (#3765)
  Fix SSO tests
  Don't load demo plugin
  Remove demo plugin
  Don't send registration info in query string
  Don't send username/password in the URL
  Fix bug where setup is not saved and fix /uaa after setup
  Add apache2 utils to nginx package
  • Loading branch information
KlapTrap committed Aug 22, 2019
2 parents 34cdcc3 + ff685f5 commit 01f0e3f
Show file tree
Hide file tree
Showing 79 changed files with 714 additions and 850 deletions.
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,45 @@
# Change Log

## 2.5.0

[Full Changelog](https://github.com/cloudfoundry-incubator/stratos/compare/2.4.0...2.5.0)

This release contains a number of fixes and improvements:

**Fixes:**

- Fix connect to IBM Cloud [\#3715](https://github.com/cloudfoundry-incubator/stratos/pull/3715)
- Create route - owned domains not proposed [\#3685](https://github.com/cloudfoundry-incubator/stratos/issues/3685)
- Fixed connect endpoint issues in Firefox [\#3679](https://github.com/cloudfoundry-incubator/stratos/pull/3679)
- Fixed connect endpoint rendering issue in Firefox [\#3678](https://github.com/cloudfoundry-incubator/stratos/pull/3678)
- Fix ExpressionChangedAfterItHasBeenCheckedError exception on home page [\#3667](https://github.com/cloudfoundry-incubator/stratos/pull/3667)
- Fix bosh prometheus metrics [\#3602](https://github.com/cloudfoundry-incubator/stratos/pull/3602)
- Fix stepper height on Chrome pre v72 & Bleeding of error style in stateful-icon [\#3599](https://github.com/cloudfoundry-incubator/stratos/pull/3599)
- Remove sidenav header underline [\#3556](https://github.com/cloudfoundry-incubator/stratos/issues/3556)
- cf/spaces routes: fixed breadcrumbs path for apps [\#3572](https://github.com/cloudfoundry-incubator/stratos/pull/3572)
- No space/org shown in cell app instances page [\#3536](https://github.com/cloudfoundry-incubator/stratos/issues/3536)
- Services Marketplace: cf endpoint on card when multiple cf connected [\#3560](https://github.com/cloudfoundry-incubator/stratos/pull/3560)
- Setup screens are missing header [\#3557](https://github.com/cloudfoundry-incubator/stratos/issues/3557)
- /uaa page is still available in a configured system [\#3056](https://github.com/cloudfoundry-incubator/stratos/issues/3056)
- Endpoint login exposes user credentials via query string [\#3160](https://github.com/cloudfoundry-incubator/stratos/issues/3160)
- Don't send registration info in query string [\#3777](https://github.com/cloudfoundry-incubator/stratos/pull/3777)

**Improvements:**

- Add Application Autoscaler UI [\#3455](https://github.com/cloudfoundry-incubator/stratos/pull/3455)
- Quotas: org/space quotas: listing and management [\#3650](https://github.com/cloudfoundry-incubator/stratos/pull/3650)
- Quotas: allow quota to be specified on creation/edit of org/space [\#3593](https://github.com/cloudfoundry-incubator/stratos/pull/3593)
- Refactor setup config [\#3694](https://github.com/cloudfoundry-incubator/stratos/pull/3694)
- Helm Chart: Add imagelist to the helm chart [\#3638](https://github.com/cloudfoundry-incubator/stratos/pull/3638)
- Support separate auth and token endpoints [\#3635](https://github.com/cloudfoundry-incubator/stratos/pull/3635)
- Improve failed connection message for cf & metrics endpoints [\#3600](https://github.com/cloudfoundry-incubator/stratos/pull/3600)
- Handle endpoint types that do no support connect [\#3596](https://github.com/cloudfoundry-incubator/stratos/pull/3596)
- Make disconnected endpoints more obviously different [\#3554](https://github.com/cloudfoundry-incubator/stratos/issues/3554)
- Always build with go modules [\#3589](https://github.com/cloudfoundry-incubator/stratos/pull/3589)
- Don't show cell metrics when they're not available [\#3586](https://github.com/cloudfoundry-incubator/stratos/pull/3586)
- Handle 'no auth' auth type in optional connect step [\#3535](https://github.com/cloudfoundry-incubator/stratos/issues/3535)
- Notifications page: Add a back button [\#3523](https://github.com/cloudfoundry-incubator/stratos/issues/3523)

## 2.4.0

[Full Changelog](https://github.com/cloudfoundry-incubator/stratos/compare/2.3.0...2.4.0)
Expand Down
53 changes: 53 additions & 0 deletions build/tools/changelog.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/usr/bin/env node

console.log('Collecting Change Log');

let since = '>=2019-05-03';

const request = require('request-promise-native');
const repo = 'cloudfoundry-incubator/stratos';
const fs = require('fs');

let url = 'https://api.github.com/search/issues?q=state:closed+repo:' + repo + '+updated:' + since;
url = url + '&per_page=100';

const fileName = './log.md';

console.log(url);

let total = -1;
let fetched = 0;
let results = [];

function fetchPage(url, page) {
const pageUrl = url + '&page=' + page;
return request(pageUrl, {
headers: {
'User-Agent': 'Changelog'
},
json: true}).then(data => {
console.log('Fetched page : ' + page);

if (page === 1) {
total = data.total_count;
console.log('Total results : ' + total);
}
fetched += data.items.length;
results = results.concat(data.items);

if (fetched < total) {
return fetchPage(url, page + 1);
}
console.log('Got all data');
});
}

fetchPage(url, 1).then(data => {
fs.writeFileSync(fileName, '# Changes\n');
for(let i = 0; i<results.length;i++) {
const item = results[i];
let line = '- ' + item.title + ' [\\#' + item.number + '](' + item.html_url + ')\n';
fs.appendFileSync(fileName, line);
};

});
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
FROM {{BASE_IMAGE}}
{{#IS_SLE}}
RUN zypper addrepo -G -t yum -c 'http://nginx.org/packages/sles/12' nginx
RUN zypper addrepo -t rpm-md -G -c '{{SMT_INTERNAL_SERVER}}' smt_internal_server
{{/IS_SLE}}
RUN zypper -n ref && \
zypper -n up && \
zypper in -y nginx
zypper in -y nginx apache2-utils

{{#IS_SLE}}
RUN zypper rr smt_internal_server
{{/IS_SLE}}
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stratos",
"version": "2.4.0",
"version": "2.5.0",
"description": "Stratos Console",
"main": "index.js",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { EffectsModule } from '@ngrx/effects';
import { NgxChartsModule } from '@swimlane/ngx-charts';
import { of } from 'rxjs';

import { CloudFoundryComponentsModule } from '../../cloud-foundry/src/shared/components/components.module';
import { CoreModule } from '../../core/src/core/core.module';
import { EntityCatalogueModule } from '../../core/src/core/entity-catalogue.module';
import { MDAppModule } from '../../core/src/core/md.module';
import { SharedModule } from '../../core/src/shared/shared.module';
import { AutoscalerModule } from './core/autoscaler.module';
import { AutoscalerTabExtensionComponent } from './features/autoscaler-tab-extension/autoscaler-tab-extension.component';
import { generateASEntities } from './store/autoscaler-entity-generator';
import { AutoscalerEffects } from './store/autoscaler.effects';

// TODO Work out why we need this and remove it.
const customRoutes: Routes = [
Expand Down Expand Up @@ -37,6 +41,10 @@ const customRoutes: Routes = [
CloudFoundryComponentsModule,
AutoscalerModule,
RouterModule.forRoot(customRoutes),
EntityCatalogueModule.forFeature(generateASEntities),
EffectsModule.forFeature([
AutoscalerEffects
])
],
declarations: [
AutoscalerTabExtensionComponent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { NgModule } from '@angular/core';
import { EffectsModule } from '@ngrx/effects';
import { NgxChartsModule } from '@swimlane/ngx-charts';

import { ApplicationService } from '../../../cloud-foundry/src/features/applications/application.service';
import { CloudFoundryComponentsModule } from '../../../cloud-foundry/src/shared/components/components.module';
import { CoreModule } from '../../../core/src/core/core.module';
import { EntityCatalogueModule } from '../../../core/src/core/entity-catalogue.module';
import { SharedModule } from '../../../core/src/shared/shared.module';
import { AutoscalerBaseComponent } from '../features/autoscaler-base.component';
import { AutoscalerMetricPageComponent } from '../features/autoscaler-metric-page/autoscaler-metric-page.component';
Expand Down Expand Up @@ -47,8 +45,6 @@ import {
import {
AppAutoscalerComboSeriesVerticalComponent,
} from '../shared/list-types/app-autoscaler-metric-chart/app-autoscaler-metric-chart-card/combo-chart/combo-series-vertical.component';
import { generateASEntities } from '../store/autoscaler-entity-generator';
import { AutoscalerEffects } from '../store/autoscaler.effects';
import { AutoscalerRoutingModule } from './autoscaler.routing';


Expand All @@ -59,10 +55,6 @@ import { AutoscalerRoutingModule } from './autoscaler.routing';
AutoscalerRoutingModule,
NgxChartsModule,
CloudFoundryComponentsModule,
EntityCatalogueModule.forFeature(generateASEntities),
EffectsModule.forFeature([
AutoscalerEffects
])
],
declarations: [
AutoscalerBaseComponent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { applicationEntityType } from '../../../../cloud-foundry/src/cf-entity-f
import { ApplicationMonitorService } from '../../../../cloud-foundry/src/features/applications/application-monitor.service';
import { ApplicationService } from '../../../../cloud-foundry/src/features/applications/application.service';
import { getGuids } from '../../../../cloud-foundry/src/features/applications/application/application-base.component';
import { entityCatalogue } from '../../../../core/src/core/entity-catalogue/entity-catalogue.service';
import { EntityService } from '../../../../core/src/core/entity-service';
import { EntityServiceFactory } from '../../../../core/src/core/entity-service-factory.service';
import { StratosTab, StratosTabType } from '../../../../core/src/core/extension/extension-service';
Expand All @@ -21,7 +22,7 @@ import { AppState } from '../../../../store/src/app-state';
import { createEntityRelationPaginationKey } from '../../../../store/src/helpers/entity-relations/entity-relations.types';
import { ActionState } from '../../../../store/src/reducers/api-request-reducer/types';
import { getPaginationObservables } from '../../../../store/src/reducers/pagination-reducer/pagination-reducer.helper';
import { selectUpdateInfo } from '../../../../store/src/selectors/api.selectors';
import { selectDeletionInfo } from '../../../../store/src/selectors/api.selectors';
import { APIResource } from '../../../../store/src/types/api.types';
import { AutoscalerConstants } from '../../core/autoscaler-helpers/autoscaler-util';
import {
Expand All @@ -30,7 +31,6 @@ import {
GetAppAutoscalerAppMetricAction,
GetAppAutoscalerPolicyAction,
GetAppAutoscalerScalingHistoryAction,
UpdateAppAutoscalerPolicyAction,
} from '../../store/app-autoscaler.actions';
import {
AppAutoscalerFetchPolicyFailedResponse,
Expand All @@ -40,11 +40,7 @@ import {
AppAutoscalerScalingHistory,
AppScalingTrigger,
} from '../../store/app-autoscaler.types';
import {
appAutoscalerAppMetricEntityType,
appAutoscalerPolicyEntityType,
autoscalerEntityFactory,
} from '../../store/autoscaler-entity-factory';
import { appAutoscalerAppMetricEntityType, autoscalerEntityFactory } from '../../store/autoscaler-entity-factory';

const enableAutoscaler = (appGuid: string, endpointGuid: string, esf: EntityServiceFactory): Observable<boolean> => {
// This will eventual be moved out into a service and made generic to the cf (one call per cf, rather than one call per app - See #3583)
Expand Down Expand Up @@ -223,7 +219,7 @@ export class AutoscalerTabExtensionComponent implements OnInit, OnDestroy {
}

this.appAutoscalerPolicyErrorSub = this.appAutoscalerPolicyService.entityMonitor.entityRequest$.pipe(
filter(request => !!request.error),
filter(request => !!request.error && !request.fetching),
map(request => {
const msg = request.message;
request.error = false;
Expand Down Expand Up @@ -276,13 +272,12 @@ export class AutoscalerTabExtensionComponent implements OnInit, OnDestroy {
}

detachPolicy(): Observable<ActionState> {
this.store.dispatch(
new DetachAppAutoscalerPolicyAction(this.applicationService.appGuid, this.applicationService.cfGuid)
);
const actionState = selectUpdateInfo(appAutoscalerPolicyEntityType,
this.applicationService.appGuid,
UpdateAppAutoscalerPolicyAction.updateKey);
return this.store.select(actionState).pipe(filter(item => !!item));
const action = new DetachAppAutoscalerPolicyAction(this.applicationService.appGuid, this.applicationService.cfGuid);
this.store.dispatch(action);

const catalogueEntity = entityCatalogue.getEntity(action);
const actionState = selectDeletionInfo(catalogueEntity.entityKey, this.applicationService.appGuid);
return this.store.select(actionState).pipe(filter(item => !item.deleted));
}

updatePolicyPage = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<mat-form-field>
<input matInput placeholder="Breach Duration" type="number" formControlName="breach_duration_secs">
</mat-form-field>
seconsds, then {{editScaleType=='upper'?'add':'remove'}}
seconds, then {{editScaleType=='upper'?'add':'remove'}}
<mat-form-field>
<input matInput placeholder="Adjustment" type="number" formControlName="adjustment" required>
</mat-form-field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ErrorStateMatcher, ShowOnDirtyErrorStateMatcher } from '@angular/materi
import { Store } from '@ngrx/store';
import * as moment from 'moment-timezone';
import { Observable, of as observableOf } from 'rxjs';
import { distinctUntilChanged, filter, map, take } from 'rxjs/operators';
import { filter, first, map, pairwise } from 'rxjs/operators';

import { ApplicationService } from '../../../../../cloud-foundry/src/features/applications/application.service';
import { EntityService } from '../../../../../core/src/core/entity-service';
Expand All @@ -17,7 +17,7 @@ import {
numberWithFractionOrExceedRange,
specificDateRangeOverlapping,
} from '../../../core/autoscaler-helpers/autoscaler-validation';
import { UpdateAppAutoscalerPolicyAction } from '../../../store/app-autoscaler.actions';
import { GetAppAutoscalerPolicyAction, UpdateAppAutoscalerPolicyAction } from '../../../store/app-autoscaler.actions';
import {
AppAutoscalerInvalidPolicyError,
AppAutoscalerPolicy,
Expand Down Expand Up @@ -85,42 +85,29 @@ export class EditAutoscalerPolicyStep4Component extends EditAutoscalerPolicy imp
this.store.dispatch(
new UpdateAppAutoscalerPolicyAction(this.applicationService.appGuid, this.applicationService.cfGuid, this.currentPolicy)
);
const waitForAppAutoscalerUpdateStatus$ = this.updateAppAutoscalerPolicyService.entityMonitor.entityRequest$.pipe(
filter(request => {
if (request.message && request.message.indexOf('fetch policy') >= 0) {
request.message = '';
return false;
} else {
return !!request.error || !!request.response;
}

return this.updateAppAutoscalerPolicyService.entityMonitor.getUpdatingSection(
UpdateAppAutoscalerPolicyAction.updateKey
).pipe(
pairwise(),
filter(([oldUpdateSection, newUpdateSection]) => {
return oldUpdateSection.busy && !newUpdateSection.busy;
}),
map(request => {
const msg = request.message;
request.error = false;
request.response = null;
request.message = '';
return msg;
map(([, newUpdateSection]) => {
return newUpdateSection;
}),
distinctUntilChanged(),
).pipe(map(
errorMessage => {
if (errorMessage) {
return {
success: false,
message: `Could not update policy: ${errorMessage}`,
};
} else {
return {
success: true,
redirect: true
};
first(),
map(request => {
if (!request.error) {
this.store.dispatch(new GetAppAutoscalerPolicyAction(this.applicationService.appGuid, this.applicationService.cfGuid));
}
}));
return waitForAppAutoscalerUpdateStatus$.pipe(take(1), map(res => {
return {
...res,
};
}));
return {
success: !request.error,
redirect: !request.error,
message: request.error ? `Could not update policy: ${request.message}` : ''
};
})
);
}

addSpecificDate = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ export class UpdateAppAutoscalerPolicyAction implements IRequestAction {
public endpointGuid: string,
public policy: AppAutoscalerPolicyLocal,
) { }
updatingKey = UpdateAppAutoscalerPolicyAction.updateKey;
type = UPDATE_APP_AUTOSCALER_POLICY;
entityType = appAutoscalerPolicyEntityType;
endpointType = AUTOSCALER_ENDPOINT_TYPE;
}

export class DetachAppAutoscalerPolicyAction implements IRequestAction {
static updateKey = 'Detaching-Existing-Application-Policy';
constructor(
public guid: string,
public endpointGuid: string,
Expand Down

0 comments on commit 01f0e3f

Please sign in to comment.