Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
386e353
Auth test updates
spadgett Mar 26, 2019
b057484
Move overview group and filter state to redux
TheRealJon Mar 25, 2019
6742fae
Bug 1694542 - Hide View CSV action when no installed CSV
spadgett Apr 2, 2019
8ca5146
Merge pull request #1336 from TheRealJon/issue-1296
openshift-merge-robot Apr 2, 2019
931cd92
Show "Evicted" instead of "Failed" for evicted pod status
TheRealJon Apr 2, 2019
c2b1222
Enable tab into Create button
nicolethoen Apr 2, 2019
86035f4
Deploy Image: default env value should be an empty array, not an empt…
spadgett Apr 2, 2019
c34a435
Merge pull request #1375 from spadgett/deploy-image-default-env
openshift-merge-robot Apr 3, 2019
eb2ac84
Merge pull request #1370 from spadgett/view-csv-hidden
openshift-merge-robot Apr 3, 2019
0523f54
frontend: Remove placeholder style from Events dropdown filter
rebeccaalpert Apr 3, 2019
87cf25b
Merge pull request #1373 from TheRealJon/bug-1694788
openshift-merge-robot Apr 3, 2019
d511337
Bug 1660785 - fix resource-requirements modal title and description
jhadvig Apr 4, 2019
871e874
Bug 1696172: Fix runtime error adding first node taint
spadgett Apr 4, 2019
8ebae04
Work around Safari 12.1 bug where scroll position is not maintained w…
rhamilto Apr 4, 2019
ab9f997
Upgrade chromedriver to 2.46.0
spadgett Apr 4, 2019
c4d2af5
Correctly handle batch calls to setState when creating secrets
spadgett Apr 4, 2019
eeba90a
Upgrade builder image to latest stable Chrome
spadgett Apr 4, 2019
dae79aa
Merge pull request #1382 from spadgett/runtime-error-taints-dialog
openshift-merge-robot Apr 4, 2019
da97d31
Temporarily disable broken e2e secrets scenario
spadgett Apr 5, 2019
668c310
Merge pull request #1384 from rhamilto/safari-12.1-scroll-bug-2
openshift-merge-robot Apr 5, 2019
bf6f643
Cleanup up branding so there is consistency among the product name
rhamilto Apr 5, 2019
9828dd8
Add missing <noscript>, remove product name from tokener.html
rhamilto Apr 5, 2019
e6c12a8
Merge pull request #1383 from spadgett/upgrade-chromedriver
openshift-merge-robot Apr 5, 2019
65b6285
Merge pull request #1386 from spadgett/disable-image-secret-test
openshift-merge-robot Apr 5, 2019
89d52b4
Merge pull request #1385 from spadgett/create-secret-set-state
openshift-merge-robot Apr 5, 2019
7a28d42
Merge pull request #1389 from rhamilto/branding-cleanup
openshift-merge-robot Apr 5, 2019
a3f8d61
Merge pull request #1378 from rebeccaalpert/event-dropdown
openshift-merge-robot Apr 6, 2019
5ff4f1d
Merge pull request #1381 from jhadvig/BZ1660785_2
openshift-merge-robot Apr 6, 2019
9fc1af9
Merge pull request #1390 from rhamilto/noscript
openshift-merge-robot Apr 6, 2019
24654a4
Merge pull request #1372 from nicolethoen/tab_into_create_button
openshift-merge-robot Apr 6, 2019
b15c43d
Merge pull request #1342 from spadgett/auth-test-updates
openshift-merge-robot Apr 6, 2019
8927b64
Correctly specify OpenID CA
spadgett Apr 6, 2019
dca6af2
Merge pull request #1392 from spadgett/fix-openid-ca
openshift-merge-robot Apr 6, 2019
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
3 changes: 1 addition & 2 deletions Dockerfile-builder → Dockerfile.builder
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ RUN cd /tmp && \
ln -s /usr/local/yarn/bin/yarn /usr/local/bin/yarn

