Skip to content

Commit

Permalink
Policy options not saved in settings (#1762)
Browse files Browse the repository at this point in the history
  • Loading branch information
compae authored Feb 13, 2017
1 parent 26a96ad commit 79582e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ case class PolicyModel(
initSqlSentences: Seq[SqlSentence] = Seq.empty[SqlSentence],
autoDeleteCheckpoint: Option[Boolean] = None,
executionMode: Option[String] = None,
driverLocation: Option[String] = None,
pluginsLocation: Option[String] = None,
driverUri: Option[String] = None,
stopGracefully: Option[Boolean] = None
)
Expand Down
8 changes: 7 additions & 1 deletion web/src/scripts/factories/policy-model-factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
policy.cubes = [];
policy.streamTriggers = [];
policy.sparkConf = {};
policy.sparkSubmitArguments = {};
policy.sparkSubmitArguments = [];
policy.initSqlSentences = [];
policy.userPluginsJars = [];
delete policy.id;
///* Reset policy advanced settings to be loaded from template automatically */
delete policy.sparkStreamingWindowNumber;
Expand All @@ -51,11 +53,15 @@
delete policy.initSqlSentences;
delete policy.userPluginsJars;
delete policy.executionMode;
delete policy.driverUri;
delete policy.stopGracefully;
}

function setPolicy(inputPolicyJSON) {
policy.id = inputPolicyJSON.id;
policy.name = inputPolicyJSON.name;
policy.driverUri = inputPolicyJSON.driverUri;
policy.stopGracefully = inputPolicyJSON.stopGracefully;
policy.description = inputPolicyJSON.description;
policy.sparkStreamingWindow = inputPolicyJSON.sparkStreamingWindow;
policy.remember = inputPolicyJSON.remember;
Expand Down

0 comments on commit 79582e4

Please sign in to comment.