mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-23 09:08:26 +01: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) {
|
||||
v.icon = this.chartDefaultIcon;
|
||||
|
@ -26,12 +26,10 @@ import { httpStatusCode, AlertType } from './shared.const';
|
||||
* @returns {string}
|
||||
*/
|
||||
export const errorHandler = function (error: any): string {
|
||||
if (!error) {
|
||||
return "UNKNOWN_ERROR";
|
||||
}
|
||||
if (!(error.statusCode || error.status)) {
|
||||
let errorObj = error.json();
|
||||
if (errorObj && errorObj.error) {
|
||||
// treat as string message
|
||||
return '' + error;
|
||||
return errorObj.error;
|
||||
} else {
|
||||
switch (error.statusCode || error.status) {
|
||||
case 400:
|
||||
|
Loading…
Reference in New Issue
Block a user