Skip to content

Commit

Permalink
feat: no show empty inputs as defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
andre-code committed Oct 13, 2022
1 parent 53b93de commit dfb4105
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions client/src/model/RenkuModels.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,6 @@ const projectSchema = new Schema({
},
});

const DEFAULT_ENV_VARIABLES = [{ key: "", value: "" }];

const notebooksSchema = new Schema({
autosaves: {
schema: {
Expand Down Expand Up @@ -393,7 +391,7 @@ const notebooksSchema = new Schema({
commit: { initial: {} },
discard: { initial: false },
options: { initial: {} },
environment_variables: { initial: DEFAULT_ENV_VARIABLES },
environment_variables: { initial: [] },
objectStoresConfiguration: { initial: [] },
includeMergedBranches: { initial: false },
displayedCommits: { initial: 25 },
Expand Down Expand Up @@ -725,5 +723,5 @@ const formGeneratorSchema = new Schema({
export {
datasetFormSchema, datasetSchema, datasetImportFormSchema, environmentSchema,
formGeneratorSchema, issueFormSchema, newProjectSchema, notebooksSchema, notificationsSchema,
projectSchema, projectsSchema, statuspageSchema, userSchema, webSocketSchema, DEFAULT_ENV_VARIABLES
projectSchema, projectsSchema, statuspageSchema, userSchema, webSocketSchema,
};
3 changes: 1 addition & 2 deletions client/src/notebooks/Notebooks.container.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import { StatusHelper } from "../model/Model";
import { Url } from "../utils/helpers/url";
import { sleep } from "../utils/helpers/HelperFunctions";
import ShowSessionFullscreen from "./components/SessionFullScreen";
import { DEFAULT_ENV_VARIABLES } from "../model/RenkuModels";


/**
Expand Down Expand Up @@ -304,7 +303,7 @@ class StartNotebookServer extends Component {

const environmentVariables = this.getEnvironmentVariablesFromSearch(currentSearch);
this.customEnvVariables = currentSearch && this.autostart && environmentVariables.length ?
environmentVariables : DEFAULT_ENV_VARIABLES;
environmentVariables : [];

this.state = {
autosavesCommit: false,
Expand Down

0 comments on commit dfb4105

Please sign in to comment.