Rename to image-builder-frontend

This commit is contained in:
sanne raymaekers 2020-09-14 12:00:01 +02:00
parent 97c2665463
commit 2ab31c27e0
10 changed files with 26 additions and 26 deletions

View file

@ -13,7 +13,7 @@ after_success:
- curl -sSL https://raw.githubusercontent.com/RedHatInsights/insights-frontend-builder-common/master/src/bootstrap.sh | bash -s
env:
global:
- REPO="git@github.com:gundersanne/osbuild-installer-frontend-build"
- REPO_DIR="osbuild-installer-frontend-build"
- REPO="git@github.com:gundersanne/image-builder-frontend-build"
- REPO_DIR="image-builder-frontend-build"
- BRANCH=${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}
- NODE_OPTIONS="--max-old-space-size=4096 --max_old_space_size=4096"

View file

@ -1,10 +1,10 @@
# osbuild-installer-frontend
# image-builder-frontend
## Development
1. Clone the following repositories:
* https://github.com/osbuild/osbuild-installer-frontend
* https://github.com/osbuild/osbuild-installer
* https://github.com/osbuild/image-builder-frontend
* https://github.com/osbuild/image-builder
* https://github.com/RedHatInsights/insights-proxy
Optional: https://github.com/osbuild/osbuild-composer
@ -13,12 +13,12 @@ Optional: https://github.com/osbuild/osbuild-composer
Choose a runner (podman or docker), and point the SPANDX_CONFIG variable to
profile/local-frontend-and-api-with-identity.js included in
osbuild-installer-frontend.
image-builder-frontend.
```
sudo insights-proxy/scripts/patch-etc-hosts.sh
export RUNNER="podman"
export SPANDX_CONFIG=$PATH_TO/osbuild-installer-frontend/profiles/local-frontend-and-api-with-identity.js
export SPANDX_CONFIG=$PATH_TO/image-builder-frontend/profiles/local-frontend-and-api-with-identity.js
sudo -E insights-proxy/scripts/run.sh
```
@ -33,17 +33,17 @@ Optional: https://github.com/osbuild/osbuild-composer
`sudo systemctl enable --now osbuild-remote-worker@localhost:8704`
4. Starting up osbuild-installer
In the osbuild-installer checkout directory
4. Starting up image-builder
In the image-builder checkout directory
```
make build
OSBUILD_SERVICE="http://127.0.0.1:8703/" ./osbuild-installer
OSBUILD_SERVICE="http://127.0.0.1:8703/" ./image-builder
```
5. Starting up osbuild-installer-frontend
5. Starting up image-builder-frontend
In the osbuild-installer-frontend checkout direcotry
In the image-builder-frontend checkout direcotry
```
npm install
@ -51,6 +51,6 @@ Optional: https://github.com/osbuild/osbuild-composer
```
The UI should be running on
https://prod.foo.redhat.com:1337/apps/osbuild-installer/landing, the api
(osbuild-installer) on
https://prod.foo.redhat.com:1337/api/osbuild-installer/v1/openapi.json
https://prod.foo.redhat.com:1337/apps/image-builder/landing, the api
(image-builder) on
https://prod.foo.redhat.com:1337/api/image-builder/v1/openapi.json

2
package-lock.json generated
View file

@ -1,5 +1,5 @@
{
"name": "osbuild-installer",
"name": "image-builder",
"version": "1.1.0",
"lockfileVersion": 1,
"requires": true,

View file

@ -1,5 +1,5 @@
{
"name": "osbuild-installer",
"name": "image-builder",
"version": "1.1.0",
"private": false,
"dependencies": {
@ -80,6 +80,6 @@
"verify": "npm run travis:verify"
},
"insights": {
"appname": "osbuild-installer"
"appname": "image-builder"
}
}

View file

@ -5,7 +5,7 @@ const fs = require('fs');
const base64 = require('base-64');
const SECTION = 'apps';
const APP_ID = 'osbuild-installer';
const APP_ID = 'image-builder';
const FRONTEND_PORT = 8002;
const API_PORT = 8086;
const routes = {};

View file

@ -1,7 +1,7 @@
/*global module*/
const SECTION = 'apps';
const APP_ID = 'osbuild-installer';
const APP_ID = 'image-builder';
const FRONTEND_PORT = 8002;
const API_PORT = 8086;
const routes = {};

View file

@ -1,7 +1,7 @@
/*global module*/
const SECTION = 'apps';
const APP_ID = 'osbuild-installer';
const APP_ID = 'image-builder';
const FRONTEND_PORT = 8002;
const routes = {};

View file

@ -14,7 +14,7 @@ class App extends Component {
componentDidMount () {
insights.chrome.init();
insights.chrome.identifyApp('osbuild-installer');
insights.chrome.identifyApp('image-builder');
this.appNav = insights.chrome.on('APP_NAVIGATION', event => this.props.history.push(`/${event.navId}`));
insights.chrome.auth.getUser().then(data => {
this.setState({ identity: data.identity });

View file

@ -1,19 +1,19 @@
import axios from 'axios';
import {
OSBUILD_INSTALLER_API,
IMAGE_BUILDER_API,
} from './constants';
const postHeaders = { headers: { 'Content-Type': 'application/json' }};
async function composeImage(body) {
let path = '/compose';
const request = await axios.post(OSBUILD_INSTALLER_API.concat(path), body, postHeaders);
const request = await axios.post(IMAGE_BUILDER_API.concat(path), body, postHeaders);
return request.data;
}
async function getComposeStatus(id) {
let path = '/compose/' + id;
const request = await axios.get(OSBUILD_INSTALLER_API.concat(path));
const request = await axios.get(IMAGE_BUILDER_API.concat(path));
return request.data;
}

View file

@ -1 +1 @@
export const OSBUILD_INSTALLER_API = '/api/osbuild-installer/v1';
export const IMAGE_BUILDER_API = '/api/image-builder/v1';