Sfoglia il codice sorgente

github disabled on env var

sunguroku 5 anni fa
parent
commit
e3b46ac0b7

+ 1 - 0
cmd/app/main.go

@@ -107,6 +107,7 @@ func main() {
 		Repository: repo,
 		ServerConf: appConf.Server,
 		RedisConf:  &appConf.Redis,
+		CapConf: 	appConf.Capabilities,
 		DBConf:     appConf.Db,
 	})
 

+ 4 - 2
dashboard/src/main/home/launch/expanded-template/LaunchTemplate.tsx

@@ -581,10 +581,12 @@ class LaunchTemplate extends Component<PropsType, StateType> {
 
   // Display if current template uses source (image or repo)
   renderSourceSelectorContent = () => {
+    let { capabilities } = this.context;
+
     if (this.state.sourceType === "") {
       return (
         <BlockList>
-          <Block
+          {capabilities.github && (<Block
             onClick={() => {
               this.setState({ sourceType: "repo" });
             }}
@@ -594,7 +596,7 @@ class LaunchTemplate extends Component<PropsType, StateType> {
             <BlockDescription>
               Deploy using source from a Git repo.
             </BlockDescription>
-          </Block>
+          </Block>)}
           <Block
             onClick={() => {
               this.setState({ sourceType: "registry" });