| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- /* eslint-disable max-len */
- /* eslint-disable import/no-extraneous-dependencies */
- /* eslint-disable @typescript-eslint/no-var-requires */
- const router = require('express').Router();
- const Mock = require('mockjs');
- const wrapper = require('../wrapper');
- const { Random } = Mock;
- router.delete('', (_, res) => {
- res.json(wrapper('success'));
- });
- router.post('', (_, res) => {
- res.json(wrapper('success'));
- });
- router.get('/list', (req, res) => {
- res.json(wrapper(
- Mock.mock(
- {
- 'data|10': [{
- accessUrl: Random.url('http', 'production.seecoder.cn'),
- 'name|1': ['MySQL', 'Java', 'Node'],
- status: '正常',
- 'id|+5': 101,
- pipelineId: 100,
- deployedTime: Random.datetime(),
- }],
- },
- ).data,
- ));
- });
- router.get('/log', (req, res) => {
- res.json(wrapper(`2021-03-16 00:01:58.621 INFO 20584 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
- 2021-03-16 00:01:58.622 INFO 20584 --- [ main] d.s.w.p.DocumentationPluginsBootstrapper : Context refreshed
- 2021-03-16 00:01:58.634 INFO 20584 --- [ main] d.s.w.p.DocumentationPluginsBootstrapper : Found 1 custom documentation plugin(s)
- 2021-03-16 00:01:58.641 INFO 20584 --- [ main] s.d.s.w.s.ApiListingReferenceScanner : Scanning for api listing references
- 2021-03-16 00:01:58.974 INFO 20584 --- [ main] DeferredRepositoryInitializationListener : Triggering deferred initialization of Spring Data repositories…
- 2021-03-16 00:01:58.975 INFO 20584 --- [ main] DeferredRepositoryInitializationListener : Spring Data repositories initialized!
- 2021-03-16 00:01:58.993 INFO 20584 --- [ main] s.devcloud.web.DevcloudWebApplication : Started DevcloudWebApplication in 6.659 seconds (JVM running for 8.913)
- 2021-03-16 00:12:39.211 INFO 20584 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
- 2021-03-16 00:12:39.211 INFO 20584 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
- 2021-03-16 00:12:39.222 INFO 20584 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 11 ms`));
- });
- module.exports = router;
|