Skip to content

Commit

Permalink
Merge pull request #281 from microsoft/dev
Browse files Browse the repository at this point in the history
web ui updates +resetdemo
  • Loading branch information
colbylwilliams authored Sep 7, 2021
2 parents 43f2720 + 6770db1 commit 61bac14
Show file tree
Hide file tree
Showing 48 changed files with 3,341 additions and 1,566 deletions.
1 change: 1 addition & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"Orchestrator"
],
"preLaunchTask": "buildSln",
"stopAll": true
}
],
"configurations": [
Expand Down
35 changes: 33 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"problemMatcher": "$func-watch",
"presentation": {
"panel": "dedicated",
"showReuseMessage": false,
"showReuseMessage": false
}
},
{
Expand Down Expand Up @@ -45,7 +45,7 @@
"clean",
"${workspaceFolder}/src/TeamCloud.sln",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary",
"/consoleloggerparameters:NoSummary"
],
"type": "process",
"problemMatcher": "$msCompile",
Expand All @@ -56,6 +56,37 @@
"group": "build",
"showReuseMessage": false
}
},
{
"label": "startNgrok",
"command": "ngrok",
"args": [
"http",
"--region=us",
"--hostname=teamcloud.ngrok.io",
"https://localhost:5001"
],
"isBackground": true,
"presentation": {
"panel": "dedicated",
"showReuseMessage": false
},
"problemMatcher": []
},
{
"label": "npmStart",
"command": "npm",
"args": [
"start"
],
"isBackground": true,
"presentation": {
"panel": "dedicated",
"showReuseMessage": false
},
"options": {
"cwd": "${workspaceFolder}/web"
}
}
]
}
4 changes: 2 additions & 2 deletions client/tc/azext_tc/vendored_sdks/teamcloud/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
AdapterInformationType,
CommandAuditEntityRuntimeStatus,
ComponentResourceState,
ComponentTaskResourceState,
ComponentTaskState,
ComponentTaskTemplateType,
ComponentTaskType,
ComponentTemplateType,
Expand Down Expand Up @@ -214,7 +214,7 @@
'AdapterInformationType',
'CommandAuditEntityRuntimeStatus',
'ComponentResourceState',
'ComponentTaskResourceState',
'ComponentTaskState',
'ComponentTaskTemplateType',
'ComponentTaskType',
'ComponentTemplateType',
Expand Down
20 changes: 12 additions & 8 deletions client/tc/azext_tc/vendored_sdks/teamcloud/models/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ class Component(msrest.serialization.Model):
:param resource_url:
:type resource_url: str
:param resource_state: Possible values include: "Pending", "Initializing", "Provisioning",
"Succeeded", "Failed".
"Provisioned", "Deprovisioning", "Deprovisioned", "Failed".
:type resource_state: str or ~teamcloud.models.ComponentResourceState
:param deployment_scope_id:
:type deployment_scope_id: str
Expand Down Expand Up @@ -488,9 +488,9 @@ class ComponentTask(msrest.serialization.Model):
:type output: str
:param resource_id:
:type resource_id: str
:param resource_state: Possible values include: "Pending", "Initializing", "Provisioning",
:param task_state: Possible values include: "Pending", "Initializing", "Processing",
"Succeeded", "Failed".
:type resource_state: str or ~teamcloud.models.ComponentTaskResourceState
:type task_state: str or ~teamcloud.models.ComponentTaskState
:param exit_code:
:type exit_code: int
:param id: Required.
Expand Down Expand Up @@ -518,7 +518,7 @@ class ComponentTask(msrest.serialization.Model):
'input_json': {'key': 'inputJson', 'type': 'str'},
'output': {'key': 'output', 'type': 'str'},
'resource_id': {'key': 'resourceId', 'type': 'str'},
'resource_state': {'key': 'resourceState', 'type': 'str'},
'task_state': {'key': 'taskState', 'type': 'str'},
'exit_code': {'key': 'exitCode', 'type': 'int'},
'id': {'key': 'id', 'type': 'str'},
}
Expand All @@ -541,7 +541,7 @@ def __init__(
self.input_json = kwargs.get('input_json', None)
self.output = kwargs.get('output', None)
self.resource_id = kwargs.get('resource_id', None)
self.resource_state = kwargs.get('resource_state', None)
self.task_state = kwargs.get('task_state', None)
self.exit_code = kwargs.get('exit_code', None)
self.id = kwargs['id']

Expand Down Expand Up @@ -894,13 +894,16 @@ class ComponentTemplatePermissions(msrest.serialization.Model):
:type admin: list[str]
:param owner:
:type owner: list[str]
:param adapter:
:type adapter: list[str]
"""

_attribute_map = {
'none': {'key': 'None', 'type': '[str]'},
'member': {'key': 'Member', 'type': '[str]'},
'admin': {'key': 'Admin', 'type': '[str]'},
'owner': {'key': 'Owner', 'type': '[str]'},
'adapter': {'key': 'Adapter', 'type': '[str]'},
}

def __init__(
Expand All @@ -912,6 +915,7 @@ def __init__(
self.member = kwargs.get('member', None)
self.admin = kwargs.get('admin', None)
self.owner = kwargs.get('owner', None)
self.adapter = kwargs.get('adapter', None)


class DeploymentScope(msrest.serialization.Model):
Expand Down Expand Up @@ -1158,7 +1162,7 @@ class Organization(msrest.serialization.Model):
:param resource_id:
:type resource_id: str
:param resource_state: Possible values include: "Pending", "Initializing", "Provisioning",
"Succeeded", "Failed".
"Provisioned", "Deprovisioning", "Deprovisioned", "Failed".
:type resource_state: str or ~teamcloud.models.OrganizationResourceState
:param gallery_id:
:type gallery_id: str
Expand Down Expand Up @@ -1347,7 +1351,7 @@ class Project(msrest.serialization.Model):
:param resource_id:
:type resource_id: str
:param resource_state: Possible values include: "Pending", "Initializing", "Provisioning",
"Succeeded", "Failed".
"Provisioned", "Deprovisioning", "Deprovisioned", "Failed".
:type resource_state: str or ~teamcloud.models.ProjectResourceState
:ivar vault_id:
:vartype vault_id: str
Expand Down Expand Up @@ -1692,7 +1696,7 @@ class ProjectMembership(msrest.serialization.Model):
:param project_id: Required.
:type project_id: str
:param role: Required. Possible values include: "None", "Member", "Admin", "Owner".
:param role: Required. Possible values include: "None", "Member", "Admin", "Owner", "Adapter".
:type role: str or ~teamcloud.models.ProjectMembershipRole
:param properties: Dictionary of :code:`<string>`.
:type properties: dict[str, str]
Expand Down
23 changes: 14 additions & 9 deletions client/tc/azext_tc/vendored_sdks/teamcloud/models/_models_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ class Component(msrest.serialization.Model):
:param resource_url:
:type resource_url: str
:param resource_state: Possible values include: "Pending", "Initializing", "Provisioning",
"Succeeded", "Failed".
"Provisioned", "Deprovisioning", "Deprovisioned", "Failed".
:type resource_state: str or ~teamcloud.models.ComponentResourceState
:param deployment_scope_id:
:type deployment_scope_id: str
Expand Down Expand Up @@ -556,9 +556,9 @@ class ComponentTask(msrest.serialization.Model):
:type output: str
:param resource_id:
:type resource_id: str
:param resource_state: Possible values include: "Pending", "Initializing", "Provisioning",
:param task_state: Possible values include: "Pending", "Initializing", "Processing",
"Succeeded", "Failed".
:type resource_state: str or ~teamcloud.models.ComponentTaskResourceState
:type task_state: str or ~teamcloud.models.ComponentTaskState
:param exit_code:
:type exit_code: int
:param id: Required.
Expand Down Expand Up @@ -586,7 +586,7 @@ class ComponentTask(msrest.serialization.Model):
'input_json': {'key': 'inputJson', 'type': 'str'},
'output': {'key': 'output', 'type': 'str'},
'resource_id': {'key': 'resourceId', 'type': 'str'},
'resource_state': {'key': 'resourceState', 'type': 'str'},
'task_state': {'key': 'taskState', 'type': 'str'},
'exit_code': {'key': 'exitCode', 'type': 'int'},
'id': {'key': 'id', 'type': 'str'},
}
Expand All @@ -608,7 +608,7 @@ def __init__(
input_json: Optional[str] = None,
output: Optional[str] = None,
resource_id: Optional[str] = None,
resource_state: Optional[Union[str, "ComponentTaskResourceState"]] = None,
task_state: Optional[Union[str, "ComponentTaskState"]] = None,
exit_code: Optional[int] = None,
**kwargs
):
Expand All @@ -626,7 +626,7 @@ def __init__(
self.input_json = input_json
self.output = output
self.resource_id = resource_id
self.resource_state = resource_state
self.task_state = task_state
self.exit_code = exit_code
self.id = id

Expand Down Expand Up @@ -1027,13 +1027,16 @@ class ComponentTemplatePermissions(msrest.serialization.Model):
:type admin: list[str]
:param owner:
:type owner: list[str]
:param adapter:
:type adapter: list[str]
"""

_attribute_map = {
'none': {'key': 'None', 'type': '[str]'},
'member': {'key': 'Member', 'type': '[str]'},
'admin': {'key': 'Admin', 'type': '[str]'},
'owner': {'key': 'Owner', 'type': '[str]'},
'adapter': {'key': 'Adapter', 'type': '[str]'},
}

def __init__(
Expand All @@ -1043,13 +1046,15 @@ def __init__(
member: Optional[List[str]] = None,
admin: Optional[List[str]] = None,
owner: Optional[List[str]] = None,
adapter: Optional[List[str]] = None,
**kwargs
):
super(ComponentTemplatePermissions, self).__init__(**kwargs)
self.none = none
self.member = member
self.admin = admin
self.owner = owner
self.adapter = adapter


class DeploymentScope(msrest.serialization.Model):
Expand Down Expand Up @@ -1329,7 +1334,7 @@ class Organization(msrest.serialization.Model):
:param resource_id:
:type resource_id: str
:param resource_state: Possible values include: "Pending", "Initializing", "Provisioning",
"Succeeded", "Failed".
"Provisioned", "Deprovisioning", "Deprovisioned", "Failed".
:type resource_state: str or ~teamcloud.models.OrganizationResourceState
:param gallery_id:
:type gallery_id: str
Expand Down Expand Up @@ -1544,7 +1549,7 @@ class Project(msrest.serialization.Model):
:param resource_id:
:type resource_id: str
:param resource_state: Possible values include: "Pending", "Initializing", "Provisioning",
"Succeeded", "Failed".
"Provisioned", "Deprovisioning", "Deprovisioned", "Failed".
:type resource_state: str or ~teamcloud.models.ProjectResourceState
:ivar vault_id:
:vartype vault_id: str
Expand Down Expand Up @@ -1940,7 +1945,7 @@ class ProjectMembership(msrest.serialization.Model):
:param project_id: Required.
:type project_id: str
:param role: Required. Possible values include: "None", "Member", "Admin", "Owner".
:param role: Required. Possible values include: "None", "Member", "Admin", "Owner", "Adapter".
:type role: str or ~teamcloud.models.ProjectMembershipRole
:param properties: Dictionary of :code:`<string>`.
:type properties: dict[str, str]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,16 @@ class ComponentResourceState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)
PENDING = "Pending"
INITIALIZING = "Initializing"
PROVISIONING = "Provisioning"
SUCCEEDED = "Succeeded"
PROVISIONED = "Provisioned"
DEPROVISIONING = "Deprovisioning"
DEPROVISIONED = "Deprovisioned"
FAILED = "Failed"

class ComponentTaskResourceState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
class ComponentTaskState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):

