Skip to content

Commit

Permalink
修改接口路径
Browse files Browse the repository at this point in the history
  • Loading branch information
zwx-master authored and peacewong committed Dec 6, 2019
1 parent d0cfbf5 commit f5f6101
Show file tree
Hide file tree
Showing 21 changed files with 90 additions and 89 deletions.
2 changes: 1 addition & 1 deletion src/js/component/uploadDialog/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default {
this.msg = '(上传脚本文件不得超过100MB!)';
this.maxSize = 102400;
}
this.updateUrl = `${data.apiPrefix}publicservice/upload`;
this.updateUrl = `${data.apiPrefix}filesystem/upload`;
},
// 关闭的时候清空数据
Expand Down
32 changes: 16 additions & 16 deletions src/js/module/fnSidebar/fnSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export default {
created() {
this.initTreeData();
this.$nextTick(() => {
api.fetch('/publicservice/authenticate').then((rst) => {
api.fetch('/udf/authenticate').then((rst) => {
this.isUdfManager = rst.isUDFManager;
});
});
Expand All @@ -191,7 +191,7 @@ export default {
const fnTree = storage.get(tmp, 'SESSION');
if (!fnTree || _.isEmpty(fnTree)) {
this.treeLoading = true;
api.fetch('/publicservice/list', {
api.fetch('/udf/list', {
type: 'self',
treeId: -1,
category: this.FNTYPE,
Expand Down Expand Up @@ -222,7 +222,7 @@ export default {
benchCheck(...args) {
if (this.loading) return this.$Message.warning('请等待接口返回!');
const node = args[0].node.data;
const url = `/publicservice/isload`;
const url = `/udf/isload`;
this.loading = true;
api.fetch(url, {
udfId: node.id,
Expand Down Expand Up @@ -252,7 +252,7 @@ export default {
let params = null;
let url = null;
if (!data.isLeaf) {
url = '/publicservice/tree/add';
url = '/udf/tree/add';
params = {
parent: this.currentNode.data.id,
name: data.name,
Expand All @@ -261,7 +261,7 @@ export default {
};
this.calling(url, params, 'new', data.isLeaf);
} else {
url = '/publicservice/add';
url = '/udf/add';
params = {
isShared: data.shared,
udfInfo: {
Expand Down Expand Up @@ -293,7 +293,7 @@ export default {
let params = null;
let url = null;
if (!data.isLeaf) {
url = '/publicservice/tree/update';
url = '/udf/tree/update';
params = {
id: this.currentNode.data.id,
parent: this.currentNode.parent.data.id,
Expand All @@ -302,7 +302,7 @@ export default {
category: this.FNTYPE,
};
} else {
url = '/publicservice/update';
url = '/udf/update';
params = {
isShared: data.shared,
udfInfo: {
Expand Down Expand Up @@ -413,12 +413,12 @@ export default {
let url;
let param;
if (this.currentNode.isLeaf) {
url = `/publicservice/delete/${this.currentNode.data.id}`;
url = `/udf/delete/${this.currentNode.data.id}`;
param = {
isShared: this.currentNode.data.shared,
};
} else {
url = `/publicservice/tree/delete/${this.currentNode.data.id}`;
url = `/udf/tree/delete/${this.currentNode.data.id}`;
param = {};
}
api.fetch(url, param, 'get').then((rst) => {
Expand All @@ -436,7 +436,7 @@ export default {
if (this.treeLoading) return this.$Message.warning('请等待接口返回!');
this.treeLoading = true;
const node = this.fnTree.find((item) => item.type === 'share');
api.fetch('/publicservice/list', {
api.fetch('/udf/list', {
type: node.type,
treeId: node.id,
category: this.FNTYPE,
Expand All @@ -447,7 +447,7 @@ export default {
const params = {
udfName: this.currentNode.data.name,
};
api.fetch('/publicservice/getSharedUsers', params).then((rst) => {
api.fetch('/udf/getSharedUsers', params).then((rst) => {
this.$refs.share.open({ tree: list, node: this.currentNode, isView: !flag, shareUser: rst.shareUsers.toString() });
});
}
Expand Down Expand Up @@ -481,7 +481,7 @@ export default {
useFormat: node.useFormat,
},
};
api.fetch('/publicservice/shareUDF', params).then(() => {
api.fetch('/udf/shareUDF', params).then(() => {
this.loading = false;
this.$Message.success(`函数${this.currentNode.data.name}已共享成功!`);
this.refresh('edit');
Expand All @@ -495,7 +495,7 @@ export default {
udfName: this.currentNode.data.name,
sharedUsers: option.sharedUsers,
};
api.fetch('/publicservice/updateSharedUsers', params).then(() => {
api.fetch('/udf/updateSharedUsers', params).then(() => {
this.loading = false;
this.$Message.success(`修改共享用户成功!`);
}).catch((err) => {
Expand All @@ -511,7 +511,7 @@ export default {
udfId: this.currentNode.data.id,
udfName: this.currentNode.data.name,
};
api.fetch('/publicservice/setExpire', params).then((rst) => {
api.fetch('/udf/setExpire', params).then((rst) => {
this.currentNode.data.shared = false;
this.$Message.success('函数已设置为过期,请到共享函数中查看!');
});
Expand Down Expand Up @@ -564,7 +564,7 @@ export default {
// 请求文件夹数据
loadDataFn(node, cb) {
this.treeLoading = true;
api.fetch('/publicservice/list', {
api.fetch('/udf/list', {
type: node.data.type,
treeId: node.data.id,
category: this.FNTYPE,
Expand Down Expand Up @@ -624,7 +624,7 @@ export default {
const parent = this.lookForChangeNode(id, this.fnTree, 'tree');
if (parent) {
this.treeLoading = true;
api.fetch('/publicservice/list', {
api.fetch('/udf/list', {
type: parent.type,
treeId: parent.id,
category: this.FNTYPE,
Expand Down
2 changes: 1 addition & 1 deletion src/js/module/fnSidebar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
data: {},
methods: {
getAllLoadedFunction(cb) {
api.fetch(`/publicservice/all`).then((rst) => {
api.fetch(`/udf/all`).then((rst) => {
cb({
list: rst.udfTree.udfInfos,
isError: false,
Expand Down
2 changes: 1 addition & 1 deletion src/js/module/footer/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default {
},
methods: {
getRunningJob() {
api.fetch('/publicservice/list', {
api.fetch('/jobhistory/list', {
pageSize: 100,
status: 'Running,Inited,Scheduled',
}, 'get').then((rst) => {
Expand Down
31 changes: 16 additions & 15 deletions src/js/module/globalHistory/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -373,25 +373,26 @@ export default {
const match = supportModes.find((s) => s.rule.test(params.row.fileName));
const ext = match ? match.ext : '.hql';
if (!params.row.logPath) {
await api.fetch(`/query/${params.row.taskID}/get`, 'get').then((rst) => {
await api.fetch(`/jobhistory/${params.row.taskID}/get`, 'get').then((rst) => {
params.row.logPath = rst.task.logPath;
});
}
const name = `history_item_${params.row.taskID}${ext}`;
const md5Id = util.md5(name);
this.$router.push({path: '/', query: {
id: md5Id,
taskID: params.row.taskID,
filename: name,
filepath: '',
saveAs: true,
type: 'historyScript',
code: params.row.executionCode,
}});
this.$router.push({ path: '/',
query: {
id: md5Id,
taskID: params.row.taskID,
filename: name,
filepath: '',
saveAs: true,
type: 'historyScript',
code: params.row.executionCode,
} });
}
},
getLogs(jobId) {
api.fetch(`/query/${jobId}/get`, 'get').then((res) => {
api.fetch(`/jobhistory/${jobId}/get`, 'get').then((res) => {
this.searchBar.lastId = Number(this.searchBar.id);
this.searchBar.id = jobId;
this.searchBar.lastProxyUser = this.searchBar.proxyUser;
Expand All @@ -401,7 +402,7 @@ export default {
const errCode = res.task.errCode ? '\n错误码:' + res.task.errCode : '';
const errDesc = res.task.errDesc ? '\n错误描述:' + res.task.errDesc : '';
const info = '未获取到日志!' + errCode + errDesc;
this.logs = {all: info, error: '', warning: '', info: ''};
this.logs = { all: info, error: '', warning: '', info: '' };
this.fromLine = 1;
return;
}
Expand All @@ -411,7 +412,7 @@ export default {
}, 'get').then((rst) => {
this.isLoading = false;
if (rst) {
const log = {all: '', error: '', warning: '', info: ''};
const log = { all: '', error: '', warning: '', info: '' };
const convertLogs = util.convertLog(rst.log);
Object.keys(convertLogs).forEach((key) => {
if (convertLogs[key]) {
Expand Down Expand Up @@ -470,7 +471,7 @@ export default {
changePage(page) {
this.isLoading = true;
const params = this.getParams(page);
api.fetch('/publicservice/list', params, 'get').then((rst) => {
api.fetch('/jobhistory/list', params, 'get').then((rst) => {
this.isLoading = false;
this.list = rst.tasks;
this.pageSetting.current = page;
Expand All @@ -483,7 +484,7 @@ export default {
search() {
this.isLoading = true;
const params = this.getParams();
api.fetch('/publicservice/list', params, 'get').then((rst) => {
api.fetch('/jobhistory/list', params, 'get').then((rst) => {
this.pageSetting.total = rst.totalPage;
this.isLoading = false;
this.list = rst.tasks;
Expand Down
2 changes: 1 addition & 1 deletion src/js/module/globalValiable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
},
methods: {
getGlobalVariable(cb) {
api.fetch('/publicservice/listGlobalVariable', 'get').then((res) => {
api.fetch('/variable/listGlobalVariable', 'get').then((res) => {
cb({
list: res.globalVariables,
isError: false,
Expand Down
4 changes: 2 additions & 2 deletions src/js/module/globalValiable/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export default {
},
methods: {
getGlobalValiableList() {
api.fetch('/publicservice/listGlobalVariable', 'get').then((res) => {
api.fetch('/variable/listGlobalVariable', 'get').then((res) => {
this.formDynamic.items = res.globalVariables.map((item, index) => {
return Object.assign(item);
});
Expand Down Expand Up @@ -157,7 +157,7 @@ export default {
},
save() {
this.loading = true;
api.fetch('/publicservice/saveGlobalVariable ', {
api.fetch('/variable/saveGlobalVariable ', {
globalVariables: this.formDynamic.items,
}).then((res) => {
this.loading = false;
Expand Down
18 changes: 9 additions & 9 deletions src/js/module/hdfsSidebar/hdfsSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export default {
getRootPath(cb) {
this.rootPath = storage.get('hdfsRootPath', 'SESSION');
if (!this.rootPath) {
api.fetch(`/publicservice/getUserRootPath`, {
api.fetch(`/filesystem/getUserRootPath`, {
pathType: 'hdfs',
}, 'get').then((rst) => {
if (rst.userHDFSRootPath) {
Expand All @@ -254,7 +254,7 @@ export default {
}
},
getTree(cb) {
api.fetch(`/publicservice/getDirFileTrees`, {
api.fetch(`/filesystem/getDirFileTrees`, {
path: this.rootPath,
}, 'get')
.then((rst) => {
Expand Down Expand Up @@ -354,7 +354,7 @@ export default {
});
},
handleCreating(node, cb) {
api.fetch('/publicservice/createNewDir', {
api.fetch('/filesystem/createNewDir', {
path: node.path,
}).then(() => {
cb(true);
Expand All @@ -363,7 +363,7 @@ export default {
});
},
rename(path, oldPath, cb) {
api.fetch('/publicservice/rename', {
api.fetch('/filesystem/rename', {
oldDest: oldPath,
newDest: path,
}).then((rst) => {
Expand All @@ -386,7 +386,7 @@ export default {
cb(false);
return this.$Message.error(`文件${path}已经存在`);
}
api.fetch('/publicservice/rename', {
api.fetch('/filesystem/rename', {
oldDest: args.node.path,
newDest: path,
}).then(() => {
Expand Down Expand Up @@ -435,7 +435,7 @@ export default {
const path = this.currentNode.data.path;
this.loading = true;
this.dispatch('Workbench:remove', path, () => {
api.fetch('/publicservice/deleteDirOrFile', {
api.fetch('/filesystem/deleteDirOrFile', {
path,
}).then((rst) => {
this.$Message.success('删除成功');
Expand Down Expand Up @@ -481,7 +481,7 @@ export default {
},
loadDataFn(node, cb) {
this.treeLoading = true;
api.fetch(`/publicservice/getDirFileTrees`, {
api.fetch(`/filesystem/getDirFileTrees`, {
path: node.data.path,
}, 'get')
.then((rst) => {
Expand Down Expand Up @@ -529,7 +529,7 @@ export default {
nodePath = path.slice(0, path.lastIndexOf('/'));
}
if (_.isEmpty(this.fileTree)) return this.initData();
api.fetch(`/publicservice/getDirFileTrees`, {
api.fetch(`/filesystem/getDirFileTrees`, {
path: nodePath,
}, 'get')
.then((rst) => {
Expand Down Expand Up @@ -667,7 +667,7 @@ export default {
escapeQuotes = true;
quote = option.quote;
}
const url = `/publicservice/formate?path=${option.exportPath}&encoding=${encoding}&fieldDelimiter=${fieldDelimiter}&hasHeader=${option.isHasHeader}&escapeQuotes=${escapeQuotes}&quote=${quote}`;
const url = `/filesystem/formate?path=${option.exportPath}&encoding=${encoding}&fieldDelimiter=${fieldDelimiter}&hasHeader=${option.isHasHeader}&escapeQuotes=${escapeQuotes}&quote=${quote}`;
api.fetch(url, {}, {
method: 'get',
timeout: '600000',
Expand Down
2 changes: 1 addition & 1 deletion src/js/module/header/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default {
},
methods: {
init() {
api.fetch('/publicservice/getBaseInfo', 'get').then((rst) => {
api.fetch('/application/getBaseInfo', 'get').then((rst) => {
if (!_.isEmpty(rst)) {
this.userName = rst.userInfo.basic.userName;
storage.set('baseInfo', rst);
Expand Down
2 changes: 1 addition & 1 deletion src/js/module/logView/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export default {
duration: 1000,
});
} else if (this.jobId.length > 0) {
await api.fetch(`/query/${this.jobId}/get`, 'get').then((res) => {
await api.fetch(`/jobhistory/${this.jobId}/get`, 'get').then((res) => {
const path = res.task.logPath;
api.fetch('/filesystem/openLog', {
path,
Expand Down
2 changes: 1 addition & 1 deletion src/js/module/resourceSimple/job.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default {
methods: {
getJobList() {
this.jobList = [];
api.fetch('/publicservice/list', {
api.fetch('/jobhistory/list', {
pageSize: 100,
status: 'Running,Inited,Scheduled',
}, 'get').then((rst) => {
Expand Down
4 changes: 2 additions & 2 deletions src/js/module/setting/setting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default {
creator = IDE;
appName = type.slice(IDE.length + 1, type.length);
}
api.fetch('/publicservice/getFullTreesByAppName', {
api.fetch('/configuration/getFullTreesByAppName', {
appName,
creator,
}, 'get').then((rst) => {
Expand All @@ -135,7 +135,7 @@ export default {
},
save() {
this.loading = true;
api.fetch('/publicservice/saveFullTree', {
api.fetch('/configuration/saveFullTree', {
fullTree: this.fullTree,
}).then((rst) => {
this.getAppVariable(this.activeMenu);
Expand Down
Loading

0 comments on commit f5f6101

Please sign in to comment.