From 2657779eda713fced4b50eeab710ea4e83ca686d Mon Sep 17 00:00:00 2001 From: Keith Grant Date: Wed, 20 Mar 2019 08:56:42 -0400 Subject: [PATCH] cleanup comments --- .../components/code-mirror/code-mirror.directive.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/awx/ui/client/lib/components/code-mirror/code-mirror.directive.js b/awx/ui/client/lib/components/code-mirror/code-mirror.directive.js index 07533030da..9d8a0fcfca 100644 --- a/awx/ui/client/lib/components/code-mirror/code-mirror.directive.js +++ b/awx/ui/client/lib/components/code-mirror/code-mirror.directive.js @@ -39,10 +39,6 @@ function atCodeMirrorController ( } function close (varsFromModal, parseTypeFromModal) { - // TODO: make sure that the variables format matches - // parseType before re-initializing CodeMirror. Ex) - // user changes the format from yaml to json in the - // modal but CM in the form is set to YAML $scope.variables = varsFromModal; $scope[variablesName] = $scope.variables; $scope.parseType = parseTypeFromModal; @@ -61,10 +57,10 @@ function atCodeMirrorController ( } // Adding this function b/c sometimes extra vars are returned to the - // UI as a string (ex: "foo: bar"), and other times as a - // json-object-string (ex: "{"foo": "bar"}"). CodeMirror wouldn't know - // how to prettify the latter. The latter occurs when host vars were - // system generated and not user-input (such as adding a cloud host); + // UI as yaml (ex: "foo: bar"), and other times as a + // json-object-string (ex: "{"foo": "bar"}"). The latter typically + // occurs when host vars were system generated and not user-input + // (such as adding a cloud host); function sanitizeVars (str) { // Quick function to test if the host vars are a json-object-string, // by testing if they can be converted to a JSON object w/o error.