feat(external-registry): Enhance authentication handling and update UI for external registries
This commit is contained in:
@@ -90,7 +90,7 @@ export class CloudlyViewExternalRegistries extends DeesElement {
|
||||
Name: html`${registry.data.name}${registry.data.isDefault ? html`<span class="default-badge">DEFAULT</span>` : ''}`,
|
||||
Type: html`<span class="type-badge type-${registry.data.type}">${registry.data.type.toUpperCase()}</span>`,
|
||||
URL: registry.data.url,
|
||||
Username: registry.data.username,
|
||||
Auth: registry.data.authType === 'none' ? 'Public' : (registry.data.username || 'Token Auth'),
|
||||
Namespace: registry.data.namespace || '-',
|
||||
Status: html`<span class="status-badge status-${registry.data.status || 'unverified'}">${(registry.data.status || 'unverified').toUpperCase()}</span>`,
|
||||
'Last Verified': registry.data.lastVerified ? new Date(registry.data.lastVerified).toLocaleString() : 'Never',
|
||||
@@ -130,16 +130,14 @@ export class CloudlyViewExternalRegistries extends DeesElement {
|
||||
</dees-input-text>
|
||||
<dees-input-text
|
||||
.key=${'username'}
|
||||
.label=${'Username'}
|
||||
.placeholder=${'username'}
|
||||
.required=${true}>
|
||||
.label=${'Username (only needed for basic auth)'}
|
||||
.placeholder=${'username or leave empty for token auth'}>
|
||||
</dees-input-text>
|
||||
<dees-input-text
|
||||
.key=${'password'}
|
||||
.label=${'Password / Access Token'}
|
||||
.placeholder=${'••••••••'}
|
||||
.isPasswordBool=${true}
|
||||
.required=${true}>
|
||||
.label=${'Password / Token (NPM _authToken, Docker access token, etc.)'}
|
||||
.placeholder=${'Token or password'}
|
||||
.isPasswordBool=${true}>
|
||||
</dees-input-text>
|
||||
<dees-input-text
|
||||
.key=${'namespace'}
|
||||
@@ -155,11 +153,12 @@ export class CloudlyViewExternalRegistries extends DeesElement {
|
||||
.key=${'authType'}
|
||||
.label=${'Authentication Type'}
|
||||
.options=${[
|
||||
{key: 'basic', option: 'Basic Auth'},
|
||||
{key: 'token', option: 'Token'},
|
||||
{key: 'oauth2', option: 'OAuth2'}
|
||||
{key: 'none', option: 'No Authentication (Public Registry)'},
|
||||
{key: 'basic', option: 'Basic Auth (Username + Password)'},
|
||||
{key: 'token', option: 'Token Only (NPM, GitHub, GitLab tokens)'},
|
||||
{key: 'oauth2', option: 'OAuth2 (Advanced)'}
|
||||
]}
|
||||
.value=${'basic'}>
|
||||
.value=${'none'}>
|
||||
</dees-input-dropdown>
|
||||
<dees-input-checkbox
|
||||
.key=${'isDefault'}
|
||||
@@ -242,14 +241,14 @@ export class CloudlyViewExternalRegistries extends DeesElement {
|
||||
</dees-input-text>
|
||||
<dees-input-text
|
||||
.key=${'username'}
|
||||
.label=${'Username'}
|
||||
.value=${registry.data.username}
|
||||
.required=${true}>
|
||||
.label=${'Username (only needed for basic auth)'}
|
||||
.value=${registry.data.username || ''}
|
||||
.placeholder=${'Leave empty for token auth'}>
|
||||
</dees-input-text>
|
||||
<dees-input-text
|
||||
.key=${'password'}
|
||||
.label=${'Password / Access Token (leave empty to keep current)'}
|
||||
.placeholder=${'••••••••'}
|
||||
.label=${'Password / Token (leave empty to keep current)'}
|
||||
.placeholder=${'New token or password'}
|
||||
.isPasswordBool=${true}>
|
||||
</dees-input-text>
|
||||
<dees-input-text
|
||||
@@ -266,11 +265,12 @@ export class CloudlyViewExternalRegistries extends DeesElement {
|
||||
.key=${'authType'}
|
||||
.label=${'Authentication Type'}
|
||||
.options=${[
|
||||
{key: 'basic', option: 'Basic Auth'},
|
||||
{key: 'token', option: 'Token'},
|
||||
{key: 'oauth2', option: 'OAuth2'}
|
||||
{key: 'none', option: 'No Authentication (Public Registry)'},
|
||||
{key: 'basic', option: 'Basic Auth (Username + Password)'},
|
||||
{key: 'token', option: 'Token Only (NPM, GitHub, GitLab tokens)'},
|
||||
{key: 'oauth2', option: 'OAuth2 (Advanced)'}
|
||||
]}
|
||||
.value=${registry.data.authType || 'basic'}>
|
||||
.value=${registry.data.authType || 'none'}>
|
||||
</dees-input-dropdown>
|
||||
<dees-input-checkbox
|
||||
.key=${'isDefault'}
|
||||
|
Reference in New Issue
Block a user