-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #108 from IBM/development
Version 2.8.0 Build 87
- Loading branch information
Showing
26 changed files
with
581 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Python version (for python projects only) | ||
sonar.python.version=3 | ||
# Project Version to be used as Code Definition | ||
sonar.projectVersion=2.7.1.83 | ||
sonar.projectVersion=2.7.1.84 | ||
# Folders excluded from the scan | ||
sonar.exclusions=**/Notification Agent Core Tests/**,**/Notification Agent Alert Tests/**,**/Notification Agent Banner Tests/**,**/Notification Agent Popup Tests/**,**/Notification Agent Onboarding Tests/**,**/Notification Agent Popup UI Tests/**,**/Notification Agent Onboarding UI Tests/** | ||
sonar.exclusions=**/Notification Agent Core Tests/**,**/Notification Agent Alert Tests/**,**/Notification Agent Banner Tests/**,**/Notification Agent Popup Tests/**,**/Notification Agent Onboarding Tests/**,**/Notification Agent Popup UI Tests/**,**/Notification Agent Onboarding UI Tests/**,**/Notification Agent Core/Controllers/HelpBuilder.swift** |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
Notification Agent Onboarding/Controllers/OnboardingInteractiveEFCLController.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// | ||
// OnboardingInteractiveEFCLController.swift | ||
// Notification Agent | ||
// | ||
// Created by Simone Martorelli on 24/06/22. | ||
// Copyright © 2022 IBM. All rights reserved. | ||
// SPDX-License-Identifier: Apache2.0 | ||
// | ||
|
||
import Foundation | ||
|
||
final class OnboardingInteractiveEFCLController: InteractiveEFCLController { | ||
override func processInput(_ notification: Notification) { | ||
let inputData = inputPipe.availableData | ||
if !inputData.isEmpty { | ||
guard let strData = String(data: inputData, encoding: String.Encoding.utf8)?.trimmingCharacters(in: CharacterSet.newlines) else { return } | ||
let splittedStrings = strData.split(separator: "/") | ||
for string in splittedStrings { | ||
guard let argument = string.split(separator: " ", maxSplits: 1).first?.lowercased(), | ||
var value = string.split(separator: " ", maxSplits: 1).last else { continue } | ||
if value.last == " " { | ||
value.removeLast() | ||
} | ||
switch argument { | ||
case "percent", "top_message", "bottom_message", "user_interaction_enabled", "user_interruption_allowed", "exit_on_completion": | ||
NotificationCenter.default.post(name: Notification.Name("progressbar_interactive_updates"), object: ["data" : inputData]) | ||
default: | ||
continue | ||
} | ||
} | ||
} | ||
inputPipe.waitForDataInBackgroundAndNotify() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.