Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Webview to scaffold sample execution-environment.yml file using creator add subcommand #1727

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
sonar.cpd.exclusions=\
src/features/lightspeed/playbookGeneration.ts, \
src/features/lightspeed/roleGeneration.ts, \
src/features/contentCreator/createSampleExecutionEnvPage.ts, \
src/webview/apps/contentCreator/createSampleExecutionEnvPageApp.ts, \
test/ui-test/*.ts
2 changes: 2 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
!media/contentCreator/createAnsibleCollectionPageStyle.css
!media/contentCreator/createAnsibleProjectPageStyle.css
!media/contentCreator/createDevfilePageStyle.css
!media/contentCreator/createSampleExecutionEnvPageStyle.css
!media/contentCreator/welcomePageStyle.css
!media/lightspeedExplorerView/style.css
!media/quickLinks/lightspeed.png
Expand All @@ -44,6 +45,7 @@
!out/client/webview/apps/contentCreator/createAnsibleCollectionPageApp.js
!out/client/webview/apps/contentCreator/createAnsibleProjectPageApp.js
!out/client/webview/apps/contentCreator/createDevfilePageApp.js
!out/client/webview/apps/contentCreator/createSampleExecutionEnvPageApp.js
!out/client/webview/apps/quickLinks/quickLinksApp.js
!out/client/webview/apps/welcomePage/welcomePageApp.js
!out/server/src/server.js
Expand Down
1 change: 1 addition & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ ignore:
- src/webview/apps/contentCreator/createAnsibleCollectionPageApp.ts
- src/webview/apps/contentCreator/createAnsibleProjectPageApp.ts
- src/webview/apps/contentCreator/createDevfilePageApp.ts
- src/webview/apps/contentCreator/createSampleExecutionEnvPageApp.ts
- src/webview/apps/welcomePage/welcomePageApp.ts
- src/webview/apps/quickLinks/quickLinksApp.ts
99 changes: 99 additions & 0 deletions media/contentCreator/createSampleExecutionEnvPageStyle.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
@import url(../baseStyles/baseFormStyle.css);

.container {
display: flex;
flex-direction: column;
}

.element {
margin-bottom: 14px;
}

vscode-text-field {
margin-top: 6px;
margin-bottom: 6px;
}

vscode-text-area {
margin-top: 6px;
margin-bottom: 6px;
}

.checkbox-div {
display: flex; /* Use flexbox */
flex-direction: column; /* Arrange child elements vertically */
margin-top: 22px;
margin-bottom: 10px;
width: 100%;
}

.verbose-div {
display: flex; /* Use flexbox */
flex-direction: row; /* Arrange child elements vertically */
margin-top: 12px;
margin-bottom: 30px;
width: 100%;
}

vscode-dropdown {
width: 200px;
}

.full-destination-path {
display: flex; /* Use flexbox */
flex-direction: row; /* Arrange child elements vertically */
color: var(--vscode-descriptionForeground);
}

.group-buttons {
display: flex; /* Use flexbox */
flex-direction: row; /* Arrange child elements vertically */
}

.p-collection-name {
font-style: italic;
}

vscode-button {
margin: 0px 3px;
}

vscode-checkbox i {
color: var(--vscode-descriptionForeground);
font-size: small;
}

#ade-docs-link {
margin-left: 30px;
font-style: italic;
}

.dropdown-container {
box-sizing: border-box;
display: flex;
flex-flow: column nowrap;
align-items: flex-start;
justify-content: flex-start;
}

.dropdown-container label {
display: block;
color: var(--vscode-foreground);
cursor: pointer;
font-size: var(--vscode-font-size);
line-height: normal;
margin-bottom: 2px;
}

#log-to-file-options-div {
display: none;
flex-direction: column;
border-style: dotted;
border-color: var(--focus-border);
border-width: 0.5px;
padding: 8px;
}

.log-level-div {
margin: 4px 0px;
}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,10 @@
"command": "ansible.content-creator.create-devfile",
"title": "Ansible: Create a Devfile"
},
{
"command": "ansible.content-creator.create-sample-execution-env-file",
"title": "Ansible: Create a Sample Execution Environment file"
},
{
"command": "ansible.content-creator.create",
"title": "Ansible Content Creator: Create"
Expand Down
2 changes: 2 additions & 0 deletions src/definitions/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export const ANSIBLE_CREATOR_VERSION_MIN = "24.10.1";

export const ANSIBLE_CREATOR_COLLECTION_VERSION_MIN = "24.7.1";

export const ANSIBLE_CREATOR_EE_VERSION_MIN = "25.1.0";

export const DevfileImages = {
Upstream: "ghcr.io/ansible/ansible-workspace-env-reference:latest",
};
11 changes: 11 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
} from "./features/lightspeed/lightspeedUser";
import { PlaybookFeedbackEvent } from "./interfaces/lightspeed";
import { CreateDevfile } from "./features/contentCreator/createDevfilePage";
import { CreateSampleExecutionEnv } from "./features/contentCreator/createSampleExecutionEnvPage";

export let client: LanguageClient;
export let lightSpeedManager: LightSpeedManager;
Expand Down Expand Up @@ -550,6 +551,16 @@
),
);

// open web-view for creating sample Execution Environment file
context.subscriptions.push(
vscode.commands.registerCommand(
"ansible.content-creator.create-sample-execution-env-file",
() => {
CreateSampleExecutionEnv.render(context.extensionUri);

Check warning on line 559 in src/extension.ts

View check run for this annotation

Codecov / codecov/patch

src/extension.ts#L559

Added line #L559 was not covered by tests
},
),
);

// open ansible-creator create
context.subscriptions.push(
vscode.commands.registerCommand("ansible.content-creator.create", () => {
Expand Down
Loading