2021-09-29 11:11:47 -04:00
|
|
|
import { EXTENSION_ICONS } from '~/vue_merge_request_widget/constants';
|
|
|
|
|
2021-09-29 08:11:22 -04:00
|
|
|
export default {
|
|
|
|
name: 'WidgetTestExtension',
|
|
|
|
props: ['targetProjectFullPath'],
|
|
|
|
computed: {
|
|
|
|
summary({ count, targetProjectFullPath }) {
|
|
|
|
return `Test extension summary count: ${count} & ${targetProjectFullPath}`;
|
|
|
|
},
|
|
|
|
statusIcon({ count }) {
|
2021-09-29 11:11:47 -04:00
|
|
|
return count > 0 ? EXTENSION_ICONS.warning : EXTENSION_ICONS.success;
|
2021-09-29 08:11:22 -04:00
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
fetchCollapsedData({ targetProjectFullPath }) {
|
|
|
|
return Promise.resolve({ targetProjectFullPath, count: 1 });
|
|
|
|
},
|
|
|
|
fetchFullData() {
|
|
|
|
return Promise.resolve([
|
|
|
|
{
|
|
|
|
id: 1,
|
|
|
|
text: 'Hello world',
|
|
|
|
icon: {
|
2021-09-30 08:12:36 -04:00
|
|
|
name: EXTENSION_ICONS.failed,
|
2021-09-29 08:11:22 -04:00
|
|
|
},
|
|
|
|
badge: {
|
|
|
|
text: 'Closed',
|
|
|
|
},
|
|
|
|
link: {
|
|
|
|
href: 'https://gitlab.com',
|
|
|
|
text: 'GitLab.com',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|