From 04c7a922cfeb1eacde974436cadf781f05c04713 Mon Sep 17 00:00:00 2001 From: Shubham Takode Date: Tue, 6 Feb 2024 12:37:41 +0530 Subject: [PATCH] Added menus to pipeline cards --- .gitignore | 3 ++ myreadme.md | 5 +++ package-lock.json | 19 ++++++++++ proxy.config.js | 38 +++++++++---------- src/app/webapp-common/constants.ts | 1 + .../pipeline-card-menu.component.html | 6 +++ .../pipeline-card-menu.component.ts | 2 + .../pipeline-card.component.html | 2 + .../pipeline-card/pipeline-card.component.ts | 2 + .../pipelines-page.component.html | 2 + .../pipelines-page.component.ts | 5 +++ src/environments/base.ts | 4 +- 12 files changed, 67 insertions(+), 22 deletions(-) create mode 100644 myreadme.md diff --git a/.gitignore b/.gitignore index f619940e..9bdc676b 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,6 @@ gen-code # System Files .DS_Store Thumbs.db + +# history +/.history diff --git a/myreadme.md b/myreadme.md new file mode 100644 index 00000000..2a7e80d9 --- /dev/null +++ b/myreadme.md @@ -0,0 +1,5 @@ +D:\MyClearML>forclearml\Scripts\activate +python mypipeline.py + + +D:\MyClearML>clearml-agent daemon \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 4e8da2e0..4c7b1e56 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5374,6 +5374,16 @@ "node": ">=14" } }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "peer": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, "node_modules/@schematics/angular": { "version": "16.2.9", "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-16.2.9.tgz", @@ -10532,6 +10542,15 @@ } } }, + "node_modules/font-awesome": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/font-awesome/-/font-awesome-4.7.0.tgz", + "integrity": "sha512-U6kGnykA/6bFmg1M/oT9EkFeIYv7JlX3bozwQJWiiLz6L0w3F5vBVPxHlwyX/vtNq1ckcpRKOB9f2Qal/VtFpg==", + "peer": true, + "engines": { + "node": ">=0.10.3" + } + }, "node_modules/for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", diff --git a/proxy.config.js b/proxy.config.js index ac23c46f..93ec86b3 100644 --- a/proxy.config.js +++ b/proxy.config.js @@ -1,43 +1,41 @@ -const fs = require('fs'); +const fs = require("fs"); -const targets = [ - 'https://api.trains-master.hosted.allegro.ai', // 1 -]; +const targets = ["http://localhost:8008"]; const PROXY_CONFIG = { - '^/version.json$': { + "^/version.json$": { bypass: (req, res, proxyOptions) => { let url; - if (req.url === '/version.json') { - url = 'src/version.json'; - } else if (req.url === '/configuration.json') { - url = 'src/configuration.json'; - } else if (req.url === '/onboarding.json') { - url = 'src/onboarding.json'; + if (req.url === "/version.json") { + url = "src/version.json"; + } else if (req.url === "/configuration.json") { + url = "src/configuration.json"; + } else if (req.url === "/onboarding.json") { + url = "src/onboarding.json"; } else { - return req.url; + return req.url; } const ver = fs.readFileSync(url); res.writeHead(200, { - 'Content-Length': ver.length, - 'Content-Type': 'application/json' + "Content-Length": ver.length, + "Content-Type": "application/json", }); res.end(ver); return true; - } - } + }, + }, }; targets.forEach((target, i) => { - const path = `/service/${i+1}/api`; - PROXY_CONFIG[path + '/*'] = { + const path = `/service/${i + 1}/api`; + PROXY_CONFIG[path + "/*"] = { target: target, secure: false, changeOrigin: true, pathRewrite: { - [path]: '' - } + [path]: "", + }, }; }); diff --git a/src/app/webapp-common/constants.ts b/src/app/webapp-common/constants.ts index 08f6fffd..8585b94a 100644 --- a/src/app/webapp-common/constants.ts +++ b/src/app/webapp-common/constants.ts @@ -64,6 +64,7 @@ export const ICONS = { METRICS: 'fa-chart-area', TOKEN: 'fa-key', EDIT: 'al-ico-edit', + EDIT2: 'fa-pen-to-square', EDITABLE: 'fa-pencil', RESET: 'al-ico-reset', CLONE: 'al-ico-clone', diff --git a/src/app/webapp-common/pipelines/pipeline-card-menu/pipeline-card-menu.component.html b/src/app/webapp-common/pipelines/pipeline-card-menu/pipeline-card-menu.component.html index d3f7a690..97f3db45 100644 --- a/src/app/webapp-common/pipelines/pipeline-card-menu/pipeline-card-menu.component.html +++ b/src/app/webapp-common/pipelines/pipeline-card-menu/pipeline-card-menu.component.html @@ -2,6 +2,12 @@ class="p-0 cell menu-button al-icon al-color blue-300 al-ico-bars-menu" > + + diff --git a/src/app/webapp-common/pipelines/pipeline-card-menu/pipeline-card-menu.component.ts b/src/app/webapp-common/pipelines/pipeline-card-menu/pipeline-card-menu.component.ts index f1308741..6ac5d84b 100644 --- a/src/app/webapp-common/pipelines/pipeline-card-menu/pipeline-card-menu.component.ts +++ b/src/app/webapp-common/pipelines/pipeline-card-menu/pipeline-card-menu.component.ts @@ -13,6 +13,8 @@ export class PipelineCardMenuComponent { @Input() project: Project; @Input() allTags: string[]; @Output() run = new EventEmitter(); + @Output() edit = new EventEmitter(); + @Output() runs = new EventEmitter(); @Output() addTag = new EventEmitter(); @Output() rename = new EventEmitter(); @Output() delete = new EventEmitter(); diff --git a/src/app/webapp-common/pipelines/pipeline-card/pipeline-card.component.html b/src/app/webapp-common/pipelines/pipeline-card/pipeline-card.component.html index 2be69b39..46651117 100644 --- a/src/app/webapp-common/pipelines/pipeline-card/pipeline-card.component.html +++ b/src/app/webapp-common/pipelines/pipeline-card/pipeline-card.component.html @@ -47,6 +47,8 @@ (run)="run.emit()" (rename)="editName.inlineActivated()" (addTag)="addTag.emit($event)" + (runs)="runs.emit(project)" + (edit)="edit.emit(project)" (delete)="delete.emit()" data-id="pipelineCardMenu" > diff --git a/src/app/webapp-common/pipelines/pipeline-card/pipeline-card.component.ts b/src/app/webapp-common/pipelines/pipeline-card/pipeline-card.component.ts index 118fd827..71a08b1a 100644 --- a/src/app/webapp-common/pipelines/pipeline-card/pipeline-card.component.ts +++ b/src/app/webapp-common/pipelines/pipeline-card/pipeline-card.component.ts @@ -44,6 +44,8 @@ import {ShowTooltipIfEllipsisDirective} from '@common/shared/ui-components/indic export class PipelineCardComponent extends ProjectCardComponent { @Input() allTags: string[]; @Output() run = new EventEmitter(); + @Output() runs = new EventEmitter(); // view runs for pipeline + @Output() edit = new EventEmitter(); // edit pipeline @Output() addTag = new EventEmitter(); @Output() removeTag = new EventEmitter(); @Output() delete = new EventEmitter(); diff --git a/src/app/webapp-common/pipelines/pipelines-page/pipelines-page.component.html b/src/app/webapp-common/pipelines/pipelines-page/pipelines-page.component.html index 68e20c76..fa730693 100644 --- a/src/app/webapp-common/pipelines/pipelines-page/pipelines-page.component.html +++ b/src/app/webapp-common/pipelines/pipelines-page/pipelines-page.component.html @@ -38,6 +38,8 @@ (addTag)="addTag(project, $event)" (removeTag)="removeTag(project, $event)" (delete)="deleteProject(project)" + (runs)="projectCardClicked($event)" + (edit)="pipelineEditClicked($event)" > diff --git a/src/app/webapp-common/pipelines/pipelines-page/pipelines-page.component.ts b/src/app/webapp-common/pipelines/pipelines-page/pipelines-page.component.ts index 9147d319..10c1618f 100644 --- a/src/app/webapp-common/pipelines/pipelines-page/pipelines-page.component.ts +++ b/src/app/webapp-common/pipelines/pipelines-page/pipelines-page.component.ts @@ -118,6 +118,11 @@ if __name__ == '__main__': this.store.dispatch(setSelectedProjectId({projectId: project.id, example: isExample(project)})); } + public pipelineEditClicked(pipeline: ProjectsGetAllResponseSingle) { + this.router.navigate([pipeline.id, 'edit'], {relativeTo: this.projectId ? this.route.parent.parent.parent : this.route}); + this.store.dispatch(setSelectedProjectId({projectId: pipeline.id, example: isExample(pipeline)})); + } + protected override getName() { return EntityTypeEnum.pipeline; } diff --git a/src/environments/base.ts b/src/environments/base.ts index 55554e2c..ebfcc182 100644 --- a/src/environments/base.ts +++ b/src/environments/base.ts @@ -65,7 +65,7 @@ export const BASE_ENV = { apiBaseUrl: null, fileBaseUrl: null, productName: 'clearml', - demo: false, + demo: true, headerPrefix: 'X-Clearml', version: versionConf.version, userKey: 'EYVQ385RW7Y2QQUH88CZ7DWIQ1WUHP', @@ -73,7 +73,7 @@ export const BASE_ENV = { companyID: 'd1bd92a3b039400cbafc60a7a5b1e52b', loginNotice: '', loginBanner: '', - autoLogin: false, + autoLogin: true, whiteLabelLogo: null, whiteLabelLink: null, whiteLabelLoginTitle: null,