Skip to content

Commit

Permalink
feat(console): support vm module (#1822)
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-hnny committed Apr 2, 2022
1 parent 0ead002 commit 218a0f4
Show file tree
Hide file tree
Showing 56 changed files with 2,604 additions and 442 deletions.
3 changes: 2 additions & 1 deletion web/console/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"@typescript-eslint/no-this-alias": 1,
"prefer-spread": 1,
"prefer-rest-params": 1,
"@typescript-eslint/triple-slash-reference": 1
"@typescript-eslint/triple-slash-reference": 1,
"@typescript-eslint/explicit-module-boundary-types": "off"
}
}
1 change: 1 addition & 0 deletions web/console/Wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { Icon, Text, Bubble, NavMenu, List, ExternalLink, StatusTip } from 'tea-
import { TkeVersion } from '@/src/modules/common/components/tke-version';
import { ConsoleModuleEnum } from '@config/platform';
import 'tea-component/dist/tea.css';
require('promise.prototype.finally').shim();

const { LoadingTip } = StatusTip;

Expand Down
6 changes: 6 additions & 0 deletions web/console/config/routerConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations under the License.
*/
import { t, Trans } from '@tencent/tea-app/lib/i18n';
import { virtualMachineAPI } from '@src/webApi';

export const firstRouterNameMap = {
overview: t('概览'),
Expand Down Expand Up @@ -83,6 +84,11 @@ const clusterSubRouterConfig = [
{
name: 'CronJob',
path: 'cronjob'
},
{
name: 'VirtualMachine',
path: 'virtual-machine',
visible: ({ clusterId }) => virtualMachineAPI.checkVmEnable(clusterId)
}
]
},
Expand Down
9 changes: 9 additions & 0 deletions web/console/index.tke.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import '@tencent/tchart/build/ChartsComponents';
import { BlankPage } from './blankPage';
import { Overview } from '@src/modules/overview';
import { PlatformTypeEnum } from './config';
import { VNCPage } from '@src/modules/vnc';

const ClusterPromise = import(/* webpackPrefetch: true */ './src/modules/cluster');
const Cluster = React.lazy(() => ClusterPromise);
Expand Down Expand Up @@ -368,6 +369,14 @@ Entry.register({
<BlankPage />
</Wrapper>
)
},

/**
* @url https://{{domain}}/tkestack/vnc
*/
vnc: {
title: t('VNC'),
container: <VNCPage />
}
}
});
Expand Down
146 changes: 119 additions & 27 deletions web/console/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 218a0f4

Please sign in to comment.