-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from yannick-beot-sp/feature/30-refresh-identi…
…ty-profile Feature/refresh identity profile
- Loading branch information
Showing
8 changed files
with
94 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import * as vscode from 'vscode'; | ||
import * as commands from './constants'; | ||
import { IdentityNowResourceTreeItem, IdentityProfileTreeItem, TransformsTreeItem } from '../models/IdentityNowTreeItem'; | ||
import { IdentityNowClient } from '../services/IdentityNowClient'; | ||
import { getPathByUri } from '../utils/UriUtils'; | ||
|
||
|
||
export async function refreshIdentityProfile(node?: IdentityProfileTreeItem): Promise<void> { | ||
|
||
console.log("> refreshIdentityProfile", node); | ||
// assessing that item is a IdentityProfileTreeItem | ||
if (node === undefined || !(node instanceof IdentityProfileTreeItem)) { | ||
console.log("WARNING: refreshIdentityProfile: invalid item", node); | ||
throw new Error("refreshIdentityProfile: invalid item"); | ||
} | ||
|
||
|
||
const client = new IdentityNowClient(node.tenantId, node.tenantName); | ||
await vscode.window.withProgress({ | ||
location: vscode.ProgressLocation.Notification, | ||
title: `Refreshing ${node.label}...`, | ||
cancellable: false | ||
}, async (task, token) => { | ||
await client.refreshIdentityProfile(node.id); | ||
}).then(async () => | ||
await vscode.window.showInformationMessage(`Successfully refreshed ${node.label}`)); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters