Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b7b437f
change the required version for ccCLient v2 to get the correct CC Ver…
mafolz May 14, 2024
ccdbc73
add API root to Info process for endpoints to be able to fetch the Lo…
mafolz Jun 5, 2024
b97fe35
Merge branch 'cloudfoundry-community:develop' into fix_cf_pushapp_for…
mafolz Jul 23, 2024
7eb4a99
remove unused log import in pushapp.go
mafolz Jul 23, 2024
27b7c9b
Merge pull request #5064 from cloudfoundry/fix_cf_pushapp_for_cf_cli_v8
krutten Mar 15, 2025
b55e4e3
fix active and bindable state in card view
kristelaK Mar 20, 2025
3945be3
fix typo
kristelaK Mar 20, 2025
51fac0f
Revert "fix typo"
kristelaK Mar 20, 2025
5bb139d
write frontend tests to check if the components render correctly; inc…
kristelaK Mar 27, 2025
0686d6e
clean up tests that I added
kristelaK Mar 27, 2025
7029287
clean up and add tests for cases when bindable and active are false/No
kristelaK Apr 1, 2025
6b5d546
Include tags in the filtering logic too for marketplace search; write…
kristelaK Mar 19, 2025
5586580
clean up
kristelaK Mar 21, 2025
ece8e98
Fix return; Add a test to check if the filtering works for just label…
kristelaK Mar 24, 2025
b7a1ea7
Updates for GoLang 1.24 squashed
krutten May 12, 2025
f950e68
Merge branch 'master' into develop
norman-abramovitz May 15, 2025
60a0a4d
fix tests after integration of root api endpoint from CloudController
mafolz Jul 22, 2025
b9bed42
Consume SSL certs provided as VCAP ENV var for secure db connection
Skretzschmann Jul 30, 2025
dd34706
Update files for build-bk warnings for Github actions
krutten Aug 11, 2025
d9120e8
Merge pull request #5159 from cloudfoundry/update-2025Q2
krutten Aug 11, 2025
a406bcf
Update Goose to handle patch on MySQL based deployments
krutten Aug 12, 2025
2d5b8bd
Bump version number in package.json
krutten Aug 13, 2025
faf1de3
Better error logic
krutten Aug 13, 2025
44c8484
Bump GoLang versions
krutten Aug 13, 2025
bc69b36
Bump package.json versions
krutten Aug 13, 2025
93a0c25
Merge pull request #5160 from cloudfoundry/2025Q2-gobumps
krutten Aug 13, 2025
52e81f0
Merge pull request #5098 from anynines/feature/modify_search_filter_t…
krutten Aug 13, 2025
045cd27
Merge pull request #5099 from anynines/feature/fix_display_of_active_…
krutten Aug 13, 2025
0314940
Merge pull request #5147 from anynines/jetstream-Consume-SSL-certs-fo…
krutten Aug 13, 2025
46ae142
Merge pull request #5151 from anynines/fix-for-backend-tests-after-in…
krutten Aug 13, 2025
281570b
Update DB detection for multiple name styles. Fix issue with CF SSH
krutten Sep 5, 2025
b48e665
[fix] Only create CA file if CA is present for verify-ca
krutten Sep 10, 2025
ea8769b
[Fix] indentation
krutten Sep 10, 2025
93c8a16
Update build for development on ARM macOS
krutten Oct 7, 2025
8c9f141
Update Dependabot to reduce spam
krutten Nov 3, 2025
b9037bf
Merge pull request #5234 from cloudfoundry/update-dependabot
norman-abramovitz Nov 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,29 @@

version: 2

# Disable Dependabot during Angular
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
open-pull-requests-limit: 0 # Angular v14 tree depracated, being updated to v20/v21

- package-ecosystem: "npm"
directory: "/electron"
schedule:
interval: "daily"
interval: "weekly"
open-pull-requests-limit: 0 # Electron app deprecated

- package-ecosystem: "npm"
directory: "/website"
schedule:
interval: "daily"
interval: "weekly"
open-pull-requests-limit: 0 # Website being refactored

- package-ecosystem: "gomod"
directory: "src/jetstream/"
schedule:
interval: "daily"
interval: "weekly"
open-pull-requests-limit: 0 # GoLang CVE updates being done as part of refactor

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ website/versions-repo

# Npm package builds
/npm_pkg
.npmrc

/scan_tmp

