1 <div id="marketplace-plugin" class="page-layout simple tabbed" layout="column">
3 <div class="header md-accent-bg" layout="row" layout-align="start center">
4 <div class="white-fg" layout="row" layout-align="start center" flex>
6 class="goto-plugins-button md-icon-button"
7 aria-label="Go to plugins"
8 ng-click="vm.gotoPlugins()"
10 translate-attr-aria-label="MARKETPLACE.GO_TO_PLUGINS"
12 <md-icon md-font-icon="icon-arrow-left"></md-icon>
15 <div layout="row" layout-align="start center">
16 <div class="plugin-image" hide-xs>
17 <img ng-src="assets/images/business/plugins.jpg" />
20 <div layout="column" layout-align="start start">
23 <span ng-if="vm.plugin.name">{{vm.plugin.name}}</span>
25 <div class="subtitle secondary-text">
26 <span translate="APP.CREATED_AT"></span>
27 <span>{{vm.plugin.createdAt | date:'medium'}}</span>
35 ng-click="vm.savePlugin()"
36 ng-if="vm.crudPermissions.canEdit"
37 class="send-button md-accent md-raised"
38 ng-disabled="(generalForm.$invalid)"
40 translate-attr-aria-label="APP.SAVE"
51 md-selected="vm.selectedTab"
52 md-stretch-tabs="always"
59 <span translate="APP.SETTINGS">SETTINGS</span>
63 class="plugin-detail-form-container general md-background-bg md-whiteframe-1dp"
65 <div class="pb-16" layout="row" layout-align="start center">
66 <div class="h2 secondary-text" translate="APP.GENERAL">
70 <form name="generalForm" novalidate>
71 <md-input-container class="md-block">
72 <label translate="APP.NAME">Name</label>
76 ng-model="vm.plugin.name"
79 ng-disabled="!vm.crudPermissions.canEdit"
83 ng-messages="generalForm['name'].$error"
84 ng-show="generalForm['name'].$touched"
87 <div ng-message="required">
88 <span translate="APP.ERRORS.NAME_REQUIRED"
89 >Name field is required</span
94 <md-input-container class="md-block">
95 <label translate="APP.TYPE">Type</label>
99 ng-model="vm.plugin.type"
104 ng-messages="generalForm['type'].$error"
105 ng-show="generalForm['type'].$touched"
108 <div ng-message="required">
109 <span translate="APP.ERRORS.TYPE_REQUIRED"
110 >Type field is required</span
114 </md-input-container>
116 This field is disabled because setting it to true or false doesn't update the pm2 process status (start or stopping)
117 <md-input-container class="md-block">
119 ng-model="vm.plugin.active"
122 ><span translate="APP.ACTIVE">Active</span></md-switch
124 </md-input-container>
126 <md-input-container class="md-block">
127 <label translate="APP.DESCRIPTION">Description</label>
131 ng-model="vm.plugin.description"
132 ng-disabled="!vm.crudPermissions.canEdit"
136 ng-messages="generalForm['description'].$error"
137 ng-show="generalForm['description'].$touched"
140 <div ng-message="required">
141 <span translate="MARKETPLACE.ERRORS.DESCRIPTION_REQUIRED"
142 >Description field is required</span
146 </md-input-container>
147 <md-input-container class="md-block">
148 <label translate="MARKETPLACE.ICON">Icon</label>
152 ng-model="vm.plugin.icon"
154 ng-disabled="!vm.crudPermissions.canEdit"
158 ng-messages="generalForm['icon'].$error"
159 ng-show="generalForm['icon'].$touched"
162 <div ng-message="required">
163 <span translate="MARKETPLACE.ERRORS.ICON_REQUIRED"
164 >Icon field is required</span
168 </md-input-container>
169 <md-input-container class="md-block">
170 <label translate="MARKETPLACE.SIDEBAR">Sidebar</label>
173 ng-model="vm.plugin.sidebar"
175 ng-disabled="!vm.crudPermissions.canEdit"
177 <md-option ng-value="'always'">Always</md-option>
178 <md-option ng-value="'adminOnly'">Admin Only</md-option>
179 <md-option ng-value="'agentOnly'">Agent Only</md-option>
180 <md-option ng-value="'never'">Never</md-option>
183 ng-messages="generalForm['sidebar'].$error"
184 ng-show="generalForm['sidebar'].$touched"
187 <div ng-message="required">
188 <span translate="MARKETPLACE.ERRORS.SIDEBAR_REQUIRED"
189 >Sidebar field is required</span
193 </md-input-container>
195 ng-if="vm.plugin.sidebar === 'always' || vm.plugin.sidebar === 'adminOnly'"
198 <label translate="MARKETPLACE.ADMINURL">AdminUrl</label>
202 ng-model="vm.plugin.adminUrl"
203 ng-disabled="!vm.crudPermissions.canEdit"
207 ng-messages="generalForm['adminUrl'].$error"
208 ng-show="generalForm['adminUrl'].$touched"
211 <div ng-message="required">
212 <span translate="MARKETPLACE.ERRORS.ADMINURL_REQUIRED"
213 >AdminUrl field is required</span
217 </md-input-container>
219 ng-if="vm.plugin.sidebar === 'always' || vm.plugin.sidebar === 'agentOnly'"
222 <label translate="MARKETPLACE.AGENTURL">AgentUrl</label>
226 ng-model="vm.plugin.agentUrl"
227 ng-disabled="!vm.crudPermissions.canEdit"
231 ng-messages="generalForm['agentUrl'].$error"
232 ng-show="generalForm['agentUrl'].$touched"
235 <div ng-message="required">
236 <span translate="MARKETPLACE.ERRORS.AGENTURL_REQUIRED"
237 >AgentUrl field is required</span
241 </md-input-container>
243 ng-if="vm.plugin.type === 'script'"
246 <label translate="MARKETPLACE.SCRIPTNAME">ScriptName</label>
250 ng-model="vm.plugin.scriptName"
255 ng-messages="generalForm['scriptName'].$error"
256 ng-show="generalForm['scriptName'].$touched"
259 <div ng-message="required">
260 <span translate="MARKETPLACE.ERRORS.SCRIPTNAME_REQUIRED"
261 >ScriptName field is required</span
265 </md-input-container>
267 ng-if="vm.plugin.type === 'script'"
270 <label translate="MARKETPLACE.SCRIPTPATH">ScriptPath</label>
274 ng-model="vm.plugin.scriptPath"
276 ng-disabled="!vm.crudPermissions.canEdit"
280 ng-messages="generalForm['scriptPath'].$error"
281 ng-show="generalForm['scriptPath'].$touched"
284 <div ng-message="required">
285 <span translate="MARKETPLACE.ERRORS.SCRIPTPATH_REQUIRED"
286 >ScriptPath field is required</span
290 </md-input-container>
291 <md-input-container class="md-block">
292 <label translate="MARKETPLACE.VERSION">Version</label>
296 ng-model="vm.plugin.version"
301 ng-messages="generalForm['version'].$error"
302 ng-show="generalForm['version'].$touched"
305 <div ng-message="required">
306 <span translate="MARKETPLACE.ERRORS.VERSION_REQUIRED"
307 >Version field is required</span
311 </md-input-container>