Commit c76d3a56 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Fixed bug in non swagger authentication.

parent 0ed56f80
Pipeline #42920 passed with stages
in 16 minutes and 13 seconds
......@@ -171,11 +171,11 @@ class Upload extends React.Component {
return (
<div className={classes.titleContainer}>
<Typography variant="title" className={classes.title}>
<Typography variant="h6" className={classes.title}>
{name || new Date(Date.parse(create_time)).toLocaleString()}
</Typography>
{name
? <Typography variant="subheading">
? <Typography variant="subtitle1">
{new Date(Date.parse(create_time)).toLocaleString()}
</Typography>
: 'this upload has no name'
......
......@@ -122,6 +122,9 @@ class Api {
constructor(user) {
user = user || {}
this.auth_headers = {
'X-Token': user.token
}
this.swaggerPromise = Api.createSwaggerClient(user.token)
this.handleApiError = this.handleApiError.bind(this)
......
......@@ -12,35 +12,42 @@ export const kibanaBase = process.env.REACT_KIBANA_BASE || window.nomadEnv.kiban
export const appStaticBase = process.env.REACT_APP_APP_STATIC_BASE || window.nomadEnv.appStaticBase
export const debug = process.env.REACT_APP_DEBUG ? process.env.REACT_APP_DEBUG === 'true' : window.nomadEnv.debug
export const genTheme = createMuiTheme({
const createTheme = themeData => createMuiTheme({
typography: {
useNextVariants: true
},
...themeData
})
export const genTheme = createTheme({
palette: {
primary: secondary,
secondary: secondary
}
})
export const repoTheme = createMuiTheme({
export const repoTheme = createTheme({
palette: {
primary: repo,
secondary: repo
}
})
export const archiveTheme = createMuiTheme({
export const archiveTheme = createTheme({
palette: {
primary: archive,
secondary: repo
}
})
export const encTheme = createMuiTheme({
export const encTheme = createTheme({
palette: {
primary: enc,
secondary: repo
}
})
export const analyticsTheme = createMuiTheme({
export const analyticsTheme = createTheme({
palette: {
primary: analytics,
secondary: repo
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment