Skip to content

Commit

Permalink
Fix pod details page loading (#6177)
Browse files Browse the repository at this point in the history
* Fix container tcp socket undefined error

* Update i18n
  • Loading branch information
floreks authored Jun 16, 2021
1 parent 51e6af2 commit af35423
Show file tree
Hide file tree
Showing 10 changed files with 255 additions and 247 deletions.
4 changes: 2 additions & 2 deletions i18n/de/messages.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -3677,15 +3677,15 @@
<target state="new">TCP Socket</target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/frontend/common/components/probe/template.html</context>
<context context-type="linenumber">91</context>
<context context-type="linenumber">90</context>
</context-group>
</trans-unit>
<trans-unit id="367969280410641978" datatype="html">
<source>Exec Commands </source>
<target state="new">Exec Commands </target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/frontend/common/components/probe/template.html</context>
<context context-type="linenumber">104</context>
<context context-type="linenumber">99</context>
</context-group>
</trans-unit>
<trans-unit id="4749936818577754995" datatype="html">
Expand Down
4 changes: 2 additions & 2 deletions i18n/fr/messages.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -3681,15 +3681,15 @@
<target state="new">TCP Socket</target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/frontend/common/components/probe/template.html</context>
<context context-type="linenumber">91</context>
<context context-type="linenumber">90</context>
</context-group>
</trans-unit>
<trans-unit id="367969280410641978" datatype="html">
<source>Exec Commands </source>
<target state="new">Exec Commands </target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/frontend/common/components/probe/template.html</context>
<context context-type="linenumber">104</context>
<context context-type="linenumber">99</context>
</context-group>
</trans-unit>
<trans-unit id="4749936818577754995" datatype="html">
Expand Down
4 changes: 2 additions & 2 deletions i18n/ja/messages.ja.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2631,15 +2631,15 @@
<target state="new">TCP Socket</target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/frontend/common/components/probe/template.html</context>
<context context-type="linenumber">91</context>
<context context-type="linenumber">90</context>
</context-group>
</trans-unit>
<trans-unit id="367969280410641978" datatype="html">
<source>Exec Commands </source>
<target state="new">Exec Commands </target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/frontend/common/components/probe/template.html</context>
<context context-type="linenumber">104</context>
<context context-type="linenumber">99</context>
</context-group>
</trans-unit>
<trans-unit id="322645671410395107" datatype="html">
Expand Down
4 changes: 2 additions & 2 deletions i18n/ko/messages.ko.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2921,15 +2921,15 @@
<target state="new">TCP Socket</target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/frontend/common/components/probe/template.html</context>
<context context-type="linenumber">91</context>
<context context-type="linenumber">90</context>
</context-group>
</trans-unit>
<trans-unit id="367969280410641978" datatype="html">
<source>Exec Commands </source>
<target state="new">Exec Commands </target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/frontend/common/components/probe/template.html</context>
<context context-type="linenumber">104</context>
<context context-type="linenumber">99</context>
</context-group>
</trans-unit>
<trans-unit id="322645671410395107" datatype="html">
Expand Down
454 changes: 227 additions & 227 deletions i18n/messages.xlf

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions i18n/zh-Hans/messages.zh-Hans.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2910,15 +2910,15 @@
<target state="new">TCP Socket</target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/frontend/common/components/probe/template.html</context>
<context context-type="linenumber">91</context>
<context context-type="linenumber">90</context>
</context-group>
</trans-unit>
<trans-unit id="367969280410641978" datatype="html">
<source>Exec Commands </source>
<target state="new">Exec Commands </target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/frontend/common/components/probe/template.html</context>
<context context-type="linenumber">104</context>
<context context-type="linenumber">99</context>
</context-group>
</trans-unit>
<trans-unit id="322645671410395107" datatype="html">
Expand Down
4 changes: 2 additions & 2 deletions i18n/zh-Hant-HK/messages.zh-Hant-HK.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2925,15 +2925,15 @@
<target state="new">TCP Socket</target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/frontend/common/components/probe/template.html</context>
<context context-type="linenumber">91</context>
<context context-type="linenumber">90</context>
</context-group>
</trans-unit>
<trans-unit id="367969280410641978" datatype="html">
<source>Exec Commands </source>
<target state="new">Exec Commands </target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/frontend/common/components/probe/template.html</context>
<context context-type="linenumber">104</context>
<context context-type="linenumber">99</context>
</context-group>
</trans-unit>
<trans-unit id="322645671410395107" datatype="html">
Expand Down
4 changes: 2 additions & 2 deletions i18n/zh-Hant/messages.zh-Hant.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2921,15 +2921,15 @@
<target state="new">TCP Socket</target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/frontend/common/components/probe/template.html</context>
<context context-type="linenumber">91</context>
<context context-type="linenumber">90</context>
</context-group>
</trans-unit>
<trans-unit id="367969280410641978" datatype="html">
<source>Exec Commands </source>
<target state="new">Exec Commands </target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/frontend/common/components/probe/template.html</context>
<context context-type="linenumber">104</context>
<context context-type="linenumber">99</context>
</context-group>
</trans-unit>
<trans-unit id="322645671410395107" datatype="html">
Expand Down
13 changes: 13 additions & 0 deletions src/app/frontend/common/components/probe/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,17 @@ export class ProbeComponent {

return uri;
}

get tcpSocketAddr(): string {
if (!this.probe || !this.probe.tcpSocket) {
return '';
}

let addr = this.probe.tcpSocket.host || '[host]';
if (this.probe.tcpSocket.port) {
addr += `:${this.probe.tcpSocket.port}`;
}

return addr;
}
}
7 changes: 1 addition & 6 deletions src/app/frontend/common/components/probe/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,11 @@
</ng-container>

<ng-container *ngIf="probe?.tcpSocket">

<kd-property>
<div key
i18n>TCP Socket</div>
<div value>
<div *ngIf="probe?.tcpSocket?.host as value; else defaultHost">{{ value }}</div>
<ng-template #defaultHost>[host]</ng-template>
<div *ngIf="probe?.tcpSocket?.port">
:{{probe.httpGet.port}}
</div>
<div class="kd-code-block">{{tcpSocketAddr}}</div>
</div>
</kd-property>
</ng-container>
Expand Down

0 comments on commit af35423

Please sign in to comment.