# Install Chrome for installer gui tests
# Use Chrome beta because v60 or higher is needed for headless mode
RUN wget --quiet -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' && \
apt-get update && \
apt-get install --no-install-recommends -y -q \
google-chrome-beta ca-certificates
google-chrome-stable ca-certificates
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ CI runs the [test-prow-e2e.sh](test-prow-e2e.sh) script, which uses the `e2e` su
You can simulate an e2e run against an existing 4.0 cluster with the following commands (replace `/path/to/install-dir` with your OpenShift 4.0 install directory):

```
$ export BRIDGE_AUTH_USERNAME=kubeadmin
$ export BRIDGE_BASE_ADDRESS="https://$(oc get route console -n openshift-console -o jsonpath='{.spec.host}')"
$ export BRIDGE_AUTH_PASSWORD=$(cat "/path/to/install-dir/auth/kubeadmin-password")
$ oc apply -f ./frontend/integration-tests/data/htpasswd-idp.yaml
$ export BRIDGE_BASE_ADDRESS="$(oc get consoles.config.openshift.io cluster -o jsonpath='{.status.consoleURL}')"
$ export BRIDGE_KUBEADMIN_PASSWORD=$(cat "/path/to/install-dir/auth/kubeadmin-password")
$ ./test-gui.sh e2e
```

Expand Down
2 changes: 1 addition & 1 deletion builder-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set -e
# Without env vars:
# ./builder-run.sh ./my-script --my-script-arg1 --my-script-arg2

BUILDER_IMAGE="quay.io/coreos/tectonic-console-builder:v16"
BUILDER_IMAGE="quay.io/coreos/tectonic-console-builder:v17"

# forward whitelisted env variables to docker
ENV_STR=""
Expand Down
2 changes: 0 additions & 2 deletions frontend/integration-tests/data/htpasswd-idp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ metadata:
spec:
identityProviders:
- name: test
challenge: true
login: true
mappingMethod: claim
type: HTPasswd
htpasswd:
Expand Down
18 changes: 9 additions & 9 deletions frontend/integration-tests/tests/login.scenario.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ const JASMINE_EXTENDED_TIMEOUT_INTERVAL = 1000 * 60 * 3;
const KUBEADMIN_IDP = 'kube:admin';
const KUBEADMIN_USERNAME = 'kubeadmin';
const {
HTPASSWD_IDP = 'test',
HTPASSWD_USERNAME = 'test',
HTPASSWD_PASSWORD = 'test',
KUBEADMIN_PASSWORD,
BRIDGE_HTPASSWD_IDP = 'test',
BRIDGE_HTPASSWD_USERNAME = 'test',
BRIDGE_HTPASSWD_PASSWORD = 'test',
BRIDGE_KUBEADMIN_PASSWORD,
} = process.env;

