Agent Notebooks Scheduler (#6786)

* added agent notebooks, notebook history view and view materialized notebook button

* Got a basic UI running for viewing notebook history

* made some changes to make UI look good

* Added new notebook dialog

* Added new notebook Dialog

* Added create notebook dialog

* Added edit and delete notebook job

* Added some notebook history features

* Added new notebook job icons, fixed a minor bug
in openmaterializednotebookAPI and added fixed the
schedule Picker API.

* Fixed Bugs in Notebook Grid expansion

* Fixed Notebook table highlighting and
grid generation is done using code.

* fixed some UI bugs

* Added changes to reflect sqltoolservice api

* Fixed some localize keys

* Made changes in the PR and added
ability to open Template Notebooks from
notebook history view.

* Added pin and renaming to notebook history

* made some library calls async

* fixed an import bug caused by merging from master

* Validation in NotebookJobDialog

* Added entry points for scheduling notebooks
on file explorer and notebook editor

* Handled no active connections and
a small bug in collapsing grid

* fix a bug in scheduling notebook from explorer
and toolbar

* setting up agent providers from connection now

* changed modals

* Reupload edited template

* Add dialog info, solved an edit bug and localized
UI strings.

* Bug fixes in UI, notebook renaming and
editing template on fly.

* fixed a bug that failed editing notebook jobs from notebook jobs table

* Fixed a cyclic dependency, made strings const and
some other changes in the PR

* Made some cyclic dependency and some fixes from PR

* made some changes mentioned in the PR

* Changed storage database health text

* Changed the sqltoolservice version to the point to the latest build.
This commit is contained in:
Aasim Khan
2019-09-04 15:12:35 -07:00
committed by GitHub
parent 0a393400b2
commit fbb2accacb
48 changed files with 3948 additions and 149 deletions

View File

@@ -20,14 +20,13 @@ import { focusBorder, foreground } from 'vs/platform/theme/common/colorRegistry'
import { Button } from 'sql/base/browser/ui/button/button';
import { Color } from 'vs/base/common/color';
@Component({
selector: 'modelview-button',
template: `
<div>
<label for={{this.label}}>
<div #input style="width: 100%">
<input #fileInput *ngIf="this.isFile === true" id={{this.label}} type="file" accept=".sql" style="display: none">
<input #fileInput *ngIf="this.isFile === true" id={{this.label}} type="file" accept="{{ this.fileType }}" style="display: none">
</div>
</label>
</div>
@@ -37,6 +36,7 @@ export default class ButtonComponent extends ComponentWithIconBase implements IC
@Input() descriptor: IComponentDescriptor;
@Input() modelStore: IModelStore;
private _button: Button;
private fileType: string = '.sql';
@ViewChild('input', { read: ElementRef }) private _inputContainer: ElementRef;
@ViewChild('fileInput', { read: ElementRef }) private _fileInputContainer: ElementRef;
@@ -71,7 +71,10 @@ export default class ButtonComponent extends ComponentWithIconBase implements IC
self.fileContent = text.toString();
self.fireEvent({
eventType: ComponentEventType.onDidClick,
args: self.fileContent
args: {
filePath: file.path,
fileContent: self.fileContent
}
});
};
reader.readAsText(file);
@@ -101,6 +104,9 @@ export default class ButtonComponent extends ComponentWithIconBase implements IC
super.setProperties(properties);
this._button.enabled = this.enabled;
this._button.label = this.label;
if (this.properties.fileType) {
this.fileType = properties.fileType;
}
this._button.title = this.title;
// Button's ariaLabel gets set to the label by default.
@@ -116,6 +122,7 @@ export default class ButtonComponent extends ComponentWithIconBase implements IC
this._button.setWidth(this.convertSize(this.height.toString()));
}
this.updateIcon();
this._changeRef.detectChanges();
}
protected updateIcon() {
@@ -182,6 +189,10 @@ export default class ButtonComponent extends ComponentWithIconBase implements IC
this.setPropertyFromUI<azdata.ButtonProperties, string>((properties, title) => { properties.title = title; }, newValue);
}
private setFileType(value: string) {
this.properties.fileType = value;
}
private get ariaLabel(): string {
return this.getPropertyOrDefault<azdata.ButtonProperties, string>((properties) => properties.ariaLabel, '');
}