Modify auth mode icon to jump to a new page only in OIDC mode

for 7622: click the icon of auth mode when value is database in configuration page will go to a wrong pagee

Signed-off-by: Yogi_Wang <yawang@vmware.com>
This commit is contained in:
Yogi_Wang 2019-05-06 19:14:00 +08:00
parent b0a287ee9a
commit 783b6e3aea
2 changed files with 5 additions and 2 deletions

View File

@ -12,8 +12,8 @@
<option value="oidc_auth">{{'CONFIG.AUTH_MODE_OIDC' | translate }}</option> <option value="oidc_auth">{{'CONFIG.AUTH_MODE_OIDC' | translate }}</option>
</select> </select>
</div> </div>
<a href="{{currentConfig?.auth_mode?.value==='oidc_auth'?'https://openid.net/connect/':'javascript:void(0)'}}" <a href="{{currentConfig?.auth_mode?.value==='oidc_auth'?'https://openid.net/connect/':'/'}}"
target="{{currentConfig?.auth_mode?.value==='oidc_auth'?'_blank':''}}" role="tooltip" target="{{currentConfig?.auth_mode?.value==='oidc_auth'?'_blank':''}}" role="tooltip" (click)="allowGoOidc($event)"
aria-haspopup="true" class="tooltip tooltip-lg tooltip-top-right top-1"> aria-haspopup="true" class="tooltip tooltip-lg tooltip-top-right top-1">
<clr-icon shape="info-circle" size="24" class="info-tips-icon"></clr-icon> <clr-icon shape="info-circle" size="24" class="info-tips-icon"></clr-icon>
<span class="tooltip-content">{{'CONFIG.TOOLTIP.AUTH_MODE' | translate}}</span> <span class="tooltip-content">{{'CONFIG.TOOLTIP.AUTH_MODE' | translate}}</span>

View File

@ -251,5 +251,8 @@ export class ConfigurationAuthComponent implements OnChanges, OnInit {
console.error('Nothing changed'); console.error('Nothing changed');
} }
} }
public allowGoOidc(event) {
return this.currentConfig.auth_mode && this.currentConfig.auth_mode.value === 'oidc_auth';
}
} }