fix(templates): replace templates links (#4083)

pull/4073/head
Chaim Lev-Ari 2020-07-22 21:41:07 +03:00 committed by GitHub
parent 6f6bc24efd
commit 4534ccb499
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 12 additions and 12 deletions

View File

@ -5,7 +5,7 @@
<div class="toolBarTitle"> <i class="fa" ng-class="$ctrl.titleIcon" aria-hidden="true" style="margin-right: 2px;"></i> {{ $ctrl.titleText }} </div>
</div>
<div class="actionBar">
<button type="button" class="btn btn-sm btn-primary" ui-sref="portainer.templates.custom.new">
<button type="button" class="btn btn-sm btn-primary" ui-sref="docker.templates.custom.new">
<i class="fa fa-plus space-right" aria-hidden="true"></i>Add Custom Template
</button>
</div>
@ -32,7 +32,7 @@
>
<template-item-actions>
<div ng-if="$ctrl.isEditAllowed(template)" style="display: flex;">
<a ui-sref="portainer.templates.custom.edit({id: template.Id})" ng-click="$event.stopPropagation();" class="btn btn-primary btn-xs" style="margin-right: 10px;">
<a ui-sref="docker.templates.custom.edit({id: template.Id})" ng-click="$event.stopPropagation();" class="btn btn-primary btn-xs" style="margin-right: 10px;">
Edit
</a>
<button class="btn btn-danger btn-xs" ng-click="$ctrl.onDeleteClick(template.Id); $event.stopPropagation();">Delete</button>

View File

@ -60,7 +60,7 @@ function TemplateListController($async, $state, DatatableService, Notifications,
if (template.Type === 3) {
type = 2;
}
$state.go('portainer.templates.custom.new', { fileContent, type });
$state.go('docker.templates.custom.new', { fileContent, type });
} catch (err) {
Notifications.error('Failure', err, 'Failed to duplicate template');
}

View File

@ -1,6 +1,6 @@
<rd-header>
<rd-header-title title-text="Create Custom template"></rd-header-title>
<rd-header-content> <a ui-sref="portainer.templates.custom">Custom Templates</a> &gt; Create Custom template </rd-header-content>
<rd-header-content> <a ui-sref="docker.templates.custom">Custom Templates</a> &gt; Create Custom template </rd-header-content>
</rd-header>
<div class="row" ng-if="!$ctrl.state.loading">

View File

@ -71,7 +71,7 @@ class CreateCustomTemplateViewController {
await this.ResourceControlService.applyResourceControl(userId, accessControlData, ResourceControl);
this.Notifications.success('Custom template successfully created');
this.$state.go('portainer.templates.custom');
this.$state.go('docker.templates.custom');
} catch (err) {
this.Notifications.error('Deployment error', err, 'Unable to create custom template');
} finally {

View File

@ -1,6 +1,6 @@
<rd-header id="view-top">
<rd-header-title title-text="Custom Templates">
<a data-toggle="tooltip" title="Refresh" ui-sref="portainer.templates.custom" ui-sref-opts="{reload: true}">
<a data-toggle="tooltip" title="Refresh" ui-sref="docker.templates.custom" ui-sref-opts="{reload: true}">
<i class="fa fa-sync" aria-hidden="true"></i>
</a>
</rd-header-title>

View File

@ -140,7 +140,7 @@ class CustomTemplatesViewController {
const { ResourceControl: resourceControl } = await createAction(stackName, file, [], endpointId);
await this.ResourceControlService.applyResourceControl(userId, accessControlData, resourceControl);
this.Notifications.success('Stack successfully deployed');
this.$state.go('portainer.stacks');
this.$state.go('docker.stacks');
} catch (err) {
this.Notifications.error('Deployment error', err, 'Failed to deploy stack');
} finally {

View File

@ -1,10 +1,10 @@
<rd-header>
<rd-header-title title-text="Edit Custom Template">
<a data-toggle="tooltip" title="Refresh" ui-sref="portainer.templates.custom.edit({id:$ctrl.formValues.Id})" ui-sref-opts="{reload: true}">
<a data-toggle="tooltip" title="Refresh" ui-sref="docker.templates.custom.edit({id:$ctrl.formValues.Id})" ui-sref-opts="{reload: true}">
<i class="fa fa-sync" aria-hidden="true"></i>
</a>
</rd-header-title>
<rd-header-content> <a ui-sref="portainer.templates.custom">Custom templates</a> &gt; {{ $ctrl.formValues.Title }} </rd-header-content>
<rd-header-content> <a ui-sref="docker.templates.custom">Custom templates</a> &gt; {{ $ctrl.formValues.Title }} </rd-header-content>
</rd-header>
<div class="row" ng-if="$ctrl.formValues">

View File

@ -73,7 +73,7 @@ class EditCustomTemplateViewController {
await this.ResourceControlService.applyResourceControl(userId, this.formValues.AccessControlData, this.formValues.ResourceControl);
this.Notifications.success('Custom template successfully updated');
this.$state.go('portainer.templates.custom');
this.$state.go('docker.templates.custom');
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to update custom template');
} finally {

View File

@ -209,7 +209,7 @@
<option value="" label="Select a Custom template" disabled selected="selected"> </option>
</select>
<span ng-if="!templates.length">
No custom template are available. Head over the <a ui-sref="portainer.templates.custom.new">custom template view</a> to create one.
No custom template are available. Head over the <a ui-sref="docker.templates.custom.new">custom template view</a> to create one.
</span>
</div>
</div>

View File

@ -42,7 +42,7 @@
<a
ng-if="!state.externalStack && stackFileContent"
class="btn btn-primary btn-xs"
ui-sref="portainer.templates.custom.new({fileContent: stackFileContent, type: stack.Type})"
ui-sref="docker.templates.custom.new({fileContent: stackFileContent, type: stack.Type})"
>
Create template from stack
</a>