Merge pull request #133 from AAVikings/develop

Adding changes for operations module
This commit is contained in:
z@tOr authored and GitHub committed 2018-12-26 19:21:00 -03:00
commit e1a035187a
4 files changed
+27 -8

No files matched your search

+5
View File
@@ -19,6 +19,7 @@ import Teams from '@advancedalgos/teams-client'
import Events from '@advancedalgos/events-client'
import KeyVault from '@advancedalgos/key-vault-client'
import FinancialBeings from '@advancedalgos/financial-beings-client'
import Operations from '@advancedalgos/operations-client'
export const auth = new Auth(
result => console.log('Authentication successful.'),
@@ -76,6 +77,10 @@ export const MasterApp = props => (
path='/key-vault'
render={props => <KeyVault {...props} auth={auth} />}
/>
<Route
path='/operations'
render={props => <Operations {...props} auth={auth} />}
/>
</Switch>
</Layout>
</MuiThemeProvider>
+14 -1
View File
@@ -62,6 +62,18 @@ const keyvaultMenus = {
]
}
const operationsMenus = {
title: 'Operations',
to: '/operations',
icon: Home,
authenticated: true,
submenus: [
{ title: 'Your clones', to: '/operations/browse', icon: ImportContacts },
{ title: 'Clone a bot', to: '/operations/add', icon: AddCircleOutline },
{ title: 'Report a Bug', to: 'https://github.com/AdvancedAlgos/OperationsModule/issues/new', icon: BugReport, externalLink: true }
]
}
const financialBeingsMenus = {
title: 'FBs',
to: '/financial-beings',
@@ -76,7 +88,8 @@ const allMenus = [
teamsMenus,
eventsMenus,
financialBeingsMenus,
keyvaultMenus
keyvaultMenus,
operationsMenus
]
export default allMenus
+1
View File
@@ -45,6 +45,7 @@ export const createRemoteSchema = async (uri, preshared_key) => {
export const createTransformedRemoteSchema = async (prefix, uri, preshared_key) => {
var schema
try {
logger.info(`About to create ${prefix} schema at ${uri}`)
schema = await createRemoteSchema(uri, preshared_key)
} catch (error) {
logger.error(`An error occured while fetching ${prefix}, ${uri} schema. Details: ${error}`)
+7 -7
View File
@@ -42,32 +42,30 @@ async function getUserId (authId) {
}
async function run () {
logger.info('About to create schemas')
const transformedKeyVaultSchema = await createTransformedRemoteSchema(
'keyVault_',
process.env.KEYVAULT_API_URL,
process.env.KEYVAULT_API_PRESHARED)
logger.info('KeyVault schema created')
const transformedTeamsSchema = await createTransformedRemoteSchema(
'teams_',
process.env.TEAMS_API_URL,
process.env.TEAMS_API_PRESHARED)
logger.info('Teams schema created')
const transformedUsersSchema = await createTransformedRemoteSchema(
'users_',
process.env.USERS_API_URL,
process.env.USERS_API_PRESHARED)
logger.info('Users schema created')
const transformedEventsSchema = await createTransformedRemoteSchema(
'events_',
process.env.EVENTS_API_URL,
process.env.EVENTS_API_PRESHARED)
logger.info('Events schema created')
const transformedFinancialBeingsSchema = await createTransformedRemoteSchema(
'financialBeings_',
process.env.FINANCIAL_BEINGS_API_URL,
process.env.FINANCIAL_BEINGS_API_PRESHARED)
logger.info('Financial Beings schema created')
const transformedOperationsSchema = await createTransformedRemoteSchema(
'operations_',
process.env.OPERATIONS_API_URL,
process.env.OPERATIONS_API_PRESHARED)
const transformedNotificationsSchema = await createTransformedRemoteSchema(
'notifications_',
process.env.NOTIFICATIONS_API_URL,
@@ -100,6 +98,9 @@ async function run () {
if (transformedFinancialBeingsSchema) {
schemas.push(transformedFinancialBeingsSchema)
}
if (transformedOperationsSchema) {
schemas.push(transformedOperationsSchema)
}
if (transformedNotificationsSchema) {
schemas.push(transformedNotificationsSchema)
}
@@ -210,7 +211,6 @@ async function run () {
}
try {
logger.info('About to run main run method')
run()
} catch (e) {
logger.error(`An general error occured while running the app: ${e}, details: ${e.message}, stack: ${e.stack}`)