mirror of
https://github.com/caprover/caprover
synced 2025-10-30 01:57:03 +00:00
Compare commits
2 Commits
e098ba900b
...
15595a6a62
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
15595a6a62 | ||
|
|
9caba312a1 |
4
src/models/OneClickApp.ts
Normal file
4
src/models/OneClickApp.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export interface OneClickAppValuePair {
|
||||
key: string
|
||||
value: string
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import {
|
||||
IDockerComposeService,
|
||||
IOneClickTemplate,
|
||||
} from '../../models/IOneClickAppModels'
|
||||
import { OneClickAppValuePair } from '../../models/OneClickApp'
|
||||
import Utils from '../../utils/Utils'
|
||||
import ServiceManager from '../ServiceManager'
|
||||
import OneClickAppDeploymentHelper from './OneClickAppDeploymentHelper'
|
||||
@@ -47,11 +48,28 @@ export default class OneClickAppDeployManager {
|
||||
|
||||
startDeployProcess(
|
||||
template: IOneClickTemplate,
|
||||
values: IHashMapGeneric<string>
|
||||
valuesArray: OneClickAppValuePair[]
|
||||
) {
|
||||
const self = this
|
||||
let stringified = JSON.stringify(template)
|
||||
|
||||
const values: IHashMapGeneric<string> = {}
|
||||
valuesArray.forEach((element) => {
|
||||
values[element.key] = element.value
|
||||
})
|
||||
|
||||
if (
|
||||
!values[ONE_CLICK_APP_NAME_VAR_NAME] ||
|
||||
values[ONE_CLICK_APP_NAME_VAR_NAME].trim().length === 0
|
||||
) {
|
||||
this.onDeploymentStateChanged({
|
||||
steps: ['Parsing the template'],
|
||||
error: `App name ($$cap_appname) is required.`,
|
||||
currentStep: 0,
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
for (
|
||||
let index = 0;
|
||||
index < template.caproverOneClickApp.variables.length;
|
||||
|
||||
Reference in New Issue
Block a user