Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UI] authorize tensorboard actions #3639

Merged
merged 20 commits into from
Apr 28, 2020
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Fix portable-fetch again
Bobgy committed Apr 28, 2020
commit 883a750fb640bcd896dd28a629cc69c1b08eff16
5 changes: 3 additions & 2 deletions frontend/server/handlers/tensorboard.ts
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ import { Handler } from 'express';
import * as k8sHelper from '../k8s-helper';
import { ViewerTensorboardConfig } from '../configs';
import { AuthServiceApi } from '../src/generated/apis/auth';
import fetch from 'node-fetch';
import { parseError } from '../utils';

export const getTensorboardHandlers = (
@@ -23,8 +24,8 @@ export const getTensorboardHandlers = (
): { get: Handler; create: Handler; delete: Handler } => {
const { apiServerAddress, authzEnabled } = otherConfig;
console.log('api server address ' + apiServerAddress);
// TODO: provide fetch to the constructor and stop importing portable-fetch, or use portable-fetch instead of node-fetch
const authService = new AuthServiceApi({ basePath: apiServerAddress });
// TODO: stop importing portable-fetch, or use portable-fetch instead of node-fetch
const authService = new AuthServiceApi({ basePath: apiServerAddress }, undefined, fetch as any);
/**
* A handler which retrieve the endpoint for a tensorboard instance. The
* handler expects a query string `logdir`.