PENDING = "Pending"
INITIALIZING = "Initializing"
PROVISIONING = "Provisioning"
PROCESSING = "Processing"
SUCCEEDED = "Succeeded"
FAILED = "Failed"

Expand Down Expand Up @@ -103,7 +105,9 @@ class OrganizationResourceState(with_metaclass(_CaseInsensitiveEnumMeta, str, En
PENDING = "Pending"
INITIALIZING = "Initializing"
PROVISIONING = "Provisioning"
SUCCEEDED = "Succeeded"
PROVISIONED = "Provisioned"
DEPROVISIONING = "Deprovisioning"
DEPROVISIONED = "Deprovisioned"
FAILED = "Failed"

class ProjectMembershipRole(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
Expand All @@ -112,13 +116,16 @@ class ProjectMembershipRole(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum))
MEMBER = "Member"
ADMIN = "Admin"
OWNER = "Owner"
ADAPTER = "Adapter"

class ProjectResourceState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):

PENDING = "Pending"
INITIALIZING = "Initializing"
PROVISIONING = "Provisioning"
SUCCEEDED = "Succeeded"
PROVISIONED = "Provisioned"
DEPROVISIONING = "Deprovisioning"
DEPROVISIONED = "Deprovisioned"
FAILED = "Failed"

class RepositoryReferenceProvider(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ await resourceGroup

component.ResourceId = null;
component.ResourceUrl = null;

// ensure resource state is deleted

component.ResourceState = Model.Common.ResourceState.Deprovisioned;
Expand Down Expand Up @@ -311,7 +311,7 @@ private async Task<string> CreateResourceIdAsync(Component component)

if (string.IsNullOrEmpty(resourceGroupId))
{
// as Azure subscriptions are limited to 2000 role assignments
// as Azure subscriptions are limited to 2000 role assignments
// we pick those with the least amout of used assignments

var leastRoleAssignments = await subscriptionIds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,25 @@

namespace TeamCloud.Adapters.AzureResourceManager
{
[TeamCloudFormTitle("Subscription Source")]
[TeamCloudFormOrder(nameof(ManagementGroupId), nameof(SubscriptionIds))]
// [TeamCloudFormTitle("Subscription Source")]
// [TeamCloudFormOrder(nameof(ManagementGroupId), nameof(SubscriptionIds))]
public sealed class AzureResourceManagerData : IValidatable
{
[TeamCloudFormTitle("Subscription Source")]
public AzureResourceManagerSubscriptionSource SubscriptionSource { get; set; }

// [TeamCloudFormTitle("Subscriptions")]
// [TeamCloudFormDescription("Azure Subscriptions to use as a deployment target.")]
// public IList<string> SubscriptionIds { get; set; }

// [TeamCloudFormTitle("Management Group")]
// [TeamCloudFormDescription("Azure Management Group to use as a deployment target.")]
// public string ManagementGroupId { get; set; }
}

// [TeamCloudFormTitle("Subscription Source")]
[TeamCloudFormOrder(nameof(ManagementGroupId), nameof(SubscriptionIds))]
public sealed class AzureResourceManagerSubscriptionSource
{
[TeamCloudFormTitle("Subscriptions")]
[TeamCloudFormDescription("Azure Subscriptions to use as a deployment target.")]
Expand Down
Loading

0 comments on commit 61bac14

Please sign in to comment.