Sean Condon | 83fc39f | 2018-04-19 18:56:13 +0100 | [diff] [blame] | 1 | /* |
Sean Condon | 2aa8609 | 2018-07-16 09:04:05 +0100 | [diff] [blame^] | 2 | * Copyright 2018-present Open Networking Foundation |
Sean Condon | 83fc39f | 2018-04-19 18:56:13 +0100 | [diff] [blame] | 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the 'License'); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an 'AS IS' BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 16 | import { Component, OnInit, OnDestroy, Inject } from '@angular/core'; |
Sean Condon | 2aa8609 | 2018-07-16 09:04:05 +0100 | [diff] [blame^] | 17 | import { HttpClient, HttpErrorResponse } from '@angular/common/http'; |
| 18 | |
Sean Condon | 28ecc5f | 2018-06-25 12:50:16 +0100 | [diff] [blame] | 19 | import { DialogService } from '../../../fw/layer/dialog.service'; |
| 20 | import { FnService } from '../../../fw/util/fn.service'; |
| 21 | import { IconService } from '../../../fw/svg/icon.service'; |
| 22 | import { KeyService } from '../../../fw/util/key.service'; |
| 23 | import { LionService } from '../../../fw/util/lion.service'; |
| 24 | import { LoadingService } from '../../../fw/layer/loading.service'; |
| 25 | import { LogService } from '../../../log.service'; |
| 26 | import { TableBaseImpl, TableResponse, TableFilter, SortParams, SortDir } from '../../../fw/widget/table.base'; |
| 27 | import { UrlFnService } from '../../../fw/remote/urlfn.service'; |
| 28 | import { WebSocketService } from '../../../fw/remote/websocket.service'; |
| 29 | import { TableFilterPipe } from '../../../fw/widget/tablefilter.pipe'; |
Sean Condon | 83fc39f | 2018-04-19 18:56:13 +0100 | [diff] [blame] | 30 | |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 31 | const INSTALLED = 'INSTALLED'; |
| 32 | const ACTIVE = 'ACTIVE'; |
Sean Condon | 2aa8609 | 2018-07-16 09:04:05 +0100 | [diff] [blame^] | 33 | const APPMGMTREQ = 'appManagementRequest'; |
| 34 | const DETAILSREQ = 'appDetailsRequest'; |
| 35 | const FILEUPLOADURL = 'upload'; |
| 36 | const FILEDOWNLOADURL = 'download'; |
| 37 | const ACTIVATEOPTION = '?activate=true'; |
| 38 | const DRAGDROPMSG1 = 'Drag and drop one file at a time'; |
| 39 | const DRAGDROPMSGEXT = 'Only files ending in .oar can be dropped'; |
Sean Condon | 28ecc5f | 2018-06-25 12:50:16 +0100 | [diff] [blame] | 40 | |
| 41 | /** Prefix to access the REST service for applications */ |
| 42 | export const APPURLPREFIX = '../../ui/rs/applications/'; // TODO: This is a hack to work off GUIv1 URL |
| 43 | /** Suffix to access the icon of the application - gives back an image */ |
| 44 | export const ICONURLSUFFIX = '/icon'; |
| 45 | |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 46 | const downloadSuffix = '/download'; |
| 47 | const dialogId = 'app-dialog'; |
| 48 | const dialogOpts = { |
| 49 | edge: 'right', |
| 50 | width: 400, |
| 51 | }; |
| 52 | const strongWarning = { |
| 53 | 'org.onosproject.drivers': true, |
| 54 | }; |
| 55 | const propOrder = ['id', 'state', 'category', 'version', 'origin', 'role']; |
| 56 | |
Sean Condon | 28ecc5f | 2018-06-25 12:50:16 +0100 | [diff] [blame] | 57 | /** |
| 58 | * Model of the data returned through the Web Socket about apps. |
| 59 | */ |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 60 | interface AppTableResponse extends TableResponse { |
Sean Condon | 28ecc5f | 2018-06-25 12:50:16 +0100 | [diff] [blame] | 61 | apps: App[]; |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 62 | } |
| 63 | |
Sean Condon | 28ecc5f | 2018-06-25 12:50:16 +0100 | [diff] [blame] | 64 | /** |
| 65 | * Model of the data returned through Web Socket for a single App |
| 66 | */ |
| 67 | export interface App { |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 68 | category: string; |
| 69 | desc: string; |
Sean Condon | 28ecc5f | 2018-06-25 12:50:16 +0100 | [diff] [blame] | 70 | features: string[]; |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 71 | icon: string; |
| 72 | id: string; |
| 73 | origin: string; |
Sean Condon | 28ecc5f | 2018-06-25 12:50:16 +0100 | [diff] [blame] | 74 | permissions: string[]; |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 75 | readme: string; |
Sean Condon | 28ecc5f | 2018-06-25 12:50:16 +0100 | [diff] [blame] | 76 | required_apps: string[]; |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 77 | role: string; |
| 78 | state: string; |
| 79 | title: string; |
| 80 | url: string; |
| 81 | version: string; |
| 82 | _iconid_state: string; |
| 83 | } |
| 84 | |
Sean Condon | 2aa8609 | 2018-07-16 09:04:05 +0100 | [diff] [blame^] | 85 | export enum AppAction { |
| 86 | NONE = 0, |
| 87 | ACTIVATE = 1, |
| 88 | DEACTIVATE = 2, |
| 89 | UNINSTALL = 3, |
| 90 | } |
| 91 | |
Sean Condon | 28ecc5f | 2018-06-25 12:50:16 +0100 | [diff] [blame] | 92 | /** |
| 93 | * Model of the Control Button |
| 94 | */ |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 95 | interface CtrlBtnState { |
| 96 | installed: boolean; |
| 97 | selection: string; |
| 98 | active: boolean; |
| 99 | } |
| 100 | |
Sean Condon | 83fc39f | 2018-04-19 18:56:13 +0100 | [diff] [blame] | 101 | /** |
Sean Condon | 2aa8609 | 2018-07-16 09:04:05 +0100 | [diff] [blame^] | 102 | * ONOS GUI -- Apps View Component extends TableBaseImpl |
Sean Condon | 83fc39f | 2018-04-19 18:56:13 +0100 | [diff] [blame] | 103 | */ |
| 104 | @Component({ |
| 105 | selector: 'onos-apps', |
| 106 | templateUrl: './apps.component.html', |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 107 | styleUrls: [ |
| 108 | './apps.component.css', './apps.theme.css', |
Sean Condon | 28ecc5f | 2018-06-25 12:50:16 +0100 | [diff] [blame] | 109 | '../../../fw/widget/table.css', '../../../fw/widget/table.theme.css' |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 110 | ] |
Sean Condon | 83fc39f | 2018-04-19 18:56:13 +0100 | [diff] [blame] | 111 | }) |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 112 | export class AppsComponent extends TableBaseImpl implements OnInit, OnDestroy { |
| 113 | |
| 114 | // deferred localization strings |
| 115 | lionFn; // Function |
| 116 | warnDeactivate: string; |
| 117 | warnOwnRisk: string; |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 118 | ctrlBtnState: CtrlBtnState; |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 119 | appFile: any; |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 120 | |
| 121 | uploadTip: string; |
| 122 | activateTip: string; |
| 123 | deactivateTip: string; |
| 124 | uninstallTip: string; |
| 125 | downloadTip: string; |
Sean Condon | 2aa8609 | 2018-07-16 09:04:05 +0100 | [diff] [blame^] | 126 | alertMsg: string; |
| 127 | AppActionEnum: any = AppAction; |
| 128 | appAction: AppAction = AppAction.NONE; |
| 129 | confirmMsg: string = ''; |
| 130 | strongWarning: string = ''; |
Sean Condon | 83fc39f | 2018-04-19 18:56:13 +0100 | [diff] [blame] | 131 | |
| 132 | constructor( |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 133 | protected fs: FnService, |
Sean Condon | 83fc39f | 2018-04-19 18:56:13 +0100 | [diff] [blame] | 134 | private ds: DialogService, |
| 135 | private is: IconService, |
| 136 | private ks: KeyService, |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 137 | private lion: LionService, |
| 138 | protected ls: LoadingService, |
| 139 | protected log: LogService, |
Sean Condon | 83fc39f | 2018-04-19 18:56:13 +0100 | [diff] [blame] | 140 | private ufs: UrlFnService, |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 141 | protected wss: WebSocketService, |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 142 | @Inject('Window') private window: Window, |
Sean Condon | 2aa8609 | 2018-07-16 09:04:05 +0100 | [diff] [blame^] | 143 | private httpClient: HttpClient |
Sean Condon | 83fc39f | 2018-04-19 18:56:13 +0100 | [diff] [blame] | 144 | ) { |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 145 | super(fs, null, log, wss, 'app'); |
| 146 | this.responseCallback = this.appResponseCb; |
Sean Condon | 2aa8609 | 2018-07-16 09:04:05 +0100 | [diff] [blame^] | 147 | this.parentSelCb = this.rowSelection; |
Sean Condon | 28ecc5f | 2018-06-25 12:50:16 +0100 | [diff] [blame] | 148 | // pre-populate sort so active apps are at the top of the list |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 149 | this.sortParams = { |
| 150 | firstCol: 'state', |
Sean Condon | 28ecc5f | 2018-06-25 12:50:16 +0100 | [diff] [blame] | 151 | firstDir: SortDir.desc, |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 152 | secondCol: 'title', |
Sean Condon | 28ecc5f | 2018-06-25 12:50:16 +0100 | [diff] [blame] | 153 | secondDir: SortDir.asc, |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 154 | }; |
Sean Condon | 28ecc5f | 2018-06-25 12:50:16 +0100 | [diff] [blame] | 155 | // We want doLion() to be called only after the Lion |
| 156 | // service is populated (from the WebSocket) |
| 157 | // If lion is not ready we make do with a dummy function |
| 158 | // As soon a lion gets loaded this function will be replaced with |
| 159 | // the real thing |
| 160 | if (this.lion.ubercache.length === 0) { |
| 161 | this.lionFn = this.dummyLion; |
| 162 | this.lion.loadCbs.set('apps', () => this.doLion()); |
| 163 | } else { |
| 164 | this.doLion(); |
| 165 | } |
| 166 | |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 167 | this.ctrlBtnState = <CtrlBtnState>{ |
| 168 | installed: false, |
| 169 | active: false |
| 170 | }; |
Sean Condon | 83fc39f | 2018-04-19 18:56:13 +0100 | [diff] [blame] | 171 | } |
| 172 | |
Sean Condon | 28ecc5f | 2018-06-25 12:50:16 +0100 | [diff] [blame] | 173 | /** |
| 174 | * Initialize querying the WebSocket for App table details |
| 175 | */ |
Sean Condon | 83fc39f | 2018-04-19 18:56:13 +0100 | [diff] [blame] | 176 | ngOnInit() { |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 177 | this.init(); |
Sean Condon | 83fc39f | 2018-04-19 18:56:13 +0100 | [diff] [blame] | 178 | } |
| 179 | |
Sean Condon | 28ecc5f | 2018-06-25 12:50:16 +0100 | [diff] [blame] | 180 | /** |
| 181 | * Stop sending queries to WebSocket |
| 182 | */ |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 183 | ngOnDestroy() { |
Sean Condon | 28ecc5f | 2018-06-25 12:50:16 +0100 | [diff] [blame] | 184 | this.lion.loadCbs.delete('apps'); |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 185 | this.destroy(); |
| 186 | this.log.debug('AppComponent destroyed'); |
| 187 | } |
| 188 | |
| 189 | /** |
| 190 | * The callback called when App data returns from WSS |
| 191 | */ |
| 192 | appResponseCb(data: AppTableResponse) { |
| 193 | this.log.debug('App response received for ', data.apps.length, 'apps'); |
| 194 | } |
| 195 | |
Sean Condon | 2aa8609 | 2018-07-16 09:04:05 +0100 | [diff] [blame^] | 196 | /** |
| 197 | * called when a row is selected - sets the state of control icons |
| 198 | */ |
| 199 | rowSelection(event: any, selRow: any) { |
| 200 | this.ctrlBtnState.installed = this.selId && selRow && selRow.state === INSTALLED; |
| 201 | this.ctrlBtnState.active = this.selId && selRow && selRow.state === ACTIVE; |
| 202 | this.ctrlBtnState.selection = this.selId; |
| 203 | this.log.debug('Row ', this.selId, 'selected', this.ctrlBtnState); |
| 204 | } |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 205 | |
Sean Condon | 2aa8609 | 2018-07-16 09:04:05 +0100 | [diff] [blame^] | 206 | |
| 207 | /** |
| 208 | * Perform one of the app actions - activate, deactivate or uninstall |
| 209 | * Raises a dialog which calls back the dOk() below |
| 210 | */ |
| 211 | confirmAction(action: AppAction): void { |
| 212 | this.appAction = action; |
| 213 | const appActionLc = (<string>AppAction[this.appAction]).toLowerCase(); |
| 214 | |
| 215 | this.confirmMsg = this.lionFn(appActionLc) + ' ' + this.selId; |
| 216 | if (strongWarning[this.selId]) { |
| 217 | this.strongWarning = this.warnDeactivate + '\n' + this.warnOwnRisk; |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 218 | } |
Sean Condon | 2aa8609 | 2018-07-16 09:04:05 +0100 | [diff] [blame^] | 219 | |
| 220 | this.log.debug('Initiating', this.appAction, 'of', this.selId); |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 221 | } |
| 222 | |
Sean Condon | 2aa8609 | 2018-07-16 09:04:05 +0100 | [diff] [blame^] | 223 | /** |
| 224 | * Callback when the Confirm dialog is shown and a choice is made |
| 225 | */ |
| 226 | dOk(choice: boolean) { |
| 227 | const appActionLc = (<string>AppAction[this.appAction]).toLowerCase(); |
| 228 | if (choice) { |
| 229 | this.log.debug('Confirmed', appActionLc, 'on', this.selId); |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 230 | |
Sean Condon | 2aa8609 | 2018-07-16 09:04:05 +0100 | [diff] [blame^] | 231 | this.wss.sendEvent(APPMGMTREQ, { |
| 232 | action: appActionLc, |
| 233 | name: this.selId, |
| 234 | sortCol: this.sortParams.firstCol, |
| 235 | sortDir: SortDir[this.sortParams.firstDir], |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 236 | }); |
Sean Condon | 2aa8609 | 2018-07-16 09:04:05 +0100 | [diff] [blame^] | 237 | if (this.appAction === AppAction.UNINSTALL) { |
| 238 | this.selId = ''; |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 239 | } else { |
Sean Condon | 2aa8609 | 2018-07-16 09:04:05 +0100 | [diff] [blame^] | 240 | this.wss.sendEvent(DETAILSREQ, { id: this.selId }); |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 241 | } |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 242 | |
Sean Condon | 2aa8609 | 2018-07-16 09:04:05 +0100 | [diff] [blame^] | 243 | } else { |
| 244 | this.log.debug('Cancelled', appActionLc, 'on', this.selId); |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 245 | } |
Sean Condon | 2aa8609 | 2018-07-16 09:04:05 +0100 | [diff] [blame^] | 246 | this.confirmMsg = ''; |
| 247 | this.strongWarning = ''; |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 248 | } |
| 249 | |
| 250 | downloadApp() { |
| 251 | if (this.ctrlBtnState.selection) { |
Sean Condon | 2aa8609 | 2018-07-16 09:04:05 +0100 | [diff] [blame^] | 252 | (<any>this.window).location = APPURLPREFIX + this.selId + '/' + FILEDOWNLOADURL; |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 253 | } |
| 254 | } |
| 255 | |
| 256 | /** |
Sean Condon | 2aa8609 | 2018-07-16 09:04:05 +0100 | [diff] [blame^] | 257 | * When the file is selected this fires |
| 258 | * It passes the file on to the server through a POST request |
| 259 | * If there is an error its logged and raised to the user through Flash Component |
| 260 | */ |
| 261 | fileEvent(event: any, activateImmediately?: boolean) { |
| 262 | this.log.debug('File event for', event.target.files[0]); |
| 263 | const formData = new FormData(); |
| 264 | formData.append('file', event.target.files[0]); |
| 265 | let url = APPURLPREFIX + FILEUPLOADURL; |
| 266 | if (activateImmediately) { |
| 267 | url += ACTIVATEOPTION; |
| 268 | } |
| 269 | this.httpClient |
| 270 | .post<any>(APPURLPREFIX + FILEUPLOADURL, formData) |
| 271 | .subscribe( |
| 272 | data => this.log.debug(data), |
| 273 | err => { |
| 274 | this.log.warn(err.message); |
| 275 | this.alertMsg = err.message; // This will activate flash msg |
| 276 | } |
| 277 | ); |
| 278 | |
| 279 | } |
| 280 | |
| 281 | /** |
| 282 | * When the upload button is clicked pass this on to the file input (hidden) |
| 283 | */ |
| 284 | triggerForm() { |
| 285 | document.getElementById('uploadFile') |
| 286 | .dispatchEvent(new MouseEvent('click')); |
| 287 | } |
| 288 | |
| 289 | /** |
Sean Condon | 28ecc5f | 2018-06-25 12:50:16 +0100 | [diff] [blame] | 290 | * Read the LION bundle for App and set up the lionFn |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 291 | */ |
| 292 | doLion() { |
| 293 | this.lionFn = this.lion.bundle('core.view.App'); |
| 294 | |
| 295 | this.warnDeactivate = this.lionFn('dlg_warn_deactivate'); |
| 296 | this.warnOwnRisk = this.lionFn('dlg_warn_own_risk'); |
| 297 | |
Sean Condon | 28ecc5f | 2018-06-25 12:50:16 +0100 | [diff] [blame] | 298 | this.uploadTip = this.lionFn('tt_ctl_upload'); |
| 299 | this.activateTip = this.lionFn('tt_ctl_activate'); |
| 300 | this.deactivateTip = this.lionFn('tt_ctl_deactivate'); |
| 301 | this.uninstallTip = this.lionFn('tt_ctl_uninstall'); |
| 302 | this.downloadTip = this.lionFn('tt_ctl_download'); |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 303 | } |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 304 | |
Sean Condon | 2aa8609 | 2018-07-16 09:04:05 +0100 | [diff] [blame^] | 305 | onDrop(event: DragEvent) { |
| 306 | event.preventDefault(); |
| 307 | event.stopPropagation(); |
| 308 | |
| 309 | const dt = event.dataTransfer; |
| 310 | const droppedFiles = dt.files; |
| 311 | |
| 312 | this.log.debug(droppedFiles.length, 'File(s) dropped'); |
| 313 | if (droppedFiles.length !== 1) { |
| 314 | this.log.error(DRAGDROPMSG1, droppedFiles.length, 'were dropped'); |
| 315 | this.alertMsg = DRAGDROPMSG1; |
| 316 | return; |
| 317 | } else if (droppedFiles[0].name.slice(droppedFiles[0].name.length - 4) !== '.oar') { |
| 318 | this.log.error(DRAGDROPMSGEXT, droppedFiles[0].name, 'rejected'); |
| 319 | this.alertMsg = DRAGDROPMSGEXT; |
| 320 | return; |
| 321 | } |
| 322 | |
| 323 | const fileEvent = { |
| 324 | target: { |
| 325 | files: droppedFiles |
| 326 | } |
| 327 | }; |
| 328 | this.fileEvent(fileEvent, true); |
| 329 | } |
| 330 | |
| 331 | onDragOver(evt) { |
| 332 | evt.preventDefault(); |
| 333 | evt.stopPropagation(); |
| 334 | } |
| 335 | |
| 336 | onDragLeave(evt) { |
| 337 | evt.preventDefault(); |
| 338 | evt.stopPropagation(); |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 339 | } |
Sean Condon | 83fc39f | 2018-04-19 18:56:13 +0100 | [diff] [blame] | 340 | } |