Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
50da623
test
GiorunoGiovanna Jun 2, 2021
e2f6e2a
Merge branch 'main' of https://github.com/GiorunoGiovanna/function-st…
GiorunoGiovanna Jun 2, 2021
72b4333
test
GiorunoGiovanna Jun 3, 2021
b534dd4
test
GiorunoGiovanna Jun 3, 2021
2087e36
Support multi input topics config
GiorunoGiovanna Jun 3, 2021
6beab86
Support multi-input-topics config
GiorunoGiovanna Jun 3, 2021
54cac9c
[#6]Support multi-input-topics config
GiorunoGiovanna Jun 4, 2021
a4362db
create images management
GiorunoGiovanna Jun 8, 2021
d21b190
create images management
GiorunoGiovanna Jun 8, 2021
59f1452
create images management
GiorunoGiovanna Jun 8, 2021
17b66e7
Merge pull request #1 from FunctionStream/main
GiorunoGiovanna Jun 8, 2021
bc6b191
update inputs
GiorunoGiovanna Jun 12, 2021
d63c7bb
update inputs
GiorunoGiovanna Jun 13, 2021
1b662be
Merge branch 'main' into main
GiorunoGiovanna Jun 13, 2021
9ce15cb
Delete index.vue
GiorunoGiovanna Jun 13, 2021
ccfd358
Merge pull request #2 from GiorunoGiovanna/0.2-images
GiorunoGiovanna Jun 13, 2021
dbc90c3
Delete AddForm.vue
GiorunoGiovanna Jun 13, 2021
0ad2ed4
Delete FunctionDetail.vue
GiorunoGiovanna Jun 13, 2021
511e5dc
Delete FunctionTable.vue
GiorunoGiovanna Jun 13, 2021
1950e43
Delete Trigger.vue
GiorunoGiovanna Jun 13, 2021
cb882af
Update router.config.js
GiorunoGiovanna Jun 13, 2021
deb436d
Update func.js
GiorunoGiovanna Jun 13, 2021
ac6f628
Update func.js
GiorunoGiovanna Jun 13, 2021
bee1f79
Update front-end/src/mock/services/func.js
GiorunoGiovanna Jun 13, 2021
b9a136c
Update front-end/src/views/function/components/AddForm.vue
GiorunoGiovanna Jun 13, 2021
f690162
Update front-end/src/views/function/components/AddForm.vue
GiorunoGiovanna Jun 13, 2021
dcc42a1
Update front-end/src/views/function/components/AddForm.vue
GiorunoGiovanna Jun 13, 2021
b613efe
fix bug and clean up comment
GiorunoGiovanna Jun 13, 2021
b9584a5
Update front-end/src/views/function/components/AddForm.vue
GiorunoGiovanna Jun 13, 2021
0f30c13
Update front-end/src/views/function/components/AddForm.vue
GiorunoGiovanna Jun 13, 2021
dad86a2
clean up comments
GiorunoGiovanna Jun 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions front-end/src/api/func.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const funcApi = {
status: ({ funcName }) => `/function/${funcName}/status`,
trigger: ({ funcName }) => `/function/${funcName}/trigger`,
deleteFunc: ({ funcName }) => `/function/${funcName}/delete`,
addFunc: ({ funcName }) => `/function/${funcName}/add`,
}

export function getList() {
Expand Down Expand Up @@ -40,5 +41,9 @@ export function deleteFunc(funcName) {
return post(funcApi.deleteFunc({ funcName }));
}

export function addFunc (funcName, data) {
return post(funcApi.addFunc({ funcName }), { data })
}



1 change: 0 additions & 1 deletion front-end/src/config/router.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export const asyncRouterMap = [
meta: { title: 'menu.function', icon: 'table' },
component: () => import('@/views/function/index')
}

]
},
{
Expand Down
7 changes: 6 additions & 1 deletion front-end/src/mock/services/func.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ const trigger = (option) => {
return `${data}!!!`;
}

const addFunc = (option) => {
console.log("Test value return to the frontend:",option)
return 0
}

const deleteFunc = { result: 0 };

get(/\/function\/list/, list);
Expand All @@ -124,4 +129,4 @@ get(/\/function\/[^/]*\/stats/, stats);
get(/\/function\/[^/]*\/status/, status);
post(/\/function\/[^/]*\/trigger/, trigger);
post(/\/function\/[^/]*\/delete/, deleteFunc);

post(/\/function\/[^/]*\/add/, addFunc);
15 changes: 7 additions & 8 deletions front-end/src/utils/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import notification from 'ant-design-vue/es/notification'
import { VueAxios } from './axios'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import nProgress from 'nprogress'
import '@/components/NProgress/nprogress.less';
import '@/components/NProgress/nprogress.less'

// 创建 axios 实例
const request = axios.create({
Expand All @@ -18,7 +18,7 @@ nProgress.configure({ showSpinner: false })

// 异常拦截处理器
const errorHandler = (error) => {
console.error(error);
console.error(error)
if (error.response) {
const data = error.response.data
// 从 localstorage 获取 token
Expand All @@ -44,17 +44,17 @@ const errorHandler = (error) => {
}
if (error.response.status === 404) {
notification.error({
message: '404 Not Found',
message: '404 Not Found'
})
}
}
nProgress.done();
nProgress.done()
return Promise.reject(error)
}

// request interceptor
request.interceptors.request.use(config => {
nProgress.start();
nProgress.start()
const token = storage.get(ACCESS_TOKEN)
// 如果 token 存在
// 让每个请求携带自定义 token 请根据实际情况自行修改
Expand All @@ -64,16 +64,15 @@ request.interceptors.request.use(config => {
return config
}, errorHandler)


// response interceptor
request.interceptors.response.use((response) => {
nProgress.done();
nProgress.done()
return response.data
}, errorHandler)

const installer = {
vm: {},
install(Vue) {
install (Vue) {
Vue.use(VueAxios, request)
}
}
Expand Down
Loading