mirror of https://github.com/rancher/dashboard.git
Merge pull request #1047 from westlywright/bug.service.labels
Service Bugs
This commit is contained in:
commit
8ede12d7a9
|
|
@ -38,6 +38,11 @@ export default {
|
|||
scrollOnChange: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
|
||||
tabsUseHistoryReplace: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -168,7 +173,11 @@ export default {
|
|||
select(name/* , event */) {
|
||||
const {
|
||||
sortedTabs,
|
||||
$route: { hash: routeHash },
|
||||
tabsUseHistoryReplace,
|
||||
$route: {
|
||||
hash: routeHash,
|
||||
fullPath
|
||||
},
|
||||
} = this;
|
||||
|
||||
const selected = this.find(name);
|
||||
|
|
@ -183,7 +192,13 @@ export default {
|
|||
}
|
||||
|
||||
if (routeHash !== hashName) {
|
||||
window.location.hash = `#${ name }`;
|
||||
if (tabsUseHistoryReplace) {
|
||||
const fullPathWOHash = fullPath.includes('#') ? fullPath.split('#')[0] : fullPath;
|
||||
|
||||
window.history.replaceState(null, '', `${ fullPathWOHash }#${ name }`);
|
||||
} else {
|
||||
window.location.hash = `#${ name }`;
|
||||
}
|
||||
}
|
||||
|
||||
for ( const tab of sortedTabs ) {
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ export default {
|
|||
<th v-if="specType !== 'NodePort'" class="port-protocol">
|
||||
<t k="servicePorts.rules.protocol.label" />
|
||||
</th>
|
||||
<th v-if="specType !== 'Headless'" class="target-port">
|
||||
<th class="target-port">
|
||||
<t k="servicePorts.rules.target.label" />
|
||||
</th>
|
||||
<th v-if="specType === 'NodePort' || specType === 'LoadBalancer'" class="node-port">
|
||||
|
|
@ -173,7 +173,7 @@ export default {
|
|||
@input="queueUpdate"
|
||||
/>
|
||||
</td>
|
||||
<td v-if="specType !== 'Headless'" class="target-port">
|
||||
<td class="target-port">
|
||||
<span v-if="isView">{{ row.targetPort }}</span>
|
||||
<input
|
||||
v-else
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ export default {
|
|||
</div>
|
||||
</div>
|
||||
</Tab>
|
||||
<Tab v-else name="define-external-name" :label="t('servicesPage.ips.define')">
|
||||
<Tab v-else name="define-service-ports" :label="t('servicesPage.ips.define')">
|
||||
<ServicePorts
|
||||
v-model="value.spec.ports"
|
||||
class="col span-12"
|
||||
|
|
@ -325,7 +325,7 @@ export default {
|
|||
<div class="row labels-row">
|
||||
<Labels
|
||||
:default-container-class="'labels-and-annotations-container'"
|
||||
:value="value.spec"
|
||||
:value="value"
|
||||
:mode="mode"
|
||||
:display-side-by-side="false"
|
||||
/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue