Skip to content

Commit

Permalink
Merge pull request #2 from taban03/development
Browse files Browse the repository at this point in the history
Version 3
  • Loading branch information
taban03 authored Oct 9, 2019
2 parents cf55a33 + 110ccd7 commit 1446102
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# misc
.DS_Store
.env.local
.env.development.local
frontend/.env.development.local
.env.test.local
.env.production.local

Expand Down
9 changes: 5 additions & 4 deletions frontend/.env
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
REACT_APP_CATALOG_HOMEPAGE=/ui/v1/apicatalog
REACT_APP_CATALOG_HOME=/api/v1/apicatalog
REACT_APP_CATALOG_UPDATE=/containers
REACT_APP_CATALOG_HOMEPAGE=
REACT_APP_CATALOG_HOME=/api/v1/catalogs
REACT_APP_CATALOG_UPDATE=/version
REACT_APP_STATUS_UPDATE_PERIOD=30000
REACT_APP_STATUS_UPDATE_MAX_RETRIES=10
REACT_APP_STATUS_UPDATE_DEBOUNCE=300
REACT_APP_CA_ENV=false
REACT_APP_STATUS_UPDATE_SCALING_DURATION=1000
REACT_APP_GATEWAY_URL=
REACT_APP_GATEWAY_URL=https://localhost:80
REACT_APP_CATALOG_VERSION=/latest
4 changes: 3 additions & 1 deletion frontend/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ REACT_APP_STATUS_UPDATE_PERIOD=10000
REACT_APP_STATUS_UPDATE_MAX_RETRIES=3
REACT_APP_STATUS_UPDATE_DEBOUNCE=300
REACT_APP_STATUS_UPDATE_SCALING_DURATION=1000
REACT_APP_GATEWAY_URL=
REACT_APP_GATEWAY_URL=https://localhost:80
REACT_APP_CATALOG_VERSION=/latest
REACT_APP_CATALOG_HOME=/api/v1/catalogs
2 changes: 2 additions & 0 deletions frontend/.env.production
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ REACT_APP_STATUS_UPDATE_DEBOUNCE=300
REACT_APP_STATUS_UPDATE_SCALING_DURATION=1000
REACT_APP_GATEWAY_URL=
REACT_APP_CA_ENV=false
REACT_APP_CATALOG_VERSION=/latest
REACT_APP_CATALOG_HOME=/api/v1/catalogs
5 changes: 3 additions & 2 deletions frontend/.env.test
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
REACT_APP_GATEWAY_URL=https://localhost:10010
REACT_APP_GATEWAY_URL=https://localhost:80
REACT_APP_STATUS_UPDATE_PERIOD=4000
REACT_APP_STATUS_UPDATE_MAX_RETRIES=2
REACT_APP_STATUS_UPDATE_DEBOUNCE=300
REACT_APP_STATUS_UPDATE_SCALING_DURATION=1000
REACT_APP_CATALOG_URL_TEST=https://localhost:10010/ui/v1/apicatalog
REACT_APP_CATALOG_URL_TEST=https://localhost:80/api/v1/catalogs
REACT_APP_CATALOG_USERNAME=user
REACT_APP_CATALOG_PASSWORD=user
REACT_APP_CA_ENV=false
REACT_APP_CATALOG_VERSION=/latest
2 changes: 1 addition & 1 deletion frontend/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>API Catalog</title>
<title>Zowe Components Catalog</title>
</head>
<body>
<noscript>
Expand Down
Binary file added frontend/src/assets/images/github.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 13 additions & 4 deletions frontend/src/components/Header/Header.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,18 @@
}
.dropdown {
height: 24px;
margin: -8px -157px;
margin: -8px -180px;
position: absolute;
}
css-1b3gl36-Button {
height: 23px
}
.css-1b3gl36-Button {
height: 23px;
width: 145px;
font-size: 11px;

}

#drop1 {
position: absolute;
margin-left: -147px;
}

3 changes: 1 addition & 2 deletions frontend/src/components/Header/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Component } from 'react';
import { Link, Text, Dropdown, Button } from 'mineral-ui';

import productImage from '../../assets/images/zowe-catatalog-logo.png';
import githubImage from '../../assets/images/github.png';
import githubImage from '../../assets/images/github.jpeg';
import './Header.css';

export default class Header extends Component {
Expand Down Expand Up @@ -39,7 +39,6 @@ export default class Header extends Component {
// // onClick: event => { console.log(event); }
// }
// ]
console.log("VERSIONEEEE")
// console.log(data)
return (
<div className="header">
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/Header/HeaderContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
fetchZoweVersionsError,
fetchVersions
} from '../../actions/fetch-versions-actions';
import {getVisibleTiles} from '../../selectors/selectors';

const mapStateToProps = state => ({
versions: state.zoweVersionsReducer.versions,
Expand Down
8 changes: 5 additions & 3 deletions frontend/src/epics/fetch-tiles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { ofType } from 'redux-observable';
import { catchError, debounceTime, exhaustMap, map, mergeMap, retryWhen, takeUntil } from 'rxjs/operators';
import { FETCH_TILES_REQUEST, FETCH_TILES_STOP } from '../constants/catalog-tile-constants';
import { fetchTilesFailed, fetchTilesRetry, fetchTilesSuccess } from '../actions/catalog-tile-actions';
// require('dotenv').config()

const updatePeriod = Number(process.env.REACT_APP_STATUS_UPDATE_PERIOD);
const debounce = Number(process.env.REACT_APP_STATUS_UPDATE_DEBOUNCE);
Expand Down Expand Up @@ -36,9 +37,10 @@ function checkOrigin() {
* @returns the URL to call
*/
function getUrl(action) {
// let url =
// process.env.REACT_APP_GATEWAY_URL + process.env.REACT_APP_CATALOG_HOME + process.env.REACT_APP_CATALOG_UPDATE;
let url = 'https://localhost:80/api/v1/catalogs/latest';
console.log(process.env.REACT_APP_GATEWAY_URL);
let url =
process.env.REACT_APP_GATEWAY_URL + process.env.REACT_APP_CATALOG_HOME + process.env.REACT_APP_CATALOG_VERSION;
// let url = 'https://localhost:80/api/v1/catalogs/latest';
console.log(url);
if (action.payload !== undefined) {
url += `/${action.payload}`;
Expand Down
3 changes: 0 additions & 3 deletions frontend/src/reducers/zowe-versions-reducer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,16 @@ export const zoweVersionsReducer = (state = dropDownDefaultState, action) => {
console.log(action.type)
switch (action.type) {
case ZOWE_VERSIONS_SUCCESS:
console.log("SUCCESSSSSOO")
return {
...state,
versions: action.versions
}
case ZOWE_VERSIONS_ERROR:
console.log("ERROR")
return {
...state,
error: action.error
}
default:
console.log("DEFAULT")
return state;
}
}
Expand Down

0 comments on commit 1446102

Please sign in to comment.