-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Phil Renaud <phil.renaud@hashicorp.com>
- Loading branch information
1 parent
764f95e
commit 20e7434
Showing
4 changed files
with
40 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:bug | ||
ui: fix an issue where starting a stopped job with default-less variables would not retain those variables when done via the job page start button in the web ui | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* Copyright (c) HashiCorp, Inc. | ||
* SPDX-License-Identifier: BUSL-1.1 | ||
*/ | ||
|
||
// @ts-check | ||
|
||
/** | ||
* Convert a JSON object to an HCL string. | ||
* | ||
* @param {Object} obj - The JSON object to convert. | ||
* @returns {string} The HCL string representation of the JSON object. | ||
*/ | ||
export default function jsonToHcl(obj) { | ||
const hclLines = []; | ||
|
||
for (const key in obj) { | ||
const value = obj[key]; | ||
const hclValue = typeof value === 'string' ? `"${value}"` : value; | ||
hclLines.push(`${key}=${hclValue}\n`); | ||
} | ||
|
||
return hclLines.join('\n'); | ||
} |