mirror of
https://github.com/goharbor/harbor
synced 2024-09-21 00:24:31 +00:00
Merge pull request #5537 from zhoumeina/pr/fix_helm_chart_log
Fix helm chart getImageLink was deleted by accident
This commit is contained in:
commit
9bcf33212d
|
@ -290,6 +290,14 @@ export class ChartVersionComponent implements OnInit {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getImgLink(v: HelmChartVersion) {
|
||||||
|
if (v.icon) {
|
||||||
|
return v.icon;
|
||||||
|
} else {
|
||||||
|
return DefaultHelmIcon;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
getDefaultIcon(v: HelmChartVersion) {
|
getDefaultIcon(v: HelmChartVersion) {
|
||||||
v.icon = this.chartDefaultIcon;
|
v.icon = this.chartDefaultIcon;
|
||||||
|
|
|
@ -26,12 +26,10 @@ import { httpStatusCode, AlertType } from './shared.const';
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
export const errorHandler = function (error: any): string {
|
export const errorHandler = function (error: any): string {
|
||||||
if (!error) {
|
let errorObj = error.json();
|
||||||
return "UNKNOWN_ERROR";
|
if (errorObj && errorObj.error) {
|
||||||
}
|
|
||||||
if (!(error.statusCode || error.status)) {
|
|
||||||
// treat as string message
|
// treat as string message
|
||||||
return '' + error;
|
return errorObj.error;
|
||||||
} else {
|
} else {
|
||||||
switch (error.statusCode || error.status) {
|
switch (error.statusCode || error.status) {
|
||||||
case 400:
|
case 400:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user