From fa22f2bdbea0a46444770ea9dbee63f42ad6971d Mon Sep 17 00:00:00 2001 From: Xi Wang Date: Mon, 10 Dec 2018 17:58:38 +0800 Subject: [PATCH] fix: Create repo add aliyun provider (#574) --- .../runtime-providers.js} | 0 src/pages/Dashboard/Repos/Add/index.jsx | 17 ++++++++--------- src/pages/Dashboard/Runtimes/Add/index.jsx | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) rename src/{pages/Dashboard/Runtimes/providers.js => config/runtime-providers.js} (100%) diff --git a/src/pages/Dashboard/Runtimes/providers.js b/src/config/runtime-providers.js similarity index 100% rename from src/pages/Dashboard/Runtimes/providers.js rename to src/config/runtime-providers.js diff --git a/src/pages/Dashboard/Repos/Add/index.jsx b/src/pages/Dashboard/Repos/Add/index.jsx index 80115704..86ef6d9a 100644 --- a/src/pages/Dashboard/Repos/Add/index.jsx +++ b/src/pages/Dashboard/Repos/Add/index.jsx @@ -3,6 +3,7 @@ import { observer, inject } from 'mobx-react'; import { Link } from 'react-router-dom'; import classNames from 'classnames'; import { translate } from 'react-i18next'; +import _ from 'lodash'; import { Checkbox, Radio, Button, Input, Select @@ -10,6 +11,8 @@ import { import Layout, { BackBtn, CreateResource, BreadCrumb } from 'components/Layout'; import TodoList from 'components/TodoList'; +import runtimeProviders from 'config/runtime-providers'; + import styles from './index.scss'; @translate() @@ -100,15 +103,11 @@ export default class RepoAdd extends Component { values={providers.toJSON()} onChange={this.store.changeProviders} > - - QingCloud - - - AWS - - - Kubernetes - + {_.map(runtimeProviders, (label, key) => ( + + {label} + + ))}
diff --git a/src/pages/Dashboard/Runtimes/Add/index.jsx b/src/pages/Dashboard/Runtimes/Add/index.jsx index 5c000855..df202795 100644 --- a/src/pages/Dashboard/Runtimes/Add/index.jsx +++ b/src/pages/Dashboard/Runtimes/Add/index.jsx @@ -9,7 +9,7 @@ import { } from 'components/Base'; import Layout, { BackBtn, CreateResource, BreadCrumb } from 'components/Layout'; import TodoList from 'components/TodoList'; -import providers from '../providers'; +import providers from 'config/runtime-providers'; import styles from './index.scss';