clean up cli outputs (#1271)
## Description Remove old "restored..." confirmation line from the CLI. Renamed the "Reference" column header to "ID" in the tabular output, which represents the shortRef aka item id. ## Type of change - [x] 🐹 Trivial/Minor ## Issue(s) * #1269 ## Test Plan - [x] 💪 Manual - [x] ⚡ Unit test
This commit is contained in:
parent
2d29258caf
commit
f335fd8b5b
@ -233,11 +233,11 @@ docker run --env-file $HOME/.corso/corso.env \\
|
|||||||
</TabItem>
|
</TabItem>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
The output from the command above should display a list of any matching emails. Note the reference
|
The output from the command above should display a list of any matching emails. Note the ID
|
||||||
of the email you would like to use for testing restore.
|
of the email you would like to use for testing restore.
|
||||||
|
|
||||||
```text
|
```text
|
||||||
Reference Sender Subject Received
|
ID Sender Subject Received
|
||||||
360bf6840396 phish@contoso.info Re: Request for Apple/Amazon gift cards 2022-10-18T02:27:47Z
|
360bf6840396 phish@contoso.info Re: Request for Apple/Amazon gift cards 2022-10-18T02:27:47Z
|
||||||
84dbad89b9f5 ravi@cohovineyard.com Come join us! 2022-10-19T06:12:08Z
|
84dbad89b9f5 ravi@cohovineyard.com Come join us! 2022-10-19T06:12:08Z
|
||||||
...
|
...
|
||||||
@ -250,7 +250,7 @@ To restore the selected email, use the following command.
|
|||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
# Restore a selected email
|
# Restore a selected email
|
||||||
.\corso restore exchange --backup <id of your selected backup> --email <email reference>
|
.\corso restore exchange --backup <id of your selected backup> --email <email ID>
|
||||||
```
|
```
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
@ -258,7 +258,7 @@ To restore the selected email, use the following command.
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Restore a selected email
|
# Restore a selected email
|
||||||
./corso restore exchange --backup <id of your selected backup> --email <email reference>
|
./corso restore exchange --backup <id of your selected backup> --email <email ID>
|
||||||
```
|
```
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
@ -268,7 +268,7 @@ To restore the selected email, use the following command.
|
|||||||
`# Restore a selected email
|
`# Restore a selected email
|
||||||
docker run --env-file $HOME/.corso/corso.env \\
|
docker run --env-file $HOME/.corso/corso.env \\
|
||||||
--volume $HOME/.corso:/app/corso ghcr.io/alcionai/corso:${Version()} \\
|
--volume $HOME/.corso:/app/corso ghcr.io/alcionai/corso:${Version()} \\
|
||||||
restore exchange --backup <id of your selected backup> --email <email reference>`
|
restore exchange --backup <id of your selected backup> --email <email ID>`
|
||||||
}</CodeBlock>
|
}</CodeBlock>
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
@ -277,7 +277,7 @@ docker run --env-file $HOME/.corso/corso.env \\
|
|||||||
A confirmation of the recovered email will be shown and the email will appear in a new mailbox folder named `Corso_Restore_DD-MMM-YYYY_HH:MM:SS`.
|
A confirmation of the recovered email will be shown and the email will appear in a new mailbox folder named `Corso_Restore_DD-MMM-YYYY_HH:MM:SS`.
|
||||||
|
|
||||||
```text
|
```text
|
||||||
Reference Sender Subject Received
|
ID Sender Subject Received
|
||||||
360bf6840396 phish@contoso.info Re: Request for Apple/Amazon gift cards 2022-10-18T02:27:47Z
|
360bf6840396 phish@contoso.info Re: Request for Apple/Amazon gift cards 2022-10-18T02:27:47Z
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@ -237,7 +237,6 @@ func restoreExchangeCmd(cmd *cobra.Command, args []string) error {
|
|||||||
return Only(ctx, errors.Wrap(err, "Failed to run Exchange restore"))
|
return Only(ctx, errors.Wrap(err, "Failed to run Exchange restore"))
|
||||||
}
|
}
|
||||||
|
|
||||||
Infof(ctx, "Restored Exchange in %s for user %s.\n", s.Provider, sel.ToPrintable().Resources())
|
|
||||||
ds.PrintEntries(ctx)
|
ds.PrintEntries(ctx)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@ -174,7 +174,6 @@ func restoreOneDriveCmd(cmd *cobra.Command, args []string) error {
|
|||||||
return Only(ctx, errors.Wrap(err, "Failed to run OneDrive restore"))
|
return Only(ctx, errors.Wrap(err, "Failed to run OneDrive restore"))
|
||||||
}
|
}
|
||||||
|
|
||||||
Infof(ctx, "Restored OneDrive in %s for user %s.\n", s.Provider, sel.ToPrintable().Resources())
|
|
||||||
ds.PrintEntries(ctx)
|
ds.PrintEntries(ctx)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@ -184,7 +184,7 @@ func (de DetailsEntry) MinimumPrintable() any {
|
|||||||
// Headers returns the human-readable names of properties in a DetailsEntry
|
// Headers returns the human-readable names of properties in a DetailsEntry
|
||||||
// for printing out to a terminal in a columnar display.
|
// for printing out to a terminal in a columnar display.
|
||||||
func (de DetailsEntry) Headers() []string {
|
func (de DetailsEntry) Headers() []string {
|
||||||
hs := []string{"Reference"}
|
hs := []string{"ID"}
|
||||||
|
|
||||||
if de.ItemInfo.Folder != nil {
|
if de.ItemInfo.Folder != nil {
|
||||||
hs = append(hs, de.ItemInfo.Folder.Headers()...)
|
hs = append(hs, de.ItemInfo.Folder.Headers()...)
|
||||||
|
|||||||
@ -40,7 +40,7 @@ func (suite *DetailsUnitSuite) TestDetailsEntry_HeadersValues() {
|
|||||||
RepoRef: "reporef",
|
RepoRef: "reporef",
|
||||||
ShortRef: "deadbeef",
|
ShortRef: "deadbeef",
|
||||||
},
|
},
|
||||||
expectHs: []string{"Reference"},
|
expectHs: []string{"ID"},
|
||||||
expectVs: []string{"deadbeef"},
|
expectVs: []string{"deadbeef"},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -58,7 +58,7 @@ func (suite *DetailsUnitSuite) TestDetailsEntry_HeadersValues() {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
expectHs: []string{"Reference", "Organizer", "Subject", "Starts", "Recurring"},
|
expectHs: []string{"ID", "Organizer", "Subject", "Starts", "Recurring"},
|
||||||
expectVs: []string{"deadbeef", "organizer", "subject", nowStr, "true"},
|
expectVs: []string{"deadbeef", "organizer", "subject", nowStr, "true"},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -73,7 +73,7 @@ func (suite *DetailsUnitSuite) TestDetailsEntry_HeadersValues() {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
expectHs: []string{"Reference", "Contact Name"},
|
expectHs: []string{"ID", "Contact Name"},
|
||||||
expectVs: []string{"deadbeef", "contactName"},
|
expectVs: []string{"deadbeef", "contactName"},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -90,7 +90,7 @@ func (suite *DetailsUnitSuite) TestDetailsEntry_HeadersValues() {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
expectHs: []string{"Reference", "Sender", "Subject", "Received"},
|
expectHs: []string{"ID", "Sender", "Subject", "Received"},
|
||||||
expectVs: []string{"deadbeef", "sender", "subject", nowStr},
|
expectVs: []string{"deadbeef", "sender", "subject", nowStr},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -102,7 +102,7 @@ func (suite *DetailsUnitSuite) TestDetailsEntry_HeadersValues() {
|
|||||||
Sharepoint: &details.SharepointInfo{},
|
Sharepoint: &details.SharepointInfo{},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
expectHs: []string{"Reference"},
|
expectHs: []string{"ID"},
|
||||||
expectVs: []string{"deadbeef"},
|
expectVs: []string{"deadbeef"},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -120,7 +120,7 @@ func (suite *DetailsUnitSuite) TestDetailsEntry_HeadersValues() {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
expectHs: []string{"Reference", "ItemName", "ParentPath", "Size", "Created", "Modified"},
|
expectHs: []string{"ID", "ItemName", "ParentPath", "Size", "Created", "Modified"},
|
||||||
expectVs: []string{"deadbeef", "itemName", "parentPath", "1.0 kB", nowStr, nowStr},
|
expectVs: []string{"deadbeef", "itemName", "parentPath", "1.0 kB", nowStr, nowStr},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user