Skip to content

Commit

Permalink
Merge pull request #26 from ggbecker/add-inigtion-remediation-type
Browse files Browse the repository at this point in the history
Add support for new type of content called Ignition.
  • Loading branch information
ggbecker authored Feb 12, 2020
2 parents fca2d3a + c9b4e19 commit 1cf8fee
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

## [0.0.9] - 2020-02-12
### Added
- Support to new type of content called Ignition.
- Option to copy full prefixed rule ID.
- Instructions on how to install the extension through VSCode Marketplace webpage.
### Fixed
Expand Down
12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"onCommand:content-navigator.openOVAL",
"onCommand:content-navigator.openBash",
"onCommand:content-navigator.openAnsible",
"onCommand:content-navigator.openIgnition",
"onCommand:content-navigator.openAnaconda",
"onCommand:content-navigator.openPuppet",
"onCommand:content-navigator.copyRuleId",
Expand Down Expand Up @@ -51,6 +52,10 @@
"command": "content-navigator.openAnsible",
"title": "Open Ansible"
},
{
"command": "content-navigator.openIgnition",
"title": "Open Ignition"
},
{
"command": "content-navigator.openAnaconda",
"title": "Open Anaconda"
Expand Down Expand Up @@ -82,6 +87,9 @@
{
"command": "content-navigator.openAnsible"
},
{
"command": "content-navigator.openIgnition"
},
{
"command": "content-navigator.openAnaconda"
},
Expand Down Expand Up @@ -121,6 +129,10 @@
"command": "content-navigator.openAnsible",
"key": "ctrl+alt+a"
},
{
"command": "content-navigator.openIgnition",
"key": "ctrl+alt+i"
},
{
"command": "content-navigator.openAnaconda",
"key": "ctrl+alt+n"
Expand Down
5 changes: 5 additions & 0 deletions src/content-navigator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ function getRuleId(uri: vscode.Uri): string
else if(uri_str.indexOf('oval/shared.xml') >= 0 ||
uri_str.indexOf('bash/shared.sh') >= 0 ||
uri_str.indexOf('ansible/shared.yml') >= 0 ||
uri_str.indexOf('ignition/shared.yml') >= 0 ||
uri_str.indexOf('anaconda/shared.anaconda') >= 0 ||
uri_str.indexOf('puppet/shared.pp') >= 0){
let paths: string[] = uri_str.split("/");
Expand Down Expand Up @@ -142,6 +143,9 @@ export function activate(context: vscode.ExtensionContext) {
let open_ansible_command = vscode.commands.registerCommand('content-navigator.openAnsible', () => {
return openContent("ansible/shared.yml");
});
let open_ignition_command = vscode.commands.registerCommand('content-navigator.openIgnition', () => {
return openContent("ignition/shared.yml");
});
let open_anaconda_command = vscode.commands.registerCommand('content-navigator.openAnaconda', () => {
return openContent("anaconda/shared.anaconda");
});
Expand Down Expand Up @@ -173,6 +177,7 @@ export function activate(context: vscode.ExtensionContext) {
context.subscriptions.push(open_oval_command);
context.subscriptions.push(open_bash_command);
context.subscriptions.push(open_ansible_command);
context.subscriptions.push(open_ignition_command);
context.subscriptions.push(open_anaconda_command);
context.subscriptions.push(open_puppet_command);
context.subscriptions.push(copy_rule_id_command);
Expand Down

0 comments on commit 1cf8fee

Please sign in to comment.