Move files into "src" and "resources" folders (#953)

...to match our other repos and because it's just a common/sensible pattern.

Also turn on "export-name" tslint rule and sort .vscodeignore
This commit is contained in:
Eric Jizba 2019-05-24 14:00:54 -07:00 коммит произвёл GitHub
Родитель 8de799e87d
Коммит e63ce0eea9
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
165 изменённых файлов: 472 добавлений и 492 удалений

Просмотреть файл

@ -1,24 +1,24 @@
# This excludes files during npm pack
.azure-pipelines/**
.github/**
.gitignore
.vscode-test/**
.vscode/**
*.tgz
**/*.gif
**/*.map
**/*.ts
build/**
utils/**
dist/test/**
docs/**
gulp*
node_modules/**
out/**
src/**
test/**
dist/test/**
testOutput/**
typings/**
**/*.ts
**/*.map
.gitignore
tsconfig.json
test-results.xml
gulp*
webpack.config*
package-lock.json
stats.json
test-results.xml
test/**
testOutput/**
tsconfig.json
tslint.json
*.tgz
typings/**
webpack.config*

Просмотреть файл

@ -1,10 +0,0 @@
import * as vscode from "vscode";
import { IActionContext } from 'vscode-azureextensionui';
import { scheduleRunRequest } from '../utils/SourceArchiveUtility';
// Prompts user to select a subscription, resource group, then registry from drop down. If there are multiple folders in the workspace, the source folder must also be selected.
// The user is then asked to name & tag the image. A build is queued for the image in the selected registry.
// Selected source code must contain a path to the desired dockerfile.
export async function quickBuild(context: IActionContext, dockerFileUri?: vscode.Uri | undefined): Promise<void> {
await scheduleRunRequest(dockerFileUri, "DockerBuildRequest", context);
}

Просмотреть файл

@ -1,75 +0,0 @@
# Azure Docker API (Preview)
The following extension commands are supported for programmatic use. If a parameter is not specified, the user will be prompted for the value. You must list 'PeterJausovec.vscode-docker' under the 'extensionDependencies' section of your package.json to ensure these apis are available to your extension. (**Note: the publisher will soon be changing, and although we will attempt to keep this change from affecting dependents, it would be good to contact us if you are using this API so we can inform you of the change.**)
> NOTE: The docker extension is still in preview and the APIs are subject to change.
Commands:
* [Configure (Add Docker Files to Workspace)](#configure-add-docker-files-to-workspace)
## Configure (Add Docker Files to Workspace)
### Command ID: `vscode-docker.api.configure`
### Parameters
|Name|Type|Description|
|---|---|---|
|options|ConfigureApiOptions|Options for the command
Where ConfigureApiOptions and related types are defined as follows:
```typescript
interface ConfigureApiOptions {
/**
* Root folder from which to search for .csproj, package.json, .pom or .gradle files
*/
rootPath: string;
/**
* Output folder for the docker files. This should normally be the same as rootPath or a descendent of it.
*/
outputFolder: string;
/**
* Platform (optional)
*/
platform?: Platform;
/**
* Port to expose (optional)
*/
port?: string;
/**
* The OS for the images (optional). Currently only used for .NET platforms.
*/
os?: OS;
}
type OS = 'Windows' | 'Linux';
export type Platform =
'Go' |
'Java' |
'.NET Core Console' |
'ASP.NET Core' |
'Node.js' |
'Python' |
'Ruby' |
'Other';
```
### Example Usage
```typescript
await vscode.commands.executeCommand('vscode-docker.api.configure', {
// (Platform and OS [if needed] will be
// requested from the user, since they
// aren't specified)
rootPath: '/src/myproject',
outputFolder: '/src/myproject/service1',
port: '8001'
});
```

Просмотреть файл

@ -9,7 +9,7 @@ import { Disposable, ExtensionContext } from 'vscode';
import { AzureAccount, AzureLoginStatus, AzureSession } from '../../typings/azure-account.api';
import { Subscription } from 'azure-arm-resource/lib/subscription/models';
import { getSubscriptionId, getTenantId } from '../../utils/nonNull';
import { getSubscriptionId, getTenantId } from '../../src/utils/nonNull';
export class NotSignedInError extends Error { }

Просмотреть файл

@ -6,7 +6,7 @@
import { SubscriptionModels } from 'azure-arm-resource';
import WebSiteManagementClient = require('azure-arm-website');
import * as WebSiteModels from 'azure-arm-website/lib/models';
import { getSubscriptionId, nonNullProp } from '../../utils/nonNull';
import { getSubscriptionId, nonNullProp } from '../../src/utils/nonNull';
import { AzureAccountWrapper } from './azureAccountWrapper';
export interface PartialList<T> extends Array<T> {

Просмотреть файл

@ -11,7 +11,7 @@ import WebSiteManagementClient = require('azure-arm-website');
import * as WebSiteModels from 'azure-arm-website/lib/models';
import * as vscode from 'vscode';
import { addExtensionUserAgent } from 'vscode-azureextensionui';
import { nonNullProp } from '../../utils/nonNull';
import { nonNullProp } from '../../src/utils/nonNull';
import { AzureImageTagNode } from '../models/azureRegistryNodes';
import { CustomImageTagNode } from '../models/customRegistryNodes';
import { DockerHubImageTagNode } from '../models/dockerHubNodes';

Просмотреть файл

@ -7,12 +7,12 @@ import * as ContainerModels from 'azure-arm-containerregistry/lib/models';
import { SubscriptionModels } from 'azure-arm-resource';
import * as vscode from 'vscode';
import { callWithTelemetryAndErrorHandling, IActionContext } from 'vscode-azureextensionui';
import { getImagesByRepository, getRepositoriesByRegistry } from '../../src/utils/Azure/acrTools';
import { AzureImage } from '../../src/utils/Azure/models/AzureImage';
import { AzureRepository } from '../../src/utils/Azure/models/AzureRepository';
import { getLoginServer } from '../../src/utils/nonNull';
import { treeUtils } from '../../src/utils/treeUtils';
import { AzureAccount } from '../../typings/azure-account.api';
import { getImagesByRepository, getRepositoriesByRegistry } from '../../utils/Azure/acrTools';
import { AzureImage } from '../../utils/Azure/models/image';
import { Repository } from '../../utils/Azure/models/repository';
import { getLoginServer } from '../../utils/nonNull';
import { treeUtils } from '../../utils/treeUtils';
import { formatTag } from './commonRegistryUtils';
import { NodeBase } from './nodeBase';
import { TaskRootNode } from './taskNode';
@ -54,7 +54,7 @@ export class AzureRegistryNode extends NodeBase {
return [];
}
const repositories: Repository[] = await getRepositoriesByRegistry(element.registry);
const repositories: AzureRepository[] = await getRepositoriesByRegistry(element.registry);
for (let repository of repositories) {
let node = new AzureRepositoryNode(
repository.name,
@ -103,7 +103,7 @@ export class AzureRepositoryNode extends NodeBase {
const imageNodes: AzureImageTagNode[] = [];
let node: AzureImageTagNode;
let repo = await Repository.Create(element.registry, element.label);
let repo = await AzureRepository.Create(element.registry, element.label);
let images: AzureImage[] = await getImagesByRepository(repo);
for (let img of images) {
node = new AzureImageTagNode(

Просмотреть файл

@ -6,9 +6,9 @@
import * as moment from 'moment';
import * as vscode from 'vscode';
import { parseError } from 'vscode-azureextensionui';
import { MAX_CONCURRENT_REQUESTS, PAGE_SIZE } from '../../constants'
import { ext } from '../../extensionVariables';
import { AsyncPool } from '../../utils/asyncpool';
import { MAX_CONCURRENT_REQUESTS, PAGE_SIZE } from '../../src/constants'
import { ext } from '../../src/extensionVariables';
import { AsyncPool } from '../../src/utils/asyncpool';
import { Manifest, ManifestHistoryV1Compatibility } from '../utils/dockerHubUtils';
interface RegistryNonsensitiveInfo {

Просмотреть файл

@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode';
import { treeUtils } from '../../utils/treeUtils';
import { treeUtils } from '../../src/utils/treeUtils';
import { NodeBase } from './nodeBase';
export type ContainerNodeContextValue = 'stoppedLocalContainerNode' | 'runningLocalContainerNode';

Просмотреть файл

@ -5,9 +5,9 @@
import * as vscode from 'vscode';
import { callWithTelemetryAndErrorHandling, IActionContext, parseError } from 'vscode-azureextensionui';
import { keytarConstants } from '../../constants'
import { ext } from '../../extensionVariables';
import { nonNullValue } from '../../utils/nonNull';
import { keytarConstants } from '../../src/constants'
import { ext } from '../../src/extensionVariables';
import { nonNullValue } from '../../src/utils/nonNull';
import { CustomRegistryNode } from './customRegistryNodes';
interface CustomRegistryNonsensitive {

Просмотреть файл

@ -5,7 +5,7 @@
import * as vscode from 'vscode';
import { callWithTelemetryAndErrorHandling, IActionContext, parseError } from 'vscode-azureextensionui';
import { treeUtils } from '../../utils/treeUtils';
import { treeUtils } from '../../src/utils/treeUtils';
import { formatTag, getCatalog, getTags, registryRequest } from './commonRegistryUtils';
import { CustomRegistry } from './customRegistries';
import { NodeBase } from './nodeBase';

Просмотреть файл

@ -5,9 +5,9 @@
import * as vscode from 'vscode';
import { callWithTelemetryAndErrorHandling, IActionContext } from 'vscode-azureextensionui';
import { MAX_CONCURRENT_REQUESTS } from '../../constants';
import { AsyncPool } from '../../utils/asyncpool';
import { treeUtils } from '../../utils/treeUtils';
import { MAX_CONCURRENT_REQUESTS } from '../../src/constants';
import { AsyncPool } from '../../src/utils/asyncpool';
import { treeUtils } from '../../src/utils/treeUtils';
import * as dockerHub from '../utils/dockerHubUtils';
import { formatTag } from './commonRegistryUtils';
import { NodeBase } from './nodeBase';

Просмотреть файл

@ -5,7 +5,7 @@
import * as vscode from 'vscode';
import { parseError } from 'vscode-azureextensionui';
import { treeUtils } from '../../utils/treeUtils';
import { treeUtils } from '../../src/utils/treeUtils';
import { NodeBase } from './nodeBase';
export type IconPath = string | vscode.Uri | { light: string | vscode.Uri; dark: string | vscode.Uri } | vscode.ThemeIcon;

Просмотреть файл

@ -7,8 +7,7 @@ import * as assert from 'assert';
import { ImageDesc } from 'dockerode';
import * as moment from 'moment';
import * as vscode from 'vscode';
import { extractRegExGroups } from '../../helpers/extractRegExGroups';
import { trimWithElipsis } from '../utils/utils';
import { extractRegExGroups } from '../../src/utils/extractRegExGroups';
// If options not specified, retrieves them from user settings
export function getImageLabel(fullTag: string, image: ImageDesc, labelTemplate: string, options?: { truncateLongRegistryPaths: boolean, truncateMaxLength: number }): string {
@ -32,6 +31,20 @@ export function getImageLabel(fullTag: string, image: ImageDesc, labelTemplate:
return label;
}
export function trimWithElipsis(str: string, max: number = 10): string {
const elipsis: string = "...";
const len: number = str.length;
if (max <= 0 || max >= 100) { return str; }
if (str.length <= max) { return str; }
if (max < 3) { return str.substr(0, max); }
const front: string = str.substr(0, (len / 2) - (-0.5 * (max - len - 3)));
const back: string = str.substr(len - (len / 2) + (-0.5 * (max - len - 3)));
return front + elipsis + back;
}
/**
* Retrieves the full repository name
* @param fullTag [hostname/][username/]repositoryname[:tag]

Просмотреть файл

@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode';
import { treeUtils } from '../../utils/treeUtils';
import { treeUtils } from '../../src/utils/treeUtils';
import { ImageNode } from './imageNode';
import { NodeBase } from './nodeBase';

Просмотреть файл

@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode';
import { treeUtils } from '../../utils/treeUtils';
import { treeUtils } from '../../src/utils/treeUtils';
export abstract class NodeBase {
public readonly label: string;

Просмотреть файл

@ -8,12 +8,12 @@ import * as ContainerModels from 'azure-arm-containerregistry/lib/models';
import { SubscriptionModels } from 'azure-arm-resource';
import * as vscode from 'vscode';
import { callWithTelemetryAndErrorHandling, IActionContext, parseError } from 'vscode-azureextensionui';
import { keytarConstants, MAX_CONCURRENT_REQUESTS, MAX_CONCURRENT_SUBSCRIPTON_REQUESTS } from '../../constants';
import { ext } from '../../extensionVariables';
import { keytarConstants, MAX_CONCURRENT_REQUESTS, MAX_CONCURRENT_SUBSCRIPTON_REQUESTS } from '../../src/constants';
import { ext } from '../../src/extensionVariables';
import { AsyncPool } from '../../src/utils/asyncpool';
import { AzureUtilityManager } from '../../src/utils/azureUtilityManager';
import { getLoginServer } from '../../src/utils/nonNull';
import { AzureAccount } from '../../typings/azure-account.api';
import { AsyncPool } from '../../utils/asyncpool';
import { AzureUtilityManager } from '../../utils/azureUtilityManager';
import { getLoginServer } from '../../utils/nonNull';
import * as dockerHub from '../utils/dockerHubUtils';
import { AzureLoadingNode, AzureNotSignedInNode, AzureRegistryNode } from './azureRegistryNodes';
import { getCustomRegistries } from './customRegistries';

Просмотреть файл

@ -6,11 +6,11 @@
import * as assert from 'assert';
import * as vscode from 'vscode';
import { callWithTelemetryAndErrorHandling, IActionContext } from 'vscode-azureextensionui';
import { docker, ListContainerDescOptions as GetContainerDescOptions } from '../../commands/utils/docker-endpoint';
import { ext, ImageGrouping } from '../../extensionVariables';
import { ext, ImageGrouping } from '../../src/extensionVariables';
import { AzureUtilityManager } from '../../src/utils/azureUtilityManager';
import { docker, ListContainerDescOptions as GetContainerDescOptions } from '../../src/utils/docker-endpoint';
import { treeUtils } from '../../src/utils/treeUtils';
import { AzureAccount } from '../../typings/azure-account.api';
import { AzureUtilityManager } from '../../utils/azureUtilityManager';
import { treeUtils } from '../../utils/treeUtils';
import { showDockerConnectionError } from '../utils/dockerConnectionError';
import { ContainerNode, ContainerNodeContextValue } from './containerNode';
import { ErrorNode } from './errorNode';

Просмотреть файл

@ -8,11 +8,11 @@ import * as ContainerModels from 'azure-arm-containerregistry/lib/models';
import { SubscriptionModels } from 'azure-arm-resource';
import * as vscode from 'vscode';
import { callWithTelemetryAndErrorHandling, IActionContext } from 'vscode-azureextensionui';
import * as acrTools from '../../src/utils/Azure/acrTools';
import { AzureUtilityManager } from '../../src/utils/azureUtilityManager';
import { openExternal } from '../../src/utils/openExternal';
import { treeUtils } from '../../src/utils/treeUtils';
import { AzureAccount } from '../../typings/azure-account.api';
import * as acrTools from '../../utils/Azure/acrTools';
import { AzureUtilityManager } from '../../utils/azureUtilityManager';
import { treeUtils } from '../../utils/treeUtils';
import { openExternal } from '../utils/openExternal';
import { NodeBase } from './nodeBase';
/* Single TaskRootNode under each Repository. Labeled "Tasks" */

Просмотреть файл

@ -4,10 +4,10 @@
*--------------------------------------------------------------------------------------------*/
import { IActionContext } from 'vscode-azureextensionui';
import { getTenantId, nonNullValue } from '../../src/utils/nonNull';
import { openExternal } from '../../src/utils/openExternal';
import { AzureSession } from '../../typings/azure-account.api';
import { getTenantId, nonNullValue } from '../../utils/nonNull';
import { AzureImageTagNode, AzureRegistryNode, AzureRepositoryNode } from '../models/azureRegistryNodes';
import { openExternal } from './openExternal';
export function browseAzurePortal(_context: IActionContext, node?: AzureRegistryNode | AzureRepositoryNode | AzureImageTagNode): void {
if (node && node.azureAccount) {

Просмотреть файл

@ -6,9 +6,9 @@
import * as vscode from 'vscode';
import { MessageItem } from "vscode";
import { IActionContext, parseError } from "vscode-azureextensionui";
import { isLinux } from "../../helpers/osVersion";
import { wrapError } from "../../utils/wrapError";
import { openExternal } from './openExternal';
import { openExternal } from '../../src/utils/openExternal';
import { isLinux } from "../../src/utils/osVersion";
import { wrapError } from "../../src/utils/wrapError";
const connectionMessage = 'Unable to connect to Docker. Please make sure you have installed Docker and that it is running.';

Просмотреть файл

@ -6,11 +6,11 @@
import * as assert from 'assert';
import * as vscode from 'vscode';
import { IActionContext } from 'vscode-azureextensionui';
import { keytarConstants, PAGE_SIZE } from '../../constants';
import { ext } from '../../extensionVariables';
import { keytarConstants, PAGE_SIZE } from '../../src/constants';
import { ext } from '../../src/extensionVariables';
import { openExternal } from '../../src/utils/openExternal';
import { DockerHubImageTagNode, DockerHubOrgNode, DockerHubRepositoryNode } from '../models/dockerHubNodes';
import { NodeBase } from '../models/nodeBase';
import { openExternal } from './openExternal';
let _token: Token;

Просмотреть файл

@ -10,36 +10,35 @@
*/
// Export activate/deactivate for main.js
export { activateInternal, deactivateInternal } from './extension';
export { activateInternal, deactivateInternal } from './src/extension';
// Exports for tests
// The tests are not packaged with the webpack bundle and therefore only have access to code exported from this file.
//
// The tests should import '../extension.bundle.ts'. At design-time they live in tests/ and so will pick up this file (extension.bundle.ts).
// At runtime the tests live in dist/tests and will therefore pick up the main webpack bundle at dist/extension.bundle.js.
export { AsyncPool } from './utils/asyncpool';
export { wrapError } from './utils/wrapError';
export { ext } from './extensionVariables';
export { nonNullProp } from './utils/nonNull';
export { IKeytar } from './utils/keytar';
export { AsyncPool } from './src/utils/asyncpool';
export { wrapError } from './src/utils/wrapError';
export { ext } from './src/extensionVariables';
export { nonNullProp } from './src/utils/nonNull';
export { IKeytar } from './src/utils/keytar';
export { throwDockerConnectionError, internal } from './explorer/utils/dockerConnectionError';
export { getImageLabel } from './explorer/models/getImageLabel';
export { trimWithElipsis } from './explorer/utils/utils';
export { isWindows10RS3OrNewer, isWindows10RS4OrNewer, isWindows10RS5OrNewer } from "./helpers/osVersion";
export { LineSplitter } from './debugging/coreclr/lineSplitter';
export { CommandLineBuilder } from './debugging/coreclr/commandLineBuilder';
export { DockerClient } from './debugging/coreclr/dockerClient';
export { LaunchOptions } from './debugging/coreclr/dockerManager';
export { DotNetClient } from './debugging/coreclr/dotNetClient';
export { FileSystemProvider } from './debugging/coreclr/fsProvider';
export { OSProvider } from './debugging/coreclr/osProvider';
export { DockerDaemonIsLinuxPrerequisite, DockerfileExistsPrerequisite, DotNetSdkInstalledPrerequisite, LinuxUserInDockerGroupPrerequisite, MacNuGetFallbackFolderSharedPrerequisite } from './debugging/coreclr/prereqManager';
export { ProcessProvider } from './debugging/coreclr/processProvider';
export { PlatformOS, Platform } from './utils/platform';
export { DockerBuildImageOptions } from "./debugging/coreclr/dockerClient";
export { compareBuildImageOptions } from "./debugging/coreclr/dockerManager";
export { configure, ConfigureApiOptions, ConfigureTelemetryProperties } from './configureWorkspace/configure';
export { globAsync } from './helpers/async';
export { httpsRequestBinary } from './utils/httpRequest';
export { DefaultTerminalProvider } from './commands/utils/TerminalProvider';
export { docker } from './commands/utils/docker-endpoint';
export { getImageLabel, trimWithElipsis } from './explorer/models/getImageLabel';
export { isWindows10RS3OrNewer, isWindows10RS4OrNewer, isWindows10RS5OrNewer } from "./src/utils/osVersion";
export { LineSplitter } from './src/debugging/coreclr/lineSplitter';
export { CommandLineBuilder } from './src/debugging/coreclr/commandLineBuilder';
export { DockerClient } from './src/debugging/coreclr/CliDockerClient';
export { LaunchOptions } from './src/debugging/coreclr/dockerManager';
export { DotNetClient } from './src/debugging/coreclr/CommandLineDotNetClient';
export { FileSystemProvider } from './src/debugging/coreclr/fsProvider';
export { OSProvider } from './src/debugging/coreclr/LocalOSProvider';
export { DockerDaemonIsLinuxPrerequisite, DockerfileExistsPrerequisite, DotNetSdkInstalledPrerequisite, LinuxUserInDockerGroupPrerequisite, MacNuGetFallbackFolderSharedPrerequisite } from './src/debugging/coreclr/prereqManager';
export { ProcessProvider } from './src/debugging/coreclr/ChildProcessProvider';
export { PlatformOS, Platform } from './src/utils/platform';
export { DockerBuildImageOptions } from "./src/debugging/coreclr/CliDockerClient";
export { compareBuildImageOptions } from "./src/debugging/coreclr/dockerManager";
export { configure, ConfigureApiOptions, ConfigureTelemetryProperties } from './src/configureWorkspace/configure';
export { globAsync } from './src/utils/globAsync';
export { httpsRequestBinary } from './src/utils/httpRequest';
export { DefaultTerminalProvider } from './src/utils/TerminalProvider';
export { docker } from './src/utils/docker-endpoint';

Просмотреть файл

@ -17,7 +17,7 @@ let perfStats = {
Object.defineProperty(exports, "__esModule", { value: true });
const ignoreBundle = !/^(false|0)?$/i.test(process.env.AZCODE_DOCKER_IGNORE_BUNDLE || '');
const extensionPath = ignoreBundle ? "./out/extension" : "./dist/extension.bundle";
const extensionPath = ignoreBundle ? "./out/src/extension" : "./dist/extension.bundle";
const extension = require(extensionPath);
async function activate(ctx) {

Просмотреть файл

@ -772,8 +772,8 @@
"command": "vscode-docker.images.selectGroupBy",
"title": "Group Images By...",
"icon": {
"light": "images/SortingGrouping_16x.svg",
"dark": "images/SortingGrouping_16x.svg"
"light": "resources/SortingGrouping_16x.svg",
"dark": "resources/SortingGrouping_16x.svg"
},
"category": "Docker"
},
@ -956,8 +956,8 @@
"title": "Refresh Explorer",
"category": "Docker",
"icon": {
"light": "images/light/refresh.svg",
"dark": "images/dark/refresh.svg"
"light": "resources/light/refresh.svg",
"dark": "resources/dark/refresh.svg"
}
},
{
@ -1000,8 +1000,8 @@
"title": "System Prune",
"category": "Docker",
"icon": {
"light": "images/light/prune.svg",
"dark": "images/dark/prune.svg"
"light": "resources/light/prune.svg",
"dark": "resources/dark/prune.svg"
}
}
],
@ -1017,7 +1017,7 @@
"viewsContainers": {
"activitybar": [
{
"icon": "images/docker.svg",
"icon": "resources/docker.svg",
"id": "dockerView",
"title": "Docker"
}

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 1.1 KiB

После

Ширина:  |  Высота:  |  Размер: 1.1 KiB

Просмотреть файл

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 613 B

После

Ширина:  |  Высота:  |  Размер: 613 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 728 B

После

Ширина:  |  Высота:  |  Размер: 728 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 519 B

После

Ширина:  |  Высота:  |  Размер: 519 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 486 B

После

Ширина:  |  Высота:  |  Размер: 486 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 692 B

После

Ширина:  |  Высота:  |  Размер: 692 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 691 B

После

Ширина:  |  Высота:  |  Размер: 691 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 696 B

После

Ширина:  |  Высота:  |  Размер: 696 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 659 B

После

Ширина:  |  Высота:  |  Размер: 659 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 517 B

После

Ширина:  |  Высота:  |  Размер: 517 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 504 B

После

Ширина:  |  Высота:  |  Размер: 504 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 1.8 KiB

После

Ширина:  |  Высота:  |  Размер: 1.8 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 952 B

После

Ширина:  |  Высота:  |  Размер: 952 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 986 B

После

Ширина:  |  Высота:  |  Размер: 986 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 1.6 KiB

После

Ширина:  |  Высота:  |  Размер: 1.6 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 2.9 KiB

После

Ширина:  |  Высота:  |  Размер: 2.9 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 613 B

После

Ширина:  |  Высота:  |  Размер: 613 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 728 B

После

Ширина:  |  Высота:  |  Размер: 728 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 519 B

После

Ширина:  |  Высота:  |  Размер: 519 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 486 B

После

Ширина:  |  Высота:  |  Размер: 486 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 692 B

После

Ширина:  |  Высота:  |  Размер: 692 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 691 B

После

Ширина:  |  Высота:  |  Размер: 691 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 696 B

После

Ширина:  |  Высота:  |  Размер: 696 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 659 B

После

Ширина:  |  Высота:  |  Размер: 659 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 517 B

После

Ширина:  |  Высота:  |  Размер: 517 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 504 B

После

Ширина:  |  Высота:  |  Размер: 504 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 1.8 KiB

После

Ширина:  |  Высота:  |  Размер: 1.8 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 952 B

После

Ширина:  |  Высота:  |  Размер: 952 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 986 B

После

Ширина:  |  Высота:  |  Размер: 986 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 1.6 KiB

После

Ширина:  |  Высота:  |  Размер: 1.6 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 517 B

После

Ширина:  |  Высота:  |  Размер: 517 B

Просмотреть файл

@ -1,6 +1,11 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE.md in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode';
export class TaskContentProvider implements vscode.TextDocumentContentProvider {
export class AzureTaskContentProvider implements vscode.TextDocumentContentProvider {
public static scheme: string = 'task';
private onDidChangeEvent: vscode.EventEmitter<vscode.Uri> = new vscode.EventEmitter<vscode.Uri>();

Просмотреть файл

@ -1,3 +1,8 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE.md in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { BlobService, createBlobServiceWithSas } from 'azure-storage';
import * as fse from 'fs-extra';
import { isNullOrUndefined } from 'util';

Просмотреть файл

@ -1,10 +1,15 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE.md in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import ContainerRegistryManagementClient from "azure-arm-containerregistry";
import { Registry, Run, RunGetLogResult, RunListResult } from "azure-arm-containerregistry/lib/models";
import vscode = require('vscode');
import { parseError } from "vscode-azureextensionui";
import { getImageDigest } from "../../../utils/Azure/acrTools";
import { AzureImage } from "../../../utils/Azure/models/image";
import { Repository } from "../../../utils/Azure/models/repository";
import { AzureImage } from "../../../utils/Azure/models/AzureImage";
import { AzureRepository } from "../../../utils/Azure/models/AzureRepository";
/** Class to manage data and data acquisition for logs */
export class LogData {
@ -126,7 +131,7 @@ export class LogData {
if (items.length !== 2) {
throw new Error('Wrong format: It should be <image>:<tag>');
}
const image = new AzureImage(await Repository.Create(this.registry, items[0]), items[1]);
const image = new AzureImage(await AzureRepository.Create(this.registry, items[0]), items[1]);
const imageDigest: string = await getImageDigest(image);
if (parsedFilter.length > 0) { parsedFilter += ' and '; }

Просмотреть файл

@ -1,11 +1,15 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE.md in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { ImageDescriptor, Run } from "azure-arm-containerregistry/lib/models";
import * as path from 'path';
import * as vscode from "vscode";
import { callWithTelemetryAndErrorHandling } from "vscode-azureextensionui";
import { ext } from "../../../extensionVariables";
import { accessLog } from './logFileManager';
import { Filter, LogData } from './tableDataManager'
import { accessLog } from './LogContentProvider';
import { Filter, LogData } from './LogData'
export class LogTableWebview {
private logData: LogData;
private panel: vscode.WebviewPanel;
@ -15,10 +19,10 @@ export class LogTableWebview {
this.panel = vscode.window.createWebviewPanel('log Viewer', webviewName, vscode.ViewColumn.One, { enableScripts: true, retainContextWhenHidden: true });
//Get path to resource on disk
const extensionPath = ext.context.extensionPath;
const scriptFile = vscode.Uri.file(path.join(extensionPath, 'commands', 'azureCommands', 'acr-logs-utils', 'logScripts.js')).with({ scheme: 'vscode-resource' });
const styleFile = vscode.Uri.file(path.join(extensionPath, 'style', 'acr-logs', 'stylesheet.css')).with({ scheme: 'vscode-resource' });
const iconStyle = vscode.Uri.file(path.join(extensionPath, 'style', 'acr-logs', 'fabric-components', 'css', 'vscmdl2-icons.css')).with({ scheme: 'vscode-resource' });
const resourceRoot: string = ext.context.asAbsolutePath(path.join('resources', 'acr'));
const scriptFile = vscode.Uri.file(path.join(resourceRoot, 'logScripts.js')).with({ scheme: 'vscode-resource' });
const styleFile = vscode.Uri.file(path.join(resourceRoot, 'style', 'stylesheet.css')).with({ scheme: 'vscode-resource' });
const iconStyle = vscode.Uri.file(path.join(resourceRoot, 'style', 'fabric-components', 'css', 'vscmdl2-icons.css')).with({ scheme: 'vscode-resource' });
//Populate Webview
this.panel.webview.html = this.getBaseHtml(scriptFile, styleFile, iconStyle);
this.setupIncomingListeners();

Просмотреть файл

@ -2,19 +2,20 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE.md in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { ContainerRegistryManagementClient } from 'azure-arm-containerregistry';
import { Registry, RegistryNameStatus } from "azure-arm-containerregistry/lib/models";
import { SubscriptionModels } from 'azure-arm-resource';
import { ResourceGroup } from "azure-arm-resource/lib/resource/models";
import * as vscode from "vscode";
import { ext } from '../../extensionVariables';
import { isValidAzureName } from '../../utils/Azure/common';
import { isValidAzureName } from '../../utils/Azure/isValidAzureName';
import { AzureUtilityManager } from '../../utils/azureUtilityManager';
import { nonNullProp } from '../../utils/nonNull';
import { quickPickLocation, quickPickResourceGroup, quickPickSKU, quickPickSubscription } from '../utils/quick-pick-azure';
import { quickPickLocation, quickPickResourceGroup, quickPickSKU, quickPickSubscription } from '../../utils/quick-pick-azure';
/* Creates a new Azure container registry based on user input/selection of features */
export async function createRegistry(): Promise<Registry> {
export async function createAzureRegistry(): Promise<Registry> {
const subscription: SubscriptionModels.Subscription = await quickPickSubscription();
const resourceGroup: ResourceGroup = await quickPickResourceGroup(true, subscription);
const client = await AzureUtilityManager.getInstance().getContainerRegistryManagementClient(subscription);

Просмотреть файл

@ -6,58 +6,19 @@
import { Registry } from "azure-arm-containerregistry/lib/models";
import * as vscode from "vscode";
import { DialogResponses, IActionContext } from "vscode-azureextensionui";
import { AzureImageTagNode } from '../../explorer/models/azureRegistryNodes';
import { AzureImageTagNode } from '../../../explorer/models/azureRegistryNodes';
import { ext } from "../../extensionVariables";
import * as acrTools from '../../utils/Azure/acrTools';
import { AzureImage } from "../../utils/Azure/models/image";
import { Repository } from "../../utils/Azure/models/repository";
import * as quickPicks from '../utils/quick-pick-azure';
/** Function to untag an Azure hosted image
* @param node : if called through right click on AzureImageNode, the node object will be passed in. See azureRegistryNodes.ts for more info
*/
export async function untagAzureImage(_context: IActionContext, node?: AzureImageTagNode): Promise<void> {
let registry: Registry;
let repo: Repository;
let image: AzureImage;
if (!node) {
registry = await quickPicks.quickPickACRRegistry();
repo = await quickPicks.quickPickACRRepository(registry, `Select the repository of the image you want to untag`);
image = await quickPicks.quickPickACRImage(repo, `Select the image you want to untag`);
} else {
registry = node.registry;
let wholeName: string[] = node.label.split(':');
repo = await Repository.Create(registry, wholeName[0]);
image = new AzureImage(repo, wholeName[1]);
}
const untag: vscode.MessageItem = { title: "Untag" };
const shouldDelete = await ext.ui.showWarningMessage(
`Are you sure you want to untag '${image.toString()}'? This does not delete the manifest referenced by the tag.`,
{ modal: true },
untag,
DialogResponses.cancel);
if (shouldDelete === untag) {
await acrTools.untagImage(image);
vscode.window.showInformationMessage(`Successfully untagged '${image.toString()}'`);
if (node) {
ext.dockerExplorerProvider.refreshNode(node.parent);
} else {
ext.dockerExplorerProvider.refreshRegistries();
}
}
}
import { AzureImage } from "../../utils/Azure/models/AzureImage";
import { AzureRepository } from "../../utils/Azure/models/AzureRepository";
import * as quickPicks from '../../utils/quick-pick-azure';
/** Function to delete an Azure hosted image
* @param node : if called through right click on AzureImageNode, the node object will be passed in. See azureRegistryNodes.ts for more info
*/
export async function deleteAzureImage(_context: IActionContext, node?: AzureImageTagNode): Promise<void> {
let registry: Registry;
let repo: Repository;
let repo: AzureRepository;
let image: AzureImage;
if (!node) {
@ -68,7 +29,7 @@ export async function deleteAzureImage(_context: IActionContext, node?: AzureIma
} else {
registry = node.registry;
let wholeName: string[] = node.label.split(':');
repo = await Repository.Create(registry, wholeName[0]);
repo = await AzureRepository.Create(registry, wholeName[0]);
image = new AzureImage(repo, wholeName[1]);
}

Просмотреть файл

@ -7,12 +7,12 @@ import { Registry } from "azure-arm-containerregistry/lib/models";
import { SubscriptionModels } from "azure-arm-resource";
import * as vscode from "vscode";
import { IActionContext } from "vscode-azureextensionui";
import { AzureRegistryNode } from '../../explorer/models/azureRegistryNodes';
import { AzureRegistryNode } from '../../../explorer/models/azureRegistryNodes';
import { ext } from "../../extensionVariables";
import * as acrTools from '../../utils/Azure/acrTools';
import { AzureUtilityManager } from '../../utils/azureUtilityManager';
import { nonNullProp } from "../../utils/nonNull";
import { confirmUserIntent, quickPickACRRegistry } from '../utils/quick-pick-azure';
import { confirmUserIntent, quickPickACRRegistry } from '../../utils/quick-pick-azure';
/** Delete a registry and all it's associated nested items
* @param node : the AzureRegistryNode the user right clicked on to delete

Просмотреть файл

@ -6,23 +6,23 @@
import { Registry } from "azure-arm-containerregistry/lib/models";
import * as vscode from "vscode";
import { IActionContext } from "vscode-azureextensionui";
import { AzureRepositoryNode } from '../../explorer/models/azureRegistryNodes';
import { AzureRepositoryNode } from '../../../explorer/models/azureRegistryNodes';
import { ext } from "../../extensionVariables";
import * as acrTools from '../../utils/Azure/acrTools';
import { Repository } from "../../utils/Azure/models/repository";
import { confirmUserIntent, quickPickACRRegistry, quickPickACRRepository } from '../utils/quick-pick-azure';
import { AzureRepository } from "../../utils/Azure/models/AzureRepository";
import { confirmUserIntent, quickPickACRRegistry, quickPickACRRepository } from '../../utils/quick-pick-azure';
/**
* function to delete an Azure repository and its associated images
* @param node : if called through right click on AzureRepositoryNode, the node object will be passed in. See azureRegistryNodes.ts for more info
*/
export async function deleteRepository(_context: IActionContext, node?: AzureRepositoryNode): Promise<void> {
export async function deleteAzureRepository(_context: IActionContext, node?: AzureRepositoryNode): Promise<void> {
let registry: Registry;
let repo: Repository;
let repo: AzureRepository;
if (node) {
registry = node.registry;
repo = await Repository.Create(registry, node.label);
repo = await AzureRepository.Create(registry, node.label);
} else {
registry = await quickPickACRRegistry();
repo = await quickPickACRRepository(registry, 'Select the repository you want to delete');

Просмотреть файл

@ -8,18 +8,18 @@ import { Registry } from "azure-arm-containerregistry/lib/models";
import { exec } from 'child_process';
import vscode = require('vscode');
import { IActionContext } from 'vscode-azureextensionui';
import { AzureImageTagNode, AzureRepositoryNode } from '../../explorer/models/azureRegistryNodes';
import { AzureImageTagNode, AzureRepositoryNode } from '../../../explorer/models/azureRegistryNodes';
import { ext } from '../../extensionVariables';
import * as acrTools from '../../utils/Azure/acrTools';
import { AzureImage } from "../../utils/Azure/models/image";
import { Repository } from "../../utils/Azure/models/repository";
import { quickPickACRImage, quickPickACRRegistry, quickPickACRRepository } from '../utils/quick-pick-azure';
import { AzureImage } from "../../utils/Azure/models/AzureImage";
import { AzureRepository } from "../../utils/Azure/models/AzureRepository";
import { quickPickACRImage, quickPickACRRegistry, quickPickACRRepository } from '../../utils/quick-pick-azure';
export async function pullRepoFromAzure(_context: IActionContext, node?: AzureRepositoryNode): Promise<void> {
export async function pullAzureRepository(_context: IActionContext, node?: AzureRepositoryNode): Promise<void> {
await pullFromAzure(node, true);
}
export async function pullImageFromAzure(_context: IActionContext, node?: AzureImageTagNode): Promise<void> {
export async function pullAzureImage(_context: IActionContext, node?: AzureImageTagNode): Promise<void> {
await pullFromAzure(node, false);
}
@ -41,7 +41,7 @@ async function pullFromAzure(node: AzureImageTagNode | AzureRepositoryNode, pull
} else { // Command Palette
registry = await quickPickACRRegistry();
const repository: Repository = await quickPickACRRepository(registry, 'Select the repository of the image you want to pull.');
const repository: AzureRepository = await quickPickACRRepository(registry, 'Select the repository of the image you want to pull.');
if (pullAll) {
imageRequest = `${repository.name} -a`;
} else {

Просмотреть файл

@ -0,0 +1,15 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE.md in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as vscode from "vscode";
import { IActionContext } from 'vscode-azureextensionui';
import { scheduleRunRequest } from '../../utils/scheduleRunRequest';
// Prompts user to select a subscription, resource group, then registry from drop down. If there are multiple folders in the workspace, the source folder must also be selected.
// The user is then asked to name & tag the image. A build is queued for the image in the selected registry.
// Selected source code must contain a path to the desired dockerfile.
export async function runAzureQuickBuild(context: IActionContext, dockerFileUri?: vscode.Uri | undefined): Promise<void> {
await scheduleRunRequest(dockerFileUri, "DockerBuildRequest", context);
}

Просмотреть файл

@ -1,22 +1,27 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE.md in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Registry } from "azure-arm-containerregistry/lib/models";
import { TaskRunRequest } from "azure-arm-containerregistry/lib/models";
import { ResourceGroup } from "azure-arm-resource/lib/resource/models";
import { Subscription } from "azure-arm-resource/lib/subscription/models";
import vscode = require('vscode');
import { IActionContext, parseError } from "vscode-azureextensionui";
import { TaskNode } from "../../explorer/models/taskNode";
import { TaskNode } from "../../../explorer/models/taskNode";
import * as acrTools from '../../utils/Azure/acrTools';
import { AzureUtilityManager } from "../../utils/azureUtilityManager";
import { quickPickACRRegistry, quickPickSubscription, quickPickTask } from '../utils/quick-pick-azure';
import { scheduleRunRequest } from '../utils/SourceArchiveUtility';
import { quickPickACRRegistry, quickPickSubscription, quickPickTask } from '../../utils/quick-pick-azure';
import { scheduleRunRequest } from '../../utils/scheduleRunRequest';
// Runs the selected yaml file. Equivalent to az acr run -f <yaml file> <directory>
// Selected source code must contain a path to the desired dockerfile.
export async function runTaskFile(context: IActionContext, yamlFileUri?: vscode.Uri): Promise<void> {
export async function runAzureTaskFromFile(context: IActionContext, yamlFileUri?: vscode.Uri): Promise<void> {
await scheduleRunRequest(yamlFileUri, "FileTaskRunRequest", context);
}
export async function runTask(_context: IActionContext, node?: TaskNode): Promise<void> {
export async function runAzureTask(_context: IActionContext, node?: TaskNode): Promise<void> {
let taskName: string;
let subscription: Subscription;
let resourceGroup: ResourceGroup;

Просмотреть файл

@ -1,14 +1,19 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE.md in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Registry, Task } from "azure-arm-containerregistry/lib/models";
import { ResourceGroup } from "azure-arm-resource/lib/resource/models";
import { Subscription } from "azure-arm-resource/lib/subscription/models";
import { IActionContext } from "vscode-azureextensionui";
import { TaskNode } from "../../explorer/models/taskNode";
import { TaskNode } from "../../../explorer/models/taskNode";
import * as acrTools from '../../utils/Azure/acrTools';
import { AzureUtilityManager } from "../../utils/azureUtilityManager";
import { quickPickACRRegistry, quickPickSubscription, quickPickTask } from '../utils/quick-pick-azure';
import { openTask } from "./task-utils/showTaskManager";
import { quickPickACRRegistry, quickPickSubscription, quickPickTask } from '../../utils/quick-pick-azure';
import { openTask } from "./AzureTaskContentProvider";
export async function showTaskProperties(_context: IActionContext, node?: TaskNode): Promise<void> {
export async function showAzureTaskProperties(_context: IActionContext, node?: TaskNode): Promise<void> {
let subscription: Subscription;
let registry: Registry;
let resourceGroup: ResourceGroup;

Просмотреть файл

@ -0,0 +1,53 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE.md in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Registry } from "azure-arm-containerregistry/lib/models";
import * as vscode from "vscode";
import { DialogResponses, IActionContext } from "vscode-azureextensionui";
import { AzureImageTagNode } from '../../../explorer/models/azureRegistryNodes';
import { ext } from "../../extensionVariables";
import * as acrTools from '../../utils/Azure/acrTools';
import { AzureImage } from "../../utils/Azure/models/AzureImage";
import { AzureRepository } from "../../utils/Azure/models/AzureRepository";
import * as quickPicks from '../../utils/quick-pick-azure';
/** Function to untag an Azure hosted image
* @param node : if called through right click on AzureImageNode, the node object will be passed in. See azureRegistryNodes.ts for more info
*/
export async function untagAzureImage(_context: IActionContext, node?: AzureImageTagNode): Promise<void> {
let registry: Registry;
let repo: AzureRepository;
let image: AzureImage;
if (!node) {
registry = await quickPicks.quickPickACRRegistry();
repo = await quickPicks.quickPickACRRepository(registry, `Select the repository of the image you want to untag`);
image = await quickPicks.quickPickACRImage(repo, `Select the image you want to untag`);
} else {
registry = node.registry;
let wholeName: string[] = node.label.split(':');
repo = await AzureRepository.Create(registry, wholeName[0]);
image = new AzureImage(repo, wholeName[1]);
}
const untag: vscode.MessageItem = { title: "Untag" };
const shouldDelete = await ext.ui.showWarningMessage(
`Are you sure you want to untag '${image.toString()}'? This does not delete the manifest referenced by the tag.`,
{ modal: true },
untag,
DialogResponses.cancel);
if (shouldDelete === untag) {
await acrTools.untagImage(image);
vscode.window.showInformationMessage(`Successfully untagged '${image.toString()}'`);
if (node) {
ext.dockerExplorerProvider.refreshNode(node.parent);
} else {
ext.dockerExplorerProvider.refreshRegistries();
}
}
}

Просмотреть файл

@ -1,20 +1,23 @@
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE.md in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Registry } from "azure-arm-containerregistry/lib/models";
import { Subscription } from "azure-arm-resource/lib/subscription/models";
import * as vscode from "vscode";
import { IActionContext } from "vscode-azureextensionui";
import { AzureImageTagNode, AzureRegistryNode } from '../../explorer/models/azureRegistryNodes';
import { TaskNode } from "../../explorer/models/taskNode";
import { AzureImageTagNode, AzureRegistryNode } from '../../../explorer/models/azureRegistryNodes';
import { TaskNode } from "../../../explorer/models/taskNode";
import { getResourceGroupName, getSubscriptionFromRegistry } from '../../utils/Azure/acrTools';
import { AzureUtilityManager } from '../../utils/azureUtilityManager';
import { quickPickACRRegistry } from '../utils/quick-pick-azure';
import { accessLog } from "./acr-logs-utils/logFileManager";
import { LogData } from "./acr-logs-utils/tableDataManager";
import { LogTableWebview } from "./acr-logs-utils/tableViewManager";
import { quickPickACRRegistry } from '../../utils/quick-pick-azure';
import { accessLog } from "./acr-log-utils/LogContentProvider";
import { LogData } from "./acr-log-utils/LogData";
import { LogTableWebview } from "./acr-log-utils/LogTableWebview";
/** This command is used through a right click on an azure registry, repository or image in the Docker Explorer. It is used to view ACR logs for a given item. */
export async function viewACRLogs(_context: IActionContext, node: AzureRegistryNode | AzureImageTagNode | TaskNode): Promise<void> {
export async function viewAzureLogs(_context: IActionContext, node: AzureRegistryNode | AzureImageTagNode | TaskNode): Promise<void> {
let registry: Registry;
let subscription: Subscription;
if (!node) {

Просмотреть файл

@ -6,11 +6,11 @@
import * as path from "path";
import * as vscode from "vscode";
import { IActionContext } from "vscode-azureextensionui";
import { delay } from "../explorer/utils/utils";
import { ext } from "../extensionVariables";
import { addImageTaggingTelemetry, getTagFromUserInput } from "./tag-image";
import { quickPickDockerFileItem } from "./utils/quick-pick-file";
import { quickPickWorkspaceFolder } from "./utils/quickPickWorkspaceFolder";
import { delay } from "../utils/delay";
import { quickPickDockerFileItem } from "../utils/quick-pick-file";
import { quickPickWorkspaceFolder } from "../utils/quickPickWorkspaceFolder";
import { addImageTaggingTelemetry, getTagFromUserInput } from "./tagImage";
export async function buildImage(context: IActionContext, dockerFileUri: vscode.Uri | undefined): Promise<void> {
const configOptions: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration('docker');

Просмотреть файл

@ -8,7 +8,7 @@ import * as vscode from 'vscode';
import { IActionContext } from 'vscode-azureextensionui';
import { COMPOSE_FILE_GLOB_PATTERN } from '../constants';
import { ext } from '../extensionVariables';
import { quickPickWorkspaceFolder } from './utils/quickPickWorkspaceFolder';
import { quickPickWorkspaceFolder } from '../utils/quickPickWorkspaceFolder';
async function getDockerComposeFileUris(folder: vscode.WorkspaceFolder): Promise<vscode.Uri[]> {
return await vscode.workspace.findFiles(new vscode.RelativePattern(folder, COMPOSE_FILE_GLOB_PATTERN), null, 9999, undefined);

Просмотреть файл

@ -4,9 +4,9 @@
*--------------------------------------------------------------------------------------------*/
import { IActionContext } from "vscode-azureextensionui";
import DockerInspectDocumentContentProvider from "../documentContentProviders/dockerInspect";
import { ImageNode } from "../explorer/models/imageNode";
import { quickPickImage } from "./utils/quick-pick-image";
import { ImageNode } from "../../explorer/models/imageNode";
import DockerInspectDocumentContentProvider from "../dockerInspect";
import { quickPickImage } from "../utils/quick-pick-image";
export default async function inspectImage(context: IActionContext, node: ImageNode | undefined): Promise<void> {

Просмотреть файл

@ -5,11 +5,11 @@
import * as vscode from 'vscode';
import { IActionContext } from 'vscode-azureextensionui';
import { ContainerNode } from '../explorer/models/containerNode';
import { RootNode } from '../explorer/models/rootNode';
import { ContainerNode } from '../../explorer/models/containerNode';
import { RootNode } from '../../explorer/models/rootNode';
import { ext } from '../extensionVariables';
import { docker, DockerEngineType, ListContainerDescOptions } from './utils/docker-endpoint';
import { quickPickContainer } from './utils/quick-pick-container';
import { docker, DockerEngineType, ListContainerDescOptions } from '../utils/docker-endpoint';
import { quickPickContainer } from '../utils/quick-pick-container';
function getEngineTypeShellCommands(engineType: DockerEngineType): string {
const configOptions: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration('docker');

Просмотреть файл

@ -5,12 +5,12 @@
import vscode = require('vscode');
import { IActionContext, TelemetryProperties } from 'vscode-azureextensionui';
import { ImageNode } from '../../explorer/models/imageNode';
import { RootNode } from '../../explorer/models/rootNode';
import { configurationKeys } from '../constants';
import { ImageNode } from '../explorer/models/imageNode';
import { RootNode } from '../explorer/models/rootNode';
import { ext } from '../extensionVariables';
import { askToSaveRegistryPath } from './registrySettings';
import { addImageTaggingTelemetry, getOrAskForImageAndTag, IHasImageDescriptorAndFullTag, tagImage } from './tag-image';
import { addImageTaggingTelemetry, getOrAskForImageAndTag, IHasImageDescriptorAndFullTag, tagImage } from './tagImage';
export async function pushImage(context: IActionContext, node: ImageNode | RootNode | undefined): Promise<void> {
let properties: {

Просмотреть файл

@ -5,12 +5,12 @@
import * as vscode from 'vscode';
import { DialogResponses, IActionContext } from 'vscode-azureextensionui';
import { AzureRegistryNode } from "../../explorer/models/azureRegistryNodes";
import { CustomRegistryNode } from "../../explorer/models/customRegistryNodes";
import { DockerHubOrgNode } from "../../explorer/models/dockerHubNodes";
import { configurationKeys } from '../constants';
import { AzureRegistryNode } from "../explorer/models/azureRegistryNodes";
import { CustomRegistryNode } from "../explorer/models/customRegistryNodes";
import { DockerHubOrgNode } from "../explorer/models/dockerHubNodes";
import { ext } from '../extensionVariables';
import { assertNever } from '../helpers/assertNever';
import { assertNever } from '../utils/assertNever';
const defaultRegistryKey = "defaultRegistry";
const hasCheckedRegistryPaths = "hasCheckedRegistryPaths"

Просмотреть файл

@ -5,11 +5,11 @@
import vscode = require('vscode');
import { IActionContext } from 'vscode-azureextensionui';
import { ContainerNode } from '../explorer/models/containerNode';
import { RootNode } from '../explorer/models/rootNode';
import { ContainerNode } from '../../explorer/models/containerNode';
import { RootNode } from '../../explorer/models/rootNode';
import { ext } from '../extensionVariables';
import { AllStatusFilter, docker, ListContainerDescOptions } from './utils/docker-endpoint';
import { quickPickContainerOrAll } from './utils/quick-pick-container';
import { AllStatusFilter, docker, ListContainerDescOptions } from '../utils/docker-endpoint';
import { quickPickContainerOrAll } from '../utils/quick-pick-container';
export async function removeContainer(context: IActionContext, node: RootNode | ContainerNode | undefined): Promise<void> {

Просмотреть файл

@ -5,10 +5,10 @@
import vscode = require('vscode');
import { IActionContext } from 'vscode-azureextensionui';
import { ImageNode } from "../explorer/models/imageNode";
import { RootNode } from '../explorer/models/rootNode';
import { docker } from './utils/docker-endpoint';
import { ImageItem, quickPickImage } from './utils/quick-pick-image';
import { ImageNode } from "../../explorer/models/imageNode";
import { RootNode } from '../../explorer/models/rootNode';
import { docker } from '../utils/docker-endpoint';
import { ImageItem, quickPickImage } from '../utils/quick-pick-image';
export async function removeImage(context: IActionContext, node: ImageNode | RootNode | undefined): Promise<void> {

Просмотреть файл

@ -5,11 +5,11 @@
import vscode = require('vscode');
import { IActionContext } from 'vscode-azureextensionui';
import { ContainerNode } from '../explorer/models/containerNode';
import { RootNode } from '../explorer/models/rootNode';
import { ContainerNode } from '../../explorer/models/containerNode';
import { RootNode } from '../../explorer/models/rootNode';
import { ext } from '../extensionVariables';
import { docker, ListContainerDescOptions } from './utils/docker-endpoint';
import { quickPickContainerOrAll } from './utils/quick-pick-container';
import { docker, ListContainerDescOptions } from '../utils/docker-endpoint';
import { quickPickContainerOrAll } from '../utils/quick-pick-container';
export async function restartContainer(context: IActionContext, node: RootNode | ContainerNode | undefined): Promise<void> {

Просмотреть файл

@ -4,11 +4,11 @@
*--------------------------------------------------------------------------------------------*/
import { IActionContext } from 'vscode-azureextensionui';
import { ContainerNode } from '../explorer/models/containerNode';
import { RootNode } from '../explorer/models/rootNode';
import { ContainerNode } from '../../explorer/models/containerNode';
import { RootNode } from '../../explorer/models/rootNode';
import { ext } from '../extensionVariables';
import { AllStatusFilter, ListContainerDescOptions } from './utils/docker-endpoint';
import { quickPickContainer } from './utils/quick-pick-container';
import { AllStatusFilter, ListContainerDescOptions } from '../utils/docker-endpoint';
import { quickPickContainer } from '../utils/quick-pick-container';
export async function showLogsContainer(context: IActionContext, node: RootNode | ContainerNode | undefined): Promise<void> {

Просмотреть файл

@ -8,10 +8,10 @@ import * as fse from 'fs-extra';
import os = require('os');
import vscode = require('vscode');
import { IActionContext, parseError } from 'vscode-azureextensionui';
import { ImageNode } from '../explorer/models/imageNode';
import { ImageNode } from '../../explorer/models/imageNode';
import { ext } from '../extensionVariables';
import { docker, DockerEngineType } from './utils/docker-endpoint';
import { ImageItem, quickPickImage } from './utils/quick-pick-image';
import { docker, DockerEngineType } from '../utils/docker-endpoint';
import { ImageItem, quickPickImage } from '../utils/quick-pick-image';
/**
* Image -> Run

Просмотреть файл

@ -4,11 +4,11 @@
*--------------------------------------------------------------------------------------------*/
import { IActionContext } from 'vscode-azureextensionui';
import { ContainerNode } from '../explorer/models/containerNode';
import { RootNode } from '../explorer/models/rootNode';
import { ContainerNode } from '../../explorer/models/containerNode';
import { RootNode } from '../../explorer/models/rootNode';
import { ext } from '../extensionVariables';
import { docker, ListContainerDescOptions } from './utils/docker-endpoint';
import { quickPickContainerOrAll } from './utils/quick-pick-container';
import { docker, ListContainerDescOptions } from '../utils/docker-endpoint';
import { quickPickContainerOrAll } from '../utils/quick-pick-container';
import vscode = require('vscode');

Просмотреть файл

@ -6,9 +6,9 @@
import * as semver from 'semver';
import vscode = require('vscode');
import { IActionContext } from 'vscode-azureextensionui';
import { throwDockerConnectionError } from '../explorer/utils/dockerConnectionError';
import { throwDockerConnectionError } from '../../explorer/utils/dockerConnectionError';
import { ext } from '../extensionVariables';
import { docker } from './utils/docker-endpoint';
import { docker } from '../utils/docker-endpoint';
export async function systemPrune(context: IActionContext): Promise<void> {
const configOptions: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration('docker');

Просмотреть файл

@ -5,14 +5,14 @@
import vscode = require('vscode');
import { IActionContext } from 'vscode-azureextensionui';
import { ImageNode } from '../../explorer/models/imageNode';
import { RootNode } from '../../explorer/models/rootNode';
import { configurationKeys } from '../constants';
import { ImageNode } from '../explorer/models/imageNode';
import { RootNode } from '../explorer/models/rootNode';
import { delay } from '../explorer/utils/utils';
import { ext } from '../extensionVariables';
import { extractRegExGroups } from '../helpers/extractRegExGroups';
import { docker } from './utils/docker-endpoint';
import { ImageItem, quickPickImage } from './utils/quick-pick-image';
import { delay } from '../utils/delay';
import { docker } from '../utils/docker-endpoint';
import { extractRegExGroups } from '../utils/extractRegExGroups';
import { ImageItem, quickPickImage } from '../utils/quick-pick-image';
export async function tagImage(context: IActionContext, node: ImageNode | RootNode | IHasImageDescriptorAndFullTag | undefined): Promise<string> {
// If a RootNode or no node is passed in, we ask the user to pick an image

Просмотреть файл

@ -10,20 +10,20 @@ import * as path from "path";
import * as vscode from "vscode";
import { IActionContext, TelemetryProperties } from 'vscode-azureextensionui';
import * as xml2js from 'xml2js';
import { quickPickWorkspaceFolder } from '../commands/utils/quickPickWorkspaceFolder';
import { ext } from '../extensionVariables';
import { globAsync } from '../helpers/async';
import { extractRegExGroups } from '../helpers/extractRegExGroups';
import { extractRegExGroups } from '../utils/extractRegExGroups';
import { globAsync } from '../utils/globAsync';
import { Platform, PlatformOS } from '../utils/platform';
import { promptForPort, quickPickOS, quickPickPlatform } from './config-utils';
import { configureCpp } from './configure_cpp';
import { configureAspDotNetCore, configureDotNetCoreConsole } from './configure_dotnetcore';
import { configureGo } from './configure_go';
import { configureJava } from './configure_java';
import { configureNode } from './configure_node';
import { configureOther } from './configure_other';
import { configurePython } from './configure_python';
import { configureRuby } from './configure_ruby';
import { quickPickWorkspaceFolder } from '../utils/quickPickWorkspaceFolder';
import { configureCpp } from './configureCpp';
import { configureAspDotNetCore, configureDotNetCoreConsole } from './configureDotNetCore';
import { configureGo } from './configureGo';
import { configureJava } from './configureJava';
import { configureNode } from './configureNode';
import { configureOther } from './configureOther';
import { configurePython } from './configurePython';
import { configureRuby } from './configureRuby';
import { promptForPort, quickPickOS, quickPickPlatform } from './configUtils';
export interface PackageInfo {
npmStart: boolean; //has npm start

Просмотреть файл

@ -6,8 +6,8 @@
import * as assert from 'assert';
import * as path from 'path';
import * as semver from 'semver';
import { extractRegExGroups } from '../helpers/extractRegExGroups';
import { isWindows, isWindows10RS3OrNewer, isWindows10RS4OrNewer, isWindows10RS5OrNewer } from '../helpers/osVersion';
import { extractRegExGroups } from '../utils/extractRegExGroups';
import { isWindows, isWindows10RS3OrNewer, isWindows10RS4OrNewer, isWindows10RS5OrNewer } from '../utils/osVersion';
import { Platform, PlatformOS } from '../utils/platform';
import { getExposeStatements, IPlatformGeneratorInfo, PackageInfo } from './configure';

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше