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

Drop tree.json #409

Open
wants to merge 24 commits into
base: dev
Choose a base branch
from
Open

Drop tree.json #409

wants to merge 24 commits into from

Conversation

ReaNAiveD
Copy link
Member

@ReaNAiveD ReaNAiveD commented Sep 27, 2024

Description
The tree.json file is growing bigger and will cause problem for git command one day. So it is required to drop tree.json file in git repo and generate it only in local cache.

The PR dropping tree.json in aaz model: Azure/aaz#615

Backend

  • Add a new class CMDSpecsPartialCommandTree to support partial commands and command groups management.
  • Through overwriting the __getitem__ method of CMDSpecsCommandDict and CMDSpecsCommandGroupDict, support similar interface of PartialCommandTree and a full CommandTree.
  • Add new api /AAZ/Specs/CommandTree/Simple to get a simplified tree from folder structure.
  • Add new api /AAZ/Specs/CommandTree/Nodes/Leaves to batched get command leaves.

Frontend

  • Rewrite the CLIModGeneratorProfileCommandTree. Change it from class component to function component.
  • Support dynamic load of command tree leaves in ModGenerator.
  • Add new property selected to ProfileCTCommand and ProfileCTCommandGroup to mark selection state no matter it is loaded or not.
  • Change ProfileCommandTree to object instead of list.

# Conflicts:
#	src/web/src/views/cli/CLIModGeneratorProfileCommandTree.tsx
#	src/web/src/views/cli/CLIModGeneratorProfileTabs.tsx
#	src/web/src/views/cli/CLIModuleGenerator.tsx
@ReaNAiveD ReaNAiveD self-assigned this Sep 27, 2024
@ReaNAiveD ReaNAiveD marked this pull request as ready for review October 30, 2024 08:42
elif line and not cur_sub_block and not short_help:
short_help = line
elif line and not cur_sub_block and not long_help and prev_line:
short_help = short_help + '\n' + line
Copy link
Collaborator

@kairu-ms kairu-ms Nov 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here suppose the short help contains multiple lines, did you find any case has multiple lines?

Copy link
Member Author

@ReaNAiveD ReaNAiveD Nov 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have changed my code and find one example:

Commands\large-instance_create.md

# [Command] _large-instance create_

Create an Azure Large Instance for the specified subscription,
resource group, and instance name.

## Versions

### [2024-08-01-preview](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5henVyZWxhcmdlaW5zdGFuY2UvYXp1cmVsYXJnZWluc3RhbmNlcy97fQ==/2024-08-01-preview.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.azurelargeinstance/azurelargeinstances/{} 2024-08-01-preview -->

#### examples

- Create an Azure Large Storage Instance
    ```bash
        large-instance create -g myResourceGroup -n myALInstance -l westus -sku S72
    ```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants