File tree 14 files changed +77
-27
lines changed
14 files changed +77
-27
lines changed Original file line number Diff line number Diff line change @@ -2,4 +2,5 @@ node_modules
2
2
.github
3
3
public
4
4
k8s
5
- skaffold.yaml
5
+ skaffold.yaml
6
+ data
Original file line number Diff line number Diff line change 1
1
PORT = 5005
2
2
NODE_ENV = development
3
- VERSION = 2.1.1
3
+ VERSION = 2.2.0
4
4
PASSWORD = flame_password
5
5
SECRET = e02eb43d69953658c6d07311d6313f2d4467672cb881f96b29368ba1f3f4da4b
Original file line number Diff line number Diff line change
1
+ ### v2.2.0 (2021-12-17)
2
+ - Added option to set custom description for apps ([ #201 ] ( https://github.com/pawelmalak/flame/issues/201 ) )
3
+ - Fixed fatal error while deploying Flame to cluster ([ #242 ] ( https://github.com/pawelmalak/flame/issues/242 ) )
4
+
1
5
### v2.1.1 (2021-12-02)
2
6
- Added support for Docker secrets ([ #189 ] ( https://github.com/pawelmalak/flame/issues/189 ) )
3
7
- Changed some messages and buttons to make it easier to open bookmarks editor ([ #239 ] ( https://github.com/pawelmalak/flame/issues/239 ) )
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ docker pull pawelmalak/flame:2.0.0
35
35
36
36
``` sh
37
37
# run container
38
- docker run -p 5005:5005 -v /path/to/data:/app/data -e PASSWORD=flame_password flame
38
+ docker run -p 5005:5005 -v /path/to/data:/app/data -e PASSWORD=flame_password pawelmalak/ flame
39
39
```
40
40
41
41
#### Building images
Original file line number Diff line number Diff line change 1
- REACT_APP_VERSION = 2.1.1
1
+ REACT_APP_VERSION = 2.2.0
Original file line number Diff line number Diff line change @@ -8,24 +8,23 @@ import { State } from '../../../store/reducers';
8
8
9
9
interface Props {
10
10
app : App ;
11
- pinHandler ?: Function ;
12
11
}
13
12
14
- export const AppCard = ( props : Props ) : JSX . Element => {
13
+ export const AppCard = ( { app } : Props ) : JSX . Element => {
15
14
const { config } = useSelector ( ( state : State ) => state . config ) ;
16
15
17
- const [ displayUrl , redirectUrl ] = urlParser ( props . app . url ) ;
16
+ const [ displayUrl , redirectUrl ] = urlParser ( app . url ) ;
18
17
19
18
let iconEl : JSX . Element ;
20
- const { icon } = props . app ;
19
+ const { icon } = app ;
21
20
22
21
if ( isImage ( icon ) ) {
23
22
const source = isUrl ( icon ) ? icon : `/uploads/${ icon } ` ;
24
23
25
24
iconEl = (
26
25
< img
27
26
src = { source }
28
- alt = { `${ props . app . name } icon` }
27
+ alt = { `${ app . name } icon` }
29
28
className = { classes . CustomIcon }
30
29
/>
31
30
) ;
@@ -54,8 +53,8 @@ export const AppCard = (props: Props): JSX.Element => {
54
53
>
55
54
< div className = { classes . AppCardIcon } > { iconEl } </ div >
56
55
< div className = { classes . AppCardDetails } >
57
- < h5 > { props . app . name } </ h5 >
58
- < span > { displayUrl } </ span >
56
+ < h5 > { app . name } </ h5 >
57
+ < span > { ! app . description . length ? displayUrl : app . description } </ span >
59
58
</ div >
60
59
</ a >
61
60
) ;
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ export const AppForm = ({ modalHandler }: Props): JSX.Element => {
96
96
< ModalForm modalHandler = { modalHandler } formHandler = { formSubmitHandler } >
97
97
{ /* NAME */ }
98
98
< InputGroup >
99
- < label htmlFor = "name" > App Name </ label >
99
+ < label htmlFor = "name" > App name </ label >
100
100
< input
101
101
type = "text"
102
102
name = "name"
@@ -122,11 +122,27 @@ export const AppForm = ({ modalHandler }: Props): JSX.Element => {
122
122
/>
123
123
</ InputGroup >
124
124
125
+ { /* DESCRIPTION */ }
126
+ < InputGroup >
127
+ < label htmlFor = "description" > App description</ label >
128
+ < input
129
+ type = "text"
130
+ name = "description"
131
+ id = "description"
132
+ placeholder = "My self-hosted app"
133
+ value = { formData . description }
134
+ onChange = { ( e ) => inputChangeHandler ( e ) }
135
+ />
136
+ < span >
137
+ Optional - If description is not set, app URL will be displayed
138
+ </ span >
139
+ </ InputGroup >
140
+
125
141
{ /* ICON */ }
126
142
{ ! useCustomIcon ? (
127
143
// use mdi icon
128
144
< InputGroup >
129
- < label htmlFor = "icon" > App Icon </ label >
145
+ < label htmlFor = "icon" > App icon </ label >
130
146
< input
131
147
type = "text"
132
148
name = "icon"
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ export interface NewApp {
5
5
url : string ;
6
6
icon : string ;
7
7
isPublic : boolean ;
8
+ description : string ;
8
9
}
9
10
10
11
export interface App extends Model , NewApp {
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ export const newAppTemplate: NewApp = {
5
5
url : '' ,
6
6
icon : '' ,
7
7
isPublic : true ,
8
+ description : '' ,
8
9
} ;
9
10
10
11
export const appTemplate : App = {
Original file line number Diff line number Diff line change
1
+ const { DataTypes } = require ( 'sequelize' ) ;
2
+ const { STRING } = DataTypes ;
3
+
4
+ const up = async ( query ) => {
5
+ await query . addColumn ( 'apps' , 'description' , {
6
+ type : STRING ,
7
+ allowNull : false ,
8
+ defaultValue : '' ,
9
+ } ) ;
10
+ } ;
11
+
12
+ const down = async ( query ) => {
13
+ await query . removeColumn ( 'apps' , 'description' ) ;
14
+ } ;
15
+
16
+ module . exports = {
17
+ up,
18
+ down,
19
+ } ;
Original file line number Diff line number Diff line change @@ -31,6 +31,11 @@ const App = sequelize.define(
31
31
allowNull : true ,
32
32
defaultValue : 1 ,
33
33
} ,
34
+ description : {
35
+ type : DataTypes . STRING ,
36
+ allowNull : false ,
37
+ defaultValue : '' ,
38
+ } ,
34
39
} ,
35
40
{
36
41
tableName : 'apps' ,
Original file line number Diff line number Diff line change 21
21
"@types/express" : " ^4.17.13" ,
22
22
"axios" : " ^0.24.0" ,
23
23
"concurrently" : " ^6.3.0" ,
24
- "docker-secret" : " ^1.2.3 " ,
24
+ "docker-secret" : " ^1.2.4 " ,
25
25
"dotenv" : " ^10.0.0" ,
26
26
"express" : " ^4.17.1" ,
27
27
"jsonwebtoken" : " ^8.5.1" ,
Original file line number Diff line number Diff line change @@ -3,14 +3,18 @@ const Logger = require('../Logger');
3
3
const logger = new Logger ( ) ;
4
4
5
5
const initDockerSecrets = ( ) => {
6
- const secrets = getSecrets ( ) ;
6
+ try {
7
+ const secrets = getSecrets ( ) ;
7
8
8
- for ( const property in secrets ) {
9
- const upperProperty = property . toUpperCase ( ) ;
9
+ for ( const property in secrets ) {
10
+ const upperProperty = property . toUpperCase ( ) ;
10
11
11
- process . env [ upperProperty ] = secrets [ property ] ;
12
+ process . env [ upperProperty ] = secrets [ property ] ;
12
13
13
- logger . log ( `${ upperProperty } was overwritten with docker secret value` ) ;
14
+ logger . log ( `${ upperProperty } was overwritten with docker secret value` ) ;
15
+ }
16
+ } catch ( e ) {
17
+ logger . log ( `Failed to initialize docker secrets. Error: ${ e } ` , 'ERROR' ) ;
14
18
}
15
19
} ;
16
20
You can’t perform that action at this time.
0 commit comments