Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 36 additions & 22 deletions app/main/auth/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,23 @@
ng-if="eptplType=='customize'"
ng-class="{'has-error':!form1.endpoint.$valid}"
>
<input
type="text"
required
ng-model="item.eptpl"
ng-pattern="/^http(s)?\:\/\//"
class="form-control"
id="endpoint"
name="endpoint"
placeholder="http(s)://"
/>
<div
uib-tooltip="{{'https.tooltip'|translate}}"
tooltip-is-open="!form1.endpoint.$valid"
tooltip-placement="top"
style="width: 100%;"
>
<input
type="text"
required
ng-model="item.eptpl"
ng-pattern="/^http(s)?\:\/\//"
class="form-control"
id="endpoint"
name="endpoint"
placeholder="http(s)://"
/>
</div>
</div>
<!--// cname -->
<div
Expand All @@ -134,16 +141,23 @@
ng-if="eptplType=='cname'"
ng-class="{'has-error':!form1.cname.$valid}"
>
<input
type="text"
required
ng-model="item.eptplcname"
ng-pattern="/^http(s)?\:\/\//"
class="form-control"
id="cname"
name="cname"
placeholder="http(s)://"
/>
<div
uib-tooltip="{{'https.tooltip'|translate}}"
tooltip-is-open="!form1.cname.$valid"
tooltip-placement="top"
style="width: 100%;"
>
<input
type="text"
required
ng-model="item.eptplcname"
ng-pattern="/^http(s)?\:\/\//"
class="form-control"
id="cname"
name="cname"
placeholder="http(s)://"
/>
</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -187,7 +201,7 @@
</div>

<div
ng-if="item.id.indexOf('STS.')==0"
ng-if="item.id && item.id.indexOf('STS.') == 0"
class="form-group has-feedback"
ng-class="{'has-error': !form1.stoken.$valid }"
>
Expand Down Expand Up @@ -273,7 +287,7 @@

<div
class="form-group"
ng-if="item.osspath && item.eptpl.indexOf('{region}')!=-1"
ng-if="item.osspath && item.eptpl && item.eptpl.indexOf('{region}') != -1"
>
<label for="input4" class="col-sm-4 control-label">
<!-- <span class="red">*</span> -->
Expand Down
5 changes: 3 additions & 2 deletions app/main/auth/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ angular.module('web').controller('loginCtrl', [
});

$scope.$watch('item.eptpl', function(v) {
$scope.eptplType =
v.indexOf('{region}.aliyuncs.com') !== -1 ? 'default' : 'customize';
if (v) {
$scope.eptplType = v.indexOf('{region}.aliyuncs.com') !== -1 ? 'default' : 'customize';
}
});

$scope.$watch('gtab', function(v) {
Expand Down
1 change: 1 addition & 0 deletions node/i18n/en-US.js
Original file line number Diff line number Diff line change
Expand Up @@ -523,4 +523,5 @@ module.exports = {

"goto.create.role": "Go to create a role",
"restore.days.tips.7": "Validity range 1-7 days",
"https.tooltip": "Invalid URL. Must start with 'http://' or 'https://'."
};
1 change: 1 addition & 0 deletions node/i18n/ja-JP.js
Original file line number Diff line number Diff line change
Expand Up @@ -527,4 +527,5 @@ module.exports = {

"goto.create.role": "ロールの作成",
"restore.days.tips.7": "有効期限 1~7日",
"https.tooltip": "URLは'http://'または'https://'で始まる必要があります"
};
1 change: 1 addition & 0 deletions node/i18n/zh-CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -504,4 +504,5 @@ module.exports = {

"goto.create.role": "去创建角色",
"restore.days.tips.7": "有效期范围1-7天",
"https.tooltip": "URL必须以'http://'或'https://'开头"
};