mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-05 05:36:05 +08:00
Compare commits
39
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c562dd73ba | ||
|
|
1cd5e5ca7d | ||
|
|
1aaa8f71c4 | ||
|
|
003a09d0a9 | ||
|
|
f08e632aad | ||
|
|
df1d7001bc | ||
|
|
41f78c83a7 | ||
|
|
f1a53311ce | ||
|
|
e0c6e905a9 | ||
|
|
1852e434f1 | ||
|
|
77c085d3a7 | ||
|
|
9dbe7d9015 | ||
|
|
3f19494d98 | ||
|
|
296601d38c | ||
|
|
5d9ba584b8 | ||
|
|
eab4ba3d0f | ||
|
|
4e5320dc72 | ||
|
|
ba7092f400 | ||
|
|
eec7c3573d | ||
|
|
f0014cc627 | ||
|
|
9aa311a7e3 | ||
|
|
013d9f1d7e | ||
|
|
8c044ba44c | ||
|
|
7b8592e07d | ||
|
|
53d2e67b4f | ||
|
|
1d146a40bd | ||
|
|
11d6943596 | ||
|
|
7b754457ec | ||
|
|
2cb838eded | ||
|
|
bdcb34ab14 | ||
|
|
8daf44b3f6 | ||
|
|
8044e74102 | ||
|
|
264d65cc6d | ||
|
|
342a82c8e0 | ||
|
|
e7cd5cc4b0 | ||
|
|
cf405be71e | ||
|
|
911d30d7ba | ||
|
|
1b4bfa0962 | ||
|
|
d0f6f18a8a |
@@ -14,4 +14,3 @@ dist-pkg
|
|||||||
pkg/harvester/index.ts
|
pkg/harvester/index.ts
|
||||||
pkg/harvester/store/*
|
pkg/harvester/store/*
|
||||||
scripts/pkgfile.js
|
scripts/pkgfile.js
|
||||||
tmp
|
|
||||||
|
|||||||
@@ -3,4 +3,5 @@ addReviewers: true
|
|||||||
numberOfReviewers: 0
|
numberOfReviewers: 0
|
||||||
reviewers:
|
reviewers:
|
||||||
- a110605
|
- a110605
|
||||||
- houhoucoop
|
- houhoucoop
|
||||||
|
- NickChungSUSE
|
||||||
+31
-12
@@ -1,14 +1,33 @@
|
|||||||
pull_request_rules:
|
pull_request_rules:
|
||||||
- name: Ask to resolve conflict
|
- name: Automatically open backport PR to release-harvester-v1.5
|
||||||
conditions:
|
conditions:
|
||||||
- conflict
|
- base=main
|
||||||
actions:
|
- label="require backport 1.5"
|
||||||
comment:
|
actions:
|
||||||
message: This pull request is now in conflict. Could you fix it @{{author}}? 🙏
|
backport:
|
||||||
|
branches:
|
||||||
|
- "release-harvester-v1.5"
|
||||||
|
assignees:
|
||||||
|
- "{{ author }}"
|
||||||
|
labels:
|
||||||
|
- "v1.5 backport PR"
|
||||||
|
|
||||||
commands_restrictions:
|
- name: Automatically open backport PR to release-harvester-v1.0
|
||||||
backport:
|
conditions:
|
||||||
conditions:
|
- base=main
|
||||||
- or:
|
- label="require backport 1.0"
|
||||||
- sender-permission>=write
|
actions:
|
||||||
- sender=github-actions[bot]
|
backport:
|
||||||
|
branches:
|
||||||
|
- "release-harvester-v1.0"
|
||||||
|
assignees:
|
||||||
|
- "{{ author }}"
|
||||||
|
labels:
|
||||||
|
- "v1.0 backport PR"
|
||||||
|
|
||||||
|
- name: Ask to resolve conflict
|
||||||
|
conditions:
|
||||||
|
- conflict
|
||||||
|
actions:
|
||||||
|
comment:
|
||||||
|
message: This pull request is now in conflict. Could you fix it @{{author}}? 🙏
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
# .github/release.yml
|
|
||||||
changelog:
|
|
||||||
categories:
|
|
||||||
- title: Features
|
|
||||||
labels:
|
|
||||||
- feat
|
|
||||||
- title: Bug Fixes
|
|
||||||
labels:
|
|
||||||
- fix
|
|
||||||
- title: Dependencies
|
|
||||||
labels:
|
|
||||||
- deps
|
|
||||||
- title: Performance
|
|
||||||
labels:
|
|
||||||
- perf
|
|
||||||
- title: Documentation
|
|
||||||
labels:
|
|
||||||
- docs
|
|
||||||
- title: Style
|
|
||||||
labels:
|
|
||||||
- style
|
|
||||||
- title: Build & Continuous Integration
|
|
||||||
labels:
|
|
||||||
- build
|
|
||||||
- ci
|
|
||||||
- title: Security
|
|
||||||
labels:
|
|
||||||
- security
|
|
||||||
- title: Tests
|
|
||||||
labels:
|
|
||||||
- test
|
|
||||||
- title: Refactoring
|
|
||||||
labels:
|
|
||||||
- refactor
|
|
||||||
- title: Chores
|
|
||||||
labels:
|
|
||||||
- chore
|
|
||||||
- title: Others
|
|
||||||
labels:
|
|
||||||
- other
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
name: "[PR Management] Request Backport via Mergify"
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request_target:
|
|
||||||
types: [closed]
|
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
comment-backport:
|
|
||||||
if: github.event.pull_request.merged == true
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: ${{ github.base_ref }}
|
|
||||||
|
|
||||||
- name: Post Mergify backport command
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
pr_number=${{ github.event.pull_request.number }}
|
|
||||||
repo="${{ github.repository }}"
|
|
||||||
|
|
||||||
labels_json='${{ toJson(github.event.pull_request.labels.*.name) }}'
|
|
||||||
labels=$(echo "$labels_json" | jq -r '.[] // empty')
|
|
||||||
|
|
||||||
echo "Labels on PR: $labels"
|
|
||||||
|
|
||||||
matches=$(echo "$labels" | grep -oE '^require backport/v[0-9]+\.[0-9]+$' || true)
|
|
||||||
|
|
||||||
if [[ -z "$matches" ]]; then
|
|
||||||
echo "No back‑port labels found — skipping."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
branches=$(echo "$matches" \
|
|
||||||
| sed -E 's/^require backport\/v/release-harvester-v/' \
|
|
||||||
| sort -u | tr '\n' ' ')
|
|
||||||
branches=${branches%% }
|
|
||||||
|
|
||||||
cmd="@Mergifyio backport $branches"
|
|
||||||
echo "Posting Mergify command: $cmd"
|
|
||||||
gh pr comment "$pr_number" --repo "$repo" --body "$cmd"
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
name: "[PR Management] Add PR Label"
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request_target:
|
|
||||||
types: [opened, reopened, edited]
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- 'release-harvester-v*'
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
auto-assign-pr-label:
|
|
||||||
if: github.event.pull_request.draft == false
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: ${{ github.base_ref }}
|
|
||||||
- name: Setup Nodejs and yarn install
|
|
||||||
uses: ./.github/actions/setup
|
|
||||||
- name: Set PR label
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
PR_LABEL=$(node ./scripts/extract-release-label.mjs "${{ github.event.pull_request.title }}")
|
|
||||||
echo "PR_LABEL = $PR_LABEL"
|
|
||||||
gh pr edit ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --add-label "$PR_LABEL"
|
|
||||||
@@ -7,7 +7,6 @@ on:
|
|||||||
- main
|
- main
|
||||||
- 'release-*'
|
- 'release-*'
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, reopened, edited, synchronize]
|
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- 'release-*'
|
- 'release-*'
|
||||||
@@ -23,11 +22,6 @@ jobs:
|
|||||||
- name: Run tests
|
- name: Run tests
|
||||||
uses: ./.github/actions/lint
|
uses: ./.github/actions/lint
|
||||||
|
|
||||||
- name: Validate PR title lint
|
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
shell: bash
|
|
||||||
run: echo "${{ github.event.pull_request.title }}" | npx commitlint
|
|
||||||
|
|
||||||
- name: Validate commit messages
|
- name: Validate commit messages
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -138,6 +138,7 @@ To validate changes in a release series, switch to the appropriate `vX.Y-head` b
|
|||||||
- Examples:
|
- Examples:
|
||||||
- Test `1.0.x` series → `v1.0-head`
|
- Test `1.0.x` series → `v1.0-head`
|
||||||
- Test `1.5.x` series → `v1.5-head`
|
- Test `1.5.x` series → `v1.5-head`
|
||||||
|
- Test `1.6.x` series → `v1.6-head`
|
||||||
|
|
||||||
**Steps:**
|
**Steps:**
|
||||||
1. Navigate to **Rancher UI** → **Local** → **App** → **Repositories**
|
1. Navigate to **Rancher UI** → **Local** → **App** → **Repositories**
|
||||||
|
|||||||
+2
-3
@@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "harvester-ui-extension",
|
"name": "harvester-ui-extension",
|
||||||
"version": "1.7.0-dev",
|
"version": "1.6.0-rc5",
|
||||||
"private": false,
|
"private": false,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=20.0.0"
|
"node": ">=20.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/plugin-transform-class-static-block": "7.26.0",
|
"@babel/plugin-transform-class-static-block": "7.26.0",
|
||||||
"@rancher/shell": "3.0.5-rc.8",
|
"@rancher/shell": "3.0.5-rc.7",
|
||||||
"cache-loader": "^4.1.0",
|
"cache-loader": "^4.1.0",
|
||||||
"color": "4.2.3",
|
"color": "4.2.3",
|
||||||
"ip": "2.0.1",
|
"ip": "2.0.1",
|
||||||
@@ -46,7 +46,6 @@
|
|||||||
"prepare": "husky"
|
"prepare": "husky"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/load": "^19.8.1",
|
|
||||||
"@commitlint/cli": "^19.8.1",
|
"@commitlint/cli": "^19.8.1",
|
||||||
"@commitlint/config-conventional": "^19.8.1",
|
"@commitlint/config-conventional": "^19.8.1",
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
softReboot() {
|
softReboot() {
|
||||||
this.vmResource.doSoftReboot();
|
this.vmResource.softrebootVM();
|
||||||
},
|
},
|
||||||
|
|
||||||
showKeysModal() {
|
showKeysModal() {
|
||||||
@@ -372,12 +372,3 @@ export default {
|
|||||||
background: rgb(40, 40, 40);
|
background: rgb(40, 40, 40);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.vm-console .v-popper__arrow-container {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.vm-console .v-popper__popper{
|
|
||||||
margin-top: 8px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -48,9 +48,7 @@ const FEATURE_FLAGS = {
|
|||||||
'cpuMemoryHotplug',
|
'cpuMemoryHotplug',
|
||||||
'cdiSettings',
|
'cdiSettings',
|
||||||
'vmCloneRunStrategy',
|
'vmCloneRunStrategy',
|
||||||
],
|
]
|
||||||
'v1.6.1': [],
|
|
||||||
'v1.7.0': []
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const generateFeatureFlags = () => {
|
const generateFeatureFlags = () => {
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import { HCI } from '../types';
|
|
||||||
|
|
||||||
// TODO: delete this not used variable
|
// TODO: delete this not used variable
|
||||||
export const MemoryUnit = [{
|
export const MemoryUnit = [{
|
||||||
label: 'Mi',
|
label: 'Mi',
|
||||||
@@ -83,14 +81,3 @@ export const CSI_SECRETS = {
|
|||||||
CSI_NODE_STAGE_SECRET_NAME: 'csi.storage.k8s.io/node-stage-secret-name',
|
CSI_NODE_STAGE_SECRET_NAME: 'csi.storage.k8s.io/node-stage-secret-name',
|
||||||
CSI_NODE_STAGE_SECRET_NAMESPACE: 'csi.storage.k8s.io/node-stage-secret-namespace',
|
CSI_NODE_STAGE_SECRET_NAMESPACE: 'csi.storage.k8s.io/node-stage-secret-namespace',
|
||||||
};
|
};
|
||||||
|
|
||||||
// Some harvester CRD type is not equal to model file name, define the mapping here
|
|
||||||
export const HARVESTER_CRD_MAP = {
|
|
||||||
node: HCI.HOST,
|
|
||||||
configmap: HCI.CLOUD_TEMPLATE,
|
|
||||||
persistentvolumeclaim: HCI.VOLUME,
|
|
||||||
'snapshot.storage.k8s.io.volumesnapshot': HCI.SNAPSHOT,
|
|
||||||
// specific groupable table detail page
|
|
||||||
'network.harvesterhci.io.vlanconfig': HCI.CLUSTER_NETWORK,
|
|
||||||
'kubeovn.io.subnet': HCI.VPC
|
|
||||||
};
|
|
||||||
|
|||||||
@@ -44,12 +44,6 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
await allHash(hash);
|
await allHash(hash);
|
||||||
|
|
||||||
if (this.mode === _CREATE ) {
|
|
||||||
this.setDefaultVolumeSnapshotClass();
|
|
||||||
} else {
|
|
||||||
this.initCDISettingsFromAnnotations();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
@@ -65,6 +59,14 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
created() {
|
||||||
|
if (this.mode === _CREATE ) {
|
||||||
|
this.setDefaultVolumeSnapshotClass();
|
||||||
|
} else {
|
||||||
|
this.initCDISettingsFromAnnotations();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
inStore() {
|
inStore() {
|
||||||
return this.$store.getters['currentProduct'].inStore;
|
return this.$store.getters['currentProduct'].inStore;
|
||||||
@@ -146,7 +148,7 @@ export default {
|
|||||||
setDefaultVolumeSnapshotClass() {
|
setDefaultVolumeSnapshotClass() {
|
||||||
try {
|
try {
|
||||||
const setting = this.$store.getters[`${ this.inStore }/byId`](HCI.SETTING, HCI_SETTING.CSI_DRIVER_CONFIG);
|
const setting = this.$store.getters[`${ this.inStore }/byId`](HCI.SETTING, HCI_SETTING.CSI_DRIVER_CONFIG);
|
||||||
const config = JSON.parse(setting?.value || setting?.default || '{}');
|
const config = JSON.parse(setting?.value || '{}');
|
||||||
const defaultClass = config?.[this.provisioner]?.volumeSnapshotClassName || null;
|
const defaultClass = config?.[this.provisioner]?.volumeSnapshotClassName || null;
|
||||||
|
|
||||||
const allClasses = this.$store.getters[`${ this.inStore }/all`](VOLUME_SNAPSHOT_CLASS) || [];
|
const allClasses = this.$store.getters[`${ this.inStore }/all`](VOLUME_SNAPSHOT_CLASS) || [];
|
||||||
|
|||||||
@@ -257,7 +257,6 @@ export default {
|
|||||||
:label="t('harvester.vmTemplate.tabs.basics')"
|
:label="t('harvester.vmTemplate.tabs.basics')"
|
||||||
>
|
>
|
||||||
<CpuMemory
|
<CpuMemory
|
||||||
class="mb-20"
|
|
||||||
:cpu="cpu"
|
:cpu="cpu"
|
||||||
:memory="memory"
|
:memory="memory"
|
||||||
:max-cpu="maxCpu"
|
:max-cpu="maxCpu"
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="mt-20">
|
||||||
<LabeledSelect
|
<LabeledSelect
|
||||||
v-model:value="checkedSsh"
|
v-model:value="checkedSsh"
|
||||||
:label="t('harvester.virtualMachine.input.sshKey')"
|
:label="t('harvester.virtualMachine.input.sshKey')"
|
||||||
|
|||||||
@@ -605,7 +605,6 @@ export default {
|
|||||||
:label="t('harvester.virtualMachine.detail.tabs.basics')"
|
:label="t('harvester.virtualMachine.detail.tabs.basics')"
|
||||||
>
|
>
|
||||||
<CpuMemory
|
<CpuMemory
|
||||||
class="mb-20"
|
|
||||||
:cpu="cpu"
|
:cpu="cpu"
|
||||||
:max-cpu="maxCpu"
|
:max-cpu="maxCpu"
|
||||||
:memory="memory"
|
:memory="memory"
|
||||||
|
|||||||
@@ -691,13 +691,10 @@ export default {
|
|||||||
this.spec.template.spec.domain.cpu.cores = this.cpu;
|
this.spec.template.spec.domain.cpu.cores = this.cpu;
|
||||||
this.spec.template.spec.domain.resources.limits.cpu = this.cpu?.toString();
|
this.spec.template.spec.domain.resources.limits.cpu = this.cpu?.toString();
|
||||||
this.spec.template.spec.domain.resources.limits.memory = this.memory;
|
this.spec.template.spec.domain.resources.limits.memory = this.memory;
|
||||||
// clean below fields as we don't need them if not enable CPU and memory hotplug
|
// clean
|
||||||
if (this.spec?.template?.spec?.domain?.cpu?.maxSockets) {
|
delete this.spec.template.spec.resources;
|
||||||
delete this.spec.template.spec.domain.cpu.maxSockets;
|
delete this.spec.template.spec.domain.memory;
|
||||||
}
|
delete this.spec.template.spec.domain.cpu.maxSockets;
|
||||||
if (this.spec?.template?.spec?.domain?.memory?.maxGuest) {
|
|
||||||
delete this.spec.template.spec.domain.memory.maxGuest;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,17 @@
|
|||||||
import SteveModel from '@shell/plugins/steve/steve-class';
|
import SteveModel from '@shell/plugins/steve/steve-class';
|
||||||
import { VIEW_IN_API, DEV } from '@shell/store/prefs';
|
import { VIEW_IN_API, DEV } from '@shell/store/prefs';
|
||||||
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../config/harvester';
|
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../config/harvester';
|
||||||
import { HARVESTER_CRD_MAP } from '../config/harvester-map';
|
|
||||||
|
|
||||||
export default class HarvesterResource extends SteveModel {
|
export default class HarvesterResource extends SteveModel {
|
||||||
get listLocation() {
|
get listLocation() {
|
||||||
const name = this.harvesterResourcesInExplorer ? 'c-cluster-product-resource' : `${ HARVESTER_PRODUCT }-c-cluster-resource`;
|
const name = this.harvesterResourcesInExplorer ? 'c-cluster-product-resource' : `${ HARVESTER_PRODUCT }-c-cluster-resource`;
|
||||||
const resource = HARVESTER_CRD_MAP[this.type] || this.type;
|
|
||||||
|
|
||||||
return this.$rootGetters['type-map/optionsFor'](this.type).customRoute || {
|
return this.$rootGetters['type-map/optionsFor'](this.type).customRoute || {
|
||||||
name,
|
name,
|
||||||
params: {
|
params: {
|
||||||
product: this.$rootGetters['productId'],
|
product: this.$rootGetters['productId'],
|
||||||
cluster: this.$rootGetters['clusterId'],
|
cluster: this.$rootGetters['clusterId'],
|
||||||
resource
|
resource: this.type,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// This file is Cloud Configuration Templates page model
|
|
||||||
import { clone } from '@shell/utils/object';
|
import { clone } from '@shell/utils/object';
|
||||||
import { HCI } from '../../types';
|
import { HCI } from '../../types';
|
||||||
import HarvesterResource from '../harvester';
|
import HarvesterResource from '../harvester';
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export default class HarvesterNetworkAttachmentDef extends NetworkAttachmentDef
|
|||||||
params: {
|
params: {
|
||||||
product: HARVESTER_PRODUCT,
|
product: HARVESTER_PRODUCT,
|
||||||
cluster: this.$rootGetters['clusterId'],
|
cluster: this.$rootGetters['clusterId'],
|
||||||
resource: HCI.NETWORK_ATTACHMENT,
|
resource: this.type,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,19 +9,6 @@ export default class HciClusterflow extends HarvesterFlow {
|
|||||||
return this.$rootGetters['harvester/all'](LOGGING.CLUSTER_OUTPUT) || [];
|
return this.$rootGetters['harvester/all'](LOGGING.CLUSTER_OUTPUT) || [];
|
||||||
}
|
}
|
||||||
|
|
||||||
get listLocation() {
|
|
||||||
const listLocation = clone(super.listLocation);
|
|
||||||
|
|
||||||
listLocation.name = this.harvesterResourcesInExplorer ? 'c-cluster-product-resource' : `${ HARVESTER_PRODUCT }-c-cluster-resource`;
|
|
||||||
listLocation.params.resource = HCI.CLUSTER_FLOW;
|
|
||||||
|
|
||||||
return listLocation;
|
|
||||||
}
|
|
||||||
|
|
||||||
get harvesterResourcesInExplorer() {
|
|
||||||
return this.$rootGetters['productId'] !== HARVESTER_PRODUCT;
|
|
||||||
}
|
|
||||||
|
|
||||||
get _detailLocation() {
|
get _detailLocation() {
|
||||||
const schema = this.$getters['schemaFor'](this.type);
|
const schema = this.$getters['schemaFor'](this.type);
|
||||||
|
|
||||||
|
|||||||
@@ -21,19 +21,6 @@ export default class HciClusteroutput extends LogOutput {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
get listLocation() {
|
|
||||||
const listLocation = clone(super.listLocation);
|
|
||||||
|
|
||||||
listLocation.name = this.harvesterResourcesInExplorer ? 'c-cluster-product-resource' : `${ HARVESTER_PRODUCT }-c-cluster-resource`;
|
|
||||||
listLocation.params.resource = HCI.CLUSTER_OUTPUT;
|
|
||||||
|
|
||||||
return listLocation;
|
|
||||||
}
|
|
||||||
|
|
||||||
get harvesterResourcesInExplorer() {
|
|
||||||
return this.$rootGetters['productId'] !== HARVESTER_PRODUCT;
|
|
||||||
}
|
|
||||||
|
|
||||||
get detailLocation() {
|
get detailLocation() {
|
||||||
const detailLocation = clone(this._detailLocation);
|
const detailLocation = clone(this._detailLocation);
|
||||||
|
|
||||||
|
|||||||
@@ -14,19 +14,6 @@ export default class HarvesterLogFlow extends Flow {
|
|||||||
return this.$rootGetters['harvester/all'](LOGGING.CLUSTER_OUTPUT) || [];
|
return this.$rootGetters['harvester/all'](LOGGING.CLUSTER_OUTPUT) || [];
|
||||||
}
|
}
|
||||||
|
|
||||||
get listLocation() {
|
|
||||||
const listLocation = clone(super.listLocation);
|
|
||||||
|
|
||||||
listLocation.name = this.harvesterResourcesInExplorer ? 'c-cluster-product-resource' : `${ HARVESTER_PRODUCT }-c-cluster-resource`;
|
|
||||||
listLocation.params.resource = HCI.FLOW;
|
|
||||||
|
|
||||||
return listLocation;
|
|
||||||
}
|
|
||||||
|
|
||||||
get harvesterResourcesInExplorer() {
|
|
||||||
return this.$rootGetters['productId'] !== HARVESTER_PRODUCT;
|
|
||||||
}
|
|
||||||
|
|
||||||
get _detailLocation() {
|
get _detailLocation() {
|
||||||
const schema = this.$getters['schemaFor'](this.type);
|
const schema = this.$getters['schemaFor'](this.type);
|
||||||
|
|
||||||
|
|||||||
@@ -22,19 +22,6 @@ export default class HarvesterLogOutput extends LogOutput {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
get listLocation() {
|
|
||||||
const listLocation = clone(super.listLocation);
|
|
||||||
|
|
||||||
listLocation.name = this.harvesterResourcesInExplorer ? 'c-cluster-product-resource' : `${ HARVESTER_PRODUCT }-c-cluster-resource`;
|
|
||||||
listLocation.params.resource = HCI.OUTPUT;
|
|
||||||
|
|
||||||
return listLocation;
|
|
||||||
}
|
|
||||||
|
|
||||||
get harvesterResourcesInExplorer() {
|
|
||||||
return this.$rootGetters['productId'] !== HARVESTER_PRODUCT;
|
|
||||||
}
|
|
||||||
|
|
||||||
get detailLocation() {
|
get detailLocation() {
|
||||||
const detailLocation = clone(this._detailLocation);
|
const detailLocation = clone(this._detailLocation);
|
||||||
|
|
||||||
|
|||||||
@@ -19,19 +19,6 @@ export default class HciAlertmanagerConfig extends SteveModel {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
get listLocation() {
|
|
||||||
const listLocation = clone(super.listLocation);
|
|
||||||
|
|
||||||
listLocation.name = this.harvesterResourcesInExplorer ? 'c-cluster-product-resource' : `${ HARVESTER_PRODUCT }-c-cluster-resource`;
|
|
||||||
listLocation.params.resource = HCI.ALERTMANAGERCONFIG;
|
|
||||||
|
|
||||||
return listLocation;
|
|
||||||
}
|
|
||||||
|
|
||||||
get harvesterResourcesInExplorer() {
|
|
||||||
return this.$rootGetters['productId'] !== HARVESTER_PRODUCT;
|
|
||||||
}
|
|
||||||
|
|
||||||
get doneOverride() {
|
get doneOverride() {
|
||||||
const detailLocation = clone(this._detailLocation);
|
const detailLocation = clone(this._detailLocation);
|
||||||
|
|
||||||
|
|||||||
@@ -5,25 +5,6 @@ import Secret from '@shell/models/secret';
|
|||||||
import { NAMESPACE } from '@shell/config/types';
|
import { NAMESPACE } from '@shell/config/types';
|
||||||
|
|
||||||
export default class HciSecret extends Secret {
|
export default class HciSecret extends Secret {
|
||||||
// prevent harvester secret detail page be overridden.
|
|
||||||
// See isFullPageOverride in https://github.com/rancher/dashboard/blob/master/shell/components/ResourceDetail/index.vue
|
|
||||||
get fullDetailPageOverride() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
get listLocation() {
|
|
||||||
const listLocation = clone(super.listLocation);
|
|
||||||
|
|
||||||
listLocation.name = this.harvesterResourcesInExplorer ? 'c-cluster-product-resource' : `${ HARVESTER_PRODUCT }-c-cluster-resource`;
|
|
||||||
listLocation.params.resource = HCI.SECRET;
|
|
||||||
|
|
||||||
return listLocation;
|
|
||||||
}
|
|
||||||
|
|
||||||
get harvesterResourcesInExplorer() {
|
|
||||||
return this.$rootGetters['productId'] !== HARVESTER_PRODUCT;
|
|
||||||
}
|
|
||||||
|
|
||||||
get _detailLocation() {
|
get _detailLocation() {
|
||||||
const schema = this.$getters['schemaFor'](this.type);
|
const schema = this.$getters['schemaFor'](this.type);
|
||||||
|
|
||||||
|
|||||||
@@ -9,19 +9,6 @@ import { isInternalStorageClass } from '../../utils/storage-class';
|
|||||||
export const LVM_DRIVER = 'lvm.driver.harvesterhci.io';
|
export const LVM_DRIVER = 'lvm.driver.harvesterhci.io';
|
||||||
|
|
||||||
export default class HciStorageClass extends StorageClass {
|
export default class HciStorageClass extends StorageClass {
|
||||||
get listLocation() {
|
|
||||||
const listLocation = clone(super.listLocation);
|
|
||||||
|
|
||||||
listLocation.name = this.harvesterResourcesInExplorer ? 'c-cluster-product-resource' : `${ HARVESTER_PRODUCT }-c-cluster-resource`;
|
|
||||||
listLocation.params.resource = HCI.STORAGE;
|
|
||||||
|
|
||||||
return listLocation;
|
|
||||||
}
|
|
||||||
|
|
||||||
get harvesterResourcesInExplorer() {
|
|
||||||
return this.$rootGetters['productId'] !== HARVESTER_PRODUCT;
|
|
||||||
}
|
|
||||||
|
|
||||||
get detailLocation() {
|
get detailLocation() {
|
||||||
const detailLocation = clone(this._detailLocation);
|
const detailLocation = clone(this._detailLocation);
|
||||||
|
|
||||||
@@ -107,14 +94,13 @@ export default class HciStorageClass extends StorageClass {
|
|||||||
get availableActions() {
|
get availableActions() {
|
||||||
let out = super.availableActions || [];
|
let out = super.availableActions || [];
|
||||||
|
|
||||||
if (this.isInternalStorageClass()) {
|
out = out.map((action) => {
|
||||||
out = out.filter((action) => {
|
if ((action.action === 'setDefault' || action.action === 'setAsDefault' || action.action === 'promptRemove') && this.isInternalStorageClass()) {
|
||||||
return !['setDefault', 'setAsDefault', 'promptRemove'].includes(action.action);
|
return { ...action, enabled: false };
|
||||||
});
|
}
|
||||||
}
|
|
||||||
if (out[0] && out[0].divider === true) {
|
return action;
|
||||||
out = out.slice(1);
|
});
|
||||||
}
|
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -327,10 +327,6 @@ export default class VirtVm extends HarvesterResource {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
doSoftReboot() {
|
|
||||||
this.doActionGrowl('softreboot', {});
|
|
||||||
}
|
|
||||||
|
|
||||||
softrebootVM(resources = this) {
|
softrebootVM(resources = this) {
|
||||||
this.$dispatch('promptModal', {
|
this.$dispatch('promptModal', {
|
||||||
resources,
|
resources,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "harvester",
|
"name": "harvester",
|
||||||
"description": "Rancher UI Extension for Harvester",
|
"description": "Rancher UI Extension for Harvester",
|
||||||
"version": "1.7.0-dev",
|
"version": "1.6.0-rc5",
|
||||||
"private": false,
|
"private": false,
|
||||||
"rancher": {
|
"rancher": {
|
||||||
"annotations": {
|
"annotations": {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ if [[ "$VERSION" != "$EXTENSION_VERSION" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${TAG_VERSION}" != "${PKG_VERSION}"* ]]; then
|
if [[ "${TAG_VERSION}" != "$PKG_VERSION" ]]; then
|
||||||
echo "Package version $PKG_VERSION in pkg/harvester/package.json does not match tag version ${TAG_VERSION}"
|
echo "Package version $PKG_VERSION in pkg/harvester/package.json does not match tag version ${TAG_VERSION}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
/* eslint-disable no-console */
|
|
||||||
import load from "@commitlint/load";
|
|
||||||
|
|
||||||
if (process.argv.length < 3) {
|
|
||||||
console.error('No PR title as first argument');
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
const prTitle = process.argv[2];
|
|
||||||
const prLabel = prTitle.split(':')[0].trim();
|
|
||||||
|
|
||||||
const config = await load({ extends: ["./commitlint.config.js"] });
|
|
||||||
const commitPrefix = config?.rules?.['type-enum']?.[2] || [];
|
|
||||||
const label = commitPrefix.includes(prLabel) ? prLabel : 'other';
|
|
||||||
|
|
||||||
console.log(label);
|
|
||||||
Reference in New Issue
Block a user