describe('Auth test', () => {
Expand All @@ -21,7 +21,7 @@ describe('Auth test', () => {
await browser.sleep(3000); // Wait long enough for the login redirect to complete
});

if (KUBEADMIN_PASSWORD) {
if (BRIDGE_KUBEADMIN_PASSWORD) {
describe('Login test', async() => {
beforeAll(() => {
// Extend the default jasmine timeout interval just in case it takes a while for the htpasswd idp to be ready
Expand All @@ -34,9 +34,9 @@ describe('Auth test', () => {
});

it('logs in via htpasswd identity provider', async() => {
await loginView.login(HTPASSWD_IDP, HTPASSWD_USERNAME, HTPASSWD_PASSWORD);
await loginView.login(BRIDGE_HTPASSWD_IDP, BRIDGE_HTPASSWD_USERNAME, BRIDGE_HTPASSWD_PASSWORD);
expect(browser.getCurrentUrl()).toContain(appHost);
expect(loginView.userDropdown.getText()).toContain(HTPASSWD_USERNAME);
expect(loginView.userDropdown.getText()).toContain(BRIDGE_HTPASSWD_USERNAME);
});

it('logs out htpasswd user', async() => {
Expand All @@ -46,7 +46,7 @@ describe('Auth test', () => {
});

it('logs in as kubeadmin user', async() => {
await loginView.login(KUBEADMIN_IDP, KUBEADMIN_USERNAME, KUBEADMIN_PASSWORD);
await loginView.login(KUBEADMIN_IDP, KUBEADMIN_USERNAME, BRIDGE_KUBEADMIN_PASSWORD);
expect(browser.getCurrentUrl()).toContain(appHost);
expect(loginView.userDropdown.getText()).toContain('kube:admin');
await browser.wait(until.presenceOf($('.co-global-notification')));
Expand All @@ -59,7 +59,7 @@ describe('Auth test', () => {
expect($('.login-pf').isPresent()).toBeTruthy();

// Log back in so that remaining tests can be run
await loginView.login(KUBEADMIN_IDP, KUBEADMIN_USERNAME, KUBEADMIN_PASSWORD);
await loginView.login(KUBEADMIN_IDP, KUBEADMIN_USERNAME, BRIDGE_KUBEADMIN_PASSWORD);
expect(loginView.userDropdown.getText()).toContain('kube:admin');
});
});
Expand Down
2 changes: 1 addition & 1 deletion frontend/integration-tests/tests/secrets.scenario.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { appHost, testName, checkLogs, checkErrors, waitForCount } from '../prot
import * as crudView from '../views/crud.view';
import * as secretsView from '../views/secrets.view';

describe('Interacting with the create secret forms', () => {
xdescribe('Interacting with the create secret forms', () => {

afterEach(() => {
checkLogs();
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"lint": "eslint --ext .js,.jsx,.ts,.tsx --color .",
"test": "jest",
"debug-test": "node --inspect-brk node_modules/.bin/jest --runInBand",
"webdriver-update": "webdriver-manager update --versions.chrome=2.38 --gecko=false",
"webdriver-update": "webdriver-manager update --gecko=false",
"test-gui-tap": "TAP=true yarn run test-gui",
"test-gui-openshift": "yarn run test-suite --suite crud --params.openshift true",
"test-gui": "yarn run test-suite --suite all",
Expand Down
17 changes: 0 additions & 17 deletions frontend/public/branding.ts

This file was deleted.

6 changes: 2 additions & 4 deletions frontend/public/components/about-modal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@ class AboutModal_ extends React.Component {
<PfAboutModal
isOpen={isOpen}
onClose={closeAboutModal}
productName={details.productTitle}
productName=""
brandImageSrc={details.logoImg}
brandImageAlt={details.logoAlt}
logoImageSrc={details.logoImg}
logoImageAlt={details.logoAlt}
brandImageAlt={details.productName}
>
<p>OpenShift is Red Hat&apos;s container application platform that allows developers to quickly develop, host,
and scale applications in a cloud environment.</p>
Expand Down
4 changes: 2 additions & 2 deletions frontend/public/components/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ import { Redirect, Route, Router, Switch } from 'react-router-dom';
import * as PropTypes from 'prop-types';

import store from '../redux';
import { productName } from '../branding';
import { ALL_NAMESPACES_KEY } from '../const';
import { connectToFlags, featureActions, flagPending, FLAGS } from '../features';
import { analyticsSvc } from '../module/analytics';
import { GlobalNotifications } from './global-notifications';
import { Masthead } from './masthead';
import { getBrandingDetails, Masthead } from './masthead';
import { NamespaceBar } from './namespace';
import { Navigation } from './nav';
import { SearchPage } from './search';
Expand Down Expand Up @@ -162,6 +161,7 @@ class App extends React.PureComponent {

render() {
const { isNavOpen } = this.state;
const { productName } = getBrandingDetails();

return (
<React.Fragment>
Expand Down
10 changes: 5 additions & 5 deletions frontend/public/components/cluster-settings/openid-idp-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class AddOpenIDPage extends PromiseComponent {
namespace: 'openshift-config',
},
stringData: {
ca: caFileContent,
'ca.crt': caFileContent,
},
};

Expand All @@ -81,7 +81,7 @@ export class AddOpenIDPage extends PromiseComponent {

addOpenIDIDP(oauth: K8sResourceKind, clientSecretName: string, caName: string): Promise<K8sResourceKind> {
const { name, mappingMethod, clientID, issuer, extraScopes, claimPreferredUsernames, claimNames, claimEmails } = this.state;
const openID: any = {
const idp: any = {
name,
type: 'OpenID',
mappingMethod,
Expand All @@ -101,14 +101,14 @@ export class AddOpenIDPage extends PromiseComponent {
};

if (caName) {
openID.ca = {
idp.openID.ca = {
name: caName,
};
}

const patch = _.isEmpty(oauth.spec.identityProviders)
? { op: 'add', path: '/spec/identityProviders', value: [openID] }
: { op: 'add', path: '/spec/identityProviders/-', value: openID };
? { op: 'add', path: '/spec/identityProviders', value: [idp] }
: { op: 'add', path: '/spec/identityProviders/-', value: idp };
return this.handlePromise(k8sPatch(OAuthModel, oauth, [patch]));
}

Expand Down
3 changes: 1 addition & 2 deletions frontend/public/components/deploy-image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class DeployImage extends React.Component<DeployImageProps, DeployImageSt
}

// The EnvironmentPage callback will set env with updates from the editor. env is then referenced in the deployment config onSave.
env: object = {};
env = [];

onNamespaceChange = (namespace: string) => {
this.setState({namespace});
Expand Down Expand Up @@ -435,5 +435,4 @@ export type DeployImageState = {
name: string,
error?: any,
searchError?: string,
env?: any,
};
1 change: 1 addition & 0 deletions frontend/public/components/events.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ export class EventsList extends React.Component {
className="btn-group"
items={categories}
onChange={v => this.setState({category: v})}
selectedKey={this.state.category}
title="All Categories"
/>
</div>
Expand Down
4 changes: 2 additions & 2 deletions frontend/public/components/factory/list-page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,15 @@ export const FireMan_ = connect(null, {filterList: k8sActions.filterList})(
if (canCreate) {
if (createProps.to) {
createLink = <Link className="co-m-primary-action" {...createProps} tabIndex={-1}>
<button className="btn btn-primary" id="yaml-create" tabIndex={-1}>{createButtonText}</button>
<button className="btn btn-primary" id="yaml-create">{createButtonText}</button>
</Link>;
} else if (createProps.items) {
createLink = <div className="co-m-primary-action">
<Dropdown buttonClassName="btn-primary" id="item-create" title={createButtonText} noSelection={true} items={createProps.items} onChange={(name) => history.push(createProps.createLink(name))} />
</div>;
} else {
createLink = <div className="co-m-primary-action">
<button className="btn btn-primary" id="yaml-create" tabIndex={-1} {...createProps}>{createButtonText}</button>
<button className="btn btn-primary" id="yaml-create" {...createProps}>{createButtonText}</button>
</div>;
}
}
Expand Down
24 changes: 9 additions & 15 deletions frontend/public/components/masthead.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,34 @@ import dedicatedLogoImg from '../imgs/openshift-dedicated-logo.svg';
import azureLogoImg from '../imgs/azure-red-hat-openshift-logo.svg';

export const getBrandingDetails = () => {
let logoImg, logoAlt, productTitle;
let logoImg, productName;
// Webpack won't bundle these images if we don't directly reference them, hence the switch
switch (window.SERVER_FLAGS.branding) {
case 'openshift':
logoImg = openshiftLogoImg;
logoAlt = 'OpenShift';
productTitle = 'Red Hat OpenShift';
productName = 'Red Hat OpenShift';
break;
case 'ocp':
logoImg = ocpLogoImg;
logoAlt = 'OpenShift Container Platform';
productTitle = 'Red Hat OpenShift Container Platform';
productName = 'Red Hat OpenShift Container Platform';
break;
case 'online':
logoImg = onlineLogoImg;
logoAlt = 'OpenShift Online';
productTitle = 'Red Hat OpenShift Online';
productName = 'Red Hat OpenShift Online';
break;
case 'dedicated':
logoImg = dedicatedLogoImg;
logoAlt = 'OpenShift Dedicated';
productTitle = 'Red Hat OpenShift Dedicated';
productName = 'Red Hat OpenShift Dedicated';
break;
case 'azure':
logoImg = azureLogoImg;
logoAlt = 'Azure Red Hat OpenShift';
productTitle = 'Azure Red Hat OpenShift';
productName = 'Azure Red Hat OpenShift';
break;
default:
logoImg = okdLogoImg;
logoAlt = 'OKD';
productTitle = 'OKD';
productName = 'OKD';
}
return { logoImg, logoAlt, productTitle };
return { logoImg, productName };
};

export const Masthead = ({ onNavToggle }) => {
Expand All @@ -62,7 +56,7 @@ export const Masthead = ({ onNavToggle }) => {

return (
<PageHeader
logo={<Brand src={details.logoImg} alt={details.logoAlt} />}
logo={<Brand src={details.logoImg} alt={details.productName} />}
logoProps={logoProps}
toolbar={<MastheadToolbar />}
showNavToggle
Expand Down
2 changes: 1 addition & 1 deletion frontend/public/components/modals/taints-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TaintsModal extends PromiseComponent {
constructor(public props: TaintsModalProps) {
super(props);
// Add an empty row for editing if no taints exist.
this.state.taints = this.props.resource.spec.taints;
this.state.taints = this.props.resource.spec.taints || [];
}

_submit = (e: React.FormEvent<EventTarget>) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ export const ResourceRequirementsModalLink: React.SFC<ResourceRequirementsModalL

const onClick = () => {
const modal = createModalLauncher<ResourceRequirementsModalProps>(ResourceRequirementsModal);
const description = `Define the ${type === 'limits' ? 'resource' : 'request'} limits for this ${obj.kind} instance.`;
const title = `${obj.kind} ${type === 'limits' ? 'Resource' : 'Request'} Limits`;
const description = `Define the resource ${type} for this ${obj.kind} instance.`;
const title = `${obj.kind} Resource ${_.capitalize(type)}`;

const ResourceRequirementsForm = () => <div>
<div className="col-xs-5">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,14 @@ const menuActions = [
label: 'Remove Subscription...',
callback: () => createDisableApplicationModal({k8sKill, k8sGet, k8sPatch, subscription: obj}),
}),
(kind, obj) => ({
label: `View ${ClusterServiceVersionModel.kind}...`,
href: `/k8s/ns/${obj.metadata.namespace}/${ClusterServiceVersionModel.plural}/${_.get(obj.status, 'installedCSV')}`,
}),
(kind, obj) => {
const installedCSV = _.get(obj, 'status.installedCSV');
return {
label: `View ${ClusterServiceVersionModel.kind}...`,
href: `/k8s/ns/${obj.metadata.namespace}/${ClusterServiceVersionModel.plural}/${installedCSV}`,
hidden: !installedCSV,
};
},
];

export const SubscriptionRow: React.SFC<SubscriptionRowProps> = (props) => {
Expand All @@ -62,7 +66,7 @@ export const SubscriptionRow: React.SFC<SubscriptionRowProps> = (props) => {
{props.obj.spec.installPlanApproval || 'Automatic'}
</div>
<div className="dropdown-kebab-pf">
<ResourceKebab actions={_.get(props.obj.status, 'installedCSV') ? menuActions : menuActions.slice(0, -1)} kind={referenceForModel(SubscriptionModel)} resource={props.obj} />
<ResourceKebab actions={menuActions} kind={referenceForModel(SubscriptionModel)} resource={props.obj} />
</div>
</div>;
};
Expand Down
14 changes: 14 additions & 0 deletions frontend/public/components/overview/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* eslint-disable no-undef */

// Keys for special 'group by' options
// Should not be valid label keys to avoid conflicts. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set
export enum OverviewSpecialGroup {
GROUP_BY_APPLICATION = '#GROUP_BY_APPLICATION#',
GROUP_BY_RESOURCE = '#GROUP_BY_RESOURCE#',
}

// View options for overview page
export enum OverviewViewOption {
RESOURCES = 'resources',
DASHBOARD = 'dashboard',
}
Loading