Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest fixes and changes with working generated code #55

Open
wants to merge 63 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
bb9d99c
rename rest proto to remove warning
sctsui May 25, 2019
ab2d43f
standardize license info
sctsui May 25, 2019
7c170f7
add comments to proto fields
sctsui May 25, 2019
16d614f
indentation
sctsui May 25, 2019
66aa1fe
Merge pull request #48 from sctsui/fixup/protoDocumentation
sctsui May 26, 2019
745761f
reorder proto messages
sctsui May 26, 2019
6787916
Merge pull request #49 from sctsui/fixup/protoDocumentation
sctsui May 26, 2019
21cdb00
implement batch template structure
sctsui May 26, 2019
5efc3de
Merge pull request #50 from sctsui/feature/batchTemplateStruct
Kevin-Velasquez May 28, 2019
1bc66da
Injected hard-coded template into file structure
Kevin-Velasquez May 28, 2019
de27828
Merge branch 'dev' of https://github.com/ligato/osseus into dev
Kevin-Velasquez May 28, 2019
ec3abdc
Added service label
anthonydevelops May 28, 2019
ef033be
move readme to outside cmd folder
sctsui May 28, 2019
6b0ca57
Fixed servicelabel in rest api
anthonydevelops May 28, 2019
779bf0c
synced up on key for generate
sctsui May 28, 2019
ccaaf5c
Updated the prefixes
anthonydevelops May 28, 2019
6dc91be
restapi now using one function call for broker prefix change
anthonydevelops May 29, 2019
c04500b
Updated dep with servicelabel
anthonydevelops May 29, 2019
5404056
fix merge conflict
sctsui May 29, 2019
dd63382
update key generator watches on
sctsui May 29, 2019
b67ad7c
update prefix and keys to match handler in generator
sctsui May 29, 2019
d5dbf35
add update method to descriptor
sctsui May 29, 2019
1bf44f9
Fixed label and set microservice label on frontend deployment
anthonydevelops May 30, 2019
0f91ac2
Merge branch 'dev' of github.com:ligato/osseus into dev
anthonydevelops May 30, 2019
aee27eb
Updated server with service label
anthonydevelops May 30, 2019
e5dd405
parsing of template package for display
Kevin-Velasquez May 30, 2019
274839b
handler to send back tar file
sctsui May 30, 2019
3e870d4
Merge branch 'dev' of https://github.com/ligato/osseus into feature/t…
sctsui May 30, 2019
84b22ce
do not store plugins folder if no custom plugins
sctsui May 30, 2019
f0dd657
fix typo
sctsui May 30, 2019
7211a42
delete template handlers
sctsui May 30, 2019
3372741
cleaning up print statements and slight changes to file structure
Kevin-Velasquez May 31, 2019
719a0c2
remove plugins from children
sctsui May 31, 2019
22a0139
tar downloading without async
Kevin-Velasquez May 31, 2019
d2daa2e
Sabrina and I fixed store.dispatch error
anthonydevelops Jun 1, 2019
6aa6c94
client code refactoring
Kevin-Velasquez Jun 1, 2019
ba4dcc4
Added subscribe for redux
anthonydevelops Jun 1, 2019
51fae4c
client code refactoring for generatorheader
Kevin-Velasquez Jun 1, 2019
764f170
Merge branch 'dev' of github.com:ligato/osseus into dev
anthonydevelops Jun 1, 2019
ba2cfa8
client code refactoring for generatorheader
Kevin-Velasquez Jun 1, 2019
041a9d0
Merge branch 'dev' of github.com:ligato/osseus into dev
anthonydevelops Jun 1, 2019
322a8d7
tool text for generator
Kevin-Velasquez Jun 1, 2019
7fbf907
Merge branch 'dev' of github.com:ligato/osseus into dev
anthonydevelops Jun 1, 2019
edc65d1
download tar now working with promise resolve much like template
Kevin-Velasquez Jun 1, 2019
5f40c37
Better fix to file spacing issue and upper case force for custom plugins
Kevin-Velasquez Jun 1, 2019
9b5b78f
Merge branch 'dev' of github.com:ligato/osseus into dev
anthonydevelops Jun 1, 2019
0ab7827
Sabrina and I added fix to template parsing
anthonydevelops Jun 2, 2019
c3c4bc3
recommit of client documentation and template and tar fixes
Kevin-Velasquez Jun 2, 2019
daf816d
change back to using pulling data from redux but working
Kevin-Velasquez Jun 2, 2019
9363a3a
Fixed formatting
anthonydevelops Jun 2, 2019
9e3dc05
Merge branch 'dev' of github.com:ligato/osseus into dev
anthonydevelops Jun 2, 2019
98cf254
added documentation for backend inline code
sctsui Jun 6, 2019
f468a4a
final refactoring for release 1.0
Kevin-Velasquez Jun 7, 2019
90e9b9d
Merge branch 'dev' of https://github.com/ligato/osseus into dev
Kevin-Velasquez Jun 7, 2019
7aa120d
removal of old dependency
Kevin-Velasquez Jun 7, 2019
ae598d2
initial changes to the client readme
Kevin-Velasquez Jun 7, 2019
2d05ae4
add generation documentation to agent.md
sctsui Jun 7, 2019
0fc6aa3
Merge branch 'dev' of https://github.com/ligato/osseus into fixup/age…
sctsui Jun 7, 2019
7e30481
typo fix to readme
Kevin-Velasquez Jun 7, 2019
773b590
remove whitespace
sctsui Jun 7, 2019
cb8b84c
Merge branch 'dev' of https://github.com/ligato/osseus into fixup/age…
sctsui Jun 7, 2019
45e4299
Kevin and I made v1.0.0 changelog
sctsui Jun 7, 2019
7d2626b
Updated docs, removed scrum folder, patched server w/ label that was …
anthonydevelops Jun 10, 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
Prev Previous commit
Next Next commit
Sabrina and I fixed store.dispatch error
Signed-off-by: anthonydevelops <[email protected]>
anthonydevelops committed Jun 1, 2019
commit d2daa2e9c0afa4020e1ea3b6a42408ee38856422
9 changes: 5 additions & 4 deletions client/server.js
Original file line number Diff line number Diff line change
@@ -139,8 +139,9 @@ io.on('connection', socket => {

// Decode tar
buffer = Buffer.from(value, 'base64').toString();

// Emit the socket to send the buffer back to the client
console.log("Success")
socket.emit('SEND_TEMPLATE_TO_CLIENT', buffer);
})
})
@@ -149,14 +150,14 @@ io.on('connection', socket => {
socket.on('DOWNLOAD_TAR', project => {

fetch(`http://${agent}/v1/templates`)
.then(response => {
.then(response => {
return response.json().catch(err => console.error(err))
})
.then(json => {

// Create object from string response
const data = JSON.parse(JSON.stringify(json.TarFile))

// Convert from base64
buffer = Buffer.from(data, 'base64')

@@ -167,7 +168,7 @@ io.on('connection', socket => {

console.log("Tar file generation complete")
}).catch(err => console.error(err))

})
})

17 changes: 9 additions & 8 deletions client/src/components/Generator/Header/Header.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from 'react';
import React from 'react';
import 'chai/register-expect';
import Swal from 'sweetalert2'
import ContentEditable from 'react-contenteditable'
import { Divider, Grid, Segment } from 'semantic-ui-react';
import { Link } from 'react-router-dom';

import store from '../../../redux/store/index';
import { addCurrProject, saveProjectToKV, loadProjectFromKV, downloadTar } from "../../../redux/actions/index";
import { addCurrProject, saveProjectToKV, loadProjectFromKV } from "../../../redux/actions/index";

import '../../../styles_CSS/Generator/Header/Header.css';

@@ -55,9 +55,10 @@ class Header extends React.Component {
store.dispatch(loadProjectFromKV(store.getState().currProject.projectName));
}

downloadTar() {
async downloadTar() {
//console.log('header.js redux access: ' + JSON.stringify(pluginModule.template))
store.dispatch( downloadTar(store.getState().currProject) )
// store.dispatch( downloadTar(store.getState().currProject) )
console.log(store.getState().template)
}

//Function will communicate if user edited the project name
@@ -91,10 +92,10 @@ class Header extends React.Component {
/>
</div>
<a href={`/template/template.tgz`} onClick={this.downloadTar} download>
<img
className={this.props.downloadable ? "download-image" : 'download-gray-image'}
src={this.props.downloadable ? '/images/download.png' : '/images/download_gray.png'}
alt='oops'>
<img
className={this.props.downloadable ? "download-image" : 'download-gray-image'}
src={this.props.downloadable ? '/images/download.png' : '/images/download_gray.png'}
alt='oops'>
</img>
</a>
</Grid.Column>
7 changes: 4 additions & 3 deletions client/src/redux/reducers/index.js
Original file line number Diff line number Diff line change
@@ -17,8 +17,6 @@ import { RETURN_TEMPLATE } from "../constants/action-types";

import { socket } from '../../index';

let pluginModule = require('../../components/Model');

var initialState = {
currPopupID: null,
projects: [],
@@ -53,7 +51,10 @@ function rootReducer(state = initialState, action) {
}
//Retreives the template from the server
else if (action.type === RETURN_TEMPLATE) {
pluginModule.template = JSON.parse(action.template);
console.log(action.template)
return Object.assign({}, {
template: state.projects.concat(action.template)
})
}
//Emits the server to call GENERATE_PROJECT
else if (action.type === GENERATE_CURR_PROJECT) {
5 changes: 3 additions & 2 deletions client/src/utils/socket.js
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
// limitations under the License.

import io from 'socket.io-client'
import store from '../redux/store/index';

const socket = io('http://localhost:8000');

@@ -26,12 +27,12 @@ const configureSocket = dispatch => {

// Returns the project from server to client
socket.on('SEND_PROJECT_TO_CLIENT', project => {
dispatch({ type: 'RETURN_LOAD_PROJECT', project })
store.dispatch({ type: 'RETURN_LOAD_PROJECT', project })
});

// Returns the template from server to client
socket.on('SEND_TEMPLATE_TO_CLIENT', template => {
dispatch({ type: 'RETURN_TEMPLATE', template });
store.dispatch({ type: 'RETURN_TEMPLATE', template });
});

return socket