Editing a skill

Edit a skill file in the Cloudera Agent Studio skill editor, then save the changes as a draft or publish to the skill catalog.

The Edit item of the Actions menu opens a working copy of the skill in your authoring workspace. The skill editor displays the name of the skill, the Files panel with a file tree, and the Save, Test, and Validate buttons. A published version in the catalog does not change when you edit the working copy.

After you open the skill editor, complete the procedures that match the changes that you want to make. Agent Studio saves changes to the content of a file to your workspace automatically, about 2 seconds after you stop typing. This automatic save does not create a draft of the skill.

To open the skill editor:
  1. Launch the Cloudera Agent Studio console.
  2. In the left navigation pane, click Assets > Skill Catalog.
    The Skills page is displayed. The My Drafts section lists your drafts, and the Skills section lists the published skills.
  3. Optional: To find the skill, enter text in Search by name, or click All, My Drafts, or Published.
  4. In the row of the skill, click Actions, and then click Edit.
    The skill editor is displayed.
  5. If the file tree is not displayed, in the Files panel, click Expand.
    The tree lists the folder of the skill and the files in the folder.
To change a file:
  1. In the file tree, click the file.
    The file opens in a tab.
  2. Change the content of the file.
    Agent Studio automatically saves your changes to your workspace shortly after you stop typing.
To add a file:
  1. In the file tree, point to the folder in which to add the file, and then click File actions.
    The menu contains the items New file and New folder.
  2. Click New file.
    The New file dialog is displayed.
  3. In Name, enter a name for the file.
    The name cannot be empty or include a forward slash (/).
  4. Optional: To add the content from your computer, select Upload a file, and then add the file in one of the following ways:
    • Drag the file to the drop zone.
    • Click Drop a file here, and then select the file in the file dialog of your browser.

    If you leave Name empty, the new file keeps the name of the uploaded file.

  5. Click Create. If you selected Upload a file, click Upload.
    The message Created "name" is displayed, where name is the name of the file. The file is displayed in the file tree. To close the dialog without adding the file, click Cancel or Close.
To add a folder:
  1. In the file tree, point to the folder in which to add the new folder, and then click File actions.
  2. Click New folder.
    The New folder dialog is displayed.
  3. In Name, enter a name for the folder.
  4. Optional: To fill the folder with the content of an archive, select Upload a .tar.gz bundle, and then add the bundle in one of the following ways:
    • Drag the .tar.gz file to the drop zone.
    • Click Drop a .tar.gz bundle here, and then select the file in the file dialog of your browser.
  5. Click Create. If you selected Upload a .tar.gz bundle, click Upload.
    The message Created "name" is displayed, and the folder is displayed in the file tree.
To rename a file:
  1. In the file tree, go to the file, and then click File actions.
    The File actions contains the Rename and Delete options.
  2. Click Rename.
    The Rename dialog box is displayed. The Current name field contains the current name.
  3. In New name, enter the new name, and click Rename.
    The name cannot be empty, and it cannot contain a forward slash (/). The message Renamed to "name" is displayed. To close the dialog without renaming the file, click Cancel.
To delete a file or a folder:
  1. In the file tree, go to the file or folder, click File actions, and click Delete.
    The Delete dialog box is displayed. Agent Studio removes the item permanently. For a folder, the dialog also states that the removal includes everything inside the folder.
  2. Click Delete.
    To close the dialog without deleting the item, click Cancel.
To rename the skill:
  1. At the top of the skill editor, next to the name of the skill, click More actions, and then click Rename.
    The Rename dialog is displayed. The Current name field displays the current name and is read-only.
  2. In New name, enter a name for the skill.
    The new name cannot be the same as the current name.
  3. Click Rename.

    A rename confirmation message is displayed and Agent Studio closes open file tabs. If the skill was previously published under its old name, a warning is displayed statiing that publishing the next version creates a new catalog entry rather than adding a new version to the original skill.

    To close the dialog without renaming the skill, click Cancel or Close.

To reload the files from your workspace:
  1. Click More actions, and then click Refresh.
    The file tree is loaded again from your workspace.
To save or publish your changes:
  1. In the skill editor, click Save, and then click Save as draft or Publish to catalog.
To leave the skill editor:
  1. Click Back to catalog at the beginning of the title bar.
    Agent Studio saves your work as a draft, and then returns you to the Skills page.
To delete the working copy of the skill:
  1. Click More actions, and then click Delete.
    The Delete skill in authoring plane dialog box is displayed.
  2. Click Delete.
    All associated files of the skill are permanently removed from the authoring plane, while catalog entries remain unchanged.
    To close the dialog without deleting the working copy, click Cancel or Close. If the deletion fails, the message Failed to delete "name" is displayed. After the deletion succeeds, Agent Studio leaves the skill editor.

Your changes are in your workspace. After you save a draft, the skill is displayed in the My Drafts section of the Skills page, with the version N/A. A published version in the Skills section, for example v1.0.0, does not change until you publish.

If a change to a file does not save, or if an operation fails, an error message is displayed.