Expand Down
7 changes: 5 additions & 2 deletions build/bk-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,13 @@ swag init --parseDependency
if [ "${ACTION}" == "build" ]; then
echo "Building backend ..."
echo "Disk Space ${PWD}"
df -hT
df -h

echo "Building version: ${VERSION}"
go build -ldflags -X=main.appVersion=${VERSION}
GOOS=linux GOARCH=amd64 go build -ldflags -X=main.appVersion=${VERSION}
if [[ "$(uname)" == "Darwin" ]]; then
go build -ldflags -X=main.appVersion=${VERSION} -o jetstream.darwin
fi
echo "Build complete ..."
else
echo "Running backend tests ..."
Expand Down
4 changes: 2 additions & 2 deletions 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": "4.8.1",
"version": "v4.9.3-dev.2",
"description": "Stratos Console",
"main": "index.js",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,34 @@ describe('CfServiceCardComponent', () => {
it('should create', () => {
expect(component).toBeTruthy();
});

it('active field should be true/YES', () => {
const activeStatus = fixture.nativeElement.querySelector('app-table-cell-service-active').textContent;

expect(activeStatus).toContain('Yes');
});

it('active field should be false/NO', () => {
component.serviceEntity.entity.active = 0;
fixture.detectChanges();

const activeStatus = fixture.nativeElement.querySelector('app-table-cell-service-active').textContent;

expect(activeStatus).toContain('No');
});

it('bindable field should be true/YES', () => {
const bindableStatus = fixture.nativeElement.querySelector('app-table-cell-service-bindable').textContent;

expect(bindableStatus).toContain('Yes');
});

it('bindable field should be false/NO', () => {
component.serviceEntity.entity.bindable = 0;
fixture.detectChanges();

const bindableStatus = fixture.nativeElement.querySelector('app-table-cell-service-bindable').textContent;

expect(bindableStatus).toContain('No');
});
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Store } from '@ngrx/store';
import { getRowMetadata } from '@stratosui/store';
import { getDataFunctionList } from '../../../../../../../core/src/shared/components/list/data-sources-controllers/local-filtering-sorting';

import { CFAppState } from '../../../../../../../cloud-foundry/src/cf-app-state';
import { serviceEntityType } from '../../../../../../../cloud-foundry/src/cf-entity-types';
Expand Down Expand Up @@ -29,9 +30,22 @@ export class CfServicesDataSource extends ListDataSource<APIResource> {
paginationKey,
isLocal: true,
transformEntities: [
{
type: 'filter',
field: 'entity.label'
(entities: APIResource[], paginationState: PaginationEntityState) => {
const [filterByLabel, filterByTags] = getDataFunctionList(
[{
type: 'filter',
field: 'entity.label'
},
{
type: 'filter',
field: 'entity.tags'
}]
)

const labels = filterByLabel(entities, paginationState)
const tags = filterByTags(entities, paginationState)

return [...labels, ...tags]
},
(entities: APIResource[], paginationState: PaginationEntityState) => {
const cfGuid = paginationState.clientPagination.filter.items.cf;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export class CfServicesListConfigService implements IListConfig<APIResource> {
multiFilterConfigs: IListMultiFilterConfig[] = [];
text: ITableText = {
title: null,
filter: 'Search by name',
filter: 'Search by name and tags',
noEntries: 'There are no services',
maxedResults: {
icon: 'store',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function getFieldArray(def: DataFunctionDefinition) {
return def.field.split('.');
}

function getFilterFunction(def: DataFunctionDefinition): DataFunction<any> {
export function getFilterFunction(def: DataFunctionDefinition): DataFunction<any> {
const fieldArray = getFieldArray(def);
return (entities, paginationState) => {
const upperCaseFilter = paginationState.clientPagination.filter.string.toUpperCase();
Expand All @@ -30,10 +30,14 @@ function getFilterFunction(def: DataFunctionDefinition): DataFunction<any> {
}
return entities.filter(e => {
e = extractActualListEntity(e);
const value = getValue(e, fieldArray, 0, true);
let value = getValue(e, fieldArray, 0, true);
if (!value) {
return false;
}
if (Array.isArray(value)) {
value = value.join(",")
}

return value.toUpperCase().includes(upperCaseFilter);
});
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ComponentFixture, inject, TestBed, waitForAsync } from '@angular/core/t
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { Store } from '@ngrx/store';
import { createBasicStoreModule } from '@stratosui/store/testing';
import { PaginationEntityState } from 'frontend/packages/store/src/types/pagination.types';
import { BehaviorSubject, of as observableOf } from 'rxjs';
import { switchMap } from 'rxjs/operators';

Expand All @@ -16,6 +17,7 @@ import { CoreTestingModule } from '../../../../test-framework/core-test.modules'
import { CoreModule } from '../../../core/core.module';
import { CurrentUserPermissionsService } from '../../../core/permissions/current-user-permissions.service';
import { SharedModule } from '../../shared.module';
import { getFilterFunction } from './data-sources-controllers/local-filtering-sorting';
import { EndpointCardComponent } from './list-types/endpoint/endpoint-card/endpoint-card.component';
import { EndpointListHelper } from './list-types/endpoint/endpoint-list.helpers';
import { EndpointsListConfigService } from './list-types/endpoint/endpoints-list-config.service';
Expand Down Expand Up @@ -320,6 +322,74 @@ describe('ListComponent', () => {
expect(noEntriesMessage.hidden).toBeFalsy();
});

describe('getFilterFunction filters entities ', () => {
const paginationState: PaginationEntityState = {
currentPage: 1,
totalResults: 2,
pageCount: 1,
ids: {},
params: {},
pageRequests: {},
clientPagination: {
pageSize: 10,
currentPage: 1,
filter: {
string: 'hello', // Filtering for 'hello'
items: {}
},
totalResults: 2
},
maxedState: {},
isListPagination: false
};

it ('by label', () => {
const filterbyLabel = getFilterFunction({
type: 'filter',
field: 'entity.label'
},)

const entities: APIResource[] = [
{
metadata: { created_at: '2025-02-02', guid: '1', updated_at: '2025-02-03', url: '/url1' },
entity: {label: 'hello'}
},
{
metadata: { created_at: '2022-01-02', guid: '2', updated_at: '2022-01-03', url: '/url2' },
entity: {label: 'world' }
},
]

const result = filterbyLabel(entities, paginationState)

expect(result.length).toBe(1);
expect(result[0].entity.label).toEqual('hello');
})

it ('by tags', () => {
const filterbyTags = getFilterFunction({
type: 'filter',
field: 'entity.tags'
})

const entities: APIResource[] = [
{
metadata: { created_at: '2025-02-02', guid: '1', updated_at: '2025-02-03', url: '/url1' },
entity: { tags: ['hello', 'world'] }
},
{
metadata: { created_at: '2022-01-02', guid: '2', updated_at: '2022-01-03', url: '/url2' },
entity: { tags: ['bye', 'world'] }
},
]

const result = filterbyTags(entities, paginationState)

expect(result.length).toBe(1);
expect(result[0].entity.tags).toEqual(['hello', 'world']);
})
})

});

});
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Component } from '@angular/core';
import { Component, Directive, Input } from '@angular/core';
import { Observable } from 'rxjs';

import { IListDataSource, RowState } from './data-sources-controllers/list-data-source-types';

@Directive()
export abstract class TableCellCustom<T, C = any> {
protected pDataSource: IListDataSource<T>;
set dataSource(dataSource: IListDataSource<T>) {
Expand All @@ -13,6 +14,7 @@ export abstract class TableCellCustom<T, C = any> {
}

protected pRow: T;
@Input()
get row(): T {
return this.pRow;
}
Expand Down
29 changes: 14 additions & 15 deletions src/jetstream/api/go.mod
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
module github.com/cloudfoundry/stratos/src/jetstream/api

go 1.21
go 1.24

require (
github.com/golang/mock v1.6.0
github.com/gorilla/sessions v1.2.1
github.com/gorilla/websocket v1.5.0
github.com/gorilla/sessions v1.4.0
github.com/gorilla/websocket v1.5.3
github.com/govau/cf-common v0.0.7
github.com/labstack/echo/v4 v4.11.1
github.com/labstack/echo/v4 v4.13.3
github.com/sirupsen/logrus v1.9.3
)

require (
github.com/cloudfoundry-community/go-cfenv v1.17.0 // indirect
github.com/gorilla/securecookie v1.1.1 // indirect
github.com/labstack/gommon v0.4.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mitchellh/mapstructure v1.1.2 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/cloudfoundry-community/go-cfenv v1.18.0 // indirect
github.com/gorilla/securecookie v1.1.2 // indirect
github.com/labstack/gommon v0.4.2 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/onsi/gomega v1.27.10 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/crypto v0.38.0 // indirect
golang.org/x/net v0.40.0 // indirect
golang.org/x/sys v0.33.0 // indirect
golang.org/x/text v0.25.0 // indirect
)
Loading
Loading