-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added endpoint for fetching all notebook jobs #834
Merged
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
0548b14
Added endpoint for fetching all notebook jobs
e93875b
Refractored NotebookJobInfo to AgentNotebookInfo to make it more cons…
f712b14
Added Notebook History endpoint in contracts.
16ff3e6
Added Create, Update, Delete notebook endpoints. Also added separate …
598b91e
AgentNotebookInfo is now derived from AgentJobInfo
e05e3a3
added fetch noteook history endpoint
aasimkhan30 b81d721
Added fetching materialized notebook endpoint
aasimkhan30 32be5ac
Added code for cleaning up the directory
aasimkhan30 b0a9fbf
Added create notebook api
aasimkhan30 05503eb
Added Update and delete notebook job
aasimkhan30 d06d027
Fixed notebook history API
aasimkhan30 ff74e7b
Added last run info to the script and template folder
aasimkhan30 7602f7e
Added execute database feature for notebook Jobs
aasimkhan30 0fa8005
Merge branch 'master' of https://github.com/microsoft/sqltoolsservice…
aasimkhan30 98ef5c8
SQL commands are now using sqlparameters to prevent
aasimkhan30 e025516
Changed rundate and runtime to string to preserve
aasimkhan30 42651dd
integration test for agentnotebooks api
aasimkhan30 d56a0ea
Made some changes mentioned in PR
aasimkhan30 fc71b39
Refactored the code, removed enpoint logic from the notebook handler and
aasimkhan30 2e2da19
Merge branch 'master' of https://github.com/microsoft/sqltoolsservice…
aasimkhan30 cf95619
changes select statements, fixed a bug in the test job cleanup
aasimkhan30 256e483
added notebook_error column in notebook history select statement
aasimkhan30 19442dc
Added get template notebook endpoint
aasimkhan30 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
51 changes: 51 additions & 0 deletions
51
src/Microsoft.SqlTools.ServiceLayer/Agent/Contracts/AgentNotebookRequest.cs
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,51 @@ | ||
// | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
// | ||
|
||
using Microsoft.SqlTools.Hosting.Protocol.Contracts; | ||
using Microsoft.SqlTools.ServiceLayer.TaskServices; | ||
using Microsoft.SqlTools.ServiceLayer.Utility; | ||
using Microsoft.SqlTools.Utility; | ||
|
||
namespace Microsoft.SqlTools.ServiceLayer.Agent.Contracts | ||
{ | ||
/// <summary> | ||
aasimkhan30 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
/// SQL Agent Notebooks activity parameters | ||
/// </summary> | ||
public class AgentNotebooksParams : GeneralRequestDetails | ||
{ | ||
public string OwnerUri {get; set;} | ||
|
||
} | ||
/// <summary> | ||
/// SQL Agent Notebook activity result | ||
/// </summary> | ||
public class AgentNotebooksResult : ResultStatus | ||
{ | ||
public NotebookJobInfo[] Notebooks {get; set;} | ||
} | ||
/// <summary> | ||
/// SQL Agent Notebook request type | ||
/// </summary> | ||
public class AgentNotebooksRequest | ||
{ | ||
/// <summary> | ||
/// Request definition | ||
/// </summary> | ||
public static readonly | ||
RequestType<AgentNotebooksParams, AgentNotebooksResult> Type = | ||
RequestType<AgentNotebooksParams, AgentNotebooksResult>.Create("agent/notebooks"); | ||
} | ||
/// <summary> | ||
/// SQL Agent Notebook Job Info Class | ||
/// </summary> | ||
public class NotebookJobInfo | ||
aasimkhan30 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{ | ||
public AgentJobInfo Job {get; set;} | ||
public string Template {get; set;} | ||
public string TargetDatabase {get; set;} | ||
} | ||
|
||
|
||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactor these large methods into several small methods. And create a object model of some type to organize the functionality.