Issue #2174 - Fix git repo url parsing on application list view (#2175)

This commit is contained in:
Alexander Matyushentsev 2019-08-20 09:16:10 -07:00 committed by Alex Collins
parent b7377a1080
commit b96a3aa401

View file

@ -1,5 +1,6 @@
import { DropDownMenu, Tooltip } from 'argo-ui';
import * as React from 'react';
const GitUrlParse = require('git-url-parse');
import { Cluster } from '../../../shared/components';
import { Consumer } from '../../../shared/context';
@ -10,7 +11,7 @@ import * as AppUtils from '../utils';
require('./applications-table.scss');
function shortRepo(repo: string) {
const url = new URL(repo);
const url = GitUrlParse(repo);
return <Tooltip content={repo}><span>{url.pathname.slice(1)}</span></Tooltip>;
}