提交 f93b31eb 编写于 作者: P Peng Xiao 提交者: k8s-ci-robot

fix: fix an issue which causes hange after skip login page (#3106)

上级 d2dabdc2
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE translationbundle><translationbundle lang="en">
<translation id="961242340990264399" key="MSG_ABOUT_ABOUT_0" desc="This is a label for button displayed on about page used to open documentation in browser">Documentation</translation>
<translation id="3846688850575044887" key="MSG_ABOUT_ABOUT_0" desc="Global settings header.">About</translation>
<translation id="5634646746226609179" key="MSG_ABOUT_ABOUT_1" desc="Label \'Dashboard Version\' for the about page.">Dashboard Version</translation>
<translation id="4718120324314749596" key="MSG_ABOUT_ABOUT_2" desc="Label \'Git Commit\' for the about page.">Git Commit</translation>
<translation id="5788105450172886273" key="MSG_ABOUT_ABOUT_3" desc="This is a label for button displayed on about page used to send feedback to GitHub new issue.">Send feedback</translation>
<translation id="1212688278537853620" key="MSG_ABOUT_ABOUT_3" desc="Project description on about page.">General-purpose web UI for Kubernetes clusters</translation>
<translation id="4249662097435421699" key="MSG_ABOUT_ABOUT_4" desc="This is the copyright statement displayed on the about page">Copyright 2015-{{ $ctrl.latestCopyrightYear}} The Kubernetes Authors.</translation>
<translation id="4171916442768740608" key="MSG_ABOUT_ABOUT_5" desc="This is the creator reference on the footer of the about page"> Kubernetes Dashboard is made possible by the Dashboard &lt;a href="https://github.com/kubernetes/dashboard/graphs/contributors"&gt;community&lt;/a&gt; as an &lt;a href="https://github.com/kubernetes/dashboard"&gt;open source project&lt;/a&gt;. </translation>
<translation id="4426231252111230009" key="MSG_ABOUT_ABOUT_6" desc="Dashboard moto on the about page, just below the header">General-Purpose Web UI for Kubernetes Clusters</translation>
<translation id="908641021194885494" key="MSG_ABOUT_ABOUT_5" desc="Creator reference on the footer of the about page.">Kubernetes Dashboard is made possible by the Dashboard &lt;a href="https://github.com/kubernetes/dashboard/graphs/contributors"&gt;community&lt;/a&gt; as an &lt;a href="https://github.com/kubernetes/dashboard"&gt;open source project&lt;/a&gt;.</translation>
<translation id="2365002697773543715" key="MSG_ABOUT_ACTIONBAR_0" desc="Tooltip of button linking to documentation.">Read Kubernetes Dashboard documentation</translation>
<translation id="6381847044207707182" key="MSG_ABOUT_ACTIONBAR_1" desc="Label of button linking to documentation.">Documentation</translation>
<translation id="2035796754621111890" key="MSG_ABOUT_ACTIONBAR_2" desc="Tooltip of button linking to new issue on GitHub used to send feedback.">Create new issue on GitHub</translation>
<translation id="5625550638633956281" key="MSG_ABOUT_ACTIONBAR_3" desc="Label of button linking to new issue on GitHub used to send feedback.">Send feedback</translation>
<translation id="6783150167357318030" key="MSG_ACTION_BAR_DELETE_TOOLTIP" desc="Generic &quot;Delete some resource&quot; tooltip text which appears over the delete icon on the global action bar.">Delete <ph name="RESOURCE_NAME"/></translation>
<translation id="1421031463694814701" key="MSG_ACTION_BAR_EDIT_TOOLTIP" desc="Generic &quot;Edit some resource&quot; tooltip text which appears over the edit icon on the global action bar.">Edit <ph name="RESOURCE_NAME"/></translation>
<translation id="1024358167652076581" key="MSG_ALL_NAMESPACES" desc="Text for dropdown item that indicates that no namespace was selected">All namespaces</translation>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE translationbundle><translationbundle lang="ja">
<translation id="961242340990264399" key="MSG_ABOUT_ABOUT_0" desc="This is a label for button displayed on about page used to open documentation in browser">ドキュメント</translation>
<translation id="3846688850575044887" key="MSG_ABOUT_ABOUT_0" desc="Global settings header.">About</translation>
<translation id="5634646746226609179" key="MSG_ABOUT_ABOUT_1" desc="Label \'Dashboard Version\' for the about page.">Dashboard バージョン</translation>
<translation id="4718120324314749596" key="MSG_ABOUT_ABOUT_2" desc="Label \'Git Commit\' for the about page.">Gitコミット</translation>
<translation id="5788105450172886273" key="MSG_ABOUT_ABOUT_3" desc="This is a label for button displayed on about page used to send feedback to GitHub new issue.">フィードバックを送信</translation>
<translation id="1212688278537853620" key="MSG_ABOUT_ABOUT_3" desc="Project description on about page.">General-purpose web UI for Kubernetes clusters</translation>
<translation id="4249662097435421699" key="MSG_ABOUT_ABOUT_4" desc="This is the copyright statement displayed on the about page">Copyright 2015-{{ $ctrl.latestCopyrightYear}} The Kubernetes Authors.</translation>
<translation id="4171916442768740608" key="MSG_ABOUT_ABOUT_5" desc="This is the creator reference on the footer of the about page"> Kubernetes Dashboard is made possible by the Dashboard &lt;a href="https://github.com/kubernetes/dashboard/graphs/contributors"&gt;community&lt;/a&gt; as an &lt;a href="https://github.com/kubernetes/dashboard"&gt;open source project&lt;/a&gt;. </translation>
<translation id="4426231252111230009" key="MSG_ABOUT_ABOUT_6" desc="Dashboard moto on the about page, just below the header">Kubernetes クラスターのための多目的ウェブUI</translation>
<translation id="908641021194885494" key="MSG_ABOUT_ABOUT_5" desc="Creator reference on the footer of the about page.">Kubernetes Dashboard is made possible by the Dashboard &lt;a href="https://github.com/kubernetes/dashboard/graphs/contributors"&gt;community&lt;/a&gt; as an &lt;a href="https://github.com/kubernetes/dashboard"&gt;open source project&lt;/a&gt;.</translation>
<translation id="2365002697773543715" key="MSG_ABOUT_ACTIONBAR_0" desc="Tooltip of button linking to documentation.">Read Kubernetes Dashboard documentation</translation>
<translation id="6381847044207707182" key="MSG_ABOUT_ACTIONBAR_1" desc="Label of button linking to documentation.">Documentation</translation>
<translation id="2035796754621111890" key="MSG_ABOUT_ACTIONBAR_2" desc="Tooltip of button linking to new issue on GitHub used to send feedback.">Create new issue on GitHub</translation>
<translation id="5625550638633956281" key="MSG_ABOUT_ACTIONBAR_3" desc="Label of button linking to new issue on GitHub used to send feedback.">Send feedback</translation>
<translation id="6783150167357318030" key="MSG_ACTION_BAR_DELETE_TOOLTIP" desc="Generic &quot;Delete some resource&quot; tooltip text which appears over the delete icon on the global action bar.">
<ph name="RESOURCE_NAME"> を削除</ph>
</translation>
......@@ -123,8 +126,6 @@
<translation id="7353491667260402390" key="MSG_COMMON_COMPONENTS_RESOURCEDETAIL_INFOCARD_2" desc="Label \'Labels\' for a resource.">ラベル</translation>
<translation id="5872558793526944357" key="MSG_COMMON_COMPONENTS_RESOURCEDETAIL_INFOCARD_3" desc="Label \'Annotations\' for a resource.">注釈</translation>
<translation id="7069230303117205966" key="MSG_COMMON_COMPONENTS_RESOURCEDETAIL_INFOCARD_4" desc="Label \'Creation Time\' for a resource.">作成時間</translation>
<translation id="5724590208757461876" key="MSG_COMMON_COMPONENTS_SCALE_SCALE_0" desc="Action \'Scale\' on the dropdown menu on resource list page.">Scale</translation>
<translation id="2699323907720130275" key="MSG_COMMON_COMPONENTS_SCALE_SCALE_1" desc="Tooltip for the \'scale\' button on the action bar on a resource details view.">Edit number of pods</translation>
<translation id="5724590208757461876" key="MSG_COMMON_COMPONENTS_SCALE_SCALE_0" desc="Action \'Scale\' on the drop down menu on resource list page.">Scale</translation>
<translation id="2699323907720130275" key="MSG_COMMON_COMPONENTS_SCALE_SCALE_1" desc="Tooltip for the \'scale\' button on the action bar on a resource details view.">ポッド数を編集</translation>
<translation id="8982112402145698888" key="MSG_COMMON_COMPONENTS_SCALE_SCALE_2" desc="Tooltip for the \'Scale\' button on the action bar on a resource details view.">Scale</translation>
......@@ -414,8 +415,6 @@
<translation id="7869641598803414323" key="MSG_DESIRED_PODS_MSG" desc="Satisfies a way to make normal binding in angularjs to pass in google closure compiler.">
<ph name="DESIRED_PODS"> の要求</ph>
</translation>
<translation id="4942061082776173364" key="MSG_ENCRYPTION_KEY_CHANGED" desc="Text shown when saved token could not be decrypted by backend.">Session expired. Please log in again.</translation>
<translation id="778882191405410811" key="MSG_ENDPOINTS_WARNING_LABEL" desc="Label 'Warning' for the endpoint selection dropdown.">Warning</translation>
<translation id="4942061082776173364" key="MSG_ENCRYPTION_KEY_CHANGED" desc="Text shown when saved token could not be decrypted by backend.">セッションの有効期限が切れました。もう一度ログインしてください。</translation>
<translation id="778882191405410811" key="MSG_ENDPOINTS_WARNING_LABEL" desc="Label 'Warning' for the endpoint selection drop-down.">警告</translation>
<translation id="4983649641173165689" key="MSG_ENDPOINT_CARDLIST_0" desc="Label which appears above the list of such objects.">エンドポイント</translation>
......@@ -435,9 +434,6 @@
<translation id="2318056046996927961" key="MSG_EVENTS_CARDLIST_5" desc="Label \'First seen\' for the respective column of the events table (events list page).">初回</translation>
<translation id="8546806166673222480" key="MSG_EVENTS_CARDLIST_6" desc="Label \'Last seen\' for the respective column of the events table (events list page).">直近</translation>
<translation id="8384910280515978185" key="MSG_EVENTS_CARDLIST_8" desc="User help on the events page when no events are to be displayed.">すべてのイベントが期限切れの可能性があります。</translation>
<translation id="4919061456654775514" key="MSG_EVENTS_WARNING_LABEL" desc="Label 'Warning' for the event selection dropdown.">警告</translation>
<translation id="6870755296074399906" key="MSG_FORBIDDEN_ERROR" desc="Text shown on internal error page when user is forbidden to access some page.">You do not have required permissions to access this page.</translation>
<translation id="360219762714344048" key="MSG_FORBIDDEN_RESOURCE_ERROR" desc="Error message shown when user does not have access to given resource.">You do not have required permissions to access this resource.</translation>
<translation id="4919061456654775514" key="MSG_EVENTS_WARNING_LABEL" desc="Label 'Warning' for the event selection drop-down.">警告</translation>
<translation id="6870755296074399906" key="MSG_FORBIDDEN_ERROR" desc="Text shown on internal error page when user is forbidden to access some page.">このページにアクセスするために必要な権限がありません。</translation>
<translation id="360219762714344048" key="MSG_FORBIDDEN_RESOURCE_ERROR" desc="Error message shown when user does not have access to given resource.">このリソースにアクセスするために必要な権限がありません。</translation>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE translationbundle><translationbundle lang="zh-tw">
<translation id="961242340990264399" key="MSG_ABOUT_ABOUT_0" desc="This is a label for button displayed on about page used to open documentation in browser">官方文件</translation>
<translation id="3846688850575044887" key="MSG_ABOUT_ABOUT_0" desc="Global settings header.">About</translation>
<translation id="5634646746226609179" key="MSG_ABOUT_ABOUT_1" desc="Label \'Dashboard Version\' for the about page.">儀表板版本</translation>
<translation id="4718120324314749596" key="MSG_ABOUT_ABOUT_2" desc="Label \'Git Commit\' for the about page.">Git 提交</translation>
<translation id="5788105450172886273" key="MSG_ABOUT_ABOUT_3" desc="This is a label for button displayed on about page used to send feedback to GitHub new issue.">發送回饋</translation>
<translation id="1212688278537853620" key="MSG_ABOUT_ABOUT_3" desc="Project description on about page.">General-purpose web UI for Kubernetes clusters</translation>
<translation id="4249662097435421699" key="MSG_ABOUT_ABOUT_4" desc="This is the copyright statement displayed on the about page">版權所有 2015-{{ $ctrl.latestCopyrightYear}} Kubernetes 團隊</translation>
<translation id="4171916442768740608" key="MSG_ABOUT_ABOUT_5" desc="This is the creator reference on the footer of the about page"> Kubernetes 儀表板是由&lt;a href="https://github.com/kubernetes/dashboard/graphs/contributors"&gt;社區&lt;/a&gt;作為&lt;a href="https://github.com/kubernetes/dashboard"&gt;開放式原始碼專案&lt;/a&gt;打造而成 </translation>
<translation id="4426231252111230009" key="MSG_ABOUT_ABOUT_6" desc="Dashboard moto on the about page, just below the header">Kubernetes 叢集通用網頁介面</translation>
<translation id="908641021194885494" key="MSG_ABOUT_ABOUT_5" desc="Creator reference on the footer of the about page.">Kubernetes Dashboard is made possible by the Dashboard &lt;a href="https://github.com/kubernetes/dashboard/graphs/contributors"&gt;community&lt;/a&gt; as an &lt;a href="https://github.com/kubernetes/dashboard"&gt;open source project&lt;/a&gt;.</translation>
<translation id="2365002697773543715" key="MSG_ABOUT_ACTIONBAR_0" desc="Tooltip of button linking to documentation.">Read Kubernetes Dashboard documentation</translation>
<translation id="6381847044207707182" key="MSG_ABOUT_ACTIONBAR_1" desc="Label of button linking to documentation.">Documentation</translation>
<translation id="2035796754621111890" key="MSG_ABOUT_ACTIONBAR_2" desc="Tooltip of button linking to new issue on GitHub used to send feedback.">Create new issue on GitHub</translation>
<translation id="5625550638633956281" key="MSG_ABOUT_ACTIONBAR_3" desc="Label of button linking to new issue on GitHub used to send feedback.">Send feedback</translation>
<translation id="6783150167357318030" key="MSG_ACTION_BAR_DELETE_TOOLTIP" desc="Generic &quot;Delete some resource&quot; tooltip text which appears over the delete icon on the global action bar.">刪除<ph name="RESOURCE_NAME"/></translation>
<translation id="1421031463694814701" key="MSG_ACTION_BAR_EDIT_TOOLTIP" desc="Generic &quot;Edit some resource&quot; tooltip text which appears over the edit icon on the global action bar.">編輯<ph name="RESOURCE_NAME"/></translation>
<translation id="1024358167652076581" key="MSG_ALL_NAMESPACES" desc="Text for dropdown item that indicates that no namespace was selected">全部命名空間</translation>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE translationbundle><translationbundle lang="zh">
<translation id="961242340990264399" key="MSG_ABOUT_ABOUT_0" desc="This is a label for button displayed on about page used to open documentation in browser">文档</translation>
<translation id="3846688850575044887" key="MSG_ABOUT_ABOUT_0" desc="Global settings header.">About</translation>
<translation id="5634646746226609179" key="MSG_ABOUT_ABOUT_1" desc="Label \'Dashboard Version\' for the about page.">仪表板版本</translation>
<translation id="4718120324314749596" key="MSG_ABOUT_ABOUT_2" desc="Label \'Git Commit\' for the about page.">Git 提交</translation>
<translation id="5788105450172886273" key="MSG_ABOUT_ABOUT_3" desc="This is a label for button displayed on about page used to send feedback to GitHub new issue.">发送反馈</translation>
<translation id="1212688278537853620" key="MSG_ABOUT_ABOUT_3" desc="Project description on about page.">General-purpose web UI for Kubernetes clusters</translation>
<translation id="4249662097435421699" key="MSG_ABOUT_ABOUT_4" desc="This is the copyright statement displayed on the about page">版权所有 2015-{{ $ctrl.latestCopyrightYear}} Kubernetes 团队</translation>
<translation id="4171916442768740608" key="MSG_ABOUT_ABOUT_5" desc="This is the creator reference on the footer of the about page"> Kubernetes 仪表板由&lt;a href="https://github.com/kubernetes/dashboard/graphs/contributors"&gt;社区&lt;/a&gt;作为&lt;a href="https://github.com/kubernetes/dashboard"&gt;开源项目&lt;/a&gt;打造</translation>
<translation id="4426231252111230009" key="MSG_ABOUT_ABOUT_6" desc="Dashboard moto on the about page, just below the header">Kubernetes 集群通用网页界面</translation>
<translation id="908641021194885494" key="MSG_ABOUT_ABOUT_5" desc="Creator reference on the footer of the about page.">Kubernetes Dashboard is made possible by the Dashboard &lt;a href="https://github.com/kubernetes/dashboard/graphs/contributors"&gt;community&lt;/a&gt; as an &lt;a href="https://github.com/kubernetes/dashboard"&gt;open source project&lt;/a&gt;.</translation>
<translation id="2365002697773543715" key="MSG_ABOUT_ACTIONBAR_0" desc="Tooltip of button linking to documentation.">Read Kubernetes Dashboard documentation</translation>
<translation id="6381847044207707182" key="MSG_ABOUT_ACTIONBAR_1" desc="Label of button linking to documentation.">Documentation</translation>
<translation id="2035796754621111890" key="MSG_ABOUT_ACTIONBAR_2" desc="Tooltip of button linking to new issue on GitHub used to send feedback.">Create new issue on GitHub</translation>
<translation id="5625550638633956281" key="MSG_ABOUT_ACTIONBAR_3" desc="Label of button linking to new issue on GitHub used to send feedback.">Send feedback</translation>
<translation id="6783150167357318030" key="MSG_ACTION_BAR_DELETE_TOOLTIP" desc="Generic &quot;Delete some resource&quot; tooltip text which appears over the delete icon on the global action bar.">删除 <ph name="RESOURCE_NAME"/></translation>
<translation id="1421031463694814701" key="MSG_ACTION_BAR_EDIT_TOOLTIP" desc="Generic &quot;Edit some resource&quot; tooltip text which appears over the edit icon on the global action bar.">编辑 <ph name="RESOURCE_NAME"/></translation>
<translation id="1024358167652076581" key="MSG_ALL_NAMESPACES" desc="Text for dropdown item that indicates that no namespace was selected">所有命名空间</translation>
......@@ -380,7 +383,7 @@
<translation id="4656960526536446359" key="MSG_DEPLOY_DEPLOYFROMSETTINGS_DEPLOYLABEL_DEPLOYLABEL_2" desc="This warning appears when the key name of a specified kubernetes label (on the deploy page) does not match the required pattern.">标签键名称必须是以'-'、'_'或者'.'分割的英文字母组成。可选的,名称可以添加 DNS 子域名 + '/' 前缀。</translation>
<translation id="868107490307868628" key="MSG_DEPLOY_DEPLOYFROMSETTINGS_DEPLOYLABEL_DEPLOYLABEL_3" desc="This warning appears when the key prefix of a specified kubernetes label (on the deploy page) is too long.">前缀不能超过253个字符。</translation>
<translation id="8219339592121454206" key="MSG_DEPLOY_DEPLOYFROMSETTINGS_DEPLOYLABEL_DEPLOYLABEL_4" desc="This warning appears when the value of a specified kubernetes label (on the deploy page) does not match the required pattern.">标签键名称不能超过63个字符。</translation>
<translation id="6184873524982090439" key="MSG_DEPLOY_DEPLOYFROMSETTINGS_DEPLOYLABEL_DEPLOYLABEL_5" desc="This warning appears when the value of a specified kubernetes label (on the deploy page) does not match the required pattern.">>标签值必须是以'-'、'_'或者'.'分割的英文字母组成。</translation>
<translation id="6184873524982090439" key="MSG_DEPLOY_DEPLOYFROMSETTINGS_DEPLOYLABEL_DEPLOYLABEL_5" desc="This warning appears when the value of a specified kubernetes label (on the deploy page) does not match the required pattern.">&gt;标签值必须是以'-'、'_'或者'.'分割的英文字母组成。</translation>
<translation id="2714838877898173869" key="MSG_DEPLOY_DEPLOYFROMSETTINGS_DEPLOYLABEL_DEPLOYLABEL_6" desc="This warning appears when the value of a specified kubernetes label (on the deploy page) is too long.">标签值不能超过253个字符。</translation>
<translation id="4021721764621979422" key="MSG_DEPLOY_DEPLOYFROMSETTINGS_ENVIRONMENTVARIABLES_ENVIRONMENTVARIABLES_0" desc="Title of the Environment Variables section on the deploy page.">环境变量</translation>
<translation id="263038526347988238" key="MSG_DEPLOY_DEPLOYFROMSETTINGS_ENVIRONMENTVARIABLES_ENVIRONMENTVARIABLES_1" desc="Label &quot;Name&quot; which appears as a placeholder for the input of an environment variable name on the deploy page.">名称</translation>
......
......@@ -33,16 +33,14 @@ export class ChromeController {
*/
constructor($state, $timeout, $transitions, $resource, $sce) {
/**
* By default this is true to show loading spinner for the first page.
* @export {boolean}
*/
this.showLoadingSpinner = true;
this.showLoadingSpinner = false;
/**
* By default this is true to show loading for the first page.
* @export {boolean}
*/
this.loading = true;
this.loading = false;
/** @private {!ui.router.$state} */
this.state_ = $state;
......
......@@ -42,22 +42,25 @@ export default angular
*/
function ensureNamespaceParamPresent($location, $transitions, $state) {
/**
* Helper function which replaces namespace URL search param when the given namespace is
* undefined.
* @param {string|undefined} namespace
* @returns {boolean}
* Helper function which redirect namespace param when the given namespace
* in the transition is undefined.
* @returns {boolean|angular.$q.Promise}
*/
function replaceUrlIfNeeded(namespace) {
if (namespace === undefined && !!$state.transition &&
$state.transition.to().name !== loginState) {
$location.search(namespaceParam, DEFAULT_NAMESPACE);
$location.replace();
return false;
function changeNamespaceParamIfNeeded() {
const transition = $state.transition;
if (!transition) {
return true;
}
const namespace = transition.params()[namespaceParam];
if (namespace === undefined && transition.to().name !== loginState) {
return $state.target(transition.to(), {[namespaceParam]: DEFAULT_NAMESPACE});
}
return true;
}
$transitions.onEnter({}, () => {
return replaceUrlIfNeeded($location.search()[namespaceParam]);
return changeNamespaceParamIfNeeded();
});
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册