@rancher/shell 2.0.0 → 2.0.2-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/translations/en-us.yaml +69 -29
- package/assets/translations/zh-hans.yaml +1 -0
- package/components/AlertTable.vue +17 -7
- package/components/AssignTo.vue +2 -0
- package/components/GrafanaDashboard.vue +6 -4
- package/components/PromptRemove.vue +1 -0
- package/components/Questions/index.vue +2 -2
- package/components/auth/RoleDetailEdit.vue +5 -4
- package/components/form/KeyValue.vue +1 -0
- package/components/form/Members/ClusterPermissionsEditor.vue +1 -1
- package/components/form/ProjectMemberEditor.vue +1 -1
- package/components/form/ResourceLabeledSelect.vue +11 -3
- package/components/form/Taints.vue +13 -7
- package/components/form/__tests__/Taints.test.ts +70 -0
- package/components/form/labeled-select-utils/labeled-select.utils.ts +1 -1
- package/components/nav/Header.vue +1 -1
- package/components/nav/TopLevelMenu.vue +1 -4
- package/config/pagination-table-headers.js +5 -4
- package/config/product/auth.js +1 -1
- package/config/roles.ts +34 -19
- package/config/router/navigation-guards/attempt-first-login.js +1 -1
- package/config/router/navigation-guards/authentication.js +1 -1
- package/config/router/navigation-guards/i18n.js +13 -0
- package/config/router/navigation-guards/index.js +3 -1
- package/config/router/navigation-guards/load-initial-settings.js +1 -1
- package/config/router/navigation-guards/runtime-extension-route.js +31 -0
- package/config/router/routes.js +10 -1
- package/config/uiplugins.js +130 -61
- package/core/plugin.ts +5 -0
- package/core/plugins.js +7 -1
- package/detail/__tests__/provisioning.cattle.io.cluster.test.ts +42 -0
- package/detail/provisioning.cattle.io.cluster.vue +4 -4
- package/dialog/DeactivateDriverDialog.vue +30 -11
- package/edit/auth/__tests__/oidc.test.ts +2 -2
- package/edit/provisioning.cattle.io.cluster/__tests__/Basics.test.ts +86 -13
- package/edit/provisioning.cattle.io.cluster/__tests__/DirectoryConfig.test.ts +3 -134
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +209 -0
- package/edit/provisioning.cattle.io.cluster/index.vue +8 -4
- package/edit/provisioning.cattle.io.cluster/rke2.vue +115 -17
- package/edit/provisioning.cattle.io.cluster/tabs/AddOnAdditionalManifest.vue +50 -0
- package/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig.vue +29 -64
- package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +42 -3
- package/edit/provisioning.cattle.io.cluster/tabs/DirectoryConfig.vue +22 -86
- package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryConfigs.vue +8 -2
- package/edit/provisioning.cattle.io.cluster/tabs/registries/__tests__/RegistryConfigs.test.ts +61 -0
- package/edit/token.vue +2 -1
- package/initialize/entry-helpers.js +4 -24
- package/list/management.cattle.io.feature.vue +4 -2
- package/middleware/authenticated.js +0 -19
- package/mixins/__tests__/chart.test.ts +4 -1
- package/mixins/auth-config.js +1 -1
- package/mixins/chart.js +30 -14
- package/models/__tests__/apps.deployment.test.ts +93 -0
- package/models/apps.deployment.js +18 -4
- package/models/driver.js +3 -2
- package/models/kontainerdriver.js +30 -13
- package/models/management.cattle.io.authconfig.js +2 -2
- package/models/management.cattle.io.cluster.js +2 -2
- package/models/management.cattle.io.user.js +3 -3
- package/models/nodedriver.js +35 -13
- package/models/provisioning.cattle.io.cluster.js +4 -0
- package/package.json +3 -2
- package/pages/404.vue +15 -0
- package/pages/auth/login.vue +4 -1
- package/pages/auth/setup.vue +4 -1
- package/pages/c/_cluster/apps/charts/install.vue +3 -2
- package/pages/c/_cluster/explorer/index.vue +5 -0
- package/pages/c/_cluster/manager/drivers/kontainerDriver/index.vue +0 -3
- package/pages/c/_cluster/manager/drivers/nodeDriver/index.vue +1 -4
- package/pages/c/_cluster/manager/jwt.authentication/index.vue +10 -4
- package/pages/c/_cluster/settings/performance.vue +2 -2
- package/pages/c/_cluster/uiplugins/InstallDialog.vue +2 -1
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +7 -10
- package/pages/c/_cluster/uiplugins/index.vue +24 -16
- package/pages/home.vue +1 -13
- package/plugins/dashboard-store/actions.js +1 -1
- package/plugins/dashboard-store/getters.js +1 -1
- package/plugins/steve/__tests__/getters.test.ts +5 -5
- package/plugins/steve/getters.js +6 -4
- package/plugins/steve/hybrid-class.js +1 -5
- package/promptRemove/pod.vue +15 -7
- package/scripts/extension/helm/charts/ui-plugin-server/Chart.yaml +1 -1
- package/scripts/publish-shell.sh +54 -55
- package/scripts/test-plugins-build.sh +45 -39
- package/shell/types/shell/index.d.ts +2 -0
- package/store/auth.js +1 -1
- package/store/index.js +1 -1
- package/store/type-map.js +4 -2
- package/types/store/pagination.types.ts +1 -1
- package/utils/__tests__/kontainer.test.ts +89 -1
- package/utils/auth.js +1 -1
- package/utils/cluster.js +9 -0
- package/utils/kontainer.ts +5 -1
- package/utils/settings.ts +3 -1
- package/utils/version.js +2 -1
- package/creators/app/app.package.json +0 -13
- package/creators/app/files/.eslintignore +0 -16
- package/creators/app/files/.eslintrc.js +0 -173
- package/creators/app/files/.gitignore +0 -70
- package/creators/app/files/.gitlab-ci.yml +0 -14
- package/creators/app/files/.vscode/settings.json +0 -21
- package/creators/app/files/babel.config.js +0 -1
- package/creators/app/files/tsconfig.json +0 -42
- package/creators/app/files/vue.config.js +0 -6
- package/creators/app/init +0 -120
- package/creators/app/package.json +0 -25
- package/creators/pkg/files/.github/workflows/build-extension-catalog.yml +0 -24
- package/creators/pkg/files/.github/workflows/build-extension-charts.yml +0 -22
- package/creators/pkg/files/babel.config.js +0 -1
- package/creators/pkg/files/index.ts +0 -14
- package/creators/pkg/files/tsconfig.json +0 -53
- package/creators/pkg/files/vue.config.js +0 -1
- package/creators/pkg/init +0 -286
- package/creators/pkg/package.json +0 -19
- package/creators/pkg/pkg.package.json +0 -21
- package/creators/pkg/vue-shim.ts +0 -4
- package/creators/update/init +0 -56
- package/creators/update/package.json +0 -20
- package/creators/update/upgrade +0 -56
- package/rancher-components/components/Accordion/Accordion.test.ts +0 -45
- package/rancher-components/components/Accordion/Accordion.vue +0 -86
- package/rancher-components/components/Accordion/index.ts +0 -1
- package/rancher-components/components/BadgeState/BadgeState.test.ts +0 -12
- package/rancher-components/components/BadgeState/BadgeState.vue +0 -111
- package/rancher-components/components/BadgeState/index.ts +0 -1
- package/rancher-components/components/Banner/Banner.test.ts +0 -59
- package/rancher-components/components/Banner/Banner.vue +0 -244
- package/rancher-components/components/Banner/index.ts +0 -1
- package/rancher-components/components/Card/Card.test.ts +0 -37
- package/rancher-components/components/Card/Card.vue +0 -167
- package/rancher-components/components/Card/index.ts +0 -1
- package/rancher-components/components/Form/Checkbox/Checkbox.test.ts +0 -68
- package/rancher-components/components/Form/Checkbox/Checkbox.vue +0 -421
- package/rancher-components/components/Form/Checkbox/index.ts +0 -1
- package/rancher-components/components/Form/LabeledInput/LabeledInput.test.ts +0 -40
- package/rancher-components/components/Form/LabeledInput/LabeledInput.vue +0 -402
- package/rancher-components/components/Form/LabeledInput/index.ts +0 -1
- package/rancher-components/components/Form/Radio/RadioButton.test.ts +0 -33
- package/rancher-components/components/Form/Radio/RadioButton.vue +0 -293
- package/rancher-components/components/Form/Radio/RadioGroup.test.ts +0 -30
- package/rancher-components/components/Form/Radio/RadioGroup.vue +0 -259
- package/rancher-components/components/Form/Radio/index.ts +0 -2
- package/rancher-components/components/Form/TextArea/TextAreaAutoGrow.vue +0 -172
- package/rancher-components/components/Form/TextArea/index.ts +0 -1
- package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.test.ts +0 -94
- package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.vue +0 -152
- package/rancher-components/components/Form/ToggleSwitch/index.ts +0 -1
- package/rancher-components/components/Form/index.ts +0 -5
- package/rancher-components/components/LabeledTooltip/LabeledTooltip.vue +0 -156
- package/rancher-components/components/LabeledTooltip/index.ts +0 -1
- package/rancher-components/components/StringList/StringList.test.ts +0 -754
- package/rancher-components/components/StringList/StringList.vue +0 -650
- package/rancher-components/components/StringList/index.ts +0 -1
- package/types/shell/index.d.ts +0 -4585
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
root: true,
|
|
3
|
-
env: {
|
|
4
|
-
browser: true,
|
|
5
|
-
node: true
|
|
6
|
-
},
|
|
7
|
-
globals: { NodeJS: true, Timer: true },
|
|
8
|
-
extends: [
|
|
9
|
-
'standard',
|
|
10
|
-
'eslint:recommended',
|
|
11
|
-
'@nuxtjs/eslint-config-typescript',
|
|
12
|
-
'plugin:cypress/recommended'
|
|
13
|
-
],
|
|
14
|
-
// add your custom rules here
|
|
15
|
-
rules: {
|
|
16
|
-
'dot-notation': 'off',
|
|
17
|
-
'generator-star-spacing': 'off',
|
|
18
|
-
'guard-for-in': 'off',
|
|
19
|
-
'linebreak-style': 'off',
|
|
20
|
-
'new-cap': 'off',
|
|
21
|
-
'no-empty': 'off',
|
|
22
|
-
'no-extra-boolean-cast': 'off',
|
|
23
|
-
'no-new': 'off',
|
|
24
|
-
'no-plusplus': 'off',
|
|
25
|
-
'no-useless-escape': 'off',
|
|
26
|
-
'nuxt/no-cjs-in-config': 'off',
|
|
27
|
-
'semi-spacing': 'off',
|
|
28
|
-
'space-in-parens': 'off',
|
|
29
|
-
strict: 'off',
|
|
30
|
-
'unicorn/no-new-buffer': 'off',
|
|
31
|
-
'vue/html-self-closing': 'off',
|
|
32
|
-
'vue/no-unused-components': 'warn',
|
|
33
|
-
'vue/no-v-html': 'error',
|
|
34
|
-
'wrap-iife': 'off',
|
|
35
|
-
|
|
36
|
-
'array-bracket-spacing': 'warn',
|
|
37
|
-
'arrow-parens': 'warn',
|
|
38
|
-
'arrow-spacing': ['warn', { before: true, after: true }],
|
|
39
|
-
'block-spacing': ['warn', 'always'],
|
|
40
|
-
'brace-style': ['warn', '1tbs'],
|
|
41
|
-
'comma-dangle': ['warn', 'only-multiline'],
|
|
42
|
-
'comma-spacing': 'warn',
|
|
43
|
-
curly: 'warn',
|
|
44
|
-
eqeqeq: 'warn',
|
|
45
|
-
'func-call-spacing': ['warn', 'never'],
|
|
46
|
-
'implicit-arrow-linebreak': 'warn',
|
|
47
|
-
indent: ['warn', 2],
|
|
48
|
-
'keyword-spacing': 'warn',
|
|
49
|
-
'lines-between-class-members': ['warn', 'always', { exceptAfterSingleLine: true }],
|
|
50
|
-
'multiline-ternary': ['warn', 'never'],
|
|
51
|
-
'newline-per-chained-call': ['warn', { ignoreChainWithDepth: 4 }],
|
|
52
|
-
'no-caller': 'warn',
|
|
53
|
-
'no-cond-assign': ['warn', 'except-parens'],
|
|
54
|
-
'no-console': 'warn',
|
|
55
|
-
'no-debugger': 'warn',
|
|
56
|
-
'no-eq-null': 'warn',
|
|
57
|
-
'no-eval': 'warn',
|
|
58
|
-
'no-trailing-spaces': 'warn',
|
|
59
|
-
'no-undef': 'warn',
|
|
60
|
-
'no-unused-vars': 'warn',
|
|
61
|
-
'no-whitespace-before-property': 'warn',
|
|
62
|
-
'object-curly-spacing': ['warn', 'always'],
|
|
63
|
-
'object-property-newline': 'warn',
|
|
64
|
-
'object-shorthand': 'warn',
|
|
65
|
-
'padded-blocks': ['warn', 'never'],
|
|
66
|
-
'prefer-arrow-callback': 'warn',
|
|
67
|
-
'prefer-template': 'warn',
|
|
68
|
-
'quote-props': 'warn',
|
|
69
|
-
'rest-spread-spacing': 'warn',
|
|
70
|
-
semi: ['warn', 'always'],
|
|
71
|
-
'space-before-function-paren': ['warn', 'never'],
|
|
72
|
-
'space-infix-ops': 'warn',
|
|
73
|
-
'spaced-comment': 'warn',
|
|
74
|
-
'switch-colon-spacing': 'warn',
|
|
75
|
-
'template-curly-spacing': ['warn', 'always'],
|
|
76
|
-
'yield-star-spacing': ['warn', 'both'],
|
|
77
|
-
|
|
78
|
-
'key-spacing': ['warn', {
|
|
79
|
-
align: {
|
|
80
|
-
beforeColon: false,
|
|
81
|
-
afterColon: true,
|
|
82
|
-
on: 'value',
|
|
83
|
-
mode: 'minimum'
|
|
84
|
-
},
|
|
85
|
-
multiLine: {
|
|
86
|
-
beforeColon: false,
|
|
87
|
-
afterColon: true
|
|
88
|
-
},
|
|
89
|
-
}],
|
|
90
|
-
|
|
91
|
-
'object-curly-newline': ['warn', {
|
|
92
|
-
ObjectExpression: {
|
|
93
|
-
multiline: true,
|
|
94
|
-
minProperties: 3
|
|
95
|
-
},
|
|
96
|
-
ObjectPattern: {
|
|
97
|
-
multiline: true,
|
|
98
|
-
minProperties: 4
|
|
99
|
-
},
|
|
100
|
-
ImportDeclaration: {
|
|
101
|
-
multiline: true,
|
|
102
|
-
minProperties: 5
|
|
103
|
-
},
|
|
104
|
-
ExportDeclaration: {
|
|
105
|
-
multiline: true,
|
|
106
|
-
minProperties: 3
|
|
107
|
-
}
|
|
108
|
-
}],
|
|
109
|
-
|
|
110
|
-
'padding-line-between-statements': [
|
|
111
|
-
'warn',
|
|
112
|
-
{
|
|
113
|
-
blankLine: 'always',
|
|
114
|
-
prev: '*',
|
|
115
|
-
next: 'return',
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
blankLine: 'always',
|
|
119
|
-
prev: 'function',
|
|
120
|
-
next: 'function',
|
|
121
|
-
},
|
|
122
|
-
// This configuration would require blank lines after every sequence of variable declarations
|
|
123
|
-
{
|
|
124
|
-
blankLine: 'always',
|
|
125
|
-
prev: ['const', 'let', 'var'],
|
|
126
|
-
next: '*'
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
blankLine: 'any',
|
|
130
|
-
prev: ['const', 'let', 'var'],
|
|
131
|
-
next: ['const', 'let', 'var']
|
|
132
|
-
}
|
|
133
|
-
],
|
|
134
|
-
|
|
135
|
-
quotes: [
|
|
136
|
-
'warn',
|
|
137
|
-
'single',
|
|
138
|
-
{
|
|
139
|
-
avoidEscape: true,
|
|
140
|
-
allowTemplateLiterals: true
|
|
141
|
-
},
|
|
142
|
-
],
|
|
143
|
-
|
|
144
|
-
'space-unary-ops': [
|
|
145
|
-
'warn',
|
|
146
|
-
{
|
|
147
|
-
words: true,
|
|
148
|
-
nonwords: false,
|
|
149
|
-
}
|
|
150
|
-
],
|
|
151
|
-
|
|
152
|
-
// FIXME: The following is disabled due to new linter and old JS code. These should all be enabled and underlying issues fixed
|
|
153
|
-
'vue/order-in-components': 'off',
|
|
154
|
-
'vue/no-lone-template': 'off',
|
|
155
|
-
'vue/v-slot-style': 'off',
|
|
156
|
-
'vue/component-tags-order': 'off',
|
|
157
|
-
'vue/no-mutating-props': 'off',
|
|
158
|
-
'@typescript-eslint/no-unused-vars': 'off',
|
|
159
|
-
'array-callback-return': 'off',
|
|
160
|
-
},
|
|
161
|
-
overrides: [
|
|
162
|
-
{
|
|
163
|
-
files: ['*.js'],
|
|
164
|
-
rules: {
|
|
165
|
-
// FIXME: The following is disabled due to new linter and old JS code. These should all be enabled and underlying issues fixed
|
|
166
|
-
'prefer-regex-literals': 'off',
|
|
167
|
-
'vue/component-definition-name-casing': 'off',
|
|
168
|
-
'no-unreachable-loop': 'off',
|
|
169
|
-
'computed-property-spacing': 'off',
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
]
|
|
173
|
-
};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
# compiled output
|
|
2
|
-
/dist
|
|
3
|
-
/tmp
|
|
4
|
-
/out-tsc
|
|
5
|
-
|
|
6
|
-
# Runtime data
|
|
7
|
-
pids
|
|
8
|
-
*.pid
|
|
9
|
-
*.seed
|
|
10
|
-
*.pid.lock
|
|
11
|
-
|
|
12
|
-
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
13
|
-
lib-cov
|
|
14
|
-
|
|
15
|
-
# Coverage directory used by tools like istanbul
|
|
16
|
-
coverage
|
|
17
|
-
|
|
18
|
-
# nyc test coverage
|
|
19
|
-
.nyc_output
|
|
20
|
-
|
|
21
|
-
# IDEs and editors
|
|
22
|
-
.idea
|
|
23
|
-
.project
|
|
24
|
-
.classpath
|
|
25
|
-
.c9/
|
|
26
|
-
*.launch
|
|
27
|
-
.settings/
|
|
28
|
-
*.sublime-workspace
|
|
29
|
-
|
|
30
|
-
# IDE - VSCode
|
|
31
|
-
.vscode/*
|
|
32
|
-
!.vscode/settings.json
|
|
33
|
-
!.vscode/tasks.json
|
|
34
|
-
!.vscode/launch.json
|
|
35
|
-
!.vscode/extensions.json
|
|
36
|
-
|
|
37
|
-
# misc
|
|
38
|
-
.sass-cache
|
|
39
|
-
connect.lock
|
|
40
|
-
typings
|
|
41
|
-
|
|
42
|
-
# Logs
|
|
43
|
-
logs
|
|
44
|
-
*.log
|
|
45
|
-
npm-debug.log*
|
|
46
|
-
yarn-debug.log*
|
|
47
|
-
yarn-error.log*
|
|
48
|
-
|
|
49
|
-
# Dependency directories
|
|
50
|
-
node_modules/
|
|
51
|
-
jspm_packages/
|
|
52
|
-
|
|
53
|
-
# Optional npm cache directory
|
|
54
|
-
.npm
|
|
55
|
-
|
|
56
|
-
# Optional eslint cache
|
|
57
|
-
.eslintcache
|
|
58
|
-
|
|
59
|
-
# Optional REPL history
|
|
60
|
-
.node_repl_history
|
|
61
|
-
|
|
62
|
-
# Yarn Integrity file
|
|
63
|
-
.yarn-integrity
|
|
64
|
-
|
|
65
|
-
# dotenv environment variables file
|
|
66
|
-
.env
|
|
67
|
-
|
|
68
|
-
# System Files
|
|
69
|
-
.DS_Store
|
|
70
|
-
Thumbs.db
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
image: registry.suse.com/bci/bci-base:latest
|
|
2
|
-
|
|
3
|
-
stages:
|
|
4
|
-
- check_version
|
|
5
|
-
- build_catalog
|
|
6
|
-
|
|
7
|
-
variables:
|
|
8
|
-
REGISTRY: $CI_REGISTRY
|
|
9
|
-
REGISTRY_USER: $CI_REGISTRY_USER
|
|
10
|
-
REGISTRY_PASSWORD: $CI_REGISTRY_PASSWORD
|
|
11
|
-
IMAGE_NAMESPACE: $CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME
|
|
12
|
-
|
|
13
|
-
include:
|
|
14
|
-
- remote: 'https://raw.githubusercontent.com/rancher/dashboard/master/shell/scripts/.gitlab/workflows/build-extension-catalog.gitlab-ci.yml'
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"files.exclude": {
|
|
3
|
-
".ackrc": true,
|
|
4
|
-
".dockerignore": true,
|
|
5
|
-
".drone.yml": true,
|
|
6
|
-
".editorconfig": true,
|
|
7
|
-
".eslintcache": true,
|
|
8
|
-
".eslintignore": true,
|
|
9
|
-
".eslintrc.js": true,
|
|
10
|
-
".gitignore": true,
|
|
11
|
-
".nyc_output": true,
|
|
12
|
-
".vscode": true,
|
|
13
|
-
"LICENSE": true,
|
|
14
|
-
"node_modules": true,
|
|
15
|
-
"babel.config.js": true,
|
|
16
|
-
"jsconfig.json": true,
|
|
17
|
-
"yarn-error.log": true,
|
|
18
|
-
"pkg/**/.shell": true,
|
|
19
|
-
"pkg/**/node_modules": true,
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('@rancher/shell/babel.config.js');
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2018",
|
|
4
|
-
"module": "ESNext",
|
|
5
|
-
"moduleResolution": "Node",
|
|
6
|
-
"lib": [
|
|
7
|
-
"ESNext",
|
|
8
|
-
"ESNext.AsyncIterable",
|
|
9
|
-
"DOM"
|
|
10
|
-
],
|
|
11
|
-
"esModuleInterop": true,
|
|
12
|
-
"allowJs": true,
|
|
13
|
-
"sourceMap": true,
|
|
14
|
-
"strict": true,
|
|
15
|
-
"noEmit": true,
|
|
16
|
-
"baseUrl": ".",
|
|
17
|
-
"paths": {
|
|
18
|
-
"~/*": [
|
|
19
|
-
"./*"
|
|
20
|
-
],
|
|
21
|
-
"@/*": [
|
|
22
|
-
"./*"
|
|
23
|
-
],
|
|
24
|
-
"@shell/*": [
|
|
25
|
-
"./node_modules/@rancher/shell/*"
|
|
26
|
-
]
|
|
27
|
-
},
|
|
28
|
-
"typeRoots": [
|
|
29
|
-
"./node_modules",
|
|
30
|
-
"./node_modules/@rancher/shell/types"
|
|
31
|
-
],
|
|
32
|
-
"types": [
|
|
33
|
-
"@types/node",
|
|
34
|
-
"cypress",
|
|
35
|
-
"rancher",
|
|
36
|
-
"shell"
|
|
37
|
-
]
|
|
38
|
-
},
|
|
39
|
-
"exclude": [
|
|
40
|
-
"node_modules"
|
|
41
|
-
]
|
|
42
|
-
}
|
package/creators/app/init
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const path = require('path');
|
|
4
|
-
const fs = require('fs-extra');
|
|
5
|
-
|
|
6
|
-
const targets = {
|
|
7
|
-
dev: 'NODE_ENV=dev ./node_modules/.bin/vue-cli-service serve',
|
|
8
|
-
build: './node_modules/.bin/vue-cli-service build',
|
|
9
|
-
clean: './node_modules/@rancher/shell/scripts/clean'
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const files = [
|
|
13
|
-
'tsconfig.json',
|
|
14
|
-
'vue.config.js',
|
|
15
|
-
'.gitignore',
|
|
16
|
-
'.eslintignore',
|
|
17
|
-
'.eslintrc.js',
|
|
18
|
-
'babel.config.js',
|
|
19
|
-
'.vscode/settings.json'
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
console.log('');
|
|
23
|
-
console.log('Creating Skeleton Application');
|
|
24
|
-
|
|
25
|
-
const args = process.argv;
|
|
26
|
-
let appFolder = path.resolve('.');
|
|
27
|
-
|
|
28
|
-
if (args.length === 3) {
|
|
29
|
-
const name = args[2];
|
|
30
|
-
const folder = path.resolve('.');
|
|
31
|
-
|
|
32
|
-
appFolder = path.join(folder, name);
|
|
33
|
-
console.log(` Creating application folder: ${ appFolder }`);
|
|
34
|
-
fs.ensureDirSync(appFolder);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
let addGitlabWorkflow = false;
|
|
38
|
-
|
|
39
|
-
// Check for Gitlab integration option
|
|
40
|
-
if ( args.length > 3 ) {
|
|
41
|
-
for (let i = 3; i < args.length; i++) {
|
|
42
|
-
switch (args[i]) {
|
|
43
|
-
case '-l':
|
|
44
|
-
addGitlabWorkflow = true;
|
|
45
|
-
break;
|
|
46
|
-
default:
|
|
47
|
-
break;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if ( addGitlabWorkflow ) {
|
|
53
|
-
files.push('.gitlab-ci.yml');
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// Check that there is a package file
|
|
57
|
-
|
|
58
|
-
let setName = false;
|
|
59
|
-
|
|
60
|
-
if (!fs.existsSync(path.join(appFolder, './package.json'))) {
|
|
61
|
-
console.log(' Adding package.json');
|
|
62
|
-
fs.copySync(path.join(__dirname, 'app.package.json'), path.join(appFolder, 'package.json'));
|
|
63
|
-
setName = true;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const rawdata = fs.readFileSync(path.join(appFolder, 'package.json'));
|
|
67
|
-
const pkg = JSON.parse(rawdata);
|
|
68
|
-
|
|
69
|
-
if (!pkg.scripts) {
|
|
70
|
-
pkg.scripts = {};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
if (setName) {
|
|
74
|
-
const dirName = path.basename(appFolder);
|
|
75
|
-
|
|
76
|
-
pkg.name = dirName;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
Object.keys(targets).forEach((target) => {
|
|
80
|
-
if (!pkg.scripts[target]) {
|
|
81
|
-
pkg.scripts[target] = targets[target];
|
|
82
|
-
console.log(` Adding script '${ target }' to package.json`);
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
// Add dependencies
|
|
87
|
-
// Use the same shell version as this app creator
|
|
88
|
-
|
|
89
|
-
const creatorPkgData = fs.readFileSync(path.join(__dirname, 'package.json'));
|
|
90
|
-
const creatorPkg = JSON.parse(creatorPkgData);
|
|
91
|
-
|
|
92
|
-
pkg.dependencies['@rancher/shell'] = `^${ creatorPkg.version }`;
|
|
93
|
-
|
|
94
|
-
// Rest of dependencies are in the _pkgs property of package.json - copy then across
|
|
95
|
-
if (creatorPkg._pkgs) {
|
|
96
|
-
Object.keys(creatorPkg._pkgs).forEach((pkgName) => {
|
|
97
|
-
pkg.dependencies[pkgName] = creatorPkg._pkgs[pkgName];
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
fs.writeFileSync(path.join(appFolder, 'package.json'), JSON.stringify(pkg, null, 2));
|
|
102
|
-
|
|
103
|
-
// Copy base files
|
|
104
|
-
files.forEach((file) => {
|
|
105
|
-
const src = path.join(__dirname, 'files', file);
|
|
106
|
-
const dest = path.join(appFolder, file);
|
|
107
|
-
|
|
108
|
-
if (!fs.existsSync(dest)) {
|
|
109
|
-
console.log(` Adding file: ${ file }`);
|
|
110
|
-
|
|
111
|
-
const folder = path.dirname(file);
|
|
112
|
-
|
|
113
|
-
fs.ensureDirSync(folder);
|
|
114
|
-
|
|
115
|
-
// Create the folder if needed
|
|
116
|
-
fs.copySync(src, dest);
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
console.log('');
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@rancher/create-app",
|
|
3
|
-
"description": "Rancher UI Application generator",
|
|
4
|
-
"version": "0.0.0",
|
|
5
|
-
"license": "Apache-2.0",
|
|
6
|
-
"author": "SUSE",
|
|
7
|
-
"private": false,
|
|
8
|
-
"bin": "./init",
|
|
9
|
-
"files": [
|
|
10
|
-
"**/*.*",
|
|
11
|
-
"init"
|
|
12
|
-
],
|
|
13
|
-
"engines": {
|
|
14
|
-
"node": ">=12"
|
|
15
|
-
},
|
|
16
|
-
"_requires": [
|
|
17
|
-
"core-js",
|
|
18
|
-
"css-loader",
|
|
19
|
-
"@types/lodash",
|
|
20
|
-
"@rancher/components"
|
|
21
|
-
],
|
|
22
|
-
"dependencies": {
|
|
23
|
-
"fs-extra": "^10.0.0"
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
name: Build and Release Extension Catalog
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
release:
|
|
6
|
-
types: [released]
|
|
7
|
-
|
|
8
|
-
defaults:
|
|
9
|
-
run:
|
|
10
|
-
shell: bash
|
|
11
|
-
working-directory: ./
|
|
12
|
-
|
|
13
|
-
jobs:
|
|
14
|
-
build-extension-catalog:
|
|
15
|
-
uses: rancher/dashboard/.github/workflows/build-extension-catalog.yml@master
|
|
16
|
-
permissions:
|
|
17
|
-
actions: write
|
|
18
|
-
contents: read
|
|
19
|
-
packages: write
|
|
20
|
-
with:
|
|
21
|
-
registry_target: ghcr.io
|
|
22
|
-
registry_user: ${{ github.actor }}
|
|
23
|
-
secrets:
|
|
24
|
-
registry_token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
name: Build and Release Extension Charts
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
release:
|
|
6
|
-
types: [released]
|
|
7
|
-
|
|
8
|
-
defaults:
|
|
9
|
-
run:
|
|
10
|
-
shell: bash
|
|
11
|
-
working-directory: ./
|
|
12
|
-
|
|
13
|
-
jobs:
|
|
14
|
-
build-extension-charts:
|
|
15
|
-
uses: rancher/dashboard/.github/workflows/build-extension-charts.yml@master
|
|
16
|
-
permissions:
|
|
17
|
-
actions: write
|
|
18
|
-
contents: write
|
|
19
|
-
deployments: write
|
|
20
|
-
pages: write
|
|
21
|
-
with:
|
|
22
|
-
target_branch: gh-pages
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('./.shell/pkg/babel.config.js');
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { importTypes } from '@rancher/auto-import';
|
|
2
|
-
import { IPlugin } from '@shell/core/types';
|
|
3
|
-
|
|
4
|
-
// Init the package
|
|
5
|
-
export default function(plugin: IPlugin): void {
|
|
6
|
-
// Auto-import model, detail, edit from the folders
|
|
7
|
-
importTypes(plugin);
|
|
8
|
-
|
|
9
|
-
// Provide plugin metadata from package.json
|
|
10
|
-
plugin.metadata = require('./package.json');
|
|
11
|
-
|
|
12
|
-
// Load a product
|
|
13
|
-
// plugin.addProduct(require('./product'));
|
|
14
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"allowJs": true,
|
|
4
|
-
"target": "esnext",
|
|
5
|
-
"module": "esnext",
|
|
6
|
-
"strict": true,
|
|
7
|
-
"jsx": "preserve",
|
|
8
|
-
"importHelpers": true,
|
|
9
|
-
"moduleResolution": "node",
|
|
10
|
-
"skipLibCheck": true,
|
|
11
|
-
"esModuleInterop": true,
|
|
12
|
-
"allowSyntheticDefaultImports": true,
|
|
13
|
-
"sourceMap": true,
|
|
14
|
-
"baseUrl": ".",
|
|
15
|
-
"preserveSymlinks": true,
|
|
16
|
-
"typeRoots": [
|
|
17
|
-
"../../node_modules",
|
|
18
|
-
"../../node_modules/@rancher/shell/types"
|
|
19
|
-
],
|
|
20
|
-
"types": [
|
|
21
|
-
"node",
|
|
22
|
-
"webpack-env",
|
|
23
|
-
"@types/node",
|
|
24
|
-
"@types/jest",
|
|
25
|
-
"@types/lodash",
|
|
26
|
-
"rancher",
|
|
27
|
-
"shell"
|
|
28
|
-
],
|
|
29
|
-
"lib": [
|
|
30
|
-
"esnext",
|
|
31
|
-
"dom",
|
|
32
|
-
"dom.iterable",
|
|
33
|
-
"scripthost"
|
|
34
|
-
],
|
|
35
|
-
"paths": {
|
|
36
|
-
"@shell/*": [
|
|
37
|
-
"../../node_modules/@rancher/shell/*"
|
|
38
|
-
],
|
|
39
|
-
"@components/*": [
|
|
40
|
-
"@rancher/components/*"
|
|
41
|
-
]
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
"include": [
|
|
45
|
-
"**/*.ts",
|
|
46
|
-
"**/*.d.ts",
|
|
47
|
-
"**/*.tsx",
|
|
48
|
-
"**/*.vue"
|
|
49
|
-
],
|
|
50
|
-
"exclude": [
|
|
51
|
-
"../../node_modules"
|
|
52
|
-
]
|
|
53
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('./.shell/pkg/vue.config')(__dirname);
|