change default config path to just bbgo.yaml

This commit is contained in:
c9s 2021-02-03 17:39:53 +08:00
parent 6245b83524
commit 4e31c7f68a
2 changed files with 16 additions and 1 deletions

View File

@ -18,6 +18,8 @@ import TableRow from '@material-ui/core/TableRow';
import {makeStyles} from '@material-ui/core/styles';
import {saveConfig} from "../api/bbgo";
import Box from "@material-ui/core/Box";
import Alert from "@material-ui/lab/Alert";
const useStyles = makeStyles((theme) => ({
strategyCard: {
@ -88,6 +90,19 @@ export default function SaveConfigAndRestart({onBack, onRestarted}) {
Save and Restart
</Button>
</div>
{
response ? response.error ? (
<Box m={2}>
<Alert severity="error">{response.error}</Alert>
</Box>
) : response.success ? (
<Box m={2}>
<Alert severity="success">Config Saved</Alert>
</Box>
) : null : null
}
</React.Fragment>
);
}

View File

@ -31,7 +31,7 @@ var RootCmd = &cobra.Command{
func init() {
RootCmd.PersistentFlags().Bool("debug", false, "debug flag")
RootCmd.PersistentFlags().String("config", "config/bbgo.yaml", "config file")
RootCmd.PersistentFlags().String("config", "bbgo.yaml", "config file")
// A flag can be 'persistent' meaning that this flag will be available to
// the command it's assigned to as well as every command under that command.