diff --git a/resources/i18n/en.json5 b/resources/i18n/en.json5 index 90efd4f437..c5e2c0d751 100644 --- a/resources/i18n/en.json5 +++ b/resources/i18n/en.json5 @@ -1316,6 +1316,8 @@ "menu.section.icon.pin": "Pin sidebar", + "menu.section.icon.processes": "Processes menu section", + "menu.section.icon.registries": "Registries menu section", "menu.section.icon.statistics_task": "Statistics Task menu section", @@ -1342,6 +1344,8 @@ "menu.section.new_item_version": "Item Version", + "menu.section.new_process": "Process", + "menu.section.pin": "Pin sidebar", @@ -1350,6 +1354,10 @@ + "menu.section.processes": "Processes", + + + "menu.section.registries": "Registries", "menu.section.registries_format": "Format", @@ -1534,38 +1542,81 @@ - "process.page.detail.arguments" : "Arguments", + "process.new.select-parameters": "Parameters", - "process.page.detail.arguments.empty" : "This process doesn't contain any arguments", + "process.new.cancel": "Cancel", - "process.page.detail.back" : "Back", + "process.new.submit": "Submit", - "process.page.detail.output" : "Process Output", + "process.new.select-script": "Script", - "process.page.detail.output.alert" : "Work in progress - Process output is not available yet", + "process.new.select-script.placeholder": "Choose a script...", - "process.page.detail.output-files" : "Output Files", + "process.new.select-script.required": "Script is required", - "process.page.detail.output-files.empty" : "This process doesn't contain any output files", + "process.new.parameter.file.upload-button": "Select file...", - "process.page.detail.script" : "Script", + "process.new.parameter.file.required": "Please select a file", - "process.page.detail.title" : "Process: {{ id }} - {{ name }}", + "process.new.parameter.string.required": "Parameter value is required", - "process.page.overview.table.finish" : "Finish time", + "process.new.parameter.type.value": "value", - "process.page.overview.table.id" : "Process ID", + "process.new.parameter.type.file": "file", - "process.page.overview.table.name" : "Name", + "process.new.parameter.required.missing": "The following parameters are required but still missing:", - "process.page.overview.table.start" : "Start time", + "process.new.notification.success.title": "Success", - "process.page.overview.table.status" : "Status", + "process.new.notification.success.content": "The process was successfully created", - "process.page.overview.table.user" : "User", + "process.new.notification.error.title": "Error", - "process.page.overview.title": "Processes Overview", + "process.new.notification.error.content": "An error occurred while creating this process", + "process.new.header": "Create a new process", + + "process.new.title": "Create a new process", + + "process.new.breadcrumbs": "Create a new process", + + + + "process.detail.arguments" : "Arguments", + + "process.detail.arguments.empty" : "This process doesn't contain any arguments", + + "process.detail.back" : "Back", + + "process.detail.output" : "Process Output", + + "process.detail.output.alert" : "Work in progress - Process output is not available yet", + + "process.detail.output-files" : "Output Files", + + "process.detail.output-files.empty" : "This process doesn't contain any output files", + + "process.detail.script" : "Script", + + "process.detail.title" : "Process: {{ id }} - {{ name }}", + + + + "process.overview.table.finish" : "Finish time", + + "process.overview.table.id" : "Process ID", + + "process.overview.table.name" : "Name", + + "process.overview.table.start" : "Start time", + + "process.overview.table.status" : "Status", + + "process.overview.table.user" : "User", + + "process.overview.title": "Processes Overview", + + "process.overview.breadcrumbs": "Processes Overview", "profile.breadcrumbs": "Update Profile", @@ -1648,44 +1699,6 @@ - "process.new.select-parameters": "Parameters", - - "process.new.cancel": "Cancel", - - "process.new.submit": "Submit", - - "process.new.select-script": "Script", - - "process.new.select-script.placeholder": "Choose a script...", - - "process.new.select-script.required": "Script is required", - - "process.new.parameter.file.upload-button": "Select file...", - - "process.new.parameter.file.required": "Please select a file", - - "process.new.parameter.string.required": "Parameter value is required", - - "process.new.parameter.type.value": "value", - - "process.new.parameter.type.file": "file", - - "process.new.parameter.required.missing": "The following parameters are required but still missing:", - - "process.new.notification.success.title": "Success", - - "process.new.notification.success.content": "The process was successfully created", - - "process.new.notification.error.title": "Error", - - "process.new.notification.error.content": "An error occurred while creating this process", - - "process.new.header": "Create a new process", - - "process.new.title": "Create a new process", - - - "publication.listelement.badge": "Publication", "publication.page.description": "Description", diff --git a/src/app/+admin/admin-sidebar/admin-sidebar.component.ts b/src/app/+admin/admin-sidebar/admin-sidebar.component.ts index e3f55b8e18..89da09b21c 100644 --- a/src/app/+admin/admin-sidebar/admin-sidebar.component.ts +++ b/src/app/+admin/admin-sidebar/admin-sidebar.component.ts @@ -145,11 +145,17 @@ export class AdminSidebarComponent extends MenuComponent implements OnInit { this.modalService.open(CreateItemParentSelectorComponent); } } as OnClickMenuItemModel, - // model: { - // type: MenuItemType.LINK, - // text: 'menu.section.new_item', - // link: '/submit' - // } as LinkMenuItemModel, + }, + { + id: 'new_process', + parentID: 'new', + active: false, + visible: true, + model: { + type: MenuItemType.LINK, + text: 'menu.section.new_process', + link: '/processes/new' + } as LinkMenuItemModel, }, { id: 'new_item_version', @@ -439,6 +445,18 @@ export class AdminSidebarComponent extends MenuComponent implements OnInit { icon: 'cogs', index: 9 }, + { + id: 'processes', + active: false, + visible: true, + model: { + type: MenuItemType.LINK, + text: 'menu.section.processes', + link: '/processes' + } as LinkMenuItemModel, + icon: 'terminal', + index: 10 + }, ]; menuList.forEach((menuSection) => this.menuService.addSection(this.menuID, menuSection)); diff --git a/src/app/core/breadcrumbs/i18n-breadcrumb.resolver.spec.ts b/src/app/core/breadcrumbs/i18n-breadcrumb.resolver.spec.ts index d34d6d8a9b..6b640a9db0 100644 --- a/src/app/core/breadcrumbs/i18n-breadcrumb.resolver.spec.ts +++ b/src/app/core/breadcrumbs/i18n-breadcrumb.resolver.spec.ts @@ -1,21 +1,38 @@ import { I18nBreadcrumbResolver } from './i18n-breadcrumb.resolver'; +import { URLCombiner } from '../url-combiner/url-combiner'; describe('I18nBreadcrumbResolver', () => { describe('resolve', () => { let resolver: I18nBreadcrumbResolver; let i18nBreadcrumbService: any; let i18nKey: string; - let path: string; + let route: any; + let parentSegment; + let segment; + let expectedPath; beforeEach(() => { i18nKey = 'example.key'; - path = 'rest.com/path/to/breadcrumb'; + parentSegment = 'path'; + segment = 'breadcrumb'; + route = { + data: { breadcrumbKey: i18nKey }, + routeConfig: { + path: segment + }, + parent: { + routeConfig: { + path: parentSegment + } + } as any + }; + expectedPath = new URLCombiner(parentSegment, segment).toString(); i18nBreadcrumbService = {}; resolver = new I18nBreadcrumbResolver(i18nBreadcrumbService); }); it('should resolve the breadcrumb config', () => { - const resolvedConfig = resolver.resolve({ data: { breadcrumbKey: i18nKey }, url: [path] } as any, {} as any); - const expectedConfig = { provider: i18nBreadcrumbService, key: i18nKey, url: path }; + const resolvedConfig = resolver.resolve(route, {} as any); + const expectedConfig = { provider: i18nBreadcrumbService, key: i18nKey, url: expectedPath }; expect(resolvedConfig).toEqual(expectedConfig); }); diff --git a/src/app/process-page/detail/process-detail.component.html b/src/app/process-page/detail/process-detail.component.html index d73b817ddc..b93ad22d0c 100644 --- a/src/app/process-page/detail/process-detail.component.html +++ b/src/app/process-page/detail/process-detail.component.html @@ -1,16 +1,16 @@
{{'process.page.overview.table.id' | translate}} | -{{'process.page.overview.table.name' | translate}} | -{{'process.page.overview.table.user' | translate}} | -{{'process.page.overview.table.start' | translate}} | -{{'process.page.overview.table.finish' | translate}} | -{{'process.page.overview.table.status' | translate}} | +{{'process.overview.table.id' | translate}} | +{{'process.overview.table.name' | translate}} | +{{'process.overview.table.user' | translate}} | +{{'process.overview.table.start' | translate}} | +{{'process.overview.table.finish' | translate}} | +{{'process.overview.table.status' | translate}} |
---|